Skip to content

Commit 57511d5

Browse files
committed
feat(CompactOpen): add instances (#12667)
1 parent a169186 commit 57511d5

File tree

2 files changed

+53
-3
lines changed

2 files changed

+53
-3
lines changed

Mathlib/Topology/CompactOpen.lean

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] {K : Set
5252

5353
/-- The compact-open topology on the space of continuous maps `C(X, Y)`. -/
5454
instance compactOpen : TopologicalSpace C(X, Y) :=
55-
.generateFrom <| image2 (fun K U ↦ {f | MapsTo f K U}) {K | IsCompact K} {U | IsOpen U}
55+
.generateFrom <| image2 (fun K U ↦ {f | MapsTo f K U}) {K | IsCompact K} {U | IsOpen U}
5656
#align continuous_map.compact_open ContinuousMap.compactOpen
5757

5858
/-- Definition of `ContinuousMap.compactOpen`. -/
@@ -200,14 +200,44 @@ lemma isClopen_setOf_mapsTo (hK : IsCompact K) (hU : IsClopen U) :
200200
IsClopen {f : C(X, Y) | MapsTo f K U} :=
201201
⟨isClosed_setOf_mapsTo hU.isClosed K, isOpen_setOf_mapsTo hK hU.isOpen⟩
202202

203+
@[norm_cast]
204+
lemma specializes_coe {f g : C(X, Y)} : ⇑f ⤳ ⇑g ↔ f ⤳ g := by
205+
refine ⟨fun h ↦ ?_, fun h ↦ h.map continuous_coe⟩
206+
suffices ∀ K, IsCompact K → ∀ U, IsOpen U → MapsTo g K U → MapsTo f K U by
207+
simpa [specializes_iff_pure, nhds_compactOpen]
208+
exact fun K _ U hU hg x hx ↦ (h.map (continuous_apply x)).mem_open hU (hg hx)
209+
210+
@[norm_cast]
211+
lemma inseparable_coe {f g : C(X, Y)} : Inseparable (f : X → Y) g ↔ Inseparable f g := by
212+
simp only [inseparable_iff_specializes_and, specializes_coe]
213+
203214
instance [T0Space Y] : T0Space C(X, Y) :=
204215
t0Space_of_injective_of_continuous DFunLike.coe_injective continuous_coe
205216

217+
instance [R0Space Y] : R0Space C(X, Y) where
218+
specializes_symmetric f g h := by
219+
rw [← specializes_coe] at h ⊢
220+
exact h.symm
221+
206222
instance [T1Space Y] : T1Space C(X, Y) :=
207223
t1Space_of_injective_of_continuous DFunLike.coe_injective continuous_coe
208224

209-
instance [T2Space Y] : T2Space C(X, Y) :=
210-
.of_injective_continuous DFunLike.coe_injective continuous_coe
225+
instance [R1Space Y] : R1Space C(X, Y) :=
226+
.of_continuous_specializes_imp continuous_coe fun _ _ ↦ specializes_coe.1
227+
228+
instance [T2Space Y] : T2Space C(X, Y) := inferInstance
229+
230+
instance [RegularSpace Y] : RegularSpace C(X, Y) :=
231+
.of_lift'_closure_le fun f ↦ by
232+
rw [← tendsto_id', tendsto_nhds_compactOpen]
233+
intro K hK U hU hf
234+
rcases (hK.image f.continuous).exists_isOpen_closure_subset (hU.mem_nhdsSet.2 hf.image_subset)
235+
with ⟨V, hVo, hKV, hVU⟩
236+
filter_upwards [mem_lift' (eventually_mapsTo hK hVo (mapsTo'.2 hKV))] with g hg
237+
refine ((isClosed_setOf_mapsTo isClosed_closure K).closure_subset ?_).mono_right hVU
238+
exact closure_mono (fun _ h ↦ h.mono_right subset_closure) hg
239+
240+
instance [T3Space Y] : T3Space C(X, Y) := inferInstance
211241

212242
end Ev
213243

Mathlib/Topology/Separation.lean

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1874,6 +1874,10 @@ theorem regularSpace_TFAE (X : Type u) [TopologicalSpace X] :
18741874
tfae_finish
18751875
#align regular_space_tfae regularSpace_TFAE
18761876

1877+
theorem RegularSpace.of_lift'_closure_le (h : ∀ x : X, (𝓝 x).lift' closure ≤ 𝓝 x) :
1878+
RegularSpace X :=
1879+
Iff.mpr ((regularSpace_TFAE X).out 0 4) h
1880+
18771881
theorem RegularSpace.of_lift'_closure (h : ∀ x : X, (𝓝 x).lift' closure = 𝓝 x) : RegularSpace X :=
18781882
Iff.mpr ((regularSpace_TFAE X).out 0 5) h
18791883
#align regular_space.of_lift'_closure RegularSpace.of_lift'_closure
@@ -1945,6 +1949,22 @@ theorem hasBasis_opens_closure (x : X) : (𝓝 x).HasBasis (fun s => x ∈ s ∧
19451949
(nhds_basis_opens x).nhds_closure
19461950
#align has_basis_opens_closure hasBasis_opens_closure
19471951

1952+
theorem IsCompact.exists_isOpen_closure_subset {K U : Set X} (hK : IsCompact K) (hU : U ∈ 𝓝ˢ K) :
1953+
∃ V, IsOpen V ∧ K ⊆ V ∧ closure V ⊆ U := by
1954+
have hd : Disjoint (𝓝ˢ K) (𝓝ˢ Uᶜ) := by
1955+
simpa [hK.disjoint_nhdsSet_left, disjoint_nhds_nhdsSet,
1956+
← subset_interior_iff_mem_nhdsSet] using hU
1957+
rcases ((hasBasis_nhdsSet _).disjoint_iff (hasBasis_nhdsSet _)).1 hd
1958+
with ⟨V, ⟨hVo, hKV⟩, W, ⟨hW, hUW⟩, hVW⟩
1959+
refine ⟨V, hVo, hKV, Subset.trans ?_ (compl_subset_comm.1 hUW)⟩
1960+
exact closure_minimal hVW.subset_compl_right hW.isClosed_compl
1961+
1962+
theorem IsCompact.lift'_closure_nhdsSet {K : Set X} (hK : IsCompact K) :
1963+
(𝓝ˢ K).lift' closure = 𝓝ˢ K := by
1964+
refine le_antisymm (fun U hU ↦ ?_) (le_lift'_closure _)
1965+
rcases hK.exists_isOpen_closure_subset hU with ⟨V, hVo, hKV, hVU⟩
1966+
exact mem_of_superset (mem_lift' <| hVo.mem_nhdsSet.2 hKV) hVU
1967+
19481968
theorem TopologicalSpace.IsTopologicalBasis.nhds_basis_closure {B : Set (Set X)}
19491969
(hB : IsTopologicalBasis B) (x : X) :
19501970
(𝓝 x).HasBasis (fun s : Set X => x ∈ s ∧ s ∈ B) closure := by

0 commit comments

Comments
 (0)