Theorem: MeasureTheory.SimpleFunc.edist_nearestPt_le
File: Mathlib/MeasureTheory/Function/SimpleFuncDense.lean

tactic: induction' N with N ihN generalizing k
state_before: α : Type u_1
β : Type ?u.24986
ι : Type ?u.24989
E : Type ?u.24992
F : Type ?u.24995
𝕜 : Type ?u.24998
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
x : α
k N : ℕ
hk : k ≤ N
⊢ edist (↑(nearestPt e N) x) x ≤ edist (e k) x

tactic: simp [nonpos_iff_eq_zero.1 hk, le_refl]
state_before: case zero
α : Type u_1
β : Type ?u.24986
ι : Type ?u.24989
E : Type ?u.24992
F : Type ?u.24995
𝕜 : Type ?u.24998
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
x : α
k✝ N : ℕ
hk✝ : k✝ ≤ N
k : ℕ
hk : k ≤ Nat.zero
⊢ edist (↑(nearestPt e Nat.zero) x) x ≤ edist (e k) x

tactic: simp only [nearestPt, nearestPtInd_succ, map_apply]
state_before: case succ
α : Type u_1
β : Type ?u.24986
ι : Type ?u.24989
E : Type ?u.24992
F : Type ?u.24995
𝕜 : Type ?u.24998
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
x : α
k✝ N✝ : ℕ
hk✝ : k✝ ≤ N✝
N : ℕ
ihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x
k : ℕ
hk : k ≤ Nat.succ N
⊢ edist (↑(nearestPt e (Nat.succ N)) x) x ≤ edist (e k) x

tactic: split_ifs with h
state_before: case succ
α : Type u_1
β : Type ?u.24986
ι : Type ?u.24989
E : Type ?u.24992
F : Type ?u.24995
𝕜 : Type ?u.24998
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
x : α
k✝ N✝ : ℕ
hk✝ : k✝ ≤ N✝
N : ℕ
ihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x
k : ℕ
hk : k ≤ Nat.succ N
⊢ edist (e (if ∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x then N + 1 else ↑(nearestPtInd e N) x)) x ≤
    edist (e k) x

tactic: rcases hk.eq_or_lt with (rfl | hk)
state_before: case succ.inl
α : Type u_1
β : Type ?u.24986
ι : Type ?u.24989
E : Type ?u.24992
F : Type ?u.24995
𝕜 : Type ?u.24998
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
x : α
k✝ N✝ : ℕ
hk✝ : k✝ ≤ N✝
N : ℕ
ihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x
k : ℕ
hk : k ≤ Nat.succ N
h : ∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x
⊢ edist (e (N + 1)) x ≤ edist (e k) x

tactic: exacts [le_rfl, (h k (Nat.lt_succ_iff.1 hk)).le]
state_before: case succ.inl.inl
α : Type u_1
β : Type ?u.24986
ι : Type ?u.24989
E : Type ?u.24992
F : Type ?u.24995
𝕜 : Type ?u.24998
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
x : α
k N✝ : ℕ
hk✝ : k ≤ N✝
N : ℕ
ihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x
h : ∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x
hk : Nat.succ N ≤ Nat.succ N
⊢ edist (e (N + 1)) x ≤ edist (e (Nat.succ N)) x

case succ.inl.inr
α : Type u_1
β : Type ?u.24986
ι : Type ?u.24989
E : Type ?u.24992
F : Type ?u.24995
𝕜 : Type ?u.24998
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
x : α
k✝ N✝ : ℕ
hk✝¹ : k✝ ≤ N✝
N : ℕ
ihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x
k : ℕ
hk✝ : k ≤ Nat.succ N
h : ∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x
hk : k < Nat.succ N
⊢ edist (e (N + 1)) x ≤ edist (e k) x

tactic: push_neg  at h
state_before: case succ.inr
α : Type u_1
β : Type ?u.24986
ι : Type ?u.24989
E : Type ?u.24992
F : Type ?u.24995
𝕜 : Type ?u.24998
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
x : α
k✝ N✝ : ℕ
hk✝ : k✝ ≤ N✝
N : ℕ
ihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x
k : ℕ
hk : k ≤ Nat.succ N
h : ¬∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x
⊢ edist (e (↑(nearestPtInd e N) x)) x ≤ edist (e k) x

tactic: rcases h with ⟨l, hlN, hxl⟩
state_before: case succ.inr
α : Type u_1
β : Type ?u.24986
ι : Type ?u.24989
E : Type ?u.24992
F : Type ?u.24995
𝕜 : Type ?u.24998
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
x : α
k✝ N✝ : ℕ
hk✝ : k✝ ≤ N✝
N : ℕ
ihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x
k : ℕ
hk : k ≤ Nat.succ N
h : ∃ k, k ≤ N ∧ edist (e k) x ≤ edist (e (N + 1)) x
⊢ edist (e (↑(nearestPtInd e N) x)) x ≤ edist (e k) x

tactic: rcases hk.eq_or_lt with (rfl | hk)
state_before: case succ.inr.intro.intro
α : Type u_1
β : Type ?u.24986
ι : Type ?u.24989
E : Type ?u.24992
F : Type ?u.24995
𝕜 : Type ?u.24998
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
x : α
k✝ N✝ : ℕ
hk✝ : k✝ ≤ N✝
N : ℕ
ihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x
k : ℕ
hk : k ≤ Nat.succ N
l : ℕ
hlN : l ≤ N
hxl : edist (e l) x ≤ edist (e (N + 1)) x
⊢ edist (e (↑(nearestPtInd e N) x)) x ≤ edist (e k) x

tactic: exacts [(ihN hlN).trans hxl, ihN (Nat.lt_succ_iff.1 hk)]
state_before: case succ.inr.intro.intro.inl
α : Type u_1
β : Type ?u.24986
ι : Type ?u.24989
E : Type ?u.24992
F : Type ?u.24995
𝕜 : Type ?u.24998
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
x : α
k N✝ : ℕ
hk✝ : k ≤ N✝
N : ℕ
ihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x
l : ℕ
hlN : l ≤ N
hxl : edist (e l) x ≤ edist (e (N + 1)) x
hk : Nat.succ N ≤ Nat.succ N
⊢ edist (e (↑(nearestPtInd e N) x)) x ≤ edist (e (Nat.succ N)) x

case succ.inr.intro.intro.inr
α : Type u_1
β : Type ?u.24986
ι : Type ?u.24989
E : Type ?u.24992
F : Type ?u.24995
𝕜 : Type ?u.24998
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
x : α
k✝ N✝ : ℕ
hk✝¹ : k✝ ≤ N✝
N : ℕ
ihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x
k : ℕ
hk✝ : k ≤ Nat.succ N
l : ℕ
hlN : l ≤ N
hxl : edist (e l) x ≤ edist (e (N + 1)) x
hk : k < Nat.succ N
⊢ edist (e (↑(nearestPtInd e N) x)) x ≤ edist (e k) x