Theorem: IsPathConnected.exists_path_through_family
File: Mathlib/Topology/PathConnected.lean

tactic: let p' : ℕ → X := fun k => if h : k < n + 1 then p ⟨k, h⟩ else p ⟨0, n.zero_lt_succ⟩
state_before: X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
⊢ ∃ γ, range ↑γ ⊆ s ∧ ∀ (i : Fin (n + 1)), p i ∈ range ↑γ

tactic: have hpp' : ∀ k < n + 1, p k = p' k := by
  intro k hk
  simp only [hk, dif_pos]
  congr
  ext
  rw [Fin.val_cast_of_lt hk]
state_before: case intro
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
⊢ ∃ γ, range ↑γ ⊆ s ∧ ∀ (i : Fin (n + 1)), p i ∈ range ↑γ

tactic: use γ.cast (hpp' 0 n.zero_lt_succ) (hpp' n n.lt_succ_self)
state_before: case intro
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hpp' : ∀ (k : ℕ), k < n + 1 → p ↑k = p' k
⊢ ∃ γ, range ↑γ ⊆ s ∧ ∀ (i : Fin (n + 1)), p i ∈ range ↑γ

tactic: simp only [γ.cast_coe]
state_before: case intro
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hpp' : ∀ (k : ℕ), k < n + 1 → p ↑k = p' k
⊢ range ↑(Path.cast γ (_ : p ↑0 = p' 0) (_ : p ↑n = p' n)) ⊆ s ∧
    ∀ (i : Fin (n + 1)), p i ∈ range ↑(Path.cast γ (_ : p ↑0 = p' 0) (_ : p ↑n = p' n))

tactic: refine' And.intro hγ.2 _
state_before: case intro
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hpp' : ∀ (k : ℕ), k < n + 1 → p ↑k = p' k
⊢ range ↑γ ⊆ s ∧ ∀ (i : Fin (n + 1)), p i ∈ range ↑γ

tactic: rintro ⟨i, hi⟩
state_before: case intro
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hpp' : ∀ (k : ℕ), k < n + 1 → p ↑k = p' k
⊢ ∀ (i : Fin (n + 1)), p i ∈ range ↑γ

tactic: suffices p ⟨i, hi⟩ = p' i by convert hγ.1 i (Nat.le_of_lt_succ hi)
state_before: case intro.mk
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hpp' : ∀ (k : ℕ), k < n + 1 → p ↑k = p' k
i : ℕ
hi : i < n + 1
⊢ p { val := i, isLt := hi } ∈ range ↑γ

tactic: rw [← hpp' i hi]
state_before: case intro.mk
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hpp' : ∀ (k : ℕ), k < n + 1 → p ↑k = p' k
i : ℕ
hi : i < n + 1
⊢ p { val := i, isLt := hi } = p' i

tactic: suffices i = i % n.succ by congr
state_before: case intro.mk
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hpp' : ∀ (k : ℕ), k < n + 1 → p ↑k = p' k
i : ℕ
hi : i < n + 1
⊢ p { val := i, isLt := hi } = p ↑i

tactic: rw [Nat.mod_eq_of_lt hi]
state_before: case intro.mk
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hpp' : ∀ (k : ℕ), k < n + 1 → p ↑k = p' k
i : ℕ
hi : i < n + 1
⊢ i = i % Nat.succ n

tactic: have hp' : ∀ i ≤ n, p' i ∈ s := by
  intro i hi
  simp [Nat.lt_succ_of_le hi, hp]
state_before: X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
⊢ ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s

tactic: clear_value p'
state_before: X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
hp' : ∀ (i : ℕ), i ≤ n → p' i ∈ s
⊢ ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s

tactic: clear hp p
state_before: X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X
hp' : ∀ (i : ℕ), i ≤ n → p' i ∈ s
⊢ ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s

tactic: induction' n with n hn
state_before: X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp' : ∀ (i : ℕ), i ≤ n → p' i ∈ s
⊢ ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s

tactic: intro i hi
state_before: X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
⊢ ∀ (i : ℕ), i ≤ n → p' i ∈ s

tactic: simp [Nat.lt_succ_of_le hi, hp]
state_before: X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
i : ℕ
hi : i ≤ n
⊢ p' i ∈ s

tactic: use Path.refl (p' 0)
state_before: case zero
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n → p' i ∈ s
hp' : ∀ (i : ℕ), i ≤ Nat.zero → p' i ∈ s
⊢ ∃ γ, (∀ (i : ℕ), i ≤ Nat.zero → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s

tactic: constructor
state_before: case zero
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n → p' i ∈ s
hp' : ∀ (i : ℕ), i ≤ Nat.zero → p' i ∈ s
⊢ (∀ (i : ℕ), i ≤ Nat.zero → p' i ∈ range ↑(Path.refl (p' 0))) ∧ range ↑(Path.refl (p' 0)) ⊆ s

tactic: rintro i hi
state_before: case zero.left
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n → p' i ∈ s
hp' : ∀ (i : ℕ), i ≤ Nat.zero → p' i ∈ s
⊢ ∀ (i : ℕ), i ≤ Nat.zero → p' i ∈ range ↑(Path.refl (p' 0))

tactic: rw [le_zero_iff.mp hi]
state_before: case zero.left
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n → p' i ∈ s
hp' : ∀ (i : ℕ), i ≤ Nat.zero → p' i ∈ s
i : ℕ
hi : i ≤ Nat.zero
⊢ p' i ∈ range ↑(Path.refl (p' 0))

tactic: exact ⟨0, rfl⟩
state_before: case zero.left
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n → p' i ∈ s
hp' : ∀ (i : ℕ), i ≤ Nat.zero → p' i ∈ s
i : ℕ
hi : i ≤ Nat.zero
⊢ p' 0 ∈ range ↑(Path.refl (p' 0))

tactic: rw [range_subset_iff]
state_before: case zero.right
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n → p' i ∈ s
hp' : ∀ (i : ℕ), i ≤ Nat.zero → p' i ∈ s
⊢ range ↑(Path.refl (p' 0)) ⊆ s

tactic: rintro _x
state_before: case zero.right
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n → p' i ∈ s
hp' : ∀ (i : ℕ), i ≤ Nat.zero → p' i ∈ s
⊢ ∀ (y : ↑I), ↑(Path.refl (p' 0)) y ∈ s

tactic: exact hp' 0 le_rfl
state_before: case zero.right
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n → p' i ∈ s
hp' : ∀ (i : ℕ), i ≤ Nat.zero → p' i ∈ s
_x : ↑I
⊢ ↑(Path.refl (p' 0)) _x ∈ s

tactic: rcases hn fun i hi => hp' i <| Nat.le_succ_of_le hi with ⟨γ₀, hγ₀⟩
state_before: case succ
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
⊢ ∃ γ, (∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s

tactic: rcases h.joinedIn (p' n) (hp' n n.le_succ) (p' <| n + 1) (hp' (n + 1) <| le_rfl) with
  ⟨γ₁, hγ₁⟩
state_before: case succ.intro
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
⊢ ∃ γ, (∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s

tactic: let γ : Path (p' 0) (p' <| n + 1) := γ₀.trans γ₁
state_before: case succ.intro.intro
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
⊢ ∃ γ, (∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s

tactic: use γ
state_before: case succ.intro.intro
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
⊢ ∃ γ, (∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s

tactic: have range_eq : range γ = range γ₀ ∪ range γ₁ := γ₀.trans_range γ₁
state_before: case succ.intro.intro
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
⊢ (∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s

tactic: constructor
state_before: case succ.intro.intro
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
range_eq : range ↑γ = range ↑γ₀ ∪ range ↑γ₁
⊢ (∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s

tactic: rintro i hi
state_before: case succ.intro.intro.left
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
range_eq : range ↑γ = range ↑γ₀ ∪ range ↑γ₁
⊢ ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ range ↑γ

tactic: by_cases hi' : i ≤ n
state_before: case succ.intro.intro.left
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
range_eq : range ↑γ = range ↑γ₀ ∪ range ↑γ₁
i : ℕ
hi : i ≤ Nat.succ n
⊢ p' i ∈ range ↑γ

tactic: rw [range_eq]
state_before: case pos
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
range_eq : range ↑γ = range ↑γ₀ ∪ range ↑γ₁
i : ℕ
hi : i ≤ Nat.succ n
hi' : i ≤ n
⊢ p' i ∈ range ↑γ

tactic: left
state_before: case pos
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
range_eq : range ↑γ = range ↑γ₀ ∪ range ↑γ₁
i : ℕ
hi : i ≤ Nat.succ n
hi' : i ≤ n
⊢ p' i ∈ range ↑γ₀ ∪ range ↑γ₁

tactic: exact hγ₀.1 i hi'
state_before: case pos.h
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
range_eq : range ↑γ = range ↑γ₀ ∪ range ↑γ₁
i : ℕ
hi : i ≤ Nat.succ n
hi' : i ≤ n
⊢ p' i ∈ range ↑γ₀

tactic: rw [not_le, ← Nat.succ_le_iff] at hi'
state_before: case neg
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
range_eq : range ↑γ = range ↑γ₀ ∪ range ↑γ₁
i : ℕ
hi : i ≤ Nat.succ n
hi' : ¬i ≤ n
⊢ p' i ∈ range ↑γ

tactic: have : i = n.succ := le_antisymm hi hi'
state_before: case neg
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
range_eq : range ↑γ = range ↑γ₀ ∪ range ↑γ₁
i : ℕ
hi : i ≤ Nat.succ n
hi' : Nat.succ n ≤ i
⊢ p' i ∈ range ↑γ

tactic: rw [this]
state_before: case neg
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
range_eq : range ↑γ = range ↑γ₀ ∪ range ↑γ₁
i : ℕ
hi : i ≤ Nat.succ n
hi' : Nat.succ n ≤ i
this : i = Nat.succ n
⊢ p' i ∈ range ↑γ

tactic: use 1
state_before: case neg
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
range_eq : range ↑γ = range ↑γ₀ ∪ range ↑γ₁
i : ℕ
hi : i ≤ Nat.succ n
hi' : Nat.succ n ≤ i
this : i = Nat.succ n
⊢ p' (Nat.succ n) ∈ range ↑γ

tactic: exact γ.target
state_before: case neg
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
range_eq : range ↑γ = range ↑γ₀ ∪ range ↑γ₁
i : ℕ
hi : i ≤ Nat.succ n
hi' : Nat.succ n ≤ i
this : i = Nat.succ n
⊢ ↑γ 1 = p' (Nat.succ n)

tactic: rw [range_eq]
state_before: case succ.intro.intro.right
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
range_eq : range ↑γ = range ↑γ₀ ∪ range ↑γ₁
⊢ range ↑γ ⊆ s

tactic: apply union_subset hγ₀.2
state_before: case succ.intro.intro.right
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
range_eq : range ↑γ = range ↑γ₀ ∪ range ↑γ₁
⊢ range ↑γ₀ ∪ range ↑γ₁ ⊆ s

tactic: rw [range_subset_iff]
state_before: case succ.intro.intro.right
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
range_eq : range ↑γ = range ↑γ₀ ∪ range ↑γ₁
⊢ range ↑γ₁ ⊆ s

tactic: exact hγ₁
state_before: case succ.intro.intro.right
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n✝ : ℕ
s : Set X
h : IsPathConnected s
p' : ℕ → X
hp'✝ : ∀ (i : ℕ), i ≤ n✝ → p' i ∈ s
n : ℕ
hn : (∀ (i : ℕ), i ≤ n → p' i ∈ s) → ∃ γ, (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hp' : ∀ (i : ℕ), i ≤ Nat.succ n → p' i ∈ s
γ₀ : Path (p' 0) (p' n)
hγ₀ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ₀) ∧ range ↑γ₀ ⊆ s
γ₁ : Path (p' n) (p' (n + 1))
hγ₁ : ∀ (t : ↑I), ↑γ₁ t ∈ s
γ : Path (p' 0) (p' (n + 1)) := Path.trans γ₀ γ₁
range_eq : range ↑γ = range ↑γ₀ ∪ range ↑γ₁
⊢ ∀ (y : ↑I), ↑γ₁ y ∈ s

tactic: intro k hk
state_before: X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
⊢ ∀ (k : ℕ), k < n + 1 → p ↑k = p' k

tactic: simp only [hk, dif_pos]
state_before: X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
k : ℕ
hk : k < n + 1
⊢ p ↑k = p' k

tactic: congr
state_before: X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
k : ℕ
hk : k < n + 1
⊢ p ↑k = p { val := k, isLt := (_ : k < n + 1) }

tactic: ext
state_before: case e_a
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
k : ℕ
hk : k < n + 1
⊢ ↑k = { val := k, isLt := (_ : k < n + 1) }

tactic: rw [Fin.val_cast_of_lt hk]
state_before: case e_a.h
X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
k : ℕ
hk : k < n + 1
⊢ ↑↑k = ↑{ val := k, isLt := (_ : k < n + 1) }

tactic: convert hγ.1 i (Nat.le_of_lt_succ hi)
state_before: X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hpp' : ∀ (k : ℕ), k < n + 1 → p ↑k = p' k
i : ℕ
hi : i < n + 1
this : p { val := i, isLt := hi } = p' i
⊢ p { val := i, isLt := hi } ∈ range ↑γ

tactic: congr
state_before: X✝ : Type ?u.658803
Y : Type ?u.658806
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
x y z : X✝
ι : Type ?u.658821
F : Set X✝
X : Type u_1
inst✝ : TopologicalSpace X
n : ℕ
s : Set X
h : IsPathConnected s
p : Fin (n + 1) → X
hp : ∀ (i : Fin (n + 1)), p i ∈ s
p' : ℕ → X := fun k => if h : k < n + 1 then p { val := k, isLt := h } else p { val := 0, isLt := (_ : 0 < Nat.succ n) }
γ : Path (p' 0) (p' n)
hγ : (∀ (i : ℕ), i ≤ n → p' i ∈ range ↑γ) ∧ range ↑γ ⊆ s
hpp' : ∀ (k : ℕ), k < n + 1 → p ↑k = p' k
i : ℕ
hi : i < n + 1
this : i = i % Nat.succ n
⊢ p { val := i, isLt := hi } = p ↑i