Skip to content

Commit dbb11d6

Browse files
Documentation
1 parent a3e45dc commit dbb11d6

File tree

3 files changed

+45
-325
lines changed

3 files changed

+45
-325
lines changed

Mathlib/Topology/Category/Lifting/Defs.lean

Lines changed: 15 additions & 240 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,22 @@ In this file, we provide the basic definitions of the topological spaces used in
3535
3636
## Main definitions
3737
38-
We give names and a minimal API to a number of topological spaces (bundled as objects of `TopCat`)
39-
used to define separation axioms:
38+
We give names and a minimal API to a number of topological spaces used to define separation axioms:
4039
4140
* `Discrete2` is the discrete space on two points.
4241
* `Codiscrete2` is the codiscrete space on two points.
43-
* `UProp` is `of (ULift Prop)`, with the Sierpinski topology.
44-
* For `X : TopCat`, `Opens X ≃ (X ⟶ of UProp) ≃ Closeds X`. We provide a convenient API for
45-
working with open and closed sets in terms of maps to `UProp`.
46-
* `O2C1` is the space with two open points and one closed point.
47-
* `O1C2` is the space with one open point and two closed points.
42+
* `Z3` is the preorder with three points `L, R ≤ 0`.
43+
* `O2C1` is the lower-set topology on `Z3`, the space with two open points and one closed point.
44+
* `O1C2` is the upper-set topology on `Z3`, space with one open point and two closed points.
45+
* `O1N2` is the topology on three points with one open point and two inseparable points.
46+
* `N2C1` is the topology on three points with two inseparable points and one closed point.
47+
* `Z5` is the preorder with five points `L, M ≤ 0` and `M, R` ≤ 1.
48+
* `O3C2` is the lower-set topology on `Z5`, the space with three open points and two closed
49+
points.
50+
* `O2C3` is the upper-set topology on `Z5`, the space with two open points and three closed
51+
points.
52+
* `OIC2` is the space formed by replacing the single open point in `O1C2` with a copy of the unit
53+
interval, so that `0 ⤳ L` and `1 ⤳ R`.
4854
4955
## Notation
5056
@@ -80,128 +86,11 @@ def decidable_of_bool' {a : Prop} : ∀ (b : Bool), (b ↔ a) → Decidable a
8086
| true, h => isTrue (h.1 rfl)
8187
| false, h => isFalse (mt h.2 Bool.noConfusion)
8288

83-
--TODO goes into `Mathlib.Topology.Order`
84-
/- A topological space is discrete if only the empty set and `univ` are open, that is, its topology
85-
equals the codiscrete topology `⊤`. -/
86-
class CodiscreteTopology α [t : TopologicalSpace α] : Prop where
87-
eq_top : t = ⊤
88-
89-
lemma codiscreteTopology_top (α) : @CodiscreteTopology α ⊤ := @CodiscreteTopology.mk α ⊤ rfl
90-
91-
section CodiscreteTopology
92-
variable {α} [TopologicalSpace α] [CodiscreteTopology α] (s : Set α)
93-
94-
@[simp]
95-
lemma isOpen_codiscrete : IsOpen s ↔ s = ∅ ∨ s = Set.univ :=
96-
‹CodiscreteTopology α›.eq_top ▸ TopologicalSpace.isOpen_top_iff s
97-
98-
@[simp]
99-
lemma isClosed_codiscrete : IsClosed s ↔ s = ∅ ∨ s = Set.univ := by
100-
rw [← isOpen_compl_iff, isOpen_codiscrete, Or.comm]; simp
101-
102-
variable {s}
103-
104-
lemma closure_codiscrete (hs₀ : s.Nonempty) : closure s = Set.univ := by
105-
rcases isClosed_codiscrete (closure s) |>.mp isClosed_closure with hs | hs
106-
· exfalso; exact hs₀.mono subset_closure |>.ne_empty hs
107-
· assumption
108-
109-
lemma dense_codiscrete (hs₀ : s.Nonempty) : Dense s := by
110-
rw [dense_iff_closure_eq]; exact closure_codiscrete hs₀
111-
112-
@[simp]
113-
lemma CodiscreteTopology.specializes (x y : α) : x ⤳ y := by
114-
simp [specializes_iff_mem_closure, closure_codiscrete]
115-
116-
@[continuity, fun_prop]
117-
lemma continuous_of_codiscreteTopology {β} [TopologicalSpace β] (f : β → α) : Continuous f := by
118-
simp [continuous_iff_coinduced_le, CodiscreteTopology.eq_top (α := α)]
119-
120-
121-
open Set in
122-
/-- A function out of a codiscrete topology is continuous iff all points in its range are
123-
inseparable. -/
124-
lemma continuous_codiscrete_dom {β} [TopologicalSpace β] (f : α → β) :
125-
Continuous f ↔ ∀ x y, Inseparable (f x) (f y) where
126-
mp h x y := by
127-
rw [inseparable_iff_forall_isOpen]
128-
intro s hs
129-
have := hs.preimage h
130-
simp only [isOpen_codiscrete, preimage_eq_empty_iff, preimage_eq_univ_iff] at this
131-
constructor
132-
all_goals
133-
intro hxy
134-
replace this := this.resolve_left (not_disjoint_iff.mpr ⟨f _, hxy, mem_range_self _⟩)
135-
exact this <| mem_range_self _
136-
mpr h := by
137-
simp_rw [inseparable_iff_forall_isOpen] at h
138-
fconstructor
139-
intro s hs
140-
replace h x y := h x y s hs
141-
simp_rw [← mem_preimage] at h
142-
by_cases h₀ : ∃ x, x ∈ f ⁻¹' s
143-
· obtain ⟨x, hx⟩ := h₀
144-
simp [eq_univ_of_forall <| (h x · |>.mp hx)]
145-
· push_neg at h₀
146-
simp [eq_empty_of_forall_notMem h₀]
147-
148-
alias ⟨_, continuous_codiscrete_of_inseparable⟩ := continuous_codiscrete_dom
149-
150-
attribute [continuity] continuous_codiscrete_of_inseparable
151-
152-
instance {α} [TopologicalSpace α] [CodiscreteTopology α] : CodiscreteTopology (ULift α) where
153-
eq_top := by
154-
ext
155-
simp [ULift.isOpen_iff, TopologicalSpace.isOpen_top_iff, Set.preimage_eq_empty_iff,
156-
Set.range_eq_univ.mpr ULift.up_surjective]
157-
158-
instance {α} : CodiscreteTopology (TopCat.trivial.obj α) := codiscreteTopology_top _
159-
160-
end CodiscreteTopology
161-
16289

16390
universe u v
16491
open CategoryTheory Topology TopologicalSpace ContinuousMap Set
16592
open scoped Filter
16693

167-
namespace Topology
168-
open TopCat
169-
170-
-- TODO move to `Mathlib.Topology.Order.UpperLowerSetTopology`?
171-
172-
lemma IsLowerSet.antitone_iff_continuous {α β} [Preorder α] [Preorder β]
173-
[TopologicalSpace α] [TopologicalSpace β]
174-
[hα : Topology.IsLowerSet α] [hβ : Topology.IsUpperSet β] (f : α → β) :
175-
Antitone f ↔ Continuous f where
176-
mp hf := by
177-
have : OrderDual.ofDual ∘ OrderDual.toDual ∘ f = f := by ext; rfl
178-
rw [← isLowerSet_orderDual] at hβ
179-
rw [← monotone_toDual_comp_iff, IsLowerSet.monotone_iff_continuous] at hf
180-
rw [← this]; exact continuous_ofDual.comp hf
181-
mpr hf := by
182-
rw [← isLowerSet_orderDual] at hβ
183-
rw [← monotone_toDual_comp_iff, IsLowerSet.monotone_iff_continuous]
184-
exact hf.comp continuous_ofDual
185-
186-
lemma IsUpperSet.antitone_iff_continuous {α β} [Preorder α] [Preorder β]
187-
[TopologicalSpace α] [TopologicalSpace β]
188-
[hα : Topology.IsUpperSet α] [hβ : Topology.IsLowerSet β] (f : α → β) :
189-
Antitone f ↔ Continuous f where
190-
mp hf := by
191-
have : OrderDual.ofDual ∘ OrderDual.toDual ∘ f = f := by ext; rfl
192-
rw [← isUpperSet_orderDual] at hβ
193-
rw [← monotone_toDual_comp_iff, IsUpperSet.monotone_iff_continuous] at hf
194-
rw [← this]; exact continuous_ofDual.comp hf
195-
mpr hf := by
196-
rw [← isUpperSet_orderDual] at hβ
197-
rw [← monotone_toDual_comp_iff, IsUpperSet.monotone_iff_continuous]
198-
exact hf.comp continuous_ofDual
199-
200-
201-
end Topology
202-
203-
204-
20594
namespace TopCat
20695
open CategoryTheory Limits
20796

@@ -1629,7 +1518,7 @@ def toI : C(OIC2, I) :=
16291518
rw [continuous_dom_iff]
16301519
split_ands <;> first
16311520
| simpa [toFun, Function.comp_def] using continuous_id
1632-
| rw [AlexandrovDiscrete.continuous_iff_spec_monotone]; simp [toFun] }
1521+
| rw [continuous_iff_spec_monotone]; simp [toFun] }
16331522

16341523
@[simp] lemma toI_left : toI .left = 0 := rfl
16351524
@[simp] lemma toI_right : toI .right = 1 := rfl
@@ -1653,7 +1542,7 @@ def flip : OIC2 ≃ₜ OIC2 :=
16531542
rw [continuous_dom_iff]
16541543
split_ands <;> first
16551544
| simpa [toFun, Function.comp_def] using continuous_ofI.comp' unitInterval.continuous_symm
1656-
| rw [AlexandrovDiscrete.continuous_iff_spec_monotone]
1545+
| rw [continuous_iff_spec_monotone]
16571546
simp [toFun, specializes_refl, specializes_one_right, specializes_zero_left]
16581547
{ toFun
16591548
invFun := toFun
@@ -1677,8 +1566,6 @@ attribute [simp] toI_flip
16771566
lemma flip_preimage (s : Set OIC2) : flip ⁻¹' s = flip '' s := by
16781567
rw [flip.image_eq_preimage_symm]; rfl
16791568

1680-
1681-
16821569
lemma nhds_left : 𝓝 left.{u} = (𝓝 (0 : I)).comap toI.{u} := by --⊔ pure left.{u} := by
16831570
have hbot : (0 : I) = ⊥ := by rw [← isMin_iff_eq_bot]; rintro ⟨r, hr₁, hr₂⟩; simp
16841571
rw [hbot]
@@ -1805,117 +1692,5 @@ lemma lift_comp_toI {X : TopCat.{u}} {f : X ⟶ of O1C2} {g : X ⟶ of (ULift I)
18051692
ext x; cases hf : f x using O1C2.casesOn' <;> simp [lift, lift.map, toI, hf, h₀, h₁]
18061693

18071694
end OIC2
1808-
1809-
end
1810-
1811-
def O3C4' : Type u := O3C2.{u} ⊕ O2C1.{u} deriving Inhabited, DecidableEq
1812-
1813-
namespace O3C4'
1814-
1815-
@[mk_iff]
1816-
inductive spec : O3C4' → O3C4' → Prop
1817-
| inl_spec {x y : O3C2} : x ≤ y → spec (.inl x) (.inl y)
1818-
| inr_spec {x y : O2C1} : x ≤ y → spec (.inr x) (.inr y)
1819-
| leftL_leftR : spec (.inl O3C2.left) (.inr O2C1.left)
1820-
| leftR_leftL : spec (.inr O2C1.left) (.inl O3C2.left)
1821-
| rightL_rightR : spec (.inl O3C2.right) (.inr O2C1.right)
1822-
| rightR_rightL : spec (.inr O2C1.right) (.inl O3C2.right)
1823-
| leftL_right0 : spec (.inl O3C2.left) (.inr O2C1.zero)
1824-
| leftR_right0 : spec (.inl O3C2.right) (.inr O2C1.zero)
1825-
| rightL_left0 : spec (.inr O2C1.left) (.inl O3C2.zero)
1826-
| rightR_left1 : spec (.inr O2C1.right) (.inl O3C2.one)
1827-
1828-
instance : Preorder O3C4'.{u} where
1829-
le := spec
1830-
le_refl := by rintro (⟨⟨⟩⟩ | ⟨⟨⟩⟩) <;> constructor <;> rfl
1831-
le_trans := by
1832-
rintro (⟨⟨⟩⟩ | ⟨⟨⟩⟩) (⟨⟨⟩⟩ | ⟨⟨⟩⟩) (⟨⟨⟩⟩ | ⟨⟨⟩⟩) (⟨⟨⟩⟩ | ⟨⟨⟩⟩ | _) (⟨⟨⟩⟩ | ⟨⟨⟩⟩ | _)
1833-
<;> constructor <;> simp +decide [O3C2.le_def]
1834-
1835-
1836-
instance : TopologicalSpace O3C4'.{u} := Topology.lowerSet _
1837-
1838-
end O3C4'
1839-
1840-
def O1C1' : Type u := O1C2.{u} ⊕ O2C1.{u} deriving Inhabited, DecidableEq
1841-
1842-
namespace O1C1'
1843-
1844-
@[mk_iff]
1845-
inductive spec : O1C1' → O1C1' → Prop
1846-
| inl_spec {x y : O1C2} : x ≥ y → spec (.inl x) (.inl y)
1847-
| inr_spec {x y : O2C1} : x ≤ y → spec (.inr x) (.inr y)
1848-
| leftL_leftR : spec (.inl O1C2.left) (.inr O2C1.left)
1849-
| leftR_leftL : spec (.inr O2C1.left) (.inl O1C2.left)
1850-
| rightL_rightR : spec (.inl O1C2.right) (.inr O2C1.right)
1851-
| rightR_rightL : spec (.inr O2C1.right) (.inl O1C2.right)
1852-
| left1_inr (x : O2C1) : spec (.inl O1C2.one) (.inr x)
1853-
| inl_right0 (x : Z3) : spec (.inl <| .as x) (.inr O2C1.zero)
1854-
1855-
instance : Preorder O1C1'.{u} where
1856-
le := spec
1857-
le_refl := by rintro (⟨⟨⟩⟩ | ⟨⟨⟩⟩) <;> constructor <;> rfl
1858-
le_trans := by
1859-
rintro (⟨⟨⟩⟩ | ⟨⟨⟩⟩) (⟨⟨⟩⟩ | ⟨⟨⟩⟩) (⟨⟨⟩⟩ | ⟨⟨⟩⟩) (⟨⟨⟩⟩ | ⟨⟨⟩⟩ | _) (⟨⟨⟩⟩ | ⟨⟨⟩⟩ | _)
1860-
<;> constructor <;> simp +decide
1861-
1862-
instance : TopologicalSpace O1C1'.{u} := Topology.lowerSet _
1863-
1864-
end O1C1'
1865-
1866-
section
1867-
open scoped unitInterval
1868-
1869-
-- `unitInterval'`, or `I₀¹`, is the unit interval with an extra `0'`, `1'` glued onto the ends.
1870-
inductive unitInterval' : Type u where | zero' | one' | ofI (x : I)
1871-
deriving Inhabited
1872-
1873-
scoped[unitInterval] notation "I₀¹" => TopCat.unitInterval'
1874-
1875-
namespace unitInterval'
1876-
1877-
def toI : I₀¹ → I | .zero' => 0 | .one' => 1 | .ofI x => x
1878-
@[simp] lemma ofI_toI (x : I) : toI (.ofI x) = x := rfl
1879-
@[simp] lemma toI_zero' : toI (.zero') = 0 := rfl
1880-
@[simp] lemma toI_one' : toI (.one') = 1 := rfl
1881-
1882-
instance : TopologicalSpace unitInterval' := induced toI inferInstance
1883-
1884-
lemma continuous_toI : Continuous toI := continuous_induced_dom
1885-
lemma continuous_ofI : Continuous ofI := by
1886-
constructor
1887-
rintro _ ⟨s, sO, rfl⟩
1888-
simp [preimage_preimage, sO]
1889-
1890-
/-- The embedding `I → I₀¹ := ofI`. -/
1891-
@[simps] def emb : C(I, I₀¹) := ⟨ofI, continuous_ofI⟩
1892-
1893-
lemma isEmbedding_emb : IsEmbedding emb :=
1894-
.of_leftInverse (fun x ↦ by simp) continuous_toI emb.continuous
1895-
1896-
lemma isClosed_zeros : IsClosed {zero', ofI 0} := by
1897-
rw [isClosed_induced_iff]
1898-
use {0}, isClosed_singleton
1899-
ext ⟨⟩ <;> simp [toI]
1900-
1901-
lemma isClosed_ones : IsClosed {one', ofI 1} := by
1902-
rw [isClosed_induced_iff]
1903-
use {1}, isClosed_singleton
1904-
ext ⟨⟩ <;> simp [toI]
1905-
1906-
lemma continuous_iff {α} [TopologicalSpace α] {f : α → I₀¹} :
1907-
Continuous f ↔ Continuous (toI ∘ f) where
1908-
mp h := by
1909-
constructor
1910-
rintro _ ⟨s, sO, rfl⟩
1911-
exact sO.preimage_val.preimage continuous_toI |>.preimage h
1912-
mpr h := by
1913-
constructor
1914-
rintro _ ⟨s, sO, rfl⟩
1915-
exact sO.preimage h
1916-
-- simp_rw [← preimage_comp, Function.comp_def, toI]
1917-
-- exact h.preimage sO
1918-
1919-
end unitInterval'
19201695
end
19211696
end TopCat

0 commit comments

Comments
 (0)