mp_nsr_premise_terms
The pair of lists of left-hand side and right-hand side tropical terms (c : ℚ, m : CnfLit (Fin n) → ℕ) for an MP-NSR premise p : MpNsrPremise n F: clause C maps to ([(1, 0)], [(0, fun l => C.count l)]); weak_pos i to ([(0, 0)], [(0, fun l => if l = CnfLit.pos i then 1 else 0)]); weak_neg i to ([(0, 0)], [(0, fun l => if l = CnfLit.neg i then 1 else 0)]); pair_upper i to ([(1, 0)], [(0, fun l => if l = CnfLit.pos i ∨ l = CnfLit.neg i then 1 else 0)]); pair_lower i to ([(0, fun l => if l = CnfLit.pos i ∨ l = CnfLit.neg i then 1 else 0)], [(1, 0)]); resolution i to ([(0, fun l => if l = CnfLit.pos i then 1 else 0), (0, fun l => if l = CnfLit.neg i then 1 else 0)], [(0, 0)]).
Statement
def mp_nsr_premise_terms (n : ℕ) (F : List (List (CnfLit (Fin n)))) (p : MpNsrPremise n F) : List (ℚ × (CnfLit (Fin n) → ℕ)) × List (ℚ × (CnfLit (Fin n) → ℕ))- Defined in
- arXiv:2611.24548 Def 2.7
- Verified
- 19 Nov 2026
- Axioms
- none listed
- Built on 3
- MpNsrPremiseThe inductive type MpNsrPremise (n : ℕ) (F : List (List (CnfLit (Fin n)))) : Type of premises in an MP-NSR refutation of a CNF formula F :…
- CnfLitA CNF literal over a variable type V is either a positive variable or a negated variable.
- cnf_lit_decidable_eqDecidable equality on CNF literals, derived from decidable equality on the underlying variables.
- Used by 1
- is_mp_nsr_refutationAn MP-NSR certificate cert : List (MpNsrEntry n F) is a refutation of a CNF formula F : List (List (CnfLit (Fin n))) over Fin n if the…
Read back from the Lean
The definition mp_nsr_premise_terms takes:
1. a natural number n,
2. a formula F : List (List (CnfLit (Fin n))) (a list of clauses, where each clause is a list of literals over variables Fin n), and
3. a premise p : MpNsrPremise n F,
and returns a pair of lists of pairs (List (ℚ × (CnfLit (Fin n) → ℕ)) × List (ℚ × (CnfLit (Fin n) → ℕ))) by pattern matching on p:
- Case MpNsrPremise.clause C _: returns
([(1, fun _ => 0)], [(0, fun l => C.count l)]).
- Case MpNsrPremise.weak_pos i: returns
([(0, fun _ => 0)], [(0, fun l => if l = CnfLit.pos i then 1 else 0)]).
- Case MpNsrPremise.weak_neg i: returns
([(0, fun _ => 0)], [(0, fun l => if l = CnfLit.neg i then 1 else 0)]).
- Case MpNsrPremise.pair_upper i: returns
([(1, fun _ => 0)], [(0, fun l => if l = CnfLit.pos i ∨ l = CnfLit.neg i then 1 else 0)]).
- Case MpNsrPremise.pair_lower i: returns
([(0, fun l => if l = CnfLit.pos i ∨ l = CnfLit.neg i then 1 else 0)], [(1, fun _ => 0)]).
- Case MpNsrPremise.resolution i: returns
([(0, fun l => if l = CnfLit.pos i then 1 else 0), (0, fun l => if l = CnfLit.neg i then 1 else 0)], [(0, fun _ => 0)]).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- Left-hand and right-hand tropical terms for each MP-NSR premise. -/ def mp_nsr_premise_terms (n : ℕ) (F : List (List (CnfLit (Fin n)))) (p : MpNsrPremise n F) : List (ℚ × (CnfLit (Fin n) → ℕ)) × List (ℚ × (CnfLit (Fin n) → ℕ)) := match p with | .clause C _ => ([(1, fun _ => 0)], [(0, fun l => C.count l)]) | .weak_pos i => ([(0, fun _ => 0)], [(0, fun l => if l = CnfLit.pos i then 1 else 0)]) | .weak_neg i => ([(0, fun _ => 0)], [(0, fun l => if l = CnfLit.neg i then 1 else 0)]) | .pair_upper i => ([(1, fun _ => 0)], [(0, fun l => if l = CnfLit.pos i ∨ l = CnfLit.neg i then 1 else 0)]) | .pair_lower i => ([(0, fun l => if l = CnfLit.pos i ∨ l = CnfLit.neg i then 1 else 0)], [(1, fun _ => 0)]) | .resolution i => ([(0, fun l => if l = CnfLit.pos i then 1 else 0), (0, fun l => if l = CnfLit.neg i then 1 else 0)], [(0, fun _ => 0)])