nx_theorem_card.nx
buildroot/runtime/nx_theorem_card.nx
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
imports: syscalls.nxnx_axioms.nx
imported by: nx_theorem_card_test.nx
structs
| 46 | struct TheoremCard |
consts
| 20 | const NX_MAGIC_125000000: i64 = 125000000 |
| 21 | const NX_MAGIC_1000000000: i64 = 1000000000 |
| 25 | const NX_XCHECK_NO_REF: i64 = 0 |
| 26 | const NX_XCHECK_MATCHES_INDEPENDENT: i64 = 1 |
| 27 | const NX_XCHECK_DIFFERS_INVESTIGATING: i64 = 2 |
| 28 | const NX_XCHECK_DIFFERS_WE_RIGHT: i64 = 3 |
| 29 | const NX_XCHECK_DIFFERS_WE_WRONG: i64 = 4 |
| 31 | const NX_DETERMINISM_BIT_IDENTICAL: i64 = 0 |
| 32 | const NX_DETERMINISM_WITHIN_TOLERANCE: i64 = 1 |
| 33 | const NX_DETERMINISM_NONDETERMINISTIC: i64 = 2 |
| 35 | const NX_FOUNDATION_SUFFICIENT: i64 = 0 // bits up; full chain |
| 36 | const NX_FOUNDATION_PARTIAL: i64 = 1 // missing some link |
| 37 | const NX_FOUNDATION_TBD: i64 = 2 // not yet audited |
| 39 | const NX_PERF_NO_BASELINE: i64 = 0 // incumbent N/A |
| 40 | const NX_PERF_WINS: i64 = 1 // ours ≤ theirs |
| 41 | const NX_PERF_LOSES: i64 = 2 // ours > theirs by ≥10% |
| 42 | const NX_PERF_TIES: i64 = 3 // within 10% |
| 66 | const NX_CARD_BYTES: i64 = 144 |
functions
| 68 | func nx_card_alloc() -> *TheoremCard |
| 93 | func nx_card_compute_completeness(c: *TheoremCard) -> i64 |
| 122 | func nx_card_set_lineage(c: *TheoremCard, codes: *i64, n: i64) -> i64 |
| 128 | func nx_card_set_genealogy_count(c: *TheoremCard, n: i64) -> i64 |
| 138 | func nx_card_check_or_refuse(c: *TheoremCard) -> i64 called by 1: main |
| 153 | func cd_putc(fd: i64, c: i64) -> i64 called by 1: cd_i64 |
| 160 | func cd_str(fd: i64, s: *u8, len: i64) -> i64 called by 1: nx_card_emit |
| 165 | func cd_strz(fd: i64, s: *u8) -> i64 called by 1: nx_card_emit |
| 172 | func cd_i64(fd: i64, n: i64) -> i64 |
| 196 | func nx_card_emit(fd: i64, c: *TheoremCard) -> i64 |
| 239 | func nx_card_build_pythagorean() -> *TheoremCard |