code wiki / (root) / nx_prover.nx

nx_prover.nx

buildroot/runtime/nx_prover.nx

8288 B236 linesdepth 4pulls 5 transitivereach 12 importersview sourcekind librarytopic prover
docsdependenciesstructsconstsfunctions

about

nx_prover.nx -- substrate-native bounded forward-chaining proof search. No AI in the loop. No external prover. Deterministic BFS over the closed inference rules from nx_derive.nx, starting from axioms. Phase A0 capability: * Axiom-citation chains (target == cited axiom) * 1-step modus ponens (premise A and rule A->B in fact set) * Substitution chains (a=b and P(a) in fact set -> P(b)) * Bounded cycle + depth genealogy_id: gentzen_1935 (sequent calculus) + robinson_1965 (resolution) + wiedijk_qed_1994 (cross-verification vision) lineage_id: formal_proof_search + bounded_inference axioms: NX_AX_LOGIC_MODUS_PONENS_RULE, NX_AX_LOGIC_IDENTITY

dependencies 3 imports · 10 importers

syscalls.nx nx_axioms.nx nx_derive.nx nx_prover.nx nx_auto_verify.nx nx_auto_verify_test.nx nx_ingest_pipeline.nx nx_prover_a1.nx nx_prover_a1_test.nx nx_prover_eval.nx nx_prover_eval_test.nx nx_prover_test.nx nx_shard.nx nx_validation_cycle.nx

imports: syscalls.nxnx_axioms.nxnx_derive.nx

imported by: nx_auto_verify.nxnx_auto_verify_test.nxnx_ingest_pipeline.nxnx_prover_a1.nxnx_prover_a1_test.nxnx_prover_eval.nxnx_prover_eval_test.nxnx_prover_test.nxnx_shard.nxnx_validation_cycle.nx

structs

43struct Fact
54struct ProofState

consts

29const NX_PROVER_PROVED: i64 = 0
30const NX_PROVER_NOT_PROVED_BUDGET: i64 = 1
31const NX_PROVER_REFUTED: i64 = 2
32const NX_PROVER_NO_RULES_APPLY: i64 = 3
52const NX_FACT_BYTES: i64 = 48
63const NX_PROVER_MAX_FACTS: i64 = 1024

functions

65func nx_prover_state_alloc(target: i64) -> *ProofState
77func nx_prover_fact_at(s: *ProofState, i: i64) -> *Fact
82func nx_prover_add_axiom(s: *ProofState, stmt_id: i64, axiom_code: i64) -> i64
99func nx_prover_add_inferred(s: *ProofState, stmt_id: i64,
127func nx_prover_has_target(s: *ProofState) -> i64
142func nx_prover_has_stmt(s: *ProofState, stmt: i64) -> i64
168func nx_prover_step_mp(s: *ProofState, impl_table: *i64, n_impls: i64) -> i64
220func nx_prover_build_chain(s: *ProofState, chain: *DerivationChain) -> i64