code wiki / (root) / nx_triangulation_battery.nx

nx_triangulation_battery.nx

buildroot/runtime/nx_triangulation_battery.nx

6473 B184 linesdepth 5pulls 12 transitivereach 0 importersview sourcekind tooltopic triangulation
docsdependenciesstructsconstsfunctions

about

nx_triangulation_battery.nx -- substrate-side triangulated proof that algorithms can be called via NishiLang AND produce the proper result, with NO external dependencies. Per user 2026-05-14: "we want proofs that any algorithm can be called via nishi and have the proper result via nishi lang itself in a triangulated fashion". Method: for each primitive under test (AUT), run the AUT plus TWO independent witnesses: W1 = known-vector oracle (hardcoded expected answer) W2 = algebraic identity (compute the same value via a different path, often by composing other substrate primitives) If AUT == W1 == W2, the result is TRIANGULATED on that input. Aggregate verdict over the battery: tri_total, tri_agree, tri_fail. genealogy_id: substrate_triangulation_battery_2026_05_14 lineage_id: self_verified_correctness

dependencies 9 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_add_5.nx nx_add_10.nx nx_add_20.nx nx_classical_unpatented.nx nx_binary_search.nx nx_lcm.nx nx_triangulation_battery.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_add_5.nxnx_add_10.nxnx_add_20.nxnx_classical_unpatented.nxnx_binary_search.nxnx_lcm.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap println sys_write strlen sys_mmap ↻ nx_tri_check print sys_write ↻ strlen ↻ print_i64 sys_mmap ↻ itoa sys_mmap ↻ sys_write ↻ println ↻ nx_add_10 nx_add_5 nx_add_20 nx_gcd_euclidean nx_lcm nx_gcd nx_fibonacci nx_popcount_swar nx_bits_popcount64 nx_isqrt_newton nx_binary_search nx_binary_search_lower_bou print ↻ print_i64 ↻

structs

none

consts

none

functions

37func nx_tri_check(label: *u8, aut: nx_int, w1: nx_int, w2: nx_int,
called by 1: main calls 3: printprint_i64println
54func main() -> nx_exit