eval_thr_lits
def
The count of literals in a multiset f that evaluate to true under the truth assignment α.
Statement
def eval_thr_lits {V : Type*} (α : V → Bool) (f : Multiset (CnfLit V)) : ℕ
- Defined in
- arXiv:2611.24548 Definition 2.12
- Verified
- 19 Nov 2026
- Axioms
- none listed
- Built on 1
- CnfLitA CNF literal over a variable type V is either a positive variable or a negated variable.
- Used by 2
- thr_res_soundnessSoundness of Threshold Resolution: for any CNF formula F : List (List (CnfLit V)), multiset of literals f : Multiset (CnfLit V), and…
- thr_res_unsat_of_refutationIf a Threshold Resolution refutation of a CNF formula F : List (List (CnfLit V)) exists (namely ThrResDerivable F 0 1), then F is…
Read back from the Lean
Given a type V, a truth assignment α : V → Bool, and a multiset f of literals over V (where a literal is either CnfLit.pos v or CnfLit.neg v for v : V), eval_thr_lits α f is defined as the cardinality (number of elements with multiplicity) of the sub-multiset of literals in f that evaluate to true under α—that is, literals CnfLit.pos v where α v = true, and literals CnfLit.neg v where !α v = true (i.e., α v = false).
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
/-- The number of true literals in a multiset under a Boolean assignment. -/ def eval_thr_lits {V : Type*} (α : V → Bool) (f : Multiset (CnfLit V)) : ℕ := (f.filter (fun l => (match l with | CnfLit.pos v => α v | CnfLit.neg v => !α v) = true)).card