l3lab/ntp-mathlib huggingface dataset:
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
  constructor
  

Proof state:
case path_connected_basis
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)
⊢ ∀ (x : X), HasBasis (𝓝 x) (fun s => s ∈ 𝓝 x ∧ IsPathConnected s) id

Next tactic:
intro x
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
  constructor
  intro x
  

Proof state:
case path_connected_basis
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)
x : X
⊢ HasBasis (𝓝 x) (fun s => s ∈ 𝓝 x ∧ IsPathConnected s) id

Next tactic:
apply (h x).to_hasBasis
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
  constructor
  intro x
  apply (h x).to_hasBasis
  · 

Proof state:
case path_connected_basis.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
p : ι → Prop
s : X → ι → Set X
h : ∀ (x : X), HasBasis (𝓝 x) p (s x)
h' : ∀ (x : X) (i : ι), p i → IsPathConnected (s x i)
x : X
⊢ ∀ (i : ι), p i → ∃ i', (i' ∈ 𝓝 x ∧ IsPathConnected i') ∧ id i' ⊆ s x i

Next tactic:
intro i pi
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
  constructor
  intro x
  apply (h x).to_hasBasis
  · intro i pi
    

Proof state:
case path_connected_basis.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
p : ι → Prop
s : X → ι → Set X
h : ∀ (x : X), HasBasis (𝓝 x) p (s x)
h' : ∀ (x : X) (i : ι), p i → IsPathConnected (s x i)
x : X
i : ι
pi : p i
⊢ ∃ i', (i' ∈ 𝓝 x ∧ IsPathConnected i') ∧ id i' ⊆ s x i

Next tactic:
exact ⟨s x i, ⟨(h x).mem_of_mem pi, h' x i pi⟩, by rfl⟩
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
  constructor
  intro x
  apply (h x).to_hasBasis
  · intro i pi
    exact ⟨s x i, ⟨(h x).mem_of_mem pi, h' x i pi⟩, 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)
x : X
i : ι
pi : p i
⊢ id (s x i) ⊆ s x i

Next tactic:
rfl
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
  constructor
  intro x
  apply (h x).to_hasBasis
  · intro i pi
    exact ⟨s x i, ⟨(h x).mem_of_mem pi, h' x i pi⟩, by rfl⟩
  · 

Proof state:
case path_connected_basis.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
p : ι → Prop
s : X → ι → Set X
h : ∀ (x : X), HasBasis (𝓝 x) p (s x)
h' : ∀ (x : X) (i : ι), p i → IsPathConnected (s x i)
x : X
⊢ ∀ (i' : Set X), i' ∈ 𝓝 x ∧ IsPathConnected i' → ∃ i, p i ∧ s x i ⊆ id i'

Next tactic:
rintro U ⟨U_in, _hU⟩
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
  constructor
  intro x
  apply (h x).to_hasBasis
  · intro i pi
    exact ⟨s x i, ⟨(h x).mem_of_mem pi, h' x i pi⟩, by rfl⟩
  · rintro U ⟨U_in, _hU⟩
    

Proof state:
case path_connected_basis.h'.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
p : ι → Prop
s : X → ι → Set X
h : ∀ (x : X), HasBasis (𝓝 x) p (s x)
h' : ∀ (x : X) (i : ι), p i → IsPathConnected (s x i)
x : X
U : Set X
U_in : U ∈ 𝓝 x
_hU : IsPathConnected U
⊢ ∃ i, p i ∧ s x i ⊆ id U

Next tactic:
rcases (h x).mem_iff.mp U_in with ⟨i, pi, hi⟩
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
  constructor
  intro x
  apply (h x).to_hasBasis
  · intro i pi
    exact ⟨s x i, ⟨(h x).mem_of_mem pi, h' x i pi⟩, by rfl⟩
  · rintro U ⟨U_in, _hU⟩
    rcases (h x).mem_iff.mp U_in with ⟨i, pi, hi⟩
    

Proof state:
case path_connected_basis.h'.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
p : ι → Prop
s : X → ι → Set X
h : ∀ (x : X), HasBasis (𝓝 x) p (s x)
h' : ∀ (x : X) (i : ι), p i → IsPathConnected (s x i)
x : X
U : Set X
U_in : U ∈ 𝓝 x
_hU : IsPathConnected U
i : ι
pi : p i
hi : s x i ⊆ U
⊢ ∃ i, p i ∧ s x i ⊆ id U

Next tactic:
tauto
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    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✝ : LocPathConnectedSpace X
⊢ PathConnectedSpace X ↔ ConnectedSpace X

Next tactic:
constructor
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace 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
inst✝ : LocPathConnectedSpace X
⊢ PathConnectedSpace X → ConnectedSpace X

Next tactic:
intro h
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace 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
inst✝ : LocPathConnectedSpace X
h : PathConnectedSpace X
⊢ ConnectedSpace X

Next tactic:
infer_instance
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · 

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
inst✝ : LocPathConnectedSpace X
⊢ ConnectedSpace X → PathConnectedSpace X

Next tactic:
intro hX
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · intro hX
    

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
inst✝ : LocPathConnectedSpace X
hX : ConnectedSpace X
⊢ PathConnectedSpace X

Next tactic:
rw [pathConnectedSpace_iff_eq]
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · intro hX
    rw [pathConnectedSpace_iff_eq]
    

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
inst✝ : LocPathConnectedSpace X
hX : ConnectedSpace X
⊢ ∃ x, pathComponent x = univ

Next tactic:
use Classical.arbitrary X
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · intro hX
    rw [pathConnectedSpace_iff_eq]
    use Classical.arbitrary 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✝ : LocPathConnectedSpace X
hX : ConnectedSpace X
⊢ pathComponent (Classical.arbitrary X) = univ

Next tactic:
refine' IsClopen.eq_univ ⟨_, _⟩ (by simp)
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · intro hX
    rw [pathConnectedSpace_iff_eq]
    use Classical.arbitrary X
    refine' IsClopen.eq_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
inst✝ : LocPathConnectedSpace X
hX : ConnectedSpace X
⊢ Set.Nonempty (pathComponent (Classical.arbitrary X))

Next tactic:
simp
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · intro hX
    rw [pathConnectedSpace_iff_eq]
    use Classical.arbitrary X
    refine' IsClopen.eq_univ ⟨_, _⟩ (by simp)
    · 

Proof state:
case h.refine'_1
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✝ : LocPathConnectedSpace X
hX : ConnectedSpace X
⊢ IsOpen (pathComponent (Classical.arbitrary X))

Next tactic:
rw [isOpen_iff_mem_nhds]
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · intro hX
    rw [pathConnectedSpace_iff_eq]
    use Classical.arbitrary X
    refine' IsClopen.eq_univ ⟨_, _⟩ (by simp)
    · rw [isOpen_iff_mem_nhds]
      

Proof state:
case h.refine'_1
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✝ : LocPathConnectedSpace X
hX : ConnectedSpace X
⊢ ∀ a ∈ pathComponent (Classical.arbitrary X), pathComponent (Classical.arbitrary X) ∈ 𝓝 a

Next tactic:
intro y y_in
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · intro hX
    rw [pathConnectedSpace_iff_eq]
    use Classical.arbitrary X
    refine' IsClopen.eq_univ ⟨_, _⟩ (by simp)
    · rw [isOpen_iff_mem_nhds]
      intro y y_in
      

Proof state:
case h.refine'_1
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✝ : LocPathConnectedSpace X
hX : ConnectedSpace X
y : X
y_in : y ∈ pathComponent (Classical.arbitrary X)
⊢ pathComponent (Classical.arbitrary X) ∈ 𝓝 y

Next tactic:
rcases (path_connected_basis y).ex_mem with ⟨U, ⟨U_in, hU⟩⟩
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · intro hX
    rw [pathConnectedSpace_iff_eq]
    use Classical.arbitrary X
    refine' IsClopen.eq_univ ⟨_, _⟩ (by simp)
    · rw [isOpen_iff_mem_nhds]
      intro y y_in
      rcases (path_connected_basis y).ex_mem with ⟨U, ⟨U_in, hU⟩⟩
      

Proof state:
case h.refine'_1.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✝ : LocPathConnectedSpace X
hX : ConnectedSpace X
y : X
y_in : y ∈ pathComponent (Classical.arbitrary X)
U : Set X
U_in : U ∈ 𝓝 y
hU : IsPathConnected U
⊢ pathComponent (Classical.arbitrary X) ∈ 𝓝 y

Next tactic:
apply mem_of_superset U_in
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · intro hX
    rw [pathConnectedSpace_iff_eq]
    use Classical.arbitrary X
    refine' IsClopen.eq_univ ⟨_, _⟩ (by simp)
    · rw [isOpen_iff_mem_nhds]
      intro y y_in
      rcases (path_connected_basis y).ex_mem with ⟨U, ⟨U_in, hU⟩⟩
      apply mem_of_superset U_in
      

Proof state:
case h.refine'_1.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✝ : LocPathConnectedSpace X
hX : ConnectedSpace X
y : X
y_in : y ∈ pathComponent (Classical.arbitrary X)
U : Set X
U_in : U ∈ 𝓝 y
hU : IsPathConnected U
⊢ U ⊆ pathComponent (Classical.arbitrary X)

Next tactic:
rw [← pathComponent_congr y_in]
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · intro hX
    rw [pathConnectedSpace_iff_eq]
    use Classical.arbitrary X
    refine' IsClopen.eq_univ ⟨_, _⟩ (by simp)
    · rw [isOpen_iff_mem_nhds]
      intro y y_in
      rcases (path_connected_basis y).ex_mem with ⟨U, ⟨U_in, hU⟩⟩
      apply mem_of_superset U_in
      rw [← pathComponent_congr y_in]
      

Proof state:
case h.refine'_1.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✝ : LocPathConnectedSpace X
hX : ConnectedSpace X
y : X
y_in : y ∈ pathComponent (Classical.arbitrary X)
U : Set X
U_in : U ∈ 𝓝 y
hU : IsPathConnected U
⊢ U ⊆ pathComponent y

Next tactic:
exact hU.subset_pathComponent (mem_of_mem_nhds U_in)
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · intro hX
    rw [pathConnectedSpace_iff_eq]
    use Classical.arbitrary X
    refine' IsClopen.eq_univ ⟨_, _⟩ (by simp)
    · rw [isOpen_iff_mem_nhds]
      intro y y_in
      rcases (path_connected_basis y).ex_mem with ⟨U, ⟨U_in, hU⟩⟩
      apply mem_of_superset U_in
      rw [← pathComponent_congr y_in]
      exact hU.subset_pathComponent (mem_of_mem_nhds U_in)
    · 

Proof state:
case h.refine'_2
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✝ : LocPathConnectedSpace X
hX : ConnectedSpace X
⊢ IsClosed (pathComponent (Classical.arbitrary X))

Next tactic:
rw [isClosed_iff_nhds]
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · intro hX
    rw [pathConnectedSpace_iff_eq]
    use Classical.arbitrary X
    refine' IsClopen.eq_univ ⟨_, _⟩ (by simp)
    · rw [isOpen_iff_mem_nhds]
      intro y y_in
      rcases (path_connected_basis y).ex_mem with ⟨U, ⟨U_in, hU⟩⟩
      apply mem_of_superset U_in
      rw [← pathComponent_congr y_in]
      exact hU.subset_pathComponent (mem_of_mem_nhds U_in)
    · rw [isClosed_iff_nhds]
      

Proof state:
case h.refine'_2
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✝ : LocPathConnectedSpace X
hX : ConnectedSpace X
⊢ ∀ (x : X),
    (∀ U ∈ 𝓝 x, Set.Nonempty (U ∩ pathComponent (Classical.arbitrary X))) → x ∈ pathComponent (Classical.arbitrary X)

Next tactic:
intro y H
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · intro hX
    rw [pathConnectedSpace_iff_eq]
    use Classical.arbitrary X
    refine' IsClopen.eq_univ ⟨_, _⟩ (by simp)
    · rw [isOpen_iff_mem_nhds]
      intro y y_in
      rcases (path_connected_basis y).ex_mem with ⟨U, ⟨U_in, hU⟩⟩
      apply mem_of_superset U_in
      rw [← pathComponent_congr y_in]
      exact hU.subset_pathComponent (mem_of_mem_nhds U_in)
    · rw [isClosed_iff_nhds]
      intro y H
      

Proof state:
case h.refine'_2
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✝ : LocPathConnectedSpace X
hX : ConnectedSpace X
y : X
H : ∀ U ∈ 𝓝 y, Set.Nonempty (U ∩ pathComponent (Classical.arbitrary X))
⊢ y ∈ pathComponent (Classical.arbitrary X)

Next tactic:
rcases (path_connected_basis y).ex_mem with ⟨U, ⟨U_in, hU⟩⟩
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · intro hX
    rw [pathConnectedSpace_iff_eq]
    use Classical.arbitrary X
    refine' IsClopen.eq_univ ⟨_, _⟩ (by simp)
    · rw [isOpen_iff_mem_nhds]
      intro y y_in
      rcases (path_connected_basis y).ex_mem with ⟨U, ⟨U_in, hU⟩⟩
      apply mem_of_superset U_in
      rw [← pathComponent_congr y_in]
      exact hU.subset_pathComponent (mem_of_mem_nhds U_in)
    · rw [isClosed_iff_nhds]
      intro y H
      rcases (path_connected_basis y).ex_mem with ⟨U, ⟨U_in, hU⟩⟩
      

Proof state:
case h.refine'_2.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✝ : LocPathConnectedSpace X
hX : ConnectedSpace X
y : X
H : ∀ U ∈ 𝓝 y, Set.Nonempty (U ∩ pathComponent (Classical.arbitrary X))
U : Set X
U_in : U ∈ 𝓝 y
hU : IsPathConnected U
⊢ y ∈ pathComponent (Classical.arbitrary X)

Next tactic:
rcases H U U_in with ⟨z, hz, hz'⟩
theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X := by
  constructor
  · intro h
    infer_instance
  · intro hX
    rw [pathConnectedSpace_iff_eq]
    use Classical.arbitrary X
    refine' IsClopen.eq_univ ⟨_, _⟩ (by simp)
    · rw [isOpen_iff_mem_nhds]
      intro y y_in
      rcases (path_connected_basis y).ex_mem with ⟨U, ⟨U_in, hU⟩⟩
      apply mem_of_superset U_in
      rw [← pathComponent_congr y_in]
      exact hU.subset_pathComponent (mem_of_mem_nhds U_in)
    · rw [isClosed_iff_nhds]
      intro y H
      rcases (path_connected_basis y).ex_mem with ⟨U, ⟨U_in, hU⟩⟩
      rcases H U U_in with ⟨z, hz, hz'⟩
      

Proof state:
case h.refine'_2.intro.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✝ : LocPathConnectedSpace X
hX : ConnectedSpace X
y : X
H : ∀ U ∈ 𝓝 y, Set.Nonempty (U ∩ pathComponent (Classical.arbitrary X))
U : Set X
U_in : U ∈ 𝓝 y
hU : IsPathConnected U
z : X
hz : z ∈ U
hz' : z ∈ pathComponent (Classical.arbitrary X)
⊢ y ∈ pathComponent (Classical.arbitrary X)

Next tactic:
exact (hU.joinedIn z hz y <| mem_of_mem_nhds U_in).joined.mem_pathComponent hz'
theorem locPathConnected_of_isOpen [LocPathConnectedSpace X] {U : Set X} (h : IsOpen U) :
    LocPathConnectedSpace U :=
  ⟨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✝ : LocPathConnectedSpace X
U : Set X
h : IsOpen U
⊢ ∀ (x : ↑U), HasBasis (𝓝 x) (fun s => s ∈ 𝓝 x ∧ IsPathConnected s) id

Next tactic:
rintro ⟨x, x_in⟩
theorem locPathConnected_of_isOpen [LocPathConnectedSpace X] {U : Set X} (h : IsOpen U) :
    LocPathConnectedSpace U :=
  ⟨by
    rintro ⟨x, x_in⟩
    

Proof state:
case 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
inst✝ : LocPathConnectedSpace X
U : Set X
h : IsOpen U
x : X
x_in : x ∈ U
⊢ HasBasis (𝓝 { val := x, property := x_in }) (fun s => s ∈ 𝓝 { val := x, property := x_in } ∧ IsPathConnected s) id

Next tactic:
rw [nhds_subtype_eq_comap]
theorem locPathConnected_of_isOpen [LocPathConnectedSpace X] {U : Set X} (h : IsOpen U) :
    LocPathConnectedSpace U :=
  ⟨by
    rintro ⟨x, x_in⟩
    rw [nhds_subtype_eq_comap]
    

Proof state:
case 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
inst✝ : LocPathConnectedSpace X
U : Set X
h : IsOpen U
x : X
x_in : x ∈ U
⊢ HasBasis (comap Subtype.val (𝓝 x)) (fun s => s ∈ comap Subtype.val (𝓝 x) ∧ IsPathConnected s) id

Next tactic:
constructor
theorem locPathConnected_of_isOpen [LocPathConnectedSpace X] {U : Set X} (h : IsOpen U) :
    LocPathConnectedSpace U :=
  ⟨by
    rintro ⟨x, x_in⟩
    rw [nhds_subtype_eq_comap]
    constructor
    

Proof state:
case mk.mem_iff'
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✝ : LocPathConnectedSpace X
U : Set X
h : IsOpen U
x : X
x_in : x ∈ U
⊢ ∀ (t : Set ↑U), t ∈ comap Subtype.val (𝓝 x) ↔ ∃ i, (i ∈ comap Subtype.val (𝓝 x) ∧ IsPathConnected i) ∧ id i ⊆ t

Next tactic:
intro V
theorem locPathConnected_of_isOpen [LocPathConnectedSpace X] {U : Set X} (h : IsOpen U) :
    LocPathConnectedSpace U :=
  ⟨by
    rintro ⟨x, x_in⟩
    rw [nhds_subtype_eq_comap]
    constructor
    intro V
    

Proof state:
case mk.mem_iff'
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✝ : LocPathConnectedSpace X
U : Set X
h : IsOpen U
x : X
x_in : x ∈ U
V : Set ↑U
⊢ V ∈ comap Subtype.val (𝓝 x) ↔ ∃ i, (i ∈ comap Subtype.val (𝓝 x) ∧ IsPathConnected i) ∧ id i ⊆ V

Next tactic:
rw [(HasBasis.comap ((↑) : U → X) (pathConnected_subset_basis h x_in)).mem_iff]
theorem locPathConnected_of_isOpen [LocPathConnectedSpace X] {U : Set X} (h : IsOpen U) :
    LocPathConnectedSpace U :=
  ⟨by
    rintro ⟨x, x_in⟩
    rw [nhds_subtype_eq_comap]
    constructor
    intro V
    rw [(HasBasis.comap ((↑) : U → X) (pathConnected_subset_basis h x_in)).mem_iff]
    

Proof state:
case mk.mem_iff'
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✝ : LocPathConnectedSpace X
U : Set X
h : IsOpen U
x : X
x_in : x ∈ U
V : Set ↑U
⊢ (∃ i, (i ∈ 𝓝 x ∧ IsPathConnected i ∧ i ⊆ U) ∧ Subtype.val ⁻¹' id i ⊆ V) ↔
    ∃ i, (i ∈ comap Subtype.val (𝓝 x) ∧ IsPathConnected i) ∧ id i ⊆ V

Next tactic:
constructor
theorem locPathConnected_of_isOpen [LocPathConnectedSpace X] {U : Set X} (h : IsOpen U) :
    LocPathConnectedSpace U :=
  ⟨by
    rintro ⟨x, x_in⟩
    rw [nhds_subtype_eq_comap]
    constructor
    intro V
    rw [(HasBasis.comap ((↑) : U → X) (pathConnected_subset_basis h x_in)).mem_iff]
    constructor
    · 

Proof state:
case mk.mem_iff'.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
inst✝ : LocPathConnectedSpace X
U : Set X
h : IsOpen U
x : X
x_in : x ∈ U
V : Set ↑U
⊢ (∃ i, (i ∈ 𝓝 x ∧ IsPathConnected i ∧ i ⊆ U) ∧ Subtype.val ⁻¹' id i ⊆ V) →
    ∃ i, (i ∈ comap Subtype.val (𝓝 x) ∧ IsPathConnected i) ∧ id i ⊆ V

Next tactic:
rintro ⟨W, ⟨W_in, hW, hWU⟩, hWV⟩
theorem locPathConnected_of_isOpen [LocPathConnectedSpace X] {U : Set X} (h : IsOpen U) :
    LocPathConnectedSpace U :=
  ⟨by
    rintro ⟨x, x_in⟩
    rw [nhds_subtype_eq_comap]
    constructor
    intro V
    rw [(HasBasis.comap ((↑) : U → X) (pathConnected_subset_basis h x_in)).mem_iff]
    constructor
    · rintro ⟨W, ⟨W_in, hW, hWU⟩, hWV⟩
      

Proof state:
case mk.mem_iff'.mp.intro.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✝ : LocPathConnectedSpace X
U : Set X
h : IsOpen U
x : X
x_in : x ∈ U
V : Set ↑U
W : Set X
hWV : Subtype.val ⁻¹' id W ⊆ V
W_in : W ∈ 𝓝 x
hW : IsPathConnected W
hWU : W ⊆ U
⊢ ∃ i, (i ∈ comap Subtype.val (𝓝 x) ∧ IsPathConnected i) ∧ id i ⊆ V

Next tactic:
exact ⟨Subtype.val ⁻¹' W, ⟨⟨preimage_mem_comap W_in, hW.preimage_coe hWU⟩, hWV⟩⟩
theorem locPathConnected_of_isOpen [LocPathConnectedSpace X] {U : Set X} (h : IsOpen U) :
    LocPathConnectedSpace U :=
  ⟨by
    rintro ⟨x, x_in⟩
    rw [nhds_subtype_eq_comap]
    constructor
    intro V
    rw [(HasBasis.comap ((↑) : U → X) (pathConnected_subset_basis h x_in)).mem_iff]
    constructor
    · rintro ⟨W, ⟨W_in, hW, hWU⟩, hWV⟩
      exact ⟨Subtype.val ⁻¹' W, ⟨⟨preimage_mem_comap W_in, hW.preimage_coe hWU⟩, hWV⟩⟩
    · 

Proof state:
case mk.mem_iff'.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
inst✝ : LocPathConnectedSpace X
U : Set X
h : IsOpen U
x : X
x_in : x ∈ U
V : Set ↑U
⊢ (∃ i, (i ∈ comap Subtype.val (𝓝 x) ∧ IsPathConnected i) ∧ id i ⊆ V) →
    ∃ i, (i ∈ 𝓝 x ∧ IsPathConnected i ∧ i ⊆ U) ∧ Subtype.val ⁻¹' id i ⊆ V

Next tactic:
rintro ⟨W, ⟨W_in, hW⟩, hWV⟩