@@ -108,13 +108,52 @@ def pathSetoid : Setoid X where
108108def ZerothHomotopy :=
109109 Quotient (pathSetoid X)
110110
111+ namespace ZerothHomotopy
112+
113+ variable {X}
114+
115+ /-- The map `X → ZerothHomotopy X`. -/
116+ def mk (x : X) : ZerothHomotopy X := Quotient.mk _ x
117+
118+ lemma mk_surjective : Function.Surjective (mk (X := X)) := by
119+ rintro ⟨x⟩
120+ exact ⟨x, rfl⟩
121+
122+ @ [elab_as_elim, induction_eliminator, cases_eliminator]
123+ lemma rec {motive : ZerothHomotopy X → Prop }
124+ (mk : ∀ (x : X), motive (.mk x)) (x : ZerothHomotopy X) :
125+ motive x := by
126+ obtain ⟨x, rfl⟩ := mk_surjective x
127+ exact mk x
128+
129+ lemma sound {x y : X} (p : Path x y) : mk x = mk y :=
130+ Quotient.sound ⟨p⟩
131+
111132/-- The quotient topology on path components. -/
112133instance : TopologicalSpace <| ZerothHomotopy X :=
113134 inferInstanceAs <| TopologicalSpace <| Quotient _
114135
115- instance ZerothHomotopy.inhabited : Inhabited (ZerothHomotopy ℝ) :=
136+ lemma isQuotientMap_mk : IsQuotientMap (ZerothHomotopy.mk (X := X)) :=
137+ isQuotientMap_quotient_mk'
138+
139+ instance inhabited : Inhabited (ZerothHomotopy ℝ) :=
116140 ⟨@Quotient.mk' ℝ (pathSetoid ℝ) 0 ⟩
117141
142+ section
143+
144+ variable {T : Type *} (f : X → T) (hf : ∀ ⦃x y : X⦄ (_ : Path x y), f x = f y)
145+
146+ /-- Constructor for maps from `ZerothHomotopy X`. -/
147+ def lift : ZerothHomotopy X → T :=
148+ Quotient.lift f fun _ _ ⟨p⟩ ↦ hf p
149+
150+ @[simp]
151+ lemma lift_mk (x : X) : lift f hf (.mk x) = f x := rfl
152+
153+ end
154+
155+ end ZerothHomotopy
156+
118157variable {X}
119158
120159/-! ### Being joined by a path inside a set -/
@@ -278,8 +317,8 @@ def ZerothHomotopy.toConnectedComponents : ZerothHomotopy X → ConnectedCompone
278317 Quotient.map id fun x _ h ↦ connectedComponent_eq <| pathComponent_subset_component x h
279318
280319@[simp]
281- theorem ZerothHomotopy.toConnectedComponents_apply (x : X) : toConnectedComponents ⟦x⟧ = ⟦x⟧ :=
282- rfl
320+ theorem ZerothHomotopy.toConnectedComponents_apply (x : X) :
321+ toConnectedComponents (.mk x) = ⟦x⟧ := rfl
283322
284323/-- There are at least as many path connected components as there are connected components -/
285324theorem ZerothHomotopy.toConnectedComponents_surjective :
@@ -598,7 +637,7 @@ end PathConnectedSpace
598637/-- The preimage of a singleton in `ZerothHomotopy` is the path component of an element in the
599638equivalence class. -/
600639theorem ZerothHomotopy.preimage_singleton_eq_pathComponent (x : X) :
601- Quotient .mk' (s := pathSetoid X) ⁻¹' {⟦x⟧ } = pathComponent x := by
640+ ZerothHomotopy .mk ⁻¹' {.mk x } = pathComponent x := by
602641 ext y
603642 rw [mem_preimage, mem_singleton_iff, eq_comm, mem_pathComponent_iff]
604643 exact Quotient.eq
0 commit comments