Skip to content

Commit 51c7b2f

Browse files
Alternate T2
1 parent dbb11d6 commit 51c7b2f

File tree

4 files changed

+90
-2
lines changed

4 files changed

+90
-2
lines changed

Mathlib/Topology/Category/Lifting/Defs.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ lemma «exists» {p : Codiscrete2 → Prop} :
181181

182182
lemma ne : Codiscrete2.zero ≠ Codiscrete2.one := by simp [ULift.ext_iff, Codiscrete2]
183183

184+
/-- Construct a continuous map into `Codiscrete2` from an arbitrary set. -/
185+
@[simps]
186+
def hom {X} [TopologicalSpace X] (s : Set X) [DecidablePred (· ∈ s)] : C(X, Codiscrete2) where
187+
toFun x := if x ∈ s then .one else .zero
188+
184189
/-- For any continuous map `f : C(Codiscrete2, X)`, the points `f .zero` and `f .one` are
185190
inseparable. (For the definition witnessing that this condition is sufficient to construct a
186191
continuous map, see `Codiscrete2.homOfInseparable`.) -/
@@ -189,6 +194,7 @@ lemma inseparable {X : TopCat} (f : C(Codiscrete2, X)) : Inseparable (f .zero) (
189194

190195
/-- A continuous map out of `Codiscrete2` can be made from any pair of inseparable points.
191196
(For the fact that any such map is of this form, see `Codiscrete2.inseparable`.) -/
197+
@[simps]
192198
def homOfInseparable {X : TopCat} {x y : X} (hxy : Inseparable x y) : C(Codiscrete2, X) where
193199
toFun | .zero => x | .one => y
194200
continuous_toFun := by

Mathlib/Topology/Category/Lifting/Separation.lean

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public import Mathlib.CategoryTheory.Limits.Shapes.RegularMono
99
public import Mathlib.Topology.Category.TopCat.Limits.Pullbacks
1010
public import Mathlib.Topology.Category.Lifting.Defs
1111
public import Mathlib.Topology.UrysohnsLemma
12+
public import Mathlib.Topology.SeparatedMap
1213

1314
import Mathlib.Tactic.TautoSet
1415

@@ -253,6 +254,7 @@ theorem of_extend (extend : (f : of Discrete2 ⟶ X) → [Mono f] → X ⟶ of O
253254
simp
254255
· apply Disjoint.preimage; simp
255256

257+
256258
/-- A space `X` is `T2` iff every mono from `Discrete2` to `X` has the left lifting property
257259
against `terminal.from O2C1`.
258260
@@ -270,7 +272,6 @@ def llp : T2Space X ↔ ∀ (χ : of Discrete2.{u} ⟶ X) [Mono χ], χ ⧄ term
270272
((isoOfHomeo Discrete2.swap).inv ≫ χ) (terminal.from (of O2C1.{u})) τ := by
271273
constructor; exact terminal.hom_ext _ _
272274
specialize this _ (mono_comp _ χ) sq' (by simpa using h₀) (by simp [h₀₁])
273-
let l := sq'.lift
274275
apply CommSq.HasLift.mk'; use sq'.lift
275276
· apply IsIso.epi_of_iso (isoOfHomeo Discrete2.swap).inv |>.left_cancellation
276277
rw [← Category.assoc, sq'.fac_left]
@@ -324,6 +325,69 @@ instance [T2Space X] (χ : of Discrete2.{u} ⟶ X) [Mono χ] :
324325
HasLiftingProperty χ (terminal.from (of O2C1.{u})) :=
325326
llp.mp ‹_› χ
326327

328+
open Function in
329+
open scoped Classical in
330+
/-- Alternate characterization: a space `X` is `T2` iff `ContinuousMap.diagonal X`
331+
lifts against `Codiscrete2.hom { N2C1.left }`. -/
332+
theorem llp' : T2Space X ↔
333+
ofHom (.diagonal X) ⧄ ofHom (Codiscrete2.hom { N2C1.left }) where
334+
mp _ :=
335+
{ sq_hasLift {ι τ} sq := by
336+
apply CommSq.HasLift.mk';
337+
fconstructor
338+
· refine
339+
ofHom ⟨extend (ContinuousMap.diagonal X) ι (if τ · = .zero then .right else .left), ?_ ⟩
340+
rw [N2C1.basis.continuous_iff]
341+
rintro _ (rfl | rfl)
342+
· simp
343+
· have zero_compl : ({N2C1.left, N2C1.right}ᶜ : Set N2C1) = {N2C1.zero} := by
344+
ext ⟨⟩ <;> simp
345+
rw [← isClosed_compl_iff, ← preimage_compl, zero_compl,
346+
IsClosedEmbedding.diagonal.isClosed_iff_preimage_isClosed, ← preimage_comp,
347+
extend_comp ContinuousMap.diagonal_injective]
348+
· exact N2C1.isClosed_zero.preimage ι.hom.continuous
349+
· intro (x, y) h
350+
contrapose! h
351+
replace h : ¬∃ z, (ContinuousMap.diagonal X z) = (x, y) := by simpa using h
352+
simp [extend_apply' _ _ _ h]
353+
grind
354+
· rw [← ofHom_comp, ContinuousMap.comp]
355+
simp [extend_comp ContinuousMap.diagonal_injective]
356+
rfl
357+
· ext ⟨x, y⟩
358+
rcases em (x = y) with (rfl | hxy)
359+
· rw [show (x, x) = ContinuousMap.diagonal X x by rfl]
360+
have := (elementwise_of% sq.w) x
361+
simp at this
362+
simp [-ContinuousMap.diagonal_apply, ContinuousMap.diagonal_injective.extend_apply]
363+
simp [this]
364+
· replace hxy : ¬∃ z, (ContinuousMap.diagonal X z) = (x, y) := by simpa using hxy
365+
have {z} : ¬z = Codiscrete2.zero ↔ Codiscrete2.one = z := by cases z <;> grind
366+
simp only [TopCat.hom_comp, hom_ofHom, ContinuousMap.comp_apply, ContinuousMap.coe_mk,
367+
extend_apply' _ _ _ hxy, Codiscrete2.hom_apply, ite_eq_right_iff,
368+
reduceCtorEq, imp_false, mem_singleton_iff, ULift.down_inj]
369+
split_ifs with h₀ <;> first | rwa [this] at h₀ | simp_all }
370+
mpr h := by
371+
have hsq := h.sq_hasLift (f := ofHom <| .const X N2C1.zero)
372+
(g := ofHom <| Codiscrete2.hom (diagonal X)ᶜ) ⟨by ext; simp⟩
373+
let χ := CommSq.lift (hsq := hsq)
374+
rw [t2_iff_isClosed_diagonal]
375+
convert N2C1.isClosed_zero.preimage χ.hom.continuous
376+
ext ⟨x, y⟩
377+
constructor
378+
· rintro ⟨⟩
379+
unfold χ
380+
have := (elementwise_of% CommSq.fac_left (hsq := hsq)) x
381+
rw [show (x, x) = ContinuousMap.diagonal X x by rfl]
382+
simp at this; simp [this]
383+
· rw [mem_preimage, mem_singleton_iff]
384+
intro hχ
385+
have := (elementwise_of% CommSq.fac_right (hsq := hsq)) (x, y)
386+
apply_fun ofHom (Codiscrete2.hom {N2C1.left}) at hχ
387+
simp_rw [χ, this] at hχ
388+
simp [Codiscrete2.ne.symm] at hχ; simp [hχ]
389+
390+
327391
/-- A `T2` space `X` extends every mono from `Discrete2` into one to `O2C1`. -/
328392
noncomputable def extend [T2Space X] (χ : of Discrete2 ⟶ X) [Mono χ] : X ⟶ of O2C1 :=
329393
CommSq.lift (hsq := (llp.mp ‹_› χ).sq_hasLift

Mathlib/Topology/ContinuousMap/Basic.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@ theorem prod_eval (f : C(α, β₁)) (g : C(α, β₂)) (a : α) : (prodMk f g)
207207
@[simps!]
208208
def prodSwap : C(α × β, β × α) := .prodMk .snd .fst
209209

210+
/-- The diagonal map `x ↦ (x, x)` as a bundled continuous map. -/
211+
@[simps]
212+
def diagonal X [TopologicalSpace X] : C(X, X × X) where
213+
toFun x := (x, x)
214+
215+
lemma diagonal_injective {X} [TopologicalSpace X] : Function.Injective (diagonal X) := by
216+
intro x y h; simpa using h
217+
210218
end Prod
211219

212220
section Sigma

Mathlib/Topology/SeparatedMap.lean

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Authors: Junyan Xu
55
-/
66
module
77

8+
public import Mathlib.Topology.ContinuousMap.Basic
89
public import Mathlib.Topology.Connected.Basic
9-
public import Mathlib.Topology.Separation.Hausdorff
1010
public import Mathlib.Topology.Connected.Clopen
1111
/-!
1212
# Separated maps and locally injective maps out of a topological space.
@@ -102,6 +102,16 @@ theorem isSeparatedMap_iff_isClosedMap {f : X → Y} :
102102
⟨IsClosedEmbedding.isClosedMap, .of_continuous_injective_isClosedMap
103103
(IsEmbedding.toPullbackDiag f).continuous (injective_toPullbackDiag f)⟩
104104

105+
lemma _root_.Topology.IsClosedEmbedding.diagonal [T2Space X] :
106+
IsClosedEmbedding (ContinuousMap.diagonal X) := by
107+
let τ : C(X, Unit) := .const X ()
108+
let η : X × X ≃ₜ Function.Pullback ⇑τ ⇑τ :=
109+
{ toFun | (x, y) => ⟨(x, y), rfl⟩
110+
invFun := Subtype.val }
111+
rw [← η.isClosedEmbedding.of_comp_iff]
112+
convert isSeparatedMap_iff_isClosedEmbedding.mp (T2Space.isSeparatedMap _)
113+
infer_instance
114+
105115
open Function.Pullback in
106116
theorem IsSeparatedMap.pullback {f : X → Y} (sep : IsSeparatedMap f) (g : A → Y) :
107117
IsSeparatedMap (@snd X Y A f g) := by

0 commit comments

Comments
 (0)