Skip to content

Commit

Permalink
feat: the additive circle is path connected (#6022)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocfnash committed Jul 22, 2023
1 parent babf007 commit 560eeb2
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Mathlib/Analysis/Convex/Normed.lean
Expand Up @@ -137,7 +137,7 @@ theorem dist_add_dist_of_mem_segment {x y z : E} (h : y ∈ [x -[ℝ] z]) :

/-- The set of vectors in the same ray as `x` is connected. -/
theorem isConnected_setOf_sameRay (x : E) : IsConnected { y | SameRay ℝ x y } := by
by_cases hx : x = 0; · simpa [hx] using isConnected_univ
by_cases hx : x = 0; · simpa [hx] using isConnected_univ (α := E)
simp_rw [← exists_nonneg_left_iff_sameRay hx]
exact isConnected_Ici.image _ (continuous_id.smul continuous_const).continuousOn
#align is_connected_set_of_same_ray isConnected_setOf_sameRay
Expand Down
3 changes: 3 additions & 0 deletions Mathlib/Data/Set/Image.lean
Expand Up @@ -985,6 +985,9 @@ theorem range_quotient_mk' {s : Setoid α} : range (Quotient.mk' : α → Quotie
range_quot_mk _
#align set.range_quotient_mk' Set.range_quotient_mk'

@[simp] lemma Quotient.range_mk'' {sa : Setoid α} : range (Quotient.mk'' (s₁ := sa)) = univ :=
range_quotient_mk

@[simp]
theorem range_quotient_lift_on' {s : Setoid ι} (hf) :
(range fun x : Quotient s => Quotient.liftOn' x f hf) = range f :=
Expand Down
3 changes: 3 additions & 0 deletions Mathlib/GroupTheory/Coset.lean
Expand Up @@ -471,6 +471,9 @@ theorem mk_surjective : Function.Surjective <| @mk _ _ s :=
#align quotient_group.mk_surjective QuotientGroup.mk_surjective
#align quotient_add_group.mk_surjective QuotientAddGroup.mk_surjective

@[to_additive (attr := simp)]
lemma range_mk : range (QuotientGroup.mk (s := s)) = univ := range_iff_surjective.mpr mk_surjective

@[to_additive (attr := elab_as_elim)]
theorem induction_on {C : α ⧸ s → Prop} (x : α ⧸ s) (H : ∀ z, C (QuotientGroup.mk z)) : C x :=
Quotient.inductionOn' x H
Expand Down
16 changes: 16 additions & 0 deletions Mathlib/Topology/Connected.lean
Expand Up @@ -753,6 +753,13 @@ theorem isConnected_univ [ConnectedSpace α] : IsConnected (univ : Set α) :=
⟨univ_nonempty, isPreconnected_univ⟩
#align is_connected_univ isConnected_univ

lemma preconnectedSpace_iff_univ : PreconnectedSpace α ↔ IsPreconnected (univ : Set α) :=
fun h ↦ h.1, fun h ↦ ⟨h⟩⟩

lemma connectedSpace_iff_univ : ConnectedSpace α ↔ IsConnected (univ : Set α) :=
fun h ↦ ⟨univ_nonempty, h.1.1⟩,
fun h ↦ ConnectedSpace.mk (toPreconnectedSpace := ⟨h.2⟩) ⟨h.1.some⟩⟩

theorem isPreconnected_range [TopologicalSpace β] [PreconnectedSpace α] {f : α → β}
(h : Continuous f) : IsPreconnected (range f) :=
@image_univ _ _ f ▸ isPreconnected_univ.image _ h.continuousOn
Expand All @@ -763,6 +770,15 @@ theorem isConnected_range [TopologicalSpace β] [ConnectedSpace α] {f : α →
⟨range_nonempty f, isPreconnected_range h⟩
#align is_connected_range isConnected_range

theorem Function.Surjective.connectedSpace [ConnectedSpace α] [TopologicalSpace β]
{f : α → β} (hf : Surjective f) (hf' : Continuous f) : ConnectedSpace β := by
rw [connectedSpace_iff_univ, ← hf.range_eq]
exact isConnected_range hf'

instance Quotient.instConnectedSpace {s : Setoid α} [ConnectedSpace α] :
ConnectedSpace (Quotient s) :=
(surjective_quotient_mk _).connectedSpace continuous_coinduced_rng

theorem DenseRange.preconnectedSpace [TopologicalSpace β] [PreconnectedSpace α] {f : α → β}
(hf : DenseRange f) (hc : Continuous f) : PreconnectedSpace β :=
⟨hf.closure_eq ▸ (isPreconnected_range hc).closure⟩
Expand Down
4 changes: 4 additions & 0 deletions Mathlib/Topology/Instances/AddCircle.lean
Expand Up @@ -10,6 +10,7 @@ import Mathlib.GroupTheory.OrderOfElement
import Mathlib.Algebra.Order.Floor
import Mathlib.Algebra.Order.ToIntervalMod
import Mathlib.Topology.Instances.Real
import Mathlib.Topology.PathConnected

#align_import topology.instances.add_circle from "leanprover-community/mathlib"@"213b0cff7bc5ab6696ee07cceec80829ce42efec"

Expand Down Expand Up @@ -505,6 +506,9 @@ end LinearOrderedField

variable (p : ℝ)

instance pathConnectedSpace : PathConnectedSpace $ AddCircle p :=
(inferInstance : PathConnectedSpace (Quotient _))

/-- The "additive circle" `ℝ ⧸ (ℤ ∙ p)` is compact. -/
instance compactSpace [Fact (0 < p)] : CompactSpace <| AddCircle p := by
rw [← isCompact_univ_iff, ← coe_image_Icc_eq p 0]
Expand Down
23 changes: 23 additions & 0 deletions Mathlib/Topology/PathConnected.lean
Expand Up @@ -1142,6 +1142,29 @@ theorem pathConnectedSpace_iff_univ : PathConnectedSpace X ↔ IsPathConnected (
exact ⟨⟨x⟩, by simpa using h'⟩
#align path_connected_space_iff_univ pathConnectedSpace_iff_univ

theorem isPathConnected_univ [PathConnectedSpace X] : IsPathConnected (univ : Set X) :=
pathConnectedSpace_iff_univ.mp inferInstance

theorem isPathConnected_range [PathConnectedSpace X] {f : X → Y} (hf : Continuous f) :
IsPathConnected (range f) := by
rw [← image_univ]
exact isPathConnected_univ.image hf

theorem Function.Surjective.pathConnectedSpace [PathConnectedSpace X]
{f : X → Y} (hf : Surjective f) (hf' : Continuous f) : PathConnectedSpace Y := by
rw [pathConnectedSpace_iff_univ, ← hf.range_eq]
exact isPathConnected_range hf'

instance Quotient.instPathConnectedSpace {s : Setoid X} [PathConnectedSpace X] :
PathConnectedSpace (Quotient s) :=
(surjective_quotient_mk X).pathConnectedSpace continuous_coinduced_rng

/-- This is a special case of `NormedSpace.path_connected` (and
`TopologicalAddGroup.pathConnectedSpace`). It exists only to simplify dependencies. -/
instance Real.instPathConnectedSpace : PathConnectedSpace ℝ where
Nonempty := inferInstance
Joined := fun x y ↦ ⟨⟨⟨fun (t : I) ↦ (1 - t) * x + t * y, by continuity⟩, by simp, by simp⟩⟩

theorem pathConnectedSpace_iff_eq : PathConnectedSpace X ↔ ∃ x : X, pathComponent x = univ := by
simp [pathConnectedSpace_iff_univ, isPathConnected_iff_eq]
#align path_connected_space_iff_eq pathConnectedSpace_iff_eq
Expand Down

0 comments on commit 560eeb2

Please sign in to comment.