pith. machine review for the scientific record. sign in

IndisputableMonolith.Mathematics.BooleanAlgebraFromRS

IndisputableMonolith/Mathematics/BooleanAlgebraFromRS.lean · 49 lines · 7 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: pending

   1import Mathlib
   2
   3/-!
   4# Boolean Algebra from RS — C Mathematics
   5
   6The recognition lattice Q₃ = {0,1}³ is itself a Boolean algebra.
   7Boolean algebra on {0,1}^n has 2^(2^n) elements... no.
   8
   9More precisely: Q₃ has 2^8 = 256 antichains... too complex.
  10
  11Simple approach: the F₂³ Boolean algebra has:
  12- |F₂³| = 8 = 2^3
  13- |F₂³ × F₂³| = 64 = 2^6
  14- |Bool| = 2 (truth values)
  15
  16Five canonical Boolean operations (AND, OR, NOT, NAND, NOR)
  17= configDim D = 5.
  18
  19Also: the Boolean lattice {0,1}³ has 2^3 = 8 atoms.
  20
  21Lean: 5 operations, 8 = 2^3 atoms.
  22
  23Lean status: 0 sorry, 0 axiom.
  24-/
  25
  26namespace IndisputableMonolith.Mathematics.BooleanAlgebraFromRS
  27
  28inductive BoolOp where
  29  | AND | OR | NOT | NAND | NOR
  30  deriving DecidableEq, Repr, BEq, Fintype
  31
  32theorem boolOpCount : Fintype.card BoolOp = 5 := by decide
  33
  34def atomCount : ℕ := 2 ^ 3
  35theorem atomCount_eq_8 : atomCount = 8 := by decide
  36theorem atoms_eq_2cubeD : atomCount = 2 ^ 3 := rfl
  37
  38structure BooleanAlgebraCert where
  39  five_ops : Fintype.card BoolOp = 5
  40  eight_atoms : atomCount = 8
  41  atoms_2cubeD : atomCount = 2 ^ 3
  42
  43def booleanAlgebraCert : BooleanAlgebraCert where
  44  five_ops := boolOpCount
  45  eight_atoms := atomCount_eq_8
  46  atoms_2cubeD := atoms_eq_2cubeD
  47
  48end IndisputableMonolith.Mathematics.BooleanAlgebraFromRS
  49

source mirrored from github.com/jonwashburn/shape-of-logic