The areas / V04. Order and lattices
Mathlib.Order.BooleanAlgebra.Basic
112 declarations. Mathlib docs · Source
Basic properties of Boolean algebras
This file provides some basic definitions, functions as well as lemmas for functions and type
classes related to Boolean algebras as defined in Mathlib/Order/BooleanAlgebra/Defs.lean.
References
- https://en.wikipedia.org/wiki/Boolean_algebra_(structure)#Generalizations
- [Postulates for Boolean Algebras and Generalized Boolean Algebras, M.H. Stone][Stone1935]
- [Lattice Theory: Foundation, George Grätzer][Gratzer2011]
Tags
generalized Boolean algebras, Boolean algebras, lattices, sdiff, compl
Generalized Boolean algebras
Some of the lemmas in this section are from:
- [Lattice Theory: Foundation, George Grätzer][Gratzer2011]
- https://ncatlab.org/nlab/show/relative+complement
- https://people.math.gatech.edu/~mccuan/courses/4317/symmetricdifference.pdf
Boolean algebras
theorem sup_inf_sdiff E0 #
∀ {α : Type u} [inst : GeneralizedBooleanAlgebra α] (x y : α), x ⊓ y ⊔ x \ y = x
theorem inf_inf_sdiff E0 #
∀ {α : Type u} [inst : GeneralizedBooleanAlgebra α] (x y : α), x ⊓ y ⊓ x \ y = ⊥
theorem sup_sdiff_inf E0 #
∀ {α : Type u} [inst : GeneralizedBooleanAlgebra α] (x y : α), x \ y ⊔ x ⊓ y = x
theorem inf_sdiff_inf E0 #
∀ {α : Type u} [inst : GeneralizedBooleanAlgebra α] (x y : α), x \ y ⊓ (x ⊓ y) = ⊥
instance GeneralizedBooleanAlgebra.toOrderBot E0 #
{α : Type u} → [inst : GeneralizedBooleanAlgebra α] → OrderBot α
theorem disjoint_inf_sdiff E1 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], Disjoint (x ⊓ y) (x \ y)
theorem sdiff_unique E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], x ⊓ y ⊔ z = x → x ⊓ y ⊓ z = ⊥ → x \ y = z
theorem sdiff_inf_sdiff E0 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], x \ y ⊓ y \ x = ⊥
theorem disjoint_sdiff_sdiff E1 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], Disjoint (x \ y) (y \ x)
theorem inf_sdiff_self_right E0 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], x ⊓ y \ x = ⊥
theorem inf_sdiff_self_left E0 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], y \ x ⊓ x = ⊥
instance GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra E0 #
{α : Type u} → [GeneralizedBooleanAlgebra α] → GeneralizedCoheytingAlgebra α
theorem disjoint_sdiff_self_left E1 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], Disjoint (y \ x) x
theorem disjoint_sdiff_self_right E1 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], Disjoint x (y \ x)
theorem le_sdiff E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], x ≤ y \ z ↔ x ≤ y ∧ Disjoint x z
theorem sdiff_eq_left E0 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], x \ y = x ↔ Disjoint x y
theorem Disjoint.sdiff_eq_of_sup_eq E0 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], Disjoint x z → x ⊔ z = y → y \ x = z
theorem Disjoint.sdiff_unique E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], Disjoint x z → z ≤ y → y ≤ x ⊔ z → y \ x = z
theorem disjoint_sdiff_iff_le E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], z ≤ y → x ≤ y → (Disjoint z (y \ x) ↔ z ≤ x)
theorem le_iff_disjoint_sdiff E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], z ≤ y → x ≤ y → (z ≤ x ↔ Disjoint z (y \ x))
theorem inf_sdiff_eq_bot_iff E0 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], z ≤ y → x ≤ y → (z ⊓ y \ x = ⊥ ↔ z ≤ x)
theorem le_iff_eq_sup_sdiff E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], z ≤ y → x ≤ y → (x ≤ z ↔ y = z ⊔ y \ x)
theorem sdiff_sup E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], y \ (x ⊔ z) = y \ x ⊓ y \ z
theorem sdiff_eq_sdiff_iff_inf_eq_inf E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], y \ x = y \ z ↔ y ⊓ x = y ⊓ z
theorem sdiff_eq_self_iff_disjoint E1 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], x \ y = x ↔ Disjoint y x
theorem sdiff_lt E1 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], y ≤ x → y ≠ ⊥ → x \ y < x
theorem sdiff_lt_left E1 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], x \ y < x ↔ ¬Disjoint y x
theorem le_sdiff_right E0 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], x ≤ y \ x ↔ x = ⊥
theorem sdiff_eq_right E0 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], x \ y = y ↔ x = ⊥ ∧ y = ⊥
theorem sdiff_ne_right E1 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], x \ y ≠ y ↔ x ≠ ⊥ ∨ y ≠ ⊥
theorem sdiff_lt_sdiff_right E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], x < y → z ≤ x → x \ z < y \ z
theorem sup_inf_inf_sdiff E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], x ⊓ y ⊓ z ⊔ y \ z = x ⊓ y ⊔ y \ z
theorem sdiff_sdiff_right E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], x \ (y \ z) = x \ y ⊔ x ⊓ y ⊓ z
theorem sdiff_sdiff_right' E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], x \ (y \ z) = x \ y ⊔ x ⊓ z
theorem sdiff_sdiff_eq_sdiff_sup E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], z ≤ x → x \ (y \ z) = x \ y ⊔ z
theorem sdiff_sdiff_right_self E0 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], x \ (x \ y) = x ⊓ y
theorem sdiff_sdiff_eq_self E1 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], y ≤ x → x \ (x \ y) = y
theorem sdiff_eq_symm E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], y ≤ x → x \ y = z → x \ z = y
theorem sdiff_eq_comm E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], y ≤ x → z ≤ x → (x \ y = z ↔ x \ z = y)
theorem sdiff_right_inj E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], x ≤ z → y ≤ z → (z \ x = z \ y ↔ x = y)
theorem sdiff_le_sdiff_iff_le E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], x ≤ z → y ≤ z → (z \ x ≤ z \ y ↔ y ≤ x)
theorem sdiff_sdiff_left' E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], (x \ y) \ z = x \ y ⊓ x \ z
theorem sdiff_sdiff_sup_sdiff E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], z \ (x \ y ⊔ y \ x) = z ⊓ (z \ x ⊔ y) ⊓ (z \ y ⊔ x)
theorem sdiff_sdiff_sup_sdiff' E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], z \ (x \ y ⊔ y \ x) = z ⊓ x ⊓ y ⊔ z \ x ⊓ z \ y
theorem sdiff_sdiff_sdiff_cancel_left E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], z ≤ x → (x \ y) \ (x \ z) = z \ y
theorem sdiff_sdiff_sdiff_cancel_right E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], z ≤ y → (x \ z) \ (y \ z) = x \ y
theorem inf_sdiff E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], (x ⊓ y) \ z = x \ z ⊓ y \ z
theorem inf_sdiff_assoc E1 #
∀ {α : Type u} [inst : GeneralizedBooleanAlgebra α] (x y z : α), (x ⊓ y) \ z = x ⊓ y \ z
See also sdiff_inf_right_comm.
theorem sdiff_inf_right_comm E1 #
∀ {α : Type u} [inst : GeneralizedBooleanAlgebra α] (x y z : α), x \ z ⊓ y = (x ⊓ y) \ z
See also inf_sdiff_assoc.
theorem inf_sdiff_left_comm E1 #
∀ {α : Type u} [inst : GeneralizedBooleanAlgebra α] (a b c : α), a ⊓ b \ c = b ⊓ a \ c
theorem inf_sdiff_distrib_left E1 #
∀ {α : Type u} [inst : GeneralizedBooleanAlgebra α] (a b c : α), a ⊓ b \ c = (a ⊓ b) \ (a ⊓ c)
theorem inf_sdiff_distrib_right E1 #
∀ {α : Type u} [inst : GeneralizedBooleanAlgebra α] (a b c : α), a \ b ⊓ c = (a ⊓ c) \ (b ⊓ c)
theorem disjoint_sdiff_comm E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], Disjoint (x \ z) y ↔ Disjoint x (y \ z)
theorem sup_eq_sdiff_sup_sdiff_sup_inf E1 #
∀ {α : Type u} {x y : α} [inst : GeneralizedBooleanAlgebra α], x ⊔ y = x \ y ⊔ y \ x ⊔ x ⊓ y
theorem sup_lt_of_lt_sdiff_left E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], y < z \ x → x ≤ z → x ⊔ y < z
theorem sup_lt_of_lt_sdiff_right E1 #
∀ {α : Type u} {x y z : α} [inst : GeneralizedBooleanAlgebra α], x < z \ y → y ≤ z → x ⊔ y < z
instance Prod.instGeneralizedBooleanAlgebra E0 #
{α : Type u} →
{β : Type u_1} → [GeneralizedBooleanAlgebra α] → [GeneralizedBooleanAlgebra β] → GeneralizedBooleanAlgebra (α × β)
instance Pi.instGeneralizedBooleanAlgebra E0 #
{ι : Type u_2} →
{α : ι → Type u_3} → [(i : ι) → GeneralizedBooleanAlgebra (α i)] → GeneralizedBooleanAlgebra ((i : ι) → α i)
abbrev GeneralizedBooleanAlgebra.toBooleanAlgebra E1 #
{α : Type u} → [inst : GeneralizedBooleanAlgebra α] → [OrderTop α] → BooleanAlgebra α
A bounded generalized Boolean algebra is a Boolean algebra.
theorem inf_compl_eq_bot' E1 #
∀ {α : Type u} {x : α} [inst : BooleanAlgebra α], x ⊓ xᶜ = ⊥
theorem sup_compl_eq_top E0 #
∀ {α : Type u} {x : α} [inst : BooleanAlgebra α], x ⊔ xᶜ = ⊤
theorem compl_sup_eq_top E0 #
∀ {α : Type u} {x : α} [inst : BooleanAlgebra α], xᶜ ⊔ x = ⊤
theorem isCompl_compl E1 #
∀ {α : Type u} {x : α} [inst : BooleanAlgebra α], IsCompl x xᶜ
theorem sdiff_eq E0 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], x \ y = x ⊓ yᶜ
theorem himp_eq E0 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], x ⇨ y = y ⊔ xᶜ
instance BooleanAlgebra.toComplementedLattice E0 #
∀ {α : Type u} [inst : BooleanAlgebra α], ComplementedLattice α
instance BooleanAlgebra.toGeneralizedBooleanAlgebra E0 #
{α : Type u} → [BooleanAlgebra α] → GeneralizedBooleanAlgebra α
instance BooleanAlgebra.toBiheytingAlgebra E0 #
{α : Type u} → [BooleanAlgebra α] → BiheytingAlgebra α
theorem hnot_eq_compl E0 #
∀ {α : Type u} {x : α} [inst : BooleanAlgebra α], ¬x = xᶜ
theorem top_sdiff E1 #
∀ {α : Type u} {x : α} [inst : BooleanAlgebra α], ⊤ \ x = xᶜ
theorem compl_eq_iff_isCompl E1 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], xᶜ = y ↔ IsCompl x y
theorem compl_eq_comm E1 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], xᶜ = y ↔ yᶜ = x
theorem compl_compl E0 #
∀ {α : Type u} [inst : BooleanAlgebra α] (x : α), xᶜᶜ = x
theorem compl_comp_compl E1 #
∀ {α : Type u} [inst : BooleanAlgebra α], compl ∘ compl = id
theorem compl_involutive E0 #
∀ {α : Type u} [inst : BooleanAlgebra α], Function.Involutive compl
theorem compl_bijective E1 #
∀ {α : Type u} [inst : BooleanAlgebra α], Function.Bijective compl
theorem compl_surjective E1 #
∀ {α : Type u} [inst : BooleanAlgebra α], Function.Surjective compl
theorem compl_injective E1 #
∀ {α : Type u} [inst : BooleanAlgebra α], Function.Injective compl
theorem compl_inj_iff E0 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], xᶜ = yᶜ ↔ x = y
theorem IsCompl.compl_eq_iff E0 #
∀ {α : Type u} {x y z : α} [inst : BooleanAlgebra α], IsCompl x y → (zᶜ = y ↔ z = x)
theorem compl_eq_top E0 #
∀ {α : Type u} {x : α} [inst : BooleanAlgebra α], xᶜ = ⊤ ↔ x = ⊥
theorem compl_eq_bot E0 #
∀ {α : Type u} {x : α} [inst : BooleanAlgebra α], xᶜ = ⊥ ↔ x = ⊤
theorem compl_inf E0 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], (x ⊓ y)ᶜ = xᶜ ⊔ yᶜ
theorem compl_le_compl_iff_le E0 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], yᶜ ≤ xᶜ ↔ x ≤ y
theorem compl_lt_compl_iff_lt E0 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], yᶜ < xᶜ ↔ x < y
theorem compl_le_of_compl_le E1 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], yᶜ ≤ x → xᶜ ≤ y
theorem compl_le_iff_compl_le E1 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], xᶜ ≤ y ↔ yᶜ ≤ x
theorem compl_le_self E0 #
∀ {α : Type u} {x : α} [inst : BooleanAlgebra α], xᶜ ≤ x ↔ x = ⊤
theorem compl_lt_self E0 #
∀ {α : Type u} {x : α} [inst : BooleanAlgebra α] [Nontrivial α], xᶜ < x ↔ x = ⊤
theorem sdiff_compl E0 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], x \ yᶜ = x ⊓ y
instance OrderDual.instBooleanAlgebra E0 #
{α : Type u} → [BooleanAlgebra α] → BooleanAlgebra αᵒᵈ
theorem sup_inf_inf_compl E0 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], x ⊓ y ⊔ x ⊓ yᶜ = x
theorem compl_sdiff E1 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], (x \ y)ᶜ = x ⇨ y
theorem compl_himp E0 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], (x ⇨ y)ᶜ = x \ y
theorem compl_sdiff_compl E1 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], xᶜ \ yᶜ = y \ x
theorem compl_himp_compl E0 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], xᶜ ⇨ yᶜ = y ⇨ x
theorem disjoint_compl_left_iff E0 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], Disjoint xᶜ y ↔ y ≤ x
theorem disjoint_compl_right_iff E0 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], Disjoint x yᶜ ↔ x ≤ y
theorem codisjoint_himp_self_left E1 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], Codisjoint (x ⇨ y) x
theorem codisjoint_himp_self_right E1 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], Codisjoint x (x ⇨ y)
theorem himp_le E1 #
∀ {α : Type u} {x y z : α} [inst : BooleanAlgebra α], x ⇨ y ≤ z ↔ y ≤ z ∧ Codisjoint x z
theorem himp_le_left E0 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], x ⇨ y ≤ x ↔ x = ⊤
theorem himp_eq_left E0 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], x ⇨ y = x ↔ x = ⊤ ∧ y = ⊤
theorem himp_ne_right E1 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], x ⇨ y ≠ x ↔ x ≠ ⊤ ∨ y ≠ ⊤
theorem codisjoint_iff_compl_le_left E1 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], Codisjoint x y ↔ yᶜ ≤ x
theorem codisjoint_iff_compl_le_right E1 #
∀ {α : Type u} {x y : α} [inst : BooleanAlgebra α], Codisjoint x y ↔ xᶜ ≤ y
instance Prod.instBooleanAlgebra E0 #
{α : Type u} → {β : Type u_1} → [BooleanAlgebra α] → [BooleanAlgebra β] → BooleanAlgebra (α × β)
instance Pi.instBooleanAlgebra E0 #
{ι : Type u} → {α : ι → Type v} → [(i : ι) → BooleanAlgebra (α i)] → BooleanAlgebra ((i : ι) → α i)
abbrev Function.Injective.generalizedBooleanAlgebra E1 #
{α : Type u} →
{β : Type u_1} →
[inst : Max α] →
[inst_1 : Min α] →
[inst_2 : LE α] →
[inst_3 : LT α] →
[inst_4 : Bot α] →
[inst_5 : SDiff α] →
[inst_6 : GeneralizedBooleanAlgebra β] →
(f : α → β) →
Function.Injective f →
(∀ {x y : α}, f x ≤ f y ↔ x ≤ y) →
(∀ {x y : α}, f x < f y ↔ x < y) →
(∀ (a b : α), f (a ⊔ b) = f a ⊔ f b) →
(∀ (a b : α), f (a ⊓ b) = f a ⊓ f b) →
f ⊥ = ⊥ → (∀ (a b : α), f (a \ b) = f a \ f b) → GeneralizedBooleanAlgebra α
Pullback a GeneralizedBooleanAlgebra along an injection.
abbrev Function.Injective.booleanAlgebra E1 #
{α : Type u} →
{β : Type u_1} →
[inst : Max α] →
[inst_1 : Min α] →
[inst_2 : LE α] →
[inst_3 : LT α] →
[inst_4 : Top α] →
[inst_5 : Bot α] →
[inst_6 : Compl α] →
[inst_7 : SDiff α] →
[inst_8 : HImp α] →
[inst_9 : BooleanAlgebra β] →
(f : α → β) →
Function.Injective f →
(∀ {x y : α}, f x ≤ f y ↔ x ≤ y) →
(∀ {x y : α}, f x < f y ↔ x < y) →
(∀ (a b : α), f (a ⊔ b) = f a ⊔ f b) →
(∀ (a b : α), f (a ⊓ b) = f a ⊓ f b) →
f ⊤ = ⊤ →
f ⊥ = ⊥ →
(∀ (a : α), f aᶜ = (f a)ᶜ) →
(∀ (a b : α), f (a \ b) = f a \ f b) →
(∀ (a b : α), f (a ⇨ b) = f a ⇨ f b) → BooleanAlgebra α
Pullback a BooleanAlgebra along an injection.
abbrev Equiv.generalizedBooleanAlgebra E1 #
{α : Type u} → {β : Type u_1} → α ≃ β → [GeneralizedBooleanAlgebra β] → GeneralizedBooleanAlgebra α
Transfer GeneralizedBooleanAlgebra across an Equiv.
abbrev Equiv.booleanAlgebra E1 #
{α : Type u} → {β : Type u_1} → α ≃ β → [BooleanAlgebra β] → BooleanAlgebra α
Transfer BooleanAlgebra across an Equiv.