Theorem: Metric.inductiveLimitDist_eq_dist
File: Mathlib/Topology/MetricSpace/Gluing.lean

Proof steps:
state_before: X : ℕ → Type u
inst✝ : (n : ℕ) → MetricSpace (X n)
f : (n : ℕ) → X n → X (n + 1)
I : ∀ (n : ℕ), Isometry (f n)
x y : (n : ℕ) × X n
hx : x.fst ≤ 0
hy : y.fst ≤ 0
⊢ inductiveLimitDist f x y = dist (leRecOn hx (fun {k} => f k) x.snd) (leRecOn hy (fun {k} => f k) y.snd)
state_after: case mk
X : ℕ → Type u
inst✝ : (n : ℕ) → MetricSpace (X n)
f : (n : ℕ) → X n → X (n + 1)
I : ∀ (n : ℕ), Isometry (f n)
y : (n : ℕ) × X n
hy : y.fst ≤ 0
i : ℕ
x : X i
hx : ⟨i, x⟩.fst ≤ 0
⊢ inductiveLimitDist f ⟨i, x⟩ y = dist (leRecOn hx (fun {k} => f k) ⟨i, x⟩.snd) (leRecOn hy (fun {k} => f k) y.snd)
tactic: cases' x with i x
state_before: case mk
X : ℕ → Type u
inst✝ : (n : ℕ) → MetricSpace (X n)
f : (n : ℕ) → X n → X (n + 1)
I : ∀ (n : ℕ), Isometry (f n)
y : (n : ℕ) × X n
hy : y.fst ≤ 0
i : ℕ
x : X i
hx : ⟨i, x⟩.fst ≤ 0
⊢ inductiveLimitDist f ⟨i, x⟩ y = dist (leRecOn hx (fun {k} => f k) ⟨i, x⟩.snd) (leRecOn hy (fun {k} => f k) y.snd)
state_after: case mk.mk
X : ℕ → Type u
inst✝ : (n : ℕ) → MetricSpace (X n)
f : (n : ℕ) → X n → X (n + 1)
I : ∀ (n : ℕ), Isometry (f n)
i : ℕ
x : X i
hx : ⟨i, x⟩.fst ≤ 0
j : ℕ
y : X j
hy : ⟨j, y⟩.fst ≤ 0
⊢ inductiveLimitDist f ⟨i, x⟩ ⟨j, y⟩ =
    dist (leRecOn hx (fun {k} => f k) ⟨i, x⟩.snd) (leRecOn hy (fun {k} => f k) ⟨j, y⟩.snd)
tactic: cases' y with j y
state_before: case mk.mk
X : ℕ → Type u
inst✝ : (n : ℕ) → MetricSpace (X n)
f : (n : ℕ) → X n → X (n + 1)
I : ∀ (n : ℕ), Isometry (f n)
i : ℕ
x : X i
hx : ⟨i, x⟩.fst ≤ 0
j : ℕ
y : X j
hy : ⟨j, y⟩.fst ≤ 0
⊢ inductiveLimitDist f ⟨i, x⟩ ⟨j, y⟩ =
    dist (leRecOn hx (fun {k} => f k) ⟨i, x⟩.snd) (leRecOn hy (fun {k} => f k) ⟨j, y⟩.snd)
state_after: case mk.mk
X : ℕ → Type u
inst✝ : (n : ℕ) → MetricSpace (X n)
f : (n : ℕ) → X n → X (n + 1)
I : ∀ (n : ℕ), Isometry (f n)
j : ℕ
y : X j
hy : ⟨j, y⟩.fst ≤ 0
x : X 0
hx : ⟨0, x⟩.fst ≤ 0
⊢ inductiveLimitDist f ⟨0, x⟩ ⟨j, y⟩ =
    dist (leRecOn hx (fun {k} => f k) ⟨0, x⟩.snd) (leRecOn hy (fun {k} => f k) ⟨j, y⟩.snd)
tactic: obtain rfl : i = 0 := nonpos_iff_eq_zero.1 hx
state_before: case mk.mk
X : ℕ → Type u
inst✝ : (n : ℕ) → MetricSpace (X n)
f : (n : ℕ) → X n → X (n + 1)
I : ∀ (n : ℕ), Isometry (f n)
j : ℕ
y : X j
hy : ⟨j, y⟩.fst ≤ 0
x : X 0
hx : ⟨0, x⟩.fst ≤ 0
⊢ inductiveLimitDist f ⟨0, x⟩ ⟨j, y⟩ =
    dist (leRecOn hx (fun {k} => f k) ⟨0, x⟩.snd) (leRecOn hy (fun {k} => f k) ⟨j, y⟩.snd)
state_after: case mk.mk
X : ℕ → Type u
inst✝ : (n : ℕ) → MetricSpace (X n)
f : (n : ℕ) → X n → X (n + 1)
I : ∀ (n : ℕ), Isometry (f n)
x : X 0
hx : ⟨0, x⟩.fst ≤ 0
y : X 0
hy : ⟨0, y⟩.fst ≤ 0
⊢ inductiveLimitDist f ⟨0, x⟩ ⟨0, y⟩ =
    dist (leRecOn hx (fun {k} => f k) ⟨0, x⟩.snd) (leRecOn hy (fun {k} => f k) ⟨0, y⟩.snd)
tactic: obtain rfl : j = 0 := nonpos_iff_eq_zero.1 hy
state_before: case mk.mk
X : ℕ → Type u
inst✝ : (n : ℕ) → MetricSpace (X n)
f : (n : ℕ) → X n → X (n + 1)
I : ∀ (n : ℕ), Isometry (f n)
x : X 0
hx : ⟨0, x⟩.fst ≤ 0
y : X 0
hy : ⟨0, y⟩.fst ≤ 0
⊢ inductiveLimitDist f ⟨0, x⟩ ⟨0, y⟩ =
    dist (leRecOn hx (fun {k} => f k) ⟨0, x⟩.snd) (leRecOn hy (fun {k} => f k) ⟨0, y⟩.snd)
state_after: no goals
tactic: rfl
state_before: X : ℕ → Type u
inst✝ : (n : ℕ) → MetricSpace (X n)
f : (n : ℕ) → X n → X (n + 1)
I : ∀ (n : ℕ), Isometry (f n)
x y : (n : ℕ) × X n
m : ℕ
hx : x.fst ≤ m + 1
hy : y.fst ≤ m + 1
⊢ inductiveLimitDist f x y = dist (leRecOn hx (fun {k} => f k) x.snd) (leRecOn hy (fun {k} => f k) y.snd)
state_after: case pos
X : ℕ → Type u
inst✝ : (n : ℕ) → MetricSpace (X n)
f : (n : ℕ) → X n → X (n + 1)
I : ∀ (n : ℕ), Isometry (f n)
x y : (n : ℕ) × X n
m : ℕ
hx : x.fst ≤ m + 1
hy : y.fst ≤ m + 1
h : max x.fst y.fst = m + 1
⊢ inductiveLimitDist f x y = dist (leRecOn hx (fun {k} => f k) x.snd) (leRecOn hy (fun {k} => f k) y.snd)

case neg
X : ℕ → Type u
inst✝ : (n : ℕ) → MetricSpace (X n)
f : (n : ℕ) → X n → X (n + 1)
I : ∀ (n : ℕ), Isometry (f n)
x y : (n : ℕ) × X n
m : ℕ
hx : x.fst ≤ m + 1
hy : y.fst ≤ m + 1
h : ¬max x.fst y.fst = m + 1
⊢ inductiveLimitDist f x y = dist (leRecOn hx (fun {k} => f k) x.snd) (leRecOn hy (fun {k} => f k) y.snd)
tactic: by_cases h : max x.1 y.1 = (m + 1)