nx_lpo.nx
buildroot/runtime/nx_lpo.nx
about
nx_lpo.nx -- Lexicographic Path Ordering (LPO).
Per Vampire-displacement roadmap Phase 2. Sibling to KBO -- both
well-founded simplification orders on first-order terms. LPO is
purely structural: no symbol weights, just a total precedence on
symbols. Useful when KBO can't be admissibly weighted (e.g.
theories with many constants where all weights tied to w_0).
Kamin-Levy 1980 standard formulation:
s >_LPO t iff one of:
(LPO1) t is a proper subterm of s
(LPO2) s = f(s_1..s_n), t = g(t_1..t_m), f > g in precedence,
and s >_LPO t_j for every j in 1..m
(LPO3) s = f(s_1..s_n), t = f(t_1..t_n) (same head, same arity),
(s_1..s_n) >_LPO_lex (t_1..t_n) at the first differing
pair, and s >_LPO t_j for every j after that index
Sealed verdict {GT, EQ, LT, INCOMP}.
Reuses KboState's precedence + arity fields -- the precedence
concept is identical across KBO and LPO, so two stores would just
be redundant. weights field is ignored by LPO.
dependencies 6 imports · 1 importers
imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_result.nxnx_unify.nxnx_term_order.nx
imported by: nx_lpo_test.nx
structs
| none |
consts
| 38 | const NX_LPO_GT: nx_int = 1 |
| 39 | const NX_LPO_EQ: nx_int = 2 |
| 40 | const NX_LPO_LT: nx_int = 3 |
| 41 | const NX_LPO_INCOMP: nx_int = 4 |
functions
| 46 | func nx_lpo_is_proper_subterm(outer: *Term, inner: *Term) -> nx_int called by 2: nx_lpo_is_proper_subtermnx_lpo_compare calls 3: nx_term_argnx_term_eqnx_lpo_is_proper_subterm |
| 62 | func nx_lpo_prec_cmp(st: *KboState, a_sym: nx_int, b_sym: nx_int) -> nx_int called by 1: nx_lpo_compare |
| 71 | func nx_lpo_compare(st: *KboState, s: *Term, t: *Term) -> nx_int |
| 157 | func nx_lpo_verdict_name(v: nx_int) -> *u8 called by 1: report |