Minimal Sheffer stroke axioms for Boolean algebra #
The Sheffer stroke a | b is (a ⊓ b)ᶜ, i.e. the NAND gate on Bool.
All functions with Bool inputs and outputs can be expressed using only this operator.
This file shows that for non-empty magmas whose operator is the Sheffer stroke, satisfying either of two axiom sets is equivalent to being a Boolean algebra. The first set, with two axioms, was proven equivalent by Robert Veroff:
|is commutative∀ a b c, a | b | (a | (b | c)) = a
Instead of deriving Sheffer's 1913 axioms as done in the original paper,
we derive a BooleanAlgebra instance directly: aᶜ := a | a, a ≤ b := aᶜ = a | b,
a ⊔ b := aᶜ | bᶜ, a ⊓ b = (a | b)ᶜ, ⊤ = a | aᶜ and ⊥ = ⊤ᶜ.
The second set consists of just the single axiom ∀ a b c, a | (b | a | a) | (b | (c | a)) = b.
Its equivalence was conjectured by Stephen Wolfram and proved by William McCune et al.
shortly after Veroff's result. We reduce to Veroff's axioms rather than Sheffer's 1913 axioms,
following the original paper's Otter derivation of commutativity closely
(with certain steps condensed), after which the other axiom becomes very easy to derive.
Both axiom sets are minimal in the sense that for any set using fewer total Sheffer strokes, non-Boolean algebra models exist.
The Sheffer stroke function
Equations
- VeroffAlgebra.«term_|_» = Lean.ParserDescr.trailingNode `VeroffAlgebra.«term_|_» 70 70 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " | ") (Lean.ParserDescr.cat `term 71))
Instances For
Derive a Veroff algebra from a Boolean algebra.
Equations
Instances For
Equations
- VeroffAlgebra.instCompl = { compl := fun (a : α) => VeroffAlgebra.f a a }
Equations
- VeroffAlgebra.instPartialOrder = { le := fun (a b : α) => aᶜ = VeroffAlgebra.f a b, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_ge := ⋯, le_antisymm := ⋯ }
Equations
- One or more equations did not get rendered due to their size.
The top element, equal to a | aᶜ for any a.
Equations
Instances For
Derive a Boolean algebra from a Veroff algebra.
Equations
- One or more equations did not get rendered due to their size.
The single-axiom algebra shown to be equivalent to Boolean algebra by McCune et al.
- default : α
- f : α → α → α
The Sheffer stroke function
The single axiom of this algebra
Instances
The Sheffer stroke function
Equations
- One or more equations did not get rendered due to their size.
Instances For
Derive a Veroff (and hence Boolean) algebra from a SingleShefferAlgebra.
Equations
- SingleShefferAlgebra.instVeroffAlgebra = { toInhabited := inst✝.toInhabited, f := SingleShefferAlgebra.f, comm := ⋯, veroff := ⋯ }