code wiki / (root) / nx_linalg_chol_gate.nx

nx_linalg_chol_gate.nx

buildroot/runtime/nx_linalg_chol_gate.nx

11037 B236 linesdepth 7pulls 11 transitivereach 0 importersview sourcekind gate/prooftopic linalg
docsdependenciesstructsconstsfunctions

about

nx_linalg_chol_gate.nx -- THE REFEREE FOR THE Q30 CHOLESKY (graphics GR47). The done-rule GR47 declared BEFORE this was written, quoted from graphics.plan so the bar cannot drift: "a Q30 fixed-point Cholesky over nx_fixq30_lib arithmetic factors any SPD matrix up to the identity-space dimension, L times L-transposed reproduces the input within a stated Q30 band on random SPD fixtures, a non-SPD input is refused by name rather than producing garbage, and GR24 composes it for its draw (one ruler, never a second decomposition)" This gate proves the first three clauses. The fourth is GR24's own rung and is NOT claimed here. THE LOAD-BEARING TOOTH IS THE TEXTBOOK 3x3, because its factor is known by hand and INDEPENDENTLY of this implementation: A = [[4,12,-16],[12,37,-43],[-16,-43,98]] has L = [[2,0,0],[6,1,0],[-8,5,3]] exactly. A residual check alone would pass for any L whose product happens to reconstruct A; comparing against a hand-derived L tests that this is THE Cholesky factor and not merely A factor. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_linalg.nx nx_linalg_chol_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_linalg.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ lcg_vals sys_mmap ↻ lcg_mat nx_mat_new nx_mat_set fq_from_int nx_mat_new ↻ gv_check_eq gv_check gv_puts ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap la_cholesky_q30 nx_mat_set ↻ la_is_symmetric nx_mat_get nx_mat_get ↻

structs

none

consts

19const LCG_MAXN: i64 = 8

functions

22func lcg_mat(n: i64, vals: *i64) -> *Mat
32func lcg_vals(n: i64) -> *i64 { return sys_mmap(n * n * 8) as *i64 }
called by 1: main calls 1: sys_mmap
35func lcg_l_diff(l: *Mat, exp: *Mat) -> i64
called by 1: main calls 1: nx_mat_get
53func lcg_is_lower(l: *Mat) -> i64
called by 1: main calls 1: nx_mat_get
63func lcg_all_zero(l: *Mat) -> i64
called by 1: main calls 1: nx_mat_get
74func main() -> i64