l3lab/ntp-mathlib huggingface dataset:
theorem isPathConnected_iff_pathConnectedSpace : IsPathConnected F ↔ PathConnectedSpace F := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
⊢ IsPathConnected F ↔ PathConnectedSpace ↑F

Next tactic:
rw [isPathConnected_iff]
theorem isPathConnected_iff_pathConnectedSpace : IsPathConnected F ↔ PathConnectedSpace F := by
  rw [isPathConnected_iff]
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
⊢ (Set.Nonempty F ∧ ∀ x ∈ F, ∀ y ∈ F, JoinedIn F x y) ↔ PathConnectedSpace ↑F

Next tactic:
constructor
theorem isPathConnected_iff_pathConnectedSpace : IsPathConnected F ↔ PathConnectedSpace F := by
  rw [isPathConnected_iff]
  constructor
  · 

Proof state:
case mp
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
⊢ (Set.Nonempty F ∧ ∀ x ∈ F, ∀ y ∈ F, JoinedIn F x y) → PathConnectedSpace ↑F

Next tactic:
rintro ⟨⟨x, x_in⟩, h⟩
theorem isPathConnected_iff_pathConnectedSpace : IsPathConnected F ↔ PathConnectedSpace F := by
  rw [isPathConnected_iff]
  constructor
  · rintro ⟨⟨x, x_in⟩, h⟩
    

Proof state:
case mp.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
h : ∀ x ∈ F, ∀ y ∈ F, JoinedIn F x y
x : X
x_in : x ∈ F
⊢ PathConnectedSpace ↑F

Next tactic:
refine' ⟨⟨⟨x, x_in⟩⟩, _⟩
theorem isPathConnected_iff_pathConnectedSpace : IsPathConnected F ↔ PathConnectedSpace F := by
  rw [isPathConnected_iff]
  constructor
  · rintro ⟨⟨x, x_in⟩, h⟩
    refine' ⟨⟨⟨x, x_in⟩⟩, _⟩
    

Proof state:
case mp.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
h : ∀ x ∈ F, ∀ y ∈ F, JoinedIn F x y
x : X
x_in : x ∈ F
⊢ ∀ (x y : ↑F), Joined x y

Next tactic:
rintro ⟨y, y_in⟩ ⟨z, z_in⟩
theorem isPathConnected_iff_pathConnectedSpace : IsPathConnected F ↔ PathConnectedSpace F := by
  rw [isPathConnected_iff]
  constructor
  · rintro ⟨⟨x, x_in⟩, h⟩
    refine' ⟨⟨⟨x, x_in⟩⟩, _⟩
    rintro ⟨y, y_in⟩ ⟨z, z_in⟩
    

Proof state:
case mp.intro.intro.mk.mk
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y✝ z✝ : X
ι : Type u_3
F : Set X
h : ∀ x ∈ F, ∀ y ∈ F, JoinedIn F x y
x : X
x_in : x ∈ F
y : X
y_in : y ∈ F
z : X
z_in : z ∈ F
⊢ Joined { val := y, property := y_in } { val := z, property := z_in }

Next tactic:
have H := h y y_in z z_in
theorem isPathConnected_iff_pathConnectedSpace : IsPathConnected F ↔ PathConnectedSpace F := by
  rw [isPathConnected_iff]
  constructor
  · rintro ⟨⟨x, x_in⟩, h⟩
    refine' ⟨⟨⟨x, x_in⟩⟩, _⟩
    rintro ⟨y, y_in⟩ ⟨z, z_in⟩
    have H := h y y_in z z_in
    

Proof state:
case mp.intro.intro.mk.mk
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y✝ z✝ : X
ι : Type u_3
F : Set X
h : ∀ x ∈ F, ∀ y ∈ F, JoinedIn F x y
x : X
x_in : x ∈ F
y : X
y_in : y ∈ F
z : X
z_in : z ∈ F
H : JoinedIn F y z
⊢ Joined { val := y, property := y_in } { val := z, property := z_in }

Next tactic:
rwa [joinedIn_iff_joined y_in z_in] at H
theorem isPathConnected_iff_pathConnectedSpace : IsPathConnected F ↔ PathConnectedSpace F := by
  rw [isPathConnected_iff]
  constructor
  · rintro ⟨⟨x, x_in⟩, h⟩
    refine' ⟨⟨⟨x, x_in⟩⟩, _⟩
    rintro ⟨y, y_in⟩ ⟨z, z_in⟩
    have H := h y y_in z z_in
    rwa [joinedIn_iff_joined y_in z_in] at H
  · 

Proof state:
case mpr
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
⊢ PathConnectedSpace ↑F → Set.Nonempty F ∧ ∀ x ∈ F, ∀ y ∈ F, JoinedIn F x y

Next tactic:
rintro ⟨⟨x, x_in⟩, H⟩
theorem isPathConnected_iff_pathConnectedSpace : IsPathConnected F ↔ PathConnectedSpace F := by
  rw [isPathConnected_iff]
  constructor
  · rintro ⟨⟨x, x_in⟩, h⟩
    refine' ⟨⟨⟨x, x_in⟩⟩, _⟩
    rintro ⟨y, y_in⟩ ⟨z, z_in⟩
    have H := h y y_in z z_in
    rwa [joinedIn_iff_joined y_in z_in] at H
  · rintro ⟨⟨x, x_in⟩, H⟩
    

Proof state:
case mpr.mk.intro.mk
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
H : ∀ (x y : ↑F), Joined x y
x : X
x_in : x ∈ F
⊢ Set.Nonempty F ∧ ∀ x ∈ F, ∀ y ∈ F, JoinedIn F x y

Next tactic:
refine' ⟨⟨x, x_in⟩, fun y y_in z z_in => _⟩
theorem isPathConnected_iff_pathConnectedSpace : IsPathConnected F ↔ PathConnectedSpace F := by
  rw [isPathConnected_iff]
  constructor
  · rintro ⟨⟨x, x_in⟩, h⟩
    refine' ⟨⟨⟨x, x_in⟩⟩, _⟩
    rintro ⟨y, y_in⟩ ⟨z, z_in⟩
    have H := h y y_in z z_in
    rwa [joinedIn_iff_joined y_in z_in] at H
  · rintro ⟨⟨x, x_in⟩, H⟩
    refine' ⟨⟨x, x_in⟩, fun y y_in z z_in => _⟩
    

Proof state:
case mpr.mk.intro.mk
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y✝ z✝ : X
ι : Type u_3
F : Set X
H : ∀ (x y : ↑F), Joined x y
x : X
x_in : x ∈ F
y : X
y_in : y ∈ F
z : X
z_in : z ∈ F
⊢ JoinedIn F y z

Next tactic:
rw [joinedIn_iff_joined y_in z_in]
theorem isPathConnected_iff_pathConnectedSpace : IsPathConnected F ↔ PathConnectedSpace F := by
  rw [isPathConnected_iff]
  constructor
  · rintro ⟨⟨x, x_in⟩, h⟩
    refine' ⟨⟨⟨x, x_in⟩⟩, _⟩
    rintro ⟨y, y_in⟩ ⟨z, z_in⟩
    have H := h y y_in z z_in
    rwa [joinedIn_iff_joined y_in z_in] at H
  · rintro ⟨⟨x, x_in⟩, H⟩
    refine' ⟨⟨x, x_in⟩, fun y y_in z z_in => _⟩
    rw [joinedIn_iff_joined y_in z_in]
    

Proof state:
case mpr.mk.intro.mk
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y✝ z✝ : X
ι : Type u_3
F : Set X
H : ∀ (x y : ↑F), Joined x y
x : X
x_in : x ∈ F
y : X
y_in : y ∈ F
z : X
z_in : z ∈ F
⊢ Joined { val := y, property := y_in } { val := z, property := z_in }

Next tactic:
apply H
theorem pathConnectedSpace_iff_univ : PathConnectedSpace X ↔ IsPathConnected (univ : Set X) := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
⊢ PathConnectedSpace X ↔ IsPathConnected univ

Next tactic:
constructor
theorem pathConnectedSpace_iff_univ : PathConnectedSpace X ↔ IsPathConnected (univ : Set X) := by
  constructor
  · 

Proof state:
case mp
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
⊢ PathConnectedSpace X → IsPathConnected univ

Next tactic:
intro h
theorem pathConnectedSpace_iff_univ : PathConnectedSpace X ↔ IsPathConnected (univ : Set X) := by
  constructor
  · intro h
    

Proof state:
case mp
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
h : PathConnectedSpace X
⊢ IsPathConnected univ

Next tactic:
haveI := @PathConnectedSpace.nonempty X _ _
theorem pathConnectedSpace_iff_univ : PathConnectedSpace X ↔ IsPathConnected (univ : Set X) := by
  constructor
  · intro h
    haveI := @PathConnectedSpace.nonempty X _ _
    

Proof state:
case mp
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
h : PathConnectedSpace X
this : Nonempty X
⊢ IsPathConnected univ

Next tactic:
inhabit X
theorem pathConnectedSpace_iff_univ : PathConnectedSpace X ↔ IsPathConnected (univ : Set X) := by
  constructor
  · intro h
    haveI := @PathConnectedSpace.nonempty X _ _
    inhabit X
    

Proof state:
case mp
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
h : PathConnectedSpace X
this : Nonempty X
inhabited_h : Inhabited X
⊢ IsPathConnected univ

Next tactic:
refine' ⟨default, mem_univ _, _⟩
theorem pathConnectedSpace_iff_univ : PathConnectedSpace X ↔ IsPathConnected (univ : Set X) := by
  constructor
  · intro h
    haveI := @PathConnectedSpace.nonempty X _ _
    inhabit X
    refine' ⟨default, mem_univ _, _⟩
    

Proof state:
case mp
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
h : PathConnectedSpace X
this : Nonempty X
inhabited_h : Inhabited X
⊢ ∀ {y : X}, y ∈ univ → JoinedIn univ default y

Next tactic:
intros y _hy
theorem pathConnectedSpace_iff_univ : PathConnectedSpace X ↔ IsPathConnected (univ : Set X) := by
  constructor
  · intro h
    haveI := @PathConnectedSpace.nonempty X _ _
    inhabit X
    refine' ⟨default, mem_univ _, _⟩
    intros y _hy
    

Proof state:
case mp
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y✝ z : X
ι : Type u_3
F : Set X
h : PathConnectedSpace X
this : Nonempty X
inhabited_h : Inhabited X
y : X
_hy : y ∈ univ
⊢ JoinedIn univ default y

Next tactic:
simpa using PathConnectedSpace.joined default y
theorem pathConnectedSpace_iff_univ : PathConnectedSpace X ↔ IsPathConnected (univ : Set X) := by
  constructor
  · intro h
    haveI := @PathConnectedSpace.nonempty X _ _
    inhabit X
    refine' ⟨default, mem_univ _, _⟩
    intros y _hy
    simpa using PathConnectedSpace.joined default y
  · 

Proof state:
case mpr
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
⊢ IsPathConnected univ → PathConnectedSpace X

Next tactic:
intro h
theorem pathConnectedSpace_iff_univ : PathConnectedSpace X ↔ IsPathConnected (univ : Set X) := by
  constructor
  · intro h
    haveI := @PathConnectedSpace.nonempty X _ _
    inhabit X
    refine' ⟨default, mem_univ _, _⟩
    intros y _hy
    simpa using PathConnectedSpace.joined default y
  · intro h
    

Proof state:
case mpr
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
h : IsPathConnected univ
⊢ PathConnectedSpace X

Next tactic:
have h' := h.joinedIn
theorem pathConnectedSpace_iff_univ : PathConnectedSpace X ↔ IsPathConnected (univ : Set X) := by
  constructor
  · intro h
    haveI := @PathConnectedSpace.nonempty X _ _
    inhabit X
    refine' ⟨default, mem_univ _, _⟩
    intros y _hy
    simpa using PathConnectedSpace.joined default y
  · intro h
    have h' := h.joinedIn
    

Proof state:
case mpr
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
h : IsPathConnected univ
h' : ∀ x ∈ univ, ∀ y ∈ univ, JoinedIn univ x y
⊢ PathConnectedSpace X

Next tactic:
cases' h with x h
theorem pathConnectedSpace_iff_univ : PathConnectedSpace X ↔ IsPathConnected (univ : Set X) := by
  constructor
  · intro h
    haveI := @PathConnectedSpace.nonempty X _ _
    inhabit X
    refine' ⟨default, mem_univ _, _⟩
    intros y _hy
    simpa using PathConnectedSpace.joined default y
  · intro h
    have h' := h.joinedIn
    cases' h with x h
    

Proof state:
case mpr.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
h' : ∀ x ∈ univ, ∀ y ∈ univ, JoinedIn univ x y
x : X
h : x ∈ univ ∧ ∀ {y : X}, y ∈ univ → JoinedIn univ x y
⊢ PathConnectedSpace X

Next tactic:
exact ⟨⟨x⟩, by simpa using h'⟩
theorem pathConnectedSpace_iff_univ : PathConnectedSpace X ↔ IsPathConnected (univ : Set X) := by
  constructor
  · intro h
    haveI := @PathConnectedSpace.nonempty X _ _
    inhabit X
    refine' ⟨default, mem_univ _, _⟩
    intros y _hy
    simpa using PathConnectedSpace.joined default y
  · intro h
    have h' := h.joinedIn
    cases' h with x h
    exact ⟨⟨x⟩, by 

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
h' : ∀ x ∈ univ, ∀ y ∈ univ, JoinedIn univ x y
x : X
h : x ∈ univ ∧ ∀ {y : X}, y ∈ univ → JoinedIn univ x y
⊢ ∀ (x y : X), Joined x y

Next tactic:
simpa using h'
theorem isPathConnected_range [PathConnectedSpace X] {f : X → Y} (hf : Continuous f) :
    IsPathConnected (range f) := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
f : X → Y
hf : Continuous f
⊢ IsPathConnected (range f)

Next tactic:
rw [← image_univ]
theorem isPathConnected_range [PathConnectedSpace X] {f : X → Y} (hf : Continuous f) :
    IsPathConnected (range f) := by
  rw [← image_univ]
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
f : X → Y
hf : Continuous f
⊢ IsPathConnected (f '' univ)

Next tactic:
exact isPathConnected_univ.image hf
theorem Function.Surjective.pathConnectedSpace [PathConnectedSpace X]
    {f : X → Y} (hf : Surjective f) (hf' : Continuous f) : PathConnectedSpace Y := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
f : X → Y
hf : Surjective f
hf' : Continuous f
⊢ PathConnectedSpace Y

Next tactic:
rw [pathConnectedSpace_iff_univ, ← hf.range_eq]
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]
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
f : X → Y
hf : Surjective f
hf' : Continuous f
⊢ IsPathConnected (range f)

Next tactic:
exact isPathConnected_range hf'
/-- This is a special case of `NormedSpace.instPathConnectedSpace` (and
`TopologicalAddGroup.pathConnectedSpace`). It exists only to simplify dependencies. -/
instance Real.instPathConnectedSpace : PathConnectedSpace ℝ where
  joined x y := ⟨⟨⟨fun (t : I) ↦ (1 - t) * x + t * y, by 

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y✝ z : X
ι : Type u_3
F : Set X
x y : ℝ
⊢ Continuous fun t => (1 - ↑t) * x + ↑t * y

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

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y✝ z : X
ι : Type u_3
F : Set X
x y : ℝ
⊢ ContinuousMap.toFun (ContinuousMap.mk fun t => (1 - ↑t) * x + ↑t * y) 0 = x

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

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y✝ z : X
ι : Type u_3
F : Set X
x y : ℝ
⊢ ContinuousMap.toFun (ContinuousMap.mk fun t => (1 - ↑t) * x + ↑t * y) 1 = y

Next tactic:
simp
theorem pathConnectedSpace_iff_eq : PathConnectedSpace X ↔ ∃ x : X, pathComponent x = univ := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
⊢ PathConnectedSpace X ↔ ∃ x, pathComponent x = univ

Next tactic:
simp [pathConnectedSpace_iff_univ, isPathConnected_iff_eq]
instance (priority := 100) PathConnectedSpace.connectedSpace [PathConnectedSpace X] :
    ConnectedSpace X := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
⊢ ConnectedSpace X

Next tactic:
rw [connectedSpace_iff_connectedComponent]
instance (priority := 100) PathConnectedSpace.connectedSpace [PathConnectedSpace X] :
    ConnectedSpace X := by
  rw [connectedSpace_iff_connectedComponent]
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
⊢ ∃ x, connectedComponent x = univ

Next tactic:
rcases isPathConnected_iff_eq.mp (pathConnectedSpace_iff_univ.mp ‹_›) with ⟨x, _x_in, hx⟩
instance (priority := 100) PathConnectedSpace.connectedSpace [PathConnectedSpace X] :
    ConnectedSpace X := by
  rw [connectedSpace_iff_connectedComponent]
  rcases isPathConnected_iff_eq.mp (pathConnectedSpace_iff_univ.mp ‹_›) with ⟨x, _x_in, hx⟩
  

Proof state:
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
x : X
_x_in : x ∈ univ
hx : pathComponentIn x univ = univ
⊢ ∃ x, connectedComponent x = univ

Next tactic:
use x
instance (priority := 100) PathConnectedSpace.connectedSpace [PathConnectedSpace X] :
    ConnectedSpace X := by
  rw [connectedSpace_iff_connectedComponent]
  rcases isPathConnected_iff_eq.mp (pathConnectedSpace_iff_univ.mp ‹_›) with ⟨x, _x_in, hx⟩
  use x
  

Proof state:
case h
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
x : X
_x_in : x ∈ univ
hx : pathComponentIn x univ = univ
⊢ connectedComponent x = univ

Next tactic:
rw [← univ_subset_iff]
instance (priority := 100) PathConnectedSpace.connectedSpace [PathConnectedSpace X] :
    ConnectedSpace X := by
  rw [connectedSpace_iff_connectedComponent]
  rcases isPathConnected_iff_eq.mp (pathConnectedSpace_iff_univ.mp ‹_›) with ⟨x, _x_in, hx⟩
  use x
  rw [← univ_subset_iff]
  

Proof state:
case h
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
x : X
_x_in : x ∈ univ
hx : pathComponentIn x univ = univ
⊢ univ ⊆ connectedComponent x

Next tactic:
exact (by simpa using hx : pathComponent x = univ) ▸ pathComponent_subset_component x
instance (priority := 100) PathConnectedSpace.connectedSpace [PathConnectedSpace X] :
    ConnectedSpace X := by
  rw [connectedSpace_iff_connectedComponent]
  rcases isPathConnected_iff_eq.mp (pathConnectedSpace_iff_univ.mp ‹_›) with ⟨x, _x_in, hx⟩
  use x
  rw [← univ_subset_iff]
  exact (by 

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
x : X
_x_in : x ∈ univ
hx : pathComponentIn x univ = univ
⊢ pathComponent x = univ

Next tactic:
simpa using hx
theorem IsPathConnected.isConnected (hF : IsPathConnected F) : IsConnected F := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
hF : IsPathConnected F
⊢ IsConnected F

Next tactic:
rw [isConnected_iff_connectedSpace]
theorem IsPathConnected.isConnected (hF : IsPathConnected F) : IsConnected F := by
  rw [isConnected_iff_connectedSpace]
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
hF : IsPathConnected F
⊢ ConnectedSpace ↑F

Next tactic:
rw [isPathConnected_iff_pathConnectedSpace] at hF
theorem IsPathConnected.isConnected (hF : IsPathConnected F) : IsConnected F := by
  rw [isConnected_iff_connectedSpace]
  rw [isPathConnected_iff_pathConnectedSpace] at hF
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
hF : PathConnectedSpace ↑F
⊢ ConnectedSpace ↑F

Next tactic:
exact @PathConnectedSpace.connectedSpace _ _ hF
theorem exists_path_through_family {n : ℕ} (p : Fin (n + 1) → X) :
    ∃ γ : Path (p 0) (p n), ∀ i, p i ∈ range γ := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
n : ℕ
p : Fin (n + 1) → X
⊢ ∃ γ, ∀ (i : Fin (n + 1)), p i ∈ range ⇑γ

Next tactic:
have : IsPathConnected (univ : Set X) := pathConnectedSpace_iff_univ.mp (by infer_instance)
theorem exists_path_through_family {n : ℕ} (p : Fin (n + 1) → X) :
    ∃ γ : Path (p 0) (p n), ∀ i, p i ∈ range γ := by
  have : IsPathConnected (univ : Set X) := pathConnectedSpace_iff_univ.mp (by 

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
n : ℕ
p : Fin (n + 1) → X
⊢ PathConnectedSpace X

Next tactic:
infer_instance
theorem exists_path_through_family {n : ℕ} (p : Fin (n + 1) → X) :
    ∃ γ : Path (p 0) (p n), ∀ i, p i ∈ range γ := by
  have : IsPathConnected (univ : Set X) := pathConnectedSpace_iff_univ.mp (by infer_instance)
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
n : ℕ
p : Fin (n + 1) → X
this : IsPathConnected univ
⊢ ∃ γ, ∀ (i : Fin (n + 1)), p i ∈ range ⇑γ

Next tactic:
rcases this.exists_path_through_family p fun _i => True.intro with ⟨γ, -, h⟩
theorem exists_path_through_family {n : ℕ} (p : Fin (n + 1) → X) :
    ∃ γ : Path (p 0) (p n), ∀ i, p i ∈ range γ := by
  have : IsPathConnected (univ : Set X) := pathConnectedSpace_iff_univ.mp (by infer_instance)
  rcases this.exists_path_through_family p fun _i => True.intro with ⟨γ, -, h⟩
  

Proof state:
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
n : ℕ
p : Fin (n + 1) → X
this : IsPathConnected univ
γ : Path (p 0) (p ↑n)
h : ∀ (i : Fin (n + 1)), p i ∈ range ⇑γ
⊢ ∃ γ, ∀ (i : Fin (n + 1)), p i ∈ range ⇑γ

Next tactic:
exact ⟨γ, h⟩
theorem exists_path_through_family' {n : ℕ} (p : Fin (n + 1) → X) :
    ∃ (γ : Path (p 0) (p n)) (t : Fin (n + 1) → I), ∀ i, γ (t i) = p i := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
n : ℕ
p : Fin (n + 1) → X
⊢ ∃ γ t, ∀ (i : Fin (n + 1)), γ (t i) = p i

Next tactic:
have : IsPathConnected (univ : Set X) := pathConnectedSpace_iff_univ.mp (by infer_instance)
theorem exists_path_through_family' {n : ℕ} (p : Fin (n + 1) → X) :
    ∃ (γ : Path (p 0) (p n)) (t : Fin (n + 1) → I), ∀ i, γ (t i) = p i := by
  have : IsPathConnected (univ : Set X) := pathConnectedSpace_iff_univ.mp (by 

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
n : ℕ
p : Fin (n + 1) → X
⊢ PathConnectedSpace X

Next tactic:
infer_instance
theorem exists_path_through_family' {n : ℕ} (p : Fin (n + 1) → X) :
    ∃ (γ : Path (p 0) (p n)) (t : Fin (n + 1) → I), ∀ i, γ (t i) = p i := by
  have : IsPathConnected (univ : Set X) := pathConnectedSpace_iff_univ.mp (by infer_instance)
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
n : ℕ
p : Fin (n + 1) → X
this : IsPathConnected univ
⊢ ∃ γ t, ∀ (i : Fin (n + 1)), γ (t i) = p i

Next tactic:
rcases this.exists_path_through_family' p fun _i => True.intro with ⟨γ, t, -, h⟩
theorem exists_path_through_family' {n : ℕ} (p : Fin (n + 1) → X) :
    ∃ (γ : Path (p 0) (p n)) (t : Fin (n + 1) → I), ∀ i, γ (t i) = p i := by
  have : IsPathConnected (univ : Set X) := pathConnectedSpace_iff_univ.mp (by infer_instance)
  rcases this.exists_path_through_family' p fun _i => True.intro with ⟨γ, t, -, h⟩
  

Proof state:
case intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
inst✝ : PathConnectedSpace X
n : ℕ
p : Fin (n + 1) → X
this : IsPathConnected univ
γ : Path (p 0) (p ↑n)
t : Fin (n + 1) → ↑I
h : ∀ (i : Fin (n + 1)), γ (t i) = p i
⊢ ∃ γ t, ∀ (i : Fin (n + 1)), γ (t i) = p i

Next tactic:
exact ⟨γ, t, h⟩
theorem locPathConnected_of_bases {p : ι → Prop} {s : X → ι → Set X}
    (h : ∀ x, (𝓝 x).HasBasis p (s x)) (h' : ∀ x i, p i → IsPathConnected (s x i)) :
    LocPathConnectedSpace X := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
p : ι → Prop
s : X → ι → Set X
h : ∀ (x : X), HasBasis (𝓝 x) p (s x)
h' : ∀ (x : X) (i : ι), p i → IsPathConnected (s x i)
⊢ LocPathConnectedSpace X

Next tactic:
constructor