code wiki / (root) / nx_autoformalize.nx

nx_autoformalize.nx

buildroot/runtime/nx_autoformalize.nx

6008 B94 linesdepth 8pulls 8 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_autoformalize.nx -- AUTOFORMALIZATION rungs 1-4: informal arithmetic claim -> FORMAL Peano terms -> a derivation CHECKED by the LCF-style v2 kernel. This is the computational Frontier Radar's number-one OPPORTUNITY (momentum 33, researcher-measured 2025/26: autoformalization / proof assistants) getting its first sovereign organ -- the census found the gap, this closes rungs 1-4. 2026-07-15: the af_* machinery moved VERBATIM to nx_autoformalize_lib.nx (pure lib, no main) so other organs can compose the verifier -- the propose->verify loop (nx_nofloat_propose_verify_gate: the no-float LLM proposes, this kernel disposes). This organ = the same battery over the lib; behavior unchanged and re-proven by the battery below. SCOPE (honest): "<n|what> [plus|times <n|what>] =|<|<= <n>" (digits or number-words zero..twelve). A FALSE claim ("2 + 2 = 5") formalizes but is REFUTED; out-of-grammar text -> UNSUPPORTED (honest, no guess). The frontier meaning of autoformalization is LLM->Lean at paper scale -- this is rungs 1-4 of that ladder. Modes: no-arg = gate battery (expect_exit 0); argv[1] = one informal claim -> verdict. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_autoformalize_lib.nx nx_autoformalize.nx

imports: nx_autoformalize_lib.nx

imported by: nobody (leaf or entry point)

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

main af_decide af_parse af_tok_num af_streq af_tok_plus af_streq ↻ af_tok_times af_streq ↻ af_tok_le af_streq ↻ af_tok_lt af_streq ↻ af_tok_unknown af_streq ↻ af_tok_eqw af_streq ↻ af_w nx_k2_chain_new sys_mmap nx_arith_nat nx_arith_zero nx_term_const sys_mmap ↻ nx_arith_succ nx_term_app sys_mmap ↻ nx_arith_plus nx_term_app ↻ nx_arith_mult nx_term_app ↻ nx_k2_refl nx_k2_at nx_k2_eq sys_mmap ↻ nx_term_app ↻ af_derive_sum nx_arith_nat ↻ nx_arith_axiom_plus_zero nx_k2_axiom

structs

none

consts

none

functions

18func main(argc: i64, argv: *i64) -> i64