singleton_eq_get_zero'
plain-language theorem explainer
A helper lemma establishing that any list of length exactly one equals the singleton containing its first element. SAT backpropagation code in the Recognition framework cites it when isolating the single unknown literal in a clause. The proof proceeds by exhaustive pattern matching on list constructors, with length contradictions discharged by simplification.
Claim. Let $l$ be a list over an arbitrary type with length 1. Then there exists an element $x$ such that $l=[x]$ and $x$ equals the element of $l$ at index 0.
background
The module treats partial assignments for SAT backpropagation, marking literals as unknown (none) or determined (some b). The lemma supplies a list identity used when clauses reduce to a single missing literal. It depends on the vantage projection get, which extracts the inside, act, or outside component of a VantageTriple.
proof idea
The term proof matches on the list structure. Empty and length-two-or-more cases are eliminated by simp on the length hypothesis. The singleton case is closed immediately by reflexivity on the constructors.
why it matters
The lemma is invoked inside clauseUnit_correct, which shows that clauseUnit returns the correct Boolean value under a satisfying assignment when exactly one literal remains unknown. It supplies the list identity required for the backpropagation correctness argument in the SAT module.
Switch to Lean above to see the machine-checked source, dependencies, and usage graph.