File: Mathlib/Probability/Martingale/Convergence.lean

full_name: MeasureTheory.not_frequently_of_upcrossings_lt_top
code: /-- If a stochastic process has bounded upcrossing from below `a` to above `b`,
then it does not frequently visit both below `a` and above `b`. -/
theorem not_frequently_of_upcrossings_lt_top (hab : a < b) (hω : upcrossings a b f ω ≠ ∞) :
    ¬((∃ᶠ n in atTop, f n ω < a) ∧ ∃ᶠ n in atTop, b < f n ω) 
goal: ¬((∃ᶠ (n : ℕ) in Filter.atTop, f n ω < a) ∧ ∃ᶠ (n : ℕ) in Filter.atTop, b < f n ω)

full_name: MeasureTheory.upcrossings_eq_top_of_frequently_lt
code: /-- A stochastic process that frequently visits below `a` and above `b` has infinite upcrossings. -/
theorem upcrossings_eq_top_of_frequently_lt (hab : a < b) (h₁ : ∃ᶠ n in atTop, f n ω < a)
    (h₂ : ∃ᶠ n in atTop, b < f n ω) : upcrossings a b f ω = ∞ 
goal: MeasureTheory.upcrossings a b f ω = ⊤

full_name: MeasureTheory.tendsto_of_uncrossing_lt_top
code: /-- A realization of a stochastic process with bounded upcrossings and bounded liminfs is
convergent.

We use the spelling `< ∞` instead of the standard `≠ ∞` in the assumptions since it is not as easy
to change `<` to `≠` under binders. -/
theorem tendsto_of_uncrossing_lt_top (hf₁ : liminf (fun n => (‖f n ω‖₊ : ℝ≥0∞)) atTop < ∞)
    (hf₂ : ∀ a b : ℚ, a < b → upcrossings a b f ω < ∞) :
    ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c) 
goal: ∃ c, Filter.Tendsto (fun n => f n ω) Filter.atTop (𝓝 c)

full_name: MeasureTheory.Submartingale.upcrossings_ae_lt_top'
code: /-- An L¹-bounded submartingale has bounded upcrossings almost everywhere. -/
theorem Submartingale.upcrossings_ae_lt_top' [IsFiniteMeasure μ] (hf : Submartingale f ℱ μ)
    (hbdd : ∀ n, eLpNorm (f n) 1 μ ≤ R) (hab : a < b) : ∀ᵐ ω ∂μ, upcrossings a b f ω < ∞ 
goal: ∀ᵐ (ω : Ω) ∂μ, MeasureTheory.upcrossings a b f ω < ⊤

full_name: MeasureTheory.Submartingale.upcrossings_ae_lt_top
code: theorem Submartingale.upcrossings_ae_lt_top [IsFiniteMeasure μ] (hf : Submartingale f ℱ μ)
    (hbdd : ∀ n, eLpNorm (f n) 1 μ ≤ R) : ∀ᵐ ω ∂μ, ∀ a b : ℚ, a < b → upcrossings a b f ω < ∞ 
goal: ∀ᵐ (ω : Ω) ∂μ, ∀ (a b : ℚ), a < b → MeasureTheory.upcrossings (↑a) (↑b) f ω < ⊤

full_name: MeasureTheory.Submartingale.exists_ae_tendsto_of_bdd
code: /-- An L¹-bounded submartingale converges almost everywhere. -/
theorem Submartingale.exists_ae_tendsto_of_bdd [IsFiniteMeasure μ] (hf : Submartingale f ℱ μ)
    (hbdd : ∀ n, eLpNorm (f n) 1 μ ≤ R) : ∀ᵐ ω ∂μ, ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c) 
goal: ∀ᵐ (ω : Ω) ∂μ, ∃ c, Filter.Tendsto (fun n => f n ω) Filter.atTop (𝓝 c)

full_name: MeasureTheory.Submartingale.exists_ae_trim_tendsto_of_bdd
code: theorem Submartingale.exists_ae_trim_tendsto_of_bdd [IsFiniteMeasure μ] (hf : Submartingale f ℱ μ)
    (hbdd : ∀ n, eLpNorm (f n) 1 μ ≤ R) :
    ∀ᵐ ω ∂μ.trim (sSup_le fun m ⟨n, hn⟩ => hn ▸ ℱ.le _ : ⨆ n, ℱ n ≤ m0),
      ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c) 
goal: ∀ᵐ (ω : Ω) ∂μ.trim ⋯, ∃ c, Filter.Tendsto (fun n => f n ω) Filter.atTop (𝓝 c)

full_name: MeasureTheory.Submartingale.ae_tendsto_limitProcess
code: /-- **Almost everywhere martingale convergence theorem**: An L¹-bounded submartingale converges
almost everywhere to a `⨆ n, ℱ n`-measurable function. -/
theorem Submartingale.ae_tendsto_limitProcess [IsFiniteMeasure μ] (hf : Submartingale f ℱ μ)
    (hbdd : ∀ n, eLpNorm (f n) 1 μ ≤ R) :
    ∀ᵐ ω ∂μ, Tendsto (fun n => f n ω) atTop (𝓝 (ℱ.limitProcess f μ ω)) 
goal: ∀ᵐ (ω : Ω) ∂μ, Filter.Tendsto (fun n => f n ω) Filter.atTop (𝓝 (MeasureTheory.Filtration.limitProcess f ℱ μ ω))

full_name: MeasureTheory.Submartingale.memℒp_limitProcess
code: /-- The limiting process of an Lᵖ-bounded submartingale is Lᵖ. -/
theorem Submartingale.memℒp_limitProcess {p : ℝ≥0∞} (hf : Submartingale f ℱ μ)
    (hbdd : ∀ n, eLpNorm (f n) p μ ≤ R) : Memℒp (ℱ.limitProcess f μ) p μ 
goal: MeasureTheory.Memℒp (MeasureTheory.Filtration.limitProcess f ℱ μ) p μ

full_name: MeasureTheory.Submartingale.tendsto_eLpNorm_one_limitProcess
code: /-- Part a of the **L¹ martingale convergence theorem**: a uniformly integrable submartingale
adapted to the filtration `ℱ` converges a.e. and in L¹ to an integrable function which is
measurable with respect to the σ-algebra `⨆ n, ℱ n`. -/
theorem Submartingale.tendsto_eLpNorm_one_limitProcess (hf : Submartingale f ℱ μ)
    (hunif : UniformIntegrable f 1 μ) :
    Tendsto (fun n => eLpNorm (f n - ℱ.limitProcess f μ) 1 μ) atTop (𝓝 0) 
goal: Filter.Tendsto (fun n => MeasureTheory.eLpNorm (f n - MeasureTheory.Filtration.limitProcess f ℱ μ) 1 μ) Filter.atTop
  (𝓝 0)

full_name: MeasureTheory.Submartingale.ae_tendsto_limitProcess_of_uniformIntegrable
code: theorem Submartingale.ae_tendsto_limitProcess_of_uniformIntegrable (hf : Submartingale f ℱ μ)
    (hunif : UniformIntegrable f 1 μ) :
    ∀ᵐ ω ∂μ, Tendsto (fun n => f n ω) atTop (𝓝 (ℱ.limitProcess f μ ω)) 
goal: ∀ᵐ (ω : Ω) ∂μ, Filter.Tendsto (fun n => f n ω) Filter.atTop (𝓝 (MeasureTheory.Filtration.limitProcess f ℱ μ ω))

full_name: MeasureTheory.Martingale.eq_condexp_of_tendsto_eLpNorm
code: /-- If a martingale `f` adapted to `ℱ` converges in L¹ to `g`, then for all `n`, `f n` is almost
everywhere equal to `𝔼[g | ℱ n]`. -/
theorem Martingale.eq_condexp_of_tendsto_eLpNorm {μ : Measure Ω} (hf : Martingale f ℱ μ)
    (hg : Integrable g μ) (hgtends : Tendsto (fun n => eLpNorm (f n - g) 1 μ) atTop (𝓝 0)) (n : ℕ) :
    f n =ᵐ[μ] μ[g|ℱ n] 
goal: f n =ᵐ[μ] μ[g|↑ℱ n]

full_name: MeasureTheory.Martingale.ae_eq_condexp_limitProcess
code: /-- Part b of the **L¹ martingale convergence theorem**: if `f` is a uniformly integrable martingale
adapted to the filtration `ℱ`, then for all `n`, `f n` is almost everywhere equal to the conditional
expectation of its limiting process wrt. `ℱ n`. -/
theorem Martingale.ae_eq_condexp_limitProcess (hf : Martingale f ℱ μ)
    (hbdd : UniformIntegrable f 1 μ) (n : ℕ) : f n =ᵐ[μ] μ[ℱ.limitProcess f μ|ℱ n] 
goal: f n =ᵐ[μ] μ[MeasureTheory.Filtration.limitProcess f ℱ μ|↑ℱ n]

full_name: MeasureTheory.Integrable.tendsto_ae_condexp
code: /-- Part c of the **L¹ martingale convergence theorem**: Given an integrable function `g` which
is measurable with respect to `⨆ n, ℱ n` where `ℱ` is a filtration, the martingale defined by
`𝔼[g | ℱ n]` converges almost everywhere to `g`.

This martingale also converges to `g` in L¹ and this result is provided by
`MeasureTheory.Integrable.tendsto_eLpNorm_condexp` -/
theorem Integrable.tendsto_ae_condexp (hg : Integrable g μ)
    (hgmeas : StronglyMeasurable[⨆ n, ℱ n] g) :
    ∀ᵐ x ∂μ, Tendsto (fun n => (μ[g|ℱ n]) x) atTop (𝓝 (g x)) 
goal: ∀ᵐ (x : Ω) ∂μ, Filter.Tendsto (fun n => (μ[g|↑ℱ n]) x) Filter.atTop (𝓝 (g x))

full_name: MeasureTheory.Integrable.tendsto_eLpNorm_condexp
code: /-- Part c of the **L¹ martingale convergence theorem**: Given an integrable function `g` which
is measurable with respect to `⨆ n, ℱ n` where `ℱ` is a filtration, the martingale defined by
`𝔼[g | ℱ n]` converges in L¹ to `g`.

This martingale also converges to `g` almost everywhere and this result is provided by
`MeasureTheory.Integrable.tendsto_ae_condexp` -/
theorem Integrable.tendsto_eLpNorm_condexp (hg : Integrable g μ)
    (hgmeas : StronglyMeasurable[⨆ n, ℱ n] g) :
    Tendsto (fun n => eLpNorm (μ[g|ℱ n] - g) 1 μ) atTop (𝓝 0) 
goal: Filter.Tendsto (fun n => MeasureTheory.eLpNorm (μ[g|↑ℱ n] - g) 1 μ) Filter.atTop (𝓝 0)

full_name: MeasureTheory.tendsto_ae_condexp
code: /-- **Lévy's upward theorem**, almost everywhere version: given a function `g` and a filtration
`ℱ`, the sequence defined by `𝔼[g | ℱ n]` converges almost everywhere to `𝔼[g | ⨆ n, ℱ n]`. -/
theorem tendsto_ae_condexp (g : Ω → ℝ) :
    ∀ᵐ x ∂μ, Tendsto (fun n => (μ[g|ℱ n]) x) atTop (𝓝 ((μ[g|⨆ n, ℱ n]) x)) 
goal: ∀ᵐ (x : Ω) ∂μ, Filter.Tendsto (fun n => (μ[g|↑ℱ n]) x) Filter.atTop (𝓝 ((μ[g|⨆ n, ↑ℱ n]) x))

full_name: MeasureTheory.tendsto_eLpNorm_condexp
code: /-- **Lévy's upward theorem**, L¹ version: given a function `g` and a filtration `ℱ`, the
sequence defined by `𝔼[g | ℱ n]` converges in L¹ to `𝔼[g | ⨆ n, ℱ n]`. -/
theorem tendsto_eLpNorm_condexp (g : Ω → ℝ) :
    Tendsto (fun n => eLpNorm (μ[g|ℱ n] - μ[g|⨆ n, ℱ n]) 1 μ) atTop (𝓝 0) 
goal: Filter.Tendsto (fun n => MeasureTheory.eLpNorm (μ[g|↑ℱ n] - μ[g|⨆ n, ↑ℱ n]) 1 μ) Filter.atTop (𝓝 0)