Stat.CLT.Martingale­Array

Scalar martingale triangular-array central limit theory: predictable variance, conditional Lindeberg and Lyapunov conditions, stopping, and characteristic-function convergence without independence.

Basic 10 core · 0 supporting This module packages a real-valued, square-integrable martingale-difference triangular array whose rows may live on different probability spaces. ★ rowSum_aemeasurable

Martingale-difference triangular arrays

This module packages a real-valued, square-integrable martingale-difference triangular array whose rows may live on different probability spaces. Row lengths may vary with the row index. It also defines row sums, predictable quadratic variation, conditional Lindeberg sums, and conditional fourth-moment sums.

Increment k in row n is measurable with respect to filtration time k + 1 and has conditional mean zero at time k. Thus the indexing directly models the usual pair F_{n,k-1} ⊆ F_{n,k} without subtraction on natural numbers.

def TendstoInProbability reviewed
Causalean.Stat

Given one measure space for every row, a row-indexed family of real random variables converges in probability to the target constant when, at every positive tolerance, the row probability of exceeding that tolerance tends to zero.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
shared
μ :
(n : ℕ) → Measure (Ω n)
Y :
(n : ℕ) → Ω n → ℝ
c :
ε :
0 < ε
TendstoInProbability μ Y c :
Prop
Tendsto (fun n => μ n {ω | ε ≤ |Y n ω - c|}) atTop (𝓝 0)
Causalean.Stat.TendstoInProbability · Causalean/Stat/CLT/MartingaleArray/Basic.lean:29
def TendstoInDistribution reviewed
Causalean.Stat

Given one probability space for every row, almost-everywhere measurable row variables, and a target probability law, convergence in distribution to that law means weak convergence of the row pushforward laws.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
shared
μ :
(n : ℕ) → Measure (Ω n)
∀ n, IsProbabilityMeasure (μ n)
Y :
(n : ℕ) → Ω n → ℝ
hY :
∀ n, AEMeasurable (Y n) (μ n)
TendstoInDistribution μ Y Q hY :
Prop
Tendsto (β := ProbabilityMeasure ℝ) (fun n => ⟨(μ n).map (Y n), Measure.isProbabilityMeasure_map (hY n)⟩) atTop (𝓝 ⟨Q, ‹IsProbabilityMeasure Q›⟩)
Causalean.Stat.TendstoInDistribution · Causalean/Stat/CLT/MartingaleArray/Basic.lean:37
structure MartingaleDifferenceArray reviewed
Causalean.Stat

A martingale-difference triangular array consists of finite row lengths, real increments, and one filtration per row, such that each active increment is measurable at the next filtration time, is square integrable, and has conditional mean zero given the preceding filtration time; these data together form the array.

Definition (Lean source)
Ω :
ℕ → Type*
(n : ℕ) → MeasurableSpace (Ω n)
μ :
(n : ℕ) → Measure (Ω n)
rowLength :
ℕ → ℕ
increment :
(n k : ℕ) → Ω n → ℝ
filtration :
(n : ℕ) → Filtration ℕ (mΩ n)
adapted :
∀ n k
if
k < rowLength n
then
StronglyMeasurable[filtration n (k + 1)] (increment n k)
squareIntegrable :
∀ n k
if
k < rowLength n
then
MemLp (increment n k) 2 (μ n)
condExp_zero :
∀ n k
if
k < rowLength n
then
(μ n)[increment n k | filtration n k] =ᵐ[μ n] 0
Causalean.Stat.MartingaleDifferenceArray · Causalean/Stat/CLT/MartingaleArray/Basic.lean:48
def rowSum reviewed
Causalean.Stat.MartingaleDifferenceArray

The row sum is the sum of the increments whose indices are below that row's length.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
n :
rowSum A n :
Ω n → ℝ
∑ k ∈ range (A.rowLength n), A.increment n k
Causalean.Stat.MartingaleDifferenceArray.rowSum · Causalean/Stat/CLT/MartingaleArray/Basic.lean:67 · uses MartingaleDifferenceArray
lemma rowSum_aemeasurable reviewed
Causalean.Stat.MartingaleDifferenceArray

For a martingale-difference triangular array and one row, its row sum is almost-everywhere measurable under that row's probability measure.

Formal statement
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
n :
AEMeasurable (A.rowSum n) (μ n)
Proof (Lean source)
lemma rowSum_aemeasurable (A : MartingaleDifferenceArray Ω μ) (n : ℕ) : AEMeasurable (A.rowSum n) (μ n) := by unfold rowSum apply Finset.aemeasurable_sum intro k hk exact (A.squareIntegrable n k (Finset.mem_range.mp hk)).aemeasurable
Causalean.Stat.MartingaleDifferenceArray.rowSum_aemeasurable · Causalean/Stat/CLT/MartingaleArray/Basic.lean:71 · uses MartingaleDifferenceArray , rowSum
def predictableQuadraticVariation reviewed
Causalean.Stat.MartingaleDifferenceArray

The predictable quadratic variation of a row is the sum of the conditional second moments of its increments, each conditioned on the preceding filtration time.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
n :
predictableQuadraticVariation A n :
Ω n → ℝ
∑ k ∈ range (A.rowLength n), (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k]
Causalean.Stat.MartingaleDifferenceArray.predictableQuadraticVariation · Causalean/Stat/CLT/MartingaleArray/Basic.lean:80 · uses MartingaleDifferenceArray
def lindebergTerm reviewed
Causalean.Stat.MartingaleDifferenceArray

A conditional Lindeberg term is the conditional second moment of one increment after discarding values whose absolute size is at most the chosen threshold.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
ε :
n k :
lindebergTerm A ε n k :
Ω n → ℝ
(μ n)[fun ω => if ε < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0 | A.filtration n k]
Causalean.Stat.MartingaleDifferenceArray.lindebergTerm · Causalean/Stat/CLT/MartingaleArray/Basic.lean:87 · uses MartingaleDifferenceArray
def conditionalLindeberg reviewed
Causalean.Stat.MartingaleDifferenceArray

The conditional Lindeberg sum for a row adds its conditional truncated second moments over all increments in that row.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
ε :
n :
conditionalLindeberg A ε n :
Ω n → ℝ
∑ k ∈ range (A.rowLength n), A.lindebergTerm ε n k
Causalean.Stat.MartingaleDifferenceArray.conditionalLindeberg · Causalean/Stat/CLT/MartingaleArray/Basic.lean:94 · uses MartingaleDifferenceArray
def conditionalFourthMoment reviewed
Causalean.Stat.MartingaleDifferenceArray

The conditional fourth-moment sum for a row adds the conditional fourth moments of all increments, each conditioned on the preceding filtration time.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
n :
conditionalFourthMoment A n :
Ω n → ℝ
∑ k ∈ range (A.rowLength n), (μ n)[fun ω => (A.increment n k ω) ^ 4 | A.filtration n k]
Causalean.Stat.MartingaleDifferenceArray.conditionalFourthMoment · Causalean/Stat/CLT/MartingaleArray/Basic.lean:100 · uses MartingaleDifferenceArray
def fourthMomentSum reviewed
Causalean.Stat.MartingaleDifferenceArray

The unconditional fourth-moment sum is the deterministic sum of the fourth moments of the increments in one row.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
n :
fourthMomentSum A n :
∑ k ∈ range (A.rowLength n), ∫ ω, (A.increment n k ω) ^ 4 ∂(μ n)
Causalean.Stat.MartingaleDifferenceArray.fourthMomentSum · Causalean/Stat/CLT/MartingaleArray/Basic.lean:107 · uses MartingaleDifferenceArray
Exponential­Bounds 2 core · 2 supporting This module collects the elementary complex-exponential estimates used in the characteristic-function proof of the martingale triangular-array CLT. ★ norm_expQuadraticRemainder_le_truncated

Exponential remainder bounds for martingale CLTs

This module collects the elementary complex-exponential estimates used in the characteristic-function proof of the martingale triangular-array CLT. The estimates are deterministic and independent of the probability-space layer.

def expQuadraticRemainder reviewed
Causalean.Stat

The quadratic Taylor remainder of the characteristic-function kernel at a real argument u is exp(iu) - 1 - iu + u²/2.

Definition (Lean source)
u :
expQuadraticRemainder u :
exp (I * (u : ℂ)) - 1 - I * (u : ℂ) + (u : ℂ) ^ 2 / 2
theorem norm_expQuadraticRemainder_le_truncated reviewed
Causalean.Stat

Given a frequency, an increment, and a positive truncation level small enough that |t| · η ≤ 1 as assumed, the quadratic exponential remainder is bounded by a small cubic contribution plus a quadratic contribution supported on increments larger than η.

Formal statement
t x η :
:
0 < η
htη :
|t| * η ≤ 1
‖expQuadraticRemainder (t * x)‖
≤ |t| ^ 3 * η * x ^ 2 + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * (if η < |x| then x ^ 2 else 0)
Proof (Lean source)
theorem norm_expQuadraticRemainder_le_truncated (t x η : ℝ) (hη : 0 < η) (htη : |t| * η ≤ 1) : ‖expQuadraticRemainder (t * x)‖ ≤ |t| ^ 3 * η * x ^ 2 + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * (if η < |x| then x ^ 2 else 0) := by /- Split on `η < |x|`. On the small-increment branch, use `norm_expQuadraticRemainder_le_cube`, `|t*x| ≤ 1`, and `|x|³ ≤ η*x²`. On the large branch, use the global estimate and absorb `2` and `|t*x|` into multiples of `x²` using `0 < η < |x|`. -/ by_cases hx : η < |x| · rw [if_pos hx] have hηsq : 0 < η ^ 2 := sq_pos_of_pos hη have hsq : η ^ 2 ≤ x ^ 2 := by nlinarith [sq_abs x] have htwo : 2 ≤ 2 / η ^ 2 * x ^ 2 := by rw [div_mul_eq_mul_div] exact (le_div_iff₀ hηsq).2 (by nlinarith) have hηabs : η * |x| ≤ x ^ 2 := by have habs : 0 ≤ |x| := abs_nonneg x have hle : η ≤ |x| := hx.le nlinarith [sq_abs x] have hlin : |t * x| ≤ |t| / η * x ^ 2 := by rw [abs_mul, div_mul_eq_mul_div] apply (le_div_iff₀ hη).2 nlinarith [mul_nonneg (abs_nonneg t) (sub_nonneg.mpr hηabs)] have hquad : (t * x) ^ 2 / 2 = (t ^ 2 / 2) * x ^ 2 := by ring have hglobal := norm_expQuadraticRemainder_le_global (t * x) have hcubic : 0 ≤ |t| ^ 3 * η * x ^ 2 := by positivity calc ‖expQuadraticRemainder (t * x)‖ ≤ 2 + |t * x| + (t * x) ^ 2 / 2 := hglobal _ ≤ (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * x ^ 2 := by rw [hquad] nlinarith _ ≤ |t| ^ 3 * η * x ^ 2 + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * x ^ 2 := by linarith · rw [if_neg hx, mul_zero, add_zero] have hxle : |x| ≤ η := le_of_not_gt hx have htx : |t * x| ≤ 1 := by rw [abs_mul] exact (mul_le_mul_of_nonneg_left hxle (abs_nonneg t)).trans htη have hlocal := norm_expQuadraticRemainder_le_cube (t * x) htx have hxcube : |x| ^ 3 ≤ η * x ^ 2 := by calc |x| ^ 3 = |x| * x ^ 2 := by rw [pow_succ, sq_abs] ring _ ≤ η * x ^ 2 := mul_le_mul_of_nonneg_right hxle (sq_nonneg x) calc ‖expQuadraticRemainder (t * x)‖ ≤ |t * x| ^ 3 := hlocal _ = |t| ^ 3 * |x| ^ 3 := by rw [abs_mul, mul_pow] _ ≤ |t| ^ 3 * (η * x ^ 2) := mul_le_mul_of_nonneg_left hxcube (by positivity) _ = |t| ^ 3 * η * x ^ 2 := by ring
Causalean.Stat.norm_expQuadraticRemainder_le_truncated · Causalean/Stat/CLT/MartingaleArray/ExponentialBounds.lean:95 · uses expQuadraticRemainder
2 supporting declarations (lemmas, instances)
  • norm_expQuadraticRemainder_le_cube theorem — If the real argument has absolute value at most one, then the norm of the quadratic Taylor remainder of exp(iu) is at most |u|³.
    u :
    hu :
    |u| ≤ 1
    ‖expQuadraticRemainder u‖ ≤ |u| ^ 3
    Proof (Lean source)
    theorem norm_expQuadraticRemainder_le_cube (u : ℝ) (hu : |u| ≤ 1) : ‖expQuadraticRemainder u‖ ≤ |u| ^ 3 := by /- Normalize `expQuadraticRemainder` to the first three terms of the complex exponential series and apply `Complex.exp_bound` with `n = 3`. The resulting numerical coefficient is at most one, and `‖I * (u : ℂ)‖ = |u|`. -/ let z : ℂ := I * (u : ℂ) have hz : ‖z‖ ≤ 1 := by simp [z, hu] have hzsq : z ^ 2 = -((u : ℂ) ^ 2) := by dsimp [z] rw [mul_pow, pow_two I, Complex.I_mul_I] ring have hrem : expQuadraticRemainder u = exp z - 1 - z - z ^ 2 / 2 := by rw [expQuadraticRemainder] dsimp [z] rw [hzsq] ring have hsum : (∑ m ∈ range 3, z ^ m / m.factorial) = 1 + z + z ^ 2 / 2 := by norm_num [Finset.sum_range_succ, factorial] have h := Complex.exp_bound (x := z) (n := 3) hz (by norm_num) rw [hsum] at h rw [hrem] norm_num [factorial] at h calc ‖Complex.exp z - 1 - z - z ^ 2 / 2‖ = ‖Complex.exp z - (1 + z + z ^ 2 / 2)‖ := by congr 1 ring _ ≤ ‖z‖ ^ 3 * (2 / 9 : ℝ) := h _ ≤ ‖z‖ ^ 3 := by nlinarith [pow_nonneg (norm_nonneg z) 3] _ = |u| ^ 3 := by simp [z]
    Causalean.Stat.norm_expQuadraticRemainder_le_cube · Causalean/Stat/CLT/MartingaleArray/ExponentialBounds.lean:25
  • norm_expQuadraticRemainder_le_global theorem — For every real argument, the norm of the quadratic Taylor remainder of exp(iu) is bounded by 2 + |u| + u²/2.
    u :
    ‖expQuadraticRemainder u‖ ≤ 2 + |u| + u ^ 2 / 2
    Proof (Lean source)
    theorem norm_expQuadraticRemainder_le_global (u : ℝ) : ‖expQuadraticRemainder u‖ ≤ 2 + |u| + u ^ 2 / 2 := by /- Expand the definition, use the triangle inequality, and rewrite `‖exp (I * u)‖ = 1`, `‖I * u‖ = |u|`, and the norm of the real quadratic term. -/ rw [expQuadraticRemainder] calc ‖Complex.exp (I * (u : ℂ)) - 1 - I * (u : ℂ) + (u : ℂ) ^ 2 / 2‖ ≤ ‖Complex.exp (I * (u : ℂ)) - 1 - I * (u : ℂ)‖ + ‖(u : ℂ) ^ 2 / 2‖ := norm_add_le _ _ _ ≤ (‖Complex.exp (I * (u : ℂ)) - 1‖ + ‖Complex.I * (u : ℂ)‖) + ‖(u : ℂ) ^ 2 / 2‖ := by gcongr exact norm_sub_le _ _ _ ≤ ((‖Complex.exp (I * (u : ℂ))‖ + ‖(1 : ℂ)‖) + ‖Complex.I * (u : ℂ)‖) + ‖(u : ℂ) ^ 2 / 2‖ := by gcongr exact norm_sub_le _ _ _ = 2 + |u| + u ^ 2 / 2 := by have hone : ‖(1 : ℂ)‖ = 1 := by change ‖((1 : ℝ) : ℂ)‖ = 1 rw [Complex.norm_real, Real.norm_eq_abs] norm_num rw [Complex.norm_exp, hone] norm_num [Complex.norm_pow, Complex.norm_real, abs_of_nonneg (sq_nonneg u)]
    Causalean.Stat.norm_expQuadraticRemainder_le_global · Causalean/Stat/CLT/MartingaleArray/ExponentialBounds.lean:63
Compensated­Step 4 core · 4 supporting This module introduces the predictable-variance compensation used in the martingale-array CLT. ★ norm_integral_compensatedWeight_succ_sub_le

One-step compensated characteristic-function bounds

This module introduces the predictable-variance compensation used in the martingale-array CLT. It proves the exact conditional update and its one-step error bound before any finite-row telescoping or asymptotic argument.

def conditionalSecondMoment reviewed
Causalean.Stat.MartingaleDifferenceArray

The conditional second moment of one increment, given the filtration just before that increment, is its one-step predictable variance.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
n k :
conditionalSecondMoment A n k :
Ω n → ℝ
(μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k]
Causalean.Stat.MartingaleDifferenceArray.conditionalSecondMoment · Causalean/Stat/CLT/MartingaleArray/CompensatedStep.lean:26 · uses MartingaleDifferenceArray
def partialPredictableQuadraticVariation reviewed
Causalean.Stat.MartingaleDifferenceArray

The partial predictable quadratic variation through time r sums the one-step predictable variances of the first r active increments.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
n r :
partialPredictableQuadraticVariation A n r :
Ω n → ℝ
∑ k ∈ range (min r (A.rowLength n)), A.conditionalSecondMoment n k
Causalean.Stat.MartingaleDifferenceArray.partialPredictableQuadraticVariation · Causalean/Stat/CLT/MartingaleArray/CompensatedStep.lean:32 · uses MartingaleDifferenceArray
def compensatedWeight reviewed
Causalean.Stat.MartingaleDifferenceArray

The compensated characteristic-function weight at time r is the ordinary characteristic-function weight multiplied by the Gaussian correction generated by the partial predictable quadratic variation.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
n r :
t :
compensatedWeight A n r t :
Ω n → ℂ
fun ω
=> exp (I * ((t * A.partialRowSum n r ω : ℝ) : ℂ)) * ((exp ((t ^ 2 / 2) * (A.partialPredictableQuadraticVariation n r ω - 1)) : ℝ) : ℂ)
Causalean.Stat.MartingaleDifferenceArray.compensatedWeight · Causalean/Stat/CLT/MartingaleArray/CompensatedStep.lean:74 · uses MartingaleDifferenceArray
theorem norm_integral_compensatedWeight_succ_sub_le reviewed
Causalean.Stat.MartingaleDifferenceArray

For an active martingale increment, if the variance budget is nonnegative and the compensated predictable variance after that step is at most K, then the change in the integrated compensated weight is bounded by the integrated Taylor remainder and the squared one-step predictable variance.

Formal statement
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
∀ n, IsProbabilityMeasure (μ n)
n k :
hk :
k < A.rowLength n
t K :
hK :
0 ≤ K
hQ :
A.partialPredictableQuadraticVariation n (k + 1) ≤ᵐ[μ n] fun _ => K
‖(∫ ω, A.compensatedWeight n (k + 1) t ω ∂(μ n)) - ∫ ω, A.compensatedWeight n k t ω ∂(μ n)‖
exp ((t ^ 2 / 2) * K) * ((∫ ω, ‖expQuadraticRemainder (t * A.increment n k ω)‖ ∂(μ n)) + ((t ^ 2 / 2) ^ 2 / 2) * ∫ ω, (A.conditionalSecondMoment n k ω) ^ 2 ∂(μ n))
Proof (Lean source)
theorem norm_integral_compensatedWeight_succ_sub_le [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (n k : ℕ) (hk : k < A.rowLength n) (t K : ℝ) (hK : 0 ≤ K) (hQ : A.partialPredictableQuadraticVariation n (k + 1) ≤ᵐ[μ n] fun _ => K) : ‖(∫ ω, A.compensatedWeight n (k + 1) t ω ∂(μ n)) - ∫ ω, A.compensatedWeight n k t ω ∂(μ n)‖ ≤ exp ((t ^ 2 / 2) * K) * ((∫ ω, ‖expQuadraticRemainder (t * A.increment n k ω)‖ ∂(μ n)) + ((t ^ 2 / 2) ^ 2 / 2) * ∫ ω, (A.conditionalSecondMoment n k ω) ^ 2 ∂(μ n)) := by /- Use `integral_compensatedWeight_succ` and `norm_exp_mul_quadraticFactor_sub_one_le` pointwise. The product of the old correction and `exp(c v_k)` is bounded by `exp(c K)` via `hQ`; control the conditional remainder with `norm_integral_mul_condExp_le_of_ae_bound`. -/ let c : ℝ := t ^ 2 / 2 let v : Ω n → ℝ := A.conditionalSecondMoment n k let rem : Ω n → ℂ := fun ω => expQuadraticRemainder (t * A.increment n k ω) let w : Ω n → ℂ := A.compensatedWeight n k t let g : Ω n → ℂ := fun ω => w ω * ((exp (c * v ω) : ℝ) : ℂ) let euler : Ω n → ℂ := fun ω => w ω * (((exp (c * v ω) : ℝ) : ℂ) * (1 - (((c * v ω : ℝ) : ℂ))) - 1) let B : ℝ := exp (c * K) have hc : 0 ≤ c := by dsimp [c] positivity have hB : 0 ≤ B := by dsimp [B] positivity have hv : StronglyMeasurable[A.filtration n k] v := by exact stronglyMeasurable_condExp have hvNonneg : 0 ≤ᵐ[μ n] v := by dsimp [v, conditionalSecondMoment] exact condExp_nonneg (ae_of_all _ fun ω => sq_nonneg (A.increment n k ω)) have hQkNonneg : 0 ≤ᵐ[μ n] A.partialPredictableQuadraticVariation n k := by have hall : ∀ᵐ ω ∂(μ n), ∀ j, 0 ≤ A.conditionalSecondMoment n j ω := ae_all_iff.mpr fun j => by dsimp [conditionalSecondMoment] exact condExp_nonneg (ae_of_all _ fun ω => sq_nonneg (A.increment n j ω)) filter_upwards [hall] with ω hω unfold partialPredictableQuadraticVariation simp only [Pi.zero_apply, Finset.sum_apply] exact sum_nonneg fun j hj => hω j have hvBound : v ≤ᵐ[μ n] fun _ => K := by filter_upwards [hQ, hQkNonneg] with ω hQω hQkω have hstep := congrFun (A.partialPredictableQuadraticVariation_succ n k hk) ω simp only [Pi.add_apply] at hstep simp only [Pi.zero_apply] at hQkω dsimp [v] linarith have hg : StronglyMeasurable[A.filtration n k] g := by have hS := A.partialRowSum_stronglyMeasurable n k have hQk := A.partialPredictableQuadraticVariation_stronglyMeasurable n k dsimp [g, w, compensatedWeight] fun_prop have hgBound : ∀ᵐ ω ∂(μ n), ‖g ω‖ ≤ B := by filter_upwards [hQ] with ω hQω have hstep := congrFun (A.partialPredictableQuadraticVariation_succ n k hk) ω simp only [Pi.add_apply] at hstep have hexpArg : c * (A.partialPredictableQuadraticVariation n k ω - 1) + c * v ω ≤ c * K := by rw [← mul_add] apply mul_le_mul_of_nonneg_left _ hc dsimp [v] linarith calc ‖g ω‖ = exp (c * (A.partialPredictableQuadraticVariation n k ω - 1) + c * v ω) := by dsimp [g, w, compensatedWeight] rw [norm_mul, norm_mul, Complex.norm_exp, Complex.norm_real, Complex.norm_real] simp [c, v, ← Real.exp_add] _ ≤ B := by dsimp [B] exact Real.exp_le_exp.mpr hexpArg have hw : StronglyMeasurable[A.filtration n k] w := by have hS := A.partialRowSum_stronglyMeasurable n k have hQk := A.partialPredictableQuadraticVariation_stronglyMeasurable n k dsimp only [w] unfold compensatedWeight fun_prop have hwBound : ∀ᵐ ω ∂(μ n), ‖w ω‖ ≤ B := by filter_upwards [hQ, hvNonneg] with ω hQω hvω have hstep := congrFun (A.partialPredictableQuadraticVariation_succ n k hk) ω simp only [Pi.add_apply] at hstep have hQk : A.partialPredictableQuadraticVariation n k ω ≤ K := by dsimp [v] at hvω linarith have hexpArg : c * (A.partialPredictableQuadraticVariation n k ω - 1) ≤ c * K := mul_le_mul_of_nonneg_left (by linarith) hc calc ‖w ω‖ = exp (c * (A.partialPredictableQuadraticVariation n k ω - 1)) := by dsimp [w, compensatedWeight] rw [norm_mul, Complex.norm_exp, Complex.norm_real] simp [c] _ ≤ B := by dsimp [B] exact Real.exp_le_exp.mpr hexpArg have hwInt : Integrable w (μ n) := Integrable.mono' (integrable_const B) (hw.mono ((A.filtration n).le k)).aestronglyMeasurable hwBound have hv2Meas : AEStronglyMeasurable (fun ω => (v ω) ^ 2) (μ n) := by exact (hv.mono ((A.filtration n).le k)).pow 2 |>.aestronglyMeasurable have hv2Int : Integrable (fun ω => (v ω) ^ 2) (μ n) := by refine Integrable.mono' (integrable_const (K ^ 2)) hv2Meas ?_ filter_upwards [hvNonneg, hvBound] with ω hv0 hvK simp only [Pi.zero_apply] at hv0 rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] nlinarith [sq_nonneg (K - v ω)] have hrem : Integrable rem (μ n) := by have hX := (A.squareIntegrable n k hk).integrable (by norm_num) have hX2 := (A.squareIntegrable n k hk).integrable_sq have hexp : Integrable (fun ω => exp (I * ((t * A.increment n k ω : ℝ) : ℂ))) (μ n) := by have hmeas : AEStronglyMeasurable (fun ω => exp (I * ((t * A.increment n k ω : ℝ) : ℂ))) (μ n) := by have := hX.aestronglyMeasurable fun_prop refine Integrable.mono' (integrable_const (1 : ℝ)) hmeas ?_ filter_upwards with ω rw [Complex.norm_exp] simp have hlin : Integrable (fun ω => (I * (t : ℂ)) * (A.increment n k ω : ℂ)) (μ n) := hX.ofReal.const_mul _ have hquad : Integrable (fun ω => ((t ^ 2 / 2 : ℝ) : ℂ) * (((A.increment n k ω) ^ 2 : ℝ) : ℂ)) (μ n) := hX2.ofReal.const_mul _ apply (((hexp.sub (integrable_const (1 : ℂ))).sub hlin).add hquad).congr filter_upwards with ω dsimp [rem] rw [expQuadraticRemainder] push_cast ring have hceInt : Integrable ((μ n)[rem | A.filtration n k]) (μ n) := integrable_condExp have hgAmbient := hg.mono ((A.filtration n).le k) have hgceInt : Integrable (fun ω => g ω * (μ n)[rem | A.filtration n k] ω) (μ n) := hceInt.bdd_mul hgAmbient.aestronglyMeasurable hgBound have heulerMeas : AEStronglyMeasurable euler (μ n) := by have hwAmbient : StronglyMeasurable w := hw.mono ((A.filtration n).le k) have hvAmbient : StronglyMeasurable v := hv.mono ((A.filtration n).le k) dsimp [euler] fun_prop have heulerMajor : ∀ᵐ ω ∂(μ n), ‖euler ω‖ ≤ B * (c ^ 2 / 2 * v ω ^ 2) := by filter_upwards [hvNonneg, hgBound] with ω hvω hgω have hdet := norm_exp_mul_quadraticFactor_sub_one_le c (v ω) 0 hc hvω have hfactor : ‖((exp (c * v ω) : ℝ) : ℂ) * (1 - (((c * v ω : ℝ) : ℂ))) - 1‖ ≤ exp (c * v ω) * ((c * v ω) ^ 2 / 2) := by simpa using hdet calc ‖euler ω‖ = ‖w ω‖ * ‖((exp (c * v ω) : ℝ) : ℂ) * (1 - (((c * v ω : ℝ) : ℂ))) - 1‖ := by dsimp [euler] rw [norm_mul] _ ≤ ‖w ω‖ * (exp (c * v ω) * ((c * v ω) ^ 2 / 2)) := mul_le_mul_of_nonneg_left hfactor (norm_nonneg _) _ = ‖g ω‖ * (c ^ 2 / 2 * v ω ^ 2) := by dsimp [g] rw [norm_mul, Complex.norm_real] simp only [Real.norm_eq_abs, abs_of_pos (Real.exp_pos _)] ring _ ≤ B * (c ^ 2 / 2 * v ω ^ 2) := by exact mul_le_mul_of_nonneg_right hgω (by positivity) have heulerInt : Integrable euler (μ n) := by apply Integrable.mono' (hv2Int.const_mul (B * (c ^ 2 / 2))) heulerMeas filter_upwards [heulerMajor] with ω hω simpa only [mul_assoc] using hω have heulerNorm : ‖∫ ω, euler ω ∂(μ n)‖ ≤ B * (c ^ 2 / 2) * ∫ ω, v ω ^ 2 ∂(μ n) := by calc ‖∫ ω, euler ω ∂(μ n)‖ ≤ ∫ ω, ‖euler ω‖ ∂(μ n) := norm_integral_le_integral_norm _ _ ≤ ∫ ω, B * (c ^ 2 / 2 * v ω ^ 2) ∂(μ n) := by rw [show (fun ω => B * (c ^ 2 / 2 * v ω ^ 2)) = (fun ω => (B * (c ^ 2 / 2)) * v ω ^ 2) by funext ω ring] apply integral_mono_ae heulerInt.norm (hv2Int.const_mul (B * (c ^ 2 / 2))) filter_upwards [heulerMajor] with ω hω simpa only [mul_assoc] using hω _ = B * (c ^ 2 / 2) * ∫ ω, v ω ^ 2 ∂(μ n) := by rw [show (fun ω => B * (c ^ 2 / 2 * v ω ^ 2)) = (fun ω => (B * (c ^ 2 / 2)) * v ω ^ 2) by funext ω; ring] exact integral_const_mul _ _ have hremNorm : ‖∫ ω, g ω * (μ n)[rem | A.filtration n k] ω ∂(μ n)‖ ≤ B * ∫ ω, ‖rem ω‖ ∂(μ n) := norm_integral_mul_condExp_le_of_ae_bound ((A.filtration n).le k) rem g hrem hg B hB hgBound rw [A.integral_compensatedWeight_succ n k hk t K hQ] change ‖(∫ ω, w ω * (((exp (c * v ω) : ℝ) : ℂ) * (1 - (((c * v ω : ℝ) : ℂ)) + (μ n)[rem | A.filtration n k] ω)) ∂(μ n)) - ∫ ω, w ω ∂(μ n)‖ ≤ B * ((∫ ω, ‖rem ω‖ ∂(μ n)) + (c ^ 2 / 2) * ∫ ω, v ω ^ 2 ∂(μ n)) rw [show (fun ω => w ω * (((exp (c * v ω) : ℝ) : ℂ) * (1 - (((c * v ω : ℝ) : ℂ)) + (μ n)[rem | A.filtration n k] ω))) = (fun ω => w ω + euler ω + g ω * (μ n)[rem | A.filtration n k] ω) by funext ω dsimp [euler, g] ring] change ‖(∫ ω, (w + euler) ω + (fun ω => g ω * (μ n)[rem | A.filtration n k] ω) ω ∂(μ n)) - ∫ ω, w ω ∂(μ n)‖ ≤ B * ((∫ ω, ‖rem ω‖ ∂(μ n)) + (c ^ 2 / 2) * ∫ ω, v ω ^ 2 ∂(μ n)) rw [integral_add (hwInt.add heulerInt) hgceInt] have hwEuler : (∫ ω, (w + euler) ω ∂(μ n)) = (∫ ω, w ω ∂(μ n)) + ∫ ω, euler ω ∂(μ n) := by simpa only [Pi.add_apply] using integral_add hwInt heulerInt rw [hwEuler] have hcancel : ((∫ ω, w ω ∂(μ n)) + (∫ ω, euler ω ∂(μ n)) + ∫ ω, g ω * (μ n)[rem | A.filtration n k] ω ∂(μ n)) - ∫ ω, w ω ∂(μ n) = (∫ ω, euler ω ∂(μ n)) + ∫ ω, g ω * (μ n)[rem | A.filtration n k] ω ∂(μ n) := by ring rw [hcancel] calc ‖(∫ ω, euler ω ∂(μ n)) + ∫ ω, g ω * (μ n)[rem | A.filtration n k] ω ∂(μ n)‖ ≤ ‖∫ ω, euler ω ∂(μ n)‖ + ‖∫ ω, g ω * (μ n)[rem | A.filtration n k] ω ∂(μ n)‖ := norm_add_le _ _ _ ≤ B * (c ^ 2 / 2) * ∫ ω, v ω ^ 2 ∂(μ n) + B * ∫ ω, ‖rem ω‖ ∂(μ n) := add_le_add heulerNorm hremNorm _ = B * ((∫ ω, ‖rem ω‖ ∂(μ n)) + (c ^ 2 / 2) * ∫ ω, v ω ^ 2 ∂(μ n)) := by ring
4 supporting declarations (lemmas, instances)
  • partialPredictableQuadraticVariation_zero theorem — The partial predictable quadratic variation at time zero is zero.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    n :
    A.partialPredictableQuadraticVariation n 0 = 0
    Proof (Lean source)
    @[simp] theorem partialPredictableQuadraticVariation_zero (A : MartingaleDifferenceArray Ω μ) (n : ℕ) : A.partialPredictableQuadraticVariation n 0 = 0 := by simp [partialPredictableQuadraticVariation]
    Causalean.Stat.MartingaleDifferenceArray.partialPredictableQuadraticVariation_zero · Causalean/Stat/CLT/MartingaleArray/CompensatedStep.lean:38
  • partialPredictableQuadraticVariation_succ theorem — For an active increment, the next partial predictable quadratic variation is the current one plus that increment's conditional second moment.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    n k :
    hk :
    k < A.rowLength n
    A.partialPredictableQuadraticVariation n (k + 1)
    = A.partialPredictableQuadraticVariation n k + A.conditionalSecondMoment n k
    Proof (Lean source)
    theorem partialPredictableQuadraticVariation_succ (A : MartingaleDifferenceArray Ω μ) (n k : ℕ) (hk : k < A.rowLength n) : A.partialPredictableQuadraticVariation n (k + 1) = A.partialPredictableQuadraticVariation n k + A.conditionalSecondMoment n k := by /- Rewrite both capped ranges using `hk`, then apply `Finset.sum_range_succ` pointwise. -/ unfold partialPredictableQuadraticVariation rw [Nat.min_eq_left (Nat.succ_le_of_lt hk)] rw [Nat.min_eq_left (le_trans (Nat.le_succ k) (Nat.succ_le_of_lt hk))] exact Finset.sum_range_succ _ _
    Causalean.Stat.MartingaleDifferenceArray.partialPredictableQuadraticVariation_succ · Causalean/Stat/CLT/MartingaleArray/CompensatedStep.lean:44
  • partialPredictableQuadraticVariation_stronglyMeasurable theorem — The partial predictable quadratic variation through time r is measurable with respect to the row filtration at time r.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    n r :
    StronglyMeasurable[A.filtration n r] (A.partialPredictableQuadraticVariation n r)
    Proof (Lean source)
    theorem partialPredictableQuadraticVariation_stronglyMeasurable (A : MartingaleDifferenceArray Ω μ) (n r : ℕ) : StronglyMeasurable[A.filtration n r] (A.partialPredictableQuadraticVariation n r) := by /- Each conditional second moment is strongly measurable at its conditioning time. Lift it to time `r` using filtration monotonicity and close the finite sum. -/ unfold partialPredictableQuadraticVariation conditionalSecondMoment apply Finset.stronglyMeasurable_sum intro k hk exact stronglyMeasurable_condExp.mono ((A.filtration n).mono (le_trans (le_of_lt (Finset.mem_range.mp hk)) (min_le_left _ _)))
    Causalean.Stat.MartingaleDifferenceArray.partialPredictableQuadraticVariation_stronglyMeasurable · Causalean/Stat/CLT/MartingaleArray/CompensatedStep.lean:59
  • integral_compensatedWeight_succ theorem — For an active martingale increment, when the compensated predictable variance after that step is almost surely bounded, the integral of the next compensated weight equals the integral of the current weight times the exact conditionally centered quadratic update.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    ∀ n, IsProbabilityMeasure (μ n)
    n k :
    hk :
    k < A.rowLength n
    t K :
    hQ :
    A.partialPredictableQuadraticVariation n (k + 1) ≤ᵐ[μ n] fun _ => K
    (∫ ω, A.compensatedWeight n (k + 1) t ω ∂(μ n))
    = ∫ ω, A.compensatedWeight n k t ω * (((exp ((t ^ 2 / 2) * A.conditionalSecondMoment n k ω) : ℝ) : ℂ) * (1 - (((t ^ 2 / 2) * A.conditionalSecondMoment n k ω : ℝ) : ℂ) + (μ n)[(fun ω => expQuadraticRemainder (t * A.increment n k ω)) | A.filtration n k] ω)) ∂(μ n)
    Proof (Lean source)
    theorem integral_compensatedWeight_succ [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (n k : ℕ) (hk : k < A.rowLength n) (t K : ℝ) (hQ : A.partialPredictableQuadraticVariation n (k + 1) ≤ᵐ[μ n] fun _ => K) : (∫ ω, A.compensatedWeight n (k + 1) t ω ∂(μ n)) = ∫ ω, A.compensatedWeight n k t ω * (((exp ((t ^ 2 / 2) * A.conditionalSecondMoment n k ω) : ℝ) : ℂ) * (1 - (((t ^ 2 / 2) * A.conditionalSecondMoment n k ω : ℝ) : ℂ) + (μ n)[(fun ω => expQuadraticRemainder (t * A.increment n k ω)) | A.filtration n k] ω)) ∂(μ n) := by /- Split the successor partial sum and predictable variation. The weight through time `k`, multiplied by `exp ((t²/2) v_k)`, is predictable and is bounded using `hQ`; apply `integral_mul_condExp_eq_integral_mul_of_ae_bound`, then substitute `condExp_cexp_ae_eq_quadratic_add_remainder`. The explicit bound is needed: finite second moments alone do not make an exponential predictable weight integrable. -/ let c : ℝ := t ^ 2 / 2 let f : Ω n → ℂ := fun ω => exp (I * ((t * A.increment n k ω : ℝ) : ℂ)) let g : Ω n → ℂ := fun ω => A.compensatedWeight n k t ω * ((exp (c * A.conditionalSecondMoment n k ω) : ℝ) : ℂ) have hc : 0 ≤ c := by dsimp [c] positivity have hfMeas : AEStronglyMeasurable f (μ n) := by have hX := (A.squareIntegrable n k hk).aestronglyMeasurable dsimp [f] fun_prop have hf : Integrable f (μ n) := by refine Integrable.mono' (integrable_const (1 : ℝ)) hfMeas ?_ filter_upwards with ω dsimp [f] rw [Complex.norm_exp] simp have hv : StronglyMeasurable[A.filtration n k] (A.conditionalSecondMoment n k) := by exact stronglyMeasurable_condExp have hg : StronglyMeasurable[A.filtration n k] g := by have hS := A.partialRowSum_stronglyMeasurable n k have hQk := A.partialPredictableQuadraticVariation_stronglyMeasurable n k dsimp [g, compensatedWeight] fun_prop have hgBound : ∀ᵐ ω ∂(μ n), ‖g ω‖ ≤ exp (c * K) := by filter_upwards [hQ] with ω hQω have hstep := congrFun (A.partialPredictableQuadraticVariation_succ n k hk) ω simp only [Pi.add_apply] at hstep have hexpArg : c * (A.partialPredictableQuadraticVariation n k ω - 1) + c * A.conditionalSecondMoment n k ω ≤ c * K := by rw [← mul_add] apply mul_le_mul_of_nonneg_left _ hc linarith calc ‖g ω‖ = exp (c * (A.partialPredictableQuadraticVariation n k ω - 1) + c * A.conditionalSecondMoment n k ω) := by dsimp [g, compensatedWeight] rw [norm_mul, norm_mul, Complex.norm_exp, Complex.norm_real, Complex.norm_real] simp [c, ← Real.exp_add] _ ≤ exp (c * K) := Real.exp_le_exp.mpr hexpArg have htaylor : (μ n)[f | A.filtration n k] =ᵐ[μ n] fun ω => 1 - ((c : ℂ) * ((A.conditionalSecondMoment n k ω : ℝ) : ℂ)) + (μ n)[(fun ω => expQuadraticRemainder (t * A.increment n k ω)) | A.filtration n k] ω := by simpa only [f, c, conditionalSecondMoment] using condExp_cexp_ae_eq_quadratic_add_remainder (mΩ := mΩ n) (μ := μ n) ((A.filtration n).le k) (A.increment n k) (A.squareIntegrable n k hk) (A.condExp_zero n k hk) t have hsplit : A.compensatedWeight n (k + 1) t = fun ω => g ω * f ω := by funext ω have hQstep := congrFun (A.partialPredictableQuadraticVariation_succ n k hk) ω simp only [Pi.add_apply] at hQstep dsimp [g, f, c, compensatedWeight] unfold partialRowSum rw [Nat.min_eq_left (Nat.succ_le_of_lt hk)] rw [Nat.min_eq_left (le_trans (Nat.le_succ k) (Nat.succ_le_of_lt hk))] rw [Finset.sum_range_succ, hQstep] simp only [Pi.add_apply, Finset.sum_apply] have hchar : exp (I * ((t * ((∑ x ∈ range k, A.increment n x ω) + A.increment n k ω) : ℝ) : ℂ)) = exp (I * ((t * (∑ x ∈ range k, A.increment n x ω) : ℝ) : ℂ)) * exp (I * ((t * A.increment n k ω : ℝ) : ℂ)) := by rw [← Complex.exp_add] congr 1 push_cast ring have hgauss : exp (t ^ 2 / 2 * (A.partialPredictableQuadraticVariation n k ω + A.conditionalSecondMoment n k ω - 1)) = exp (t ^ 2 / 2 * (A.partialPredictableQuadraticVariation n k ω - 1)) * exp (t ^ 2 / 2 * A.conditionalSecondMoment n k ω) := by rw [← Real.exp_add] congr 1 ring rw [hchar, hgauss] push_cast ring rw [hsplit] calc (∫ ω, g ω * f ω ∂(μ n)) = ∫ ω, g ω * (μ n)[f | A.filtration n k] ω ∂(μ n) := (integral_mul_condExp_eq_integral_mul_of_ae_bound ((A.filtration n).le k) f g hf hg (exp (c * K)) hgBound).symm _ = ∫ ω, g ω * (1 - ((c : ℂ) * ((A.conditionalSecondMoment n k ω : ℝ) : ℂ)) + (μ n)[(fun ω => expQuadraticRemainder (t * A.increment n k ω)) | A.filtration n k] ω) ∂(μ n) := by apply integral_congr_ae filter_upwards [htaylor] with ω hω exact congrArg (g ω * ·) hω _ = _ := by apply integral_congr_ae filter_upwards with ω dsimp [g, c] push_cast ring
    Causalean.Stat.MartingaleDifferenceArray.integral_compensatedWeight_succ · Causalean/Stat/CLT/MartingaleArray/CompensatedStep.lean:84
Characteristic­Function 1 core · 0 supporting This module isolates the analytic core of the scalar martingale triangular-array central limit theorem. ★ martingaleArrayCharFun_tendsto

Characteristic-function core of the martingale-array CLT

This module isolates the analytic core of the scalar martingale triangular-array central limit theorem. It turns predictable-variance normalization and the conditional Lindeberg condition into pointwise convergence of characteristic functions. The final weak-convergence wrapper is in Main.

theorem martingaleArrayCharFun_tendsto reviewed
Causalean.Stat

For a square-integrable martingale-difference triangular array, if its predictable quadratic variations converge in probability to one and its conditional Lindeberg sums converge in probability to zero at every positive threshold, then the characteristic function of each row sum converges pointwise to the characteristic function of the standard normal law.

Formal statement
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
∀ n, IsProbabilityMeasure (μ n)
hVariance :
TendstoInProbability μ A.predictableQuadraticVariation 1
hLindeberg :
∀ ε : ℝ
if
0 < ε
then
TendstoInProbability μ (A.conditionalLindeberg ε) 0
t :
Tendsto (fun n => charFun ((μ n).map (A.rowSum n)) t) atTop (𝓝 (charFun (gaussianReal 0 1) t))
Proof (Lean source)
theorem martingaleArrayCharFun_tendsto [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (hVariance : TendstoInProbability μ A.predictableQuadraticVariation 1) (hLindeberg : ∀ ε : ℝ, 0 < ε → TendstoInProbability μ (A.conditionalLindeberg ε) 0) (t : ℝ) : Tendsto (fun n => charFun ((μ n).map (A.rowSum n)) t) atTop (𝓝 (charFun (gaussianReal 0 1) t)) := by /- Brown--Hall--Heyde characteristic-function argument. 1. For fixed `t` and truncation level `ε`, stop a row when either accumulated predictable variance or accumulated conditional Lindeberg mass leaves a deterministic good set. The two convergence-in-probability hypotheses show that stopping changes the characteristic function by `o(1)`. 2. On the good set, condition successively on `filtration n k`. The linear Taylor term vanishes by `A.condExp_zero`; the quadratic term is the conditional variance, and the Taylor remainder is bounded by the conditional Lindeberg term plus `O(ε)` times predictable variance. 3. Telescope the one-step conditional characteristic functions and compare their product with `exp (-(t^2)/2)`. First let the row index tend to infinity, then let `ε` tend to zero. 4. Rewrite the limit using `charFun_gaussianReal`. The proof uses no independence: every factorization is through conditional expectation at the preceding filtration time. -/ have hPQVMeas (B : MartingaleDifferenceArray Ω μ) (n : ℕ) : AEMeasurable (B.predictableQuadraticVariation n) (μ n) := by unfold MartingaleDifferenceArray.predictableQuadraticVariation apply Finset.aemeasurable_sum intro k _ exact (integrable_condExp : Integrable ((μ n)[fun ω => (B.increment n k ω) ^ 2 | B.filtration n k]) (μ n)).aemeasurable have hPQVNonneg (B : MartingaleDifferenceArray Ω μ) (n : ℕ) : 0 ≤ᵐ[μ n] B.predictableQuadraticVariation n := by have hall : ∀ᵐ ω ∂(μ n), ∀ k, 0 ≤ (μ n)[fun ω => (B.increment n k ω) ^ 2 | B.filtration n k] ω := ae_all_iff.mpr fun k => condExp_nonneg (ae_of_all _ fun ω => sq_nonneg (B.increment n k ω)) filter_upwards [hall] with ω hω unfold MartingaleDifferenceArray.predictableQuadraticVariation simp only [Finset.sum_apply] exact sum_nonneg fun k _ => hω k have hVBad : Tendsto (fun n => (μ n).real {ω | 2 < A.predictableQuadraticVariation n ω}) atTop (𝓝 0) := by apply squeeze_zero (fun _ => measureReal_nonneg) (fun n => ?_) ((ENNReal.tendsto_toReal_zero_iff).2 (hVariance 1 zero_lt_one)) apply measureReal_mono (h₂ := measure_ne_top _ _) intro ω hω change 2 < A.predictableQuadraticVariation n ω at hω change 1 ≤ |A.predictableQuadraticVariation n ω - 1| rw [abs_of_pos (by linarith)] linarith have hLBad (η δ : ℝ) (hη : 0 < η) (hδ : 0 < δ) : Tendsto (fun n => (μ n).real {ω | δ < A.conditionalLindeberg η n ω}) atTop (𝓝 0) := by apply squeeze_zero (fun _ => measureReal_nonneg) (fun n => ?_) ((ENNReal.tendsto_toReal_zero_iff).2 (hLindeberg η hη δ hδ)) apply measureReal_mono (h₂ := measure_ne_top _ _) intro ω hω change δ ≤ |A.conditionalLindeberg η n ω - 0| rw [sub_zero, abs_of_pos (hδ.trans hω)] exact hω.le have hBad (η δ : ℝ) (hη : 0 < η) (hδ : 0 < δ) : Tendsto (fun n => (μ n).real ({ω | 2 < A.predictableQuadraticVariation n ω} ∪ {ω | δ < A.conditionalLindeberg η n ω})) atTop (𝓝 0) := by apply squeeze_zero (fun _ => measureReal_nonneg) (fun n => measureReal_union_le _ _) simpa using hVBad.add (hLBad η δ hη hδ) have hStopProb (η δ : ℝ) (hη : 0 < η) (hδ : 0 < δ) : Tendsto (fun n => (μ n).real {ω | (A.stoppedArray η 2 δ).rowSum n ω ≠ A.rowSum n ω}) atTop (𝓝 0) := by apply squeeze_zero (fun _ => measureReal_nonneg) (fun n => ?_) (hBad η δ hη hδ) rw [measureReal_def, measureReal_def] apply (ENNReal.toReal_le_toReal (measure_ne_top _ _) (measure_ne_top _ _)).2 exact A.measure_stoppedArray_rowSum_ne_le η 2 δ hη n have hStoppedVariance (η δ : ℝ) (hη : 0 < η) (hδ : 0 < δ) : TendstoInProbability μ (A.stoppedArray η 2 δ).predictableQuadraticVariation 1 := by intro ε hε rw [← ENNReal.tendsto_toReal_zero_iff] apply squeeze_zero (fun _ => measureReal_nonneg) (fun n => ?_) (by have hv := (ENNReal.tendsto_toReal_zero_iff).2 (hVariance ε hε) have hb := hVBad.add (hLBad η δ hη hδ) simpa only [measureReal_def, add_zero] using hv.add hb) let E : Set (Ω n) := {ω | ε ≤ |(A.stoppedArray η 2 δ).predictableQuadraticVariation n ω - 1|} let F : Set (Ω n) := {ω | ε ≤ |A.predictableQuadraticVariation n ω - 1|} let G : Set (Ω n) := {ω | 2 < A.predictableQuadraticVariation n ω} let H : Set (Ω n) := {ω | δ < A.conditionalLindeberg η n ω} have hmono : (μ n).real E ≤ (μ n).real (F ∪ (G ∪ H)) := by rw [measureReal_def, measureReal_def] apply (ENNReal.toReal_le_toReal (measure_ne_top _ _) (measure_ne_top _ _)).2 apply measure_mono_ae filter_upwards [stoppedArray_predictableQuadraticVariation_ae_eq_of_bounds A η 2 δ n] with ω heq intro hω by_cases hF : ω ∈ F · exact Or.inl hF by_cases hG : ω ∈ G · exact inr (Or.inl hG) by_cases hH : ω ∈ H · exact inr (inr hH) exfalso apply hF change ε ≤ |(A.stoppedArray η 2 δ).predictableQuadraticVariation n ω - 1| at hω change ε ≤ |A.predictableQuadraticVariation n ω - 1| change ¬2 < A.predictableQuadraticVariation n ω at hG change ¬δ < A.conditionalLindeberg η n ω at hH rw [heq (le_of_not_gt hG) (le_of_not_gt hH)] at hω exact hω calc (μ n).real {ω | ε ≤ |(A.stoppedArray η 2 δ).predictableQuadraticVariation n ω - 1|} = (μ n).real E := rfl _ ≤ (μ n).real (F ∪ (G ∪ H)) := hmono _ ≤ (μ n).real F + ((μ n).real G + (μ n).real H) := by exact (measureReal_union_le F (G ∪ H)).trans (add_le_add le_rfl (measureReal_union_le G H)) _ = _ := rfl have hStoppedVarianceL1 (η δ : ℝ) (hη : 0 < η) (hδ : 0 < δ) : Tendsto (fun n => ∫ ω, |(A.stoppedArray η 2 δ).predictableQuadraticVariation n ω - 1| ∂(μ n)) atTop (𝓝 0) := by apply tendsto_integral_abs_sub_of_tendstoInProbability_of_ae_bound (fun n => (A.stoppedArray η 2 δ).predictableQuadraticVariation n) 1 3 (fun n => hPQVMeas (A.stoppedArray η 2 δ) n) (by norm_num) _ (hStoppedVariance η δ hη hδ) intro n filter_upwards [hPQVNonneg (A.stoppedArray η 2 δ) n, A.stoppedArray_predictableQuadraticVariation_le η 2 δ (by norm_num) hδ.le n] with ω h0 h2 simp only [Pi.zero_apply] at h0 rw [abs_le] constructor <;> linarith have hCharIntegral (B : MartingaleDifferenceArray Ω μ) (n : ℕ) : charFun ((μ n).map (B.rowSum n)) t = ∫ ω, exp (I * ((t * B.rowSum n ω : ℝ) : ℂ)) ∂(μ n) := by rw [charFun_apply_real, integral_map (B.rowSum_aemeasurable n) (by fun_prop)] apply integral_congr_ae filter_upwards with ω congr 1 push_cast ring have hStopIntegral (η δ : ℝ) (hη : 0 < η) (hδ : 0 < δ) : Tendsto (fun n => ‖ (∫ ω, exp (I * ((t * A.rowSum n ω : ℝ) : ℂ)) ∂(μ n)) - ∫ ω, exp (I * ((t * (A.stoppedArray η 2 δ).rowSum n ω : ℝ) : ℂ)) ∂(μ n)‖) atTop (𝓝 0) := by apply squeeze_zero (fun _ => norm_nonneg _) (fun n => ?_) (by have hc : Tendsto (fun _ : ℕ => (2 : ℝ)) atTop (𝓝 2) := tendsto_const_nhds simpa using hc.mul (hStopProb η δ hη hδ)) let g : Ω n → ℂ := fun ω => exp (I * ((t * A.rowSum n ω : ℝ) : ℂ)) let gs : Ω n → ℂ := fun ω => exp (I * ((t * (A.stoppedArray η 2 δ).rowSum n ω : ℝ) : ℂ)) let E : Set (Ω n) := {ω | (A.stoppedArray η 2 δ).rowSum n ω ≠ A.rowSum n ω} have hgMeas : AEStronglyMeasurable g (μ n) := by have hrow := A.rowSum_aemeasurable n dsimp [g] fun_prop have hgsMeas : AEStronglyMeasurable gs (μ n) := by have hrow := (A.stoppedArray η 2 δ).rowSum_aemeasurable n dsimp [gs] fun_prop have hgInt : Integrable g (μ n) := by refine Integrable.mono' (integrable_const (1 : ℝ)) hgMeas ?_ filter_upwards with ω dsimp [g] rw [Complex.norm_exp] simp have hgsInt : Integrable gs (μ n) := by refine Integrable.mono' (integrable_const (1 : ℝ)) hgsMeas ?_ filter_upwards with ω dsimp [gs] rw [Complex.norm_exp] simp have hE : NullMeasurableSet E (μ n) := by have hd := (A.stoppedArray η 2 δ).rowSum_aemeasurable n |>.sub (A.rowSum_aemeasurable n) have hp := hd.nullMeasurableSet_preimage (measurableSet_singleton (0 : ℝ)).compl convert hp using 1 ext ω change ((A.stoppedArray η 2 δ).rowSum n ω ≠ A.rowSum n ω) ↔ (A.stoppedArray η 2 δ).rowSum n ω - A.rowSum n ω ≠ 0 exact (sub_ne_zero : ∀ {a b : ℝ}, a - b ≠ 0 ↔ a ≠ b).symm change ‖(∫ ω, g ω ∂(μ n)) - ∫ ω, gs ω ∂(μ n)‖ ≤ _ rw [← integral_sub hgInt hgsInt] calc ‖∫ ω, g ω - gs ω ∂(μ n)‖ ≤ ∫ ω, ‖g ω - gs ω‖ ∂(μ n) := norm_integral_le_integral_norm _ _ ≤ ∫ ω, E.indicator (fun _ => (2 : ℝ)) ω ∂(μ n) := by apply integral_mono_ae (hgInt.sub hgsInt).norm ((integrable_const (2 : ℝ)).indicator₀ hE) filter_upwards with ω by_cases he : ω ∈ E · rw [Set.indicator_of_mem he] exact (norm_sub_le _ _).trans_eq (by dsimp [g, gs] rw [Complex.norm_exp, Complex.norm_exp] norm_num) · rw [Set.indicator_of_notMem he] have heq : (A.stoppedArray η 2 δ).rowSum n ω = A.rowSum n ω := not_ne_iff.mp he simp [g, gs, heq] _ = 2 * (μ n).real E := by rw [integral_indicator₀ hE, setIntegral_const] simp [mul_comm] _ = 2 * (μ n).real {ω | (A.stoppedArray η 2 δ).rowSum n ω ≠ A.rowSum n ω} := rfl have hGaussian : charFun (gaussianReal 0 1) t = ((exp (-(t ^ 2 / 2)) : ℝ) : ℂ) := by rw [charFun_gaussianReal] rw [show ((1 : NNReal) : ℝ) = 1 by rfl] push_cast congr 1 ring rw [Metric.tendsto_atTop] intro ε hε let R₀ : ℝ → ℝ := fun η => exp ((t ^ 2 / 2) * 2) * (|t| ^ 3 * η * 2 + ((t ^ 2 / 2) ^ 2 / 2) * ((η ^ 2 + 0) * 2)) have hR₀ : Tendsto R₀ (𝓝 0) (𝓝 0) := by have hc : ContinuousAt R₀ 0 := by dsimp [R₀] fun_prop simpa [R₀] using hc.tendsto have hR₀small : ∀ᶠ η in 𝓝 (0 : ℝ), dist (R₀ η) 0 < ε / 4 := Metric.tendsto_nhds.mp hR₀ (ε / 4) (by linarith) rcases Metric.mem_nhds_iff.mp hR₀small with ⟨r, hr, hrsub⟩ let η : ℝ := min (r / 2) (1 / (|t| + 1)) have hη : 0 < η := by dsimp [η] exact lt_min (div_pos hr (by norm_num)) (one_div_pos.mpr (by linarith [abs_nonneg t])) -- … truncated; follow the source link for the rest …
Compensated­Telescoping 1 core · 1 supporting This module telescopes the one-step compensated characteristic-function bound. ★ norm_integral_compensatedWeight_rowSum_sub_gaussian_le_of_budgets

Finite-row compensated Gaussian telescoping

This module telescopes the one-step compensated characteristic-function bound. It also removes the terminal random Gaussian correction by an explicit expected absolute predictable-variance error. These are deterministic finite-row bounds; the asymptotic stopping argument remains in CharacteristicFunction.

theorem norm_integral_compensatedWeight_rowSum_sub_gaussian_le_of_budgets reviewed
Causalean.Stat.MartingaleDifferenceArray

If the truncation threshold is positive, the frequency-threshold product is at most one, both budgets are nonnegative, a row's predictable quadratic variation is at most K, and its conditional Lindeberg mass at threshold η is at most δ, then the integrated compensated row characteristic function differs from the standard Gaussian characteristic function by the displayed Taylor and predictable-mesh budget.

Formal statement
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
∀ n, IsProbabilityMeasure (μ n)
n :
t η K δ :
:
0 < η
htη :
|t| * η ≤ 1
hK :
0 ≤ K
:
0 ≤ δ
hVariance :
A.predictableQuadraticVariation n ≤ᵐ[μ n] fun _ => K
hLindeberg :
A.conditionalLindeberg η n ≤ᵐ[μ n] fun _ => δ
‖(∫ ω, A.compensatedWeight n (A.rowLength n) t ω ∂(μ n)) - ((exp (-(t ^ 2 / 2)) : ℝ) : ℂ)‖
exp ((t ^ 2 / 2) * K) * (|t| ^ 3 * η * K + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * δ + ((t ^ 2 / 2) ^ 2 / 2) * ((η ^ 2 + δ) * K))
Proof (Lean source)
theorem norm_integral_compensatedWeight_rowSum_sub_gaussian_le_of_budgets [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (n : ℕ) (t η K δ : ℝ) (hη : 0 < η) (htη : |t| * η ≤ 1) (hK : 0 ≤ K) (hδ : 0 ≤ δ) (hVariance : A.predictableQuadraticVariation n ≤ᵐ[μ n] fun _ => K) (hLindeberg : A.conditionalLindeberg η n ≤ᵐ[μ n] fun _ => δ) : ‖(∫ ω, A.compensatedWeight n (A.rowLength n) t ω ∂(μ n)) - ((exp (-(t ^ 2 / 2)) : ℝ) : ℂ)‖ ≤ exp ((t ^ 2 / 2) * K) * (|t| ^ 3 * η * K + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * δ + ((t ^ 2 / 2) ^ 2 / 2) * ((η ^ 2 + δ) * K)) := by /- Telescope `norm_integral_compensatedWeight_succ_sub_le`. Nonnegativity of conditional second moments makes every partial predictable variation at most the final one. Sum the one-step bounds, then invoke the closed row remainder and squared-mesh budget lemmas. The time-zero weight integrates to `exp (-(t^2/2))`. -/ let F : ℕ → ℂ := fun r => ∫ ω, A.compensatedWeight n r t ω ∂(μ n) let R : ℕ → ℝ := fun k => ∫ ω, ‖expQuadraticRemainder (t * A.increment n k ω)‖ ∂(μ n) let V₂ : ℕ → ℝ := fun k => ∫ ω, (A.conditionalSecondMoment n k ω) ^ 2 ∂(μ n) let c : ℝ := t ^ 2 / 2 have hvNonneg : ∀ᵐ ω ∂(μ n), ∀ k, 0 ≤ A.conditionalSecondMoment n k ω := ae_all_iff.mpr fun k => by unfold conditionalSecondMoment exact condExp_nonneg (ae_of_all _ fun ω => sq_nonneg (A.increment n k ω)) have hPartial : ∀ k < A.rowLength n, A.partialPredictableQuadraticVariation n (k + 1) ≤ᵐ[μ n] fun _ => K := by intro k hk filter_upwards [hvNonneg, hVariance] with ω hvω hVarianceω apply le_trans _ hVarianceω unfold partialPredictableQuadraticVariation predictableQuadraticVariation rw [Nat.min_eq_left (Nat.succ_le_of_lt hk)] simp only [Finset.sum_apply] change (∑ j ∈ range (k + 1), A.conditionalSecondMoment n j ω) ≤ ∑ j ∈ range (A.rowLength n), A.conditionalSecondMoment n j ω apply Finset.sum_le_sum_of_subset_of_nonneg (Finset.range_mono (Nat.succ_le_of_lt hk)) intro j _ _ exact hvω j have hstep : ∀ k < A.rowLength n, ‖F (k + 1) - F k‖ ≤ exp (c * K) * (R k + (c ^ 2 / 2) * V₂ k) := by intro k hk simpa only [F, R, V₂, c] using A.norm_integral_compensatedWeight_succ_sub_le n k hk t K hK (hPartial k hk) have hF0 : F 0 = ((exp (-c) : ℝ) : ℂ) := by simp [F, compensatedWeight, partialRowSum, partialPredictableQuadraticVariation, c] have hRem := A.sum_integral_norm_expQuadraticRemainder_le_of_budgets n t η K δ hη htη hK hδ hVariance hLindeberg have hV₂ := A.sum_sq_conditionalSecondMoment_le_of_budgets n η K δ hη hK hδ hVariance hLindeberg have hV₂int : (∑ k ∈ range (A.rowLength n), V₂ k) ≤ (η ^ 2 + δ) * K := by have hEach : ∀ k ∈ range (A.rowLength n), Integrable (fun ω => (A.conditionalSecondMoment n k ω) ^ 2) (μ n) := by intro k hk have hce : Integrable (A.conditionalSecondMoment n k) (μ n) := integrable_condExp have hbound : A.conditionalSecondMoment n k ≤ᵐ[μ n] fun _ => K := by filter_upwards [hvNonneg, hPartial k (Finset.mem_range.mp hk)] with ω hvω hpω have hsucc := congrFun (A.partialPredictableQuadraticVariation_succ n k (Finset.mem_range.mp hk)) ω simp only [Pi.add_apply] at hsucc have hpartialNonneg : 0 ≤ A.partialPredictableQuadraticVariation n k ω := by unfold partialPredictableQuadraticVariation simp only [Finset.sum_apply] exact sum_nonneg fun j _ => hvω j linarith refine Integrable.mono' (integrable_const (K ^ 2)) (hce.aestronglyMeasurable.pow 2) ?_ filter_upwards [hvNonneg, hbound] with ω hvω hboundω rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] nlinarith [mul_nonneg (sub_nonneg.mpr hboundω) (add_nonneg hK (hvω k))] calc (∑ k ∈ range (A.rowLength n), V₂ k) = ∫ ω, ∑ k ∈ range (A.rowLength n), (A.conditionalSecondMoment n k ω) ^ 2 ∂(μ n) := by rw [integral_finsetSum _ hEach] _ ≤ ∫ _ω, (η ^ 2 + δ) * K ∂(μ n) := by apply integral_mono_ae · exact integrable_finsetSum _ hEach · exact integrable_const _ · exact hV₂ _ = (η ^ 2 + δ) * K := by simp have htel : F (A.rowLength n) - F 0 = ∑ k ∈ range (A.rowLength n), (F (k + 1) - F k) := by rw [Finset.sum_range_sub] rw [hF0] at htel change ‖F (A.rowLength n) - ((exp (-c) : ℝ) : ℂ)‖ ≤ _ rw [htel] calc ‖∑ k ∈ range (A.rowLength n), (F (k + 1) - F k)‖ ≤ ∑ k ∈ range (A.rowLength n), ‖F (k + 1) - F k‖ := norm_sum_le _ _ _ ≤ ∑ k ∈ range (A.rowLength n), exp (c * K) * (R k + (c ^ 2 / 2) * V₂ k) := by apply Finset.sum_le_sum intro k hk exact hstep k (Finset.mem_range.mp hk) _ = exp (c * K) * ((∑ k ∈ range (A.rowLength n), R k) + (c ^ 2 / 2) * ∑ k ∈ range (A.rowLength n), V₂ k) := by calc (∑ k ∈ range (A.rowLength n), exp (c * K) * (R k + (c ^ 2 / 2) * V₂ k)) = (∑ k ∈ range (A.rowLength n), exp (c * K) * R k) + ∑ k ∈ range (A.rowLength n), exp (c * K) * ((c ^ 2 / 2) * V₂ k) := by rw [← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro k _ ring _ = exp (c * K) * (∑ k ∈ range (A.rowLength n), R k) + exp (c * K) * (∑ k ∈ range (A.rowLength n), (c ^ 2 / 2) * V₂ k) := by rw [Finset.mul_sum, Finset.mul_sum] _ = _ := by have hscale : (∑ k ∈ range (A.rowLength n), (c ^ 2 / 2) * V₂ k) = (c ^ 2 / 2) * ∑ k ∈ range (A.rowLength n), V₂ k := by rw [Finset.mul_sum] rw [hscale] ring _ ≤ exp (c * K) * ((|t| ^ 3 * η * K + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * δ) + (c ^ 2 / 2) * ((η ^ 2 + δ) * K)) := by gcongr _ = _ := by rfl
Causalean.Stat.MartingaleDifferenceArray.norm_integral_compensatedWeight_rowSum_sub_gaussian_le_of_budgets · Causalean/Stat/CLT/MartingaleArray/CompensatedTelescoping.lean:28 · uses MartingaleDifferenceArray , compensatedWeight , conditionalLindeberg , predictableQuadraticVariation
1 supporting declaration (lemmas, instances)
  • norm_integral_cexp_rowSum_sub_gaussian_le_of_budgets theorem — If the truncation threshold is positive, the frequency-threshold product is at most one, both budgets are nonnegative, a row's predictable quadratic variation is at most K, and its conditional Lindeberg mass at threshold η is at most δ, then its ordinary characteristic function differs from the standard Gaussian characteristic function by the compensated budget plus a constant times the expected distance of predictable quadratic variation from one.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    ∀ n, IsProbabilityMeasure (μ n)
    n :
    t η K δ :
    :
    0 < η
    htη :
    |t| * η ≤ 1
    hK :
    0 ≤ K
    :
    0 ≤ δ
    hVariance :
    A.predictableQuadraticVariation n ≤ᵐ[μ n] fun _ => K
    hLindeberg :
    A.conditionalLindeberg η n ≤ᵐ[μ n] fun _ => δ
    ‖(∫ ω, exp (I * ((t * A.rowSum n ω : ℝ) : ℂ)) ∂(μ n)) - ((exp (-(t ^ 2 / 2)) : ℝ) : ℂ)‖
    exp ((t ^ 2 / 2) * K) * (|t| ^ 3 * η * K + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * δ + ((t ^ 2 / 2) ^ 2 / 2) * ((η ^ 2 + δ) * K))
    + exp ((t ^ 2 / 2) * max K 1) * (t ^ 2 / 2) * ∫ ω, |A.predictableQuadraticVariation n ω
    - 1| ∂(μ n)
    Proof (Lean source)
    theorem norm_integral_cexp_rowSum_sub_gaussian_le_of_budgets [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (n : ℕ) (t η K δ : ℝ) (hη : 0 < η) (htη : |t| * η ≤ 1) (hK : 0 ≤ K) (hδ : 0 ≤ δ) (hVariance : A.predictableQuadraticVariation n ≤ᵐ[μ n] fun _ => K) (hLindeberg : A.conditionalLindeberg η n ≤ᵐ[μ n] fun _ => δ) : ‖(∫ ω, exp (I * ((t * A.rowSum n ω : ℝ) : ℂ)) ∂(μ n)) - ((exp (-(t ^ 2 / 2)) : ℝ) : ℂ)‖ ≤ exp ((t ^ 2 / 2) * K) * (|t| ^ 3 * η * K + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * δ + ((t ^ 2 / 2) ^ 2 / 2) * ((η ^ 2 + δ) * K)) + exp ((t ^ 2 / 2) * max K 1) * (t ^ 2 / 2) * ∫ ω, |A.predictableQuadraticVariation n ω - 1| ∂(μ n) := by /- Insert the compensated terminal integral and use the preceding theorem. The unit-modulus characteristic weight removes from the other difference; apply `abs_exp_varianceCorrection_sub_one_le` pointwise and integrate. -/ let c : ℝ := t ^ 2 / 2 let V : Ω n → ℝ := A.predictableQuadraticVariation n let g : Ω n → ℂ := fun ω => exp (I * ((t * A.rowSum n ω : ℝ) : ℂ)) let q : Ω n → ℂ := fun ω => ((exp (c * (V ω - 1)) : ℝ) : ℂ) let W : Ω n → ℂ := fun ω => g ω * q ω let C : ℝ := exp (c * max K 1) * c have hc : 0 ≤ c := by dsimp [c] positivity have hVInt : Integrable V (μ n) := by dsimp [V] unfold predictableQuadraticVariation rw [show (∑ k ∈ range (A.rowLength n), (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k]) = (fun ω => ∑ k ∈ range (A.rowLength n), (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω) by funext ω simp only [Finset.sum_apply]] exact integrable_finsetSum (range (A.rowLength n)) (fun k _ => (integrable_condExp : Integrable ((μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k]) (μ n))) have hVNonneg : 0 ≤ᵐ[μ n] V := by have hall : ∀ᵐ ω ∂(μ n), ∀ k, 0 ≤ (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω := ae_all_iff.mpr fun k => condExp_nonneg (ae_of_all _ fun ω => sq_nonneg (A.increment n k ω)) filter_upwards [hall] with ω hω dsimp [V] unfold predictableQuadraticVariation simp only [Finset.sum_apply] exact sum_nonneg fun k _ => hω k have hgMeas : AEStronglyMeasurable g (μ n) := by have hrow := A.rowSum_aemeasurable n dsimp [g] fun_prop have hgInt : Integrable g (μ n) := by refine Integrable.mono' (integrable_const (1 : ℝ)) hgMeas ?_ filter_upwards with ω dsimp [g] rw [Complex.norm_exp] simp have hWMeas : AEStronglyMeasurable W (μ n) := by have hqMeas : AEStronglyMeasurable q (μ n) := by have hVm := hVInt.aestronglyMeasurable dsimp [q] fun_prop exact hgMeas.mul hqMeas have hWBound : ∀ᵐ ω ∂(μ n), ‖W ω‖ ≤ exp (c * K) := by filter_upwards [hVariance] with ω hVω have harg : c * (V ω - 1) ≤ c * K := by apply mul_le_mul_of_nonneg_left _ hc dsimp [V] linarith calc ‖W ω‖ = exp (c * (V ω - 1)) := by dsimp [W, g, q] rw [norm_mul, Complex.norm_exp, Complex.norm_real] simp _ ≤ exp (c * K) := Real.exp_le_exp.mpr harg have hWInt : Integrable W (μ n) := Integrable.mono' (integrable_const (exp (c * K))) hWMeas hWBound have hAbsVInt : Integrable (fun ω => |V ω - 1|) (μ n) := (hVInt.sub (integrable_const 1)).abs have hC : 0 ≤ C := by dsimp [C] positivity have hNormDiff : ∀ ω, ‖g ω - W ω‖ = |exp (c * (V ω - 1)) - 1| := by intro ω dsimp [W, g, q] rw [show exp (I * ((t * A.rowSum n ω : ℝ) : ℂ)) - exp (I * ((t * A.rowSum n ω : ℝ) : ℂ)) * ((exp (c * (V ω - 1)) : ℝ) : ℂ) = exp (I * ((t * A.rowSum n ω : ℝ) : ℂ)) * (1 - ((exp (c * (V ω - 1)) : ℝ) : ℂ)) by ring] rw [norm_mul] have hchar : ‖Complex.exp (I * ((t * A.rowSum n ω : ℝ) : ℂ))‖ = 1 := by rw [Complex.norm_exp] simp rw [hchar, one_mul] rw [show (1 : ℂ) - ((exp (c * (V ω - 1)) : ℝ) : ℂ) = (((1 - exp (c * (V ω - 1))) : ℝ) : ℂ) by rw [Complex.ofReal_sub, Complex.ofReal_one]] rw [Complex.norm_real, Real.norm_eq_abs, abs_sub_comm] have hDiff : ‖(∫ ω, g ω ∂(μ n)) - ∫ ω, W ω ∂(μ n)‖ ≤ C * ∫ ω, |V ω - 1| ∂(μ n) := by rw [← integral_sub hgInt hWInt] calc ‖∫ ω, g ω - W ω ∂(μ n)‖ ≤ ∫ ω, ‖g ω - W ω‖ ∂(μ n) := norm_integral_le_integral_norm _ _ = ∫ ω, |exp (c * (V ω - 1)) - 1| ∂(μ n) := by apply integral_congr_ae filter_upwards with ω exact hNormDiff ω _ ≤ ∫ ω, C * |V ω - 1| ∂(μ n) := by apply integral_mono_ae · exact (hgInt.sub hWInt).norm.congr (ae_of_all _ hNormDiff) · exact hAbsVInt.const_mul C · filter_upwards [hVNonneg, hVariance] with ω hV0 hVK dsimp [C] exact abs_exp_varianceCorrection_sub_one_le c (V ω) K hc hV0 (by simpa only [V] using hVK) _ = C * ∫ ω, |V ω - 1| ∂(μ n) := integral_const_mul _ _ have hTerminal : A.compensatedWeight n (A.rowLength n) t = W := by funext ω dsimp [W, g, q, V, c, compensatedWeight] simp [partialRowSum, rowSum, partialPredictableQuadraticVariation, predictableQuadraticVariation, conditionalSecondMoment] have hComp := A.norm_integral_compensatedWeight_rowSum_sub_gaussian_le_of_budgets n t η K δ hη htη hK hδ hVariance hLindeberg rw [hTerminal] at hComp change ‖(∫ ω, g ω ∂(μ n)) - ((exp (-c) : ℝ) : ℂ)‖ ≤ _ calc ‖(∫ ω, g ω ∂(μ n)) - ((exp (-c) : ℝ) : ℂ)‖ = ‖((∫ ω, g ω ∂(μ n)) - ∫ ω, W ω ∂(μ n)) + ((∫ ω, W ω ∂(μ n)) - ((exp (-c) : ℝ) : ℂ))‖ := by congr 1 ring _ ≤ ‖(∫ ω, g ω ∂(μ n)) - ∫ ω, W ω ∂(μ n)‖ + ‖(∫ ω, W ω ∂(μ n)) - ((exp (-c) : ℝ) : ℂ)‖ := norm_add_le _ _ _ ≤ C * ∫ ω, |V ω - 1| ∂(μ n) + exp (c * K) * (|t| ^ 3 * η * K + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * δ + (c ^ 2 / 2) * ((η ^ 2 + δ) * K)) := add_le_add hDiff (by simpa only [c] using hComp) _ = _ := by dsimp [C, V, c] ring
    Causalean.Stat.MartingaleDifferenceArray.norm_integral_cexp_rowSum_sub_gaussian_le_of_budgets · Causalean/Stat/CLT/MartingaleArray/CompensatedTelescoping.lean:183
Conditional­Taylor 1 core · 4 supporting This module isolates the one-increment analytic estimates used by a martingale-array characteristic-function argument. ★ integral_norm_expQuadraticRemainder_le

Conditional Taylor estimates for martingale characteristic functions

This module isolates the one-increment analytic estimates used by a martingale-array characteristic-function argument. It records the exact conditional quadratic expansion, a bounded predictable pull-out estimate, and the integrated truncated-remainder bound. These results do not assume independence.

theorem integral_norm_expQuadraticRemainder_le reviewed
Causalean.Stat

For a square-integrable real random variable, a positive truncation level, and a frequency small at that level, the integrated quadratic exponential remainder is bounded by a cubic small-jump term plus the truncated second moment of the large jumps.

Formal statement
Ω :
shared
X :
Ω → ℝ
hX :
MemLp X 2 μ
t η :
:
0 < η
htη :
|t| * η ≤ 1
(∫ ω, ‖expQuadraticRemainder (t * X ω)‖ ∂μ)
≤ |t| ^ 3 * η * (∫ ω, X ω ^ 2 ∂μ)
+ (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * (∫ ω, if η < |X ω| then X ω ^ 2 else 0 ∂μ)
Proof (Lean source)
theorem integral_norm_expQuadraticRemainder_le (X : Ω → ℝ) (hX : MemLp X 2 μ) (t η : ℝ) (hη : 0 < η) (htη : |t| * η ≤ 1) : (∫ ω, ‖expQuadraticRemainder (t * X ω)‖ ∂μ) ≤ |t| ^ 3 * η * (∫ ω, X ω ^ 2 ∂μ) + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * (∫ ω, if η < |X ω| then X ω ^ 2 else 0 ∂μ) := by /- Integrate `norm_expQuadraticRemainder_le_truncated`. Obtain integrability of `X²`, the truncated square, and the remainder from `hX` and `norm_expQuadraticRemainder_le_global`, then distribute the integral over the two nonnegative constant multiples. -/ have hX2 : Integrable (fun ω => X ω ^ 2) μ := hX.integrable_sq have htrunc : Integrable (fun ω => if η < |X ω| then X ω ^ 2 else 0) μ := by let Y := hX.aestronglyMeasurable.mk X have hXY : X =ᵐ[μ] Y := hX.aestronglyMeasurable.ae_eq_mk have hYmeas : StronglyMeasurable Y := hX.aestronglyMeasurable.stronglyMeasurable_mk have hY2 : Integrable (fun ω => Y ω ^ 2) μ := hX2.congr (hXY.pow_const 2) have hs : MeasurableSet {ω | η < |Y ω|} := measurableSet_lt measurable_const hYmeas.measurable.norm have htruncY : Integrable (fun ω => if η < |Y ω| then Y ω ^ 2 else 0) μ := by apply (hY2.indicator hs).congr filter_upwards with ω rw [indicator] rfl exact htruncY.congr (hXY.mono (fun ω hω => by simp [hω])) let A : ℝ := |t| ^ 3 * η let C : ℝ := 2 / η ^ 2 + |t| / η + t ^ 2 / 2 have hA : Integrable (fun ω => A * X ω ^ 2) μ := hX2.const_mul A have hC : Integrable (fun ω => C * (if η < |X ω| then X ω ^ 2 else 0)) μ := htrunc.const_mul C have hmajor : Integrable (fun ω => A * X ω ^ 2 + C * (if η < |X ω| then X ω ^ 2 else 0)) μ := hA.add hC have hremMeas : AEStronglyMeasurable (fun ω => ‖expQuadraticRemainder (t * X ω)‖) μ := by have hXm := hX.aestronglyMeasurable unfold expQuadraticRemainder fun_prop have hbound : ∀ᵐ ω ∂μ, ‖expQuadraticRemainder (t * X ω)‖ ≤ A * X ω ^ 2 + C * (if η < |X ω| then X ω ^ 2 else 0) := ae_of_all μ fun ω => by simpa only [A, C] using norm_expQuadraticRemainder_le_truncated t (X ω) η hη htη have hrem : Integrable (fun ω => ‖expQuadraticRemainder (t * X ω)‖) μ := by apply hmajor.mono' hremMeas filter_upwards [hbound] with ω hω simpa only [Real.norm_eq_abs, abs_of_nonneg (norm_nonneg _)] using hω calc (∫ ω, ‖expQuadraticRemainder (t * X ω)‖ ∂μ) ≤ ∫ ω, A * X ω ^ 2 + C * (if η < |X ω| then X ω ^ 2 else 0) ∂μ := integral_mono_ae hrem hmajor hbound _ = A * (∫ ω, X ω ^ 2 ∂μ) + C * (∫ ω, if η < |X ω| then X ω ^ 2 else 0 ∂μ) := by rw [integral_add hA hC, integral_const_mul, integral_const_mul] _ = |t| ^ 3 * η * (∫ ω, X ω ^ 2 ∂μ) + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * (∫ ω, if η < |X ω| then X ω ^ 2 else 0 ∂μ) := by rfl
Causalean.Stat.integral_norm_expQuadraticRemainder_le · Causalean/Stat/CLT/MartingaleArray/ConditionalTaylor.lean:215 · uses expQuadraticRemainder
4 supporting declarations (lemmas, instances)
  • condExp_ofReal_ae_eq_zero theorem — If the conditioning sigma-algebra is contained in the ambient sigma-algebra, a real random variable is integrable, and has conditional mean zero, then its complex embedding also has conditional mean zero.
    Ω :
    shared
    hm :
    m ≤ mΩ
    X :
    Ω → ℝ
    hX :
    hZero :
    μ[X | m] =ᵐ[μ] 0
    μ[(fun ω => (X ω : ℂ)) | m] =ᵐ[μ] 0
    Proof (Lean source)
    theorem condExp_ofReal_ae_eq_zero [IsProbabilityMeasure μ] (hm : m ≤ mΩ) (X : Ω → ℝ) (hX : Integrable X μ) (hZero : μ[X | m] =ᵐ[μ] 0) : μ[(fun ω => (X ω : ℂ)) | m] =ᵐ[μ] 0 := by /- Apply `ContinuousLinearMap.comp_condExp_comm` to the real-to-complex continuous linear map, then rewrite with `hZero`. -/ change μ[Complex.ofRealCLM ∘ X | m] =ᵐ[μ] 0 calc μ[Complex.ofRealCLM ∘ X | m] =ᵐ[μ] Complex.ofRealCLM ∘ μ[X | m] := (Complex.ofRealCLM.comp_condExp_comm hX).symm _ =ᵐ[μ] 0 := hZero.mono (fun ω hω => by simp [Function.comp_apply, hω])
    Causalean.Stat.condExp_ofReal_ae_eq_zero · Causalean/Stat/CLT/MartingaleArray/ConditionalTaylor.lean:25
  • condExp_cexp_ae_eq_quadratic_add_remainder theorem — For a conditioning sigma-algebra contained in the ambient sigma-algebra, a square-integrable real random variable with conditional mean zero, the conditional characteristic-function increment is exactly its constant term, conditional quadratic term, and conditional Taylor remainder.
    Ω :
    shared
    hm :
    m ≤ mΩ
    X :
    Ω → ℝ
    hX :
    MemLp X 2 μ
    hZero :
    μ[X | m] =ᵐ[μ] 0
    t :
    μ[(fun ω => exp (I * ((t * X ω : ℝ) : ℂ))) | m]
    =ᵐ[μ] fun ω => 1
    - (((t ^ 2 / 2 : ℝ) : ℂ) * ((μ[(fun ω => X ω ^ 2) | m] ω : ℝ) : ℂ))
    + μ[(fun ω => expQuadraticRemainder (t * X ω)) | m] ω
    Proof (Lean source)
    theorem condExp_cexp_ae_eq_quadratic_add_remainder [IsProbabilityMeasure μ] (hm : m ≤ mΩ) (X : Ω → ℝ) (hX : MemLp X 2 μ) (hZero : μ[X | m] =ᵐ[μ] 0) (t : ℝ) : μ[(fun ω => exp (I * ((t * X ω : ℝ) : ℂ))) | m] =ᵐ[μ] fun ω => 1 - (((t ^ 2 / 2 : ℝ) : ℂ) * ((μ[(fun ω => X ω ^ 2) | m] ω : ℝ) : ℂ)) + μ[(fun ω => expQuadraticRemainder (t * X ω)) | m] ω := by /- Rearrange the defining Taylor identity pointwise, establish integrability of every term from `hX` and the global remainder bound, and use conditional expectation linearity. The linear term vanishes by `condExp_ofReal_ae_eq_zero`; commute real-to-complex coercion through the conditional expectation for the quadratic term. -/ have hX1 : Integrable X μ := hX.integrable (by norm_num) have hX2 : Integrable (fun ω => X ω ^ 2) μ := hX.integrable_sq have hlin : Integrable (fun ω => (I * (t : ℂ)) * (X ω : ℂ)) μ := hX1.ofReal.const_mul _ have hquad : Integrable (fun ω => ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ)) μ := hX2.ofReal.const_mul _ have hexp : Integrable (fun ω => exp (I * ((t * X ω : ℝ) : ℂ))) μ := by have hmeas : AEStronglyMeasurable (fun ω => exp (I * ((t * X ω : ℝ) : ℂ))) μ := by fun_prop refine Integrable.mono' (integrable_const (1 : ℝ)) hmeas ?_ filter_upwards with ω rw [Complex.norm_exp] simp have hrem : Integrable (fun ω => expQuadraticRemainder (t * X ω)) μ := by apply (((hexp.sub (integrable_const (1 : ℂ))).sub hlin).add hquad).congr filter_upwards with ω rw [expQuadraticRemainder] push_cast simp only [Pi.add_apply, Pi.sub_apply] ring have hpoint : (fun ω => exp (I * ((t * X ω : ℝ) : ℂ))) = (fun ω => (1 : ℂ) + (I * (t : ℂ)) * (X ω : ℂ) - ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ) + expQuadraticRemainder (t * X ω)) := by funext ω rw [expQuadraticRemainder] push_cast ring rw [hpoint] have hconst : Integrable (fun _ : Ω => (1 : ℂ)) μ := integrable_const _ have hbase : Integrable (fun ω => (1 : ℂ) + (I * (t : ℂ)) * (X ω : ℂ) - ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ)) μ := (hconst.add hlin).sub hquad have hsplit : μ[(fun ω => (1 : ℂ) + (I * (t : ℂ)) * (X ω : ℂ) - ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ) + expQuadraticRemainder (t * X ω)) | m] =ᵐ[μ] fun ω => μ[(fun ω => (1 : ℂ) + (I * (t : ℂ)) * (X ω : ℂ) - ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ)) | m] ω + μ[(fun ω => expQuadraticRemainder (t * X ω)) | m] ω := by convert condExp_add hbase hrem m using 1 <;> ext ω <;> rfl have hsub : μ[(fun ω => (1 : ℂ) + (I * (t : ℂ)) * (X ω : ℂ) - ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ)) | m] =ᵐ[μ] fun ω => μ[(fun ω => (1 : ℂ) + (I * (t : ℂ)) * (X ω : ℂ)) | m] ω - μ[(fun ω => ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ)) | m] ω := by convert condExp_sub (hconst.add hlin) hquad m using 1 <;> ext ω <;> rfl have hadd : μ[(fun ω => (1 : ℂ) + (I * (t : ℂ)) * (X ω : ℂ)) | m] =ᵐ[μ] fun ω => μ[(fun _ : Ω => (1 : ℂ)) | m] ω + μ[(fun ω => (I * (t : ℂ)) * (X ω : ℂ)) | m] ω := by convert condExp_add hconst hlin m using 1 <;> ext ω <;> rfl have hlinZero : μ[(fun ω => (I * (t : ℂ)) * (X ω : ℂ)) | m] =ᵐ[μ] 0 := by have hsmul : μ[(fun ω => (I * (t : ℂ)) * (X ω : ℂ)) | m] =ᵐ[μ] fun ω => (I * (t : ℂ)) * μ[(fun ω => (X ω : ℂ)) | m] ω := by convert condExp_smul (μ := μ) (I * (t : ℂ)) (fun ω => (X ω : ℂ)) m using 1 <;> ext ω <;> rfl have hzero := condExp_ofReal_ae_eq_zero (mΩ := mΩ) (m := m) (μ := μ) hm X hX1 hZero filter_upwards [hsmul, hzero] with ω hsmulω hzeroω simpa only [Pi.smul_apply, Pi.zero_apply, smul_eq_mul, mul_zero] using hsmulω.trans (congrArg ((I * (t : ℂ)) * ·) hzeroω) have hquadComm : μ[(fun ω => ((X ω ^ 2 : ℝ) : ℂ)) | m] =ᵐ[μ] fun ω => ((μ[(fun ω => X ω ^ 2) | m] ω : ℝ) : ℂ) := by change μ[Complex.ofRealCLM ∘ (fun ω => X ω ^ 2) | m] =ᵐ[μ] Complex.ofRealCLM ∘ μ[(fun ω => X ω ^ 2) | m] exact (Complex.ofRealCLM.comp_condExp_comm hX2).symm have hquadCE : μ[(fun ω => ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ)) | m] =ᵐ[μ] fun ω => ((t ^ 2 / 2 : ℝ) : ℂ) * μ[(fun ω => ((X ω ^ 2 : ℝ) : ℂ)) | m] ω := by convert condExp_smul (μ := μ) ((t ^ 2 / 2 : ℝ) : ℂ) (fun ω => ((X ω ^ 2 : ℝ) : ℂ)) m using 1 <;> ext ω <;> rfl have hone : μ[(fun _ : Ω => (1 : ℂ)) | m] = fun _ => 1 := by exact condExp_const (μ := μ) hm (1 : ℂ) filter_upwards [hsplit, hsub, hadd, hlinZero, hquadCE, hquadComm] with ω hsplitω hsubω haddω hlinZeroω hquadCEω hquadCommω rw [hsplitω, hsubω, haddω, hlinZeroω, hquadCEω, hquadCommω] rw [congrFun hone ω] simp only [Pi.zero_apply] ring
    Causalean.Stat.condExp_cexp_ae_eq_quadratic_add_remainder · Causalean/Stat/CLT/MartingaleArray/ConditionalTaylor.lean:42
  • integral_mul_condExp_eq_integral_mul_of_ae_bound theorem — If the conditioning sigma-algebra is contained in the ambient sigma-algebra, an integrable complex function is multiplied by a predictable complex weight whose norm has an almost-sure finite bound, then integrating after conditional expectation gives the original weighted integral.
    Ω :
    shared
    hm :
    m ≤ mΩ
    f g :
    Ω → ℂ
    hf :
    hg :
    B :
    hgBound :
    ∀ᵐ ω ∂μ, ‖g ω‖ ≤ B
    (∫ ω, g ω * μ[f | m] ω ∂μ) = ∫ ω, g ω * f ω ∂μ
    Proof (Lean source)
    theorem integral_mul_condExp_eq_integral_mul_of_ae_bound [IsProbabilityMeasure μ] (hm : m ≤ mΩ) (f g : Ω → ℂ) (hf : Integrable f μ) (hg : StronglyMeasurable[m] g) (B : ℝ) (hgBound : ∀ᵐ ω ∂μ, ‖g ω‖ ≤ B) : (∫ ω, g ω * μ[f | m] ω ∂μ) = ∫ ω, g ω * f ω ∂μ := by have hgf : Integrable (fun ω => g ω * f ω) μ := hf.bdd_mul (hg.mono hm).aestronglyMeasurable hgBound have hpull : μ[(fun ω => g ω * f ω) | m] =ᵐ[μ] fun ω => g ω * μ[f | m] ω := by convert condExp_stronglyMeasurable_bilin_of_bound (mΩ := mΩ) (μ := μ) (ContinuousLinearMap.mul ℝ ℂ) hm hg hf B hgBound using 1 <;> ext ω <;> rfl calc (∫ ω, g ω * μ[f | m] ω ∂μ) = ∫ ω, μ[(fun ω => g ω * f ω) | m] ω ∂μ := integral_congr_ae hpull.symm _ = ∫ ω, g ω * f ω ∂μ := by rw [integral_condExp (m₀ := mΩ) (μ := μ) hm]
    Causalean.Stat.integral_mul_condExp_eq_integral_mul_of_ae_bound · Causalean/Stat/CLT/MartingaleArray/ConditionalTaylor.lean:155
  • norm_integral_mul_condExp_le_of_ae_bound theorem — If the conditioning sigma-algebra is contained in the ambient sigma-algebra, an integrable complex error is multiplied by a predictable complex weight whose norm is bounded by a nonnegative constant, then the norm of the integral of the weight times the conditional error is at most that constant times the integral norm of the original error.
    Ω :
    shared
    hm :
    m ≤ mΩ
    f g :
    Ω → ℂ
    hf :
    hg :
    B :
    hB :
    0 ≤ B
    hgBound :
    ∀ᵐ ω ∂μ, ‖g ω‖ ≤ B
    ‖∫ ω, g ω * μ[f | m] ω ∂μ‖ ≤ B * ∫ ω, ‖f ω‖ ∂μ
    Proof (Lean source)
    theorem norm_integral_mul_condExp_le_of_ae_bound [IsProbabilityMeasure μ] (hm : m ≤ mΩ) (f g : Ω → ℂ) (hf : Integrable f μ) (hg : StronglyMeasurable[m] g) (B : ℝ) (hB : 0 ≤ B) (hgBound : ∀ᵐ ω ∂μ, ‖g ω‖ ≤ B) : ‖∫ ω, g ω * μ[f | m] ω ∂μ‖ ≤ B * ∫ ω, ‖f ω‖ ∂μ := by /- Use the conditional-expectation pull-out theorem for the bounded `m`-measurable factor `g`, then `integral_condExp`. Bound the resulting integral of `g * f` by the integral of its norm and use `hgBound`. -/ have hgf : Integrable (fun ω => g ω * f ω) μ := hf.bdd_mul (hg.mono hm).aestronglyMeasurable hgBound have hpull : μ[(fun ω => g ω * f ω) | m] =ᵐ[μ] fun ω => g ω * μ[f | m] ω := by convert condExp_stronglyMeasurable_bilin_of_bound (mΩ := mΩ) (μ := μ) (ContinuousLinearMap.mul ℝ ℂ) hm hg hf B hgBound using 1 <;> ext ω <;> rfl have hnorm : Integrable (fun ω => ‖g ω * f ω‖) μ := hgf.norm have hmajor : Integrable (fun ω => B * ‖f ω‖) μ := hf.norm.const_mul B calc ‖∫ ω, g ω * μ[f | m] ω ∂μ‖ = ‖∫ ω, μ[(fun ω => g ω * f ω) | m] ω ∂μ‖ := by rw [integral_congr_ae hpull] _ = ‖∫ ω, g ω * f ω ∂μ‖ := by rw [integral_condExp (m₀ := mΩ) (μ := μ) hm] _ ≤ ∫ ω, ‖g ω * f ω‖ ∂μ := norm_integral_le_integral_norm _ _ ≤ ∫ ω, B * ‖f ω‖ ∂μ := by apply integral_mono_ae hnorm hmajor filter_upwards [hgBound] with ω hω rw [norm_mul] exact mul_le_mul_of_nonneg_right hω (norm_nonneg _) _ = B * ∫ ω, ‖f ω‖ ∂μ := integral_const_mul _ _
    Causalean.Stat.norm_integral_mul_condExp_le_of_ae_bound · Causalean/Stat/CLT/MartingaleArray/ConditionalTaylor.lean:179
Conditional­Telescoping 2 core · 3 supporting This module turns the one-increment conditional Taylor formula into exact and bounded telescoping formulas for a finite martingale-difference row. ★ partialRowSum_stronglyMeasurable

Conditional telescoping for finite martingale rows

This module turns the one-increment conditional Taylor formula into exact and bounded telescoping formulas for a finite martingale-difference row. It keeps the random conditional variances visible; later stopping and blocking arguments can therefore compare them with deterministic Gaussian time without assuming independence.

def partialRowSum reviewed
Causalean.Stat.MartingaleDifferenceArray

The partial row sum through time r adds the first r increments, capped at the row length.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
n r :
partialRowSum A n r :
Ω n → ℝ
∑ k ∈ range (min r (A.rowLength n)), A.increment n k
Causalean.Stat.MartingaleDifferenceArray.partialRowSum · Causalean/Stat/CLT/MartingaleArray/ConditionalTelescoping.lean:28 · uses MartingaleDifferenceArray
theorem partialRowSum_stronglyMeasurable reviewed
Causalean.Stat.MartingaleDifferenceArray

For a martingale-difference triangular array, a row, and a time index, the partial row sum is measurable with respect to that row's filtration at that time.

Formal statement
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
n r :
StronglyMeasurable[A.filtration n r] (A.partialRowSum n r)
Proof (Lean source)
theorem partialRowSum_stronglyMeasurable (A : MartingaleDifferenceArray Ω μ) (n r : ℕ) : StronglyMeasurable[A.filtration n r] (A.partialRowSum n r) := by unfold partialRowSum apply Finset.stronglyMeasurable_sum intro k hk have hkmin : k < min r (A.rowLength n) := Finset.mem_range.mp hk exact (A.adapted n k (lt_of_lt_of_le hkmin (min_le_right _ _))).mono ((A.filtration n).mono (Nat.succ_le_of_lt (lt_of_lt_of_le hkmin (min_le_left _ _))))
Causalean.Stat.MartingaleDifferenceArray.partialRowSum_stronglyMeasurable · Causalean/Stat/CLT/MartingaleArray/ConditionalTelescoping.lean:34 · uses MartingaleDifferenceArray , partialRowSum
3 supporting declarations (lemmas, instances)
  • integral_cexp_partialRowSum_succ theorem — For an active increment, the integral characteristic function after that increment equals the preceding exponential weight times the exact conditional quadratic expansion.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    ∀ n, IsProbabilityMeasure (μ n)
    n k :
    hk :
    k < A.rowLength n
    t :
    (∫ ω, exp (I * ((t * A.partialRowSum n (k + 1) ω : ℝ) : ℂ)) ∂(μ n))
    = ∫ ω, exp (I * ((t * A.partialRowSum n k ω : ℝ) : ℂ)) * (1 - (((t ^ 2 / 2 : ℝ) : ℂ) * (((μ n)[(fun ω => (A.increment n k ω) ^ 2) | A.filtration n k] ω : ℝ) : ℂ)) + (μ n)[(fun ω => expQuadraticRemainder (t * A.increment n k ω)) | A.filtration n k] ω) ∂(μ n)
    Proof (Lean source)
    theorem integral_cexp_partialRowSum_succ [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (n k : ℕ) (hk : k < A.rowLength n) (t : ℝ) : (∫ ω, exp (I * ((t * A.partialRowSum n (k + 1) ω : ℝ) : ℂ)) ∂(μ n)) = ∫ ω, exp (I * ((t * A.partialRowSum n k ω : ℝ) : ℂ)) * (1 - (((t ^ 2 / 2 : ℝ) : ℂ) * (((μ n)[(fun ω => (A.increment n k ω) ^ 2) | A.filtration n k] ω : ℝ) : ℂ)) + (μ n)[(fun ω => expQuadraticRemainder (t * A.increment n k ω)) | A.filtration n k] ω) ∂(μ n) := by let f : Ω n → ℂ := fun ω => exp (I * ((t * A.increment n k ω : ℝ) : ℂ)) let g : Ω n → ℂ := fun ω => exp (I * ((t * A.partialRowSum n k ω : ℝ) : ℂ)) have hfMeas : AEStronglyMeasurable f (μ n) := by have hX := (A.squareIntegrable n k hk).aestronglyMeasurable dsimp [f] fun_prop have hf : Integrable f (μ n) := by refine Integrable.mono' (integrable_const (1 : ℝ)) hfMeas ?_ filter_upwards with ω dsimp [f] rw [Complex.norm_exp] simp have hg : StronglyMeasurable[A.filtration n k] g := by have hS := A.partialRowSum_stronglyMeasurable n k dsimp [g] fun_prop have hgBound : ∀ᵐ ω ∂(μ n), ‖g ω‖ ≤ 1 := by filter_upwards with ω dsimp [g] rw [Complex.norm_exp] simp have hpull : (μ n)[(fun ω => g ω * f ω) | A.filtration n k] =ᵐ[μ n] fun ω => g ω * (μ n)[f | A.filtration n k] ω := by convert condExp_stronglyMeasurable_bilin_of_bound (ContinuousLinearMap.mul ℝ ℂ) ((A.filtration n).le k) hg hf 1 hgBound using 1 <;> ext ω <;> rfl have htaylor : (μ n)[f | A.filtration n k] =ᵐ[μ n] fun ω => 1 - (((t ^ 2 / 2 : ℝ) : ℂ) * (((μ n)[(fun ω => (A.increment n k ω) ^ 2) | A.filtration n k] ω : ℝ) : ℂ)) + (μ n)[(fun ω => expQuadraticRemainder (t * A.increment n k ω)) | A.filtration n k] ω := by let X := A.increment n k have hX2 := A.squareIntegrable n k hk have hX1 : Integrable X (μ n) := hX2.integrable (by norm_num) have hsq : Integrable (fun ω => X ω ^ 2) (μ n) := hX2.integrable_sq have hlin : Integrable (fun ω => (I * (t : ℂ)) * (X ω : ℂ)) (μ n) := hX1.ofReal.const_mul _ have hquad : Integrable (fun ω => ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ)) (μ n) := hsq.ofReal.const_mul _ have hrem : Integrable (fun ω => expQuadraticRemainder (t * X ω)) (μ n) := by apply (((hf.sub (integrable_const (1 : ℂ))).sub hlin).add hquad).congr filter_upwards with ω dsimp [f, X] rw [expQuadraticRemainder] push_cast ring have hpoint : f = fun ω => (1 : ℂ) + (I * (t : ℂ)) * (X ω : ℂ) - ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ) + expQuadraticRemainder (t * X ω) := by funext ω dsimp [f, X] rw [expQuadraticRemainder] push_cast ring rw [hpoint] have hconst : Integrable (fun _ : Ω n => (1 : ℂ)) (μ n) := integrable_const _ have hbase : Integrable (fun ω => (1 : ℂ) + (I * (t : ℂ)) * (X ω : ℂ) - ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ)) (μ n) := (hconst.add hlin).sub hquad have hsplitCE : (μ n)[(fun ω => (1 : ℂ) + (I * (t : ℂ)) * (X ω : ℂ) - ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ) + expQuadraticRemainder (t * X ω)) | A.filtration n k] =ᵐ[μ n] fun ω => (μ n)[(fun ω => (1 : ℂ) + (I * (t : ℂ)) * (X ω : ℂ) - ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ)) | A.filtration n k] ω + (μ n)[(fun ω => expQuadraticRemainder (t * X ω)) | A.filtration n k] ω := by convert condExp_add hbase hrem (A.filtration n k) using 1 <;> ext ω <;> rfl have hsub : (μ n)[(fun ω => (1 : ℂ) + (I * (t : ℂ)) * (X ω : ℂ) - ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ)) | A.filtration n k] =ᵐ[μ n] fun ω => (μ n)[(fun ω => (1 : ℂ) + (I * (t : ℂ)) * (X ω : ℂ)) | A.filtration n k] ω - (μ n)[(fun ω => ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ)) | A.filtration n k] ω := by convert condExp_sub (hconst.add hlin) hquad (A.filtration n k) using 1 <;> ext ω <;> rfl have hadd : (μ n)[(fun ω => (1 : ℂ) + (I * (t : ℂ)) * (X ω : ℂ)) | A.filtration n k] =ᵐ[μ n] fun ω => (μ n)[(fun _ : Ω n => (1 : ℂ)) | A.filtration n k] ω + (μ n)[(fun ω => (I * (t : ℂ)) * (X ω : ℂ)) | A.filtration n k] ω := by convert condExp_add hconst hlin (A.filtration n k) using 1 <;> ext ω <;> rfl have hXComplex : (μ n)[(fun ω => (X ω : ℂ)) | A.filtration n k] =ᵐ[μ n] 0 := by change (μ n)[Complex.ofRealCLM ∘ X | A.filtration n k] =ᵐ[μ n] 0 calc (μ n)[Complex.ofRealCLM ∘ X | A.filtration n k] =ᵐ[μ n] Complex.ofRealCLM ∘ (μ n)[X | A.filtration n k] := (Complex.ofRealCLM.comp_condExp_comm hX1).symm _ =ᵐ[μ n] 0 := (A.condExp_zero n k hk).mono (fun ω hω => by simp [Function.comp_apply, X, hω]) have hlinZero : (μ n)[(fun ω => (I * (t : ℂ)) * (X ω : ℂ)) | A.filtration n k] =ᵐ[μ n] 0 := by have hsmul : (μ n)[(fun ω => (I * (t : ℂ)) * (X ω : ℂ)) | A.filtration n k] =ᵐ[μ n] fun ω => (I * (t : ℂ)) * (μ n)[(fun ω => (X ω : ℂ)) | A.filtration n k] ω := by convert condExp_smul (μ := μ n) (I * (t : ℂ)) (fun ω => (X ω : ℂ)) (A.filtration n k) using 1 <;> ext ω <;> rfl filter_upwards [hsmul, hXComplex] with ω hsmulω hzeroω simpa only [Pi.zero_apply, mul_zero] using hsmulω.trans (congrArg ((I * (t : ℂ)) * ·) hzeroω) have hquadComm : (μ n)[(fun ω => ((X ω ^ 2 : ℝ) : ℂ)) | A.filtration n k] =ᵐ[μ n] fun ω => (((μ n)[(fun ω => X ω ^ 2) | A.filtration n k] ω : ℝ) : ℂ) := by change (μ n)[Complex.ofRealCLM ∘ (fun ω => X ω ^ 2) | A.filtration n k] =ᵐ[μ n] Complex.ofRealCLM ∘ (μ n)[(fun ω => X ω ^ 2) | A.filtration n k] exact (Complex.ofRealCLM.comp_condExp_comm hsq).symm have hquadCE : (μ n)[(fun ω => ((t ^ 2 / 2 : ℝ) : ℂ) * ((X ω ^ 2 : ℝ) : ℂ)) | A.filtration n k] =ᵐ[μ n] fun ω => ((t ^ 2 / 2 : ℝ) : ℂ) * (μ n)[(fun ω => ((X ω ^ 2 : ℝ) : ℂ)) | A.filtration n k] ω := by convert condExp_smul (μ := μ n) ((t ^ 2 / 2 : ℝ) : ℂ) (fun ω => ((X ω ^ 2 : ℝ) : ℂ)) (A.filtration n k) using 1 <;> ext ω <;> rfl have hone := condExp_const (μ := μ n) ((A.filtration n).le k) (1 : ℂ) filter_upwards [hsplitCE, hsub, hadd, hlinZero, hquadCE, hquadComm] with ω hsplitω hsubω haddω hlinZeroω hquadCEω hquadCommω rw [hsplitω, hsubω, haddω, hlinZeroω, hquadCEω, hquadCommω] rw [congrFun hone ω] simp only [Pi.zero_apply, X] ring have hsplit : (fun ω => exp (I * ((t * A.partialRowSum n (k + 1) ω : ℝ) : ℂ))) = fun ω => g ω * f ω := by funext ω dsimp [g, f] unfold partialRowSum rw [Nat.min_eq_left (Nat.succ_le_of_lt hk)] rw [Nat.min_eq_left (le_trans (Nat.le_succ k) (Nat.succ_le_of_lt hk))] rw [Finset.sum_range_succ, ← Complex.exp_add] congr 1 simp only [Pi.add_apply, Finset.sum_apply] push_cast ring rw [hsplit] calc (∫ ω, g ω * f ω ∂(μ n)) = ∫ ω, (μ n)[(fun ω => g ω * f ω) | A.filtration n k] ω ∂(μ n) := by rw [integral_condExp ((A.filtration n).le k)] _ = ∫ ω, g ω * (μ n)[f | A.filtration n k] ω ∂(μ n) := integral_congr_ae hpull _ = ∫ ω, g ω * (1 - (((t ^ 2 / 2 : ℝ) : ℂ) * (((μ n)[(fun ω => (A.increment n k ω) ^ 2) | A.filtration n k] ω : ℝ) : ℂ)) + (μ n)[(fun ω => expQuadraticRemainder (t * A.increment n k ω)) | A.filtration n k] ω) ∂(μ n) := by apply integral_congr_ae filter_upwards [htaylor] with ω hω exact congrArg (g ω * ·) hω _ = _ := rfl
    Causalean.Stat.MartingaleDifferenceArray.integral_cexp_partialRowSum_succ · Causalean/Stat/CLT/MartingaleArray/ConditionalTelescoping.lean:47
  • norm_integral_cexp_partialRowSum_succ_sub_quadratic_le theorem — For an active increment, the error in replacing its conditional characteristic-function factor by the quadratic factor is bounded by the expected norm of its Taylor remainder.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    ∀ n, IsProbabilityMeasure (μ n)
    n k :
    hk :
    k < A.rowLength n
    t :
    ‖(∫ ω, exp (I * ((t * A.partialRowSum n (k + 1) ω : ℝ) : ℂ)) ∂(μ n)) - ∫ ω, exp (I * ((t * A.partialRowSum n k ω : ℝ) : ℂ)) * (1 - (((t ^ 2 / 2 : ℝ) : ℂ) * (((μ n)[(fun ω => (A.increment n k ω) ^ 2) | A.filtration n k] ω : ℝ) : ℂ))) ∂(μ n)‖
    ≤ ∫ ω, ‖expQuadraticRemainder (t * A.increment n k ω)‖ ∂(μ n)
    Proof (Lean source)
    theorem norm_integral_cexp_partialRowSum_succ_sub_quadratic_le [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (n k : ℕ) (hk : k < A.rowLength n) (t : ℝ) : ‖(∫ ω, exp (I * ((t * A.partialRowSum n (k + 1) ω : ℝ) : ℂ)) ∂(μ n)) - ∫ ω, exp (I * ((t * A.partialRowSum n k ω : ℝ) : ℂ)) * (1 - (((t ^ 2 / 2 : ℝ) : ℂ) * (((μ n)[(fun ω => (A.increment n k ω) ^ 2) | A.filtration n k] ω : ℝ) : ℂ))) ∂(μ n)‖ ≤ ∫ ω, ‖expQuadraticRemainder (t * A.increment n k ω)‖ ∂(μ n) := by let rem : Ω n → ℂ := fun ω => expQuadraticRemainder (t * A.increment n k ω) let g : Ω n → ℂ := fun ω => exp (I * ((t * A.partialRowSum n k ω : ℝ) : ℂ)) let q : Ω n → ℂ := fun ω => 1 - (((t ^ 2 / 2 : ℝ) : ℂ) * (((μ n)[(fun ω => (A.increment n k ω) ^ 2) | A.filtration n k] ω : ℝ) : ℂ)) have hX1 : Integrable (A.increment n k) (μ n) := (A.squareIntegrable n k hk).integrable (by norm_num) have hX2 : Integrable (fun ω => (A.increment n k ω) ^ 2) (μ n) := (A.squareIntegrable n k hk).integrable_sq have hexp : Integrable (fun ω => exp (I * ((t * A.increment n k ω : ℝ) : ℂ))) (μ n) := by have hmeas : AEStronglyMeasurable (fun ω => exp (I * ((t * A.increment n k ω : ℝ) : ℂ))) (μ n) := by have := hX1.aestronglyMeasurable fun_prop refine Integrable.mono' (integrable_const (1 : ℝ)) hmeas ?_ filter_upwards with ω rw [Complex.norm_exp] simp have hlin : Integrable (fun ω => (I * (t : ℂ)) * (A.increment n k ω : ℂ)) (μ n) := hX1.ofReal.const_mul _ have hquad : Integrable (fun ω => ((t ^ 2 / 2 : ℝ) : ℂ) * (((A.increment n k ω) ^ 2 : ℝ) : ℂ)) (μ n) := hX2.ofReal.const_mul _ have hrem : Integrable rem (μ n) := by apply (((hexp.sub (integrable_const (1 : ℂ))).sub hlin).add hquad).congr filter_upwards with ω dsimp [rem] rw [expQuadraticRemainder] push_cast ring have hg : StronglyMeasurable[A.filtration n k] g := by have hS := A.partialRowSum_stronglyMeasurable n k dsimp [g] fun_prop have hgBound : ∀ᵐ ω ∂(μ n), ‖g ω‖ ≤ 1 := by filter_upwards with ω dsimp [g] rw [Complex.norm_exp] simp have hgAmbient : StronglyMeasurable g := hg.mono ((A.filtration n).le k) have hq : Integrable q (μ n) := by have hce : Integrable ((μ n)[(fun ω => (A.increment n k ω) ^ 2) | A.filtration n k]) (μ n) := integrable_condExp exact (integrable_const (1 : ℂ)).sub (hce.ofReal.const_mul _) have hgq : Integrable (fun ω => g ω * q ω) (μ n) := hq.bdd_mul hgAmbient.aestronglyMeasurable hgBound have hceRem : Integrable ((μ n)[rem | A.filtration n k]) (μ n) := integrable_condExp have hgceRem : Integrable (fun ω => g ω * (μ n)[rem | A.filtration n k] ω) (μ n) := hceRem.bdd_mul hgAmbient.aestronglyMeasurable hgBound have hpull : (μ n)[(fun ω => g ω * rem ω) | A.filtration n k] =ᵐ[μ n] fun ω => g ω * (μ n)[rem | A.filtration n k] ω := by convert condExp_stronglyMeasurable_bilin_of_bound (ContinuousLinearMap.mul ℝ ℂ) ((A.filtration n).le k) hg hrem 1 hgBound using 1 <;> ext ω <;> rfl have hnorm : ‖∫ ω, g ω * (μ n)[rem | A.filtration n k] ω ∂(μ n)‖ ≤ ∫ ω, ‖rem ω‖ ∂(μ n) := by have hgf : Integrable (fun ω => g ω * rem ω) (μ n) := hrem.bdd_mul hgAmbient.aestronglyMeasurable hgBound calc ‖∫ ω, g ω * (μ n)[rem | A.filtration n k] ω ∂(μ n)‖ = ‖∫ ω, (μ n)[(fun ω => g ω * rem ω) | A.filtration n k] ω ∂(μ n)‖ := by rw [integral_congr_ae hpull] _ = ‖∫ ω, g ω * rem ω ∂(μ n)‖ := by rw [integral_condExp ((A.filtration n).le k)] _ ≤ ∫ ω, ‖g ω * rem ω‖ ∂(μ n) := norm_integral_le_integral_norm _ _ ≤ ∫ ω, ‖rem ω‖ ∂(μ n) := by apply integral_mono_ae hgf.norm hrem.norm filter_upwards [hgBound] with ω hω rw [norm_mul] simpa using mul_le_mul_of_nonneg_right hω (norm_nonneg (rem ω)) rw [A.integral_cexp_partialRowSum_succ n k hk t] change ‖(∫ ω, g ω * (q ω + (μ n)[rem | A.filtration n k] ω) ∂(μ n)) - ∫ ω, g ω * q ω ∂(μ n)‖ ≤ ∫ ω, ‖rem ω‖ ∂(μ n) rw [show (fun ω => g ω * (q ω + (μ n)[rem | A.filtration n k] ω)) = fun ω => g ω * q ω + g ω * (μ n)[rem | A.filtration n k] ω by funext ω ring] rw [integral_add hgq hgceRem, add_sub_cancel_left] exact hnorm
    Causalean.Stat.MartingaleDifferenceArray.norm_integral_cexp_partialRowSum_succ_sub_quadratic_le · Causalean/Stat/CLT/MartingaleArray/ConditionalTelescoping.lean:228
  • norm_integral_cexp_rowSum_sub_quadraticTelescoping_le theorem — For one finite martingale-difference row, the error in its full characteristic function after extracting all conditional quadratic terms is bounded by the sum of the expected one-increment Taylor remainders.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    ∀ n, IsProbabilityMeasure (μ n)
    n :
    t :
    ‖(∫ ω, exp (I * ((t * A.rowSum n ω : ℝ) : ℂ)) ∂(μ n)) - 1 + ((t ^ 2 / 2 : ℝ) : ℂ) * (∑ k ∈ range (A.rowLength n), ∫ ω, exp (I * ((t * A.partialRowSum n k ω : ℝ) : ℂ)) * (((μ n)[(fun ω => (A.increment n k ω) ^ 2) | A.filtration n k] ω : ℝ) : ℂ) ∂(μ n))‖
    ≤ ∑ k ∈ range (A.rowLength n), ∫ ω, ‖expQuadraticRemainder (t * A.increment n k ω)‖ ∂(μ n)
    Proof (Lean source)
    theorem norm_integral_cexp_rowSum_sub_quadraticTelescoping_le [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (n : ℕ) (t : ℝ) : ‖(∫ ω, exp (I * ((t * A.rowSum n ω : ℝ) : ℂ)) ∂(μ n)) - 1 + ((t ^ 2 / 2 : ℝ) : ℂ) * (∑ k ∈ range (A.rowLength n), ∫ ω, exp (I * ((t * A.partialRowSum n k ω : ℝ) : ℂ)) * (((μ n)[(fun ω => (A.increment n k ω) ^ 2) | A.filtration n k] ω : ℝ) : ℂ) ∂(μ n))‖ ≤ ∑ k ∈ range (A.rowLength n), ∫ ω, ‖expQuadraticRemainder (t * A.increment n k ω)‖ ∂(μ n) := by let F : ℕ → ℂ := fun k => ∫ ω, exp (I * ((t * A.partialRowSum n k ω : ℝ) : ℂ)) ∂(μ n) let V : ℕ → ℂ := fun k => ∫ ω, exp (I * ((t * A.partialRowSum n k ω : ℝ) : ℂ)) * (((μ n)[(fun ω => (A.increment n k ω) ^ 2) | A.filtration n k] ω : ℝ) : ℂ) ∂(μ n) let R : ℕ → ℝ := fun k => ∫ ω, ‖expQuadraticRemainder (t * A.increment n k ω)‖ ∂(μ n) let c : ℂ := ((t ^ 2 / 2 : ℝ) : ℂ) have hstep : ∀ k < A.rowLength n, ‖F (k + 1) - F k + c * V k‖ ≤ R k := by intro k hk let g : Ω n → ℂ := fun ω => exp (I * ((t * A.partialRowSum n k ω : ℝ) : ℂ)) let v : Ω n → ℂ := fun ω => (((μ n)[(fun ω => (A.increment n k ω) ^ 2) | A.filtration n k] ω : ℝ) : ℂ) have hgFil : StronglyMeasurable[A.filtration n k] g := by have hS := A.partialRowSum_stronglyMeasurable n k dsimp [g] fun_prop have hg : StronglyMeasurable g := hgFil.mono ((A.filtration n).le k) have hgBound : ∀ᵐ ω ∂(μ n), ‖g ω‖ ≤ 1 := by filter_upwards with ω dsimp [g] rw [Complex.norm_exp] simp have hgInt : Integrable g (μ n) := by refine Integrable.mono' (integrable_const (1 : ℝ)) hg.aestronglyMeasurable ?_ exact hgBound have hv : Integrable v (μ n) := by have hce : Integrable ((μ n)[(fun ω => (A.increment n k ω) ^ 2) | A.filtration n k]) (μ n) := integrable_condExp exact hce.ofReal have hgv : Integrable (fun ω => g ω * v ω) (μ n) := hv.bdd_mul hg.aestronglyMeasurable hgBound have hrewrite : (∫ ω, g ω * (1 - c * v ω) ∂(μ n)) = F k - c * V k := by calc (∫ ω, g ω * (1 - c * v ω) ∂(μ n)) = ∫ ω, g ω - c * (g ω * v ω) ∂(μ n) := by apply integral_congr_ae filter_upwards with ω ring _ = (∫ ω, g ω ∂(μ n)) - ∫ ω, c * (g ω * v ω) ∂(μ n) := integral_sub hgInt (hgv.const_mul c) _ = F k - c * V k := by rw [integral_const_mul] have h := A.norm_integral_cexp_partialRowSum_succ_sub_quadratic_le n k hk t change ‖F (k + 1) - (∫ ω, g ω * (1 - c * v ω) ∂(μ n))‖ ≤ R k at h rw [hrewrite] at h have heq : F (k + 1) - (F k - c * V k) = F (k + 1) - F k + c * V k := by ring rw [heq] at h exact h have hF0 : F 0 = 1 := by simp [F, partialRowSum] have hFlast : F (A.rowLength n) = ∫ ω, exp (I * ((t * A.rowSum n ω : ℝ) : ℂ)) ∂(μ n) := by simp [F, partialRowSum, rowSum] have htel : (∑ k ∈ range (A.rowLength n), (F (k + 1) - F k + c * V k)) = (∫ ω, exp (I * ((t * A.rowSum n ω : ℝ) : ℂ)) ∂(μ n)) - 1 + c * (∑ k ∈ range (A.rowLength n), V k) := by rw [Finset.sum_add_distrib, Finset.sum_range_sub, ← Finset.mul_sum] rw [hF0, hFlast] change ‖(∫ ω, exp (I * ((t * A.rowSum n ω : ℝ) : ℂ)) ∂(μ n)) - 1 + c * (∑ k ∈ range (A.rowLength n), V k)‖ ≤ ∑ k ∈ range (A.rowLength n), R k rw [← htel] calc ‖∑ k ∈ range (A.rowLength n), (F (k + 1) - F k + c * V k)‖ ≤ ∑ k ∈ range (A.rowLength n), ‖F (k + 1) - F k + c * V k‖ := norm_sum_le _ _ _ ≤ ∑ k ∈ range (A.rowLength n), R k := by apply Finset.sum_le_sum intro k hk exact hstep k (Finset.mem_range.mp hk)
    Causalean.Stat.MartingaleDifferenceArray.norm_integral_cexp_rowSum_sub_quadraticTelescoping_le · Causalean/Stat/CLT/MartingaleArray/ConditionalTelescoping.lean:332
Gaussian­Bounds 1 core · 3 supporting This module collects the scalar exponential estimates used by the compensated Gaussian-time interpolation in the martingale-array CLT. ★ abs_exp_varianceCorrection_sub_one_le

Deterministic Gaussian interpolation bounds

This module collects the scalar exponential estimates used by the compensated Gaussian-time interpolation in the martingale-array CLT. They are deterministic and make no probabilistic or independence assumptions.

theorem abs_exp_varianceCorrection_sub_one_le reviewed
Causalean.Stat

If the exponential coefficient is nonnegative and a variance value lies between zero and a nonnegative budget, then its terminal Gaussian correction is Lipschitz in its distance from one, with a constant depending only on the budget.

Formal statement
c V K :
hc :
0 ≤ c
hV0 :
0 ≤ V
hVK :
V ≤ K
|exp (c * (V - 1)) - 1| ≤ exp (c * max K 1) * c * |V - 1|
Proof (Lean source)
theorem abs_exp_varianceCorrection_sub_one_le (c V K : ℝ) (hc : 0 ≤ c) (hV0 : 0 ≤ V) (hVK : V ≤ K) : |exp (c * (V - 1)) - 1| ≤ exp (c * max K 1) * c * |V - 1| := by have hVabs : |V - 1| ≤ max K 1 := by rw [abs_le] constructor <;> linarith [le_max_left K 1, le_max_right K 1] have harg : |c * (V - 1)| ≤ c * max K 1 := by rw [abs_mul, abs_of_nonneg hc] exact mul_le_mul_of_nonneg_left hVabs hc calc |exp (c * (V - 1)) - 1| ≤ exp |c * (V - 1)| * |c * (V - 1)| := abs_exp_sub_one_le_exp_abs_mul_abs _ _ = exp |c * (V - 1)| * c * |V - 1| := by rw [abs_mul, abs_of_nonneg hc] ring _ ≤ exp (c * max K 1) * c * |V - 1| := by gcongr
Causalean.Stat.abs_exp_varianceCorrection_sub_one_le · Causalean/Stat/CLT/MartingaleArray/GaussianBounds.lean:99
3 supporting declarations (lemmas, instances)
  • abs_exp_mul_one_sub_sub_one_le theorem — For a nonnegative real argument, the error in the exponential Euler factor exp(x) * (1 - x) is at most exp(x) * x² / 2.
    x :
    hx :
    0 ≤ x
    |exp x * (1 - x) - 1| ≤ exp x * x ^ 2 / 2
    Proof (Lean source)
    theorem abs_exp_mul_one_sub_sub_one_le (x : ℝ) (hx : 0 ≤ x) : |exp x * (1 - x) - 1| ≤ exp x * x ^ 2 / 2 := by let f : ℝ → ℝ := fun y => 1 - y + y ^ 2 / 2 - exp (-y) have hfderiv (y : ℝ) : HasDerivAt f (-1 + y + exp (-y)) y := by have hraw := ((((hasDerivAt_const y (1 : ℝ)).sub (hasDerivAt_id y)).add (((hasDerivAt_id y).mul (hasDerivAt_id y)).div_const 2)).sub ((Real.hasDerivAt_exp (-y)).comp y (hasDerivAt_neg y))) have hg : HasDerivAt (fun y : ℝ => 1 - y + y ^ 2 / 2 - exp (-y)) (0 - 1 + (1 * y + y * 1) / 2 - exp (-y) * (-1)) y := by apply hraw.congr_of_eventuallyEq filter_upwards with z simp [pow_two] simpa only [f] using (hg.congr_deriv (by ring)) have hfmono : Monotone f := monotone_of_deriv_nonneg (fun y => (hfderiv y).differentiableAt) (fun y => by rw [(hfderiv y).deriv] linarith [Real.one_sub_le_exp_neg y]) have htaylor : exp (-x) ≤ 1 - x + x ^ 2 / 2 := by have h := hfmono hx simpa [f] using h have hsign : exp x * (1 - x) - 1 ≤ 0 := by have h := mul_le_mul_of_nonneg_left (Real.one_sub_le_exp_neg x) (Real.exp_nonneg x) rw [← Real.exp_add] at h norm_num at h linarith rw [abs_of_nonpos hsign] have h := mul_le_mul_of_nonneg_left htaylor (Real.exp_nonneg x) rw [← Real.exp_add] at h norm_num at h nlinarith
    Causalean.Stat.abs_exp_mul_one_sub_sub_one_le · Causalean/Stat/CLT/MartingaleArray/GaussianBounds.lean:22
  • abs_exp_sub_one_le_exp_abs_mul_abs theorem — For any real argument, the increment of the real exponential is bounded by exp(|x|) * |x|.
    x :
    |exp x - 1| ≤ exp |x| * |x|
    Proof (Lean source)
    theorem abs_exp_sub_one_le_exp_abs_mul_abs (x : ℝ) : |exp x - 1| ≤ exp |x| * |x| := by have h := Complex.norm_exp_sub_sum_le_norm_mul_exp (x : ℂ) 1 simp only [Finset.sum_range_one, pow_zero, Nat.factorial_zero, cast_one, div_one, pow_one] at h rw [← Complex.ofReal_exp] at h rw [← Complex.ofReal_one, ← Complex.ofReal_sub] at h simp only [Complex.norm_real, Real.norm_eq_abs] at h simpa only [mul_comm] using h
    Causalean.Stat.abs_exp_sub_one_le_exp_abs_mul_abs · Causalean/Stat/CLT/MartingaleArray/GaussianBounds.lean:58
  • norm_exp_mul_quadraticFactor_sub_one_le theorem — For nonnegative coefficients and a complex Taylor error, one compensated Gaussian step differs from one by at most the exponential weight times the Taylor error plus a quadratic Euler error.
    c v :
    r :
    hc :
    0 ≤ c
    hv :
    0 ≤ v
    ‖((exp (c * v) : ℝ) : ℂ) * (1 - (((c * v : ℝ) : ℂ)) + r) - 1‖
    exp (c * v) * (‖r‖ + (c * v) ^ 2 / 2)
    Proof (Lean source)
    theorem norm_exp_mul_quadraticFactor_sub_one_le (c v : ℝ) (r : ℂ) (hc : 0 ≤ c) (hv : 0 ≤ v) : ‖((exp (c * v) : ℝ) : ℂ) * (1 - (((c * v : ℝ) : ℂ)) + r) - 1‖ ≤ exp (c * v) * (‖r‖ + (c * v) ^ 2 / 2) := by have hcv : 0 ≤ c * v := mul_nonneg hc hv calc ‖((exp (c * v) : ℝ) : ℂ) * (1 - (((c * v : ℝ) : ℂ)) + r) - 1‖ = ‖(((exp (c * v) * (1 - c * v) - 1 : ℝ) : ℂ) + ((exp (c * v) : ℝ) : ℂ) * r)‖ := by congr 1 push_cast ring _ ≤ ‖((exp (c * v) * (1 - c * v) - 1 : ℝ) : ℂ)‖ + ‖((exp (c * v) : ℝ) : ℂ) * r‖ := norm_add_le _ _ _ = |exp (c * v) * (1 - c * v) - 1| + exp (c * v) * ‖r‖ := by rw [Complex.norm_real, Complex.norm_mul, Complex.norm_real] simp only [Real.norm_eq_abs, abs_of_pos (Real.exp_pos _)] _ ≤ exp (c * v) * (c * v) ^ 2 / 2 + exp (c * v) * ‖r‖ := by gcongr exact abs_exp_mul_one_sub_sub_one_le (c * v) hcv _ = exp (c * v) * (‖r‖ + (c * v) ^ 2 / 2) := by ring
    Causalean.Stat.norm_exp_mul_quadraticFactor_sub_one_le · Causalean/Stat/CLT/MartingaleArray/GaussianBounds.lean:70
Lyapunov 1 core · 3 supporting This module provides bridges from deterministic predictable variance and from fourth-moment Lyapunov conditions to the convergence-in-probability hypotheses of the martingale-array central limit theorem. ★ conditionalLindeberg_of_fourthMomentSum

Reusable sufficient conditions for martingale-array CLTs

This module provides bridges from deterministic predictable variance and from fourth-moment Lyapunov conditions to the convergence-in-probability hypotheses of the martingale-array central limit theorem. No independence between increments is assumed.

theorem conditionalLindeberg_of_fourthMomentSum reviewed
Causalean.Stat

If every increment has a finite fourth moment and the deterministic sum of unconditional fourth moments tends to zero, then the conditional Lindeberg condition holds at every positive threshold.

Formal statement
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
∀ n, IsProbabilityMeasure (μ n)
hFourth :
∀ n k
if
k < A.rowLength n
then
MemLp (A.increment n k) 4 (μ n)
hFourthSum :
Tendsto A.fourthMomentSum atTop (𝓝 0)
ε :
0 < ε
TendstoInProbability μ (A.conditionalLindeberg ε) 0
Proof (Lean source)
theorem conditionalLindeberg_of_fourthMomentSum [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (hFourth : ∀ n k, k < A.rowLength n → MemLp (A.increment n k) 4 (μ n)) (hFourthSum : Tendsto A.fourthMomentSum atTop (𝓝 0)) : ∀ ε : ℝ, 0 < ε → TendstoInProbability μ (A.conditionalLindeberg ε) 0 := by apply conditionalLindeberg_of_conditionalFourthMoment A hFourth exact conditionalFourthMoment_tendstoInProbability_of_fourthMomentSum A hFourth hFourthSum
3 supporting declarations (lemmas, instances)
  • predictableQuadraticVariation_tendstoInProbability_of_ae_eq theorem — If the predictable quadratic variation equals a deterministic scalar in every row and those scalars converge to one, then the predictable quadratic variation converges in probability to one.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    ∀ n, IsProbabilityMeasure (μ n)
    v :
    ℕ → ℝ
    hEq :
    ∀ n, A.predictableQuadraticVariation n =ᵐ[μ n] fun _ => v n
    hv :
    Tendsto v atTop (𝓝 1)
    TendstoInProbability μ A.predictableQuadraticVariation 1
    Proof (Lean source)
    theorem predictableQuadraticVariation_tendstoInProbability_of_ae_eq [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (v : ℕ → ℝ) (hEq : ∀ n, A.predictableQuadraticVariation n =ᵐ[μ n] fun _ => v n) (hv : Tendsto v atTop (𝓝 1)) : TendstoInProbability μ A.predictableQuadraticVariation 1 := by intro ε hε have hAbs : Tendsto (fun n => |v n - 1|) atTop (𝓝 0) := by simpa using (hv.sub (tendsto_const_nhds : Tendsto (fun _ : ℕ => (1 : ℝ)) atTop (𝓝 1))).abs have hEventually : ∀ᶠ n in atTop, |v n - 1| < ε := ((tendsto_order.1 hAbs).2 ε hε) apply tendsto_nhds_of_eventually_eq filter_upwards [hEventually] with n hn apply measure_eq_zero_iff_ae_notMem.mpr filter_upwards [hEq n] with ω hω rw [hω] exact not_le_of_gt hn
    Causalean.Stat.predictableQuadraticVariation_tendstoInProbability_of_ae_eq · Causalean/Stat/CLT/MartingaleArray/Lyapunov.lean:25
  • conditionalLindeberg_of_conditionalFourthMoment theorem — If every increment has a finite fourth moment and the conditional fourth-moment row sums converge in probability to zero, then the conditional Lindeberg condition holds at every positive threshold.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    ∀ n, IsProbabilityMeasure (μ n)
    hFourth :
    ∀ n k
    if
    k < A.rowLength n
    then
    MemLp (A.increment n k) 4 (μ n)
    hFourthConditional :
    TendstoInProbability μ A.conditionalFourthMoment 0
    ε :
    0 < ε
    TendstoInProbability μ (A.conditionalLindeberg ε) 0
    Proof (Lean source)
    theorem conditionalLindeberg_of_conditionalFourthMoment [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (hFourth : ∀ n k, k < A.rowLength n → MemLp (A.increment n k) 4 (μ n)) (hFourthConditional : TendstoInProbability μ A.conditionalFourthMoment 0) : ∀ ε : ℝ, 0 < ε → TendstoInProbability μ (A.conditionalLindeberg ε) 0 := by /- Proof route: pointwise, on `ε < |x|`, one has `x^2 ≤ ε⁻² * x^4`. Apply conditional-expectation monotonicity term by term, sum the resulting a.e. inequalities, and use the squeeze property for convergence in measure. `hFourth` supplies integrability on both sides. -/ intro ε hε let c : ℝ := ε⁻¹ ^ 2 have hc : 0 < c := by dsimp [c] positivity have hFourthIntegrable : ∀ n k, k < A.rowLength n → Integrable (fun ω => (A.increment n k ω) ^ 4) (μ n) := by intro n k hk have hi := (hFourth n k hk).integrable_norm_pow (by norm_num : (4 : ℕ) ≠ 0) simpa only [Real.norm_eq_abs, ← abs_pow, abs_of_nonneg (by positivity : 0 ≤ A.increment n k _ ^ 4)] using hi have hTruncatedIntegrable : ∀ n k, k < A.rowLength n → Integrable (fun ω => if ε < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0) (μ n) := by intro n k hk have h2 := A.squareIntegrable n k hk have hsquare : Integrable (fun ω => (A.increment n k ω) ^ 2) (μ n) := (memLp_two_iff_integrable_sq h2.aestronglyMeasurable).mp h2 have hset : NullMeasurableSet {ω | ε < |A.increment n k ω|} (μ n) := aestronglyMeasurable_const.nullMeasurableSet_lt h2.aestronglyMeasurable.norm apply (hsquare.indicator₀ hset).congr filter_upwards [] with ω by_cases hω : ε < |A.increment n k ω| <;> simp [indicator, hω] have hPointwise : ∀ n k, k < A.rowLength n → (fun ω => if ε < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0) ≤ᵐ[μ n] (fun ω => c * (A.increment n k ω) ^ 4) := by intro n k hk exact Filter.Eventually.of_forall fun ω => by dsimp [c] by_cases hω : ε < |A.increment n k ω| · rw [if_pos hω] have he2 : ε ^ 2 ≤ (A.increment n k ω) ^ 2 := by rw [sq_le_sq] simpa [abs_of_pos hε] using hω.le have hc' : 0 ≤ ε⁻¹ ^ 2 := sq_nonneg _ calc (A.increment n k ω) ^ 2 = ε⁻¹ ^ 2 * (ε ^ 2 * (A.increment n k ω) ^ 2) := by field_simp _ ≤ ε⁻¹ ^ 2 * ((A.increment n k ω) ^ 2 * (A.increment n k ω) ^ 2) := mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_right he2 (sq_nonneg _)) hc' _ = ε⁻¹ ^ 2 * (A.increment n k ω) ^ 4 := by ring · rw [if_neg hω] positivity have hTermBound : ∀ n k, k < A.rowLength n → A.lindebergTerm ε n k ≤ᵐ[μ n] fun ω => c * (μ n)[fun ω => (A.increment n k ω) ^ 4 | A.filtration n k] ω := by intro n k hk have hpointwise' : (fun ω => if ε < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0) ≤ᵐ[μ n] c • (fun ω => (A.increment n k ω) ^ 4) := (hPointwise n k hk).mono fun ω hω => by simpa only [Pi.smul_apply, smul_eq_mul] using hω have hmono := condExp_mono (m := A.filtration n k) (hTruncatedIntegrable n k hk) ((hFourthIntegrable n k hk).smul c) hpointwise' have hlinear := condExp_smul (μ := μ n) c (fun ω => (A.increment n k ω) ^ 4) (A.filtration n k) filter_upwards [hmono, hlinear] with ω hmonoω hlinearω unfold MartingaleDifferenceArray.lindebergTerm calc (μ n)[fun ω => if ε < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0 | A.filtration n k] ω ≤ (μ n)[c • fun ω => (A.increment n k ω) ^ 4 | A.filtration n k] ω := hmonoω _ = c * (μ n)[fun ω => (A.increment n k ω) ^ 4 | A.filtration n k] ω := by simpa only [Pi.smul_apply, smul_eq_mul] using hlinearω have hLNonneg : ∀ n, 0 ≤ᵐ[μ n] A.conditionalLindeberg ε n := by intro n have hall : ∀ᵐ ω ∂(μ n), ∀ k ∈ range (A.rowLength n), 0 ≤ A.lindebergTerm ε n k ω := (Finset.eventually_all _).mpr fun k hk => condExp_nonneg (Filter.Eventually.of_forall fun ω => by change (0 : ℝ) ≤ if ε < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0 split_ifs <;> positivity) filter_upwards [hall] with ω hω unfold MartingaleDifferenceArray.conditionalLindeberg simp only [Pi.zero_apply, Finset.sum_apply] exact sum_nonneg fun k hk => hω k hk have hFNonneg : ∀ n, 0 ≤ᵐ[μ n] A.conditionalFourthMoment n := by intro n have hall : ∀ᵐ ω ∂(μ n), ∀ k ∈ range (A.rowLength n), 0 ≤ (μ n)[fun ω => (A.increment n k ω) ^ 4 | A.filtration n k] ω := (Finset.eventually_all _).mpr fun k hk => condExp_nonneg (Filter.Eventually.of_forall fun _ => by positivity) filter_upwards [hall] with ω hω unfold MartingaleDifferenceArray.conditionalFourthMoment simp only [Pi.zero_apply, Finset.sum_apply] exact sum_nonneg fun k hk => hω k hk have hBound : ∀ n, A.conditionalLindeberg ε n ≤ᵐ[μ n] fun ω => c * A.conditionalFourthMoment n ω := by intro n have hall : ∀ᵐ ω ∂(μ n), ∀ k ∈ range (A.rowLength n), A.lindebergTerm ε n k ω ≤ c * (μ n)[fun ω => (A.increment n k ω) ^ 4 | A.filtration n k] ω := (Finset.eventually_all _).mpr fun k hk => hTermBound n k (Finset.mem_range.mp hk) filter_upwards [hall] with ω hω unfold MartingaleDifferenceArray.conditionalLindeberg MartingaleDifferenceArray.conditionalFourthMoment rw [Finset.sum_apply, Finset.sum_apply] calc ∑ k ∈ range (A.rowLength n), A.lindebergTerm ε n k ω ≤ ∑ k ∈ range (A.rowLength n), c * (μ n)[fun ω => (A.increment n k ω) ^ 4 | A.filtration n k] ω := Finset.sum_le_sum fun k hk => hω k hk _ = c * ∑ k ∈ range (A.rowLength n), (μ n)[fun ω => (A.increment n k ω) ^ 4 | A.filtration n k] ω := by rw [Finset.mul_sum] intro δ hδ have hUpper := hFourthConditional (δ / c) (div_pos hδ hc) exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hUpper (fun _ => bot_le) (fun n => measure_mono_ae <| by filter_upwards [hLNonneg n, hFNonneg n, hBound n] with ω hL hF hLF intro hω change δ ≤ |A.conditionalLindeberg ε n ω - 0| at hω change δ / c ≤ |A.conditionalFourthMoment n ω - 0| rw [sub_zero, abs_of_nonneg hL] at hω rw [sub_zero, abs_of_nonneg hF] apply (div_le_iff₀ hc).mpr simpa only [mul_comm] using hω.trans hLF)
    Causalean.Stat.conditionalLindeberg_of_conditionalFourthMoment · Causalean/Stat/CLT/MartingaleArray/Lyapunov.lean:47
  • conditionalFourthMoment_tendstoInProbability_of_fourthMomentSum theorem — If every increment has a finite fourth moment and the deterministic sum of unconditional fourth moments tends to zero, then the conditional fourth-moment row sums converge in probability to zero.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    ∀ n, IsProbabilityMeasure (μ n)
    hFourth :
    ∀ n k
    if
    k < A.rowLength n
    then
    MemLp (A.increment n k) 4 (μ n)
    hFourthSum :
    Tendsto A.fourthMomentSum atTop (𝓝 0)
    TendstoInProbability μ A.conditionalFourthMoment 0
    Proof (Lean source)
    theorem conditionalFourthMoment_tendstoInProbability_of_fourthMomentSum [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (hFourth : ∀ n k, k < A.rowLength n → MemLp (A.increment n k) 4 (μ n)) (hFourthSum : Tendsto A.fourthMomentSum atTop (𝓝 0)) : TendstoInProbability μ A.conditionalFourthMoment 0 := by /- Proof route: the conditional fourth-moment sum is nonnegative a.e. and its integral is `fourthMomentSum A n` by the conditional-expectation integral identity. Markov's inequality then bounds its upper tail by that deterministic expectation, which tends to zero. -/ intro δ hδ have hNonneg : ∀ n, 0 ≤ᵐ[μ n] A.conditionalFourthMoment n := by intro n unfold MartingaleDifferenceArray.conditionalFourthMoment induction range (A.rowLength n) using Finset.induction_on with | empty => exact Filter.Eventually.of_forall fun _ => by simp | @insert k s hk ih => have hk_nonneg : 0 ≤ᵐ[μ n] (μ n)[fun ω => (A.increment n k ω) ^ 4 | A.filtration n k] := condExp_nonneg (Filter.Eventually.of_forall fun _ => by positivity) filter_upwards [ih, hk_nonneg] with ω hsum hterm simpa [hk] using add_nonneg hterm hsum have hIntegrable : ∀ n, Integrable (A.conditionalFourthMoment n) (μ n) := by intro n unfold MartingaleDifferenceArray.conditionalFourthMoment rw [Finset.sum_fn] apply integrable_finsetSum intro k hk exact integrable_condExp have hFourthIntegrable : ∀ n k, k < A.rowLength n → Integrable (fun ω => (A.increment n k ω) ^ 4) (μ n) := by intro n k hk have hi := (hFourth n k hk).integrable_norm_pow (by norm_num : (4 : ℕ) ≠ 0) simpa only [Real.norm_eq_abs, ← abs_pow, abs_of_nonneg (by positivity : 0 ≤ A.increment n k _ ^ 4)] using hi have hIntegral : ∀ n, ∫ ω, A.conditionalFourthMoment n ω ∂(μ n) = A.fourthMomentSum n := by intro n unfold MartingaleDifferenceArray.conditionalFourthMoment MartingaleDifferenceArray.fourthMomentSum rw [Finset.sum_fn] rw [integral_finsetSum] · apply Finset.sum_congr rfl intro k hk simpa only [setIntegral_univ] using setIntegral_condExp (A.filtration n |>.le k) (hFourthIntegrable n k (Finset.mem_range.mp hk)) MeasurableSet.univ · intro k hk exact integrable_condExp apply (ENNReal.tendsto_toReal_zero_iff).mp refine squeeze_zero (g := fun n => A.fourthMomentSum n / δ) (fun _ => measureReal_nonneg) ?_ ?_ · intro n have hEvents : {ω | δ ≤ |A.conditionalFourthMoment n ω - 0|} =ᵐ[μ n] {ω | δ ≤ A.conditionalFourthMoment n ω} := by filter_upwards [hNonneg n] with ω hω change 0 ≤ A.conditionalFourthMoment n ω at hω apply propext change (δ ≤ |A.conditionalFourthMoment n ω - 0| ↔ δ ≤ A.conditionalFourthMoment n ω) rw [sub_zero, abs_of_nonneg hω] change ((μ n) {ω | δ ≤ |A.conditionalFourthMoment n ω - 0|}).toReal ≤ _ rw [measure_congr hEvents, ← measureReal_def] apply (le_div_iff₀ hδ).2 calc Measure.real (μ n) {ω | δ ≤ A.conditionalFourthMoment n ω} * δ = δ * Measure.real (μ n) {ω | δ ≤ A.conditionalFourthMoment n ω} := mul_comm _ _ _ ≤ ∫ ω, A.conditionalFourthMoment n ω ∂(μ n) := mul_meas_ge_le_integral_of_nonneg (hNonneg n) (hIntegrable n) δ _ = A.fourthMomentSum n := hIntegral n · simpa using hFourthSum.div_const δ
    Causalean.Stat.conditionalFourthMoment_tendstoInProbability_of_fourthMomentSum · Causalean/Stat/CLT/MartingaleArray/Lyapunov.lean:190
Main 1 core · 3 supporting This module proves the reusable scalar CLT for finite-row, square-integrable martingale-difference arrays. ★ martingaleArrayCLT

Scalar martingale triangular-array central limit theorem

This module proves the reusable scalar CLT for finite-row, square-integrable martingale-difference arrays. It also supplies Lyapunov corollaries based on conditional or unconditional fourth-moment sums and a deterministic predictable-variance specialization. No independence hypothesis is used.

theorem martingaleArrayCLT reviewed
Causalean.Stat

For a square-integrable real martingale-difference triangular array, if the sum of conditional variances in each row converges in probability to one and the conditional Lindeberg sum converges in probability to zero at every positive threshold, then the row sums converge in distribution to the standard normal law. Row lengths may vary with the row index, and no independence between increments is assumed.

Formal statement
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
∀ n, IsProbabilityMeasure (μ n)
hVariance :
TendstoInProbability μ A.predictableQuadraticVariation 1
hLindeberg :
∀ ε : ℝ
if
0 < ε
then
TendstoInProbability μ (A.conditionalLindeberg ε) 0
TendstoInDistribution μ A.rowSum (gaussianReal 0 1) A.rowSum_aemeasurable
Proof (Lean source)
theorem martingaleArrayCLT [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (hVariance : TendstoInProbability μ A.predictableQuadraticVariation 1) (hLindeberg : ∀ ε : ℝ, 0 < ε → TendstoInProbability μ (A.conditionalLindeberg ε) 0) : TendstoInDistribution μ A.rowSum (gaussianReal 0 1) A.rowSum_aemeasurable := by unfold TendstoInDistribution refine ProbabilityMeasure.tendsto_iff_tendsto_charFun.mpr fun t => ?_ simpa [ProbabilityMeasure.coe_mk] using martingaleArrayCharFun_tendsto A hVariance hLindeberg t
3 supporting declarations (lemmas, instances)
Predictable­Variance­Bounds 1 core · 1 supporting This module supplies the local and row-wise estimates that make the predictable variance mesh small under a conditional Lindeberg budget. ★ sum_sq_conditionalSecondMoment_le_of_budgets

Predictable variance bounds from conditional Lindeberg mass

This module supplies the local and row-wise estimates that make the predictable variance mesh small under a conditional Lindeberg budget. These are the probabilistic accounting inputs for Gaussian-time interpolation.

theorem sum_sq_conditionalSecondMoment_le_of_budgets reviewed
Causalean.Stat.MartingaleDifferenceArray

If the truncation threshold is positive, the row predictable quadratic variation is bounded and its conditional Lindeberg sum is bounded, with nonnegative budgets, then the sum of squared conditional variance increments is at most (η² + δ)K.

Formal statement
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
∀ n, IsProbabilityMeasure (μ n)
n :
η K δ :
:
0 < η
hK :
0 ≤ K
:
0 ≤ δ
hVariance :
A.predictableQuadraticVariation n ≤ᵐ[μ n] fun _ => K
hLindeberg :
A.conditionalLindeberg η n ≤ᵐ[μ n] fun _ => δ
(fun ω => ∑ k ∈ range (A.rowLength n), ((μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω) ^ 2)
≤ᵐ[μ n] fun _ => (η ^ 2 + δ) * K
Proof (Lean source)
theorem sum_sq_conditionalSecondMoment_le_of_budgets [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (n : ℕ) (η K δ : ℝ) (hη : 0 < η) (hK : 0 ≤ K) (hδ : 0 ≤ δ) (hVariance : A.predictableQuadraticVariation n ≤ᵐ[μ n] fun _ => K) (hLindeberg : A.conditionalLindeberg η n ≤ᵐ[μ n] fun _ => δ) : (fun ω => ∑ k ∈ range (A.rowLength n), ((μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω) ^ 2) ≤ᵐ[μ n] fun _ => (η ^ 2 + δ) * K := by /- On one common full-measure set, every conditional variance and Lindeberg term is nonnegative. The local lemma bounds each variance by `η² + δ`; hence `∑ v_k² ≤ (η²+δ) ∑ v_k ≤ (η²+δ)K`. -/ have hlocal : ∀ᵐ ω ∂(μ n), ∀ k ∈ range (A.rowLength n), (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω ≤ η ^ 2 + A.lindebergTerm η n k ω := (Finset.eventually_all _).mpr fun k hk => A.conditionalSecondMoment_le_sq_add_lindebergTerm n k (Finset.mem_range.mp hk) η hη have hvnonneg : ∀ᵐ ω ∂(μ n), ∀ k ∈ range (A.rowLength n), 0 ≤ (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω := (Finset.eventually_all _).mpr fun k _ => condExp_nonneg (ae_of_all _ fun ω => sq_nonneg (A.increment n k ω)) have hlnonneg : ∀ᵐ ω ∂(μ n), ∀ k ∈ range (A.rowLength n), 0 ≤ A.lindebergTerm η n k ω := (Finset.eventually_all _).mpr fun k _ => by apply condExp_nonneg filter_upwards with ω split_ifs <;> positivity filter_upwards [hlocal, hvnonneg, hlnonneg, hVariance, hLindeberg] with ω hlocalω hvω hlω hVω hLω have hB : 0 ≤ η ^ 2 + δ := add_nonneg (sq_nonneg η) hδ unfold predictableQuadraticVariation at hVω unfold conditionalLindeberg at hLω simp only [Finset.sum_apply] at hVω hLω calc (∑ k ∈ range (A.rowLength n), ((μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω) ^ 2) ≤ ∑ k ∈ range (A.rowLength n), (η ^ 2 + δ) * (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω := by apply Finset.sum_le_sum intro k hk have hlk : A.lindebergTerm η n k ω ≤ δ := (Finset.single_le_sum (fun j hj => hlω j hj) hk).trans hLω rw [pow_two] exact mul_le_mul_of_nonneg_right ((hlocalω k hk).trans (add_le_add_right hlk _)) (hvω k hk) _ = (η ^ 2 + δ) * (∑ k ∈ range (A.rowLength n), (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω) := by rw [Finset.mul_sum] _ ≤ (η ^ 2 + δ) * K := mul_le_mul_of_nonneg_left hVω hB
1 supporting declaration (lemmas, instances)
  • conditionalSecondMoment_le_sq_add_lindebergTerm theorem — For an active increment and a positive threshold, its conditional second moment is at most the squared threshold plus its conditional Lindeberg term.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    ∀ n, IsProbabilityMeasure (μ n)
    n k :
    hk :
    k < A.rowLength n
    η :
    :
    0 < η
    (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k]
    ≤ᵐ[μ n] fun ω => η ^ 2 + A.lindebergTerm η n k ω
    Proof (Lean source)
    theorem conditionalSecondMoment_le_sq_add_lindebergTerm [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (n k : ℕ) (hk : k < A.rowLength n) (η : ℝ) (hη : 0 < η) : (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ≤ᵐ[μ n] fun ω => η ^ 2 + A.lindebergTerm η n k ω := by /- Split `X²` into the events `|X| ≤ η` and `η < |X|`. Bound the first part by the constant `η²`, apply conditional-expectation monotonicity, and identify the second part with `lindebergTerm`. -/ have hX2 : Integrable (fun ω => (A.increment n k ω) ^ 2) (μ n) := (A.squareIntegrable n k hk).integrable_sq have htrunc : Integrable (fun ω => if η < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0) (μ n) := by let X := (A.squareIntegrable n k hk).aestronglyMeasurable.mk (A.increment n k) have hX : A.increment n k =ᵐ[μ n] X := (A.squareIntegrable n k hk).aestronglyMeasurable.ae_eq_mk have hXmeas : StronglyMeasurable X := (A.squareIntegrable n k hk).aestronglyMeasurable.stronglyMeasurable_mk have hX2' : Integrable (fun ω => X ω ^ 2) (μ n) := hX2.congr (hX.pow_const 2) have hs : MeasurableSet {ω | η < |X ω|} := measurableSet_lt measurable_const hXmeas.measurable.norm have htruncX : Integrable (fun ω => if η < |X ω| then X ω ^ 2 else 0) (μ n) := by apply (hX2'.indicator hs).congr filter_upwards with ω rw [indicator] rfl exact htruncX.congr (hX.mono fun ω hω => by simp [hω]) have hmajor : Integrable (fun ω => η ^ 2 + if η < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0) (μ n) := (integrable_const _).add htrunc have hpoint : (fun ω => (A.increment n k ω) ^ 2) ≤ᵐ[μ n] (fun ω => η ^ 2 + if η < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0) := ae_of_all _ fun ω => by by_cases hω : η < |A.increment n k ω| · simp only [hω, ↓reduceIte] exact le_add_of_nonneg_left (sq_nonneg η) · simp only [hω, ↓reduceIte, add_zero] rw [← sq_abs (A.increment n k ω)] exact (sq_le_sq₀ (abs_nonneg _) hη.le).mpr (le_of_not_gt hω) have hmono := condExp_mono (m := A.filtration n k) hX2 hmajor hpoint have hadd := condExp_add (integrable_const (η ^ 2)) htrunc (A.filtration n k) have hadd' : (μ n)[fun ω => η ^ 2 + (if η < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0) | A.filtration n k] =ᵐ[μ n] (μ n)[fun _ => η ^ 2 | A.filtration n k] + (μ n)[fun ω => if η < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0 | A.filtration n k] := by convert hadd using 1 <;> ext ω <;> rfl have hconst := condExp_const (μ := μ n) ((A.filtration n).le k) (η ^ 2) filter_upwards [hmono, hadd'] with ω hmonoω haddω unfold lindebergTerm rw [haddω] at hmonoω simpa only [Pi.add_apply, congrFun hconst ω] using hmonoω
    Causalean.Stat.MartingaleDifferenceArray.conditionalSecondMoment_le_sq_add_lindebergTerm · Causalean/Stat/CLT/MartingaleArray/PredictableVarianceBounds.lean:26
Probability­Bounds 1 core · 0 supporting This module supplies elementary expectation bridges for row-indexed random variables whose rows may live on different probability spaces. ★ tendsto_integral_abs_sub_of_tendstoInProbability_of_ae_bound

Varying-space probability convergence bounds

This module supplies elementary expectation bridges for row-indexed random variables whose rows may live on different probability spaces. They are used after stopping the martingale array, when convergence in probability combines with a deterministic uniform bound.

theorem tendsto_integral_abs_sub_of_tendstoInProbability_of_ae_bound reviewed
Causalean.Stat

If measurable real row variables converge in probability to a constant, the bound is nonnegative, and their absolute deviations are uniformly bounded almost everywhere, then their expected absolute deviations tend to zero. The probability spaces may vary with the row.

Formal statement
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
∀ n, IsProbabilityMeasure (μ n)
Y :
(n : ℕ) → Ω n → ℝ
c B :
hMeas :
∀ n, AEMeasurable (Y n) (μ n)
hB :
0 ≤ B
hBound :
∀ n, ∀ᵐ ω ∂(μ n), |Y n ω - c| ≤ B
hTendsto :
TendstoInProbability μ Y c
Tendsto (fun n => ∫ ω, |Y n ω - c| ∂(μ n)) atTop (𝓝 0)
Proof (Lean source)
theorem tendsto_integral_abs_sub_of_tendstoInProbability_of_ae_bound [∀ n, IsProbabilityMeasure (μ n)] (Y : (n : ℕ) → Ω n → ℝ) (c B : ℝ) (hMeas : ∀ n, AEMeasurable (Y n) (μ n)) (hB : 0 ≤ B) (hBound : ∀ n, ∀ᵐ ω ∂(μ n), |Y n ω - c| ≤ B) (hTendsto : TendstoInProbability μ Y c) : Tendsto (fun n => ∫ ω, |Y n ω - c| ∂(μ n)) atTop (𝓝 0) := by /- For a positive tolerance `ε`, split the integral over `{|Y-c| < ε}` and its complement. The first part is at most `ε`; the second is at most `B` times the exceptional probability, which tends to zero by `hTendsto`. `hMeas` and the a.e. bound supply all integrability and measurable set side conditions. Treat `B = 0` directly. -/ let f : (n : ℕ) → Ω n → ℝ := fun n ω => |Y n ω - c| have hfMeas : ∀ n, AEMeasurable (f n) (μ n) := fun n => by simpa only [f, Real.norm_eq_abs] using ((hMeas n).sub_const c).norm have hfInt : ∀ n, Integrable (f n) (μ n) := by intro n apply Integrable.of_bound (hfMeas n).aestronglyMeasurable B filter_upwards [hBound n] with ω hω simpa [f, Real.norm_eq_abs, abs_abs] using hω have hfNonneg : ∀ n, 0 ≤ ∫ ω, f n ω ∂(μ n) := fun n => integral_nonneg_of_ae (Filter.Eventually.of_forall fun ω => abs_nonneg _) rw [Metric.tendsto_atTop] intro ε hε let δ : ℝ := ε / 2 have hδ : 0 < δ := div_pos hε (by norm_num) let s : (n : ℕ) → Set (Ω n) := fun n => {ω | δ ≤ f n ω} have hs : ∀ n, NullMeasurableSet (s n) (μ n) := by intro n exact (hfMeas n).nullMeasurableSet_preimage measurableSet_Ici have hprob : Tendsto (fun n => (μ n (s n)).toReal) atTop (𝓝 0) := by rw [ENNReal.tendsto_toReal_zero_iff] simpa [s, f] using hTendsto δ hδ have hupperTendsto : Tendsto (fun n => δ + B * (μ n (s n)).toReal) atTop (𝓝 δ) := by simpa using tendsto_const_nhds.add (tendsto_const_nhds.mul hprob) have hevUpper : ∀ᶠ n in atTop, δ + B * (μ n (s n)).toReal < ε := by exact (tendsto_order.1 hupperTendsto).2 ε (by dsimp [δ]; linarith) obtain ⟨N, hN⟩ := eventually_atTop.1 hevUpper refine ⟨N, fun n hn => ?_⟩ rw [Real.dist_eq] have hIntUpper : (∫ ω, f n ω ∂(μ n)) ≤ δ + B * (μ n (s n)).toReal := by let g : Ω n → ℝ := fun ω => δ + B * (s n).indicator (fun _ => (1 : ℝ)) ω have hind : Integrable ((s n).indicator (fun _ => (1 : ℝ))) (μ n) := (integrable_const (1 : ℝ)).indicator₀ (hs n) have hg : Integrable g (μ n) := by exact (integrable_const δ).add (hind.const_mul B) calc (∫ ω, f n ω ∂(μ n)) ≤ ∫ ω, g ω ∂(μ n) := by apply integral_mono_ae (hfInt n) hg filter_upwards [hBound n] with ω hω by_cases htail : ω ∈ s n · simp only [g, Set.indicator_of_mem htail] dsimp [δ] linarith [hB] · have hlt : f n ω < δ := lt_of_not_ge htail simp only [g, Set.indicator_of_notMem htail, mul_zero, add_zero] exact hlt.le _ = δ + B * (μ n (s n)).toReal := by rw [integral_add (integrable_const δ) (hind.const_mul B), integral_const_mul] rw [integral_indicator₀ (hs n), setIntegral_one_eq_measureReal] simp [measureReal_def] change |(∫ ω, f n ω ∂(μ n)) - 0| < ε rw [sub_zero, abs_of_nonneg (hfNonneg n)] exact hIntUpper.trans_lt (hN n hn)
Causalean.Stat.tendsto_integral_abs_sub_of_tendstoInProbability_of_ae_bound · Causalean/Stat/CLT/MartingaleArray/ProbabilityBounds.lean:24 · uses TendstoInProbability
Remainder­Budget 1 core · 0 supporting This module converts almost-everywhere bounds on predictable variance and conditional Lindeberg mass into a deterministic bound on the sum of integrated quadratic characteristic-function remainders. ★ sum_integral_norm_expQuadraticRemainder_le_of_budgets

Row Taylor-remainder bounds from predictable budgets

This module converts almost-everywhere bounds on predictable variance and conditional Lindeberg mass into a deterministic bound on the sum of integrated quadratic characteristic-function remainders.

theorem sum_integral_norm_expQuadraticRemainder_le_of_budgets reviewed
Causalean.Stat.MartingaleDifferenceArray

If the truncation threshold is positive, the frequency-threshold product is at most one, both budgets are nonnegative, a row has predictable variance at most K, and conditional Lindeberg mass at most δ, then the sum of its integrated quadratic exponential remainders obeys the corresponding truncated Taylor bound.

Formal statement
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
∀ n, IsProbabilityMeasure (μ n)
n :
t η K δ :
:
0 < η
htη :
|t| * η ≤ 1
hK :
0 ≤ K
:
0 ≤ δ
hVariance :
A.predictableQuadraticVariation n ≤ᵐ[μ n] fun _ => K
hLindeberg :
A.conditionalLindeberg η n ≤ᵐ[μ n] fun _ => δ
(∑ k ∈ range (A.rowLength n), ∫ ω, ‖expQuadraticRemainder (t * A.increment n k ω)‖ ∂(μ n))
≤ |t| ^ 3 * η * K + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * δ
Proof (Lean source)
theorem sum_integral_norm_expQuadraticRemainder_le_of_budgets [∀ n, IsProbabilityMeasure (μ n)] (A : MartingaleDifferenceArray Ω μ) (n : ℕ) (t η K δ : ℝ) (hη : 0 < η) (htη : |t| * η ≤ 1) (hK : 0 ≤ K) (hδ : 0 ≤ δ) (hVariance : A.predictableQuadraticVariation n ≤ᵐ[μ n] fun _ => K) (hLindeberg : A.conditionalLindeberg η n ≤ᵐ[μ n] fun _ => δ) : (∑ k ∈ range (A.rowLength n), ∫ ω, ‖expQuadraticRemainder (t * A.increment n k ω)‖ ∂(μ n)) ≤ |t| ^ 3 * η * K + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * δ := by /- Sum `integral_norm_expQuadraticRemainder_le` over the active increments. Use `integral_condExp` to identify the two sums of unconditional moments with the integrals of predictable quadratic variation and conditional Lindeberg mass, then integrate the two a.e. budget bounds. -/ have hVint : Integrable (A.predictableQuadraticVariation n) (μ n) := by unfold predictableQuadraticVariation rw [show (∑ k ∈ range (A.rowLength n), (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k]) = (fun ω => ∑ k ∈ range (A.rowLength n), (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω) by funext ω simp only [Finset.sum_apply]] exact integrable_finsetSum (range (A.rowLength n)) (fun k _ => (integrable_condExp : Integrable ((μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k]) (μ n))) have hLint : Integrable (A.conditionalLindeberg η n) (μ n) := by unfold conditionalLindeberg lindebergTerm rw [show (∑ k ∈ range (A.rowLength n), (μ n)[fun ω => if η < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0 | A.filtration n k]) = (fun ω => ∑ k ∈ range (A.rowLength n), (μ n)[fun ω => if η < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0 | A.filtration n k] ω) by funext ω simp only [Finset.sum_apply]] exact integrable_finsetSum (range (A.rowLength n)) (fun k _ => (integrable_condExp : Integrable ((μ n)[fun ω => if η < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0 | A.filtration n k]) (μ n))) have hSecond : (∑ k ∈ range (A.rowLength n), ∫ ω, (A.increment n k ω) ^ 2 ∂(μ n)) = ∫ ω, A.predictableQuadraticVariation n ω ∂(μ n) := by unfold predictableQuadraticVariation simp only [Finset.sum_apply] rw [integral_finsetSum _ (fun k _ => (integrable_condExp : Integrable ((μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k]) (μ n)))] apply Finset.sum_congr rfl intro k _ exact (integral_condExp ((A.filtration n).le k)).symm have hTail : (∑ k ∈ range (A.rowLength n), ∫ ω, (if η < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0) ∂(μ n)) = ∫ ω, A.conditionalLindeberg η n ω ∂(μ n) := by unfold conditionalLindeberg lindebergTerm simp only [Finset.sum_apply] rw [integral_finsetSum _ (fun k _ => (integrable_condExp : Integrable ((μ n)[fun ω => if η < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0 | A.filtration n k]) (μ n)))] apply Finset.sum_congr rfl intro k _ exact (integral_condExp ((A.filtration n).le k)).symm have hVbudget : ∫ ω, A.predictableQuadraticVariation n ω ∂(μ n) ≤ K := by calc (∫ ω, A.predictableQuadraticVariation n ω ∂(μ n)) ≤ ∫ _ω, K ∂(μ n) := integral_mono_ae hVint (integrable_const K) hVariance _ = K := by simp have hLbudget : ∫ ω, A.conditionalLindeberg η n ω ∂(μ n) ≤ δ := by calc (∫ ω, A.conditionalLindeberg η n ω ∂(μ n)) ≤ ∫ _ω, δ ∂(μ n) := integral_mono_ae hLint (integrable_const δ) hLindeberg _ = δ := by simp have hsmall : 0 ≤ |t| ^ 3 * η := mul_nonneg (by positivity) hη.le have hlarge : 0 ≤ 2 / η ^ 2 + |t| / η + t ^ 2 / 2 := by positivity calc (∑ k ∈ range (A.rowLength n), ∫ ω, ‖expQuadraticRemainder (t * A.increment n k ω)‖ ∂(μ n)) ≤ ∑ k ∈ range (A.rowLength n), (|t| ^ 3 * η * (∫ ω, (A.increment n k ω) ^ 2 ∂(μ n)) + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * (∫ ω, if η < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0 ∂(μ n))) := by apply Finset.sum_le_sum intro k hk exact integral_norm_expQuadraticRemainder_le (A.increment n k) (A.squareIntegrable n k (Finset.mem_range.mp hk)) t η hη htη _ = |t| ^ 3 * η * (∑ k ∈ range (A.rowLength n), ∫ ω, (A.increment n k ω) ^ 2 ∂(μ n)) + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * (∑ k ∈ range (A.rowLength n), ∫ ω, if η < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0 ∂(μ n)) := by rw [Finset.sum_add_distrib, Finset.mul_sum, Finset.mul_sum] _ = |t| ^ 3 * η * (∫ ω, A.predictableQuadraticVariation n ω ∂(μ n)) + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * (∫ ω, A.conditionalLindeberg η n ω ∂(μ n)) := by rw [hSecond, hTail] _ ≤ |t| ^ 3 * η * K + (2 / η ^ 2 + |t| / η + t ^ 2 / 2) * δ := add_le_add (mul_le_mul_of_nonneg_left hVbudget hsmall) (mul_le_mul_of_nonneg_left hLbudget hlarge)
Stopped­Array 5 core · 6 supporting This module constructs a finite-row martingale array stopped before its predictable variance or conditional Lindeberg budget is exceeded. ★ measure_stoppedArray_rowSum_ne_le

Predictably stopped martingale-difference arrays

This module constructs a finite-row martingale array stopped before its predictable variance or conditional Lindeberg budget is exceeded. The stopping multiplier is measurable at the preceding filtration time, so the stopped increments remain martingale differences. No independence is introduced.

def predictableQuadraticVariationThrough reviewed
Causalean.Stat.MartingaleDifferenceArray

The predictable quadratic variation through index k is the sum of the conditional second moments of the active row increments with indices at most k.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
n k :
predictableQuadraticVariationThrough A n k :
Ω n → ℝ
∑ j ∈ range (min (k + 1) (A.rowLength n)), (μ n)[fun ω => (A.increment n j ω) ^ 2 | A.filtration n j]
Causalean.Stat.MartingaleDifferenceArray.predictableQuadraticVariationThrough · Causalean/Stat/CLT/MartingaleArray/StoppedArray.lean:28 · uses MartingaleDifferenceArray
def conditionalLindebergThrough reviewed
Causalean.Stat.MartingaleDifferenceArray

The conditional Lindeberg mass through index k is the sum of the conditional truncated second moments of the active row increments with indices at most k.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
ε :
n k :
conditionalLindebergThrough A ε n k :
Ω n → ℝ
∑ j ∈ range (min (k + 1) (A.rowLength n)), A.lindebergTerm ε n j
Causalean.Stat.MartingaleDifferenceArray.conditionalLindebergThrough · Causalean/Stat/CLT/MartingaleArray/StoppedArray.lean:36 · uses MartingaleDifferenceArray
def stopMultiplier reviewed
Causalean.Stat.MartingaleDifferenceArray

The predictable stopping multiplier for increment k is one exactly when the original row's predictable variance and conditional Lindeberg mass through k remain within the supplied budgets, and is zero otherwise.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
ε K δ :
n k :
stopMultiplier A ε K δ n k :
Ω n → ℝ
fun ω => if A.predictableQuadraticVariationThrough n k ω ≤ K ∧
A.conditionalLindebergThrough ε n k ω ≤ δ then 1 else 0
Causalean.Stat.MartingaleDifferenceArray.stopMultiplier · Causalean/Stat/CLT/MartingaleArray/StoppedArray.lean:43 · uses MartingaleDifferenceArray
def stoppedArray reviewed
Causalean.Stat.MartingaleDifferenceArray

Given a martingale-difference triangular array, a truncation threshold, a predictable-variance budget, and a conditional-Lindeberg budget, the predictably stopped array is another square-integrable martingale-difference array with the same row lengths and filtrations.

Definition (Lean source)
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
ε K δ :
stoppedArray A ε K δ :
clause 1
rowLength := A.rowLength
clause 2
increment n k ω := A.stopMultiplier ε K δ n k ω * A.increment n k ω
clause 3
filtration := A.filtration
clause 4
adapted := by intro n k hk exact ((A.stopMultiplier_stronglyMeasurable ε K δ n k hk).mono ((A.filtration n).mono (Nat.le_succ k))).mul (A.adapted n k hk)
clause 5
squareIntegrable := by intro n k hk refine (A.squareIntegrable n k hk).of_le (((A.stopMultiplier_stronglyMeasurable ε K δ n k hk).mono ((A.filtration n).le k)).aestronglyMeasurable.mul (A.squareIntegrable n k hk).aestronglyMeasurable) ?_ filter_upwards with ω unfold stopMultiplier split_ifs <;> simp
clause 6
condExp_zero := by intro n k hk let M := A.stopMultiplier ε K δ n k have hM : StronglyMeasurable[A.filtration n k] M := A.stopMultiplier_stronglyMeasurable ε K δ n k hk have hX : Integrable (A.increment n k) (μ n) := (A.squareIntegrable n k hk).integrable (by norm_num) have hMX : Integrable (fun ω => M ω * A.increment n k ω) (μ n) := by refine hX.bdd_mul (c := 1) (hM.mono ((A.filtration n).le k)).aestronglyMeasurable ?_ filter_upwards with ω dsimp only [M] unfold stopMultiplier split_ifs <;> simp have hpull : (μ n)[fun ω => M ω * A.increment n k ω | A.filtration n k]
=ᵐ[μ n] fun ω => M ω * (μ n)[A.increment n k | A.filtration n k] ω := condExp_mul_of_stronglyMeasurable_left hM hMX hX filter_upwards [hpull, A.condExp_zero n k hk] with ω hpullω hzeroω simpa only [M, Pi.zero_apply, mul_zero] using hpullω.trans (congrArg (M ω * ·) hzeroω)
Causalean.Stat.MartingaleDifferenceArray.stoppedArray · Causalean/Stat/CLT/MartingaleArray/StoppedArray.lean:82 · uses MartingaleDifferenceArray
theorem measure_stoppedArray_rowSum_ne_le reviewed
Causalean.Stat.MartingaleDifferenceArray

For a positive truncation threshold, the probability that stopping changes a row sum is bounded by the probability that the original row exceeds either stopping budget.

Formal statement
Ω :
ℕ → Type u_1
(n : ℕ) → MeasurableSpace (Ω n)
(n : ℕ) → Measure (Ω n)
shared
ε K δ :
:
0 < ε
n :
(μ n) {ω | (A.stoppedArray ε K δ).rowSum n ω ≠ A.rowSum n ω}
≤ (μ n) {ω | K < A.predictableQuadraticVariation n ω ∨ δ < A.conditionalLindeberg ε n ω}
Proof (Lean source)
theorem measure_stoppedArray_rowSum_ne_le (A : MartingaleDifferenceArray Ω μ) (ε K δ : ℝ) (hε : 0 < ε) (n : ℕ) : (μ n) {ω | (A.stoppedArray ε K δ).rowSum n ω ≠ A.rowSum n ω} ≤ (μ n) {ω | K < A.predictableQuadraticVariation n ω ∨ δ < A.conditionalLindeberg ε n ω} := by /- Convert `stoppedArray_rowSum_ae_eq_of_bounds` to an a.e. inclusion of the disagreement event in the union of the two strict budget violations, then apply `measure_mono_ae`. -/ apply measure_mono_ae filter_upwards [A.stoppedArray_rowSum_ae_eq_of_bounds ε K δ hε n] with ω hω intro hne by_contra hbudgets change ¬(K < A.predictableQuadraticVariation n ω ∨ δ < A.conditionalLindeberg ε n ω) at hbudgets simp only [not_or, not_lt] at hbudgets change (A.stoppedArray ε K δ).rowSum n ω ≠ A.rowSum n ω at hne exact hne (hω hbudgets.1 hbudgets.2)
6 supporting declarations (lemmas, instances)
  • stopMultiplier_stronglyMeasurable theorem — For an active row increment, its stopping multiplier is measurable at the preceding filtration time.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    ε K δ :
    n k :
    hk :
    k < A.rowLength n
    StronglyMeasurable[A.filtration n k] (A.stopMultiplier ε K δ n k)
    Proof (Lean source)
    theorem stopMultiplier_stronglyMeasurable (A : MartingaleDifferenceArray Ω μ) (ε K δ : ℝ) (n k : ℕ) (hk : k < A.rowLength n) : StronglyMeasurable[A.filtration n k] (A.stopMultiplier ε K δ n k) := by /- Conditional expectations are strongly measurable in their conditioning sigma-algebras. Lift every term with filtration monotonicity (`j ≤ k`), close finite sums, then use measurability of the two closed inequalities and the piecewise-constant multiplier. -/ have hV : StronglyMeasurable[A.filtration n k] (A.predictableQuadraticVariationThrough n k) := by unfold predictableQuadraticVariationThrough refine Finset.stronglyMeasurable_sum _ fun j hj => ?_ exact stronglyMeasurable_condExp.mono ((A.filtration n).mono (Nat.le_of_lt_succ (lt_of_lt_of_le (Finset.mem_range.mp hj) (min_le_left _ _)))) have hL : StronglyMeasurable[A.filtration n k] (A.conditionalLindebergThrough ε n k) := by unfold conditionalLindebergThrough lindebergTerm refine Finset.stronglyMeasurable_sum _ fun j hj => ?_ exact stronglyMeasurable_condExp.mono ((A.filtration n).mono (Nat.le_of_lt_succ (lt_of_lt_of_le (Finset.mem_range.mp hj) (min_le_left _ _)))) unfold stopMultiplier exact StronglyMeasurable.ite ((hV.measurable measurableSet_Iic).inter (hL.measurable measurableSet_Iic)) stronglyMeasurable_const stronglyMeasurable_const
    Causalean.Stat.MartingaleDifferenceArray.stopMultiplier_stronglyMeasurable · Causalean/Stat/CLT/MartingaleArray/StoppedArray.lean:51
  • stoppedArray_rowLength theorem — Stopping does not change the row length.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    ε K δ :
    n :
    (A.stoppedArray ε K δ).rowLength n = A.rowLength n
    Proof (Lean source)
    @[simp] theorem stoppedArray_rowLength (A : MartingaleDifferenceArray Ω μ) (ε K δ : ℝ) (n : ℕ) : (A.stoppedArray ε K δ).rowLength n = A.rowLength n := rfl
    Causalean.Stat.MartingaleDifferenceArray.stoppedArray_rowLength · Causalean/Stat/CLT/MartingaleArray/StoppedArray.lean:134
  • stoppedArray_increment theorem — A stopped increment is the original increment multiplied by the predictable zero-one stopping multiplier.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    ε K δ :
    n k :
    (A.stoppedArray ε K δ).increment n k
    = fun ω => A.stopMultiplier ε K δ n k ω * A.increment n k ω
    Proof (Lean source)
    @[simp] theorem stoppedArray_increment (A : MartingaleDifferenceArray Ω μ) (ε K δ : ℝ) (n k : ℕ) : (A.stoppedArray ε K δ).increment n k = fun ω => A.stopMultiplier ε K δ n k ω * A.increment n k ω := rfl
    Causalean.Stat.MartingaleDifferenceArray.stoppedArray_increment · Causalean/Stat/CLT/MartingaleArray/StoppedArray.lean:139
  • stoppedArray_rowSum_ae_eq_of_bounds theorem — If the truncation threshold is positive and the original final predictable variance and conditional Lindeberg mass stay within their budgets, then predictable stopping leaves the row sum unchanged almost everywhere.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    ε K δ :
    :
    0 < ε
    n :
    ∀ᵐ ω ∂(μ n), A.predictableQuadraticVariation n ω
    ≤ K → A.conditionalLindeberg ε n ω ≤ δ → (A.stoppedArray ε K δ).rowSum n ω = A.rowSum n ω
    Proof (Lean source)
    theorem stoppedArray_rowSum_ae_eq_of_bounds (A : MartingaleDifferenceArray Ω μ) (ε K δ : ℝ) (hε : 0 < ε) (n : ℕ) : ∀ᵐ ω ∂(μ n), A.predictableQuadraticVariation n ω ≤ K → A.conditionalLindeberg ε n ω ≤ δ → (A.stoppedArray ε K δ).rowSum n ω = A.rowSum n ω := by /- On one full-measure set all conditional second moments and Lindeberg terms in this finite row are nonnegative. Hence each through-`k` sum is at most the corresponding final sum, every multiplier is one, and the finite row sums agree term by term. -/ have hx : ∀ᵐ ω ∂(μ n), ∀ k, 0 ≤ (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω := ae_all_iff.mpr fun k => condExp_nonneg (ae_of_all _ fun ω => sq_nonneg _) have hy : ∀ᵐ ω ∂(μ n), ∀ k, 0 ≤ A.lindebergTerm ε n k ω := by apply ae_all_iff.mpr intro k apply condExp_nonneg filter_upwards with ω split_ifs <;> positivity filter_upwards [hx, hy] with ω hxω hyω intro hV hL unfold rowSum simp only [stoppedArray_rowLength, Finset.sum_apply] apply Finset.sum_congr rfl intro k hk have hkr : k < A.rowLength n := Finset.mem_range.mp hk have hVr : A.predictableQuadraticVariationThrough n k ω ≤ A.predictableQuadraticVariation n ω := by unfold predictableQuadraticVariationThrough predictableQuadraticVariation simp only [Finset.sum_apply] rw [min_eq_left (Nat.succ_le_iff.mpr hkr)] exact Finset.sum_le_sum_of_subset_of_nonneg (Finset.range_mono (Nat.succ_le_iff.mpr hkr)) (fun i hi _ => hxω i) have hLr : A.conditionalLindebergThrough ε n k ω ≤ A.conditionalLindeberg ε n ω := by unfold conditionalLindebergThrough conditionalLindeberg simp only [Finset.sum_apply] rw [min_eq_left (Nat.succ_le_iff.mpr hkr)] exact Finset.sum_le_sum_of_subset_of_nonneg (Finset.range_mono (Nat.succ_le_iff.mpr hkr)) (fun i hi _ => hyω i) have hmul : A.stopMultiplier ε K δ n k ω = 1 := by rw [stopMultiplier, if_pos] exact intro (hVr.trans hV) (hLr.trans hL) simp only [stoppedArray_increment, hmul, one_mul]
    Causalean.Stat.MartingaleDifferenceArray.stoppedArray_rowSum_ae_eq_of_bounds · Causalean/Stat/CLT/MartingaleArray/StoppedArray.lean:146
  • stoppedArray_predictableQuadraticVariation_le theorem — With nonnegative variance and Lindeberg budgets, the stopped row's predictable quadratic variation never exceeds the variance budget almost everywhere.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    ε K δ :
    hK :
    0 ≤ K
    :
    0 ≤ δ
    n :
    (A.stoppedArray ε K δ).predictableQuadraticVariation n ≤ᵐ[μ n] fun _ => K
    Proof (Lean source)
    theorem stoppedArray_predictableQuadraticVariation_le (A : MartingaleDifferenceArray Ω μ) (ε K δ : ℝ) (hK : 0 ≤ K) (hδ : 0 ≤ δ) (n : ℕ) : (A.stoppedArray ε K δ).predictableQuadraticVariation n ≤ᵐ[μ n] fun _ => K := by /- First prove the conditional second moment of a stopped increment is the original conditional second moment times its zero-one predictable multiplier. On the common nonnegativity set the original prefix sums are monotone, so active indices form an initial segment and the selected sum is bounded by the last original through-sum that is at most `K`. -/ have hmoment (k : ℕ) (hk : k < A.rowLength n) : (μ n)[fun ω => ((A.stoppedArray ε K δ).increment n k ω) ^ 2 | (A.stoppedArray ε K δ).filtration n k] =ᵐ[μ n] fun ω => A.stopMultiplier ε K δ n k ω * (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω := by let M := A.stopMultiplier ε K δ n k have hsm : StronglyMeasurable[A.filtration n k] M := A.stopMultiplier_stronglyMeasurable ε K δ n k hk have hsq : Integrable (fun ω => (A.increment n k ω) ^ 2) (μ n) := (A.squareIntegrable n k hk).integrable_sq have hprod : Integrable (fun ω => M ω * (A.increment n k ω) ^ 2) (μ n) := by refine hsq.bdd_mul (c := 1) (hsm.mono ((A.filtration n).le k)).aestronglyMeasurable ?_ filter_upwards with ω dsimp only [M] unfold stopMultiplier split_ifs <;> simp calc (μ n)[fun ω => ((A.stoppedArray ε K δ).increment n k ω) ^ 2 | (A.stoppedArray ε K δ).filtration n k] =ᵐ[μ n] (μ n)[fun ω => M ω * (A.increment n k ω) ^ 2 | A.filtration n k] := by apply condExp_congr_ae filter_upwards with ω dsimp only [M] simp only [stoppedArray_increment] unfold stopMultiplier split_ifs <;> simp _ =ᵐ[μ n] fun ω => M ω * (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω := condExp_mul_of_stronglyMeasurable_left hsm hprod hsq have hmoment_all : ∀ᵐ ω ∂(μ n), ∀ k, k < A.rowLength n → (μ n)[fun ω => ((A.stoppedArray ε K δ).increment n k ω) ^ 2 | (A.stoppedArray ε K δ).filtration n k] ω = A.stopMultiplier ε K δ n k ω * (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω := by apply ae_all_iff.mpr intro k by_cases hk : k < A.rowLength n · exact (hmoment k hk).mono fun ω hω _ => hω · exact ae_of_all _ fun _ h => (hk h).elim have hx : ∀ᵐ ω ∂(μ n), ∀ k, 0 ≤ (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω := ae_all_iff.mpr fun k => condExp_nonneg (ae_of_all _ fun ω => sq_nonneg _) have hy : ∀ᵐ ω ∂(μ n), ∀ k, 0 ≤ A.lindebergTerm ε n k ω := by apply ae_all_iff.mpr intro k apply condExp_nonneg filter_upwards with ω split_ifs <;> positivity filter_upwards [hmoment_all, hx, hy] with ω hmω hxω hyω unfold predictableQuadraticVariation simp only [Finset.sum_apply, stoppedArray_rowLength] calc (∑ k ∈ range (A.rowLength n), (μ n)[fun ω => ((A.stoppedArray ε K δ).increment n k ω) ^ 2 | (A.stoppedArray ε K δ).filtration n k] ω) = ∑ k ∈ range (A.rowLength n), budgetMultiplier (fun j => (μ n)[fun ω => (A.increment n j ω) ^ 2 | A.filtration n j] ω) (fun j => A.lindebergTerm ε n j ω) K δ k * (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω := by apply Finset.sum_congr rfl intro k hk rw [hmω k (Finset.mem_range.mp hk)] congr 1 unfold stopMultiplier budgetMultiplier predictableQuadraticVariationThrough conditionalLindebergThrough simp only [Finset.sum_apply] rw [min_eq_left (Nat.succ_le_iff.mpr (Finset.mem_range.mp hk))] _ ≤ K := (budgetWeightedSums_le (fun j => (μ n)[fun ω => (A.increment n j ω) ^ 2 | A.filtration n j] ω) (fun j => A.lindebergTerm ε n j ω) K δ (A.rowLength n) (fun k _ => hxω k) (fun k _ => hyω k) hK hδ).1
    Causalean.Stat.MartingaleDifferenceArray.stoppedArray_predictableQuadraticVariation_le · Causalean/Stat/CLT/MartingaleArray/StoppedArray.lean:195
  • stoppedArray_conditionalLindeberg_le theorem — With a positive truncation threshold and nonnegative variance and Lindeberg budgets, the stopped row's conditional Lindeberg sum at that threshold never exceeds its budget almost everywhere.
    Ω :
    ℕ → Type u_1
    (n : ℕ) → MeasurableSpace (Ω n)
    (n : ℕ) → Measure (Ω n)
    shared
    ε K δ :
    :
    0 < ε
    hK :
    0 ≤ K
    :
    0 ≤ δ
    n :
    (A.stoppedArray ε K δ).conditionalLindeberg ε n ≤ᵐ[μ n] fun _ => δ
    Proof (Lean source)
    theorem stoppedArray_conditionalLindeberg_le (A : MartingaleDifferenceArray Ω μ) (ε K δ : ℝ) (hε : 0 < ε) (hK : 0 ≤ K) (hδ : 0 ≤ δ) (n : ℕ) : (A.stoppedArray ε K δ).conditionalLindeberg ε n ≤ᵐ[μ n] fun _ => δ := by /- For `ε > 0`, truncating a zero-one multiple gives that multiplier times the original truncated square. Pull it through conditional expectation; the same initial-segment argument as for predictable variance bounds the resulting selected Lindeberg sum by `δ`. -/ have hmoment (k : ℕ) (hk : k < A.rowLength n) : (A.stoppedArray ε K δ).lindebergTerm ε n k =ᵐ[μ n] fun ω => A.stopMultiplier ε K δ n k ω * A.lindebergTerm ε n k ω := by let M := A.stopMultiplier ε K δ n k let g := fun ω => if ε < |A.increment n k ω| then (A.increment n k ω) ^ 2 else 0 have hsm : StronglyMeasurable[A.filtration n k] M := A.stopMultiplier_stronglyMeasurable ε K δ n k hk have hinc : StronglyMeasurable (A.increment n k) := (A.adapted n k hk).mono ((A.filtration n).le (k + 1)) have hgsm : StronglyMeasurable g := by apply StronglyMeasurable.ite (hinc.norm.measurable measurableSet_Ioi) (hinc.pow 2) stronglyMeasurable_const have hsq : Integrable (fun ω => (A.increment n k ω) ^ 2) (μ n) := (A.squareIntegrable n k hk).integrable_sq have hg : Integrable g (μ n) := by refine hsq.mono hgsm.aestronglyMeasurable ?_ filter_upwards with ω dsimp only [g] split_ifs <;> simp [sq_nonneg] have hprod : Integrable (fun ω => M ω * g ω) (μ n) := by refine hg.bdd_mul (c := 1) (hsm.mono ((A.filtration n).le k)).aestronglyMeasurable ?_ filter_upwards with ω dsimp only [M] unfold stopMultiplier split_ifs <;> simp unfold lindebergTerm calc (μ n)[fun ω => if ε < |(A.stoppedArray ε K δ).increment n k ω| then ((A.stoppedArray ε K δ).increment n k ω) ^ 2 else 0 | (A.stoppedArray ε K δ).filtration n k] =ᵐ[μ n] (μ n)[fun ω => M ω * g ω | A.filtration n k] := by apply condExp_congr_ae filter_upwards with ω dsimp only [M, g] simp only [stoppedArray_increment] unfold stopMultiplier split_ifs <;> simp_all _ =ᵐ[μ n] fun ω => M ω * (μ n)[g | A.filtration n k] ω := condExp_mul_of_stronglyMeasurable_left hsm hprod hg have hmoment_all : ∀ᵐ ω ∂(μ n), ∀ k, k < A.rowLength n → (A.stoppedArray ε K δ).lindebergTerm ε n k ω = A.stopMultiplier ε K δ n k ω * A.lindebergTerm ε n k ω := by apply ae_all_iff.mpr intro k by_cases hk : k < A.rowLength n · exact (hmoment k hk).mono fun ω hω _ => hω · exact ae_of_all _ fun _ h => (hk h).elim have hx : ∀ᵐ ω ∂(μ n), ∀ k, 0 ≤ (μ n)[fun ω => (A.increment n k ω) ^ 2 | A.filtration n k] ω := ae_all_iff.mpr fun k => condExp_nonneg (ae_of_all _ fun ω => sq_nonneg _) have hy : ∀ᵐ ω ∂(μ n), ∀ k, 0 ≤ A.lindebergTerm ε n k ω := by apply ae_all_iff.mpr intro k apply condExp_nonneg filter_upwards with ω split_ifs <;> positivity filter_upwards [hmoment_all, hx, hy] with ω hmω hxω hyω unfold conditionalLindeberg simp only [Finset.sum_apply, stoppedArray_rowLength] calc (∑ k ∈ range (A.rowLength n), (A.stoppedArray ε K δ).lindebergTerm ε n k ω) = ∑ k ∈ range (A.rowLength n), budgetMultiplier (fun j => (μ n)[fun ω => (A.increment n j ω) ^ 2 | A.filtration n j] ω) (fun j => A.lindebergTerm ε n j ω) K δ k * A.lindebergTerm ε n k ω := by apply Finset.sum_congr rfl intro k hk rw [hmω k (Finset.mem_range.mp hk)] congr 1 unfold stopMultiplier budgetMultiplier predictableQuadraticVariationThrough conditionalLindebergThrough simp only [Finset.sum_apply] rw [min_eq_left (Nat.succ_le_iff.mpr (Finset.mem_range.mp hk))] _ ≤ δ := (budgetWeightedSums_le (fun j => (μ n)[fun ω => (A.increment n j ω) ^ 2 | A.filtration n j] ω) (fun j => A.lindebergTerm ε n j ω) K δ (A.rowLength n) (fun k _ => hxω k) (fun k _ => hyω k) hK hδ).2
    Causalean.Stat.MartingaleDifferenceArray.stoppedArray_conditionalLindeberg_le · Causalean/Stat/CLT/MartingaleArray/StoppedArray.lean:284
Stopped­Budget 2 core · 0 supporting This module isolates the finite-sum argument used when a predictable process is stopped before either of two nonnegative cumulative budgets is exceeded. ★ budgetWeightedSums_le

Deterministic accounting for predictable budget stopping

This module isolates the finite-sum argument used when a predictable process is stopped before either of two nonnegative cumulative budgets is exceeded. It is purely deterministic and does not mention filtrations or conditional expectations.

def budgetMultiplier reviewed
Causalean.Stat

Given two sequences of budget charges, two budgets, and a time index, the budget multiplier at that time is one exactly when both cumulative charges through k remain within budget, and zero otherwise.

Definition (Lean source)
x y :
ℕ → ℝ
K delta :
k :
budgetMultiplier x y K delta k :
if (∑ j ∈ range (k + 1), x j) ≤ K ∧
(∑ j ∈ range (k + 1), y j) ≤ delta then 1 else 0
theorem budgetWeightedSums_le reviewed
Causalean.Stat

If both charge sequences are nonnegative before the row length and both budgets are nonnegative, then the total charges selected by the through-time budget multiplier do not exceed their respective budgets. The result permits the charge that first crosses a budget to be discarded and uses no probabilistic assumptions.

Formal statement
x y :
ℕ → ℝ
K delta :
r :
hx :
∀ k < r, 0 ≤ x k
hy :
∀ k < r, 0 ≤ y k
hK :
0 ≤ K
hdelta :
0 ≤ delta
conclusion 1
(∑ k ∈ range r, budgetMultiplier x y K delta k * x k) ≤ K
conclusion 2
(∑ k ∈ range r, budgetMultiplier x y K delta k * y k) ≤ delta
Proof (Lean source)
theorem budgetWeightedSums_le (x y : ℕ → ℝ) (K delta : ℝ) (r : ℕ) (hx : ∀ k < r, 0 ≤ x k) (hy : ∀ k < r, 0 ≤ y k) (hK : 0 ≤ K) (hdelta : 0 ≤ delta) : (∑ k ∈ range r, budgetMultiplier x y K delta k * x k) ≤ K ∧ (∑ k ∈ range r, budgetMultiplier x y K delta k * y k) ≤ delta := by /- Induct on `r`. At the successor step, split on whether the two full prefixes through the new last index satisfy their budgets. If they do, nonnegativity implies every earlier prefix also satisfies its budgets, so all multipliers are one and the selected sums are the full prefix sums. If either full prefix fails, the new multiplier is zero and the induction hypothesis bounds the unchanged selected sums. Useful rewrites are `Finset.sum_range_succ`, `Finset.mem_range`, and `budgetMultiplier`. -/ induction r with | zero => simpa using intro hK hdelta | succ r ih => have hx' : ∀ k < r, 0 ≤ x k := fun k hk => hx k (Nat.lt_succ_of_lt hk) have hy' : ∀ k < r, 0 ≤ y k := fun k hk => hy k (Nat.lt_succ_of_lt hk) have ih_bounds := ih hx' hy' by_cases hfull : (∑ j ∈ range (r + 1), x j) ≤ K ∧ (∑ j ∈ range (r + 1), y j) ≤ delta · have hprefix (k : ℕ) (hk : k < r + 1) : (∑ j ∈ range (k + 1), x j) ≤ K ∧ (∑ j ∈ range (k + 1), y j) ≤ delta := by have hsub : range (k + 1) ⊆ range (r + 1) := Finset.range_mono (Nat.succ_le_succ (Nat.le_of_lt_succ hk)) constructor · exact (Finset.sum_le_sum_of_subset_of_nonneg hsub (fun i hi _ => hx i (Finset.mem_range.mp hi))).trans hfull.1 · exact (Finset.sum_le_sum_of_subset_of_nonneg hsub (fun i hi _ => hy i (Finset.mem_range.mp hi))).trans hfull.2 have hmul (k : ℕ) (hk : k < r + 1) : budgetMultiplier x y K delta k = 1 := by simp [budgetMultiplier, hprefix k hk] constructor · calc (∑ k ∈ range (r + 1), budgetMultiplier x y K delta k * x k) = ∑ k ∈ range (r + 1), x k := by apply Finset.sum_congr rfl intro k hk rw [hmul k (Finset.mem_range.mp hk), one_mul] _ ≤ K := hfull.1 · calc (∑ k ∈ range (r + 1), budgetMultiplier x y K delta k * y k) = ∑ k ∈ range (r + 1), y k := by apply Finset.sum_congr rfl intro k hk rw [hmul k (Finset.mem_range.mp hk), one_mul] _ ≤ delta := hfull.2 · have hlast : budgetMultiplier x y K delta r = 0 := by simp [budgetMultiplier, hfull] simpa [Finset.sum_range_succ, hlast] using ih_bounds