Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit eb73c35

Browse files
committed
docs(order/complete_boolean_algebra): add module docstring, add whitespaces (#8525)
1 parent c2ed7dc commit eb73c35

File tree

1 file changed

+32
-20
lines changed

1 file changed

+32
-20
lines changed

src/order/complete_boolean_algebra.lean

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,23 @@
22
Copyright (c) 2017 Johannes Hölzl. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Johannes Hölzl
5-
6-
Theory of complete Boolean algebras.
75
-/
86
import order.complete_lattice
97

8+
/-!
9+
# Completely distributive lattices and Boolean algebras
10+
11+
In this file there are definitions and an API for completely distributive lattices and completely
12+
distributive Boolean algebras.
13+
14+
## Typeclasses
15+
16+
* `complete_distrib_lattice`: Completely distributive lattices: A complete lattice whose `⊓` and `⊔`
17+
distribute over `⨆` and `⨅` respectively.
18+
* `complete_boolean_algebra`: Completely distributive Boolean algebra: A Boolean algebra whose `⊓`
19+
and `⊔` distribute over `⨆` and `⨅` respectively.
20+
-/
21+
1022
set_option old_structure_cmd true
1123

1224
universes u v w
@@ -17,8 +29,8 @@ variables {α : Type u} {β : Type v} {ι : Sort w}
1729
as this class includes a requirement that the lattice join
1830
distribute over *arbitrary* infima, and similarly for the dual. -/
1931
class complete_distrib_lattice α extends complete_lattice α :=
20-
(infi_sup_le_sup_Inf : ∀a s, (⨅ b ∈ s, a ⊔ b) ≤ a ⊔ Inf s)
21-
(inf_Sup_le_supr_inf : ∀a s, a ⊓ Sup s ≤ (⨆ b ∈ s, a ⊓ b))
32+
(infi_sup_le_sup_Inf : ∀ a s, (⨅ b ∈ s, a ⊔ b) ≤ a ⊔ Inf s)
33+
(inf_Sup_le_supr_inf : ∀ a s, a ⊓ Sup s ≤ (⨆ b ∈ s, a ⊓ b))
2234

2335
section complete_distrib_lattice
2436
variables [complete_distrib_lattice α] {a b : α} {s t : set α}
@@ -62,31 +74,31 @@ instance pi.complete_distrib_lattice {ι : Type*} {π : ι → Type*}
6274
← supr_subtype''],
6375
.. pi.complete_lattice }
6476

65-
theorem Inf_sup_Inf : Inf s ⊔ Inf t = (⨅p ∈ set.prod s t, (p : α × α).1 ⊔ p.2) :=
77+
theorem Inf_sup_Inf : Inf s ⊔ Inf t = (⨅ p ∈ set.prod s t, (p : α × α).1 ⊔ p.2) :=
6678
begin
6779
apply le_antisymm,
6880
{ simp only [and_imp, prod.forall, le_infi_iff, set.mem_prod],
6981
intros a b ha hb,
7082
exact sup_le_sup (Inf_le ha) (Inf_le hb) },
71-
{ have : ∀ a ∈ s, (⨅p ∈ set.prod s t, (p : α × α).1 ⊔ p.2) ≤ a ⊔ Inf t,
72-
{ assume a ha,
73-
have : (⨅p ∈ set.prod s t, ((p : α × α).1 : α) ⊔ p.2) ≤
74-
(⨅p ∈ prod.mk a '' t, (p : α × α).1 ⊔ p.2),
83+
{ have : ∀ a ∈ s, (⨅ p ∈ set.prod s t, (p : α × α).1 ⊔ p.2) ≤ a ⊔ Inf t,
84+
{ rintro a ha,
85+
have : (⨅ p ∈ set.prod s t, ((p : α × α).1 : α) ⊔ p.2) ≤
86+
(⨅ p ∈ prod.mk a '' t, (p : α × α).1 ⊔ p.2),
7587
{ apply infi_le_infi_of_subset,
76-
rintros ⟨x, y⟩,
88+
rintro ⟨x, y⟩,
7789
simp only [and_imp, set.mem_image, prod.mk.inj_iff, set.prod_mk_mem_set_prod_eq,
7890
exists_imp_distrib],
79-
assume x' x't ax x'y,
91+
rintro x' x't ax x'y,
8092
rw [← x'y, ← ax],
8193
simp [ha, x't] },
8294
rw [infi_image] at this,
8395
simp only at this,
8496
rwa ← sup_Inf_eq at this },
85-
calc (⨅p ∈ set.prod s t, (p : α × α).1 ⊔ p.2) ≤ (⨅a∈s, a ⊔ Inf t) : by simp; exact this
97+
calc (⨅ p ∈ set.prod s t, (p : α × α).1 ⊔ p.2) ≤ (⨅ a ∈ s, a ⊔ Inf t) : by simp; exact this
8698
... = Inf s ⊔ Inf t : Inf_sup_eq.symm }
8799
end
88100

89-
theorem Sup_inf_Sup : Sup s ⊓ Sup t = (⨆p ∈ set.prod s t, (p : α × α).1 ⊓ p.2) :=
101+
theorem Sup_inf_Sup : Sup s ⊓ Sup t = (⨆ p ∈ set.prod s t, (p : α × α).1 ⊓ p.2) :=
90102
@Inf_sup_Inf (order_dual α) _ _ _
91103

92104
lemma supr_disjoint_iff {f : ι → α} : disjoint (⨆ i, f i) a ↔ ∀ i, disjoint (f i) a :=
@@ -103,7 +115,7 @@ instance complete_distrib_lattice.bounded_distrib_lattice [d : complete_distrib_
103115
{ le_sup_inf := λ x y z, by rw [← Inf_pair, ← Inf_pair, sup_Inf_eq, ← Inf_image, set.image_pair],
104116
..d }
105117

106-
/-- A complete boolean algebra is a completely distributive boolean algebra. -/
118+
/-- A complete Boolean algebra is a completely distributive Boolean algebra. -/
107119
class complete_boolean_algebra α extends boolean_algebra α, complete_distrib_lattice α
108120

109121
instance pi.complete_boolean_algebra {ι : Type*} {π : ι → Type*}
@@ -120,18 +132,18 @@ instance Prop.complete_boolean_algebra : complete_boolean_algebra Prop :=
120132
section complete_boolean_algebra
121133
variables [complete_boolean_algebra α] {a b : α} {s : set α} {f : ι → α}
122134

123-
theorem compl_infi : (infi f)ᶜ = (⨆i, (f i)ᶜ) :=
135+
theorem compl_infi : (infi f)ᶜ = (⨆ i, (f i)ᶜ) :=
124136
le_antisymm
125-
(compl_le_of_compl_le $ le_infi $ assume i, compl_le_of_compl_le $ le_supr (compl ∘ f) i)
126-
(supr_le $ assume i, compl_le_compl $ infi_le _ _)
137+
(compl_le_of_compl_le $ le_infi $ λ i, compl_le_of_compl_le $ le_supr (compl ∘ f) i)
138+
(supr_le $ λ i, compl_le_compl $ infi_le _ _)
127139

128-
theorem compl_supr : (supr f)ᶜ = (⨅i, (f i)ᶜ) :=
140+
theorem compl_supr : (supr f)ᶜ = (⨅ i, (f i)ᶜ) :=
129141
compl_injective (by simp [compl_infi])
130142

131-
theorem compl_Inf : (Inf s)ᶜ = (⨆i∈s, iᶜ) :=
143+
theorem compl_Inf : (Inf s)ᶜ = (⨆ i ∈ s, iᶜ) :=
132144
by simp only [Inf_eq_infi, compl_infi]
133145

134-
theorem compl_Sup : (Sup s)ᶜ = (⨅i∈s, iᶜ) :=
146+
theorem compl_Sup : (Sup s)ᶜ = (⨅ i ∈ s, iᶜ) :=
135147
by simp only [Sup_eq_supr, compl_supr]
136148

137149
end complete_boolean_algebra

0 commit comments

Comments
 (0)