-- Mathlib/MeasureTheory/Function/LpSpace/Basic.lean
theorem ae_tendsto_of_cauchy_eLpNorm' [CompleteSpace E] {f : ℕ → α → E} {p : ℝ}
    (hf : ∀ n, AEStronglyMeasurable (f n) μ) (hp1 : 1 ≤ p) {B : ℕ → ℝ≥0∞} (hB : ∑' i, B i ≠ ∞)
    (h_cau : ∀ N n m : ℕ, N ≤ n → N ≤ m → eLpNorm' (f n - f m) p μ < B N) :
    ∀ᵐ x ∂μ, ∃ l : E, atTop.Tendsto (fun n => f n x) (𝓝 l)

Proof state:
α : Type u_1
E : Type u_4
m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E
inst✝ : CompleteSpace E
f : ℕ → α → E
p : ℝ
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hp1 : 1 ≤ p
B : ℕ → ℝ≥0∞
hB : ∑' (i : ℕ), B i ≠ ⊤
h_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → eLpNorm' (f n - f m) p μ < B N
h_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x
⊢ ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)

Tactic:
have h :
  ∀ᵐ x ∂μ, ∃ l : E,
    atTop.Tendsto (fun n => ∑ i ∈ Finset.range n, (f (i + 1) x - f i x)) (𝓝 l) := by
  refine h_summable.mono fun x hx => ?_
  let hx_sum := hx.hasSum.tendsto_sum_nat
  exact ⟨∑' i, (f (i + 1) x - f i x), hx_sum⟩

Result:
α : Type u_1
E : Type u_4
m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E
inst✝ : CompleteSpace E
f : ℕ → α → E
p : ℝ
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hp1 : 1 ≤ p
B : ℕ → ℝ≥0∞
hB : ∑' (i : ℕ), B i ≠ ⊤
h_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → eLpNorm' (f n - f m) p μ < B N
h_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x
h : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i ∈ Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)
⊢ ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)

Proof state:
α : Type u_1
E : Type u_4
m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E
inst✝ : CompleteSpace E
f : ℕ → α → E
p : ℝ
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hp1 : 1 ≤ p
B : ℕ → ℝ≥0∞
hB : ∑' (i : ℕ), B i ≠ ⊤
h_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → eLpNorm' (f n - f m) p μ < B N
h_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x
x : α
hx : Summable fun i => f (i + 1) x - f i x
hx_sum : Tendsto (fun n => ∑ i ∈ Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 (∑' (b : ℕ), (f (b + 1) x - f b x))) :=
  HasSum.tendsto_sum_nat (Summable.hasSum hx)
⊢ ∃ l, Tendsto (fun n => ∑ i ∈ Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)

Tactic:
exact ⟨∑' i, (f (i + 1) x - f i x), hx_sum⟩

Result:
no goals

Proof state:
α : Type u_1
E : Type u_4
m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E
inst✝ : CompleteSpace E
f : ℕ → α → E
p : ℝ
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hp1 : 1 ≤ p
B : ℕ → ℝ≥0∞
hB : ∑' (i : ℕ), B i ≠ ⊤
h_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → eLpNorm' (f n - f m) p μ < B N
h_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x
x : α
hx : Summable fun i => f (i + 1) x - f i x
⊢ ∃ l, Tendsto (fun n => ∑ i ∈ Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)

Tactic:
let hx_sum := hx.hasSum.tendsto_sum_nat

Result:
α : Type u_1
E : Type u_4
m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E
inst✝ : CompleteSpace E
f : ℕ → α → E
p : ℝ
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hp1 : 1 ≤ p
B : ℕ → ℝ≥0∞
hB : ∑' (i : ℕ), B i ≠ ⊤
h_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → eLpNorm' (f n - f m) p μ < B N
h_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x
x : α
hx : Summable fun i => f (i + 1) x - f i x
hx_sum : Tendsto (fun n => ∑ i ∈ Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 (∑' (b : ℕ), (f (b + 1) x - f b x))) :=
  HasSum.tendsto_sum_nat (Summable.hasSum hx)
⊢ ∃ l, Tendsto (fun n => ∑ i ∈ Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)

Proof state:
α : Type u_1
E : Type u_4
m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E
inst✝ : CompleteSpace E
f : ℕ → α → E
p : ℝ
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hp1 : 1 ≤ p
B : ℕ → ℝ≥0∞
hB : ∑' (i : ℕ), B i ≠ ⊤
h_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → eLpNorm' (f n - f m) p μ < B N
h_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x
⊢ ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i ∈ Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)

Tactic:
refine h_summable.mono fun x hx => ?_

Result:
α : Type u_1
E : Type u_4
m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E
inst✝ : CompleteSpace E
f : ℕ → α → E
p : ℝ
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hp1 : 1 ≤ p
B : ℕ → ℝ≥0∞
hB : ∑' (i : ℕ), B i ≠ ⊤
h_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → eLpNorm' (f n - f m) p μ < B N
h_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x
x : α
hx : Summable fun i => f (i + 1) x - f i x
⊢ ∃ l, Tendsto (fun n => ∑ i ∈ Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)

Proof state:
α : Type u_1
E : Type u_4
m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E
inst✝ : CompleteSpace E
f : ℕ → α → E
p : ℝ
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hp1 : 1 ≤ p
B : ℕ → ℝ≥0∞
hB : ∑' (i : ℕ), B i ≠ ⊤
h_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → eLpNorm' (f n - f m) p μ < B N
h_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x
h : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i ∈ Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)
x : α
l : E
hx : Tendsto (fun n => f n x - f 0 x) atTop (𝓝 l)
h_rw_sum : (fun n => ∑ i ∈ Finset.range n, (f (i + 1) x - f i x)) = fun n => f n x - f 0 x
⊢ (fun n => f n x) = fun n => f n x - f 0 x + f 0 x

Tactic:
ext1 n

Result:
case h
α : Type u_1
E : Type u_4
m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E
inst✝ : CompleteSpace E
f : ℕ → α → E
p : ℝ
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hp1 : 1 ≤ p
B : ℕ → ℝ≥0∞
hB : ∑' (i : ℕ), B i ≠ ⊤
h_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → eLpNorm' (f n - f m) p μ < B N
h_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x
h : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i ∈ Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)
x : α
l : E
hx : Tendsto (fun n => f n x - f 0 x) atTop (𝓝 l)
h_rw_sum : (fun n => ∑ i ∈ Finset.range n, (f (i + 1) x - f i x)) = fun n => f n x - f 0 x
n : ℕ
⊢ f n x = f n x - f 0 x + f 0 x

Proof state:
α : Type u_1
E : Type u_4
m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E
inst✝ : CompleteSpace E
f : ℕ → α → E
p : ℝ
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hp1 : 1 ≤ p
B : ℕ → ℝ≥0∞
hB : ∑' (i : ℕ), B i ≠ ⊤
h_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → eLpNorm' (f n - f m) p μ < B N
h1 : ∀ (n : ℕ), eLpNorm' (fun x => ∑ i ∈ Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' (i : ℕ), B i
h2 : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i ∈ Finset.range (n + 1), ‖f (i + 1) a - f i a‖ₑ) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p
h3 : (∫⁻ (a : α), (∑' (i : ℕ), ‖f (i + 1) a - f i a‖ₑ) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i
h4 : ∀ᵐ (x : α) ∂μ, ∑' (i : ℕ), ‖f (i + 1) x - f i x‖ₑ < ⊤
⊢ ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x

Tactic:
exact h4.mono fun x hx => .of_nnnorm <| ENNReal.tsum_coe_ne_top_iff_summable.mp hx.ne

Result:
no goals