code wiki / (root) / nx_prover_a1.nx

nx_prover_a1.nx

buildroot/runtime/nx_prover_a1.nx

8206 B220 linesdepth 5pulls 6 transitivereach 1 importersview sourcekind librarytopic prover
docsdependenciesstructsconstsfunctions

about

nx_prover_a1.nx -- Phase A1 extended-rule forward-chaining prover. Phase A0 (in nx_prover.nx) handled modus ponens only. Phase A1 adds four more rule families, dispatched per cycle: substitution (a = b) + P(a) -> P(b) conjunction intro A + B -> A^B conjunction elim A^B -> A (and A^B -> B) disjunction intro A -> A v B (for declared OR-targets) All rules are declared as TABLES. The caller supplies: subst_table[i*3] = "lhs" stmt subst_table[i*3+1] = "rhs" stmt (an equality A=B implies a=b) subst_table[i*3+2] = "carrier" P(*) stmt conj_table[i*3] = A stmt conj_table[i*3+1] = B stmt conj_table[i*3+2] = A^B stmt The forward-chaining loop applies each rule family per cycle until target found or no progress. Phase A1 still uses opaque i64 stmt_ids -- no internal structure reasoning. Phase A2 will add typed terms + unification. genealogy_id: prawitz_natural_deduction_1965 + gentzen_sequent_1935 lineage_id: substitution + intro_elim_rules + forward_chaining axioms: NX_AX_LOGIC_MODUS_PONENS_RULE + NX_DRULE_SUBSTITUTION + NX_DRULE_CONJ_INTRO + NX_DRULE_CONJ_ELIM + NX_DRULE_DISJ_INTRO

dependencies 4 imports · 1 importers

syscalls.nx nx_axioms.nx nx_derive.nx nx_prover.nx nx_prover_a1.nx nx_prover_a1_test.nx

imports: syscalls.nxnx_axioms.nxnx_derive.nxnx_prover.nx

imported by: nx_prover_a1_test.nx

structs

none

consts

none

functions

51func nx_a1_step_substitution(s: *ProofState, subst: *i64, n_subst: i64) -> i64
88func nx_a1_step_conj_intro(s: *ProofState, conj: *i64, n_conj: i64) -> i64
125func nx_a1_step_conj_elim(s: *ProofState, conj: *i64, n_conj: i64) -> i64
159func nx_a1_step_disj_intro(s: *ProofState, disj: *i64, n_disj: i64) -> i64
186func nx_a1_step_all(s: *ProofState,