The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V20. Probability

Mathlib.Probability.Martingale.Upcrossing

68 declarations. Mathlib docs · Source

Doob's upcrossing estimate

Given a discrete real-valued submartingale $(f_n)_{n \in \mathbb{N}}$, denoting by $U_N(a, b)$ the number of times $f_n$ crossed from below $a$ to above $b$ before time $N$, Doob's upcrossing estimate (also known as Doob's inequality) states that $$(b - a) \mathbb{E}[U_N(a, b)] \le \mathbb{E}[(f_N - a)^+].$$ Doob's upcrossing estimate is an important inequality and is central in proving the martingale convergence theorems.

Main definitions

  • MeasureTheory.upperCrossingTime a b f N n: is the stopping time corresponding to f crossing above b the n-th time before time N (if this does not occur then the value is taken to be N).
  • MeasureTheory.lowerCrossingTime a b f N n: is the stopping time corresponding to f crossing below a the n-th time before time N (if this does not occur then the value is taken to be N).
  • MeasureTheory.upcrossingStrat a b f N: is the predictable process which is 1 if n is between a consecutive pair of lower and upper crossings and is 0 otherwise. Intuitively one might think of the upcrossingStrat as the strategy of buying 1 share whenever the process crosses below a for the first time after selling and selling 1 share whenever the process crosses above b for the first time after buying.
  • MeasureTheory.upcrossingsBefore a b f N: is the number of times f crosses from below a to above b before time N.
  • MeasureTheory.upcrossings a b f: is the number of times f crosses from below a to above b. This takes value in ℝ≥0∞ and so is allowed to be ∞.

Main results

  • MeasureTheory.StronglyAdapted.isStoppingTime_upperCrossingTime: upperCrossingTime is a stopping time whenever the process it is associated to is adapted.
  • MeasureTheory.StronglyAdapted.isStoppingTime_lowerCrossingTime: lowerCrossingTime is a stopping time whenever the process it is associated to is adapted.
  • MeasureTheory.Submartingale.mul_integral_upcrossingsBefore_le_integral_pos_part: Doob's upcrossing estimate.
  • MeasureTheory.Submartingale.mul_lintegral_upcrossings_le_lintegral_pos_part: the inequality obtained by taking the supremum on both sides of Doob's upcrossing estimate.

References

We mostly follow the proof from [Kallenberg, Foundations of modern probability][kallenberg2021]

Proof outline

In this section, we will denote by $U_N(a, b)$ the number of upcrossings of $(f_n)$ from below $a$ to above $b$ before time $N$.

To define $U_N(a, b)$, we will construct two stopping times corresponding to when $(f_n)$ crosses below $a$ and above $b$. Namely, we define $$ \sigma_n := \inf {n \ge \tau_n \mid f_n \le a} \wedge N; $$ $$ \tau_{n + 1} := \inf {n \ge \sigma_n \mid f_n \ge b} \wedge N. $$ These are lowerCrossingTime and upperCrossingTime in our formalization which are defined using MeasureTheory.hittingBtwn allowing us to specify a starting and ending time. Then, we may simply define $U_N(a, b) := \sup {n \mid \tau_n < N}$.

Fixing $a < b \in \mathbb{R}$, we will first prove the theorem in the special case that $0 \le f_0$ and $a \le f_N$. In particular, we will show $$ (b - a) \mathbb{E}[U_N(a, b)] \le \mathbb{E}[f_N]. $$ This is MeasureTheory.integral_mul_upcrossingsBefore_le_integral in our formalization.

To prove this, we use the fact that given a non-negative, bounded, predictable process $(C_n)$ (i.e. $(C_{n + 1})$ is strongly adapted), $(C \bullet f)n := \sum{k \le n} C_{k + 1}(f_{k + 1} - f_k)$ is a submartingale if $(f_n)$ is.

Define $C_n := \sum_{k \le n} \mathbf{1}{[\sigma_k, \tau{k + 1})}(n)$. It is easy to see that $(1 - C_n)$ is non-negative, bounded and predictable, and hence, given a submartingale $(f_n)$, $(1 - C) \bullet f$ is also a submartingale. Thus, by the submartingale property, $0 \le \mathbb{E}[((1 - C) \bullet f)_0] \le \mathbb{E}[((1 - C) \bullet f)_N]$ implying $$ \mathbb{E}[(C \bullet f)_N] \le \mathbb{E}[(1 \bullet f)_N] = \mathbb{E}[f_N] - \mathbb{E}[f_0]. $$

Furthermore, $$ \begin{align} (C \bullet f)N & = \sum{n \le N} \sum_{k \le N} \mathbf{1}{[\sigma_k, \tau{k + 1})}(n)(f_{n + 1} - f_n)\ & = \sum_{k \le N} \sum_{n \le N} \mathbf{1}{[\sigma_k, \tau{k + 1})}(n)(f_{n + 1} - f_n)\ & = \sum_{k \le N} (f_{\sigma_k + 1} - f_{\sigma_k} + f_{\sigma_k + 2} - f_{\sigma_k + 1} + \cdots + f_{\tau_{k + 1}} - f_{\tau_{k + 1} - 1})\ & = \sum_{k \le N} (f_{\tau_{k + 1}} - f_{\sigma_k}) \ge \sum_{k < U_N(a, b)} (b - a) = (b - a) U_N(a, b) \end{align} $$ where the inequality follows since for all $k < U_N(a, b)$, $f_{\tau_{k + 1}} - f_{\sigma_k} \ge b - a$ while for all $k > U_N(a, b)$, $f_{\tau_{k + 1}} = f_{\sigma_k} = f_N$ and $f_{\tau_{U_N(a, b) + 1}} - f_{\sigma_{U_N(a, b)}} = f_N - a \ge 0$. Hence, we have $$ (b - a) \mathbb{E}[U_N(a, b)] \le \mathbb{E}[(C \bullet f)_N] \le \mathbb{E}[f_N] - \mathbb{E}[f_0] \le \mathbb{E}[f_N], $$ as required.

To obtain the general case, we simply apply the above to $((f_n - a)^+)_n$.

Variant of the upcrossing estimate

Now, we would like to prove a variant of the upcrossing estimate obtained by taking the supremum over $N$ of the original upcrossing estimate. Namely, we want the inequality $$ (b - a) \sup_N \mathbb{E}[U_N(a, b)] \le \sup_N \mathbb{E}[f_N]. $$ This inequality is central for the martingale convergence theorem as it provides a uniform bound for the upcrossings.

We note that on top of taking the supremum on both sides of the inequality, we had also used the monotone convergence theorem on the left-hand side to take the supremum outside of the integral. To do this, we need to make sure $U_N(a, b)$ is measurable and integrable. Integrability is easy to check as $U_N(a, b) ≤ N$ and so it suffices to show measurability. Indeed, by noting that $$ U_N(a, b) = \sum_{i = 1}^N \mathbf{1}_{{U_N(a, b) < N}} $$ $U_N(a, b)$ is measurable as ${U_N(a, b) < N}$ is a measurable set since $U_N(a, b)$ is a stopping time.

theorem MeasureTheory.upperCrossingTime.match_1.congr_eq_1 E1 #

∀ (motive : ℕ → Sort u_1) (x : ℕ) (h_1 : Unit → motive 0) (h_2 : (n : ℕ) → motive n.succ),
  x = 0 →
    (match x with
      | 0 => h_1 ()
      | n.succ => h_2 n) ≍
      h_1 ()

theorem MeasureTheory.upperCrossingTime.match_1.congr_eq_2 E1 #

∀ (motive : ℕ → Sort u_1) (x : ℕ) (h_1 : Unit → motive 0) (h_2 : (n : ℕ) → motive n.succ) (n : ℕ),
  x = n.succ →
    (match x with
      | 0 => h_1 ()
      | n.succ => h_2 n) ≍
      h_2 n

def MeasureTheory.lowerCrossingTimeAux E0 #

{Ω : Type u_1} → {ι : Type u_2} → [Preorder ι] → [InfSet ι] → ℝ → (ι → Ω → ℝ) → ι → ι → Ω → ι

lowerCrossingTimeAux a f c N is the first time f reached below a after time c before time N.

def MeasureTheory.upperCrossingTime E3 #

{Ω : Type u_1} → {ι : Type u_2} → [inst : Preorder ι] → [OrderBot ι] → [InfSet ι] → ℝ → ℝ → (ι → Ω → ℝ) → ι → ℕ → Ω → ι

upperCrossingTime a b f N n is the first time before time N, f reaches above b after f reached below a for the n - 1-th time.

def MeasureTheory.lowerCrossingTime E3 #

{Ω : Type u_1} → {ι : Type u_2} → [inst : Preorder ι] → [OrderBot ι] → [InfSet ι] → ℝ → ℝ → (ι → Ω → ℝ) → ι → ℕ → Ω → ι

lowerCrossingTime a b f N n is the first time before time N, f reaches below a after f reached above b for the n-th time.

theorem MeasureTheory.upperCrossingTime_zero E0 #

∀ {Ω : Type u_1} {ι : Type u_2} [inst : Preorder ι] [inst_1 : OrderBot ι] [inst_2 : InfSet ι] {a b : ℝ} {f : ι → Ω → ℝ}
  {N : ι}, MeasureTheory.upperCrossingTime a b f N 0 = ⊥

theorem MeasureTheory.lowerCrossingTime_zero E0 #

∀ {Ω : Type u_1} {ι : Type u_2} [inst : Preorder ι] [inst_1 : OrderBot ι] [inst_2 : InfSet ι] {a b : ℝ} {f : ι → Ω → ℝ}
  {N : ι}, MeasureTheory.lowerCrossingTime a b f N 0 = MeasureTheory.hittingBtwn f (Set.Iic a) ⊥ N

theorem MeasureTheory.upperCrossingTime_succ E1 #

∀ {Ω : Type u_1} {ι : Type u_2} [inst : Preorder ι] [inst_1 : OrderBot ι] [inst_2 : InfSet ι] {a b : ℝ} {f : ι → Ω → ℝ}
  {N : ι} {n : ℕ} {ω : Ω},
  MeasureTheory.upperCrossingTime a b f N (n + 1) ω =
    MeasureTheory.hittingBtwn f (Set.Ici b)
      (MeasureTheory.lowerCrossingTimeAux a f (MeasureTheory.upperCrossingTime a b f N n ω) N ω) N ω

theorem MeasureTheory.upperCrossingTime_succ_eq E0 #

∀ {Ω : Type u_1} {ι : Type u_2} [inst : Preorder ι] [inst_1 : OrderBot ι] [inst_2 : InfSet ι] {a b : ℝ} {f : ι → Ω → ℝ}
  {N : ι} {n : ℕ} (ω : Ω),
  MeasureTheory.upperCrossingTime a b f N (n + 1) ω =
    MeasureTheory.hittingBtwn f (Set.Ici b) (MeasureTheory.lowerCrossingTime a b f N n ω) N ω

theorem MeasureTheory.upperCrossingTime_le E1 #

∀ {Ω : Type u_1} {ι : Type u_2} [inst : ConditionallyCompleteLinearOrderBot ι] {a b : ℝ} {f : ι → Ω → ℝ} {N : ι} {n : ℕ}
  {ω : Ω}, MeasureTheory.upperCrossingTime a b f N n ω ≤ N

theorem MeasureTheory.upperCrossingTime_zero' E0 #

∀ {Ω : Type u_1} {ι : Type u_2} [inst : ConditionallyCompleteLinearOrderBot ι] {a b : ℝ} {f : ι → Ω → ℝ} {n : ℕ}
  {ω : Ω}, MeasureTheory.upperCrossingTime a b f ⊥ n ω = ⊥

theorem MeasureTheory.lowerCrossingTime_le E1 #

∀ {Ω : Type u_1} {ι : Type u_2} [inst : ConditionallyCompleteLinearOrderBot ι] {a b : ℝ} {f : ι → Ω → ℝ} {N : ι} {n : ℕ}
  {ω : Ω}, MeasureTheory.lowerCrossingTime a b f N n ω ≤ N

theorem MeasureTheory.upperCrossingTime_le_lowerCrossingTime E1 #

∀ {Ω : Type u_1} {ι : Type u_2} [inst : ConditionallyCompleteLinearOrderBot ι] {a b : ℝ} {f : ι → Ω → ℝ} {N : ι} {n : ℕ}
  {ω : Ω}, MeasureTheory.upperCrossingTime a b f N n ω ≤ MeasureTheory.lowerCrossingTime a b f N n ω

theorem MeasureTheory.lowerCrossingTime_le_upperCrossingTime_succ E1 #

∀ {Ω : Type u_1} {ι : Type u_2} [inst : ConditionallyCompleteLinearOrderBot ι] {a b : ℝ} {f : ι → Ω → ℝ} {N : ι} {n : ℕ}
  {ω : Ω}, MeasureTheory.lowerCrossingTime a b f N n ω ≤ MeasureTheory.upperCrossingTime a b f N (n + 1) ω

theorem MeasureTheory.lowerCrossingTime_mono E1 #

∀ {Ω : Type u_1} {ι : Type u_2} [inst : ConditionallyCompleteLinearOrderBot ι] {a b : ℝ} {f : ι → Ω → ℝ} {N : ι}
  {n m : ℕ} {ω : Ω}, n ≤ m → MeasureTheory.lowerCrossingTime a b f N n ω ≤ MeasureTheory.lowerCrossingTime a b f N m ω

theorem MeasureTheory.upperCrossingTime_mono E1 #

∀ {Ω : Type u_1} {ι : Type u_2} [inst : ConditionallyCompleteLinearOrderBot ι] {a b : ℝ} {f : ι → Ω → ℝ} {N : ι}
  {n m : ℕ} {ω : Ω}, n ≤ m → MeasureTheory.upperCrossingTime a b f N n ω ≤ MeasureTheory.upperCrossingTime a b f N m ω

theorem MeasureTheory.stoppedValue_lowerCrossingTime E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω},
  MeasureTheory.lowerCrossingTime a b f N n ω ≠ N →
    MeasureTheory.stoppedValue f (fun ω ↦ ↑(MeasureTheory.lowerCrossingTime a b f N n ω)) ω ≤ a

theorem MeasureTheory.stoppedValue_upperCrossingTime E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω},
  MeasureTheory.upperCrossingTime a b f N (n + 1) ω ≠ N →
    b ≤ MeasureTheory.stoppedValue f (fun ω ↦ ↑(MeasureTheory.upperCrossingTime a b f N (n + 1) ω)) ω

theorem MeasureTheory.upperCrossingTime_lt_lowerCrossingTime E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω},
  a < b →
    MeasureTheory.lowerCrossingTime a b f N (n + 1) ω ≠ N →
      MeasureTheory.upperCrossingTime a b f N (n + 1) ω < MeasureTheory.lowerCrossingTime a b f N (n + 1) ω

theorem MeasureTheory.lowerCrossingTime_lt_upperCrossingTime E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω},
  a < b →
    MeasureTheory.upperCrossingTime a b f N (n + 1) ω ≠ N →
      MeasureTheory.lowerCrossingTime a b f N n ω < MeasureTheory.upperCrossingTime a b f N (n + 1) ω

theorem MeasureTheory.upperCrossingTime_lt_succ E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω},
  a < b →
    MeasureTheory.upperCrossingTime a b f N (n + 1) ω ≠ N →
      MeasureTheory.upperCrossingTime a b f N n ω < MeasureTheory.upperCrossingTime a b f N (n + 1) ω

theorem MeasureTheory.lowerCrossingTime_stabilize E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n m : ℕ} {ω : Ω},
  n ≤ m → MeasureTheory.lowerCrossingTime a b f N n ω = N → MeasureTheory.lowerCrossingTime a b f N m ω = N

theorem MeasureTheory.upperCrossingTime_stabilize E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n m : ℕ} {ω : Ω},
  n ≤ m → MeasureTheory.upperCrossingTime a b f N n ω = N → MeasureTheory.upperCrossingTime a b f N m ω = N

theorem MeasureTheory.lowerCrossingTime_stabilize' E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n m : ℕ} {ω : Ω},
  n ≤ m → N ≤ MeasureTheory.lowerCrossingTime a b f N n ω → MeasureTheory.lowerCrossingTime a b f N m ω = N

theorem MeasureTheory.upperCrossingTime_stabilize' E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n m : ℕ} {ω : Ω},
  n ≤ m → N ≤ MeasureTheory.upperCrossingTime a b f N n ω → MeasureTheory.upperCrossingTime a b f N m ω = N

theorem MeasureTheory.exists_upperCrossingTime_eq E0 #

∀ {Ω : Type u_1} {a b : ℝ} (f : ℕ → Ω → ℝ) (N : ℕ) (ω : Ω), a < b → ∃ n, MeasureTheory.upperCrossingTime a b f N n ω = N

theorem MeasureTheory.upperCrossingTime_lt_bddAbove E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N : ℕ} {ω : Ω},
  a < b → BddAbove {n | MeasureTheory.upperCrossingTime a b f N n ω < N}

theorem MeasureTheory.upperCrossingTime_lt_nonempty E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N : ℕ} {ω : Ω},
  0 < N → {n | MeasureTheory.upperCrossingTime a b f N n ω < N}.Nonempty

theorem MeasureTheory.upperCrossingTime_bound_eq E0 #

∀ {Ω : Type u_1} {a b : ℝ} (f : ℕ → Ω → ℝ) (N : ℕ) (ω : Ω), a < b → MeasureTheory.upperCrossingTime a b f N N ω = N

theorem MeasureTheory.upperCrossingTime_eq_of_bound_le E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω},
  a < b → N ≤ n → MeasureTheory.upperCrossingTime a b f N n ω = N

theorem MeasureTheory.StronglyAdapted.isStoppingTime_crossing E1 #

∀ {Ω : Type u_1} {m0 : MeasurableSpace Ω} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ℱ : MeasureTheory.Filtration ℕ m0},
  MeasureTheory.StronglyAdapted ℱ f →
    (MeasureTheory.IsStoppingTime ℱ fun ω ↦ ↑(MeasureTheory.upperCrossingTime a b f N n ω)) ∧
      MeasureTheory.IsStoppingTime ℱ fun ω ↦ ↑(MeasureTheory.lowerCrossingTime a b f N n ω)

theorem MeasureTheory.StronglyAdapted.isStoppingTime_upperCrossingTime E3 #

∀ {Ω : Type u_1} {m0 : MeasurableSpace Ω} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ℱ : MeasureTheory.Filtration ℕ m0},
  MeasureTheory.StronglyAdapted ℱ f →
    MeasureTheory.IsStoppingTime ℱ fun ω ↦ ↑(MeasureTheory.upperCrossingTime a b f N n ω)

theorem MeasureTheory.StronglyAdapted.isStoppingTime_lowerCrossingTime E3 #

∀ {Ω : Type u_1} {m0 : MeasurableSpace Ω} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ℱ : MeasureTheory.Filtration ℕ m0},
  MeasureTheory.StronglyAdapted ℱ f →
    MeasureTheory.IsStoppingTime ℱ fun ω ↦ ↑(MeasureTheory.lowerCrossingTime a b f N n ω)

def MeasureTheory.upcrossingStrat E3 #

{Ω : Type u_1} → ℝ → ℝ → (ℕ → Ω → ℝ) → ℕ → ℕ → Ω → ℝ

upcrossingStrat a b f N n is 1 if n is between a consecutive pair of lower and upper crossings and is 0 otherwise. upcrossingStrat is shifted by one index so that it is adapted rather than predictable.

theorem MeasureTheory.upcrossingStrat_nonneg E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω}, 0 ≤ MeasureTheory.upcrossingStrat a b f N n ω

theorem MeasureTheory.upcrossingStrat_le_one E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω}, MeasureTheory.upcrossingStrat a b f N n ω ≤ 1

theorem MeasureTheory.StronglyAdapted.upcrossingStrat E3 #

∀ {Ω : Type u_1} {m0 : MeasurableSpace Ω} {a b : ℝ} {f : ℕ → Ω → ℝ} {N : ℕ} {ℱ : MeasureTheory.Filtration ℕ m0},
  MeasureTheory.StronglyAdapted ℱ f → MeasureTheory.StronglyAdapted ℱ (MeasureTheory.upcrossingStrat a b f N)

theorem MeasureTheory.Submartingale.sum_upcrossingStrat_mul E1 #

∀ {Ω : Type u_1} {m0 : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {f : ℕ → Ω → ℝ}
  {ℱ : MeasureTheory.Filtration ℕ m0} [MeasureTheory.IsFiniteMeasure μ],
  MeasureTheory.Submartingale f ℱ μ →
    ∀ (a b : ℝ) (N : ℕ),
      MeasureTheory.Submartingale
        (fun n ↦ ∑ k ∈ Finset.range n, MeasureTheory.upcrossingStrat a b f N k * (f (k + 1) - f k)) ℱ μ

theorem MeasureTheory.Submartingale.sum_sub_upcrossingStrat_mul E1 #

∀ {Ω : Type u_1} {m0 : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {f : ℕ → Ω → ℝ}
  {ℱ : MeasureTheory.Filtration ℕ m0} [MeasureTheory.IsFiniteMeasure μ],
  MeasureTheory.Submartingale f ℱ μ →
    ∀ (a b : ℝ) (N : ℕ),
      MeasureTheory.Submartingale
        (fun n ↦ ∑ k ∈ Finset.range n, (1 - MeasureTheory.upcrossingStrat a b f N k) * (f (k + 1) - f k)) ℱ μ

theorem MeasureTheory.Submartingale.sum_mul_upcrossingStrat_le E1 #

∀ {Ω : Type u_1} {m0 : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ}
  {ℱ : MeasureTheory.Filtration ℕ m0} [MeasureTheory.IsFiniteMeasure μ],
  MeasureTheory.Submartingale f ℱ μ →
    ∫ (x : Ω), (∑ k ∈ Finset.range n, MeasureTheory.upcrossingStrat a b f N k * (f (k + 1) - f k)) x ∂μ ≤
      ∫ (x : Ω), f n x ∂μ - ∫ (x : Ω), f 0 x ∂μ

def MeasureTheory.upcrossingsBefore E1 #

{Ω : Type u_1} → {ι : Type u_2} → [inst : Preorder ι] → [OrderBot ι] → [InfSet ι] → ℝ → ℝ → (ι → Ω → ℝ) → ι → Ω → ℕ

The number of upcrossings (strictly) before time N.

theorem MeasureTheory.upcrossingsBefore_bot E0 #

∀ {Ω : Type u_1} {ι : Type u_2} [inst : Preorder ι] [inst_1 : OrderBot ι] [inst_2 : InfSet ι] {a b : ℝ} {f : ι → Ω → ℝ}
  {ω : Ω}, MeasureTheory.upcrossingsBefore a b f ⊥ ω = ⊥

theorem MeasureTheory.upcrossingsBefore_zero E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {ω : Ω}, MeasureTheory.upcrossingsBefore a b f 0 ω = 0

theorem MeasureTheory.upcrossingsBefore_zero' E0 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ}, MeasureTheory.upcrossingsBefore a b f 0 = 0

theorem MeasureTheory.upperCrossingTime_lt_of_le_upcrossingsBefore E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω},
  0 < N → a < b → n ≤ MeasureTheory.upcrossingsBefore a b f N ω → MeasureTheory.upperCrossingTime a b f N n ω < N

theorem MeasureTheory.upperCrossingTime_eq_of_upcrossingsBefore_lt E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω},
  a < b → MeasureTheory.upcrossingsBefore a b f N ω < n → MeasureTheory.upperCrossingTime a b f N n ω = N

theorem MeasureTheory.upcrossingsBefore_le E1 #

∀ {Ω : Type u_1} {a b : ℝ} {N : ℕ} (f : ℕ → Ω → ℝ) (ω : Ω), a < b → MeasureTheory.upcrossingsBefore a b f N ω ≤ N

theorem MeasureTheory.crossing_eq_crossing_of_lowerCrossingTime_lt E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω} {M : ℕ},
  N ≤ M →
    MeasureTheory.lowerCrossingTime a b f N n ω < N →
      MeasureTheory.upperCrossingTime a b f M n ω = MeasureTheory.upperCrossingTime a b f N n ω ∧
        MeasureTheory.lowerCrossingTime a b f M n ω = MeasureTheory.lowerCrossingTime a b f N n ω

theorem MeasureTheory.crossing_eq_crossing_of_upperCrossingTime_lt E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω} {M : ℕ},
  N ≤ M →
    MeasureTheory.upperCrossingTime a b f N (n + 1) ω < N →
      MeasureTheory.upperCrossingTime a b f M (n + 1) ω = MeasureTheory.upperCrossingTime a b f N (n + 1) ω ∧
        MeasureTheory.lowerCrossingTime a b f M n ω = MeasureTheory.lowerCrossingTime a b f N n ω

theorem MeasureTheory.upperCrossingTime_eq_upperCrossingTime_of_lt E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω} {M : ℕ},
  N ≤ M →
    MeasureTheory.upperCrossingTime a b f N n ω < N →
      MeasureTheory.upperCrossingTime a b f M n ω = MeasureTheory.upperCrossingTime a b f N n ω

theorem MeasureTheory.upcrossingsBefore_mono E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ}, a < b → Monotone fun N ω ↦ MeasureTheory.upcrossingsBefore a b f N ω

theorem MeasureTheory.upcrossingsBefore_lt_of_exists_upcrossing E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N : ℕ} {ω : Ω},
  a < b →
    ∀ {N₁ N₂ : ℕ},
      N ≤ N₁ →
        f N₁ ω < a →
          N₁ ≤ N₂ →
            b < f N₂ ω → MeasureTheory.upcrossingsBefore a b f N ω < MeasureTheory.upcrossingsBefore a b f (N₂ + 1) ω

theorem MeasureTheory.lowerCrossingTime_lt_of_lt_upcrossingsBefore E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω},
  0 < N → a < b → n < MeasureTheory.upcrossingsBefore a b f N ω → MeasureTheory.lowerCrossingTime a b f N n ω < N

theorem MeasureTheory.le_sub_of_le_upcrossingsBefore E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω},
  0 < N →
    a < b →
      n < MeasureTheory.upcrossingsBefore a b f N ω →
        b - a ≤
          MeasureTheory.stoppedValue f (fun ω ↦ ↑(MeasureTheory.upperCrossingTime a b f N (n + 1) ω)) ω -
            MeasureTheory.stoppedValue f (fun ω ↦ ↑(MeasureTheory.lowerCrossingTime a b f N n ω)) ω

theorem MeasureTheory.sub_eq_zero_of_upcrossingsBefore_lt E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ} {ω : Ω},
  a < b →
    MeasureTheory.upcrossingsBefore a b f N ω < n →
      MeasureTheory.stoppedValue f (fun ω ↦ ↑(MeasureTheory.upperCrossingTime a b f N (n + 1) ω)) ω -
          MeasureTheory.stoppedValue f (fun ω ↦ ↑(MeasureTheory.lowerCrossingTime a b f N n ω)) ω =
        0

theorem MeasureTheory.mul_upcrossingsBefore_le E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N : ℕ} {ω : Ω},
  a ≤ f N ω →
    a < b →
      (b - a) * ↑(MeasureTheory.upcrossingsBefore a b f N ω) ≤
        ∑ k ∈ Finset.range N, MeasureTheory.upcrossingStrat a b f N k ω * (f (k + 1) - f k) ω

theorem MeasureTheory.integral_mul_upcrossingsBefore_le_integral E1 #

∀ {Ω : Type u_1} {m0 : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {a b : ℝ} {f : ℕ → Ω → ℝ} {N : ℕ}
  {ℱ : MeasureTheory.Filtration ℕ m0} [MeasureTheory.IsFiniteMeasure μ],
  MeasureTheory.Submartingale f ℱ μ →
    (∀ (ω : Ω), a ≤ f N ω) →
      0 ≤ f 0 → a < b → (b - a) * ∫ (x : Ω), ↑(MeasureTheory.upcrossingsBefore a b f N x) ∂μ ≤ ∫ (x : Ω), f N x ∂μ

theorem MeasureTheory.crossing_pos_eq E0 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N n : ℕ},
  a < b →
    MeasureTheory.upperCrossingTime 0 (b - a) (fun n ω ↦ (f n ω - a)⁺) N n = MeasureTheory.upperCrossingTime a b f N n ∧
      MeasureTheory.lowerCrossingTime 0 (b - a) (fun n ω ↦ (f n ω - a)⁺) N n = MeasureTheory.lowerCrossingTime a b f N n

theorem MeasureTheory.upcrossingsBefore_pos_eq E0 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N : ℕ} {ω : Ω},
  a < b →
    MeasureTheory.upcrossingsBefore 0 (b - a) (fun n ω ↦ (f n ω - a)⁺) N ω = MeasureTheory.upcrossingsBefore a b f N ω

theorem MeasureTheory.mul_integral_upcrossingsBefore_le_integral_pos_part_aux E0 #

∀ {Ω : Type u_1} {m0 : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {a b : ℝ} {f : ℕ → Ω → ℝ} {N : ℕ}
  {ℱ : MeasureTheory.Filtration ℕ m0} [MeasureTheory.IsFiniteMeasure μ],
  MeasureTheory.Submartingale f ℱ μ →
    a < b →
      (b - a) * ∫ (x : Ω), ↑(MeasureTheory.upcrossingsBefore a b f N x) ∂μ ≤ ∫ (x : Ω), (fun ω ↦ (f N ω - a)⁺) x ∂μ

theorem MeasureTheory.Submartingale.mul_integral_upcrossingsBefore_le_integral_pos_part E3 #

∀ {Ω : Type u_1} {m0 : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {f : ℕ → Ω → ℝ}
  {ℱ : MeasureTheory.Filtration ℕ m0} [MeasureTheory.IsFiniteMeasure μ] (a b : ℝ),
  MeasureTheory.Submartingale f ℱ μ →
    ∀ (N : ℕ),
      (b - a) * ∫ (x : Ω), ↑(MeasureTheory.upcrossingsBefore a b f N x) ∂μ ≤ ∫ (x : Ω), (fun ω ↦ (f N ω - a)⁺) x ∂μ

Doob's upcrossing estimate: given a real-valued discrete submartingale f and real values a and b, we have (b - a) * 𝔼[upcrossingsBefore a b f N] ≤ 𝔼[(f N - a)⁺] where upcrossingsBefore a b f N is the number of times the process f crossed from below a to above b before the time N.

theorem MeasureTheory.upcrossingsBefore_eq_sum E1 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {N : ℕ} {ω : Ω},
  a < b →
    MeasureTheory.upcrossingsBefore a b f N ω =
      ∑ i ∈ Finset.Ico 1 (N + 1), {n | MeasureTheory.upperCrossingTime a b f N n ω < N}.indicator 1 i

theorem MeasureTheory.StronglyAdapted.measurable_upcrossingsBefore E1 #

∀ {Ω : Type u_1} {m0 : MeasurableSpace Ω} {a b : ℝ} {f : ℕ → Ω → ℝ} {N : ℕ} {ℱ : MeasureTheory.Filtration ℕ m0},
  MeasureTheory.StronglyAdapted ℱ f → a < b → Measurable (MeasureTheory.upcrossingsBefore a b f N)

theorem MeasureTheory.StronglyAdapted.integrable_upcrossingsBefore E1 #

∀ {Ω : Type u_1} {m0 : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {a b : ℝ} {f : ℕ → Ω → ℝ} {N : ℕ}
  {ℱ : MeasureTheory.Filtration ℕ m0} [MeasureTheory.IsFiniteMeasure μ],
  MeasureTheory.StronglyAdapted ℱ f →
    a < b → MeasureTheory.Integrable (fun ω ↦ ↑(MeasureTheory.upcrossingsBefore a b f N ω)) μ

def MeasureTheory.upcrossings E1 #

{Ω : Type u_1} → {ι : Type u_2} → [inst : Preorder ι] → [OrderBot ι] → [InfSet ι] → ℝ → ℝ → (ι → Ω → ℝ) → Ω → ENNReal

The number of upcrossings of a realization of a stochastic process (upcrossings takes value in ℝ≥0∞ and so is allowed to be ∞).

theorem MeasureTheory.StronglyAdapted.measurable_upcrossings E1 #

∀ {Ω : Type u_1} {m0 : MeasurableSpace Ω} {a b : ℝ} {f : ℕ → Ω → ℝ} {ℱ : MeasureTheory.Filtration ℕ m0},
  MeasureTheory.StronglyAdapted ℱ f → a < b → Measurable (MeasureTheory.upcrossings a b f)

theorem MeasureTheory.upcrossings_lt_top_iff E0 #

∀ {Ω : Type u_1} {a b : ℝ} {f : ℕ → Ω → ℝ} {ω : Ω},
  MeasureTheory.upcrossings a b f ω < ⊤ ↔ ∃ k, ∀ (N : ℕ), MeasureTheory.upcrossingsBefore a b f N ω ≤ k

theorem MeasureTheory.Submartingale.mul_lintegral_upcrossings_le_lintegral_pos_part E3 #

∀ {Ω : Type u_1} {m0 : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {f : ℕ → Ω → ℝ}
  {ℱ : MeasureTheory.Filtration ℕ m0} [MeasureTheory.IsFiniteMeasure μ] (a b : ℝ),
  MeasureTheory.Submartingale f ℱ μ →
    ENNReal.ofReal (b - a) * ∫⁻ (ω : Ω), MeasureTheory.upcrossings a b f ω ∂μ ≤
      ⨆ N, ∫⁻ (ω : Ω), ENNReal.ofReal (f N ω - a)⁺ ∂μ

A variant of Doob's upcrossing estimate obtained by taking the supremum on both sides.