[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
⊢ predictablePart f ℱ μ 0 = 0
[PROOFSTEP]
simp_rw [predictablePart, Finset.range_zero, Finset.sum_empty]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
⊢ martingalePart f ℱ μ = fun n => f 0 + ∑ i in Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])
[PROOFSTEP]
unfold martingalePart predictablePart
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
⊢ (fun n => f n - ∑ i in Finset.range n, μ[f (i + 1) - f i|↑ℱ i]) = fun n =>
    f 0 + ∑ i in Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])
[PROOFSTEP]
ext1 n
[GOAL]
case h
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ n : ℕ
⊢ f n - ∑ i in Finset.range n, μ[f (i + 1) - f i|↑ℱ i] =
    f 0 + ∑ i in Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])
[PROOFSTEP]
rw [Finset.eq_sum_range_sub f n, ← add_sub, ← Finset.sum_sub_distrib]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
hf_int : ∀ (n : ℕ), Integrable (f n)
n : ℕ
⊢ Integrable (martingalePart f ℱ μ n)
[PROOFSTEP]
rw [martingalePart_eq_sum]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
hf_int : ∀ (n : ℕ), Integrable (f n)
n : ℕ
⊢ Integrable ((fun n => f 0 + ∑ i in Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])) n)
[PROOFSTEP]
exact (hf_int 0).add (integrable_finset_sum' _ fun i _ => ((hf_int _).sub (hf_int _)).sub integrable_condexp)
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
⊢ Martingale (martingalePart f ℱ μ) ℱ μ
[PROOFSTEP]
refine'
  ⟨adapted_martingalePart hf, fun i j hij => _⟩
    -- ⊢ μ[martingalePart f ℱ μ j | ℱ i] =ᵐ[μ] martingalePart f ℱ μ i
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
⊢ μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ] martingalePart f ℱ μ i
[PROOFSTEP]
have h_eq_sum :
  μ[martingalePart f ℱ μ j|ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|ℱ i] - μ[μ[f (k + 1) - f k|ℱ k]|ℱ i]) :=
  by
  rw [martingalePart_eq_sum]
  refine' (condexp_add (hf_int 0) _).trans _
  · exact integrable_finset_sum' _ fun i _ => ((hf_int _).sub (hf_int _)).sub integrable_condexp
  refine' (EventuallyEq.add EventuallyEq.rfl (condexp_finset_sum fun i _ => _)).trans _
  · exact ((hf_int _).sub (hf_int _)).sub integrable_condexp
  refine' EventuallyEq.add _ _
  · rw [condexp_of_stronglyMeasurable (ℱ.le _) _ (hf_int 0)]
    · exact (hf 0).mono (ℱ.mono (zero_le i))
  · exact eventuallyEq_sum fun k _ => condexp_sub ((hf_int _).sub (hf_int _)) integrable_condexp
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
⊢ μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
[PROOFSTEP]
rw [martingalePart_eq_sum]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
⊢ μ[(fun n => f 0 + ∑ i in Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])) j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
[PROOFSTEP]
refine' (condexp_add (hf_int 0) _).trans _
[GOAL]
case refine'_1
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
⊢ Integrable (∑ i in Finset.range j, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i]))
[PROOFSTEP]
exact integrable_finset_sum' _ fun i _ => ((hf_int _).sub (hf_int _)).sub integrable_condexp
[GOAL]
case refine'_2
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
⊢ μ[f 0|↑ℱ i] + μ[∑ i in Finset.range j, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
[PROOFSTEP]
refine' (EventuallyEq.add EventuallyEq.rfl (condexp_finset_sum fun i _ => _)).trans _
[GOAL]
case refine'_2.refine'_1
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i✝ j : ℕ
hij : i✝ ≤ j
i : ℕ
x✝ : i ∈ Finset.range j
⊢ Integrable (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])
[PROOFSTEP]
exact ((hf_int _).sub (hf_int _)).sub integrable_condexp
[GOAL]
case refine'_2.refine'_2
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
⊢ (fun x =>
      (μ[f 0|↑ℱ i]) x +
        Finset.sum (Finset.range j) (fun i_1 => μ[f (i_1 + 1) - f i_1 - μ[f (i_1 + 1) - f i_1|↑ℱ i_1]|↑ℱ i]) x) =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
[PROOFSTEP]
refine' EventuallyEq.add _ _
[GOAL]
case refine'_2.refine'_2.refine'_1
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
⊢ (fun x => (μ[f 0|↑ℱ i]) x) =ᵐ[μ] fun x => f 0 x
[PROOFSTEP]
rw [condexp_of_stronglyMeasurable (ℱ.le _) _ (hf_int 0)]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
⊢ StronglyMeasurable (f 0)
[PROOFSTEP]
exact (hf 0).mono (ℱ.mono (zero_le i))
[GOAL]
case refine'_2.refine'_2.refine'_2
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
⊢ (fun x =>
      Finset.sum (Finset.range j) (fun i_1 => μ[f (i_1 + 1) - f i_1 - μ[f (i_1 + 1) - f i_1|↑ℱ i_1]|↑ℱ i]) x) =ᵐ[μ]
    fun x => Finset.sum (Finset.range j) (fun k => μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) x
[PROOFSTEP]
exact eventuallyEq_sum fun k _ => condexp_sub ((hf_int _).sub (hf_int _)) integrable_condexp
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
⊢ μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ] martingalePart f ℱ μ i
[PROOFSTEP]
refine' h_eq_sum.trans _
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
⊢ f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) =ᵐ[μ] martingalePart f ℱ μ i
[PROOFSTEP]
have h_ge : ∀ k, i ≤ k → μ[f (k + 1) - f k|ℱ i] - μ[μ[f (k + 1) - f k|ℱ k]|ℱ i] =ᵐ[μ] 0 :=
  by
  intro k hk
  have : μ[μ[f (k + 1) - f k|ℱ k]|ℱ i] =ᵐ[μ] μ[f (k + 1) - f k|ℱ i] := condexp_condexp_of_le (ℱ.mono hk) (ℱ.le k)
  filter_upwards [this] with x hx
  rw [Pi.sub_apply, Pi.zero_apply, hx, sub_self]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
⊢ ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
[PROOFSTEP]
intro k hk
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
k : ℕ
hk : i ≤ k
⊢ μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
[PROOFSTEP]
have : μ[μ[f (k + 1) - f k|ℱ k]|ℱ i] =ᵐ[μ] μ[f (k + 1) - f k|ℱ i] := condexp_condexp_of_le (ℱ.mono hk) (ℱ.le k)
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
k : ℕ
hk : i ≤ k
this : μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] μ[f (k + 1) - f k|↑ℱ i]
⊢ μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
[PROOFSTEP]
filter_upwards [this] with x hx
[GOAL]
case h
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
k : ℕ
hk : i ≤ k
this : μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] μ[f (k + 1) - f k|↑ℱ i]
x : Ω
hx : (μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) x = (μ[f (k + 1) - f k|↑ℱ i]) x
⊢ (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) x = OfNat.ofNat 0 x
[PROOFSTEP]
rw [Pi.sub_apply, Pi.zero_apply, hx, sub_self]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
h_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
⊢ f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) =ᵐ[μ] martingalePart f ℱ μ i
[PROOFSTEP]
have h_lt :
  ∀ k, k < i → μ[f (k + 1) - f k|ℱ i] - μ[μ[f (k + 1) - f k|ℱ k]|ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|ℱ k] :=
  by
  refine' fun k hk => EventuallyEq.sub _ _
  · rw [condexp_of_stronglyMeasurable]
    · exact ((hf (k + 1)).mono (ℱ.mono (Nat.succ_le_of_lt hk))).sub ((hf k).mono (ℱ.mono hk.le))
    · exact (hf_int _).sub (hf_int _)
  · rw [condexp_of_stronglyMeasurable]
    · exact stronglyMeasurable_condexp.mono (ℱ.mono hk.le)
    · exact integrable_condexp
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
h_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
⊢ ∀ (k : ℕ),
    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]
[PROOFSTEP]
refine' fun k hk => EventuallyEq.sub _ _
[GOAL]
case refine'_1
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
h_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
k : ℕ
hk : k < i
⊢ (fun x => (μ[f (k + 1) - f k|↑ℱ i]) x) =ᵐ[μ] fun x => (f (k + 1) - f k) x
[PROOFSTEP]
rw [condexp_of_stronglyMeasurable]
[GOAL]
case refine'_1.hf
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
h_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
k : ℕ
hk : k < i
⊢ StronglyMeasurable (f (k + 1) - f k)
[PROOFSTEP]
exact ((hf (k + 1)).mono (ℱ.mono (Nat.succ_le_of_lt hk))).sub ((hf k).mono (ℱ.mono hk.le))
[GOAL]
case refine'_1.hfi
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
h_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
k : ℕ
hk : k < i
⊢ Integrable (f (k + 1) - f k)
[PROOFSTEP]
exact (hf_int _).sub (hf_int _)
[GOAL]
case refine'_2
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
h_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
k : ℕ
hk : k < i
⊢ (fun x => (μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) x) =ᵐ[μ] fun x => (μ[f (k + 1) - f k|↑ℱ k]) x
[PROOFSTEP]
rw [condexp_of_stronglyMeasurable]
[GOAL]
case refine'_2.hf
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
h_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
k : ℕ
hk : k < i
⊢ StronglyMeasurable (μ[f (k + 1) - f k|↑ℱ k])
[PROOFSTEP]
exact stronglyMeasurable_condexp.mono (ℱ.mono hk.le)
[GOAL]
case refine'_2.hfi
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
h_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
k : ℕ
hk : k < i
⊢ Integrable (μ[f (k + 1) - f k|↑ℱ k])
[PROOFSTEP]
exact integrable_condexp
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
h_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
h_lt :
  ∀ (k : ℕ),
    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]
⊢ f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) =ᵐ[μ] martingalePart f ℱ μ i
[PROOFSTEP]
rw [martingalePart_eq_sum]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
h_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
h_lt :
  ∀ (k : ℕ),
    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]
⊢ f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) =ᵐ[μ]
    (fun n => f 0 + ∑ i in Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])) i
[PROOFSTEP]
refine' EventuallyEq.add EventuallyEq.rfl _
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
h_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
h_lt :
  ∀ (k : ℕ),
    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]
⊢ (fun x => Finset.sum (Finset.range j) (fun k => μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) x) =ᵐ[μ]
    fun x => Finset.sum (Finset.range i) (fun i => f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i]) x
[PROOFSTEP]
rw [← Finset.sum_range_add_sum_Ico _ hij, ←
  add_zero (∑ i in Finset.range i, (f (i + 1) - f i - μ[f (i + 1) - f i|ℱ i]))]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
h_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
h_lt :
  ∀ (k : ℕ),
    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]
⊢ (fun x =>
      (∑ k in Finset.range i, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) +
          ∑ k in Finset.Ico i j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]))
        x) =ᵐ[μ]
    fun x => (∑ i in Finset.range i, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i]) + 0) x
[PROOFSTEP]
refine' (eventuallyEq_sum fun k hk => h_lt k (Finset.mem_range.mp hk)).add _
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
h_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
h_lt :
  ∀ (k : ℕ),
    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]
⊢ (fun x => Finset.sum (Finset.Ico i j) (fun k => μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) x) =ᵐ[μ]
    fun x => OfNat.ofNat 0 x
[PROOFSTEP]
refine' (eventuallyEq_sum fun k hk => h_ge k (Finset.mem_Ico.mp hk).1).trans _
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
h_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
h_lt :
  ∀ (k : ℕ),
    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]
⊢ ∑ i in Finset.Ico i j, 0 =ᵐ[μ] fun x => OfNat.ofNat 0 x
[PROOFSTEP]
simp only [Finset.sum_const_zero, Pi.zero_apply]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : ℕ → Ω → E
ℱ : Filtration ℕ m0
n : ℕ
hf : Adapted ℱ f
hf_int : ∀ (n : ℕ), Integrable (f n)
inst✝ : SigmaFiniteFiltration μ ℱ
i j : ℕ
hij : i ≤ j
h_eq_sum :
  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]
    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])
h_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0
h_lt :
  ∀ (k : ℕ),
    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]
⊢ 0 =ᵐ[μ] fun x => 0
[PROOFSTEP]
rfl
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
⊢ martingalePart (f + g) ℱ μ n =ᵐ[μ] f n
[PROOFSTEP]
set h := f - martingalePart (f + g) ℱ μ with hhdef
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
h : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ
hhdef : h = f - martingalePart (f + g) ℱ μ
⊢ martingalePart (f + g) ℱ μ n =ᵐ[μ] f n
[PROOFSTEP]
have hh : h = predictablePart (f + g) ℱ μ - g := by
  rw [hhdef, sub_eq_sub_iff_add_eq_add, add_comm (predictablePart (f + g) ℱ μ), martingalePart_add_predictablePart]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
h : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ
hhdef : h = f - martingalePart (f + g) ℱ μ
⊢ h = predictablePart (f + g) ℱ μ - g
[PROOFSTEP]
rw [hhdef, sub_eq_sub_iff_add_eq_add, add_comm (predictablePart (f + g) ℱ μ), martingalePart_add_predictablePart]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
h : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ
hhdef : h = f - martingalePart (f + g) ℱ μ
hh : h = predictablePart (f + g) ℱ μ - g
⊢ martingalePart (f + g) ℱ μ n =ᵐ[μ] f n
[PROOFSTEP]
have hhpred : Adapted ℱ fun n => h (n + 1) := by
  rw [hh]
  exact adapted_predictablePart.sub hg
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
h : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ
hhdef : h = f - martingalePart (f + g) ℱ μ
hh : h = predictablePart (f + g) ℱ μ - g
⊢ Adapted ℱ fun n => h (n + 1)
[PROOFSTEP]
rw [hh]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
h : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ
hhdef : h = f - martingalePart (f + g) ℱ μ
hh : h = predictablePart (f + g) ℱ μ - g
⊢ Adapted ℱ fun n => (predictablePart (f + g) ℱ μ - g) (n + 1)
[PROOFSTEP]
exact adapted_predictablePart.sub hg
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
h : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ
hhdef : h = f - martingalePart (f + g) ℱ μ
hh : h = predictablePart (f + g) ℱ μ - g
hhpred : Adapted ℱ fun n => h (n + 1)
⊢ martingalePart (f + g) ℱ μ n =ᵐ[μ] f n
[PROOFSTEP]
have hhmgle : Martingale h ℱ μ :=
  hf.sub
    (martingale_martingalePart (hf.adapted.add <| Predictable.adapted hg <| hg0.symm ▸ stronglyMeasurable_zero) fun n =>
      (hf.integrable n).add <| hgint n)
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
h : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ
hhdef : h = f - martingalePart (f + g) ℱ μ
hh : h = predictablePart (f + g) ℱ μ - g
hhpred : Adapted ℱ fun n => h (n + 1)
hhmgle : Martingale h ℱ μ
⊢ martingalePart (f + g) ℱ μ n =ᵐ[μ] f n
[PROOFSTEP]
refine' (eventuallyEq_iff_sub.2 _).symm
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
h : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ
hhdef : h = f - martingalePart (f + g) ℱ μ
hh : h = predictablePart (f + g) ℱ μ - g
hhpred : Adapted ℱ fun n => h (n + 1)
hhmgle : Martingale h ℱ μ
⊢ f n - martingalePart (f + g) ℱ μ n =ᵐ[μ] 0
[PROOFSTEP]
filter_upwards [hhmgle.eq_zero_of_predictable hhpred n] with ω hω
[GOAL]
case h
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
h : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ
hhdef : h = f - martingalePart (f + g) ℱ μ
hh : h = predictablePart (f + g) ℱ μ - g
hhpred : Adapted ℱ fun n => h (n + 1)
hhmgle : Martingale h ℱ μ
ω : Ω
hω : (f - martingalePart (f + g) ℱ μ) n ω = (f - martingalePart (f + g) ℱ μ) 0 ω
⊢ (f n - martingalePart (f + g) ℱ μ n) ω = OfNat.ofNat 0 ω
[PROOFSTEP]
rw [Pi.sub_apply] at hω 
[GOAL]
case h
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
h : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ
hhdef : h = f - martingalePart (f + g) ℱ μ
hh : h = predictablePart (f + g) ℱ μ - g
hhpred : Adapted ℱ fun n => h (n + 1)
hhmgle : Martingale h ℱ μ
ω : Ω
hω : (f n - martingalePart (f + g) ℱ μ n) ω = (f - martingalePart (f + g) ℱ μ) 0 ω
⊢ (f n - martingalePart (f + g) ℱ μ n) ω = OfNat.ofNat 0 ω
[PROOFSTEP]
rw [hω, Pi.sub_apply, martingalePart]
[GOAL]
case h
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
h : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ
hhdef : h = f - martingalePart (f + g) ℱ μ
hh : h = predictablePart (f + g) ℱ μ - g
hhpred : Adapted ℱ fun n => h (n + 1)
hhmgle : Martingale h ℱ μ
ω : Ω
hω : (f n - martingalePart (f + g) ℱ μ n) ω = (f - martingalePart (f + g) ℱ μ) 0 ω
⊢ (f 0 - ((f + g) 0 - predictablePart (f + g) ℱ μ 0)) ω = OfNat.ofNat 0 ω
[PROOFSTEP]
simp [hg0]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
⊢ predictablePart (f + g) ℱ μ n =ᵐ[μ] g n
[PROOFSTEP]
filter_upwards [martingalePart_add_ae_eq hf hg hg0 hgint n] with ω hω
[GOAL]
case h
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
ω : Ω
hω : martingalePart (f + g) ℱ μ n ω = f n ω
⊢ predictablePart (f + g) ℱ μ n ω = g n ω
[PROOFSTEP]
rw [← add_right_inj (f n ω)]
[GOAL]
case h
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
ω : Ω
hω : martingalePart (f + g) ℱ μ n ω = f n ω
⊢ f n ω + predictablePart (f + g) ℱ μ n ω = f n ω + g n ω
[PROOFSTEP]
conv_rhs => rw [← Pi.add_apply, ← Pi.add_apply, ← martingalePart_add_predictablePart ℱ μ (f + g)]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
ω : Ω
hω : martingalePart (f + g) ℱ μ n ω = f n ω
| f n ω + g n ω
[PROOFSTEP]
rw [← Pi.add_apply, ← Pi.add_apply, ← martingalePart_add_predictablePart ℱ μ (f + g)]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
ω : Ω
hω : martingalePart (f + g) ℱ μ n ω = f n ω
| f n ω + g n ω
[PROOFSTEP]
rw [← Pi.add_apply, ← Pi.add_apply, ← martingalePart_add_predictablePart ℱ μ (f + g)]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
ω : Ω
hω : martingalePart (f + g) ℱ μ n ω = f n ω
| f n ω + g n ω
[PROOFSTEP]
rw [← Pi.add_apply, ← Pi.add_apply, ← martingalePart_add_predictablePart ℱ μ (f + g)]
[GOAL]
case h
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ : Filtration ℕ m0
n✝ : ℕ
inst✝ : SigmaFiniteFiltration μ ℱ
f g : ℕ → Ω → E
hf : Martingale f ℱ μ
hg : Adapted ℱ fun n => g (n + 1)
hg0 : g 0 = 0
hgint : ∀ (n : ℕ), Integrable (g n)
n : ℕ
ω : Ω
hω : martingalePart (f + g) ℱ μ n ω = f n ω
⊢ f n ω + predictablePart (f + g) ℱ μ n ω = (martingalePart (f + g) ℱ μ + predictablePart (f + g) ℱ μ) n ω
[PROOFSTEP]
rw [Pi.add_apply, Pi.add_apply, hω]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ✝ : Filtration ℕ m0
n : ℕ
R : ℝ≥0
f : ℕ → Ω → ℝ
ℱ : Filtration ℕ m0
hbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
⊢ ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω| ≤ ↑R
[PROOFSTEP]
simp_rw [predictablePart, Finset.sum_apply, Finset.sum_range_succ_sub_sum]
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ✝ : Filtration ℕ m0
n : ℕ
R : ℝ≥0
f : ℕ → Ω → ℝ
ℱ : Filtration ℕ m0
hbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
⊢ ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(μ[f (i + 1) - f i|↑ℱ i]) ω| ≤ ↑R
[PROOFSTEP]
exact ae_all_iff.2 fun i => ae_bdd_condexp_of_ae_bdd <| ae_all_iff.1 hbdd i
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ✝ : Filtration ℕ m0
n : ℕ
R : ℝ≥0
f : ℕ → Ω → ℝ
ℱ : Filtration ℕ m0
hbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
⊢ ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |martingalePart f ℱ μ (i + 1) ω - martingalePart f ℱ μ i ω| ≤ ↑(2 * R)
[PROOFSTEP]
filter_upwards [hbdd, predictablePart_bdd_difference ℱ hbdd] with ω hω₁ hω₂ i
[GOAL]
case h
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ✝ : Filtration ℕ m0
n : ℕ
R : ℝ≥0
f : ℕ → Ω → ℝ
ℱ : Filtration ℕ m0
hbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
ω : Ω
hω₁ : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
hω₂ : ∀ (i : ℕ), |predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω| ≤ ↑R
i : ℕ
⊢ |martingalePart f ℱ μ (i + 1) ω - martingalePart f ℱ μ i ω| ≤ ↑(2 * R)
[PROOFSTEP]
simp only [two_mul, martingalePart, Pi.sub_apply]
[GOAL]
case h
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ✝ : Filtration ℕ m0
n : ℕ
R : ℝ≥0
f : ℕ → Ω → ℝ
ℱ : Filtration ℕ m0
hbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
ω : Ω
hω₁ : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
hω₂ : ∀ (i : ℕ), |predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω| ≤ ↑R
i : ℕ
⊢ |f (i + 1) ω - predictablePart f ℱ μ (i + 1) ω - (f i ω - predictablePart f ℱ μ i ω)| ≤ ↑(R + R)
[PROOFSTEP]
have :
  |f (i + 1) ω - predictablePart f ℱ μ (i + 1) ω - (f i ω - predictablePart f ℱ μ i ω)| =
    |f (i + 1) ω - f i ω - (predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω)| :=
  by
  ring_nf
    -- `ring` suggests `ring_nf` despite proving the goal
[GOAL]
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ✝ : Filtration ℕ m0
n : ℕ
R : ℝ≥0
f : ℕ → Ω → ℝ
ℱ : Filtration ℕ m0
hbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
ω : Ω
hω₁ : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
hω₂ : ∀ (i : ℕ), |predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω| ≤ ↑R
i : ℕ
⊢ |f (i + 1) ω - predictablePart f ℱ μ (i + 1) ω - (f i ω - predictablePart f ℱ μ i ω)| =
    |f (i + 1) ω - f i ω - (predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω)|
[PROOFSTEP]
ring_nf
  -- `ring` suggests `ring_nf` despite proving the goal
[GOAL]
case h
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ✝ : Filtration ℕ m0
n : ℕ
R : ℝ≥0
f : ℕ → Ω → ℝ
ℱ : Filtration ℕ m0
hbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
ω : Ω
hω₁ : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
hω₂ : ∀ (i : ℕ), |predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω| ≤ ↑R
i : ℕ
this :
  |f (i + 1) ω - predictablePart f ℱ μ (i + 1) ω - (f i ω - predictablePart f ℱ μ i ω)| =
    |f (i + 1) ω - f i ω - (predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω)|
⊢ |f (i + 1) ω - predictablePart f ℱ μ (i + 1) ω - (f i ω - predictablePart f ℱ μ i ω)| ≤ ↑(R + R)
[PROOFSTEP]
rw [this]
[GOAL]
case h
Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ✝ : Filtration ℕ m0
n : ℕ
R : ℝ≥0
f : ℕ → Ω → ℝ
ℱ : Filtration ℕ m0
hbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
ω : Ω
hω₁ : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
hω₂ : ∀ (i : ℕ), |predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω| ≤ ↑R
i : ℕ
this :
  |f (i + 1) ω - predictablePart f ℱ μ (i + 1) ω - (f i ω - predictablePart f ℱ μ i ω)| =
    |f (i + 1) ω - f i ω - (predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω)|
⊢ |f (i + 1) ω - f i ω - (predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω)| ≤ ↑(R + R)
[PROOFSTEP]
exact (abs_sub _ _).trans (add_le_add (hω₁ i) (hω₂ i))
