nx_eq_factor.nx
buildroot/runtime/nx_eq_factor.nx
about
nx_eq_factor.nx -- equality factoring (Bachmair-Ganzinger 1994).
Per Vampire-displacement roadmap Phase 2. Standard inference rule
in superposition calculus, paired with paramodulation. Required
for completeness when an equational saturation fires.
Standard formulation:
C ∨ s ≃ t ∨ s' ≃ t' (two positive equality literals)
σ = mgu(s, s')
--------------------------
(C ∨ s ≃ t ∨ t ≄ t')σ
Reading: when two equality literals share a unifiable LHS, ONE of
them (here s ≃ t) is kept and the OTHER's RHS is asserted DIFFERENT
from the kept RHS (t ≄ t'). Future inference may resolve t≄t'
against an equality elsewhere; if t and t' really were equal the
resolvent is contradicted, otherwise the disequality survives.
Ordering side conditions for full Bachmair-Ganzinger soundness are
the caller's responsibility (typically checked via KBO/LPO):
- s ≃ t is selected or maximal in C
- sσ ⊁ tσ
- (s ≃ t)σ ⊁ (s' ≃ t')σ
API: caller picks the two equality-literal indices i and j; the
primitive validates polarity + equality head, unifies the LHS pair,
and emits the residual.
dependencies 6 imports · 1 importers
imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_result.nxnx_unify.nxnx_resolution.nx
imported by: nx_eq_factor_test.nx
structs
| none |
consts
| none |
functions
| 45 | func nx_eq_factor_make_diseq(t1: *Term, t2: *Term, eq_sym: nx_int) -> *Literal |
| 61 | func nx_eq_factor(c: *Clause, i: nx_int, j: nx_int, called by 1: main calls 11: nx_result_errnx_clause_lit_atnx_term_argnx_subst_newnx_unifynx_result_is_err+5 |