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

Commit bab039f

Browse files
committed
feat(topology/opens): The frame of opens of a topological space (#12546)
Provide the `frame` instance for `opens α` and strengthen `opens.comap` from `order_hom` to `frame_hom`.
1 parent 9c2f6eb commit bab039f

File tree

2 files changed

+26
-19
lines changed

2 files changed

+26
-19
lines changed

src/topology/algebra/order/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2412,7 +2412,7 @@ lemma map_coe_at_top_of_Ioo_subset (hb : s ⊆ Iio b)
24122412
map (coe : s → α) at_top = 𝓝[<] b :=
24132413
begin
24142414
rcases eq_empty_or_nonempty (Iio b) with (hb'|⟨a, ha⟩),
2415-
{ rw [filter_eq_bot_of_is_empty at_top, map_bot, hb', nhds_within_empty],
2415+
{ rw [filter_eq_bot_of_is_empty at_top, filter.map_bot, hb', nhds_within_empty],
24162416
exact ⟨λ x, hb'.subset (hb x.2)⟩ },
24172417
{ rw [← comap_coe_nhds_within_Iio_of_Ioo_subset hb (λ _, hs a ha), map_comap_of_mem],
24182418
rw subtype.range_coe,

src/topology/opens.lean

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ 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, Mario Carneiro, Floris van Doorn
55
-/
6+
import order.hom.complete_lattice
67
import topology.bases
78
import topology.homeomorph
89
import topology.continuous_function.basic
10+
911
/-!
1012
# Open sets
1113
@@ -19,9 +21,9 @@ We define the subtype of open sets in a topological space.
1921
- `open_nhds_of x` is the type of open subsets of a topological space `α` containing `x : α`.
2022
-/
2123

22-
open filter set
23-
variables {α : Type*} {β : Type*} {γ : Type*}
24-
[topological_space α] [topological_space β] [topological_space γ]
24+
open filter order set
25+
26+
variables {α β γ : Type*} [topological_space α] [topological_space β] [topological_space γ]
2527

2628
namespace topological_space
2729
variable (α)
@@ -93,10 +95,10 @@ by refl
9395

9496
@[simp] lemma mk_inf_mk {U V : set α} {hU : is_open U} {hV : is_open V} :
9597
(⟨U, hU⟩ ⊓ ⟨V, hV⟩ : opens α) = ⟨U ⊓ V, is_open.inter hU hV⟩ := rfl
96-
@[simp,norm_cast] lemma coe_inf {U V : opens α} :
97-
((U ⊓ V : opens α) : set α) = (U : set α) ⊓ (V : set α) := rfl
98+
@[simp, norm_cast] lemma coe_inf {U V : opens α} : ((U ⊓ V : opens α) : set α) = U ∩ V := rfl
9899
@[simp] lemma coe_bot : ((⊥ : opens α) : set α) = ∅ := rfl
99100
@[simp] lemma coe_top : ((⊤ : opens α) : set α) = set.univ := rfl
101+
@[simp] lemma coe_Sup {S : set (opens α)} : (↑(Sup S) : set α) = ⋃ i ∈ S, ↑i := (@gc α _).l_Sup
100102

101103
instance : has_inter (opens α) := ⟨λ U V, U ⊓ V⟩
102104
instance : has_union (opens α) := ⟨λ U V, U ⊔ V⟩
@@ -107,11 +109,8 @@ instance : inhabited (opens α) := ⟨∅⟩
107109
@[simp] lemma union_eq (U V : opens α) : U ∪ V = U ⊔ V := rfl
108110
@[simp] lemma empty_eq : (∅ : opens α) = ⊥ := rfl
109111

110-
@[simp] lemma Sup_s {Us : set (opens α)} : ↑(Sup Us) = ⋃₀ ((coe : _ → set α) '' Us) :=
111-
by { rw [(@gc α _).l_Sup, set.sUnion_image], refl }
112-
113112
lemma supr_def {ι} (s : ι → opens α) : (⨆ i, s i) = ⟨⋃ i, s i, is_open_Union $ λ i, (s i).2⟩ :=
114-
by { ext, simp only [supr, opens.Sup_s, sUnion_image, bUnion_range], refl }
113+
by { ext, simp only [supr, coe_Sup, bUnion_range], refl }
115114

116115
@[simp] lemma supr_mk {ι} (s : ι → set α) (h : Π i, is_open (s i)) :
117116
(⨆ i, ⟨s i, h i⟩ : opens α) = ⟨⋃ i, s i, is_open_Union h⟩ :=
@@ -126,6 +125,12 @@ by { rw [←mem_coe], simp, }
126125
@[simp] lemma mem_Sup {Us : set (opens α)} {x : α} : x ∈ Sup Us ↔ ∃ u ∈ Us, x ∈ u :=
127126
by simp_rw [Sup_eq_supr, mem_supr]
128127

128+
instance : frame (opens α) :=
129+
{ Sup := Sup,
130+
inf_Sup_le_supr_inf := λ a s,
131+
(ext $ by simp only [coe_inf, supr_s, coe_Sup, set.inter_Union₂]).le,
132+
..opens.complete_lattice }
133+
129134
lemma open_embedding_of_le {U V : opens α} (i : U ≤ V) :
130135
open_embedding (set.inclusion i) :=
131136
{ inj := set.inclusion_injective i,
@@ -168,8 +173,8 @@ begin
168173
{ intros hB U,
169174
refine ⟨{V : opens α | V ∈ B ∧ V ⊆ U}, λ U hU, hU.left, _⟩,
170175
apply ext,
171-
rw [Sup_s, hB.open_eq_sUnion' U.prop],
172-
simp_rw [sUnion_image, sUnion_eq_bUnion, Union, supr_and, supr_image],
176+
rw [coe_Sup, hB.open_eq_sUnion' U.prop],
177+
simp_rw [sUnion_eq_bUnion, Union, supr_and, supr_image],
173178
refl },
174179
{ intro h,
175180
rw is_basis_iff_nbhd,
@@ -180,15 +185,17 @@ begin
180185
end
181186

182187
/-- The preimage of an open set, as an open set. -/
183-
def comap (f : C(α, β)) : opens β →o opens α :=
184-
{ to_fun := λ V, ⟨f ⁻¹' V, V.2.preimage f.continuous⟩,
185-
monotone' := λ V₁ V₂ hle, monotone_preimage hle }
188+
def comap (f : C(α, β)) : frame_hom (opens β) (opens α) :=
189+
{ to_fun := λ s, ⟨f ⁻¹' s, s.2.preimage f.continuous⟩,
190+
map_Sup' := λ s, ext $ by simp only [coe_Sup, preimage_Union, coe_mk, mem_image, Union_exists,
191+
bUnion_and', Union_Union_eq_right],
192+
map_inf' := λ a b, rfl }
186193

187-
@[simp] lemma comap_id : comap (continuous_map.id α) = order_hom.id := by { ext, refl }
194+
@[simp] lemma comap_id : comap (continuous_map.id α) = frame_hom.id _ :=
195+
frame_hom.ext $ λ a, ext rfl
188196

189-
lemma comap_mono (f : C(α, β)) {V W : opens β} (hVW : V ⊆ W) :
190-
comap f V ⊆ comap f W :=
191-
(comap f).monotone hVW
197+
lemma comap_mono (f : C(α, β)) {s t : opens β} (h : s ≤ t) : comap f s ≤ comap f t :=
198+
order_hom_class.mono (comap f) h
192199

193200
@[simp] lemma coe_comap (f : C(α, β)) (U : opens β) : ↑(comap f U) = f ⁻¹' U := rfl
194201

0 commit comments

Comments
 (0)