AFTD Auto-Formalizing Theoretical Domains

cnf_lit_decidable_eq

instance

Decidable equality on CNF literals, derived from decidable equality on the underlying variables.

Statement

instance cnf_lit_decidable_eq {V : Type*} [DecidableEq V] : DecidableEq (CnfLit V)
Source
step towards resolution_fpt_incidence_treewidth
Verified
23 Oct 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 1
  • cnf_restrictThe restriction F|x=b of a CNF formula F: delete every clause containing the literal satisfied by x = b, and in the remaining clauses…

Lean source view module on GitHub

/-- Decidable equality on `CnfLit V` for `[DecidableEq V]`. -/
instance cnf_lit_decidable_eq {V : Type*} [DecidableEq V] : DecidableEq (CnfLit V) := fun a b => match a, b with
  | .pos u, .pos v => decidable_of_iff (u = v) ⟨fun h => by rw [h], fun h => by cases h; rfl⟩
  | .pos _, .neg _ => isFalse (by intro h; cases h)
  | .neg _, .pos _ => isFalse (by intro h; cases h)
  | .neg u, .neg v => decidable_of_iff (u = v) ⟨fun h => by rw [h], fun h => by cases h; rfl⟩
See it in the graphDiscuss this resultChallenge it