nx_arith.nx
buildroot/runtime/nx_arith.nx
about
nx_arith.nx -- arithmetic Term substrate.
Closes the named blocker for proof-by-induction / combinatorial /
arithmetic Wiedijk theorems. Per user 2026-05-15: "no losses".
Provides:
- nat constructors: zero, succ(n), plus(a,b), mult(a,b)
- nat literal builder for any concrete N
- Peano axioms emitted as v2 kernel axioms with REAL Term shapes
- finite induction engine: given P(0) + step axiom, auto-derive P(n)
by emitting N modus-ponens applications through the v2 kernel
Sym IDs reserved 410001..410010 (arith family; distinct from kernel
400xxx, user 1xxx, FMB 5xxxxx, AVATAR 6xxxxx, etc.)
dependencies 1 imports · 3 importers
imports: nx_kernel_v2.nx
imported by: nx_autoformalize_lib.nxnx_world_class_test.nxnx_world_demo_test.nx
structs
| none |
consts
| 24 | const NX_ARITH_SYM_ZERO: nx_int = 410001 |
| 25 | const NX_ARITH_SYM_SUCC: nx_int = 410002 |
| 26 | const NX_ARITH_SYM_PLUS: nx_int = 410003 |
| 27 | const NX_ARITH_SYM_MULT: nx_int = 410004 |
| 28 | const NX_ARITH_SYM_LE: nx_int = 410005 |
| 29 | const NX_ARITH_SYM_LT: nx_int = 410006 |
| 33 | const NX_ARITH_AX_PA1_ZERO_NOT_SUCC: nx_int = 411001 |
| 34 | const NX_ARITH_AX_PA2_SUCC_INJECT: nx_int = 411002 |
| 35 | const NX_ARITH_AX_PA3_PLUS_ZERO: nx_int = 411003 |
| 36 | const NX_ARITH_AX_PA4_PLUS_SUCC: nx_int = 411004 |
| 37 | const NX_ARITH_AX_PA5_INDUCTION: nx_int = 411005 |
functions
| 40 | func nx_arith_zero() -> *Term called by 4: nx_arith_natnx_arith_axiom_plus_zeronx_arith_axiom_zero_not_succaf_derive_mult calls 1: nx_term_const |
| 44 | func nx_arith_succ(n: *Term) -> *Term called by 4: nx_arith_natnx_arith_axiom_plus_succnx_arith_axiom_zero_not_succaf_derive_sum calls 1: nx_term_app |
| 50 | func nx_arith_plus(a: *Term, b: *Term) -> *Term |
| 59 | func nx_arith_mult(a: *Term, b: *Term) -> *Term |
| 69 | func nx_arith_nat(n: nx_int) -> *Term called by 10: af_derive_ltaf_derive_leaf_derive_sumaf_derive_multaf_decidet1_nat_literal+4 calls 2: nx_arith_zeronx_arith_succ |
| 103 | func nx_arith_finite_induction( |
| 135 | func nx_arith_axiom_plus_zero(ch: *K2Chain, n: *Term) -> nx_int |
| 140 | func nx_arith_axiom_plus_succ(ch: *K2Chain, n: *Term, m: *Term) -> nx_int |
| 147 | func nx_arith_axiom_zero_not_succ(ch: *K2Chain, n: *Term) -> nx_int |