Anchor formulas in a Boolean algebra: Lemma 6 of @cite{demey-smessaert-2018} #
For a finite generator set s : Finset α of a Boolean algebra α, an
anchor formula is a meet of literals over s — one literal lit φ b
per generator, with polarity selected by an assignment σ : s → Bool:
anchorBA s σ := ⨅ x ∈ s, (if σ x then x else xᶜ)
The central technical lemma (Demey-Smessaert §3, Lemma 6) is anchor-
decidedness: for every element ψ of the Boolean closure of s, every
anchor formula either entails ψ or entails ¬ψ. Equivalently, the anchor
formulas partition the closure's "truth space" into mutually-deciding cells.
Lemma 6 is the engine driving the bitstring representation in Bitstring.lean:
the i-th bit of bitstringOf φ ψ is well-defined precisely because the i-th
anchor decides ψ. Closing Theorems 1 and 2 from Bitstring.lean reduces to
this lemma plus mathlib's existing infrastructure.
What this file uses from mathlib #
BooleanSubalgebra(Yaël Dillies, 2024) forclosure-based reasoningclosure_bot_sup_inductionfor the inductive proof of Lemma 6- Standard
BooleanAlgebraAPI (compl_sup,compl_compl,le_inf, ...)
Generality #
The lemma is stated for an arbitrary [BooleanAlgebra α]. Specializations to
α = W → Bool (the syllogistic case) are immediate.
A literal over a generator φ : α: either φ itself (positive polarity)
or its complement φᶜ (negative polarity).
Equations
- Core.Opposition.lit φ b = if b = true then φ else φᶜ
Instances For
The anchor formula for a polarity assignment σ : s → Bool over a
finite generator set s : Finset α: the meet of lit x (σ x) over all
x ∈ s. This is a generic Boolean-algebra version of the Demey-Smessaert
anchor (Definition 5).
Equations
- Core.Opposition.anchorBA s σ = s.attach.inf fun (x : ↥s) => Core.Opposition.lit (↑x) (σ x)
Instances For
Lemma 6 (Demey & Smessaert 2018): every element of the Boolean closure of a finite generator set is anchor-decided — every anchor formula either entails it or entails its complement.
This holds unconditionally (no consistency hypothesis on the anchor):
if the anchor is ⊥, both disjuncts hold trivially. The bitstring
semantics in Bitstring.lean uses Lemma 6 with the anchor known to be
nonzero (i.e., σ in the partition), giving the exclusive decidedness
that makes each bit well-defined.
Proof: induction on closure membership via closure_bot_sup_induction.
mem: anchor includeslit x (σ x)as a meet; sign ofσ xdecides.bot:anchor ≤ ⊥ᶜ = ⊤trivially.sup: case on which side of the disjunction the anchor sits below.compl: flip the disjunction (compl_compl).
The exclusive form: for a consistent anchor, exactly one disjunct of
Lemma 6 holds. (If both held, anchor would be below ψ ⊓ ψᶜ = ⊥.)