Theorem: MeasureTheory.SimpleFunc.sum_eapproxDiff
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: induction' n with n IH
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
K : Type u_5
f : α → ℝ≥0∞
n : ℕ
a : α
⊢ ∑ k ∈ Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a
state_after: case zero
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
K : Type u_5
f : α → ℝ≥0∞
a : α
⊢ ∑ k ∈ Finset.range (0 + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f 0) a

case succ
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
K : Type u_5
f : α → ℝ≥0∞
a : α
n : ℕ
IH : ∑ k ∈ Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a
⊢ ∑ k ∈ Finset.range (n + 1 + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f (n + 1)) a

tactic: simp only [Nat.zero_eq, Nat.zero_add, Finset.sum_singleton, Finset.range_one]
state_before: case zero
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
K : Type u_5
f : α → ℝ≥0∞
a : α
⊢ ∑ k ∈ Finset.range (0 + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f 0) a
state_after: case zero
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
K : Type u_5
f : α → ℝ≥0∞
a : α
⊢ ↑(↑(eapproxDiff f 0) a) = ↑(eapprox f 0) a

tactic: rfl
state_before: case zero
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
K : Type u_5
f : α → ℝ≥0∞
a : α
⊢ ↑(↑(eapproxDiff f 0) a) = ↑(eapprox f 0) a
state_after: no goals

tactic: erw [Finset.sum_range_succ, IH, eapproxDiff, coe_map, Function.comp_apply,
  coe_sub, Pi.sub_apply, ENNReal.coe_toNNReal,
  add_tsub_cancel_of_le (monotone_eapprox f (Nat.le_succ _) _)]
state_before: case succ
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
K : Type u_5
f : α → ℝ≥0∞
a : α
n : ℕ
IH : ∑ k ∈ Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a
⊢ ∑ k ∈ Finset.range (n + 1 + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f (n + 1)) a
state_after: case succ
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
K : Type u_5
f : α → ℝ≥0∞
a : α
n : ℕ
IH : ∑ k ∈ Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a
⊢ ↑(eapprox f (n + 1)) a - ↑(eapprox f n) a ≠ ⊤

tactic: apply (lt_of_le_of_lt _ (eapprox_lt_top f (n + 1) a)).ne
state_before: case succ
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
K : Type u_5
f : α → ℝ≥0∞
a : α
n : ℕ
IH : ∑ k ∈ Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a
⊢ ↑(eapprox f (n + 1)) a - ↑(eapprox f n) a ≠ ⊤
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
K : Type u_5
f : α → ℝ≥0∞
a : α
n : ℕ
IH : ∑ k ∈ Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a
⊢ ↑(eapprox f (n + 1)) a - ↑(eapprox f n) a ≤ ↑(eapprox f (n + 1)) a

tactic: rw [tsub_le_iff_right]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
K : Type u_5
f : α → ℝ≥0∞
a : α
n : ℕ
IH : ∑ k ∈ Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a
⊢ ↑(eapprox f (n + 1)) a - ↑(eapprox f n) a ≤ ↑(eapprox f (n + 1)) a
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
K : Type u_5
f : α → ℝ≥0∞
a : α
n : ℕ
IH : ∑ k ∈ Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a
⊢ ↑(eapprox f (n + 1)) a ≤ ↑(eapprox f (n + 1)) a + ↑(eapprox f n) a

tactic: exact le_self_add
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
K : Type u_5
f : α → ℝ≥0∞
a : α
n : ℕ
IH : ∑ k ∈ Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a
⊢ ↑(eapprox f (n + 1)) a ≤ ↑(eapprox f (n + 1)) a + ↑(eapprox f n) a
state_after: no goals