AFTD Auto-Formalizing Theoretical Domains

thr_res_unsat_of_refutation

theoremverifiedformalization

If a Threshold Resolution refutation of a CNF formula F : List (List (CnfLit V)) exists (namely ThrResDerivable F 0 1), then F is unsatisfiable (¬ CnfSatisfiable F).

Statement

theorem thr_res_unsat_of_refutation {V : Type*} (F : List (List (CnfLit V))) (href : ThrResDerivable F 0 1) : ¬ CnfSatisfiable F
Formalizes
arXiv:2611.24548 Theorem 2.18
Verified
20 Nov 2026
Axioms
Quot.soundpropext
Built on 6
  • ThrResDerivableInductive derivation relation ThrResDerivable F f s for a CNF formula F : List (List (CnfLit V)) (a list of clauses, each a list of…
  • thr_res_soundnessSoundness of Threshold Resolution: for any CNF formula F : List (List (CnfLit V)), multiset of literals f : Multiset (CnfLit V), and…
  • CnfSatisfiableA CNF formula (a list of clauses, each a list of literals) is satisfiable if there is a truth assignment such that every clause contains…
  • eval_cnf_litEvaluation of a CNF literal under a truth assignment: a positive literal pos v evaluates to α v, and a negative literal neg v evaluates to…
  • CnfLitA CNF literal over a variable type V is either a positive variable or a negated variable.
  • eval_thr_litsThe count of literals in a multiset f that evaluate to true under the truth assignment α.

Read back from the Lean

For any type V and any CNF formula F (represented as a list of clauses, where each clause is a list of literals CnfLit V over V), if the empty multiset with threshold 1 is derivable from F in the threshold resolution system (ThrResDerivable F 0 1), then F is unsatisfiable (¬ CnfSatisfiable F).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

The proof proceeds by contradiction. Assuming the CNF formula F is satisfiable, there is a truth assignment α that satisfies every clause in F. The soundness theorem for threshold resolution (thr_res_soundness) then implies that any refutation deriving the empty multiset with threshold 1 forces 1 to be at most the number of true literals in the empty multiset, which is 0. This yields the impossible inequality 1 ≤ 0, showing that F must be unsatisfiable.

  1. Assume for contradiction that F has a satisfying truth assignment α.

    We argue by contradiction (intro hsat). Supposing F is satisfiable, we obtain an assignment α : V → Bool such that every clause C ∈ F contains at least one literal satisfied by α (hypothesis hα).

    lines 3–4

      intro hsat
      obtain ⟨α, hα⟩ := hsat
  2. Under assignment α, every clause C ∈ F has a literal l evaluating to true under eval_cnf_lit.

    Given C ∈ F, the satisfiability hypothesis provides a literal l ∈ C satisfied by α. By case analysis on whether l is a positive literal pos(v) or a negative literal neg(v), we verify in both cases that eval_cnf_lit α l = true, matching the condition required by the soundness theorem.

    lines 5–11

      have hα' : ∀ C ∈ F, ∃ l ∈ C, eval_cnf_lit α l = true := by
        intro C hC
        obtain ⟨l, hl, hlt⟩ := hα C hC
        refine ⟨l, hl, ?_⟩
        match l with
        | CnfLit.pos v => simpa [eval_cnf_lit] using hlt
        | CnfLit.neg v => cases hv : α v <;> simp_all [eval_cnf_lit]
  3. The threshold resolution soundness theorem yields 1 ≤ eval_thr_lits α 0.

    We apply thr_res_soundness to the refutation derivation href (which derives the empty multiset 0 with threshold 1) and the verified satisfiability hypothesis hα'. This establishes that 1 is at most the count of satisfied literals in the empty multiset under α.

    line 12

    uses thr_res_soundness

      have h := thr_res_soundness F 0 1 href α hα'
  4. Contradiction (1 ≤ 0).

    Evaluating the threshold formula on the empty multiset yields 0, because filtering the empty multiset gives the empty multiset (Multiset.filter_zero), which has cardinality 0 (Multiset.card_zero). Hypothesis h simplifies to 1 ≤ 0, and linear integer arithmetic (omega) closes the refutation.

    lines 13–14

    uses Multiset.filter_zero, Multiset.card_zero

      simp only [eval_thr_lits, Multiset.filter_zero, Multiset.card_zero] at h
      omega
thr_res_soundness
If a threshold constraint (f, s) is derivable from a CNF formula F, and α is a truth assignment satisfying every clause of F, then the threshold s is at most the number of literals in f that evaluate to true under α.
Multiset.filter_zero
Filtering the empty multiset by any predicate yields the empty multiset.
Multiset.card_zero
The cardinality of the empty multiset is 0.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

/-- Soundness for refutations: if a Thr-Res refutation exists, the CNF formula is unsatisfiable. -/theorem thr_res_unsat_of_refutation {V : Type*} (F : List (List (CnfLit V))) (href : ThrResDerivable F 0 1) : ¬ CnfSatisfiable F := by  intro hsat  obtain ⟨α, hα⟩ := hsat  have hα' : ∀ C ∈ F, ∃ l ∈ C, eval_cnf_lit α l = true := by    intro C hC    obtain ⟨l, hl, hlt⟩ := hα C hC    refine ⟨l, hl, ?_⟩    match l with    | CnfLit.pos v => simpa [eval_cnf_lit] using hlt    | CnfLit.neg v => cases hv : α v <;> simp_all [eval_cnf_lit]  have h := thr_res_soundness F 0 1 href α hα'  simp only [eval_thr_lits, Multiset.filter_zero, Multiset.card_zero] at h  omega
See it in the graphDiscuss this resultChallenge it