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

Commit 36bafae

Browse files
committed
feat(topology/bornology/basic): review (#13374)
* add lemmas; * upgrade some implications to `iff`s.
1 parent d065fd4 commit 36bafae

File tree

1 file changed

+59
-35
lines changed

1 file changed

+59
-35
lines changed

src/topology/bornology/basic.lean

Lines changed: 59 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ it is intended for regular use as a filter on `α`.
3838

3939
open set filter
4040

41-
variables {α β : Type*}
41+
variables {ι α β : Type*}
4242

4343
/-- A **bornology** on a type `α` is a filter of cobounded sets which contains the cofinite filter.
4444
Such spaces are equivalently specified by their bounded sets, see `bornology.of_bounded`
@@ -48,7 +48,6 @@ class bornology (α : Type*) :=
4848
(cobounded [] : filter α)
4949
(le_cofinite [] : cobounded ≤ cofinite)
5050

51-
5251
/-- A constructor for bornologies by specifying the bounded sets,
5352
and showing that they satisfy the appropriate conditions. -/
5453
@[simps]
@@ -77,25 +76,24 @@ def bornology.of_bounded' {α : Type*} (B : set (set α))
7776
(empty_mem : ∅ ∈ B) (subset_mem : ∀ s₁ ∈ B, ∀ s₂ : set α, s₂ ⊆ s₁ → s₂ ∈ B)
7877
(union_mem : ∀ s₁ s₂ ∈ B, s₁ ∪ s₂ ∈ B) (sUnion_univ : ⋃₀ B = univ) :
7978
bornology α :=
80-
bornology.of_bounded B empty_mem subset_mem union_mem
79+
bornology.of_bounded B empty_mem subset_mem union_mem $ λ x,
8180
begin
82-
rw eq_univ_iff_forall at sUnion_univ,
83-
intros x,
81+
rw sUnion_eq_univ_iff at sUnion_univ,
8482
rcases sUnion_univ x with ⟨s, hs, hxs⟩,
8583
exact subset_mem s hs {x} (singleton_subset_iff.mpr hxs)
8684
end
8785

8886
namespace bornology
8987

9088
section
91-
variables [bornology α] {s₁ s₂ : set α}
89+
variables [bornology α] {s t : set α} {x : α}
9290

9391
/-- `is_cobounded` is the predicate that `s` is in the filter of cobounded sets in the ambient
9492
bornology on `α` -/
9593
def is_cobounded (s : set α) : Prop := s ∈ cobounded α
9694

9795
/-- `is_bounded` is the predicate that `s` is bounded relative to the ambient bornology on `α`. -/
98-
def is_bounded (s : set α) : Prop := sᶜ ∈ cobounded α
96+
def is_bounded (s : set α) : Prop := is_cobounded sᶜ
9997

10098
lemma is_cobounded_def {s : set α} : is_cobounded s ↔ s ∈ cobounded α := iff.rfl
10199

@@ -112,19 +110,32 @@ alias is_cobounded_compl_iff ↔ bornology.is_cobounded.of_compl bornology.is_bo
112110
@[simp] lemma is_bounded_empty : is_bounded (∅ : set α) :=
113111
by { rw [is_bounded_def, compl_empty], exact univ_mem}
114112

115-
@[simp] lemma is_bounded_singleton {x : α} : is_bounded ({x} : set α) :=
113+
@[simp] lemma is_bounded_singleton : is_bounded ({x} : set α) :=
116114
by {rw [is_bounded_def], exact le_cofinite _ (finite_singleton x).compl_mem_cofinite}
117115

118-
lemma is_bounded.union (h₁ : is_bounded s₁) (h₂ : is_bounded s₂) : is_bounded (s₁ ∪ s₂) :=
119-
by { rw [is_bounded_def, compl_union], exact (cobounded α).inter_sets h₁ h₂ }
116+
@[simp] lemma is_cobounded_univ : is_cobounded (univ : set α) := univ_mem
117+
118+
@[simp] lemma is_cobounded_inter : is_cobounded (s ∩ t) ↔ is_cobounded s ∧ is_cobounded t :=
119+
inter_mem_iff
120+
121+
lemma is_cobounded.inter (hs : is_cobounded s) (ht : is_cobounded t) : is_cobounded (s ∩ t) :=
122+
is_cobounded_inter.2 ⟨hs, ht⟩
123+
124+
@[simp] lemma is_bounded_union : is_bounded (s ∪ t) ↔ is_bounded s ∧ is_bounded t :=
125+
by simp only [← is_cobounded_compl_iff, compl_union, is_cobounded_inter]
126+
127+
lemma is_bounded.union (hs : is_bounded s) (ht : is_bounded t) : is_bounded (s ∪ t) :=
128+
is_bounded_union.2 ⟨hs, ht⟩
129+
130+
lemma is_cobounded.superset (hs : is_cobounded s) (ht : s ⊆ t) : is_cobounded t :=
131+
mem_of_superset hs ht
120132

121-
lemma is_bounded.subset (h₁ : is_bounded s₂) (h₂ : ss₂) : is_bounded s :=
122-
by { rw [is_bounded_def], exact (cobounded α).sets_of_superset h₁ (compl_subset_compl.mpr h₂) }
133+
lemma is_bounded.subset (ht : is_bounded t) (hs : s ⊆ t) : is_bounded s :=
134+
ht.superset (compl_subset_compl.mpr hs)
123135

124136
@[simp]
125-
lemma sUnion_bounded_univ : (⋃₀ {s : set α | is_bounded s}) = set.univ :=
126-
univ_subset_iff.mp $ λ x hx, mem_sUnion_of_mem (mem_singleton x)
127-
$ le_def.mp (le_cofinite α) {x}ᶜ $ (set.finite_singleton x).compl_mem_cofinite
137+
lemma sUnion_bounded_univ : (⋃₀ {s : set α | is_bounded s}) = univ :=
138+
sUnion_eq_univ_iff.2 $ λ a, ⟨{a}, is_bounded_singleton, mem_singleton a⟩
128139

129140
lemma comap_cobounded_le_iff [bornology β] {f : α → β} :
130141
(cobounded β).comap f ≤ cobounded α ↔ ∀ ⦃s⦄, is_bounded s → is_bounded (f '' s) :=
@@ -140,7 +151,7 @@ end
140151

141152
lemma ext_iff' {t t' : bornology α} :
142153
t = t' ↔ ∀ s, (@cobounded α t).sets s ↔ (@cobounded α t').sets s :=
143-
⟨λ h s, h ▸ iff.rfl, λ h, by { ext, exact h _ } ⟩
154+
(ext_iff _ _).trans filter.ext_iff
144155

145156
lemma ext_iff_is_bounded {t t' : bornology α} :
146157
t = t' ↔ ∀ s, @is_bounded α t s ↔ @is_bounded α t' s :=
@@ -157,24 +168,37 @@ by rw [is_bounded_def, ←filter.mem_sets, of_bounded_cobounded_sets, set.mem_se
157168

158169
variables [bornology α]
159170

160-
lemma is_bounded_sUnion {s : set (set α)} (hs : finite s) :
161-
(∀ t ∈ s, is_bounded t) → is_bounded (⋃₀ s) :=
162-
finite.induction_on hs (λ _, by { rw sUnion_empty, exact is_bounded_empty }) $
163-
λ a s has hs ih h, by
164-
{ rw sUnion_insert,
165-
exact is_bounded.union (h _ $ mem_insert _ _) (ih $ λ t, h t ∘ mem_insert_of_mem _) }
166-
167-
lemma is_bounded_bUnion {s : set β} {f : β → set α} (hs : finite s) :
168-
(∀ i ∈ s, is_bounded (f i)) → is_bounded (⋃ i ∈ s, f i) :=
169-
finite.induction_on hs
170-
(λ _, by { rw bUnion_empty, exact is_bounded_empty })
171-
(λ a s has hs ih h, by
172-
{ rw bUnion_insert,
173-
exact is_bounded.union (h a (mem_insert _ _)) (ih (λ i hi, h i (mem_insert_of_mem _ hi))) })
174-
175-
lemma is_bounded_Union [fintype β] {s : β → set α}
176-
(h : ∀ i, is_bounded (s i)) : is_bounded (⋃ i, s i) :=
177-
by simpa using is_bounded_bUnion finite_univ (λ i _, h i)
171+
lemma is_cobounded_bInter {s : set ι} {f : ι → set α} (hs : finite s) :
172+
is_cobounded (⋂ i ∈ s, f i) ↔ ∀ i ∈ s, is_cobounded (f i) :=
173+
bInter_mem hs
174+
175+
@[simp] lemma is_cobounded_bInter_finset (s : finset ι) {f : ι → set α} :
176+
is_cobounded (⋂ i ∈ s, f i) ↔ ∀ i ∈ s, is_cobounded (f i) :=
177+
bInter_finset_mem s
178+
179+
@[simp] lemma is_cobounded_Inter [fintype ι] {f : ι → set α} :
180+
is_cobounded (⋂ i, f i) ↔ ∀ i, is_cobounded (f i) :=
181+
Inter_mem
182+
183+
lemma is_cobounded_sInter {S : set (set α)} (hs : finite S) :
184+
is_cobounded (⋂₀ S) ↔ ∀ s ∈ S, is_cobounded s :=
185+
sInter_mem hs
186+
187+
lemma is_bounded_bUnion {s : set ι} {f : ι → set α} (hs : finite s) :
188+
is_bounded (⋃ i ∈ s, f i) ↔ ∀ i ∈ s, is_bounded (f i) :=
189+
by simp only [← is_cobounded_compl_iff, compl_Union, is_cobounded_bInter hs]
190+
191+
lemma is_bounded_bUnion_finset (s : finset ι) {f : ι → set α} :
192+
is_bounded (⋃ i ∈ s, f i) ↔ ∀ i ∈ s, is_bounded (f i) :=
193+
is_bounded_bUnion s.finite_to_set
194+
195+
lemma is_bounded_sUnion {S : set (set α)} (hs : finite S) :
196+
is_bounded (⋃₀ S) ↔ (∀ s ∈ S, is_bounded s) :=
197+
by rw [sUnion_eq_bUnion, is_bounded_bUnion hs]
198+
199+
@[simp] lemma is_bounded_Union [fintype ι] {s : ι → set α} :
200+
is_bounded (⋃ i, s i) ↔ ∀ i, is_bounded (s i) :=
201+
by rw [← sUnion_range, is_bounded_sUnion (finite_range s), forall_range_iff]
178202

179203
end bornology
180204

@@ -183,7 +207,7 @@ instance : bornology punit := ⟨⊥, bot_le⟩
183207
/-- The cofinite filter as a bornology -/
184208
@[reducible] def bornology.cofinite : bornology α :=
185209
{ cobounded := cofinite,
186-
le_cofinite := le_refl _ }
210+
le_cofinite := le_rfl }
187211

188212
/-- A **bounded space** is a `bornology α` such that `set.univ : set α` is bounded. -/
189213
class bounded_space extends bornology α :=

0 commit comments

Comments
 (0)