code wiki / _hdl_build / nx_vtransform_gate.nx

nx_vtransform_gate.nx

buildroot/runtime/_hdl_build/nx_vtransform_gate.nx

4365 B69 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic vtransform
docsdependenciesstructsconstsfunctions

about

nx_vtransform_gate.nx -- proves + MEASURES the sovereign 4x4 transform+quantize (nx_vtransform), V-R2. Native nx_cc->nxasm, no node. 1) energy compaction: a flat residual -> all energy in 1 coeff (DC); a smooth residual -> few coeffs 2) lossless round-trip at q=1: fwd -> quant -> dequant -> inv == the original residual 3) quantization compaction (MEASURED): a smooth residual at q=16 -> nonzero coeffs << 16 (the entropy cost) 4) bounded lossy round-trip at q=8: reconstructed within a bounded error of the original 5) anti-tautology: a high-frequency (checkerboard) residual does NOT collapse to DC (transform is real) license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_emit_lib.nx nx_vtransform.nx nx_vtransform_gate.nx

imports: nx_syscalls.nxnx_gate_emit_lib.nxnx_vtransform.nx

imported by: nobody (leaf or entry point)

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

main g_puts sys_write sys_mmap bcopy vt_fwd vt_wht4 vt_nonzero g_pn sys_mmap ↻ sys_write ↻ g_check g_puts ↻ vt_quant vt_dequant vt_inv vt_wht4 ↻ beq maxerr g_abs sys_exit

structs

none

consts

none

functions

13func g_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: maxerr
14func bcopy(d: *i64, s: *i64) -> i64 { var i: i64=0; while i<16 { d[i]=s[i]; i=i+1 } return 0 }
called by 1: main
15func beq(a: *i64, b: *i64) -> i64 { var i: i64=0; while i<16 { if a[i]!=b[i] { return 0 } i=i+1 } return 1 }
called by 1: main
16func maxerr(a: *i64, b: *i64) -> i64 { var m: i64=0; var i: i64=0; while i<16 { let e: i64=g_abs(a[i]-b[i]); if e>m { m=e } i=i+1 } return m }
called by 1: main calls 1: g_abs
18func main() -> i64