code wiki / (root) / nx_theorem_card.nx

nx_theorem_card.nx

buildroot/runtime/nx_theorem_card.nx

9942 B268 linesdepth 3pulls 4 transitivereach 1 importersview sourcekind librarytopic theorem
docsdependenciesstructsconstsfunctions

about

nx_theorem_card.nx -- substrate-enforced TheoremCard per S_CLASS_MATH_DOCTRINE. Every theorem the substrate exposes must populate a TheoremCard on all 8 axes. Production-path dispatch consults the card via nx_card_check_or_refuse; wobbly cards (any axis unproven) halt. genealogy_id: nishi_substrate_2026 lineage_id: formal_proof_theory + benchmarking_discipline axioms: NX_AX_LOGIC_NONCONTRADICTION (no claim + counter-claim)

dependencies 2 imports · 1 importers

syscalls.nx nx_axioms.nx nx_theorem_card.nx nx_theorem_card_test.nx

imports: syscalls.nxnx_axioms.nx

imported by: nx_theorem_card_test.nx

structs

46struct TheoremCard

consts

20const NX_MAGIC_125000000: i64 = 125000000
21const NX_MAGIC_1000000000: i64 = 1000000000
25const NX_XCHECK_NO_REF: i64 = 0
26const NX_XCHECK_MATCHES_INDEPENDENT: i64 = 1
27const NX_XCHECK_DIFFERS_INVESTIGATING: i64 = 2
28const NX_XCHECK_DIFFERS_WE_RIGHT: i64 = 3
29const NX_XCHECK_DIFFERS_WE_WRONG: i64 = 4
31const NX_DETERMINISM_BIT_IDENTICAL: i64 = 0
32const NX_DETERMINISM_WITHIN_TOLERANCE: i64 = 1
33const NX_DETERMINISM_NONDETERMINISTIC: i64 = 2
35const NX_FOUNDATION_SUFFICIENT: i64 = 0 // bits up; full chain
36const NX_FOUNDATION_PARTIAL: i64 = 1 // missing some link
37const NX_FOUNDATION_TBD: i64 = 2 // not yet audited
39const NX_PERF_NO_BASELINE: i64 = 0 // incumbent N/A
40const NX_PERF_WINS: i64 = 1 // ours ≤ theirs
41const NX_PERF_LOSES: i64 = 2 // ours > theirs by ≥10%
42const NX_PERF_TIES: i64 = 3 // within 10%
66const NX_CARD_BYTES: i64 = 144

functions

68func nx_card_alloc() -> *TheoremCard
93func nx_card_compute_completeness(c: *TheoremCard) -> i64
122func nx_card_set_lineage(c: *TheoremCard, codes: *i64, n: i64) -> i64
128func nx_card_set_genealogy_count(c: *TheoremCard, n: i64) -> i64
138func nx_card_check_or_refuse(c: *TheoremCard) -> i64
called by 1: main
153func cd_putc(fd: i64, c: i64) -> i64
called by 1: cd_i64
160func cd_str(fd: i64, s: *u8, len: i64) -> i64
called by 1: nx_card_emit
165func cd_strz(fd: i64, s: *u8) -> i64
called by 1: nx_card_emit
172func cd_i64(fd: i64, n: i64) -> i64
called by 2: cd_i64nx_card_emit calls 2: cd_putccd_i64
196func nx_card_emit(fd: i64, c: *TheoremCard) -> i64
called by 1: main calls 3: cd_strcd_i64cd_strz
239func nx_card_build_pythagorean() -> *TheoremCard