Theorem: MeasureTheory.Martingale.eq_condexp_of_tendsto_snorm
File: Mathlib/Probability/Martingale/Convergence.lean

tactic: rw [← sub_ae_eq_zero, ← snorm_eq_zero_iff (((hf.stronglyMeasurable n).mono (ℱ.le _)).sub
  (stronglyMeasurable_condexp.mono (ℱ.le _))).aestronglyMeasurable one_ne_zero]
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ : Filtration ℕ m0
a b : ℝ
f : ℕ → Ω → ℝ
ω : Ω
R : ℝ≥0
inst✝ : IsFiniteMeasure μ✝
g : Ω → ℝ
μ : Measure Ω
hf : Martingale f ℱ μ
hg : Integrable g μ
hgtends : Tendsto (fun n => snorm (f n - g) 1 μ) atTop (𝓝 0)
n : ℕ
⊢ f n =ᶠ[ae μ] μ[g|↑ℱ n]
state_after: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ : Filtration ℕ m0
a b : ℝ
f : ℕ → Ω → ℝ
ω : Ω
R : ℝ≥0
inst✝ : IsFiniteMeasure μ✝
g : Ω → ℝ
μ : Measure Ω
hf : Martingale f ℱ μ
hg : Integrable g μ
hgtends : Tendsto (fun n => snorm (f n - g) 1 μ) atTop (𝓝 0)
n : ℕ
⊢ snorm (f n - μ[g|↑ℱ n]) 1 μ = 0

tactic: have ht : Tendsto (fun m => snorm (μ[f m - g|ℱ n]) 1 μ) atTop (𝓝 0) :=
  haveI hint : ∀ m, Integrable (f m - g) μ := fun m => (hf.integrable m).sub hg
  tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hgtends (fun m => zero_le _)
    fun m => snorm_one_condexp_le_snorm _
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ : Filtration ℕ m0
a b : ℝ
f : ℕ → Ω → ℝ
ω : Ω
R : ℝ≥0
inst✝ : IsFiniteMeasure μ✝
g : Ω → ℝ
μ : Measure Ω
hf : Martingale f ℱ μ
hg : Integrable g μ
hgtends : Tendsto (fun n => snorm (f n - g) 1 μ) atTop (𝓝 0)
n : ℕ
⊢ snorm (f n - μ[g|↑ℱ n]) 1 μ = 0
state_after: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ : Filtration ℕ m0
a b : ℝ
f : ℕ → Ω → ℝ
ω : Ω
R : ℝ≥0
inst✝ : IsFiniteMeasure μ✝
g : Ω → ℝ
μ : Measure Ω
hf : Martingale f ℱ μ
hg : Integrable g μ
hgtends : Tendsto (fun n => snorm (f n - g) 1 μ) atTop (𝓝 0)
n : ℕ
ht : Tendsto (fun m => snorm (μ[f m - g|↑ℱ n]) 1 μ) atTop (𝓝 0)
⊢ snorm (f n - μ[g|↑ℱ n]) 1 μ = 0

tactic: have hev : ∀ m ≥ n, snorm (μ[f m - g|ℱ n]) 1 μ = snorm (f n - μ[g|ℱ n]) 1 μ := by
  refine fun m hm => snorm_congr_ae ((condexp_sub (hf.integrable m) hg).trans ?_)
  filter_upwards [hf.2 n m hm] with x hx
  simp only [hx, Pi.sub_apply]
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ : Filtration ℕ m0
a b : ℝ
f : ℕ → Ω → ℝ
ω : Ω
R : ℝ≥0
inst✝ : IsFiniteMeasure μ✝
g : Ω → ℝ
μ : Measure Ω
hf : Martingale f ℱ μ
hg : Integrable g μ
hgtends : Tendsto (fun n => snorm (f n - g) 1 μ) atTop (𝓝 0)
n : ℕ
ht : Tendsto (fun m => snorm (μ[f m - g|↑ℱ n]) 1 μ) atTop (𝓝 0)
⊢ snorm (f n - μ[g|↑ℱ n]) 1 μ = 0
state_after: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ : Filtration ℕ m0
a b : ℝ
f : ℕ → Ω → ℝ
ω : Ω
R : ℝ≥0
inst✝ : IsFiniteMeasure μ✝
g : Ω → ℝ
μ : Measure Ω
hf : Martingale f ℱ μ
hg : Integrable g μ
hgtends : Tendsto (fun n => snorm (f n - g) 1 μ) atTop (𝓝 0)
n : ℕ
ht : Tendsto (fun m => snorm (μ[f m - g|↑ℱ n]) 1 μ) atTop (𝓝 0)
hev : ∀ m ≥ n, snorm (μ[f m - g|↑ℱ n]) 1 μ = snorm (f n - μ[g|↑ℱ n]) 1 μ
⊢ snorm (f n - μ[g|↑ℱ n]) 1 μ = 0

tactic: exact tendsto_nhds_unique (tendsto_atTop_of_eventually_const hev) ht
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ : Filtration ℕ m0
a b : ℝ
f : ℕ → Ω → ℝ
ω : Ω
R : ℝ≥0
inst✝ : IsFiniteMeasure μ✝
g : Ω → ℝ
μ : Measure Ω
hf : Martingale f ℱ μ
hg : Integrable g μ
hgtends : Tendsto (fun n => snorm (f n - g) 1 μ) atTop (𝓝 0)
n : ℕ
ht : Tendsto (fun m => snorm (μ[f m - g|↑ℱ n]) 1 μ) atTop (𝓝 0)
hev : ∀ m ≥ n, snorm (μ[f m - g|↑ℱ n]) 1 μ = snorm (f n - μ[g|↑ℱ n]) 1 μ
⊢ snorm (f n - μ[g|↑ℱ n]) 1 μ = 0
state_after: no goals

tactic: refine fun m hm => snorm_congr_ae ((condexp_sub (hf.integrable m) hg).trans ?_)
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ : Filtration ℕ m0
a b : ℝ
f : ℕ → Ω → ℝ
ω : Ω
R : ℝ≥0
inst✝ : IsFiniteMeasure μ✝
g : Ω → ℝ
μ : Measure Ω
hf : Martingale f ℱ μ
hg : Integrable g μ
hgtends : Tendsto (fun n => snorm (f n - g) 1 μ) atTop (𝓝 0)
n : ℕ
ht : Tendsto (fun m => snorm (μ[f m - g|↑ℱ n]) 1 μ) atTop (𝓝 0)
⊢ ∀ m ≥ n, snorm (μ[f m - g|↑ℱ n]) 1 μ = snorm (f n - μ[g|↑ℱ n]) 1 μ
state_after: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ : Filtration ℕ m0
a b : ℝ
f : ℕ → Ω → ℝ
ω : Ω
R : ℝ≥0
inst✝ : IsFiniteMeasure μ✝
g : Ω → ℝ
μ : Measure Ω
hf : Martingale f ℱ μ
hg : Integrable g μ
hgtends : Tendsto (fun n => snorm (f n - g) 1 μ) atTop (𝓝 0)
n : ℕ
ht : Tendsto (fun m => snorm (μ[f m - g|↑ℱ n]) 1 μ) atTop (𝓝 0)
m : ℕ
hm : m ≥ n
⊢ μ[f m|↑ℱ n] - μ[g|↑ℱ n] =ᶠ[ae μ] f n - μ[g|↑ℱ n]

tactic: filter_upwards [hf.2 n m hm] with x hx
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ : Filtration ℕ m0
a b : ℝ
f : ℕ → Ω → ℝ
ω : Ω
R : ℝ≥0
inst✝ : IsFiniteMeasure μ✝
g : Ω → ℝ
μ : Measure Ω
hf : Martingale f ℱ μ
hg : Integrable g μ
hgtends : Tendsto (fun n => snorm (f n - g) 1 μ) atTop (𝓝 0)
n : ℕ
ht : Tendsto (fun m => snorm (μ[f m - g|↑ℱ n]) 1 μ) atTop (𝓝 0)
m : ℕ
hm : m ≥ n
⊢ μ[f m|↑ℱ n] - μ[g|↑ℱ n] =ᶠ[ae μ] f n - μ[g|↑ℱ n]
state_after: case h
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ : Filtration ℕ m0
a b : ℝ
f : ℕ → Ω → ℝ
ω : Ω
R : ℝ≥0
inst✝ : IsFiniteMeasure μ✝
g : Ω → ℝ
μ : Measure Ω
hf : Martingale f ℱ μ
hg : Integrable g μ
hgtends : Tendsto (fun n => snorm (f n - g) 1 μ) atTop (𝓝 0)
n : ℕ
ht : Tendsto (fun m => snorm (μ[f m - g|↑ℱ n]) 1 μ) atTop (𝓝 0)
m : ℕ
hm : m ≥ n
x : Ω
hx : (μ[f m|↑ℱ n]) x = f n x
⊢ (μ[f m|↑ℱ n] - μ[g|↑ℱ n]) x = (f n - μ[g|↑ℱ n]) x

tactic: simp only [hx, Pi.sub_apply]
state_before: case h
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ✝ : Measure Ω
ℱ : Filtration ℕ m0
a b : ℝ
f : ℕ → Ω → ℝ
ω : Ω
R : ℝ≥0
inst✝ : IsFiniteMeasure μ✝
g : Ω → ℝ
μ : Measure Ω
hf : Martingale f ℱ μ
hg : Integrable g μ
hgtends : Tendsto (fun n => snorm (f n - g) 1 μ) atTop (𝓝 0)
n : ℕ
ht : Tendsto (fun m => snorm (μ[f m - g|↑ℱ n]) 1 μ) atTop (𝓝 0)
m : ℕ
hm : m ≥ n
x : Ω
hx : (μ[f m|↑ℱ n]) x = f n x
⊢ (μ[f m|↑ℱ n] - μ[g|↑ℱ n]) x = (f n - μ[g|↑ℱ n]) x
state_after: no goals