Stat.Concentration.Bounded­Variation

This module collects continuum maximal inequalities for finite independent families of continuous real paths with bounded variation.

Sign­MGF 3 core · 1 supporting · 1 submodule The uniform law on Boolean sign vectors gives the basic sub-Gaussian estimate used in the bounded-variation path maximal inequality.
Variation 7 core · 4 supporting This module fixes the compact time interval, the path norm and total variation, and a continuous cumulative-variation control used in continuum chaining. ★ exists_variation_control

Continuous paths of bounded variation

This module fixes the compact time interval, the path norm and total variation, and a continuous cumulative-variation control used in continuum chaining.

abbrev Time reviewed
Causalean.Stat.Concentration.BoundedVariation

The time domain is the closed real interval from zero to one.

Definition (Lean source)
Time :
Type
Icc (0 : ℝ) 1
Causalean.Stat.Concentration.BoundedVariation.Time · Causalean/Stat/Concentration/BoundedVariation/Variation.lean:18
abbrev Path reviewed
Causalean.Stat.Concentration.BoundedVariation

A path is a continuous real-valued function on the closed unit time interval.

Definition (Lean source)
Path :
Type
C(Time, ℝ)
Causalean.Stat.Concentration.BoundedVariation.Path · Causalean/Stat/Concentration/BoundedVariation/Variation.lean:23
def timeZero reviewed
Causalean.Stat.Concentration.BoundedVariation

The left endpoint of the time interval is the time 0.

Definition (Lean source)
timeZero :
⟨0, by constructor <;> norm_num⟩
Causalean.Stat.Concentration.BoundedVariation.timeZero · Causalean/Stat/Concentration/BoundedVariation/Variation.lean:33 · uses Time
def timeOne reviewed
Causalean.Stat.Concentration.BoundedVariation

The right endpoint of the time interval is the time 1.

Definition (Lean source)
timeOne :
⟨1, by constructor <;> norm_num⟩
Causalean.Stat.Concentration.BoundedVariation.timeOne · Causalean/Stat/Concentration/BoundedVariation/Variation.lean:38 · uses Time
def pathTV reviewed
Causalean.Stat.Concentration.BoundedVariation

The total variation of a continuous path f is its extended total variation over the unit interval, converted to a real number.

Definition (Lean source)
f :
pathTV f :
ℝ
Causalean.Stat.Concentration.BoundedVariation.pathTV · Causalean/Stat/Concentration/BoundedVariation/Variation.lean:43 · uses Path
def pathSize reviewed
Causalean.Stat.Concentration.BoundedVariation

The size of a continuous path f is its supremum norm plus its total variation.

Definition (Lean source)
f :
pathSize f :
ℝ
‖f‖ + pathTV f
Causalean.Stat.Concentration.BoundedVariation.pathSize · Causalean/Stat/Concentration/BoundedVariation/Variation.lean:52 · uses Path
theorem exists_variation_control reviewed
Causalean.Stat.Concentration.BoundedVariation

If a continuous path has bounded variation, then it has a continuous nondecreasing cumulative-variation control that starts at zero, ends at the path's total variation, and dominates every ordered increment of the path.

Formal statement
f :
hf :
∃ v : Path,
Monotone (v : Time → ℝ)
v timeZero = 0
conclusion 1
s t :
s ≤ t
|f t - f s| ≤ v t - v s
Proof (Lean source)
theorem exists_variation_control (f : Path) (hf : eVariationOn f Set.univ < ⊤) : ∃ v : Path, Monotone (v : Time → ℝ) ∧ v timeZero = 0 ∧ v timeOne = pathTV f ∧ ∀ s t : Time, s ≤ t → |f t - f s| ≤ v t - v s := by have hbf : BoundedVariationOn (f : Time → ℝ) Set.univ := ne_of_lt hf let w : Time → ℝ := variationOnFromTo f Set.univ timeZero have hw_cont : Continuous w := by rw [continuous_iff_continuousAt] intro x apply continuousAt_iff_continuous_left_right.mpr constructor · rw [← continuousWithinAt_Iio_iff_Iic] have h := variationOnFromTo.tendsto_left (s := Set.univ) (a := timeZero) (b := x) (l := f x) (Set.mem_univ _) (Set.mem_univ _) hbf.locallyBoundedVariationOn (f.continuous.continuousAt.mono_left (nhdsWithin_le_nhds)) simpa [ContinuousWithinAt, w, Set.univ_inter] using h · rw [← continuousWithinAt_Ioi_iff_Ici] have h := variationOnFromTo.tendsto_right (s := Set.univ) (a := timeZero) (b := x) (l := f x) (Set.mem_univ _) (Set.mem_univ _) hbf.locallyBoundedVariationOn (f.continuous.continuousAt.mono_left (nhdsWithin_le_nhds)) simpa [ContinuousWithinAt, w, Set.univ_inter] using h refine ⟨⟨w, hw_cont⟩, ?_, ?_, ?_, ?_⟩ · intro s t hst exact (variationOnFromTo.monotoneOn hbf.locallyBoundedVariationOn (Set.mem_univ timeZero)) (Set.mem_univ s) (Set.mem_univ t) hst · exact variationOnFromTo.self f Set.univ timeZero · have hinterval : Icc timeZero timeOne = Set.univ := by ext x simp only [Set.mem_Icc, Set.mem_univ, iff_true] exact ⟨x.property.1, x.property.2⟩ change variationOnFromTo f Set.univ timeZero timeOne = pathTV f have h01 : timeZero ≤ timeOne := by change (0 : ℝ) ≤ 1 norm_num rw [variationOnFromTo.eq_of_le f Set.univ h01] simp [hinterval, pathTV] · intro s t hst exact variationOnFromTo.abs_sub_le_sub_of_le hbf.locallyBoundedVariationOn (Set.mem_univ timeZero) (Set.mem_univ s) (Set.mem_univ t) hst
Causalean.Stat.Concentration.BoundedVariation.exists_variation_control · Causalean/Stat/Concentration/BoundedVariation/Variation.lean:84 · uses Path , Time , pathTV , timeOne , timeZero
4 supporting declarations (lemmas, instances)
Signed­Chaining 2 core · 0 supporting A scalar continuous control of squared coefficient increments bounds the signed process over the whole unit interval. ★ rademacherEnergy_le_scalar_control

Continuum chaining for finite signed path sums

A scalar continuous control of squared coefficient increments bounds the signed process over the whole unit interval. This isolates the continuum argument from the construction of variation controls for particular paths.

def rademacherEnergy reviewed
Causalean.Stat.Concentration.BoundedVariation

The Rademacher energy of a finite collection of continuous paths on the unit interval is the uniform average, over all sign patterns, of the squared supremum norm of the signed sum of the paths.

Definition (Lean source)
n :
ℕ
w :
Fin n → Path
rademacherEnergy w :
ℝ
(∑ σ : Fin n → Bool, ‖∑ j, (if σ j then (1 : ℝ) else -1) • w j‖ ^ 2) / (2 ^ n : ℝ)
Causalean.Stat.Concentration.BoundedVariation.rademacherEnergy · Causalean/Stat/Concentration/BoundedVariation/SignedChaining.lean:19 · uses Path
theorem rademacherEnergy_le_scalar_control reviewed
Causalean.Stat.Concentration.BoundedVariation

If a continuous scalar control u is nondecreasing, zero at time zero, and dominates the summed squared increments of the paths over every interval from s to t, then the Rademacher energy of the paths is at most 4096 times the total of the sum of their squared values at time zero and the terminal control value.

Formal statement
n :
ℕ
w :
Fin n → Path
u :
hmono :
Monotone (u : Time → ℝ)
hzero :
u timeZero = 0
henergy :
∀ s t : Time
if
s ≤ t
then
(∑ j, (w j t - w j s) ^ 2) ≤ u t - u s
rademacherEnergy w ≤ 4096 * ((∑ j, (w j timeZero) ^ 2) + u timeOne)
Proof (Lean source)
theorem rademacherEnergy_le_scalar_control {n : ℕ} (w : Fin n → Path) (u : Path) (hmono : Monotone (u : Time → ℝ)) (hzero : u timeZero = 0) (henergy : ∀ s t : Time, s ≤ t → (∑ j, (w j t - w j s) ^ 2) ≤ u t - u s) : rademacherEnergy w ≤ 4096 * ((∑ j, (w j timeZero) ^ 2) + u timeOne) := by /- Use `exists_control_dyadic_grid` for dyadic levels of u. The summability and deterministic continuum passage are separated in `ChainingReconstruction`. At level k, the parent-child increments have squared coefficient energy at most 2^(-k) u(1). Apply `signed_grid_increment_max_energy_le` to each finite edge family, sum its square-root bounds by `finite_sign_l2_sum_le`, and pass to the continuous supremum using `signed_path_le_dyadic_increment_series`. On a plateau of u, henergy makes every coefficient path constant, so the section represents the signed process even if its times are not dense. Bound the initial value by sign orthogonality. The level-root series is at most `40 * sqrt (u timeOne)`, so `(a + b)^2 ≤ 2*a^2 + 2*b^2` gives `2 * initialEnergy + 3200 * u timeOne`, within the stated `4096` bound. The supremum over time can be taken by evaluating the `Path` norm and applying `signed_path_le_dyadic_increment_series` pointwise. -/ classical let E : ℝ := ∑ j, (w j timeZero) ^ 2 let U : ℝ := u timeOne have hE : 0 ≤ E := Finset.sum_nonneg fun j _ => sq_nonneg _ have hU : 0 ≤ U := by dsimp [U] simpa only [hzero] using hmono (show timeZero ≤ timeOne by change (0 : ℝ) ≤ 1; norm_num) obtain ⟨grid, hgridmono, hgridval, hgridcompat⟩ := exists_control_dyadic_grid u hmono hzero let A (σ : Fin n → Bool) : ℝ := |∑ j, (if σ j then (1 : ℝ) else -1) * w j timeZero| let B (k : ℕ) (σ : Fin n → Bool) : ℝ := signedDyadicIncrementMax w grid k σ let Q (k : ℕ) : ℝ := 32 * (1 + log ((2 ^ (k + 1) : ℕ) : ℝ)) / (2 : ℝ) ^ (k + 1) have hAenergy : (∑ σ : Fin n → Bool, (A σ) ^ 2) / (2 ^ n : ℝ) ≤ 32 * E := by have h := signMaxEnergy_le (m := 0) (fun (_ : Fin 1) (j : Fin n) => w j timeZero) simpa [signMaxEnergy, A, E] using h have hBenergy (k : ℕ) : (∑ σ : Fin n → Bool, (B k σ) ^ 2) / (2 ^ n : ℝ) ≤ Q k * U := by have h := signedDyadicIncrementMax_energy_le w u henergy grid hgridmono hgridval k convert h using 1 <;> dsimp [B, Q, U] <;> ring have hQ (k : ℕ) : 0 ≤ Q k := by dsimp [Q] have hk : 1 ≤ ((2 ^ (k + 1) : ℕ) : ℝ) := by exact_mod_cast Nat.one_le_iff_ne_zero.mpr (by positivity : 2 ^ (k + 1) ≠ 0) have := Real.log_nonneg hk positivity have hroot (k : ℕ) : sqrt ((∑ σ : Fin n → Bool, (B k σ) ^ 2) / (2 ^ n : ℝ)) ≤ sqrt U * sqrt (Q k) := by rw [← Real.sqrt_mul hU] exact Real.sqrt_le_sqrt (by simpa [mul_comm] using hBenergy k) have hBsum (σ : Fin n → Bool) : Summable (fun k => B k σ) := signedDyadicIncrementMax_summable w u hmono hzero henergy grid hgridmono hgridval σ have hR : Summable (fun k => sqrt ((∑ σ : Fin n → Bool, (B k σ) ^ 2) / (2 ^ n : ℝ))) := by apply Summable.of_nonneg_of_le (fun k => Real.sqrt_nonneg _) hroot exact dyadic_log_sqrt_summable.mul_left (sqrt U) have hRbound : (∑' k, sqrt ((∑ σ : Fin n → Bool, (B k σ) ^ 2) / (2 ^ n : ℝ))) ≤ 40 * sqrt U := by calc _ ≤ ∑' k, sqrt U * sqrt (Q k) := Summable.tsum_le_tsum hroot hR (dyadic_log_sqrt_summable.mul_left (sqrt U)) _ = sqrt U * (∑' k, sqrt (Q k)) := by rw [tsum_mul_left] _ ≤ 40 * sqrt U := by have hn : (∑' k, sqrt (Q k)) ≤ 40 := by simpa only [Q] using dyadic_log_sqrt_tsum_le_40 simpa only [mul_comm] using (mul_le_mul_of_nonneg_left hn (Real.sqrt_nonneg U)) have hBtotal : (∑ σ : Fin n → Bool, (∑' k, B k σ) ^ 2) / (2 ^ n : ℝ) ≤ (∑' k, sqrt ((∑ σ : Fin n → Bool, (B k σ) ^ 2) / (2 ^ n : ℝ))) ^ 2 := finite_sign_l2_tsum_le B hR have hpoint (σ : Fin n → Bool) : ‖∑ j, (if σ j then (1 : ℝ) else -1) • w j‖ ≤ A σ + ∑' k, B k σ := by let f : Path := ∑ j, (if σ j then (1 : ℝ) else -1) • w j have hBn (k : ℕ) : 0 ≤ B k σ := by unfold B signedDyadicIncrementMax exact (abs_nonneg _).trans (Finset.le_sup' (fun i : Fin (2 ^ (k + 1)) => |∑ j, (if σ j then (1 : ℝ) else -1) * (w j (grid (k + 1) i.succ) - w j (grid (k + 1) i.castSucc))|) (by simp : (0 : Fin (2 ^ (k + 1))) ∈ univ)) apply (ContinuousMap.norm_le f (add_nonneg (abs_nonneg _) (tsum_nonneg hBn))).2 intro s have hs := signed_path_le_dyadic_increment_series w u hmono hzero henergy grid hgridval hgridcompat σ s (hBsum σ) simpa only [f, ContinuousMap.sum_apply, ContinuousMap.smul_apply, smul_eq_mul, Real.norm_eq_abs, A, B] using hs have hsup : rademacherEnergy w ≤ (∑ σ : Fin n → Bool, (A σ + ∑' k, B k σ) ^ 2) / (2 ^ n : ℝ) := by unfold rademacherEnergy apply div_le_div_of_nonneg_right _ (by positivity) apply Finset.sum_le_sum intro σ _ nlinarith [hpoint σ, norm_nonneg (∑ j, (if σ j then (1 : ℝ) else -1) • w j)] have htwo := finite_sign_l2_sum_le (fun i : Fin 2 => if i.val = 0 then A else fun σ => ∑' k, B k σ) have hfinal : (∑ σ : Fin n → Bool, (A σ + ∑' k, B k σ) ^ 2) / (2 ^ n : ℝ) ≤ (sqrt ((∑ σ : Fin n → Bool, (A σ) ^ 2) / (2 ^ n : ℝ)) + sqrt ((∑ σ : Fin n → Bool, (∑' k, B k σ) ^ 2) / (2 ^ n : ℝ))) ^ 2 := by simpa [Fin.sum_univ_two] using htwo have hR0 : sqrt ((∑ σ : Fin n → Bool, (A σ) ^ 2) / (2 ^ n : ℝ)) ^ 2 ≤ 32 * E := by rw [Real.sq_sqrt (div_nonneg (Finset.sum_nonneg fun _ _ => sq_nonneg _) (by positivity))] exact hAenergy have hR1 : sqrt ((∑ σ : Fin n → Bool, (∑' k, B k σ) ^ 2) / (2 ^ n : ℝ)) ^ 2 ≤ (40 * sqrt U) ^ 2 := by rw [Real.sq_sqrt (div_nonneg (Finset.sum_nonneg fun _ _ => sq_nonneg _) (by positivity))] exact hBtotal.trans ((sq_le_sq₀ (tsum_nonneg fun _ => Real.sqrt_nonneg _) (mul_nonneg (by norm_num : (0 : ℝ) ≤ 40) (Real.sqrt_nonneg U))).2 hRbound) calc rademacherEnergy w ≤ _ := hsup _ ≤ _ := hfinal _ ≤ 4096 * (E + U) := by have hs := Real.sq_sqrt hU nlinarith [sq_nonneg (sqrt ((∑ σ : Fin n → Bool, (A σ) ^ 2) / (2 ^ n : ℝ)) - sqrt ((∑ σ : Fin n → Bool, (∑' k, B k σ) ^ 2) / (2 ^ n : ℝ)))] _ = _ := rfl
Causalean.Stat.Concentration.BoundedVariation.rademacherEnergy_le_scalar_control · Causalean/Stat/Concentration/BoundedVariation/SignedChaining.lean:28 · uses Path , Time , rademacherEnergy , timeOne , timeZero
Chaining­Reconstruction 2 core · 6 supporting The compatible dyadic sections of a scalar increment control recover every point of a continuous signed path. ★ signed_path_le_dyadic_increment_series

Reconstructing a signed path from control quantiles

The compatible dyadic sections of a scalar increment control recover every point of a continuous signed path. This module separates the deterministic continuum argument from the later second-moment estimates.

def signedDyadicIncrementMax reviewed
Causalean.Stat.Concentration.BoundedVariation

The largest absolute signed increment at dyadic level k: given a family of n paths, a family of dyadic time grids, the level-k grid having 2^k + 1 points, a level k, and a sign pattern σ on the n paths, it is the maximum, over the 2^(k+1) adjacent pairs of points of the level-(k+1) grid, of the absolute value of the σ-signed sum of the path increments across that pair.

Definition (Lean source)
n :
ℕ
w :
Fin n → Path
grid :
∀ k : ℕ
if
Fin (2 ^ k + 1)
then
k :
ℕ
σ :
Fin n → Bool
signedDyadicIncrementMax w grid k σ :
ℝ
Finset.univ.sup' univ_nonempty (fun i : Fin (2 ^ (k + 1)) => |∑ j, (if σ j then (1 : ℝ) else -1) * (w j (grid (k + 1) i.succ) - w j (grid (k + 1) i.castSucc))|)
Causalean.Stat.Concentration.BoundedVariation.signedDyadicIncrementMax · Causalean/Stat/Concentration/BoundedVariation/ChainingReconstruction.lean:16 · uses Path , Time
theorem signed_path_le_dyadic_increment_series reviewed
Causalean.Stat.Concentration.BoundedVariation

Suppose the control u is nondecreasing, zero at time zero, and dominates the summed squared path increments over every interval, and the dyadic grids place their i-th level-k point at control value i/2^k times the terminal value and assign the same time to equal dyadic fractions at different levels. If the maximal signed increments over the levels are summable, then the absolute σ-signed path sum at any time s is at most the absolute σ-signed sum at time zero plus the total of the maximal signed increments over all levels.

Formal statement
n :
ℕ
w :
Fin n → Path
u :
hmono :
Monotone (u : Time → ℝ)
hzero :
u timeZero = 0
henergy :
∀ s t : Time
if
s ≤ t
then
(∑ j, (w j t - w j s) ^ 2) ≤ u t - u s
grid :
∀ k : ℕ
if
Fin (2 ^ k + 1)
then
hgridval :
∀ k i, u (grid k i) = ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne
hgridcompat :
∀ k i l j
if
((i.val : ℝ) / (2 ^ k : ℝ)) = ((j.val : ℝ) / (2 ^ l : ℝ))
then
grid k i = grid l j
σ :
Fin n → Bool
s :
hsum :
Summable (fun k => signedDyadicIncrementMax w grid k σ)
|∑ j, (if σ j then (1 : ℝ) else -1) * w j s|
≤ |∑ j, (if σ j then (1 : ℝ) else -1) * w j timeZero|
+ ∑' k, signedDyadicIncrementMax w grid k σ
Proof (Lean source)
theorem signed_path_le_dyadic_increment_series {n : ℕ} (w : Fin n → Path) (u : Path) (hmono : Monotone (u : Time → ℝ)) (hzero : u timeZero = 0) (henergy : ∀ s t : Time, s ≤ t → (∑ j, (w j t - w j s) ^ 2) ≤ u t - u s) (grid : ∀ k : ℕ, Fin (2 ^ k + 1) → Time) (hgridval : ∀ k i, u (grid k i) = ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne) (hgridcompat : ∀ k i l j, ((i.val : ℝ) / (2 ^ k : ℝ)) = ((j.val : ℝ) / (2 ^ l : ℝ)) → grid k i = grid l j) (σ : Fin n → Bool) (s : Time) (hsum : Summable (fun k => signedDyadicIncrementMax w grid k σ)) : |∑ j, (if σ j then (1 : ℝ) else -1) * w j s| ≤ |∑ j, (if σ j then (1 : ℝ) else -1) * w j timeZero| + ∑' k, signedDyadicIncrementMax w grid k σ := by /- Approximate `u(s)` from below by dyadic levels. Compatibility makes the parent grid point literally the same at the next level, so each new value costs one adjacent increment. The coefficient-energy bound makes all `w_j` constant on each level set of `u`; hence the limiting signed value is the one at `s` even when `u` has a plateau. Pass the finite telescoping inequality to the limit using `Summable.tendsto_sum_tsum_nat hsum`. The chain exists by `exists_dyadic_lower_chain`; for `u(1) = 0`, take its index at `x = 0`, and otherwise use `x = u(s) / u(1)`. -/ obtain ⟨x, hx0, hx1, hx⟩ := control_value_unit_fraction u hmono hzero s obtain ⟨i, hi0, _, hiapprox, hiparent⟩ := exists_dyadic_lower_chain x hx0 hx1 have hfinite (m : ℕ) : |∑ j, (if σ j then (1 : ℝ) else -1) * w j (grid m (i m))| ≤ |∑ j, (if σ j then (1 : ℝ) else -1) * w j timeZero| + ∑ k ∈ range m, signedDyadicIncrementMax w grid k σ := signed_dyadic_chain_finite_le w u hzero henergy grid hgridval hgridcompat i hi0 hiparent σ m have hleft : Tendsto (fun m => |∑ j, (if σ j then (1 : ℝ) else -1) * w j (grid m (i m))|) atTop (nhds |∑ j, (if σ j then (1 : ℝ) else -1) * w j s|) := (signed_dyadic_chain_tendsto w u hmono hzero henergy grid hgridval i s x hx hiapprox σ).abs have hright : Tendsto (fun m => |∑ j, (if σ j then (1 : ℝ) else -1) * w j timeZero| + ∑ k ∈ range m, signedDyadicIncrementMax w grid k σ) atTop (nhds (|∑ j, (if σ j then (1 : ℝ) else -1) * w j timeZero| + ∑' k, signedDyadicIncrementMax w grid k σ)) := tendsto_const_nhds.add (hsum.tendsto_sum_tsum_nat) exact le_of_tendsto_of_tendsto' hleft hright hfinite
Causalean.Stat.Concentration.BoundedVariation.signed_path_le_dyadic_increment_series · Causalean/Stat/Concentration/BoundedVariation/ChainingReconstruction.lean:395 · uses Path , Time , signedDyadicIncrementMax , timeOne , timeZero
6 supporting declarations (lemmas, instances)
  • signedDyadicIncrementMax_summable theorem — If a scalar control u is nondecreasing and zero at time zero, the squared increments of the n paths over every interval from s to t sum to at most u(t) − u(s), and the dyadic grids are monotone at every level and place their i-th level-k point where the control equals i/2^k times its terminal value, then for every sign pattern the maximal signed increments at successive levels form a summable sequence.
    n :
    ℕ
    w :
    Fin n → Path
    u :
    hmono :
    Monotone (u : Time → ℝ)
    hzero :
    u timeZero = 0
    henergy :
    ∀ s t : Time
    if
    s ≤ t
    then
    (∑ j, (w j t - w j s) ^ 2) ≤ u t - u s
    grid :
    ∀ k : ℕ
    if
    Fin (2 ^ k + 1)
    then
    hgridmono :
    ∀ k, Monotone (grid k)
    hgridval :
    ∀ k i, u (grid k i) = ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne
    σ :
    Fin n → Bool
    Summable (fun k => signedDyadicIncrementMax w grid k σ)
    Proof (Lean source)
    theorem signedDyadicIncrementMax_summable {n : ℕ} (w : Fin n → Path) (u : Path) (hmono : Monotone (u : Time → ℝ)) (hzero : u timeZero = 0) (henergy : ∀ s t : Time, s ≤ t → (∑ j, (w j t - w j s) ^ 2) ≤ u t - u s) (grid : ∀ k : ℕ, Fin (2 ^ k + 1) → Time) (hgridmono : ∀ k, Monotone (grid k)) (hgridval : ∀ k i, u (grid k i) = ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne) (σ : Fin n → Bool) : Summable (fun k => signedDyadicIncrementMax w grid k σ) := by /- Cauchy--Schwarz bounds every signed edge by the square root of `n` times the square root of its coefficient energy. Every edge at level `k + 1` has control mass `u(1) / 2 ^ (k + 1)`. Compare the maxima with a geometric series of ratio `1 / sqrt 2`, including the case `u(1) = 0`. -/ classical have hU : 0 ≤ u timeOne := by simpa only [hzero] using hmono (show timeZero ≤ timeOne by change (0 : ℝ) ≤ 1; norm_num) let r : ℝ := sqrt (1 / 2 : ℝ) have hr0 : 0 ≤ r := Real.sqrt_nonneg _ have hr1 : r < 1 := by dsimp [r] nlinarith [Real.sq_sqrt (show (0 : ℝ) ≤ 1 / 2 by norm_num), Real.sqrt_nonneg (1 / 2 : ℝ)] have hgeom : Summable (fun k : ℕ => (n : ℝ) * sqrt (u timeOne) * r ^ (k + 1)) := ((summable_geometric_of_lt_one hr0 hr1).comp_injective Nat.succ_injective).mul_left _ have hsqrt_pow (m : ℕ) : sqrt ((1 / 2 : ℝ) ^ m) = r ^ m := by induction m with | zero => simp [r] | succ m ih => rw [pow_succ, Real.sqrt_mul (by norm_num), ih, pow_succ] apply Summable.of_nonneg_of_le (fun k => by unfold signedDyadicIncrementMax have h := Finset.le_sup' (fun i : Fin (2 ^ (k + 1)) => |∑ j, (if σ j then (1 : ℝ) else -1) * (w j (grid (k + 1) i.succ) - w j (grid (k + 1) i.castSucc))|) (by simp : (0 : Fin (2 ^ (k + 1))) ∈ univ) exact (abs_nonneg _).trans h) ?_ hgeom intro k apply Finset.sup'_le intro i hi let a : Fin n → ℝ := fun j => w j (grid (k + 1) i.succ) - w j (grid (k + 1) i.castSucc) have hs : grid (k + 1) i.castSucc ≤ grid (k + 1) i.succ := hgridmono _ (by exact_mod_cast le_succ i.val) have henergy' : (∑ j, a j ^ 2) ≤ u timeOne / (2 : ℝ) ^ (k + 1) := by have h := henergy _ _ hs rw [hgridval, hgridval] at h dsimp [a] convert h using 1 <;> simp only [Fin.val_succ, Fin.val_castSucc, Nat.cast_add, Nat.cast_one] <;> ring have hcoord (j : Fin n) : |a j| ≤ sqrt (u timeOne / (2 : ℝ) ^ (k + 1)) := by rw [Real.le_sqrt (abs_nonneg _) (div_nonneg hU (by positivity)), sq_abs] calc a j ^ 2 ≤ ∑ l, a l ^ 2 := Finset.single_le_sum (fun l hl => sq_nonneg _) (by simp) _ ≤ _ := henergy' calc |∑ j, (if σ j then (1 : ℝ) else -1) * a j| ≤ ∑ j, |(if σ j then (1 : ℝ) else -1) * a j| := Finset.abs_sum_le_sum_abs _ _ _ = ∑ j, |a j| := by apply Finset.sum_congr rfl intro j hj by_cases hjσ : σ j = true <;> simp [hjσ] _ ≤ ∑ _j : Fin n, sqrt (u timeOne / (2 : ℝ) ^ (k + 1)) := Finset.sum_le_sum (fun j _ => hcoord j) _ = (n : ℝ) * sqrt (u timeOne) * r ^ (k + 1) := by simp only [Finset.sum_const, Finset.card_fin, nsmul_eq_mul] dsimp [r] rw [div_eq_mul_inv, ← inv_pow, Real.sqrt_mul hU] norm_num only [show (2 : ℝ)⁻¹ = 1 / 2 by norm_num] rw [hsqrt_pow] ring
    Causalean.Stat.Concentration.BoundedVariation.signedDyadicIncrementMax_summable · Causalean/Stat/Concentration/BoundedVariation/ChainingReconstruction.lean:31
  • signed_dyadic_chain_step_le theorem — Let the dyadic grids be compatible across levels: grid points at different levels with the same dyadic fraction are the same time. If the level-(k+1) index j is a child (2i or 2i + 1) of the level-k index i, then the absolute signed path sum at the child grid point is at most the absolute signed sum at the parent grid point plus the maximal signed increment at level k.
    n :
    ℕ
    w :
    Fin n → Path
    grid :
    ∀ k : ℕ
    if
    Fin (2 ^ k + 1)
    then
    hgridcompat :
    ∀ k i l j
    if
    ((i.val : ℝ) / (2 ^ k : ℝ)) = ((j.val : ℝ) / (2 ^ l : ℝ))
    then
    grid k i = grid l j
    σ :
    Fin n → Bool
    k :
    ℕ
    i :
    Fin (2 ^ k + 1)
    j :
    Fin (2 ^ (k + 1) + 1)
    hparent :
    j.val = 2 * i.val ∨ j.val = 2 * i.val + 1
    |∑ a, (if σ a then (1 : ℝ) else -1) * w a (grid (k + 1) j)|
    ≤ |∑ a, (if σ a then (1 : ℝ) else -1) * w a (grid k i)|
    Proof (Lean source)
    theorem signed_dyadic_chain_step_le {n : ℕ} (w : Fin n → Path) (grid : ∀ k : ℕ, Fin (2 ^ k + 1) → Time) (hgridcompat : ∀ k i l j, ((i.val : ℝ) / (2 ^ k : ℝ)) = ((j.val : ℝ) / (2 ^ l : ℝ)) → grid k i = grid l j) (σ : Fin n → Bool) (k : ℕ) (i : Fin (2 ^ k + 1)) (j : Fin (2 ^ (k + 1) + 1)) (hparent : j.val = 2 * i.val ∨ j.val = 2 * i.val + 1) : |∑ a, (if σ a then (1 : ℝ) else -1) * w a (grid (k + 1) j)| ≤ |∑ a, (if σ a then (1 : ℝ) else -1) * w a (grid k i)| + signedDyadicIncrementMax w grid k σ := by /- In the even case `hgridcompat` identifies the two grid points. In the odd case construct the edge indexed by `2 * i.val` in `Fin (2^(k+1))`. Its `castSucc` is the even child and its `succ` is `j`; apply the triangle inequality and `Finset.le_sup'` to that edge. -/ rcases hparent with hp | hp · have hcompat : grid k i = grid (k + 1) j := by apply hgridcompat simp only [hp] push_cast rw [pow_succ] field_simp rw [← hcompat] exact le_add_of_nonneg_right (by unfold signedDyadicIncrementMax exact (abs_nonneg _).trans (Finset.le_sup' (fun e : Fin (2 ^ (k + 1)) => |∑ a, (if σ a then (1 : ℝ) else -1) * (w a (grid (k + 1) e.succ) - w a (grid (k + 1) e.castSucc))|) (Finset.mem_univ (0 : Fin (2 ^ (k + 1)))))) · have heven : 2 * i.val < 2 ^ (k + 1) := by have hj := j.isLt omega let e : Fin (2 ^ (k + 1)) := ⟨2 * i.val, heven⟩ have hcompat : grid k i = grid (k + 1) e.castSucc := by apply hgridcompat simp only [Fin.val_castSucc] change (i.val : ℝ) / (2 ^ k : ℝ) = (2 * i.val : ℕ) / (2 ^ (k + 1) : ℝ) push_cast rw [pow_succ] field_simp have hj : j = e.succ := Fin.ext hp rw [hj, hcompat] have hsplit : (∑ a, (if σ a then (1 : ℝ) else -1) * w a (grid (k + 1) e.succ)) = (∑ a, (if σ a then (1 : ℝ) else -1) * w a (grid (k + 1) e.castSucc)) + (∑ a, (if σ a then (1 : ℝ) else -1) * (w a (grid (k + 1) e.succ) - w a (grid (k + 1) e.castSucc))) := by rw [← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro a _ ring rw [hsplit] have hedge : |∑ a, (if σ a then (1 : ℝ) else -1) * (w a (grid (k + 1) e.succ) - w a (grid (k + 1) e.castSucc))| ≤ signedDyadicIncrementMax w grid k σ := by unfold signedDyadicIncrementMax exact Finset.le_sup' (fun e : Fin (2 ^ (k + 1)) => |∑ a, (if σ a then (1 : ℝ) else -1) * (w a (grid (k + 1) e.succ) - w a (grid (k + 1) e.castSucc))|) (Finset.mem_univ e) exact (abs_add_le _ _).trans (add_le_add_right hedge _)
    Causalean.Stat.Concentration.BoundedVariation.signed_dyadic_chain_step_le · Causalean/Stat/Concentration/BoundedVariation/ChainingReconstruction.lean:117
  • signed_dyadic_chain_finite_le theorem — Suppose the control u is zero at time zero and dominates the summed squared path increments over every interval, and the dyadic grids place their i-th level-k point at control value i/2^k times the terminal value and are compatible across levels. If a chain of indices, one per level, starts at index 0 and moves from each level to a child at the next, then at every level m the absolute signed path sum at the chain's grid point is at most the absolute signed sum at time zero plus the maximal signed increments of levels 0 through m − 1.
    n :
    ℕ
    w :
    Fin n → Path
    u :
    hzero :
    u timeZero = 0
    henergy :
    ∀ s t : Time
    if
    s ≤ t
    then
    (∑ j, (w j t - w j s) ^ 2) ≤ u t - u s
    grid :
    ∀ k : ℕ
    if
    Fin (2 ^ k + 1)
    then
    hgridval :
    ∀ k i, u (grid k i) = ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne
    hgridcompat :
    ∀ k i l j
    if
    ((i.val : ℝ) / (2 ^ k : ℝ)) = ((j.val : ℝ) / (2 ^ l : ℝ))
    then
    grid k i = grid l j
    i :
    ∀ k : ℕ, Fin (2 ^ k + 1)
    hi0 :
    (i 0).val = 0
    hiparent :
    ∀ k, (i (k + 1)).val = 2 * (i k).val ∨ (i (k + 1)).val = 2 * (i k).val + 1
    σ :
    Fin n → Bool
    m :
    ℕ
    |∑ j, (if σ j then (1 : ℝ) else -1) * w j (grid m (i m))|
    ≤ |∑ j, (if σ j then (1 : ℝ) else -1) * w j timeZero|
    + ∑ k ∈ range m, signedDyadicIncrementMax w grid k σ
    Proof (Lean source)
    theorem signed_dyadic_chain_finite_le {n : ℕ} (w : Fin n → Path) (u : Path) (hzero : u timeZero = 0) (henergy : ∀ s t : Time, s ≤ t → (∑ j, (w j t - w j s) ^ 2) ≤ u t - u s) (grid : ∀ k : ℕ, Fin (2 ^ k + 1) → Time) (hgridval : ∀ k i, u (grid k i) = ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne) (hgridcompat : ∀ k i l j, ((i.val : ℝ) / (2 ^ k : ℝ)) = ((j.val : ℝ) / (2 ^ l : ℝ)) → grid k i = grid l j) (i : ∀ k : ℕ, Fin (2 ^ k + 1)) (hi0 : (i 0).val = 0) (hiparent : ∀ k, (i (k + 1)).val = 2 * (i k).val ∨ (i (k + 1)).val = 2 * (i k).val + 1) (σ : Fin n → Bool) (m : ℕ) : |∑ j, (if σ j then (1 : ℝ) else -1) * w j (grid m (i m))| ≤ |∑ j, (if σ j then (1 : ℝ) else -1) * w j timeZero| + ∑ k ∈ range m, signedDyadicIncrementMax w grid k σ := by /- Induct on m. At level zero, `hgridval` and `hi0` put the grid point on the zero-control plateau, so `controlled_path_eq_of_same_control` identifies its coefficient values with those at timeZero. For the step, `hiparent` and `hgridcompat` identify the parent with the even child; the odd child differs by exactly one adjacent grid increment. -/ have hbase : ∀ j : Fin n, w j (grid 0 (i 0)) = w j timeZero := by have hu : u timeZero = u (grid 0 (i 0)) := by rw [hzero, hgridval] simp [hi0] intro j exact (controlled_path_eq_of_same_control w u henergy timeZero (grid 0 (i 0)) hu j).symm induction m with | zero => have heq : (∑ j, (if σ j then (1 : ℝ) else -1) * w j (grid 0 (i 0))) = ∑ j, (if σ j then (1 : ℝ) else -1) * w j timeZero := by apply Finset.sum_congr rfl intro j _ rw [hbase j] simpa only [Finset.sum_range_zero, add_zero] using le_of_eq (congrArg abs heq) | succ m ih => calc |∑ j, (if σ j then (1 : ℝ) else -1) * w j (grid (m + 1) (i (m + 1)))| ≤ |∑ j, (if σ j then (1 : ℝ) else -1) * w j (grid m (i m))| + signedDyadicIncrementMax w grid m σ := signed_dyadic_chain_step_le w grid hgridcompat σ m (i m) (i (m + 1)) (hiparent m) _ ≤ (|∑ j, (if σ j then (1 : ℝ) else -1) * w j timeZero| + ∑ k ∈ range m, signedDyadicIncrementMax w grid k σ) + signedDyadicIncrementMax w grid m σ := add_le_add ih (le_refl _) _ = _ := by rw [Finset.sum_range_succ]; ring
    Causalean.Stat.Concentration.BoundedVariation.signed_dyadic_chain_finite_le · Causalean/Stat/Concentration/BoundedVariation/ChainingReconstruction.lean:186
  • controlled_grid_coordinate_tendsto theorem — Suppose the control u is nondecreasing, zero at time zero, and dominates the summed squared path increments over every interval, and the dyadic grids place their i-th level-k point at control value i/2^k times the terminal value. If the control at time s equals x times its terminal value and a chain of indices, one per level, brackets x between i_k/2^k and (i_k + 1)/2^k at every level k, then each path coordinate evaluated along the chain's grid points converges to its value at s.
    n :
    ℕ
    w :
    Fin n → Path
    u :
    hmono :
    Monotone (u : Time → ℝ)
    hzero :
    u timeZero = 0
    henergy :
    ∀ s t : Time
    if
    s ≤ t
    then
    (∑ a, (w a t - w a s) ^ 2) ≤ u t - u s
    grid :
    ∀ k : ℕ
    if
    Fin (2 ^ k + 1)
    then
    hgridval :
    ∀ k i, u (grid k i) = ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne
    i :
    ∀ k : ℕ, Fin (2 ^ k + 1)
    s :
    x :
    ℝ
    hx :
    u s = x * u timeOne
    hiapprox :
    ∀ k, (i k).val / (2 ^ k : ℝ) ≤ x ∧ x ≤ ((i k).val + 1) / (2 ^ k : ℝ)
    j :
    Fin n
    Tendsto (fun k => w j (grid k (i k))) atTop (nhds (w j s))
    Proof (Lean source)
    theorem controlled_grid_coordinate_tendsto {n : ℕ} (w : Fin n → Path) (u : Path) (hmono : Monotone (u : Time → ℝ)) (hzero : u timeZero = 0) (henergy : ∀ s t : Time, s ≤ t → (∑ a, (w a t - w a s) ^ 2) ≤ u t - u s) (grid : ∀ k : ℕ, Fin (2 ^ k + 1) → Time) (hgridval : ∀ k i, u (grid k i) = ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne) (i : ∀ k : ℕ, Fin (2 ^ k + 1)) (s : Time) (x : ℝ) (hx : u s = x * u timeOne) (hiapprox : ∀ k, (i k).val / (2 ^ k : ℝ) ≤ x ∧ x ≤ ((i k).val + 1) / (2 ^ k : ℝ)) (j : Fin n) : Tendsto (fun k => w j (grid k (i k))) atTop (nhds (w j s)) := by /- `controlled_path_error_le` bounds the squared coordinate difference by the absolute control gap. Using `hgridval`, `hx`, and `hiapprox`, that gap is at most `u timeOne / 2^k`, which tends to zero. Prove convergence of the absolute difference, then of the coordinate itself. -/ have hU : 0 ≤ u timeOne := by simpa only [hzero] using hmono (show timeZero ≤ timeOne by change (0 : ℝ) ≤ 1; norm_num) have hgap (k : ℕ) : |u (grid k (i k)) - u s| ≤ u timeOne / (2 : ℝ) ^ k := by rcases hiapprox k with ⟨hl, hu⟩ have hpow : (0 : ℝ) < (2 : ℝ) ^ k := by positivity have hq : 0 ≤ x - (i k).val / (2 ^ k : ℝ) ∧ x - (i k).val / (2 ^ k : ℝ) ≤ 1 / (2 ^ k : ℝ) := by constructor · linarith · have heq : (((i k).val : ℝ) + 1) / (2 ^ k : ℝ) = (i k).val / (2 ^ k : ℝ) + 1 / (2 ^ k : ℝ) := by ring rw [heq] at hu linarith calc _ = (x - (i k).val / (2 ^ k : ℝ)) * u timeOne := by rw [hgridval, hx, ← sub_mul, abs_mul, abs_of_nonpos (by linarith [hq.1]), abs_of_nonneg hU] ring _ ≤ (1 / (2 ^ k : ℝ)) * u timeOne := mul_le_mul_of_nonneg_right hq.2 hU _ = u timeOne / (2 : ℝ) ^ k := by ring have hgeom : Tendsto (fun k : ℕ => u timeOne / (2 : ℝ) ^ k) atTop (nhds 0) := by have h := tendsto_pow_atTop_nhds_zero_of_lt_one (show (0 : ℝ) ≤ 1 / 2 by norm_num) (show (1 : ℝ) / 2 < 1 by norm_num) have ht := h.const_mul (u timeOne) simpa [div_eq_mul_inv, ← inv_pow] using ht have hsq (k : ℕ) : (w j (grid k (i k)) - w j s) ^ 2 ≤ u timeOne / (2 : ℝ) ^ k := by calc _ ≤ ∑ a, (w a (grid k (i k)) - w a s) ^ 2 := Finset.single_le_sum (fun a _ => sq_nonneg _) (Finset.mem_univ j) _ ≤ |u (grid k (i k)) - u s| := controlled_path_error_le w u henergy s (grid k (i k)) _ ≤ _ := hgap k have hsqtend : Tendsto (fun k => (w j (grid k (i k)) - w j s) ^ 2) atTop (nhds 0) := tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hgeom (fun k => sq_nonneg _) hsq have habs : Tendsto (fun k => |w j (grid k (i k)) - w j s|) atTop (nhds 0) := by simpa only [Function.comp_def, Real.sqrt_sq_eq_abs, Real.sqrt_zero] using (Real.continuous_sqrt.tendsto 0).comp hsqtend rw [tendsto_iff_norm_sub_tendsto_zero] simpa only [Real.norm_eq_abs] using habs
    Causalean.Stat.Concentration.BoundedVariation.controlled_grid_coordinate_tendsto · Causalean/Stat/Concentration/BoundedVariation/ChainingReconstruction.lean:247
  • signed_dyadic_chain_tendsto theorem — Suppose the control u is nondecreasing, zero at time zero, and dominates the summed squared path increments over every interval, and the dyadic grids place their i-th level-k point at control value i/2^k times the terminal value. If the control at time s equals x times its terminal value and a chain of indices, one per level, brackets x between i_k/2^k and (i_k + 1)/2^k at every level k, then the σ-signed path sums along the chain's grid points converge to the σ-signed sum at s.
    n :
    ℕ
    w :
    Fin n → Path
    u :
    hmono :
    Monotone (u : Time → ℝ)
    hzero :
    u timeZero = 0
    henergy :
    ∀ s t : Time
    if
    s ≤ t
    then
    (∑ j, (w j t - w j s) ^ 2) ≤ u t - u s
    grid :
    ∀ k : ℕ
    if
    Fin (2 ^ k + 1)
    then
    hgridval :
    ∀ k i, u (grid k i) = ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne
    i :
    ∀ k : ℕ, Fin (2 ^ k + 1)
    s :
    x :
    ℝ
    hx :
    u s = x * u timeOne
    hiapprox :
    ∀ k, (i k).val / (2 ^ k : ℝ) ≤ x ∧ x ≤ ((i k).val + 1) / (2 ^ k : ℝ)
    σ :
    Fin n → Bool
    Tendsto (fun k => ∑ j, (if σ j then (1 : ℝ) else -1) * w j (grid k (i k))) atTop (nhds (∑ j, (if σ j then (1 : ℝ) else -1) * w j s))
    Proof (Lean source)
    theorem signed_dyadic_chain_tendsto {n : ℕ} (w : Fin n → Path) (u : Path) (hmono : Monotone (u : Time → ℝ)) (hzero : u timeZero = 0) (henergy : ∀ s t : Time, s ≤ t → (∑ j, (w j t - w j s) ^ 2) ≤ u t - u s) (grid : ∀ k : ℕ, Fin (2 ^ k + 1) → Time) (hgridval : ∀ k i, u (grid k i) = ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne) (i : ∀ k : ℕ, Fin (2 ^ k + 1)) (s : Time) (x : ℝ) (hx : u s = x * u timeOne) (hiapprox : ∀ k, (i k).val / (2 ^ k : ℝ) ≤ x ∧ x ≤ ((i k).val + 1) / (2 ^ k : ℝ)) (σ : Fin n → Bool) : Tendsto (fun k => ∑ j, (if σ j then (1 : ℝ) else -1) * w j (grid k (i k))) atTop (nhds (∑ j, (if σ j then (1 : ℝ) else -1) * w j s)) := by /- The grid-control gap is at most `u(timeOne)/2^k`. Apply `controlled_path_error_le` to every coefficient, then finite-sum continuity and `2^k → ∞`. Equality of control values handles plateaus. -/ classical have hj (j : Fin n) : Tendsto (fun k => (if σ j then (1 : ℝ) else -1) * w j (grid k (i k))) atTop (nhds ((if σ j then (1 : ℝ) else -1) * w j s)) := (controlled_grid_coordinate_tendsto w u hmono hzero henergy grid hgridval i s x hx hiapprox j).const_mul _ simpa using (tendsto_finsetSum (Finset.univ : Finset (Fin n)) (fun j _ => hj j))
    Causalean.Stat.Concentration.BoundedVariation.signed_dyadic_chain_tendsto · Causalean/Stat/Concentration/BoundedVariation/ChainingReconstruction.lean:329
  • control_value_unit_fraction theorem — If a control path is nondecreasing and zero at time zero, then its value at any time s equals x times its terminal value for some x between 0 and 1.
    u :
    hmono :
    Monotone (u : Time → ℝ)
    hzero :
    u timeZero = 0
    s :
    ∃ x : ℝ,
    conclusion 1
    0 ≤ x
    conclusion 2
    x ≤ 1
    conclusion 3
    u s = x * u timeOne
    Proof (Lean source)
    theorem control_value_unit_fraction (u : Path) (hmono : Monotone (u : Time → ℝ)) (hzero : u timeZero = 0) (s : Time) : ∃ x : ℝ, 0 ≤ x ∧ x ≤ 1 ∧ u s = x * u timeOne := by have h0s : 0 ≤ u s := by have hts : timeZero ≤ s := by change (0 : ℝ) ≤ (s : ℝ) exact s.property.1 simpa only [hzero] using hmono hts have hs1 : u s ≤ u timeOne := hmono s.property.2 by_cases hU : u timeOne = 0 · refine ⟨0, by norm_num, by norm_num, ?_⟩ simp [hU, le_antisymm (by simpa [hU] using hs1) h0s] · have hUpos : 0 < u timeOne := lt_of_le_of_ne (h0s.trans hs1) (Ne.symm hU) refine ⟨u s / u timeOne, div_nonneg h0s hUpos.le, ?_, ?_⟩ · exact (div_le_iff₀ hUpos).2 (by simpa using hs1) · exact (div_mul_cancel₀ (u s) hU).symm
    Causalean.Stat.Concentration.BoundedVariation.control_value_unit_fraction · Causalean/Stat/Concentration/BoundedVariation/ChainingReconstruction.lean:371
Finite­Sign­Max 2 core · 0 supporting A logarithmic finite-class bound follows from the sign exponential moment. ★ signMaxEnergy_le

Maximum of finitely many signed sums

A logarithmic finite-class bound follows from the sign exponential moment. This is an intermediate estimate for dyadic chaining, where class size grows geometrically and increment variance decays geometrically.

def signMaxEnergy reviewed
Causalean.Stat.Concentration.BoundedVariation

The sign-maximum energy of a nonempty finite collection of coefficient vectors in ℝ^n is the uniform average, over all 2^n sign patterns, of the largest squared signed sum among the vectors.

Definition (Lean source)
m n :
ℕ
a :
Fin (m + 1) → Fin n → ℝ
signMaxEnergy a :
ℝ
(∑ σ : Fin n → Bool, Finset.univ.sup' univ_nonempty (fun k : Fin (m + 1) => (∑ j, (if σ j then (1 : ℝ) else -1) * a k j) ^ 2)) / (2 ^ n : ℝ)
Causalean.Stat.Concentration.BoundedVariation.signMaxEnergy · Causalean/Stat/Concentration/BoundedVariation/FiniteSignMax.lean:171
theorem signMaxEnergy_le reviewed
Causalean.Stat.Concentration.BoundedVariation

For m + 1 coefficient vectors in ℝ^n, the sign-average of the largest squared Rademacher sum is at most 32 (1 + log(m + 1)) times the largest squared Euclidean norm of the vectors.

Formal statement
m n :
ℕ
a :
Fin (m + 1) → Fin n → ℝ
≤ 32 * (1 + log (m + 1)) * Finset.univ.sup' univ_nonempty (fun k : Fin (m + 1) => ∑ j, (a k j) ^ 2)
Proof (Lean source)
theorem signMaxEnergy_le {m n : ℕ} (a : Fin (m + 1) → Fin n → ℝ) : signMaxEnergy a ≤ 32 * (1 + log (m + 1)) * Finset.univ.sup' univ_nonempty (fun k : Fin (m + 1) => ∑ j, (a k j) ^ 2) := by change (∑ σ : Fin n → Bool, Finset.univ.sup' univ_nonempty (fun k : Fin (m + 1) => (∑ j, (if σ j then (1 : ℝ) else -1) * a k j) ^ 2)) / (2 ^ n : ℝ) ≤ 32 * (1 + log (m + 1)) * Finset.univ.sup' univ_nonempty (fun k : Fin (m + 1) => ∑ j, (a k j) ^ 2) classical let V : ℝ := Finset.univ.sup' univ_nonempty (fun k : Fin (m + 1) => ∑ j, (a k j) ^ 2) let D : ℝ := (2 ^ n : ℝ) let M : ℝ := (m + 1 : ℝ) let Y : (Fin n → Bool) → ℝ := fun σ => Finset.univ.sup' univ_nonempty (fun k : Fin (m + 1) => (∑ j, (if σ j then (1 : ℝ) else -1) * a k j) ^ 2) have hV_nonneg : 0 ≤ V := by have h := Finset.le_sup' (fun k : Fin (m + 1) => ∑ j, (a k j) ^ 2) (by simp : (0 : Fin (m + 1)) ∈ univ) dsimp [V] exact le_trans (by positivity) h have hY_nonneg (σ : Fin n → Bool) : 0 ≤ Y σ := by have h := Finset.le_sup' (fun k : Fin (m + 1) => (∑ j, (if σ j then (1 : ℝ) else -1) * a k j) ^ 2) (by simp : (0 : Fin (m + 1)) ∈ univ) exact le_trans (sq_nonneg _) h have hD : 0 < D := by dsimp [D]; positivity have hM : 1 ≤ M := by dsimp [M]; exact_mod_cast Nat.succ_le_succ (zero_le m) by_cases hV0 : V = 0 · have ha0 (k : Fin (m + 1)) (j : Fin n) : a k j = 0 := by have hVk_le : (∑ j, (a k j) ^ 2) ≤ V := by dsimp [V] exact Finset.le_sup' (fun k : Fin (m + 1) => ∑ j, (a k j) ^ 2) (by simp : k ∈ univ) have hVk0 : (∑ j, (a k j) ^ 2) = 0 := by have hnonneg : 0 ≤ (∑ j, (a k j) ^ 2) := by positivity linarith have hsq : (a k j) ^ 2 = 0 := (Finset.sum_eq_zero_iff_of_nonneg (fun j _ => sq_nonneg (a k j))).mp hVk0 j (by simp) nlinarith simp [ha0] · have hV : 0 < V := lt_of_le_of_ne hV_nonneg (Ne.symm hV0) let T : ℝ := 2 * V * log (2 * M) let E : (Fin n → Bool) → ℝ := fun σ => max (Y σ - T) 0 have h2M : 0 < 2 * M := by positivity have hlog2M : 0 ≤ log (2 * M) := Real.log_nonneg (by nlinarith) have hT : 0 ≤ T := by dsimp [T]; positivity have hE_nonneg (σ : Fin n → Bool) : 0 ≤ E σ := le_max_right _ _ have hE_tail (t : ℝ) (ht : 0 < t) : (∑ σ : Fin n → Bool, if t ≤ E σ then (1 : ℝ) else 0) ≤ D * exp (-(1 / (2 * V)) * t) := by have hiff (σ : Fin n → Bool) : (t ≤ E σ) ↔ (T + t ≤ Y σ) := by dsimp [E] constructor · intro h rcases le_max_iff.mp h with h | h · linarith · linarith · intro h exact le_trans (by linarith : t ≤ Y σ - T) (le_max_left _ _) have hsumEq : (∑ σ : Fin n → Bool, if t ≤ E σ then (1 : ℝ) else 0) = ∑ σ : Fin n → Bool, if T + t ≤ Y σ then (1 : ℝ) else 0 := by apply Finset.sum_congr rfl intro σ _ simp only [hiff] have hraw := maxSqTail_le a V hV rfl (T + t) (by linarith) change (∑ σ : Fin n → Bool, if T + t ≤ Y σ then (1 : ℝ) else 0) ≤ D * (2 * M * exp (-((T + t) / (2 * V)))) at hraw have harg : -((T + t) / (2 * V)) = -log (2 * M) + (-(1 / (2 * V)) * t) := by dsimp [T] field_simp ring have hexp : 2 * M * exp (-((T + t) / (2 * V))) = exp (-(1 / (2 * V)) * t) := by rw [harg, Real.exp_add, Real.exp_neg, Real.exp_log h2M] field_simp rw [hexp] at hraw rw [hsumEq] exact hraw have hE_sum : (∑ σ : Fin n → Bool, E σ) ≤ D * (2 * V) := by have h := finite_tail_integral E (1 / (2 * V)) D (by positivity) hD.le hE_nonneg hE_tail convert h using 1 field_simp have hYsum : (∑ σ : Fin n → Bool, Y σ) ≤ D * T + ∑ σ, E σ := by calc (∑ σ : Fin n → Bool, Y σ) ≤ ∑ σ : Fin n → Bool, (T + E σ) := by apply Finset.sum_le_sum intro σ _ have h := le_max_left (Y σ - T) (0 : ℝ) dsimp [E] linarith _ = D * T + ∑ σ, E σ := by simp [Finset.sum_add_distrib, D] have hlogM : 0 ≤ log M := Real.log_nonneg hM have hlog2 : log (2 : ℝ) ≤ 1 := by have h := Real.log_le_sub_one_of_pos (by norm_num : (0 : ℝ) < 2) norm_num at h exact h have hlog : log (2 * M) = log 2 + log M := Real.log_mul (by norm_num : (2 : ℝ) ≠ 0) (ne_of_gt (lt_of_lt_of_le (by norm_num : (0 : ℝ) < 1) hM)) change (∑ σ : Fin n → Bool, Y σ) / D ≤ 32 * (1 + log M) * V calc (∑ σ, Y σ) / D ≤ (D * T + ∑ σ, E σ) / D := div_le_div_of_nonneg_right hYsum hD.le _ ≤ (D * T + D * (2 * V)) / D := by apply div_le_div_of_nonneg_right _ hD.le linarith _ = T + 2 * V := by field_simp _ ≤ 32 * (1 + log M) * V := by dsimp [T] rw [hlog] nlinarith [mul_nonneg hV.le hlogM]
Causalean.Stat.Concentration.BoundedVariation.signMaxEnergy_le · Causalean/Stat/Concentration/BoundedVariation/FiniteSignMax.lean:183 · uses signMaxEnergy
Clipped­Polynomial 3 core · 5 supporting A finite linear combination of deterministic continuous coefficient paths, with random scalar factorial monomials, yields a continuous path. ★ clippedFinitePath_sq_integral_le

Clipped finite factorial-polynomial paths

A finite linear combination of deterministic continuous coefficient paths, with random scalar factorial monomials, yields a continuous path. If the coefficients have bounded variation and the monomials have finite second moments, clipping preserves bounded variation and gives an integrable squared path size. Independence follows from disjoint measurable coordinate blocks.

def scalarClip reviewed
Causalean.Stat.Concentration.BoundedVariation

A clipping radius and a scalar value x determine the value x clipped to the symmetric interval from minus the radius to the radius, that is, the smaller of the radius and the larger of minus the radius and x.

Definition (Lean source)
cap x :
ℝ
scalarClip cap x :
ℝ
min cap (max (-cap) x)
Causalean.Stat.Concentration.BoundedVariation.scalarClip · Causalean/Stat/Concentration/BoundedVariation/ClippedPolynomial.lean:24
def clippedFinitePath reviewed
Causalean.Stat.Concentration.BoundedVariation

Finitely many coefficient paths c_a, random scalar coefficients X_a, a clipping radius, and a sample point ω determine the clipped continuous path sending each time t to the finite sum Σ_a X_a(ω)·c_a(t), clipped to the symmetric interval of that radius.

Definition (Lean source)
ι Ω :
Type*
c :
ι → Path
X :
Ω → ι → ℝ
cap :
ℝ
ω :
Ω
clippedFinitePath c X cap ω :
⟨fun t => scalarClip cap (∑ a, X ω a * c a t), continuous_clipped_finite_sum c (X ω) cap⟩
Causalean.Stat.Concentration.BoundedVariation.clippedFinitePath · Causalean/Stat/Concentration/BoundedVariation/ClippedPolynomial.lean:103 · uses Path
theorem clippedFinitePath_sq_integral_le reviewed
Causalean.Stat.Concentration.BoundedVariation

Under a probability measure, take finitely many coefficient paths c_a, random scalar coefficients X_a, and a clip radius with the radius nonnegative, every coefficient path of finite total variation, and the scalar coefficients measurable and square integrable. Then the squared size of the clipped path t ↦ clip(Σ_a X_a·c_a(t)) is integrable, and its expectation is at most (Σ_a size(c_a)²)·(Σ_a E[X_a²]), where the size of a path is its supremum norm plus its total variation.

Formal statement
ι Ω :
c :
ι → Path
X :
Ω → ι → ℝ
cap :
ℝ
hcap :
0 ≤ cap
hBV :
∀ a, eVariationOn (c a) univ < ⊤
hXmeas :
∀ a, Measurable (fun ω => X ω a)
hXsq :
∀ a, Integrable (fun ω => (X ω a) ^ 2) μ
conclusion 1
Integrable (fun ω => (pathSize (clippedFinitePath c X cap ω)) ^ 2) μ
conclusion 2
(∫ ω, (pathSize (clippedFinitePath c X cap ω)) ^ 2 ∂μ)
≤ (∑ a, (pathSize (c a)) ^ 2) * ∑ a, (∫ ω, (X ω a) ^ 2 ∂μ)
Proof (Lean source)
theorem clippedFinitePath_sq_integral_le {ι Ω : Type*} [Fintype ι] [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (c : ι → Path) (X : Ω → ι → ℝ) (cap : ℝ) (hcap : 0 ≤ cap) (hBV : ∀ a, eVariationOn (c a) univ < ⊤) (hXmeas : ∀ a, Measurable (fun ω => X ω a)) (hXsq : ∀ a, Integrable (fun ω => (X ω a) ^ 2) μ) : Integrable (fun ω => (pathSize (clippedFinitePath c X cap ω)) ^ 2) μ ∧ (∫ ω, (pathSize (clippedFinitePath c X cap ω)) ^ 2 ∂μ) ≤ (∑ a, (pathSize (c a)) ^ 2) * ∑ a, (∫ ω, (X ω a) ^ 2 ∂μ) := by let K : ℝ := ∑ a, (pathSize (c a)) ^ 2 let S (ω : Ω) : ℝ := ∑ a, (X ω a) ^ 2 let Y (ω : Ω) : ℝ := (pathSize (clippedFinitePath c X cap ω)) ^ 2 have hK : 0 ≤ K := Finset.sum_nonneg (fun a _ => sq_nonneg _) have hYmeas : Measurable Y := by let : BorelSpace Path := ⟨rfl⟩ have hm := measurable_clippedFinitePath c X hXmeas cap unfold Y pathSize exact ((continuous_norm.measurable.comp hm).add (measurable_pathTV.comp hm)).pow_const 2 have hSint : Integrable S μ := by unfold S exact integrable_finsetSum _ (fun a _ => hXsq a) have hdomint : Integrable (fun ω => K * S ω) μ := hSint.const_mul K have hpoint (ω : Ω) : Y ω ≤ K * S ω := by have hsize := clippedFinitePath_pathSize_le c X cap hcap hBV ω have hcs := Finset.sum_mul_sq_le_sq_mul_sq univ (fun a => |X ω a|) (fun a => pathSize (c a)) have hsum : 0 ≤ ∑ a, |X ω a| * pathSize (c a) := Finset.sum_nonneg (fun a _ => mul_nonneg (abs_nonneg _) (pathSize_nonneg _)) have hsq := (sq_le_sq₀ (pathSize_nonneg _) hsum).mpr hsize dsimp [Y, K, S] calc (pathSize (clippedFinitePath c X cap ω)) ^ 2 ≤ (∑ a, |X ω a| * pathSize (c a)) ^ 2 := hsq _ ≤ (∑ a, |X ω a| ^ 2) * ∑ a, (pathSize (c a)) ^ 2 := hcs _ = (∑ a, (pathSize (c a)) ^ 2) * ∑ a, (X ω a) ^ 2 := by simp only [sq_abs] ring have hYint : Integrable Y μ := by apply Integrable.mono' hdomint hYmeas.aestronglyMeasurable filter_upwards [] with ω rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] exact hpoint ω constructor · exact hYint · calc ∫ ω, Y ω ∂μ ≤ ∫ ω, K * S ω ∂μ := integral_mono hYint hdomint hpoint _ = K * ∑ a, (∫ ω, (X ω a) ^ 2 ∂μ) := by rw [integral_const_mul, integral_finsetSum _ (fun a _ => hXsq a)]
Causalean.Stat.Concentration.BoundedVariation.clippedFinitePath_sq_integral_le · Causalean/Stat/Concentration/BoundedVariation/ClippedPolynomial.lean:184 · uses Path , Time , clippedFinitePath , pathSize
5 supporting declarations (lemmas, instances)
Conditional­Average 1 core · 1 supporting For a finite auxiliary experiment, a conditional average is a finite weighted sum of continuous paths. ★ finite_conditional_path_risk_le

Finite conditional averages of continuous paths

For a finite auxiliary experiment, a conditional average is a finite weighted sum of continuous paths. Convexity of squared uniform norm gives a pointwise inequality and therefore contracts its expected squared path risk.

theorem finite_conditional_path_risk_le reviewed
Causalean.Stat.Concentration.BoundedVariation

Under a probability law, measurable nonnegative auxiliary weights that sum to one, measurable continuous paths, and an integrable weighted squared-path cost, the expected squared supremum norm of the weighted average path Σ_a w_a(x)·Z_a(x) is at most the expected weighted average Σ_a w_a(x)·‖Z_a(x)‖² of the squared supremum norms: finite conditional averaging contracts expected squared supremum risk.

Formal statement
X A :
weight :
X → A → ℝ
hw_nonneg :
∀ x a, 0 ≤ weight x a
hw_sum :
∀ x, ∑ a, weight x a = 1
hw_meas :
∀ a, Measurable (fun x => weight x a)
Z :
X → A → Path
hZ_meas :
∀ a, Measurable (fun x => Z x a)
hcost :
Integrable (fun x => ∑ a, weight x a * ‖Z x a‖ ^ 2) μ
(∫ x, ‖∑ a, weight x a • Z x a‖ ^ 2 ∂μ) ≤ ∫ x, ∑ a, weight x a * ‖Z x a‖ ^ 2 ∂μ
Proof (Lean source)
-- The observation space may be infinite (in particular, a table of Poisson -- counts). Prove measurability of the finite weighted sum from `hw_meas` and -- `hZ_meas`. Pointwise Jensen gives domination by the integrable right side; -- derive left integrability using this domination and apply `integral_mono`. theorem finite_conditional_path_risk_le {X A : Type*} [Fintype A] [MeasurableSpace X] (μ : Measure X) [IsProbabilityMeasure μ] (weight : X → A → ℝ) (hw_nonneg : ∀ x a, 0 ≤ weight x a) (hw_sum : ∀ x, ∑ a, weight x a = 1) (hw_meas : ∀ a, Measurable (fun x => weight x a)) (Z : X → A → Path) (hZ_meas : ∀ a, Measurable (fun x => Z x a)) (hcost : Integrable (fun x => ∑ a, weight x a * ‖Z x a‖ ^ 2) μ) : (∫ x, ‖∑ a, weight x a • Z x a‖ ^ 2 ∂μ) ≤ ∫ x, ∑ a, weight x a * ‖Z x a‖ ^ 2 ∂μ := by let : BorelSpace Path := ⟨rfl⟩ have hpath : Measurable (fun x => ∑ a, weight x a • Z x a) := by have hsum : StronglyMeasurable (∑ a, fun x : X => weight x a • Z x a) := by apply Finset.stronglyMeasurable_sum intro a ha exact (hw_meas a).stronglyMeasurable.smul (hZ_meas a).stronglyMeasurable convert hsum.measurable using 1 ext x simp have hleft : Measurable (fun x => ‖∑ a, weight x a • Z x a‖ ^ 2) := hpath.norm.pow_const 2 have hpoint (x : X) : ‖∑ a, weight x a • Z x a‖ ^ 2 ≤ ∑ a, weight x a * ‖Z x a‖ ^ 2 := finite_path_average_sq_norm_le (weight x) (hw_nonneg x) (hw_sum x) (Z x) have hleft_int : Integrable (fun x => ‖∑ a, weight x a • Z x a‖ ^ 2) μ := hcost.mono_nonneg hleft.aestronglyMeasurable (Filter.Eventually.of_forall (fun x => sq_nonneg _)) (Filter.Eventually.of_forall hpoint) exact integral_mono hleft_int hcost hpoint
Causalean.Stat.Concentration.BoundedVariation.finite_conditional_path_risk_le · Causalean/Stat/Concentration/BoundedVariation/ConditionalAverage.lean:37 · uses Path , Time , instMeasurableSpacePath
1 supporting declaration (lemmas, instances)
  • finite_path_average_sq_norm_le theorem — Nonnegative finite weights summing to one and continuous paths give a squared-supremum Jensen inequality for their weighted average.
    A :
    Type*
    weight :
    A → ℝ
    hw_nonneg :
    ∀ a, 0 ≤ weight a
    hw_sum :
    ∑ a, weight a = 1
    Z :
    A → Path
    ‖∑ a, weight a • Z a‖ ^ 2 ≤ ∑ a, weight a * ‖Z a‖ ^ 2
    Proof (Lean source)
    -- Apply finite Jensen to `ConvexOn ℝ univ (fun z : Path => ‖z‖^2)`; -- `convexOn_univ_norm` and `.pow` establish the convexity premise. theorem finite_path_average_sq_norm_le {A : Type*} [Fintype A] (weight : A → ℝ) (hw_nonneg : ∀ a, 0 ≤ weight a) (hw_sum : ∑ a, weight a = 1) (Z : A → Path) : ‖∑ a, weight a • Z a‖ ^ 2 ≤ ∑ a, weight a * ‖Z a‖ ^ 2 := by have hconv : ConvexOn ℝ univ (fun z : Path => ‖z‖ ^ 2) := by have hnorm : ConvexOn ℝ univ (norm : Path → ℝ) := convexOn_univ_norm convert hnorm.pow (fun z _ => norm_nonneg z) 2 using 1 <;> rfl simpa only [Finset.sum_smul, smul_eq_mul] using hconv.map_sum_le (t := univ) (w := weight) (p := Z) (fun a _ => hw_nonneg a) (by simpa using hw_sum) (fun _ _ => Set.mem_univ _)
    Causalean.Stat.Concentration.BoundedVariation.finite_path_average_sq_norm_le · Causalean/Stat/Concentration/BoundedVariation/ConditionalAverage.lean:21
Control­Quantiles 1 core · 0 supporting A continuous nondecreasing control on the unit interval has a monotone section over its range. ★ exists_monotone_control_section

Quantiles of a continuous variation control

A continuous nondecreasing control on the unit interval has a monotone section over its range. Dyadic points in that range therefore have consistent representatives even when the control has flat intervals.

theorem exists_monotone_control_section reviewed
Causalean.Stat.Concentration.BoundedVariation

If a continuous control path on the unit interval is nondecreasing and zero at time zero, then every level between zero and its terminal value is attained at some time, and these representative times can be chosen increasing in the level.

Formal statement
u :
hmono :
Monotone (u : Time → ℝ)
hzero :
u timeZero = 0
∃ q : Icc (0 : ℝ) (u timeOne) → Time,
conclusion 1
x :
u (q x) = x.1
conclusion 2
Proof (Lean source)
theorem exists_monotone_control_section (u : Path) (hmono : Monotone (u : Time → ℝ)) (hzero : u timeZero = 0) : ∃ q : Icc (0 : ℝ) (u timeOne) → Time, (∀ x, u (q x) = x.1) ∧ Monotone q := by /- The intermediate value theorem makes u surjective onto [0,u(1)]. Choose one preimage for each level. Any choices at distinct levels are automatically ordered by monotonicity of u. A repeated dyadic level is literally the same argument of q, so plateaus cause no inconsistency. -/ have h01 : timeZero ≤ timeOne := by change (0 : ℝ) ≤ 1 norm_num have hpreimage (x : Icc (0 : ℝ) (u timeOne)) : ∃ t : Time, u t = x.1 := by have hx : x.1 ∈ Icc (u timeZero) (u timeOne) := by simpa only [hzero] using x.property obtain ⟨t, _, ht⟩ := intermediate_value_Icc h01 u.continuous.continuousOn hx exact ⟨t, ht⟩ choose q hq using hpreimage refine ⟨q, hq, ?_⟩ intro x y hxy by_contra! hgt have hyx : y.1 ≤ x.1 := by rw [← hq x, ← hq y] exact hmono hgt.le have hxy' : x = y := Subtype.ext (le_antisymm hxy hyx) subst y exact (lt_irrefl _) hgt
Causalean.Stat.Concentration.BoundedVariation.exists_monotone_control_section · Causalean/Stat/Concentration/BoundedVariation/ControlQuantiles.lean:16 · uses Path , Time , timeOne , timeZero
Copy­Jensen 1 core · 0 supporting The squared norm of a centered finite sum of Bochner-integrable paths is bounded by the expected squared norm of its difference from an independent copy. ★ centered_path_sum_energy_le_copy

Independent-copy Jensen reduction for path sums

The squared norm of a centered finite sum of Bochner-integrable paths is bounded by the expected squared norm of its difference from an independent copy. Independence among the summands is not needed for this reduction.

theorem centered_path_sum_energy_le_copy reviewed
Causalean.Stat.Concentration.BoundedVariation

For finitely many random continuous paths that are Bochner-integrable and have integrable squared supremum norm, the expected squared supremum norm of the centered sum of the paths is at most the expected squared supremum norm of the summed differences between two independent draws of the paths.

Formal statement
Ω :
n :
ℕ
W :
Fin n → Ω → Path
hWint :
∀ j, Integrable (W j) μ
hWsq :
∀ j, Integrable (fun ω => ‖W j ω‖ ^ 2) μ
(∫ ω, ‖∑ j, (W j ω - ∫ x, W j x ∂μ)‖ ^ 2 ∂μ)
≤ ∫ ω, ∫ ω', ‖∑ j, (W j ω - W j ω')‖ ^ 2 ∂μ ∂μ
Proof (Lean source)
theorem centered_path_sum_energy_le_copy {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] {n : ℕ} (W : Fin n → Ω → Path) (hWint : ∀ j, Integrable (W j) μ) (hWsq : ∀ j, Integrable (fun ω => ‖W j ω‖ ^ 2) μ) : (∫ ω, ‖∑ j, (W j ω - ∫ x, W j x ∂μ)‖ ^ 2 ∂μ) ≤ ∫ ω, ∫ ω', ‖∑ j, (W j ω - W j ω')‖ ^ 2 ∂μ ∂μ := by /- For fixed ω, the centered sum is the Bochner mean over ω' of the difference. Apply convexity/Jensen for the squared norm, then integrate in ω. Derive product integrability from the individual second moments. -/ let S : Ω → Path := fun ω => ∑ j, W j ω have hSi : Integrable S μ := by simpa [S] using integrable_finsetSum (Finset.univ : Finset (Fin n)) (fun j _ => hWint j) have hS2 : Integrable (fun ω => ‖S ω‖ ^ 2) μ := by apply (memLp_two_iff_integrable_sq_norm hSi.aestronglyMeasurable).mp have hj : ∀ j, MemLp (W j) 2 μ := fun j => (memLp_two_iff_integrable_sq_norm (hWint j).aestronglyMeasurable).mpr (hWsq j) simpa [S] using memLp_finsetSum (Finset.univ : Finset (Fin n)) (fun j _ => hj j) have hD2 : Integrable (fun p : Ω × Ω => ‖S p.1 - S p.2‖ ^ 2) (μ.prod μ) := by have hDm : AEStronglyMeasurable (fun p : Ω × Ω => S p.1 - S p.2) (μ.prod μ) := by exact AEStronglyMeasurable.sub (AEStronglyMeasurable.comp_fst hSi.aestronglyMeasurable) (AEStronglyMeasurable.comp_snd hSi.aestronglyMeasurable) apply (memLp_two_iff_integrable_sq_norm hDm).mp have h1 : MemLp (fun p : Ω × Ω => S p.1) 2 (μ.prod μ) := (memLp_two_iff_integrable_sq_norm (AEStronglyMeasurable.comp_fst hSi.aestronglyMeasurable)).mpr (Integrable.comp_fst hS2 μ) have h2 : MemLp (fun p : Ω × Ω => S p.2) 2 (μ.prod μ) := (memLp_two_iff_integrable_sq_norm (AEStronglyMeasurable.comp_snd hSi.aestronglyMeasurable)).mpr (Integrable.comp_snd hS2 μ) change MemLp ((fun p : Ω × Ω => S p.1) - (fun p : Ω × Ω => S p.2)) 2 (μ.prod μ) exact h1.sub h2 have hRi : Integrable (fun ω => ∫ ω', ‖S ω - S ω'‖ ^ 2 ∂μ) μ := by exact hD2.integral_prod_left have hconv : ConvexOn ℝ univ (fun x : Path => ‖x‖ ^ 2) := by change ConvexOn ℝ univ ((norm : Path → ℝ) ^ 2) exact (convexOn_univ_norm : ConvexOn ℝ univ (norm : Path → ℝ)).pow (by intro x hx; exact norm_nonneg x) 2 have hpoint (ω : Ω) : ‖S ω - ∫ x, S x ∂μ‖ ^ 2 ≤ ∫ ω', ‖S ω - S ω'‖ ^ 2 ∂μ := by have hDi : Integrable (fun ω' => S ω - S ω') μ := (integrable_const _).sub hSi have hDi2 : Integrable (fun ω' => ‖S ω - S ω'‖ ^ 2) μ := by apply (memLp_two_iff_integrable_sq_norm hDi.aestronglyMeasurable).mp change MemLp ((fun _ : Ω => S ω) - S) 2 μ exact (memLp_const (S ω)).sub ((memLp_two_iff_integrable_sq_norm hSi.aestronglyMeasurable).mpr hS2) have hj := hconv.map_integral_le (by fun_prop) isClosed_univ (by simp) hDi (by simpa [Function.comp_def] using hDi2) simpa [integral_sub (integrable_const _) hSi, IsProbabilityMeasure.measure_univ] using hj have hCi : Integrable (fun ω => ‖S ω - ∫ x, S x ∂μ‖ ^ 2) μ := by have hC : Integrable (fun ω => S ω - ∫ x, S x ∂μ) μ := hSi.sub (integrable_const _) apply (memLp_two_iff_integrable_sq_norm hC.aestronglyMeasurable).mp change MemLp (S - fun _ : Ω => ∫ x, S x ∂μ) 2 μ exact ((memLp_two_iff_integrable_sq_norm hSi.aestronglyMeasurable).mpr hS2).sub (memLp_const (∫ x, S x ∂μ)) have hmain := integral_mono hCi hRi hpoint simpa only [S, integral_finsetSum (Finset.univ : Finset (Fin n)) (fun j _ => hWint j), Finset.sum_sub_distrib] using hmain
Causalean.Stat.Concentration.BoundedVariation.centered_path_sum_energy_le_copy · Causalean/Stat/Concentration/BoundedVariation/CopyJensen.lean:21 · uses Path , Time
Copy­Signs 1 core · 0 supporting The differences between an independent finite family of paths and a product copy have the same joint law after any fixed coordinatewise sign reversal. ★ independent_copy_difference_energy_eq_sign_energy

Sign symmetry of independent path differences

The differences between an independent finite family of paths and a product copy have the same joint law after any fixed coordinatewise sign reversal. Consequently their squared sum energy equals their averaged signed energy.

theorem independent_copy_difference_energy_eq_sign_energy reviewed
Causalean.Stat.Concentration.BoundedVariation

For finitely many random continuous paths that are measurable, have integrable squared supremum norm, and are mutually independent, the expected squared supremum norm of the summed differences between two independent draws equals the expected Rademacher energy (sign-averaged squared supremum norm) of those differences.

Formal statement
Ω :
n :
ℕ
W :
Fin n → Ω → Path
hWmeas :
∀ j, Measurable (W j)
hWsq :
∀ j, Integrable (fun ω => ‖W j ω‖ ^ 2) μ
hind :
iIndepFun W μ
(∫ ω, ∫ ω', ‖∑ j, (W j ω - W j ω')‖ ^ 2 ∂μ ∂μ)
= ∫ ω, ∫ ω', rademacherEnergy (fun j => W j ω - W j ω') ∂μ ∂μ
Proof (Lean source)
theorem independent_copy_difference_energy_eq_sign_energy {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] {n : ℕ} (W : Fin n → Ω → Path) (hWmeas : ∀ j, Measurable (W j)) (hWsq : ∀ j, Integrable (fun ω => ‖W j ω‖ ^ 2) μ) (hind : iIndepFun W μ) : (∫ ω, ∫ ω', ‖∑ j, (W j ω - W j ω')‖ ^ 2 ∂μ ∂μ) = ∫ ω, ∫ ω', rademacherEnergy (fun j => W j ω - W j ω') ∂μ ∂μ := by /- Under the product-copy law, the pairs `(W_j,W'_j)` are independent across j. Swapping the two entries in any subset of pairs preserves the law, and reverses exactly those difference signs. Average the resulting equalities over all Boolean sign vectors. Apply `independent_copy_difference_map_sign_invariant` to the measurable squared-norm-of-sum function, convert product integrals to iterated integrals, then commute the finite sign sum with the integral. The second-moment assumptions justify the integrals and finite averaging. -/ classical let : BorelSpace Path := ⟨rfl⟩ let D : Ω × Ω → Fin n → Path := fun p j => W j p.1 - W j p.2 let F : (Fin n → Path) → ℝ := fun w => ‖∑ j, w j‖ ^ 2 let G : (Fin n → Bool) → Ω × Ω → ℝ := fun σ p => ‖∑ j, (if σ j then (1 : ℝ) else -1) • D p j‖ ^ 2 have hDm : Measurable D := by apply measurable_pi_iff.mpr intro j exact ((hWmeas j).comp measurable_fst).sub ((hWmeas j).comp measurable_snd) have hFm : Measurable F := by unfold F fun_prop have hGm (σ : Fin n → Bool) : Measurable (G σ) := by unfold G fun_prop have hDLp (j : Fin n) : MemLp (fun p : Ω × Ω => D p j) 2 (μ.prod μ) := by have h1 : MemLp (fun p : Ω × Ω => W j p.1) 2 (μ.prod μ) := (memLp_two_iff_integrable_sq_norm (AEStronglyMeasurable.comp_fst (hWmeas j).aestronglyMeasurable)).mpr (Integrable.comp_fst (hWsq j) μ) have h2 : MemLp (fun p : Ω × Ω => W j p.2) 2 (μ.prod μ) := (memLp_two_iff_integrable_sq_norm (AEStronglyMeasurable.comp_snd (hWmeas j).aestronglyMeasurable)).mpr (Integrable.comp_snd (hWsq j) μ) exact h1.sub h2 have hDj (j : Fin n) : Measurable (fun p : Ω × Ω => D p j) := (measurable_pi_apply j).comp hDm have hDsq (j : Fin n) : Integrable (fun p : Ω × Ω => ‖D p j‖ ^ 2) (μ.prod μ) := (memLp_two_iff_integrable_sq_norm (hDj j).aestronglyMeasurable).mp (hDLp j) have hnegm (j : Fin n) : Measurable (fun p : Ω × Ω => -D p j) := by convert (hDj j).neg using 1 funext p rfl have hnegLp (j : Fin n) : MemLp (fun p : Ω × Ω => -D p j) 2 (μ.prod μ) := by apply (memLp_two_iff_integrable_sq_norm (hnegm j).aestronglyMeasurable).mpr simpa only [norm_neg] using hDsq j have hGLp (σ : Fin n → Bool) : MemLp (fun p => ∑ j, (if σ j then (1 : ℝ) else -1) • D p j) 2 (μ.prod μ) := by apply memLp_finsetSum (Finset.univ : Finset (Fin n)) intro j hj by_cases hs : σ j · simpa [hs] using hDLp j · simpa [hs] using hnegLp j have hGi (σ : Fin n → Bool) : Integrable (G σ) (μ.prod μ) := by exact (memLp_two_iff_integrable_sq_norm (show AEStronglyMeasurable (fun p => ∑ j, (if σ j then (1 : ℝ) else -1) • D p j) (μ.prod μ) by fun_prop)).mp (hGLp σ) have hFi : Integrable (F ∘ D) (μ.prod μ) := by convert hGi (fun _ => true) using 1 funext p simp only [F, G, Function.comp_apply, if_true, one_smul] have hsign (σ : Fin n → Bool) : (∫ p, F (D p) ∂(μ.prod μ)) = ∫ p, G σ p ∂(μ.prod μ) := by have hlaw := independent_copy_difference_map_sign_invariant μ W hWmeas hind σ have hmap : (μ.prod μ).map D = (μ.prod μ).map (fun p : Ω × Ω => fun j : Fin n => if σ j then D p j else -D p j) := by convert hlaw using 1 congr 1 funext p j by_cases hs : σ j <;> simp [D, hs, sub_eq_add_neg] have hm : Measurable (fun p : Ω × Ω => fun j : Fin n => if σ j then D p j else -D p j) := by apply measurable_pi_iff.mpr intro j by_cases hs : σ j · simpa [hs] using hDj j · simpa [hs] using hnegm j calc (∫ p, F (D p) ∂(μ.prod μ)) = ∫ w, F w ∂((μ.prod μ).map D) := (integral_map hDm.aemeasurable hFm.aestronglyMeasurable).symm _ = ∫ w, F w ∂((μ.prod μ).map (fun p : Ω × Ω => fun j : Fin n => if σ j then D p j else -D p j)) := by rw [hmap] _ = ∫ p, G σ p ∂(μ.prod μ) := by rw [integral_map hm.aemeasurable hFm.aestronglyMeasurable] congr 1 funext p simp only [F, G] have heq : (∑ j, if σ j then D p j else -D p j) = ∑ j, (if σ j then (1 : ℝ) else -1) • D p j := by apply Finset.sum_congr rfl intro j hj by_cases hs : σ j <;> simp [hs] rw [heq] have hEi : Integrable (fun p : Ω × Ω => rademacherEnergy (D p)) (μ.prod μ) := by unfold rademacherEnergy exact (integrable_finsetSum (Finset.univ : Finset (Fin n → Bool)) (fun σ _ => hGi σ)).div_const _ have hprod : (∫ p, F (D p) ∂(μ.prod μ)) = ∫ p, rademacherEnergy (D p) ∂(μ.prod μ) := by rw [show (∫ p, rademacherEnergy (D p) ∂(μ.prod μ)) = (∑ σ : Fin n → Bool, ∫ p, G σ p ∂(μ.prod μ)) / (2 ^ n : ℝ) by change (∫ p, (∑ σ : Fin n → Bool, G σ p) / (2 ^ n : ℝ) ∂(μ.prod μ)) = _ rw [integral_div, integral_finsetSum (Finset.univ : Finset (Fin n → Bool)) (fun σ _ => hGi σ)]] simp only [← hsign] simp [Fintype.card_bool] calc (∫ ω, ∫ ω', ‖∑ j, (W j ω - W j ω')‖ ^ 2 ∂μ ∂μ) = ∫ p, F (D p) ∂(μ.prod μ) := by change (∫ ω, ∫ ω', (F ∘ D) (ω, ω') ∂μ ∂μ) = ∫ p, (F ∘ D) p ∂(μ.prod μ) exact (integral_prod _ hFi).symm _ = ∫ p, rademacherEnergy (D p) ∂(μ.prod μ) := hprod _ = ∫ ω, ∫ ω', rademacherEnergy (fun j => W j ω - W j ω') ∂μ ∂μ := by simpa only [D] using (integral_prod _ hEi)
Causalean.Stat.Concentration.BoundedVariation.independent_copy_difference_energy_eq_sign_energy · Causalean/Stat/Concentration/BoundedVariation/CopySigns.lean:21 · uses Path , Time , instMeasurableSpacePath , rademacherEnergy
Copy­Swap 1 core · 0 supporting For an independent finite path family, the joint law of its differences from an independent copy is invariant under coordinatewise sign changes. ★ independent_copy_difference_map_sign_invariant

Sign-swap law for independent path copies

For an independent finite path family, the joint law of its differences from an independent copy is invariant under coordinatewise sign changes.

theorem independent_copy_difference_map_sign_invariant reviewed
Causalean.Stat.Concentration.BoundedVariation

For finitely many measurable and mutually independent random continuous paths, swapping the two independent draws in any selected coordinates leaves the joint law of the array of differences between the draws unchanged.

Formal statement
Ω :
n :
ℕ
W :
Fin n → Ω → Path
hWmeas :
∀ j, Measurable (W j)
hind :
iIndepFun W μ
σ :
Fin n → Bool
(μ.prod μ).map (fun p : Ω × Ω => fun j : Fin n => W j p.1 - W j p.2)
= (μ.prod μ).map (fun p : Ω × Ω => fun j : Fin n => if σ j then W j p.1 - W j p.2 else W j p.2 - W j p.1)
Proof (Lean source)
theorem independent_copy_difference_map_sign_invariant {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] {n : ℕ} (W : Fin n → Ω → Path) (hWmeas : ∀ j, Measurable (W j)) (hind : iIndepFun W μ) (σ : Fin n → Bool) : (μ.prod μ).map (fun p : Ω × Ω => fun j : Fin n => W j p.1 - W j p.2) = (μ.prod μ).map (fun p : Ω × Ω => fun j : Fin n => if σ j then W j p.1 - W j p.2 else W j p.2 - W j p.1) := by let : BorelSpace Path := ⟨rfl⟩ let ν : Fin n → Measure Path := fun j => μ.map (W j) let ρ : Measure (Fin n → Path × Path) := Measure.pi (fun j => (ν j).prod (ν j)) let B : Ω × Ω → Fin n → Path × Path := fun p j => (W j p.1, W j p.2) let S : (Fin n → Path × Path) → Fin n → Path × Path := fun a j => if σ j then a j else swap (a j) let D : (Fin n → Path × Path) → Fin n → Path := fun a j => (a j).1 - (a j).2 have hν : ∀ j, SigmaFinite (ν j) := by intro j infer_instance have hW : MeasurePreserving (fun ω => fun j => W j ω) μ (Measure.pi ν) := by refine ⟨measurable_pi_iff.mpr (fun j => hWmeas j), ?_⟩ exact hind.map_fun_eq_pi_map (fun j => (hWmeas j).aemeasurable) have hB : MeasurePreserving B (μ.prod μ) ρ := by have hp := hW.prod hW have he := (measurePreserving_arrowProdEquivProdArrow Path Path (Fin n) ν ν).symm convert he.comp hp using 1 funext p j rfl have hS : MeasurePreserving S ρ ρ := by change MeasurePreserving (fun a j => (fun q => if σ j then q else swap q) (a j)) (Measure.pi fun j => (ν j).prod (ν j)) (Measure.pi fun j => (ν j).prod (ν j)) apply measurePreserving_pi (fun j => (ν j).prod (ν j)) (fun j => (ν j).prod (ν j)) (f := fun j q => if σ j then q else swap q) intro j by_cases hj : σ j · convert (MeasurePreserving.id ((ν j).prod (ν j))) using 1 funext q simp [hj] · simpa [S, hj] using (Measure.measurePreserving_swap (μ := ν j) (ν := ν j)) have hD : Measurable D := by apply measurable_pi_iff.mpr intro j exact continuous_sub.measurable.comp (measurable_pi_apply j) have hEq : ρ.map D = ρ.map (D ∘ S) := by rw [← Measure.map_map hD hS.measurable, hS.map_eq] have hleft : (μ.prod μ).map (D ∘ B) = ρ.map D := by rw [← Measure.map_map hD hB.measurable, hB.map_eq] have hright : (μ.prod μ).map ((D ∘ S) ∘ B) = ρ.map (D ∘ S) := by rw [← Measure.map_map (hD.comp hS.measurable) hB.measurable, hB.map_eq] calc (μ.prod μ).map (fun p : Ω × Ω => fun j : Fin n => W j p.1 - W j p.2) = (μ.prod μ).map (D ∘ B) := rfl _ = ρ.map D := hleft _ = ρ.map (D ∘ S) := hEq _ = (μ.prod μ).map ((D ∘ S) ∘ B) := hright.symm _ = (μ.prod μ).map (fun p : Ω × Ω => fun j : Fin n => if σ j then W j p.1 - W j p.2 else W j p.2 - W j p.1) := by congr 1 funext p j by_cases hj : σ j <;> simp [D, S, B, hj]
Causalean.Stat.Concentration.BoundedVariation.independent_copy_difference_map_sign_invariant · Causalean/Stat/Concentration/BoundedVariation/CopySwap.lean:19 · uses Path , Time , instMeasurableSpacePath
Dyadic­Approximation 1 core · 2 supporting This module isolates the integer indexing and zero-control facts needed to reconstruct a path from compatible dyadic quantile grids. ★ controlled_path_eq_of_same_control

Lower dyadic approximation for continuous path controls

This module isolates the integer indexing and zero-control facts needed to reconstruct a path from compatible dyadic quantile grids. The index chain approximates every control value, including the right endpoint.

theorem controlled_path_eq_of_same_control reviewed
Causalean.Stat.Concentration.BoundedVariation

If a scalar control path dominates the summed squared increments of n paths over every ordered pair of times and the control takes the same value at times s and t, then every one of the paths takes the same value at s and t.

Formal statement
n :
ℕ
w :
Fin n → Path
u :
henergy :
∀ s t : Time
if
s ≤ t
then
(∑ j, (w j t - w j s) ^ 2) ≤ u t - u s
s t :
hst :
u s = u t
j :
w j s = w j t
Proof (Lean source)
theorem controlled_path_eq_of_same_control {n : ℕ} (w : Fin n → Path) (u : Path) (henergy : ∀ s t : Time, s ≤ t → (∑ j, (w j t - w j s) ^ 2) ≤ u t - u s) (s t : Time) (hst : u s = u t) : ∀ j, w j s = w j t := by have hsum : (∑ j, (w j t - w j s) ^ 2) ≤ 0 := by simpa [hst] using controlled_path_error_le w u henergy s t intro j have hj : (w j t - w j s) ^ 2 ≤ 0 := (Finset.single_le_sum (fun i _ => sq_nonneg (w i t - w i s)) (Finset.mem_univ j)).trans hsum nlinarith [sq_nonneg (w j t - w j s)]
Causalean.Stat.Concentration.BoundedVariation.controlled_path_eq_of_same_control · Causalean/Stat/Concentration/BoundedVariation/DyadicApproximation.lean:122 · uses Path , Time
2 supporting declarations (lemmas, instances)
  • exists_dyadic_lower_chain theorem — If a real number x is at least 0 and at most 1, then there is a chain of dyadic indices i_k < 2^k, one per level k, starting at 0, with each next index equal to twice its parent or one more, such that x lies between i_k/2^k and (i_k + 1)/2^k at every level.
    x :
    ℝ
    hx0 :
    0 ≤ x
    hx1 :
    x ≤ 1
    ∃ i : ∀ k : ℕ,
    Fin (2 ^ k + 1), (i 0).val = 0
    conclusion 1
    k :
    (i k).val < 2 ^ k
    conclusion 2
    k :
    (i k).val / (2 ^ k : ℝ) ≤ x
    x ≤ ((i k).val + 1) / (2 ^ k : ℝ)
    conclusion 3
    k :
    (i (k + 1)).val = 2 * (i k).val ∨ (i (k + 1)).val = 2 * (i k).val + 1
    Proof (Lean source)
    theorem exists_dyadic_lower_chain (x : ℝ) (hx0 : 0 ≤ x) (hx1 : x ≤ 1) : ∃ i : ∀ k : ℕ, Fin (2 ^ k + 1), (i 0).val = 0 ∧ (∀ k, (i k).val < 2 ^ k) ∧ (∀ k, (i k).val / (2 ^ k : ℝ) ≤ x ∧ x ≤ ((i k).val + 1) / (2 ^ k : ℝ)) ∧ (∀ k, (i (k + 1)).val = 2 * (i k).val ∨ (i (k + 1)).val = 2 * (i k).val + 1) := by let d (k : ℕ) := 2 ^ k let f (k : ℕ) := ⌊x * (d k : ℝ)⌋₊ let v (k : ℕ) := min (f k) (d k - 1) have hdpos (k : ℕ) : 0 < d k := by simp [d] have hvlt (k : ℕ) : v k < d k := by dsimp [v] exact lt_of_le_of_lt (min_le_right ..) (sub_lt (hdpos k) (by decide)) let i (k : ℕ) : Fin (2 ^ k + 1) := ⟨v k, by have := hvlt k; dsimp [d] at this; omega⟩ refine ⟨i, ?_, ?_, ?_, ?_⟩ · have : v 0 = 0 := by simp [v, d] exact this · intro k exact hvlt k · intro k have hnonneg : 0 ≤ x * (d k : ℝ) := by positivity have hfloor : (f k : ℝ) ≤ x * (d k : ℝ) := Nat.floor_le hnonneg have hfloor' : x * (d k : ℝ) < (f k : ℝ) + 1 := Nat.lt_floor_add_one _ have hdreal : (0 : ℝ) < (d k : ℝ) := by exact_mod_cast hdpos k suffices (v k : ℝ) / (d k : ℝ) ≤ x ∧ x ≤ ((v k : ℝ) + 1) / (d k : ℝ) by simpa [i, d] using this by_cases htop : x = 1 · have hv : v k = d k - 1 := by have hf : f k = d k := by simp [f, htop] simp [v, hf] rw [hv] have hdle : 1 ≤ d k := hdpos k have hcast : ((d k - 1 : ℕ) : ℝ) = (d k : ℝ) - 1 := by rw [Nat.cast_sub hdle] norm_num rw [htop, hcast] constructor · apply (div_le_iff₀ hdreal).2 nlinarith · apply (le_div_iff₀ hdreal).2 nlinarith · have hxlt : x < 1 := lt_of_le_of_ne hx1 htop have hf_lt : f k < d k := (Nat.floor_lt hnonneg).2 (by nlinarith [mul_lt_mul_of_pos_right hxlt hdreal]) have hv : v k = f k := by simp [v, Nat.le_sub_one_of_lt hf_lt] rw [hv] constructor · apply (div_le_iff₀ hdreal).2 nlinarith · apply (le_div_iff₀ hdreal).2 linarith · intro k change v (k + 1) = 2 * v k ∨ v (k + 1) = 2 * v k + 1 by_cases htop : x = 1 · have hv (l : ℕ) : v l = d l - 1 := by have hf : f l = d l := by simp [f, htop] simp [v, hf] rw [hv k, hv (k + 1)] have hk : 1 ≤ d k := hdpos k have hk' : 1 ≤ d (k + 1) := hdpos (k + 1) have hd : d (k + 1) = 2 * d k := by simp [d, pow_succ, mul_comm] omega · have hxlt : x < 1 := lt_of_le_of_ne hx1 htop have hf_lt (l : ℕ) : f l < d l := by apply (Nat.floor_lt (by positivity : 0 ≤ x * (d l : ℝ))).2 have hp : (0 : ℝ) < (d l : ℝ) := by exact_mod_cast hdpos l nlinarith [mul_lt_mul_of_pos_right hxlt hp] have hv (l : ℕ) : v l = f l := by simp [v, Nat.le_sub_one_of_lt (hf_lt l)] rw [hv k, hv (k + 1)] have hdiv : f (k + 1) / 2 = f k := by have h := Nat.mul_cast_floor_div_cancel (n := 2) (by decide) (x * (d k : ℝ)) convert h using 1; simp [f, d, pow_succ, mul_comm, mul_left_comm] omega
    Causalean.Stat.Concentration.BoundedVariation.exists_dyadic_lower_chain · Causalean/Stat/Concentration/BoundedVariation/DyadicApproximation.lean:16
  • controlled_path_error_le theorem — If a scalar control path dominates the summed squared increments of n paths over every ordered pair of times, then for any two times, in either order, the summed squared increments are at most the absolute difference of the control values.
    n :
    ℕ
    w :
    Fin n → Path
    u :
    henergy :
    ∀ s t : Time
    if
    s ≤ t
    then
    (∑ j, (w j t - w j s) ^ 2) ≤ u t - u s
    s t :
    (∑ j, (w j t - w j s) ^ 2) ≤ |u t - u s|
    Proof (Lean source)
    theorem controlled_path_error_le {n : ℕ} (w : Fin n → Path) (u : Path) (henergy : ∀ s t : Time, s ≤ t → (∑ j, (w j t - w j s) ^ 2) ≤ u t - u s) (s t : Time) : (∑ j, (w j t - w j s) ^ 2) ≤ |u t - u s| := by rcases le_total s t with hst | hts · exact (henergy s t hst).trans (le_abs_self _) · have h := henergy t s hts have hsq : (∑ j, (w j t - w j s) ^ 2) = ∑ j, (w j s - w j t) ^ 2 := by apply Finset.sum_congr rfl intro j _ ring rw [hsq] exact h.trans (le_abs_self _ |>.trans_eq (by rw [abs_sub_comm]))
    Causalean.Stat.Concentration.BoundedVariation.controlled_path_error_le · Causalean/Stat/Concentration/BoundedVariation/DyadicApproximation.lean:101
Dyadic­Grid 1 core · 1 supporting This module constructs compatible time grids from a continuous scalar control and bounds the signed maximum of the increments on one finite grid level. ★ signed_grid_increment_max_energy_le

Dyadic sections of scalar path controls

This module constructs compatible time grids from a continuous scalar control and bounds the signed maximum of the increments on one finite grid level. The grids may repeat times when the control has flat intervals.

theorem signed_grid_increment_max_energy_le reviewed
Causalean.Stat.Concentration.BoundedVariation

If every one of the m + 1 consecutive increments of a finite time grid has summed squared path increments at most δ, then the sign-averaged largest squared signed increment over the grid is at most 32 (1 + log(m + 1)) δ.

Formal statement
m n :
ℕ
w :
Fin n → Path
t :
Fin (m + 2) → Time
δ :
ℝ
hδ :
∀ i : Fin (m + 1), (∑ j, (w j (t i.succ) - w j (t i.castSucc)) ^ 2) ≤ δ
signMaxEnergy (fun i j => w j (t i.succ) - w j (t i.castSucc))
≤ 32 * (1 + log (m + 1)) * δ
Proof (Lean source)
theorem signed_grid_increment_max_energy_le {m n : ℕ} (w : Fin n → Path) (t : Fin (m + 2) → Time) (δ : ℝ) (hδ : ∀ i : Fin (m + 1), (∑ j, (w j (t i.succ) - w j (t i.castSucc)) ^ 2) ≤ δ) : signMaxEnergy (fun i j => w j (t i.succ) - w j (t i.castSucc)) ≤ 32 * (1 + log (m + 1)) * δ := by have hlog : 0 ≤ log (m + 1 : ℝ) := by apply Real.log_nonneg exact_mod_cast Nat.succ_le_succ (zero_le m) calc signMaxEnergy (fun i j => w j (t i.succ) - w j (t i.castSucc)) ≤ 32 * (1 + log (m + 1)) * Finset.univ.sup' univ_nonempty (fun i : Fin (m + 1) => ∑ j, (w j (t i.succ) - w j (t i.castSucc)) ^ 2) := signMaxEnergy_le _ _ ≤ 32 * (1 + log (m + 1)) * δ := by apply mul_le_mul_of_nonneg_left · exact Finset.sup'_le univ_nonempty _ (fun i _ => hδ i) · positivity
Causalean.Stat.Concentration.BoundedVariation.signed_grid_increment_max_energy_le · Causalean/Stat/Concentration/BoundedVariation/DyadicGrid.lean:63 · uses Path , Time , signMaxEnergy
1 supporting declaration (lemmas, instances)
  • exists_control_dyadic_grid theorem — If a continuous control path is nondecreasing and zero at time zero, then it admits compatible dyadic time grids: the level-k grid has 2^k + 1 points in increasing order, its i-th point has control value i/2^k times the terminal value, and equal dyadic fractions at different levels have the same representative time.
    u :
    hmono :
    Monotone (u : Time → ℝ)
    hzero :
    u timeZero = 0
    ∃ t : ∀ k : ℕ
    if
    Fin (2 ^ k + 1)
    then
    Time, (∀ k, Monotone (t k)) ∧
    (∀ k i, u (t k i) = ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne) ∧
    (∀ k i l j, ((i.val : ℝ) / (2 ^ k : ℝ)) = ((j.val : ℝ) / (2 ^ l : ℝ)) → t k i = t l j)
    Proof (Lean source)
    theorem exists_control_dyadic_grid (u : Path) (hmono : Monotone (u : Time → ℝ)) (hzero : u timeZero = 0) : ∃ t : ∀ k : ℕ, Fin (2 ^ k + 1) → Time, (∀ k, Monotone (t k)) ∧ (∀ k i, u (t k i) = ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne) ∧ (∀ k i l j, ((i.val : ℝ) / (2 ^ k : ℝ)) = ((j.val : ℝ) / (2 ^ l : ℝ)) → t k i = t l j) := by obtain ⟨q, hq, hqmono⟩ := exists_monotone_control_section u hmono hzero have hU : 0 ≤ u timeOne := by have h01 : timeZero ≤ timeOne := by change (0 : ℝ) ≤ 1 norm_num simpa only [hzero] using hmono h01 let level (k : ℕ) (i : Fin (2 ^ k + 1)) : Icc (0 : ℝ) (u timeOne) := ⟨((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne, by have hi : (i.val : ℝ) ≤ (2 ^ k : ℝ) := by exact_mod_cast Nat.le_of_lt_succ i.isLt have hpow : (0 : ℝ) < (2 ^ k : ℝ) := by positivity have hfrac : (i.val : ℝ) / (2 ^ k : ℝ) ≤ 1 := (div_le_iff₀ hpow).2 (by simpa using hi) constructor · positivity · nlinarith⟩ refine ⟨fun k i => q (level k i), ?_, ?_, ?_⟩ · intro k i j hij apply hqmono change ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne ≤ ((j.val : ℝ) / (2 ^ k : ℝ)) * u timeOne gcongr exact_mod_cast hij · intro k i exact hq (level k i) · intro k i l j hfrac apply congrArg q apply Subtype.ext change ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne = ((j.val : ℝ) / (2 ^ l : ℝ)) * u timeOne rw [hfrac]
    Causalean.Stat.Concentration.BoundedVariation.exists_control_dyadic_grid · Causalean/Stat/Concentration/BoundedVariation/DyadicGrid.lean:17
Envelope­Algebra 1 core · 2 supporting The real total variation and supremum-plus-variation envelope of a difference are bounded by the corresponding sums for its two paths. ★ pathSize_sub_le

Bounded-variation envelope under subtraction

The real total variation and supremum-plus-variation envelope of a difference are bounded by the corresponding sums for its two paths. These facts allow a product-law copy to be used in the centered-process argument.

theorem pathSize_sub_le reviewed
Causalean.Stat.Concentration.BoundedVariation

If the path f has finite total variation and so does the path g, then the supremum-plus-variation size of f − g is at most the sum of the sizes of f and g.

Formal statement
f g :
hf :
hg :
pathSize (f - g) ≤ pathSize f + pathSize g
Proof (Lean source)
theorem pathSize_sub_le (f g : Path) (hf : eVariationOn f univ < ⊤) (hg : eVariationOn g univ < ⊤) : pathSize (f - g) ≤ pathSize f + pathSize g := by dsimp [pathSize] have hnorm : ‖f - g‖ ≤ ‖f‖ + ‖g‖ := norm_sub_le f g have htv := pathTV_sub_le f g hf hg linarith
Causalean.Stat.Concentration.BoundedVariation.pathSize_sub_le · Causalean/Stat/Concentration/BoundedVariation/EnvelopeAlgebra.lean:52 · uses Path , Time , pathSize
2 supporting declarations (lemmas, instances)
Finite­Sign­L2 1 core · 0 supporting The ordinary L₂ triangle inequality on the finite uniform sign space is stated in the sum-and-square notation used by the process estimates. ★ finite_sign_l2_sum_le

Finite sign-space second-moment triangle inequality

The ordinary L₂ triangle inequality on the finite uniform sign space is stated in the sum-and-square notation used by the process estimates.

theorem finite_sign_l2_sum_le reviewed
Causalean.Stat.Concentration.BoundedVariation

For finitely many real functions on the sign patterns of length n, the uniform sign-average of the square of their sum is at most the square of the sum of their individual root sign-average second moments.

Formal statement
n m :
ℕ
F :
Fin m → (Fin n → Bool) → ℝ
(∑ σ : Fin n → Bool, (∑ k, F k σ) ^ 2) / (2 ^ n : ℝ)
≤ (∑ k, sqrt ((∑ σ : Fin n → Bool, (F k σ) ^ 2) / (2 ^ n : ℝ))) ^ 2
Proof (Lean source)
theorem finite_sign_l2_sum_le {n m : ℕ} (F : Fin m → (Fin n → Bool) → ℝ) : (∑ σ : Fin n → Bool, (∑ k, F k σ) ^ 2) / (2 ^ n : ℝ) ≤ (∑ k, sqrt ((∑ σ : Fin n → Bool, (F k σ) ^ 2) / (2 ^ n : ℝ))) ^ 2 := by classical have hc : 0 < (2 ^ n : ℝ) := by positivity let v : Fin m → EuclideanSpace ℝ (Fin n → Bool) := fun k => toLp 2 (fun σ => F k σ / sqrt (2 ^ n : ℝ)) have hv (k : Fin m) : ‖v k‖ = sqrt ((∑ σ : Fin n → Bool, (F k σ) ^ 2) / (2 ^ n : ℝ)) := by rw [EuclideanSpace.norm_eq] simp only [v, Real.norm_eq_abs, sq_abs] congr 1 calc (∑ σ : Fin n → Bool, (F k σ / sqrt (2 ^ n : ℝ)) ^ 2) = ∑ σ : Fin n → Bool, (F k σ) ^ 2 / (2 ^ n : ℝ) := by apply Finset.sum_congr rfl intro σ _ rw [div_pow, Real.sq_sqrt hc.le] _ = _ := by rw [Finset.sum_div] have hsum : ‖∑ k, v k‖ ^ 2 = (∑ σ : Fin n → Bool, (∑ k, F k σ) ^ 2) / (2 ^ n : ℝ) := by rw [EuclideanSpace.real_norm_sq_eq] simp only [WithLp.ofLp_sum, v, Finset.sum_apply] calc _ = ∑ σ : Fin n → Bool, ((∑ k, F k σ) / sqrt (2 ^ n : ℝ)) ^ 2 := by apply Finset.sum_congr rfl intro σ _ rw [Finset.sum_div] _ = ∑ σ : Fin n → Bool, (∑ k, F k σ) ^ 2 / (2 ^ n : ℝ) := by apply Finset.sum_congr rfl intro σ _ rw [div_pow, Real.sq_sqrt hc.le] _ = _ := by rw [Finset.sum_div] have htriangle := norm_sum_le (Finset.univ : Finset (Fin m)) v have hnonneg : 0 ≤ ∑ k, ‖v k‖ := Finset.sum_nonneg fun _ _ => norm_nonneg _ have hsquared : ‖∑ k, v k‖ ^ 2 ≤ (∑ k, ‖v k‖) ^ 2 := by nlinarith [norm_nonneg (∑ k, v k)] simpa only [hsum, hv] using hsquared
Causalean.Stat.Concentration.BoundedVariation.finite_sign_l2_sum_le · Causalean/Stat/Concentration/BoundedVariation/FiniteSignL2.lean:15
Main 1 core · 0 supporting Independent continuous bounded-variation random paths admit a universal second-moment bound for the supremum of their centered sum. ★ centered_path_sum_maximal

The bounded-variation process maximal inequality

Independent continuous bounded-variation random paths admit a universal second-moment bound for the supremum of their centered sum. The theorem uses the full time continuum and has no dimension or grid-size factor.

theorem centered_path_sum_maximal reviewed
Causalean.Stat.Concentration.BoundedVariation

For finitely many random continuous paths on the unit interval that are measurable, Bochner-integrable, almost surely of bounded variation, with integrable squared supremum-plus-variation size, and mutually independent, the expected squared supremum norm of their centered sum is at most 16384 times the sum of their expected squared sizes.

Formal statement
Ω :
n :
ℕ
W :
Fin n → Ω → Path
hWmeas :
∀ j, Measurable (W j)
hWint :
∀ j, Integrable (W j) μ
hBV :
∀ j, ∀ᵐ ω ∂μ, eVariationOn (W j ω) univ < ⊤
hMom :
∀ j, Integrable (fun ω => (pathSize (W j ω)) ^ 2) μ
hind :
iIndepFun W μ
(∫ ω, ‖∑ j, (W j ω - ∫ x, W j x ∂μ)‖ ^ 2 ∂μ)
≤ 16384 * ∑ j, (∫ ω, (pathSize (W j ω)) ^ 2 ∂μ)
Proof (Lean source)
theorem centered_path_sum_maximal {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] {n : ℕ} (W : Fin n → Ω → Path) (hWmeas : ∀ j, Measurable (W j)) (hWint : ∀ j, Integrable (W j) μ) (hBV : ∀ j, ∀ᵐ ω ∂μ, eVariationOn (W j ω) univ < ⊤) (hMom : ∀ j, Integrable (fun ω => (pathSize (W j ω)) ^ 2) μ) (hind : iIndepFun W μ) : (∫ ω, ‖∑ j, (W j ω - ∫ x, W j x ∂μ)‖ ^ 2 ∂μ) ≤ 16384 * ∑ j, (∫ ω, (pathSize (W j ω)) ^ 2 ∂μ) := by classical let : BorelSpace Path := ⟨rfl⟩ let A (j : Fin n) (ω : Ω) : ℝ := (pathSize (W j ω)) ^ 2 let B (ω ω' : Ω) : ℝ := ∑ j, (A j ω + A j ω') have hAmeas (j : Fin n) : Measurable (A j) := by unfold A pathSize exact (((continuous_norm.measurable.comp (hWmeas j)).add (measurable_pathTV.comp (hWmeas j))).pow_const 2) have hAint (j : Fin n) : Integrable (A j) μ := ⟨(hAmeas j).aestronglyMeasurable, (hMom j).hasFiniteIntegral⟩ have hWsq (j : Fin n) : Integrable (fun ω => ‖W j ω‖ ^ 2) μ := by apply Integrable.mono' (hMom j) (by fun_prop) filter_upwards [] with ω rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] change ‖W j ω‖ ^ 2 ≤ A j ω have hle : ‖W j ω‖ ≤ pathSize (W j ω) := by simp only [pathSize] exact le_add_of_nonneg_right (pathTV_nonneg _) exact (sq_le_sq₀ (norm_nonneg _) (pathSize_nonneg _)).mpr hle have hBVall : ∀ᵐ ω ∂μ, ∀ j, eVariationOn (W j ω) univ < ⊤ := ae_all_iff.mpr hBV have hBint (ω : Ω) : Integrable (B ω) μ := by unfold B exact integrable_finsetSum (Finset.univ : Finset (Fin n)) (fun j _ => (integrable_const (A j ω)).add (hAint j)) have hBouter : Integrable (fun ω => ∫ ω', B ω ω' ∂μ) μ := by have hBprod : Integrable (fun p : Ω × Ω => B p.1 p.2) (μ.prod μ) := by unfold B exact integrable_finsetSum (Finset.univ : Finset (Fin n)) (fun j _ => (Integrable.comp_fst (hAint j) μ).add (Integrable.comp_snd (hAint j) μ)) exact hBprod.integral_prod_left have hpoint (ω ω' : Ω) (hω : ∀ j, eVariationOn (W j ω) univ < ⊤) (hω' : ∀ j, eVariationOn (W j ω') univ < ⊤) : rademacherEnergy (fun j => W j ω - W j ω') ≤ 8192 * B ω ω' := by have hdiff : ∀ j, eVariationOn (W j ω - W j ω') univ < ⊤ := by intro j exact lt_of_le_of_lt (eVariationOn_path_sub_le _ _) (ENNReal.add_lt_top.mpr ⟨hω j, hω' j⟩) calc rademacherEnergy (fun j => W j ω - W j ω') ≤ 4096 * ∑ j, (pathSize (W j ω - W j ω')) ^ 2 := rademacherEnergy_le_pathSize_sq _ hdiff _ ≤ 8192 * B ω ω' := by unfold B have hsum : (∑ j, (pathSize (W j ω - W j ω')) ^ 2) ≤ 2 * ∑ j, (A j ω + A j ω') := by rw [Finset.mul_sum] apply Finset.sum_le_sum intro j _ have hsub := pathSize_sub_le (W j ω) (W j ω') (hω j) (hω' j) have hnonneg := pathSize_nonneg (W j ω - W j ω') have ha := pathSize_nonneg (W j ω) have hb := pathSize_nonneg (W j ω') dsimp [A] nlinarith [sq_nonneg (pathSize (W j ω) - pathSize (W j ω'))] nlinarith have hsign_nonneg (ω ω' : Ω) : 0 ≤ rademacherEnergy (fun j => W j ω - W j ω') := by unfold rademacherEnergy exact div_nonneg (Finset.sum_nonneg fun _ _ => sq_nonneg _) (by positivity) have hinner (ω : Ω) (hω : ∀ j, eVariationOn (W j ω) univ < ⊤) : (∫ ω', rademacherEnergy (fun j => W j ω - W j ω') ∂μ) ≤ 8192 * ∫ ω', B ω ω' ∂μ := by rw [← integral_const_mul] apply integral_mono_of_nonneg · exact Filter.Eventually.of_forall (hsign_nonneg ω) · exact (hBint ω).const_mul _ · filter_upwards [hBVall] with ω' hω' exact hpoint ω ω' hω hω' have houter : (∫ ω, ∫ ω', rademacherEnergy (fun j => W j ω - W j ω') ∂μ ∂μ) ≤ 8192 * ∫ ω, ∫ ω', B ω ω' ∂μ ∂μ := by rw [← integral_const_mul] apply integral_mono_of_nonneg · exact Filter.Eventually.of_forall fun ω => integral_nonneg fun ω' => hsign_nonneg ω ω' · exact hBouter.const_mul _ · filter_upwards [hBVall] with ω hω exact hinner ω hω have hBvalue : (∫ ω, ∫ ω', B ω ω' ∂μ ∂μ) = 2 * ∑ j, (∫ ω, A j ω ∂μ) := by have hinnerB (ω : Ω) : (∫ ω', B ω ω' ∂μ) = ∑ j, (A j ω + ∫ ω', A j ω' ∂μ) := by change (∫ ω', ∑ j, (A j ω + A j ω') ∂μ) = _ rw [integral_finsetSum (Finset.univ : Finset (Fin n))] · congr 1 ext j rw [integral_add (integrable_const _) (hAint j)] simp [A] · intro j _ exact (integrable_const _).add (hAint j) simp_rw [hinnerB] rw [integral_finsetSum (Finset.univ : Finset (Fin n))] · rw [Finset.mul_sum] apply Finset.sum_congr rfl intro j _ rw [integral_add (hAint j) (integrable_const _)] simp [A] ring · intro j _ exact (hAint j).add (integrable_const _) calc (∫ ω, ‖∑ j, (W j ω - ∫ x, W j x ∂μ)‖ ^ 2 ∂μ) ≤ ∫ ω, ∫ ω', ‖∑ j, (W j ω - W j ω')‖ ^ 2 ∂μ ∂μ := centered_path_sum_energy_le_copy μ W hWint hWsq _ = ∫ ω, ∫ ω', rademacherEnergy (fun j => W j ω - W j ω') ∂μ ∂μ := independent_copy_difference_energy_eq_sign_energy μ W hWmeas hWsq hind _ ≤ 8192 * ∫ ω, ∫ ω', B ω ω' ∂μ ∂μ := houter _ = 16384 * ∑ j, (∫ ω, (pathSize (W j ω)) ^ 2 ∂μ) := by rw [hBvalue] dsimp [A] ring
Causalean.Stat.Concentration.BoundedVariation.centered_path_sum_maximal · Causalean/Stat/Concentration/BoundedVariation/Main.lean:21 · uses Path , Time , instMeasurableSpacePath , pathSize
Rademacher 1 core · 2 supporting The finite sign average controls the supremum over the whole unit interval. ★ rademacherEnergy_le_pathSize_sq

Rademacher maximal bound for controlled paths

The finite sign average controls the supremum over the whole unit interval. The proof uses the common variation control to partition time by mass, then applies sub-Gaussian increment estimates and dyadic chaining.

theorem rademacherEnergy_le_pathSize_sq reviewed
Causalean.Stat.Concentration.BoundedVariation

If each of finitely many continuous paths has bounded variation, then their Rademacher energy is at most 4096 times the sum of their squared supremum-plus-total-variation sizes.

Formal statement
n :
ℕ
w :
Fin n → Path
hBV :
∀ j, eVariationOn (w j) univ < ⊤
rademacherEnergy w ≤ 4096 * ∑ j, (pathSize (w j)) ^ 2
Proof (Lean source)
theorem rademacherEnergy_le_pathSize_sq {n : ℕ} (w : Fin n → Path) (hBV : ∀ j, eVariationOn (w j) univ < ⊤) : rademacherEnergy w ≤ 4096 * ∑ j, (pathSize (w j)) ^ 2 := by classical have hv (j : Fin n) := exists_variation_control (w j) (hBV j) choose v hmono hzero hone hinc using hv simpa only [hone, pathSize] using (rademacherEnergy_le_control w v hmono hzero hinc)
Causalean.Stat.Concentration.BoundedVariation.rademacherEnergy_le_pathSize_sq · Causalean/Stat/Concentration/BoundedVariation/Rademacher.lean:109 · uses Path , Time , pathSize , rademacherEnergy
2 supporting declarations (lemmas, instances)
  • increment_energy_le_control theorem — Suppose each control path v_j is nondecreasing and zero at time zero, and bounds the increments of the path w_j: for s ≤ t, |w_j(t) − w_j(s)| ≤ v_j(t) − v_j(s). Then for times s ≤ t, the summed squared increments of the paths w_j from s to t are at most the sum of v_j(1)·(v_j(t) − v_j(s)).
    n :
    ℕ
    w v :
    Fin n → Path
    hmono :
    ∀ j, Monotone (v j : Time → ℝ)
    hzero :
    ∀ j, v j timeZero = 0
    hinc :
    ∀ j (s t : Time)
    if
    s ≤ t
    then
    |w j t - w j s| ≤ v j t - v j s
    s t :
    hst :
    s ≤ t
    (∑ j, (w j t - w j s) ^ 2) ≤ ∑ j, v j timeOne * (v j t - v j s)
    Proof (Lean source)
    theorem increment_energy_le_control {n : ℕ} (w v : Fin n → Path) (hmono : ∀ j, Monotone (v j : Time → ℝ)) (hzero : ∀ j, v j timeZero = 0) (hinc : ∀ j (s t : Time), s ≤ t → |w j t - w j s| ≤ v j t - v j s) (s t : Time) (hst : s ≤ t) : (∑ j, (w j t - w j s) ^ 2) ≤ ∑ j, v j timeOne * (v j t - v j s) := by apply Finset.sum_le_sum intro j _ have hs0 : 0 ≤ v j s := by have h0s : timeZero ≤ s := s.property.1 simpa only [hzero j] using hmono j h0s have hst0 : 0 ≤ v j t - v j s := sub_nonneg.mpr (hmono j hst) have ht1 : v j t ≤ v j timeOne := hmono j t.property.2 have hsq : (w j t - w j s) ^ 2 ≤ (v j t - v j s) ^ 2 := by calc (w j t - w j s) ^ 2 = |w j t - w j s| ^ 2 := (sq_abs _).symm _ ≤ (v j t - v j s) ^ 2 := (sq_le_sq₀ (abs_nonneg _) hst0).mpr (hinc j s t hst) nlinarith
    Causalean.Stat.Concentration.BoundedVariation.increment_energy_le_control · Causalean/Stat/Concentration/BoundedVariation/Rademacher.lean:16
  • rademacherEnergy_le_control theorem — Suppose each control path v_j is nondecreasing and zero at time zero, and bounds the increments of the path w_j: for s ≤ t, |w_j(t) − w_j(s)| ≤ v_j(t) − v_j(s). Then the Rademacher energy of the paths w_j is at most 4096 times the sum of (‖w_j‖ + v_j(1))^2, a dimension-free bound.
    n :
    ℕ
    w v :
    Fin n → Path
    hmono :
    ∀ j, Monotone (v j : Time → ℝ)
    hzero :
    ∀ j, v j timeZero = 0
    hinc :
    ∀ j (s t : Time)
    if
    s ≤ t
    then
    |w j t - w j s| ≤ v j t - v j s
    rademacherEnergy w ≤ 4096 * ∑ j, (‖w j‖ + v j timeOne) ^ 2
    Proof (Lean source)
    theorem rademacherEnergy_le_control {n : ℕ} (w v : Fin n → Path) (hmono : ∀ j, Monotone (v j : Time → ℝ)) (hzero : ∀ j, v j timeZero = 0) (hinc : ∀ j (s t : Time), s ≤ t → |w j t - w j s| ≤ v j t - v j s) : rademacherEnergy w ≤ 4096 * ∑ j, (‖w j‖ + v j timeOne) ^ 2 := by /- Set ν(t) = ∑ j (v_j(1)) v_j(t). By `increment_energy_le_control`, ν controls squared coefficient increments. Apply `rademacherEnergy_le_scalar_control`. Its initial-energy and total control-mass terms are each bounded by the displayed envelope sum. -/ classical let u : Path := ∑ j, (v j timeOne) • v j have hvnonneg (j : Fin n) : 0 ≤ v j timeOne := by have h01 : timeZero ≤ timeOne := by change (0 : ℝ) ≤ 1 norm_num simpa only [hzero j] using hmono j h01 have humono : Monotone (u : Time → ℝ) := by intro s t hst simp only [u, ContinuousMap.sum_apply, ContinuousMap.smul_apply, smul_eq_mul] exact Finset.sum_le_sum fun j _ => mul_le_mul_of_nonneg_left (hmono j hst) (hvnonneg j) have huzero : u timeZero = 0 := by simp [u, hzero] have huenergy (s t : Time) (hst : s ≤ t) : (∑ j, (w j t - w j s) ^ 2) ≤ u t - u s := by calc (∑ j, (w j t - w j s) ^ 2) ≤ ∑ j, v j timeOne * (v j t - v j s) := increment_energy_le_control w v hmono hzero hinc s t hst _ = u t - u s := by simp only [u, ContinuousMap.sum_apply, ContinuousMap.smul_apply, smul_eq_mul, ← Finset.sum_sub_distrib] congr 1 ext j ring have hbound : (∑ j, (w j timeZero) ^ 2) + u timeOne ≤ ∑ j, (‖w j‖ + v j timeOne) ^ 2 := by simp only [u, ContinuousMap.sum_apply, ContinuousMap.smul_apply, smul_eq_mul, ← Finset.sum_add_distrib] apply Finset.sum_le_sum intro j _ have heval : |w j timeZero| ≤ ‖w j‖ := by simpa only [Real.norm_eq_abs] using (ContinuousMap.norm_coe_le_norm (w j) timeZero) have hsq : (w j timeZero) ^ 2 ≤ ‖w j‖ ^ 2 := by calc (w j timeZero) ^ 2 = |w j timeZero| ^ 2 := (sq_abs _).symm _ ≤ ‖w j‖ ^ 2 := (sq_le_sq₀ (abs_nonneg _) (norm_nonneg _)).mpr heval nlinarith [norm_nonneg (w j), hvnonneg j] exact (rademacherEnergy_le_scalar_control w u humono huzero huenergy).trans (mul_le_mul_of_nonneg_left hbound (by norm_num))
    Causalean.Stat.Concentration.BoundedVariation.rademacherEnergy_le_control · Causalean/Stat/Concentration/BoundedVariation/Rademacher.lean:44
Signed­Chain­Numerics 1 core · 1 supporting The square roots of the finite-class dyadic bounds form a summable numerical series. ★ dyadic_log_sqrt_tsum_le_40

Numerical dyadic chaining series

The square roots of the finite-class dyadic bounds form a summable numerical series. The explicit bound leaves room for the final constant 4096.

theorem dyadic_log_sqrt_tsum_le_40 reviewed
Causalean.Stat.Concentration.BoundedVariation

The sum over all levels k of the square roots of 32 (1 + log 2^(k+1)) / 2^(k+1) is at most 40.

Formal statement
(∑' k : ℕ, sqrt (32 * (1 + log ((2 ^ (k + 1) : ℕ) : ℝ)) / (2 : ℝ) ^ (k + 1)))
≤ 40
Proof (Lean source)
theorem dyadic_log_sqrt_tsum_le_40 : (∑' k : ℕ, sqrt (32 * (1 + log ((2 ^ (k + 1) : ℕ) : ℝ)) / (2 : ℝ) ^ (k + 1))) ≤ 40 := by /- A geometric majorant sums to 32, which is below 40. -/ calc _ ≤ ∑' k : ℕ, 8 * (3 / 4 : ℝ) ^ k := by apply Summable.tsum_le_tsum (fun k => dyadic_log_sqrt_le_geometric k) · exact dyadic_log_sqrt_summable · exact (summable_geometric_of_lt_one (by norm_num : (0 : ℝ) ≤ 3 / 4) (by norm_num : (3 / 4 : ℝ) < 1)).mul_left 8 _ = 32 := by rw [tsum_mul_left, tsum_geometric_of_lt_one (by norm_num : (0 : ℝ) ≤ 3 / 4) (by norm_num : (3 / 4 : ℝ) < 1)] norm_num _ ≤ 40 := by norm_num
Causalean.Stat.Concentration.BoundedVariation.dyadic_log_sqrt_tsum_le_40 · Causalean/Stat/Concentration/BoundedVariation/SignedChainNumerics.lean:75
1 supporting declaration (lemmas, instances)
  • dyadic_log_sqrt_summable theorem — The square roots of the dyadic logarithmic energy factors 32 (1 + log 2^(k+1)) / 2^(k+1) form a summable sequence in k.
    Summable (fun k : ℕ => sqrt (32 * (1 + log ((2 ^ (k + 1) : ℕ) : ℝ)) / (2 : ℝ) ^ (k + 1)))
    Proof (Lean source)
    theorem dyadic_log_sqrt_summable : Summable (fun k : ℕ => sqrt (32 * (1 + log ((2 ^ (k + 1) : ℕ) : ℝ)) / (2 : ℝ) ^ (k + 1))) := by /- Use `log(2^(k+1)) ≤ k+1`, then compare the square root of the polynomial factor with a geometric sequence of ratio strictly between `1/sqrt 2` and `1`. -/ apply Summable.of_nonneg_of_le (fun k => Real.sqrt_nonneg _) (fun k => dyadic_log_sqrt_le_geometric k) exact (summable_geometric_of_lt_one (by norm_num : (0 : ℝ) ≤ 3 / 4) (by norm_num : (3 / 4 : ℝ) < 1)).mul_left 8
    Causalean.Stat.Concentration.BoundedVariation.dyadic_log_sqrt_summable · Causalean/Stat/Concentration/BoundedVariation/SignedChainNumerics.lean:60
Signed­Level­Energy 1 core · 1 supporting The finite-class sign maximal estimate bounds the adjacent increments on one control grid. ★ signedDyadicIncrementMax_energy_le

Second moments of one signed dyadic increment level

The finite-class sign maximal estimate bounds the adjacent increments on one control grid. Keeping this estimate separate makes the later infinite-level triangle inequality independent of grid indexing.

theorem signedDyadicIncrementMax_energy_le reviewed
Causalean.Stat.Concentration.BoundedVariation

Suppose a scalar control u dominates the summed squared path increments over every interval, and the dyadic grids are monotone at every level and place their i-th level-k point at control value i/2^k times the terminal value. Then at every level k the sign-average of the squared maximal signed increment is at most 32 (1 + log 2^(k+1)) times u(1)/2^(k+1).

Formal statement
n :
ℕ
w :
Fin n → Path
u :
henergy :
∀ s t : Time
if
s ≤ t
then
(∑ j, (w j t - w j s) ^ 2) ≤ u t - u s
grid :
∀ k : ℕ
if
Fin (2 ^ k + 1)
then
hgridmono :
∀ k, Monotone (grid k)
hgridval :
∀ k i, u (grid k i) = ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne
k :
ℕ
(∑ σ : Fin n → Bool, (signedDyadicIncrementMax w grid k σ) ^ 2) / (2 ^ n : ℝ)
≤ 32 * (1 + log ((2 ^ (k + 1) : ℕ) : ℝ)) * (u timeOne / (2 : ℝ) ^ (k + 1))
Proof (Lean source)
theorem signedDyadicIncrementMax_energy_le {n : ℕ} (w : Fin n → Path) (u : Path) (henergy : ∀ s t : Time, s ≤ t → (∑ j, (w j t - w j s) ^ 2) ≤ u t - u s) (grid : ∀ k : ℕ, Fin (2 ^ k + 1) → Time) (hgridmono : ∀ k, Monotone (grid k)) (hgridval : ∀ k i, u (grid k i) = ((i.val : ℝ) / (2 ^ k : ℝ)) * u timeOne) (k : ℕ) : (∑ σ : Fin n → Bool, (signedDyadicIncrementMax w grid k σ) ^ 2) / (2 ^ n : ℝ) ≤ 32 * (1 + log ((2 ^ (k + 1) : ℕ) : ℝ)) * (u timeOne / (2 : ℝ) ^ (k + 1)) := by /- Identify the `2^(k+1)` edges with `Fin (m+1)` for `m = 2^(k+1)-1`. Monotonicity orders each edge, and `hgridval` makes its control increment exactly `u(1)/2^(k+1)`. Apply `signed_grid_abs_max_energy_le`. -/ classical let m := 2 ^ (k + 1) - 1 have hp : 1 ≤ 2 ^ (k + 1) := by have : 0 < 2 ^ (k + 1) := by positivity omega have hm : m + 1 = 2 ^ (k + 1) := by dsimp [m] omega let t : Fin (m + 2) → Time := fun i => grid (k + 1) (i.cast (by omega)) have hδ : ∀ i : Fin (m + 1), (∑ j, (w j (t i.succ) - w j (t i.castSucc)) ^ 2) ≤ u timeOne / (2 : ℝ) ^ (k + 1) := by intro i have hs : t i.castSucc ≤ t i.succ := by dsimp [t] apply hgridmono exact_mod_cast le_succ i.val have h := henergy _ _ hs have hv (x : Fin (m + 2)) : u (t x) = ((x.val : ℝ) / (2 ^ (k + 1) : ℝ)) * u timeOne := by simpa [t, cast] using hgridval (k + 1) (x.cast (by omega)) rw [hv, hv] at h convert h using 1 <;> simp only [Fin.val_succ, Fin.val_castSucc, Nat.cast_add, Nat.cast_one] <;> ring have hbound := signed_grid_abs_max_energy_le w t (u timeOne / (2 : ℝ) ^ (k + 1)) hδ have hindex : ∀ σ : Fin n → Bool, signedDyadicIncrementMax w grid k σ = Finset.univ.sup' univ_nonempty (fun i : Fin (m + 1) => |∑ j, (if σ j then (1 : ℝ) else -1) * (w j (t i.succ) - w j (t i.castSucc))|) := by intro σ unfold signedDyadicIncrementMax have hedge (i : Fin (m + 1)) : grid (k + 1) (i.cast hm).succ = t i.succ ∧ grid (k + 1) (i.cast hm).castSucc = t i.castSucc := by constructor <;> dsimp [t] apply le_antisymm · apply Finset.sup'_le intro i _ let j : Fin (m + 1) := i.cast hm.symm have hij : j.cast hm = i := Fin.ext rfl have hj := hedge j rw [← hij, hj.1, hj.2] exact Finset.le_sup' (fun i : Fin (m + 1) => |∑ l, (if σ l then (1 : ℝ) else -1) * (w l (t i.succ) - w l (t i.castSucc))|) (Finset.mem_univ j) · apply Finset.sup'_le intro i _ have hi := hedge i rw [← hi.1, ← hi.2] exact Finset.le_sup' (fun i : Fin (2 ^ (k + 1)) => |∑ l, (if σ l then (1 : ℝ) else -1) * (w l (grid (k + 1) i.succ) - w l (grid (k + 1) i.castSucc))|) (Finset.mem_univ (i.cast hm)) simp_rw [hindex] have hmr : (m : ℝ) + 1 = ((2 ^ (k + 1) : ℕ) : ℝ) := by exact_mod_cast hm rw [hmr] at hbound exact hbound
Causalean.Stat.Concentration.BoundedVariation.signedDyadicIncrementMax_energy_le · Causalean/Stat/Concentration/BoundedVariation/SignedLevelEnergy.lean:74 · uses Path , Time , signedDyadicIncrementMax , timeOne
1 supporting declaration (lemmas, instances)
  • signed_grid_abs_max_energy_le theorem — If every one of the m + 1 consecutive increments of a finite time grid has summed squared path increments at most δ, then the sign-average of the squared largest absolute signed increment over the grid is at most 32 (1 + log(m + 1)) δ.
    m n :
    ℕ
    w :
    Fin n → Path
    t :
    Fin (m + 2) → Time
    δ :
    ℝ
    hδ :
    ∀ i : Fin (m + 1), (∑ j, (w j (t i.succ) - w j (t i.castSucc)) ^ 2) ≤ δ
    (∑ σ : Fin n → Bool, (Finset.univ.sup' univ_nonempty (fun i : Fin (m + 1) => |∑ j, (if σ j then (1 : ℝ) else -1) * (w j (t i.succ) - w j (t i.castSucc))|)) ^ 2) / (2 ^ n : ℝ)
    ≤ 32 * (1 + log (m + 1)) * δ
    Proof (Lean source)
    theorem signed_grid_abs_max_energy_le {m n : ℕ} (w : Fin n → Path) (t : Fin (m + 2) → Time) (δ : ℝ) (hδ : ∀ i : Fin (m + 1), (∑ j, (w j (t i.succ) - w j (t i.castSucc)) ^ 2) ≤ δ) : (∑ σ : Fin n → Bool, (Finset.univ.sup' univ_nonempty (fun i : Fin (m + 1) => |∑ j, (if σ j then (1 : ℝ) else -1) * (w j (t i.succ) - w j (t i.castSucc))|)) ^ 2) / (2 ^ n : ℝ) ≤ 32 * (1 + log (m + 1)) * δ := by /- Rewrite the square of the finite supremum of absolute values as the supremum of squares, using monotonicity of squaring on nonnegative reals. The result is `signMaxEnergy` and follows from `signed_grid_increment_max_energy_le`. -/ classical let a : Fin (m + 1) → Fin n → ℝ := fun i j => w j (t i.succ) - w j (t i.castSucc) let X : (Fin n → Bool) → Fin (m + 1) → ℝ := fun σ i => ∑ j, (if σ j then (1 : ℝ) else -1) * a i j have hmax (σ : Fin n → Bool) : (Finset.univ.sup' univ_nonempty (fun i => |X σ i|)) ^ 2 = Finset.univ.sup' univ_nonempty (fun i => (X σ i) ^ 2) := by let M := Finset.univ.sup' univ_nonempty (fun i => |X σ i|) have hM : 0 ≤ M := (abs_nonneg (X σ 0)).trans (Finset.le_sup' (fun i : Fin (m + 1) => |X σ i|) (by simp)) apply le_antisymm · obtain ⟨i, _, hi⟩ := Finset.exists_mem_eq_sup' univ_nonempty (fun i => |X σ i|) rw [hi] simpa only [sq_abs, abs_abs] using (Finset.le_sup' (fun i : Fin (m + 1) => (X σ i) ^ 2) (Finset.mem_univ i)) · apply Finset.sup'_le intro i _ have hi : |X σ i| ≤ M := Finset.le_sup' (fun i : Fin (m + 1) => |X σ i|) (by simp) nlinarith [abs_nonneg (X σ i), sq_abs (X σ i)] have heq : (∑ σ : Fin n → Bool, (Finset.univ.sup' univ_nonempty (fun i => |X σ i|)) ^ 2) / (2 ^ n : ℝ) = signMaxEnergy a := by unfold signMaxEnergy congr 1 apply Finset.sum_congr rfl intro σ _ exact hmax σ change (∑ σ : Fin n → Bool, (Finset.univ.sup' univ_nonempty (fun i => |X σ i|)) ^ 2) / (2 ^ n : ℝ) ≤ _ rw [heq] exact signed_grid_increment_max_energy_le w t δ hδ
    Causalean.Stat.Concentration.BoundedVariation.signed_grid_abs_max_energy_le · Causalean/Stat/Concentration/BoundedVariation/SignedLevelEnergy.lean:16
Signed­Series­L2 1 core · 0 supporting This module passes the finite sign-space triangle inequality to a summable sequence. ★ finite_sign_l2_tsum_le

Countable L₂ triangle inequality on finite sign space

This module passes the finite sign-space triangle inequality to a summable sequence. It is independent of path variation and dyadic grids.

theorem finite_sign_l2_tsum_le reviewed
Causalean.Stat.Concentration.BoundedVariation

If, for a series of real functions on the sign patterns of length n, the root sign-average second moments of its terms are summable, then the sign-average square of the series is at most the square of the sum of those root second moments.

Formal statement
n :
ℕ
F :
ℕ → (Fin n → Bool) → ℝ
hR :
Summable (fun k => sqrt ((∑ σ : Fin n → Bool, (F k σ) ^ 2) / (2 ^ n : ℝ)))
(∑ σ : Fin n → Bool, (∑' k, F k σ) ^ 2) / (2 ^ n : ℝ)
≤ (∑' k, sqrt ((∑ σ : Fin n → Bool, (F k σ) ^ 2) / (2 ^ n : ℝ))) ^ 2
Proof (Lean source)
theorem finite_sign_l2_tsum_le {n : ℕ} (F : ℕ → (Fin n → Bool) → ℝ) (hR : Summable (fun k => sqrt ((∑ σ : Fin n → Bool, (F k σ) ^ 2) / (2 ^ n : ℝ)))) : (∑ σ : Fin n → Bool, (∑' k, F k σ) ^ 2) / (2 ^ n : ℝ) ≤ (∑' k, sqrt ((∑ σ : Fin n → Bool, (F k σ) ^ 2) / (2 ^ n : ℝ))) ^ 2 := by classical have hc : 0 < (2 ^ n : ℝ) := by positivity let v : ℕ → EuclideanSpace ℝ (Fin n → Bool) := fun k => toLp 2 (fun σ => F k σ / sqrt (2 ^ n : ℝ)) have hv (k : ℕ) : ‖v k‖ = sqrt ((∑ σ : Fin n → Bool, (F k σ) ^ 2) / (2 ^ n : ℝ)) := by rw [EuclideanSpace.norm_eq] simp only [v, Real.norm_eq_abs, sq_abs] congr 1 calc (∑ σ : Fin n → Bool, (F k σ / sqrt (2 ^ n : ℝ)) ^ 2) = ∑ σ : Fin n → Bool, (F k σ) ^ 2 / (2 ^ n : ℝ) := by apply Finset.sum_congr rfl intro σ _ rw [div_pow, Real.sq_sqrt hc.le] _ = _ := by rw [Finset.sum_div] have hvs : Summable v := by apply Summable.of_norm simpa only [hv] using hR have hcoord (σ : Fin n → Bool) : (∑' k, v k) σ = (∑' k, F k σ) / sqrt (2 ^ n : ℝ) := by rw [← tsum_div_const] have h := hvs.map_tsum (EuclideanSpace.proj σ) (EuclideanSpace.proj σ).continuous simpa only [EuclideanSpace.coe_proj, v, PiLp.toLp_apply] using h have hsum : ‖∑' k, v k‖ ^ 2 = (∑ σ : Fin n → Bool, (∑' k, F k σ) ^ 2) / (2 ^ n : ℝ) := by rw [EuclideanSpace.real_norm_sq_eq] simp only [hcoord] calc (∑ σ : Fin n → Bool, ((∑' k, F k σ) / sqrt (2 ^ n : ℝ)) ^ 2) = ∑ σ : Fin n → Bool, (∑' k, F k σ) ^ 2 / (2 ^ n : ℝ) := by apply Finset.sum_congr rfl intro σ _ rw [div_pow, Real.sq_sqrt hc.le] _ = _ := by rw [Finset.sum_div] have htriangle := norm_tsum_le_tsum_norm (by simpa only [hv] using hR : Summable fun k => ‖v k‖) have hnonneg : 0 ≤ ∑' k, ‖v k‖ := tsum_nonneg fun _ => norm_nonneg _ have hsquared : ‖∑' k, v k‖ ^ 2 ≤ (∑' k, ‖v k‖) ^ 2 := by nlinarith [norm_nonneg (∑' k, v k)] simpa only [hsum, hv] using hsquared
Causalean.Stat.Concentration.BoundedVariation.finite_sign_l2_tsum_le · Causalean/Stat/Concentration/BoundedVariation/SignedSeriesL2.lean:15
Sign­Tail 2 core · 0 supporting An exponential-moment estimate gives a Gaussian tail for the uniform law on Boolean sign vectors. ★ signTailMass_le

Tail bound for a finite signed sum

An exponential-moment estimate gives a Gaussian tail for the uniform law on Boolean sign vectors. This is the first step toward a finite-class squared maximum estimate.

def signTailMass reviewed
Causalean.Stat.Concentration.BoundedVariation

The sign-tail mass of a coefficient vector in ℝ^n at a threshold u is the fraction of the 2^n sign vectors whose signed sum has absolute value at least u.

Definition (Lean source)
n :
ℕ
a :
Fin n → ℝ
u :
ℝ
signTailMass a u :
ℝ
(∑ σ : Fin n → Bool, if u ≤ |∑ j, (if σ j then (1 : ℝ) else -1) * a j| then (1 : ℝ) else 0) / (2 ^ n : ℝ)
Causalean.Stat.Concentration.BoundedVariation.signTailMass · Causalean/Stat/Concentration/BoundedVariation/SignTail.lean:16
theorem signTailMass_le reviewed
Causalean.Stat.Concentration.BoundedVariation

For a nonnegative threshold u and a coefficient vector with positive sum of squares, the fraction of sign vectors whose signed sum has absolute value at least u is at most 2·exp(−u^2/(2 times the sum of squared coefficients)), uniformly in the number of signs.

Formal statement
n :
ℕ
a :
Fin n → ℝ
u :
ℝ
hu :
0 ≤ u
hvar :
0 < ∑ j, (a j) ^ 2
signTailMass a u ≤ 2 * exp (-(u ^ 2 / (2 * ∑ j, (a j) ^ 2)))
Proof (Lean source)
theorem signTailMass_le {n : ℕ} (a : Fin n → ℝ) (u : ℝ) (hu : 0 ≤ u) (hvar : 0 < ∑ j, (a j) ^ 2) : signTailMass a u ≤ 2 * exp (-(u ^ 2 / (2 * ∑ j, (a j) ^ 2))) := by classical let V : ℝ := ∑ j, (a j) ^ 2 let X : (Fin n → Bool) → ℝ := fun σ => ∑ j, (if σ j then (1 : ℝ) else -1) * a j have hV : 0 < V := hvar have hVne : V ≠ 0 := ne_of_gt hV have hden : 0 ≤ (2 ^ n : ℝ) := by positivity have hmarkov (Y : (Fin n → Bool) → ℝ) (t : ℝ) (ht : 0 ≤ t) (hmgf : (∑ σ, exp (t * Y σ)) / (2 ^ n : ℝ) ≤ exp (t ^ 2 / 2 * V)) : (∑ σ, if u ≤ Y σ then (1 : ℝ) else 0) / (2 ^ n : ℝ) ≤ exp (-t * u + t ^ 2 / 2 * V) := by calc (∑ σ, if u ≤ Y σ then (1 : ℝ) else 0) / (2 ^ n : ℝ) ≤ (∑ σ, exp (-t * u) * exp (t * Y σ)) / (2 ^ n : ℝ) := by apply div_le_div_of_nonneg_right _ hden apply Finset.sum_le_sum intro σ _ by_cases hσ : u ≤ Y σ · simp only [if_pos hσ] calc (1 : ℝ) = exp (-t * u) * exp (t * u) := by rw [← Real.exp_add] simp _ ≤ exp (-t * u) * exp (t * Y σ) := by apply mul_le_mul_of_nonneg_left _ (Real.exp_nonneg _) exact Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left hσ ht) · simp only [if_neg hσ] positivity _ = exp (-t * u) * ((∑ σ, exp (t * Y σ)) / (2 ^ n : ℝ)) := by rw [← Finset.mul_sum] ring _ ≤ exp (-t * u) * exp (t ^ 2 / 2 * V) := mul_le_mul_of_nonneg_left hmgf (Real.exp_nonneg _) _ = exp (-t * u + t ^ 2 / 2 * V) := by rw [Real.exp_add] let t : ℝ := u / V have ht : 0 ≤ t := div_nonneg hu hV.le have hopt : -t * u + t ^ 2 / 2 * V = -(u ^ 2 / (2 * V)) := by dsimp [t] field_simp; ring have hpos : (∑ σ, if u ≤ X σ then (1 : ℝ) else 0) / (2 ^ n : ℝ) ≤ exp (-(u ^ 2 / (2 * V))) := by rw [← hopt] exact hmarkov X t ht (signMGF_le a t) have hneg : (∑ σ, if u ≤ -X σ then (1 : ℝ) else 0) / (2 ^ n : ℝ) ≤ exp (-(u ^ 2 / (2 * V))) := by rw [← hopt] apply hmarkov (fun σ => -X σ) t ht simpa only [X, V, mul_neg, neg_mul, neg_sq] using signMGF_le a (-t) have hsplit (σ : Fin n → Bool) : (if u ≤ |X σ| then (1 : ℝ) else 0) ≤ (if u ≤ X σ then (1 : ℝ) else 0) + (if u ≤ -X σ then (1 : ℝ) else 0) := by by_cases hσ : u ≤ |X σ| · rcases (le_abs.mp hσ) with hp | hn · by_cases hn' : u ≤ -X σ <;> simp [hσ, hp, hn'] · by_cases hp' : u ≤ X σ <;> simp [hσ, hn, hp'] · simp only [if_neg hσ] positivity calc signTailMass a u = (∑ σ, if u ≤ |X σ| then (1 : ℝ) else 0) / (2 ^ n : ℝ) := rfl _ ≤ (∑ σ, ((if u ≤ X σ then (1 : ℝ) else 0) + (if u ≤ -X σ then (1 : ℝ) else 0))) / (2 ^ n : ℝ) := by apply div_le_div_of_nonneg_right _ hden exact Finset.sum_le_sum (fun σ _ => hsplit σ) _ = (∑ σ, if u ≤ X σ then (1 : ℝ) else 0) / (2 ^ n : ℝ) + (∑ σ, if u ≤ -X σ then (1 : ℝ) else 0) / (2 ^ n : ℝ) := by rw [Finset.sum_add_distrib, add_div] _ ≤ exp (-(u ^ 2 / (2 * V))) + exp (-(u ^ 2 / (2 * V))) := add_le_add hpos hneg _ = 2 * exp (-(u ^ 2 / (2 * ∑ j, (a j) ^ 2))) := by dsimp [V] ring
Causalean.Stat.Concentration.BoundedVariation.signTailMass_le · Causalean/Stat/Concentration/BoundedVariation/SignTail.lean:25 · uses signTailMass
Tensor­Chebyshev 1 core · 1 supporting A continuous polynomial path in four variables whose cube evaluations have bounded variation and path size at most B has a tensor Chebyshev expansion whose coefficient paths are continuous, of bounded variation, and of s ★ tensorChebyshevPath_expansion

Tensor Chebyshev expansion of bounded-variation polynomial paths

A continuous polynomial path in four variables whose cube evaluations have bounded variation and path size at most B has a tensor Chebyshev expansion whose coefficient paths are continuous, of bounded variation, and of size at most 16 B. The polynomial algebra of the tensor Chebyshev basis lives in Causalean.Mathlib.Analysis.Approximation.Chebyshev.TensorChebyshev.

theorem tensorChebyshevPath_expansion reviewed
Causalean.Stat.Concentration.BoundedVariation

Let a time-indexed family of four-variable real polynomials and a nonnegative number B be given, with degree at most D in each variable at every time. If, at every point of the cube [−1, 1]^4, the value of the polynomial is continuous in time, has bounded variation in time, and has supremum-plus-variation size at most B, then there are continuous coefficient paths, one for each multi-index in {0, …, D}^4, such that at every time the polynomial equals the corresponding combination of products of first-kind Chebyshev polynomials, every coefficient path has bounded variation, and every coefficient path has size at most 16 B.

Formal statement
D :
ℕ
p :
Time → MvPolynomial (Fin 4) ℝ
B :
ℝ
hB :
0 ≤ B
hdeg :
∀ t i, (p t).degreeOf i ≤ D
hcont :
∀ x ∈ normalizedCube 4, Continuous (fun t => eval x (p t))
hBV :
∀ x (hx : x ∈ normalizedCube 4),
eVariationOn (⟨fun t => eval x (p t), hcont x hx⟩ : Path) univ < ⊤
hbound :
∀ x (hx : x ∈ normalizedCube 4),
pathSize (⟨fun t => eval x (p t), hcont x hx⟩ : Path) ≤ B
∃ c : (Fin 4 → Fin (D + 1)) → Path,
conclusion 1
t :
p t = tensorChebyshevPolynomial D (fun k => c k t)
conclusion 2
k :
eVariationOn (c k) univ < ⊤
conclusion 3
k :
pathSize (c k) ≤ 16 * B
Proof (Lean source)
theorem tensorChebyshevPath_expansion {D : ℕ} (p : Time → MvPolynomial (Fin 4) ℝ) (B : ℝ) (hB : 0 ≤ B) (hdeg : ∀ t i, (p t).degreeOf i ≤ D) (hcont : ∀ x ∈ normalizedCube 4, Continuous (fun t => eval x (p t))) (hBV : ∀ x (hx : x ∈ normalizedCube 4), eVariationOn (⟨fun t => eval x (p t), hcont x hx⟩ : Path) univ < ⊤) (hbound : ∀ x (hx : x ∈ normalizedCube 4), pathSize (⟨fun t => eval x (p t), hcont x hx⟩ : Path) ≤ B) : ∃ c : (Fin 4 → Fin (D + 1)) → Path, (∀ t, p t = tensorChebyshevPolynomial D (fun k => c k t)) ∧ (∀ k, eVariationOn (c k) univ < ⊤) ∧ (∀ k, pathSize (c k) ≤ 16 * B) := by obtain ⟨c, hc, hcbv, hcsz⟩ := tensorChebyshev_coefficientPath_size p B hB hcont hBV hbound refine ⟨c, ?_, hcbv, hcsz⟩ intro t have hfun : (fun k => c k t) = tensorChebyshevCoefficient D (p t) := funext (hc t) rw [hfun] exact tensorChebyshev_coeff_recovery D (p t) (hdeg t)
1 supporting declaration (lemmas, instances)
  • tensorChebyshev_coefficientPath_size theorem — The explicit tensor Chebyshev integral coefficients of a continuous polynomial path form continuous bounded-variation paths, each with size at most 16 B when every cube evaluation path has size at most B.
    D :
    ℕ
    p :
    Time → MvPolynomial (Fin 4) ℝ
    B :
    ℝ
    hB :
    0 ≤ B
    hcont :
    ∀ x ∈ normalizedCube 4, Continuous (fun t => eval x (p t))
    hBV :
    ∀ x (hx : x ∈ normalizedCube 4),
    eVariationOn (⟨fun t => eval x (p t), hcont x hx⟩ : Path) univ < ⊤
    hbound :
    ∀ x (hx : x ∈ normalizedCube 4),
    pathSize (⟨fun t => eval x (p t), hcont x hx⟩ : Path) ≤ B
    ∃ c : (Fin 4 → Fin (D + 1)) → Path,
    conclusion 1
    t k :
    c k t = tensorChebyshevCoefficient D (p t) k
    conclusion 2
    k :
    eVariationOn (c k) univ < ⊤
    conclusion 3
    k :
    pathSize (c k) ≤ 16 * B
    Proof (Lean source)
    theorem tensorChebyshev_coefficientPath_size {D : ℕ} (p : Time → MvPolynomial (Fin 4) ℝ) (B : ℝ) (hB : 0 ≤ B) (hcont : ∀ x ∈ normalizedCube 4, Continuous (fun t => eval x (p t))) (hBV : ∀ x (hx : x ∈ normalizedCube 4), eVariationOn (⟨fun t => eval x (p t), hcont x hx⟩ : Path) univ < ⊤) (hbound : ∀ x (hx : x ∈ normalizedCube 4), pathSize (⟨fun t => eval x (p t), hcont x hx⟩ : Path) ≤ B) : ∃ c : (Fin 4 → Fin (D + 1)) → Path, (∀ t k, c k t = tensorChebyshevCoefficient D (p t) k) ∧ (∀ k, eVariationOn (c k) univ < ⊤) ∧ (∀ k, pathSize (c k) ≤ 16 * B) := by let ν : Measure (Fin 4 → ℝ) := volume.restrict (periodBox 4) have hbox : periodBox 4 = Icc (fun _ : Fin 4 => -Real.pi) (fun _ => Real.pi) := by ext u simp only [periodBox, Set.mem_ofPred_eq, Set.mem_Icc, Pi.le_def] constructor · intro h exact ⟨fun i => (h i).1, fun i => (h i).2⟩ · rintro ⟨h₁, h₂⟩ i exact ⟨h₁ i, h₂ i⟩ have hvol : volume (periodBox 4) = ofReal ((2 * Real.pi) ^ 4) := by rw [hbox, Real.volume_Icc_pi, Fin.prod_univ_four] have h : Real.pi - -Real.pi = 2 * Real.pi := by ring simp only [h] rw [ENNReal.ofReal_pow (by positivity : 0 ≤ 2 * Real.pi)] simp [pow_succ, mul_assoc] have hmass : ν univ = ofReal ((2 * Real.pi) ^ 4) := by simp [ν, hvol] have hmass0 : ν univ ≠ 0 := by rw [hmass]; positivity letI : IsFiniteMeasure ν := ⟨by rw [hmass]; simp⟩ letI : NeZero ν := ⟨by intro hz; exact hmass0 (by simp [hz])⟩ let μ : Measure (Fin 4 → ℝ) := (ν univ)⁻¹ • ν letI : IsProbabilityMeasure μ := by change IsProbabilityMeasure ((ν univ)⁻¹ • ν) infer_instance let f : (Fin 4 → ℝ) → Path := fun u => ⟨fun t => eval (cosPoint u) (p t), hcont (cosPoint u) (cosPoint_mem_normalizedCube u)⟩ have hfBV (u : Fin 4 → ℝ) : eVariationOn (f u) univ < ⊤ := by simpa [f, cosPoint] using hBV (cosPoint u) (cosPoint_mem_normalizedCube u) have hfsize (u : Fin 4 → ℝ) : pathSize (f u) ≤ B := by simpa [f, cosPoint] using hbound (cosPoint u) (cosPoint_mem_normalizedCube u) have hpoly (q : MvPolynomial (Fin 4) ℝ) : Continuous (fun u : Fin 4 → ℝ => eval (cosPoint u) q) := by induction q using MvPolynomial.induction_on with | C a => simpa using (continuous_const : Continuous (fun _ : Fin 4 → ℝ => a)) | add q r hq hr => convert hq.add hr using 1 funext u simp [MvPolynomial.eval_add] | mul_X q i hq => convert hq.mul (by fun_prop : Continuous (fun u : Fin 4 → ℝ => cos (u i))) using 1 funext u simp [cosPoint, MvPolynomial.eval_mul, MvPolynomial.eval_X] let w (k : Fin 4 → Fin (D + 1)) (u : Fin 4 → ℝ) : ℝ := ∏ i : Fin 4, (if (k i : ℕ) = 0 then (1 : ℝ) else 2) * cos ((k i : ℕ) * u i) have hw (k : Fin 4 → Fin (D + 1)) (u : Fin 4 → ℝ) : |w k u| ≤ 16 := by have hi (i : Fin 4) : |(if (k i : ℕ) = 0 then (1 : ℝ) else 2) * cos ((k i : ℕ) * u i)| ≤ 2 := by have ha : 0 ≤ (if (k i : ℕ) = 0 then (1 : ℝ) else 2) ∧ (if (k i : ℕ) = 0 then (1 : ℝ) else 2) ≤ 2 := by split_ifs <;> norm_num rw [abs_mul, abs_of_nonneg ha.1] have hc := Real.abs_cos_le_one ((k i : ℕ) * u i) nlinarith [abs_nonneg (cos ((k i : ℕ) * u i))] simp only [w, Finset.abs_prod] calc (∏ i : Fin 4, |(if (k i : ℕ) = 0 then (1 : ℝ) else 2) * cos ((k i : ℕ) * u i)|) ≤ ∏ _i : Fin 4, (2 : ℝ) := Finset.prod_le_prod (fun i _ => abs_nonneg _) (fun i _ => hi i) _ = 16 := by norm_num [Fin.prod_univ_four] have hInt (k : Fin 4 → Fin (D + 1)) (t : Time) : Integrable (fun u => w k u * f u t) μ := by have hc : Continuous (fun u : Fin 4 → ℝ => w k u * f u t) := by exact (by fun_prop : Continuous (w k)).mul (hpoly (p t)) have hi : Integrable (fun u => w k u * f u t) ν := by change IntegrableOn (fun u => w k u * f u t) (periodBox 4) rw [hbox] exact hc.continuousOn.integrableOn_compact isCompact_Icc exact hi.smul_measure (by simpa only [ne_eq, ENNReal.inv_eq_top] using hmass0) choose c hc hcbv hcsz using fun k => weightedPathIntegral_size_le μ f (w k) B 16 hB (by norm_num) (hInt k) (hw k) hfBV hfsize refine ⟨c, ?_, hcbv, hcsz⟩ intro t k rw [hc k t] let A : ℝ := ∏ i : Fin 4, if (k i : ℕ) = 0 then (1 / (2 * Real.pi) : ℝ) else 1 / Real.pi let L : ℝ := (2 * Real.pi) ^ 4 have hL : L ≠ 0 := by positivity have hfactor (u : Fin 4 → ℝ) : w k u = L * A * (∏ i : Fin 4, cos ((k i : ℕ) * u i)) := by simp only [w, A, L, Finset.prod_mul_distrib] congr 1 simp only [Fin.prod_univ_four] split_ifs <;> field_simp [Real.pi_ne_zero] have hweighted : (∫ u, w k u * f u t ∂ν) = L * A * ∫ u in periodBox 4, (∏ i : Fin 4, cos ((k i : ℕ) * u i)) * eval (fun i => cos (u i)) (p t) := by change (∫ u in periodBox 4, w k u * eval (cosPoint u) (p t)) = _ simp_rw [hfactor] change (∫ u in periodBox 4, (L * A * ∏ i : Fin 4, cos ((k i : ℕ) * u i)) * eval (fun i => cos (u i)) (p t)) = _ simp only [mul_assoc, integral_const_mul] calc (∫ u, w k u * f u t ∂μ) = (ν univ)⁻¹.toReal * (∫ u, w k u * f u t ∂ν) := by simp [μ] _ = L⁻¹ * (L * A * ∫ u in periodBox 4, (∏ i : Fin 4, cos ((k i : ℕ) * u i)) * eval (fun i => cos (u i)) (p t)) := by rw [hmass, ENNReal.toReal_inv, ENNReal.toReal_ofReal (by positivity : 0 ≤ L)] exact congrArg _ hweighted _ = tensorChebyshevCoefficient D (p t) k := by let I : ℝ := ∫ u in periodBox 4, (∏ i : Fin 4, cos ((k i : ℕ) * u i)) * eval (fun i => cos (u i)) (p t) change L⁻¹ * (L * A * I) = A * I calc L⁻¹ * (L * A * I) = (L⁻¹ * L) * (A * I) := by ring _ = A * I := by rw [inv_mul_cancel₀ hL, one_mul]
    Causalean.Stat.Concentration.BoundedVariation.tensorChebyshev_coefficientPath_size · Causalean/Stat/Concentration/BoundedVariation/TensorChebyshev.lean:26
Tensor­Coefficient 2 core · 6 supporting For a continuous family of bounded-degree tensor polynomials, each fixed monomial coefficient is a continuous path. ★ tensorCoefficientPath_four_chebyshev_size_envelope

Bounded-variation tensor coefficient paths

For a continuous family of bounded-degree tensor polynomials, each fixed monomial coefficient is a continuous path. A uniform bounded-variation envelope for polynomial values on the normalized cube transfers to the coefficient paths with an explicit exponential degree cost.

def tensorCoefficientPath reviewed
Causalean.Stat.Concentration.BoundedVariation

The coefficient path of a time-indexed family of polynomials in d variables whose degree in each variable is at most D and whose values at every point of the integer grid {0, …, D}^d vary continuously in time, at a monomial index a, is the continuous real path on the unit time interval recording the coefficient of that monomial at each time.

Definition (Lean source)
d D :
ℕ
p :
Time → MvPolynomial (Fin d) ℝ
hdeg :
∀ t i, (p t).degreeOf i ≤ D
hgrid :
∀ a : Fin d → Fin (D + 1),
Continuous (fun t => eval (fun i => (a i : ℝ)) (p t))
a :
Fin d → Fin (D + 1)
tensorCoefficientPath p hdeg hgrid a :
⟨fun t => tensorCoeffs (D := D) (p t) a, continuous_tensorCoeffs_of_grid p hdeg hgrid a⟩
Causalean.Stat.Concentration.BoundedVariation.tensorCoefficientPath · Causalean/Stat/Concentration/BoundedVariation/TensorCoefficient.lean:30 · uses Path , Time
theorem tensorCoefficientPath_four_chebyshev_size_envelope reviewed
Causalean.Stat.Concentration.BoundedVariation

Let a time-indexed family of four-variable polynomials have degree at most 2(K − 1) in each variable and grid evaluations continuous in time. If its evaluation at every point of the normalized cube is continuous in time, of bounded variation, and of path size at most B, where B is nonnegative, then the summed path sizes of its monomial coefficient paths are at most 16 (2(K − 1) + 1)^4 (1 + √2)^(8(K − 1)) B.

Formal statement
K :
ℕ
p :
Time → MvPolynomial (Fin 4) ℝ
B :
ℝ
hB :
0 ≤ B
hdeg :
∀ t i, (p t).degreeOf i ≤ 2 * (K - 1)
hgrid :
∀ a : Fin 4 → Fin (2 * (K - 1) + 1),
Continuous (fun t => eval (fun i => (a i : ℝ)) (p t))
hcont :
∀ x ∈ normalizedCube 4, Continuous (fun t => eval x (p t))
hBV :
∀ x (hx : x ∈ normalizedCube 4),
eVariationOn (⟨fun t => eval x (p t), hcont x hx⟩ : Path) univ < ⊤
hbound :
∀ x (hx : x ∈ normalizedCube 4),
pathSize (⟨fun t => eval x (p t), hcont x hx⟩ : Path) ≤ B
(∑ a, pathSize (tensorCoefficientPath p hdeg hgrid a))
≤ (16 : ℝ) * (↑(2 * (K - 1) + 1) : ℝ) ^ 4 * (1 + sqrt 2) ^ (4 * (2 * (K - 1))) * B
Proof (Lean source)
theorem tensorCoefficientPath_four_chebyshev_size_envelope {K : ℕ} (p : Time → MvPolynomial (Fin 4) ℝ) (B : ℝ) (hB : 0 ≤ B) (hdeg : ∀ t i, (p t).degreeOf i ≤ 2 * (K - 1)) (hgrid : ∀ a : Fin 4 → Fin (2 * (K - 1) + 1), Continuous (fun t => eval (fun i => (a i : ℝ)) (p t))) (hcont : ∀ x ∈ normalizedCube 4, Continuous (fun t => eval x (p t))) (hBV : ∀ x (hx : x ∈ normalizedCube 4), eVariationOn (⟨fun t => eval x (p t), hcont x hx⟩ : Path) univ < ⊤) (hbound : ∀ x (hx : x ∈ normalizedCube 4), pathSize (⟨fun t => eval x (p t), hcont x hx⟩ : Path) ≤ B) : (∑ a, pathSize (tensorCoefficientPath p hdeg hgrid a)) ≤ (16 : ℝ) * (↑(2 * (K - 1) + 1) : ℝ) ^ 4 * (1 + sqrt 2) ^ (4 * (2 * (K - 1))) * B := by /- Apply `tensorChebyshevPath_expansion` with `D = 2 * (K - 1)` and obtain bounded coefficient paths `c`. At each time, take `tensorCoeffs` of that expansion; `tensorChebyshevBasis_coeff_factorization` and `MvPolynomial.coeff_sum` express the monomial coefficient path as a fixed weighted sum of the `c k` paths. Apply `pathSize_weighted_sum_le`, sum over monomial indices, swap finite sums, and use `tensorChebyshevBasis_coeff_oneNorm_le`. The remaining index count is `Fintype.card_fun` and `Fintype.card_fin`, giving `(D+1)^4`. -/ classical let D := 2 * (K - 1) let I := Fin 4 → Fin (D + 1) obtain ⟨c, hc, hcbv, hcsz⟩ := tensorChebyshevPath_expansion (D := D) p B hB hdeg hcont hBV hbound let w (a k : I) : ℝ := tensorCoeffs (D := D) (tensorChebyshevBasis D k) a have hpath (a : I) : tensorCoefficientPath p hdeg hgrid a = ∑ k : I, w a k • c k := by ext t have ht := congrArg (fun q => tensorCoeffs (D := D) q a) (hc t) simp only [tensorChebyshevPolynomial, tensorCoeffs, MvPolynomial.coeff_sum, MvPolynomial.coeff_C_mul] at ht simpa [tensorCoefficientPath, w, tensorCoeffs, smul_eq_mul, mul_comm] using ht have hw (k : I) : (∑ a : I, |w a k|) ≤ (1 + sqrt 2) ^ (4 * D) := tensorChebyshevBasis_coeff_oneNorm_le D k calc (∑ a : I, pathSize (tensorCoefficientPath p hdeg hgrid a)) = ∑ a : I, pathSize (∑ k : I, w a k • c k) := by simp only [hpath] _ ≤ ∑ a : I, ∑ k : I, |w a k| * pathSize (c k) := Finset.sum_le_sum (fun a _ => pathSize_weighted_sum_le c (w a) hcbv) _ = ∑ k : I, (∑ a : I, |w a k|) * pathSize (c k) := by rw [Finset.sum_comm] simp [Finset.sum_mul] _ ≤ ∑ k : I, (1 + sqrt 2) ^ (4 * D) * (16 * B) := by apply Finset.sum_le_sum intro k _ exact mul_le_mul (hw k) (hcsz k) (pathSize_nonneg _) (by positivity) _ = (16 : ℝ) * (↑(D + 1) : ℝ) ^ 4 * (1 + sqrt 2) ^ (4 * D) * B := by simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fun, Fintype.card_fin, I] push_cast ring
Causalean.Stat.Concentration.BoundedVariation.tensorCoefficientPath_four_chebyshev_size_envelope · Causalean/Stat/Concentration/BoundedVariation/TensorCoefficient.lean:481 · uses normalizedCube , Time , pathSize , tensorCoefficientPath
6 supporting declarations (lemmas, instances)
  • eVariationOn_integral_le_of_uniform theorem — Integrating time-indexed functions against a probability measure preserves a uniform bound on their total variation. Every time section is integrable, and the samplewise extended variation is at most the finite real bound B.
    α :
    f :
    α → Time → ℝ
    B :
    ℝ
    hB :
    0 ≤ B
    hInt :
    ∀ t, Integrable (fun x => f x t) μ
    hvar :
    ∀ x, eVariationOn (f x) univ ≤ ofReal B
    eVariationOn (fun t => ∫ x, f x t ∂μ) univ ≤ ofReal B
    Proof (Lean source)
    theorem eVariationOn_integral_le_of_uniform {α : Type*} [MeasurableSpace α] (μ : Measure α) [IsProbabilityMeasure μ] (f : α → Time → ℝ) (B : ℝ) (hB : 0 ≤ B) (hInt : ∀ t, Integrable (fun x => f x t) μ) (hvar : ∀ x, eVariationOn (f x) univ ≤ ofReal B) : eVariationOn (fun t => ∫ x, f x t ∂μ) univ ≤ ofReal B := by rw [eVariationOn] refine iSup_le fun p => ?_ obtain ⟨n, u, hu, _⟩ := p have hstep (i : ℕ) : Integrable (fun x => dist (f x (u (i + 1))) (f x (u i))) μ := by simpa [Real.dist_eq] using (hInt (u (i + 1))).sub (hInt (u i)) |>.abs have hpoint (x : α) : (∑ i ∈ range n, dist (f x (u (i + 1))) (f x (u i))) ≤ B := by have hv := (eVariationOn.sum_le (f := f x) (n := n) hu (fun _ => Set.mem_univ _)).trans (hvar x) have he : ofReal (∑ i ∈ range n, dist (f x (u (i + 1))) (f x (u i))) ≤ ofReal B := by simpa [ENNReal.ofReal_sum_of_nonneg (fun i _ => dist_nonneg), edist_dist] using hv exact (ENNReal.ofReal_le_ofReal_iff hB).mp he have hsum : Integrable (fun x => ∑ i ∈ range n, dist (f x (u (i + 1))) (f x (u i))) μ := integrable_finsetSum _ (fun i _ => hstep i) have hreal : (∑ i ∈ range n, dist (∫ x, f x (u (i + 1)) ∂μ) (∫ x, f x (u i) ∂μ)) ≤ B := by calc _ ≤ ∑ i ∈ range n, ∫ x, dist (f x (u (i + 1))) (f x (u i)) ∂μ := by apply Finset.sum_le_sum intro i _ simpa [Real.dist_eq, integral_sub (hInt (u (i + 1))) (hInt (u i))] using (abs_integral_le_integral_abs (f := fun x => f x (u (i + 1)) - f x (u i)) (μ := μ)) _ = ∫ x, ∑ i ∈ range n, dist (f x (u (i + 1))) (f x (u i)) ∂μ := by exact (integral_finsetSum _ (fun i _ => hstep i)).symm _ ≤ ∫ _ : α, B ∂μ := integral_mono hsum (integrable_const B) hpoint _ = B := by simp have he : ofReal (∑ i ∈ range n, dist (∫ x, f x (u (i + 1)) ∂μ) (∫ x, f x (u i) ∂μ)) ≤ ofReal B := ENNReal.ofReal_le_ofReal hreal simpa [ENNReal.ofReal_sum_of_nonneg (fun i _ => dist_nonneg), edist_dist] using he
    Causalean.Stat.Concentration.BoundedVariation.eVariationOn_integral_le_of_uniform · Causalean/Stat/Concentration/BoundedVariation/TensorCoefficient.lean:48
  • tensorCoefficientPath_bv_of_cube theorem — If every value of a degree-bounded tensor-polynomial family on the normalized cube has finite total variation in time, then every fixed monomial coefficient path has finite total variation. The conclusion is qualitative and does not use a uniform variation envelope.
    d D :
    ℕ
    p :
    Time → MvPolynomial (Fin d) ℝ
    hdeg :
    ∀ t i, (p t).degreeOf i ≤ D
    hgrid :
    ∀ a : Fin d → Fin (D + 1),
    Continuous (fun t => eval (fun i => (a i : ℝ)) (p t))
    hcont :
    ∀ x ∈ normalizedCube d, Continuous (fun t => eval x (p t))
    hBV :
    ∀ x (hx : x ∈ normalizedCube d),
    eVariationOn (⟨fun t => eval x (p t), hcont x hx⟩ : Path) univ < ⊤
    a :
    eVariationOn (tensorCoefficientPath p hdeg hgrid a) univ < ⊤
    Proof (Lean source)
    theorem tensorCoefficientPath_bv_of_cube {d D : ℕ} (p : Time → MvPolynomial (Fin d) ℝ) (hdeg : ∀ t i, (p t).degreeOf i ≤ D) (hgrid : ∀ a : Fin d → Fin (D + 1), Continuous (fun t => eval (fun i => (a i : ℝ)) (p t))) (hcont : ∀ x ∈ normalizedCube d, Continuous (fun t => eval x (p t))) (hBV : ∀ x (hx : x ∈ normalizedCube d), eVariationOn (⟨fun t => eval x (p t), hcont x hx⟩ : Path) Set.univ < ⊤) : ∀ a, eVariationOn (tensorCoefficientPath p hdeg hgrid a) Set.univ < ⊤ := by classical let I := Fin d → Fin (D + 1) let V := I → ℝ let x : I → Fin d → ℝ := fun b i => (b i : ℝ) / (D + 1) have hx (b : I) : x b ∈ normalizedCube d := by intro i change -1 ≤ (b i : ℝ) / (D + 1) ∧ (b i : ℝ) / (D + 1) ≤ 1 have hD : (0 : ℝ) < D + 1 := by positivity have hb : (b i : ℝ) ≤ D := by exact_mod_cast le_of_lt_succ (b i).isLt constructor · apply (le_div_iff₀ hD).2 nlinarith [show (0 : ℝ) ≤ (b i : ℝ) by positivity] · apply (div_le_iff₀ hD).2 nlinarith let E : V →ₗ[ℝ] V := { toFun := fun c b => ∑ a : I, c a * eval (x b) (monomial (tensorExponent a) (1 : ℝ)) map_add' := by intro c c' funext b change (∑ a, (c a + c' a) * _) = (∑ a, c a * _) + ∑ a, c' a * _ simp [add_mul, Finset.sum_add_distrib] map_smul' := by intro r c funext b change (∑ a, (r * c a) * _) = r * ∑ a, c a * _ simp [mul_assoc, Finset.mul_sum] } have hEval (c : V) (b : I) : E c b = eval (x b) (tensorPolynomial c) := by change (∑ a, c a * eval (x b) (monomial (tensorExponent a) (1 : ℝ))) = _ simp [tensorPolynomial, MvPolynomial.eval_monomial] rfl have hdegpoly (c : V) (i : Fin d) : (tensorPolynomial c).degreeOf i ≤ D := by apply MvPolynomial.degreeOf_le_iff.mpr intro m hm have hc : (tensorPolynomial c).coeff m ≠ 0 := MvPolynomial.mem_support_iff.mp hm simp only [tensorPolynomial, MvPolynomial.coeff_sum, MvPolynomial.coeff_monomial] at hc obtain ⟨a, _, ha⟩ := Finset.exists_ne_zero_of_sum_ne_zero hc split_ifs at ha with he · rw [← he] change (a i : ℕ) ≤ D exact le_of_lt_succ (a i).isLt · exact (ha rfl).elim have hcoeff (c : V) (a : I) : tensorCoeffs (tensorPolynomial c) a = c a := by have hExp : Injective (tensorExponent (d := d) (D := D)) := by intro b b' h funext i apply Fin.ext have hi := congrArg (fun m : Fin d →₀ ℕ => m i) h simpa [tensorExponent] using hi simp only [tensorCoeffs, tensorPolynomial, MvPolynomial.coeff_sum, MvPolynomial.coeff_monomial] rw [Finset.sum_eq_single a] · simp · intro b _ hba have hne : tensorExponent b ≠ tensorExponent a := fun h => hba (hExp h) simp [hne] · intro h exact (h (Finset.mem_univ a)).elim have hinj : Injective E := by intro c c' h let S : Fin d → Finset ℝ := fun _ => Finset.univ.image (fun j : Fin (D + 1) => (j : ℝ) / (D + 1)) have hcard (i : Fin d) : (S i).card = D + 1 := by dsimp [S] rw [Finset.card_image_of_injective] · simp · intro a b hab apply Fin.ext have hD : (D + 1 : ℝ) ≠ 0 := by positivity have : (a : ℝ) = (b : ℝ) := (div_left_inj' hD).mp hab exact_mod_cast this have hpoly : tensorPolynomial c = tensorPolynomial c' := by have hdegree (i : Fin d) : (tensorPolynomial c - tensorPolynomial c').degreeOf i < (S i).card := by rw [hcard i] exact lt_of_le_of_lt (MvPolynomial.degreeOf_sub_le i (tensorPolynomial c) (tensorPolynomial c')) (Nat.lt_succ_of_le (max_le (hdegpoly c i) (hdegpoly c' i))) have hzero : tensorPolynomial c - tensorPolynomial c' = 0 := MvPolynomial.eq_zero_of_eval_zero_at_prod_finset (tensorPolynomial c - tensorPolynomial c') S hdegree (by intro y hy have hchoice : ∀ i : Fin d, ∃ b : Fin (D + 1), (b : ℝ) / (D + 1) = y i := by intro i obtain ⟨b, _, hb⟩ := Finset.mem_image.mp (hy i) exact ⟨b, hb⟩ choose b hb using hchoice have hxy : x b = y := funext hb have he := congrArg (fun v : V => v b) h simpa [hEval, MvPolynomial.eval_sub, hxy] using sub_eq_zero.mpr he) exact sub_eq_zero.mp hzero funext b calc c b = tensorCoeffs (tensorPolynomial c) b := (hcoeff c b).symm _ = tensorCoeffs (tensorPolynomial c') b := by rw [hpoly] _ = c' b := hcoeff c' b let e := LinearEquiv.ofBijective E ⟨hinj, LinearMap.surjective_of_injective hinj⟩ let g : Time → V := fun t b => eval (x b) (p t) have hg (t : Time) : g t = E (tensorCoeffs (D := D) (p t)) := by funext b change eval (x b) (p t) = E (tensorCoeffs (p t)) b rw [hEval, tensorPolynomial_tensorCoeffs (p t) (hdeg t)] have hformula (a : I) (t : Time) : tensorCoeffs (p t) a = ∑ b : I, (e.symm (single b (1 : ℝ))) a * g t b := by have he : e.symm (g t) = tensorCoeffs (p t) := by rw [hg] exact e.symm_apply_apply _ rw [← congrArg (fun v : V => v a) he] conv_lhs => rw [← LinearMap.sum_single_apply (fun _ : I => ℝ) (g t)] rw [map_sum] rw [Finset.sum_apply] apply Finset.sum_congr rfl intro b _ have hs : single b (g t b) = (g t b) • single b (1 : ℝ) := by rw [← Pi.single_smul] simp rw [hs, map_smul] change g t b * (e.symm (single b (1 : ℝ))) a = (e.symm (single b (1 : ℝ))) a * g t b ring have hadd (f k : Time → ℝ) : eVariationOn (fun t => f t + k t) Set.univ ≤ eVariationOn f Set.univ + eVariationOn k Set.univ := by apply iSup_le rintro ⟨n, ⟨u, hu, hus⟩⟩ calc (∑ i ∈ range n, edist (f (u (i + 1)) + k (u (i + 1))) (f (u i) + k (u i))) ≤ (∑ i ∈ range n, edist (f (u (i + 1))) (f (u i))) + (∑ i ∈ range n, edist (k (u (i + 1))) (k (u i))) := by rw [← Finset.sum_add_distrib] exact Finset.sum_le_sum (fun i _ => edist_add_add_le _ _ _ _) _ ≤ eVariationOn f Set.univ + eVariationOn k Set.univ := add_le_add (eVariationOn.sum_le hu hus) (eVariationOn.sum_le hu hus) have hsum (s : Finset I) (f : I → Time → ℝ) : eVariationOn (fun t => ∑ b ∈ s, f b t) Set.univ ≤ ∑ b ∈ s, eVariationOn (f b) Set.univ := by induction s using Finset.induction_on with | empty => simpa using (eVariationOn.constant_on (f := fun _ : Time => (0 : ℝ)) (s := Set.univ) (by simp)) | @insert b s hbs ih => simp only [Finset.sum_insert hbs] exact (hadd (f b) _).trans (add_le_add_right ih _) have hmul (r : ℝ) (f : Time → ℝ) : eVariationOn (fun t => r * f t) Set.univ ≤ (‖r‖₊ : ENNReal) * eVariationOn f Set.univ := by have h := (lipschitzWith_smul r).lipschitzOnWith.comp_eVariationOn_le (g := f) (s := Set.univ) (t := Set.univ) (by simp) simpa [Function.comp_def, smul_eq_mul] using h intro a have hvar : eVariationOn (tensorCoefficientPath p hdeg hgrid a) Set.univ ≤ ∑ b : I, (‖(e.symm (single b (1 : ℝ))) a‖₊ : ENNReal) * eVariationOn (g · b) Set.univ := by calc _ = eVariationOn (fun t => ∑ b : I, (e.symm (single b (1 : ℝ))) a * g t b) Set.univ := by congr 1 funext t exact hformula a t _ ≤ ∑ b : I, eVariationOn (fun t => (e.symm (single b (1 : ℝ))) a * g t b) Set.univ := by simpa using hsum univ (fun b t => (e.symm (single b (1 : ℝ))) a * g t b) _ ≤ _ := Finset.sum_le_sum (fun b _ => hmul _ _) apply lt_of_le_of_lt hvar apply (ENNReal.sum_lt_top).2 intro b _ exact ENNReal.mul_lt_top (by simp) (hBV (x b) (hx b))
    Causalean.Stat.Concentration.BoundedVariation.tensorCoefficientPath_bv_of_cube · Causalean/Stat/Concentration/BoundedVariation/TensorCoefficient.lean:102
  • pathSize_weighted_sum_le theorem — A finite fixed linear combination of bounded-variation paths has path size at most the absolute-weighted sum of their path sizes. This controls both the uniform norm and every time-partition increment sum with the same coefficients.
    ι :
    Type*
    c :
    ι → Path
    w :
    ι → ℝ
    hBV :
    ∀ i, eVariationOn (c i) univ < ⊤
    pathSize (∑ i, w i • c i) ≤ ∑ i, |w i| * pathSize (c i)
    Proof (Lean source)
    theorem pathSize_weighted_sum_le {ι : Type*} [Fintype ι] (c : ι → Path) (w : ι → ℝ) (hBV : ∀ i, eVariationOn (c i) univ < ⊤) : pathSize (∑ i, w i • c i) ≤ ∑ i, |w i| * pathSize (c i) := by classical have hnorm : ‖∑ i, w i • c i‖ ≤ ∑ i, |w i| * ‖c i‖ := by calc ‖∑ i, w i • c i‖ ≤ ∑ i, ‖w i • c i‖ := norm_sum_le _ _ _ = ∑ i, |w i| * ‖c i‖ := by simp [norm_smul, Real.norm_eq_abs] have hadd (f g : Time → ℝ) : eVariationOn (fun t => f t + g t) univ ≤ eVariationOn f univ + eVariationOn g univ := by apply iSup_le rintro ⟨n, ⟨u, hu, hus⟩⟩ calc (∑ j ∈ range n, edist (f (u (j + 1)) + g (u (j + 1))) (f (u j) + g (u j))) ≤ (∑ j ∈ range n, edist (f (u (j + 1))) (f (u j))) + (∑ j ∈ range n, edist (g (u (j + 1))) (g (u j))) := by rw [← Finset.sum_add_distrib] exact Finset.sum_le_sum (fun j _ => edist_add_add_le _ _ _ _) _ ≤ eVariationOn f univ + eVariationOn g univ := add_le_add (eVariationOn.sum_le hu hus) (eVariationOn.sum_le hu hus) have hsum (s : Finset ι) (f : ι → Time → ℝ) : eVariationOn (fun t => ∑ i ∈ s, f i t) univ ≤ ∑ i ∈ s, eVariationOn (f i) univ := by induction s using Finset.induction_on with | empty => simpa using (eVariationOn.constant_on (f := fun _ : Time => (0 : ℝ)) (s := univ) (by simp)) | @insert i s his ih => simp only [Finset.sum_insert his] exact (hadd (f i) _).trans (add_le_add_right ih _) have hmul (r : ℝ) (f : Time → ℝ) : eVariationOn (fun t => r * f t) univ ≤ (‖r‖₊ : ENNReal) * eVariationOn f univ := by have h := (lipschitzWith_smul r).lipschitzOnWith.comp_eVariationOn_le (g := f) (s := univ) (t := univ) (by simp) simpa [Function.comp_def, smul_eq_mul] using h have hvar : eVariationOn (fun t => (∑ i, w i • c i) t) univ ≤ ∑ i, (‖w i‖₊ : ENNReal) * eVariationOn (c i) univ := by calc _ ≤ ∑ i, eVariationOn (fun t => w i * c i t) univ := by simpa [smul_eq_mul] using hsum univ (fun i t => w i * c i t) _ ≤ _ := Finset.sum_le_sum (fun i _ => hmul (w i) (c i)) have hfin : (∑ i, (‖w i‖₊ : ENNReal) * eVariationOn (c i) univ) < ⊤ := ENNReal.sum_lt_top.mpr (fun i _ => ENNReal.mul_lt_top (by simp) (hBV i)) have htv : pathTV (∑ i, w i • c i) ≤ ∑ i, |w i| * pathTV (c i) := by have h := ENNReal.toReal_mono (ne_of_lt hfin) hvar rw [ENNReal.toReal_sum (fun i _ => ne_of_lt (ENNReal.mul_lt_top (by simp) (hBV i)))] at h change (eVariationOn (fun t => (∑ i, w i • c i : Path) t) univ).toReal ≤ ∑ i, |w i| * pathTV (c i) simpa [pathTV, ENNReal.toReal_mul, Real.norm_eq_abs] using h dsimp [pathSize] simp only [Finset.sum_add_distrib, mul_add] linarith
    Causalean.Stat.Concentration.BoundedVariation.pathSize_weighted_sum_le · Causalean/Stat/Concentration/BoundedVariation/TensorCoefficient.lean:300
  • tensorCoeffs_four_cube_weights theorem — Every coefficient of a four-variable polynomial of coordinatewise degree 2(K-1) is a fixed weighted sum of its values at one finite tensor grid inside the normalized cube. The total absolute weight over all coefficients and grid points has an exponential degree bound.
    K :
    ℕ
    hK :
    0 < K
    ∃ (x : (Fin 4 → Fin (2 * (K - 1) + 1)) → Fin 4 → ℝ) (w : (Fin 4 → Fin (2 * (K - 1) + 1)) → (Fin 4 → Fin (2 * (K - 1) + 1)) → ℝ),
    conclusion 1
    b :
    x b ∈ normalizedCube 4
    conclusion 2
    p :
    (∀ i, p.degreeOf i ≤ 2 * (K - 1))
    a :
    tensorCoeffs (D := 2 * (K - 1)) p a = ∑ b, w a b * eval (x b) p
    conclusion 3
    (∑ a, ∑ b, |w a b|) ≤ (2 : ℝ) ^ (40 * K + 19)
    Proof (Lean source)
    theorem tensorCoeffs_four_cube_weights {K : ℕ} (hK : 0 < K) : ∃ (x : (Fin 4 → Fin (2 * (K - 1) + 1)) → Fin 4 → ℝ) (w : (Fin 4 → Fin (2 * (K - 1) + 1)) → (Fin 4 → Fin (2 * (K - 1) + 1)) → ℝ), (∀ b, x b ∈ normalizedCube 4) ∧ (∀ (p : MvPolynomial (Fin 4) ℝ), (∀ i, p.degreeOf i ≤ 2 * (K - 1)) → ∀ a, tensorCoeffs (D := 2 * (K - 1)) p a = ∑ b, w a b * eval (x b) p) ∧ (∑ a, ∑ b, |w a b|) ≤ (2 : ℝ) ^ (40 * K + 19) := by refine ⟨tensorGridPoint, tensorGridWeight, tensorGridPoint_mem_cube, ?_, ?_⟩ · intro p hdeg a exact tensorGrid_coeff_recovery p hdeg a · calc (∑ a : Fin 4 → Fin (2 * (K - 1) + 1), ∑ b : Fin 4 → Fin (2 * (K - 1) + 1), |tensorGridWeight a b|) ≤ ((2 : ℝ) ^ (4 * (2 * (K - 1)) + 4)) ^ 4 := tensorGrid_weight_oneNorm_le 4 (2 * (K - 1)) _ = (2 : ℝ) ^ (4 * (4 * (2 * (K - 1)) + 4)) := by rw [show 4 * (4 * (2 * (K - 1)) + 4) = (4 * (2 * (K - 1)) + 4) * 4 by omega, pow_mul] _ ≤ (2 : ℝ) ^ (40 * K + 19) := by apply pow_le_pow_right₀ (by norm_num) omega
    Causalean.Stat.Concentration.BoundedVariation.tensorCoeffs_four_cube_weights · Causalean/Stat/Concentration/BoundedVariation/TensorCoefficient.lean:361
  • tensorCoefficientPath_four_size_envelope theorem — For four coordinates and coordinatewise degree 2(K-1), a uniform bound B on the path sizes of all cube evaluations bounds the sum of monomial coefficient path sizes by 2^(40K+20) B, provided those evaluation paths have finite variation.
    K :
    ℕ
    hK :
    0 < K
    p :
    Time → MvPolynomial (Fin 4) ℝ
    B :
    ℝ
    hB :
    0 ≤ B
    hdeg :
    ∀ t i, (p t).degreeOf i ≤ 2 * (K - 1)
    hgrid :
    ∀ a : Fin 4 → Fin (2 * (K - 1) + 1),
    Continuous (fun t => eval (fun i => (a i : ℝ)) (p t))
    hcont :
    ∀ x ∈ normalizedCube 4, Continuous (fun t => eval x (p t))
    hBV :
    ∀ x (hx : x ∈ normalizedCube 4),
    eVariationOn (⟨fun t => eval x (p t), hcont x hx⟩ : Path) univ < ⊤
    hbound :
    ∀ x (hx : x ∈ normalizedCube 4),
    pathSize (⟨fun t => eval x (p t), hcont x hx⟩ : Path) ≤ B
    (∑ a, pathSize (tensorCoefficientPath p hdeg hgrid a)) ≤ (2 : ℝ) ^ (40 * K + 20) * B
    Proof (Lean source)
    theorem tensorCoefficientPath_four_size_envelope {K : ℕ} (hK : 0 < K) (p : Time → MvPolynomial (Fin 4) ℝ) (B : ℝ) (hB : 0 ≤ B) (hdeg : ∀ t i, (p t).degreeOf i ≤ 2 * (K - 1)) (hgrid : ∀ a : Fin 4 → Fin (2 * (K - 1) + 1), Continuous (fun t => eval (fun i => (a i : ℝ)) (p t))) (hcont : ∀ x ∈ normalizedCube 4, Continuous (fun t => eval x (p t))) (hBV : ∀ x (hx : x ∈ normalizedCube 4), eVariationOn (⟨fun t => eval x (p t), hcont x hx⟩ : Path) univ < ⊤) (hbound : ∀ x (hx : x ∈ normalizedCube 4), pathSize (⟨fun t => eval x (p t), hcont x hx⟩ : Path) ≤ B) : (∑ a, pathSize (tensorCoefficientPath p hdeg hgrid a)) ≤ (2 : ℝ) ^ (40 * K + 20) * B := by classical obtain ⟨x, w, hx, hrecover, hw⟩ := tensorCoeffs_four_cube_weights hK let c (b : Fin 4 → Fin (2 * (K - 1) + 1)) : Path := ⟨fun t => eval (x b) (p t), hcont (x b) (hx b)⟩ have hcBV (b) : eVariationOn (c b) univ < ⊤ := hBV (x b) (hx b) have hcBound (b) : pathSize (c b) ≤ B := hbound (x b) (hx b) have hpath (a : Fin 4 → Fin (2 * (K - 1) + 1)) : tensorCoefficientPath p hdeg hgrid a = ∑ b, w a b • c b := by ext t simpa [tensorCoefficientPath, c, smul_eq_mul] using hrecover (p t) (hdeg t) a calc (∑ a, pathSize (tensorCoefficientPath p hdeg hgrid a)) = ∑ a, pathSize (∑ b, w a b • c b) := by simp only [hpath] _ ≤ ∑ a, ∑ b, |w a b| * pathSize (c b) := Finset.sum_le_sum (fun a _ => pathSize_weighted_sum_le c (w a) hcBV) _ ≤ ∑ a, ∑ b, |w a b| * B := by apply Finset.sum_le_sum intro a _ apply Finset.sum_le_sum intro b _ exact mul_le_mul_of_nonneg_left (hcBound b) (abs_nonneg _) _ = (∑ a, ∑ b, |w a b|) * B := by simp [Finset.sum_mul] _ ≤ (2 : ℝ) ^ (40 * K + 19) * B := mul_le_mul_of_nonneg_right hw hB _ ≤ (2 : ℝ) ^ (40 * K + 20) * B := by apply mul_le_mul_of_nonneg_right _ hB apply pow_le_pow_right₀ (by norm_num) omega
    Causalean.Stat.Concentration.BoundedVariation.tensorCoefficientPath_four_size_envelope · Causalean/Stat/Concentration/BoundedVariation/TensorCoefficient.lean:397
  • tensorCoefficientPath_four_bv_envelope theorem — A four-variable tensor polynomial family of coordinatewise degree 2(K-1) has coefficient paths whose summed path sizes obey a coarse exponential degree envelope, provided every cube evaluation has bounded variation and path size at most B.
    K :
    ℕ
    hK :
    0 < K
    p :
    Time → MvPolynomial (Fin 4) ℝ
    B :
    ℝ
    hB :
    0 ≤ B
    hdeg :
    ∀ t i, (p t).degreeOf i ≤ 2 * (K - 1)
    hgrid :
    ∀ a : Fin 4 → Fin (2 * (K - 1) + 1),
    Continuous (fun t => eval (fun i => (a i : ℝ)) (p t))
    hcont :
    ∀ x ∈ normalizedCube 4, Continuous (fun t => eval x (p t))
    hBV :
    ∀ x (hx : x ∈ normalizedCube 4),
    eVariationOn (⟨fun t => eval x (p t), hcont x hx⟩ : Path) univ < ⊤
    hbound :
    ∀ x (hx : x ∈ normalizedCube 4),
    pathSize (⟨fun t => eval x (p t), hcont x hx⟩ : Path) ≤ B
    conclusion 1
    a :
    eVariationOn (tensorCoefficientPath p hdeg hgrid a) univ < ⊤
    conclusion 2
    (∑ a, pathSize (tensorCoefficientPath p hdeg hgrid a)) ≤ (2 : ℝ) ^ (40 * K + 20) * B
    Proof (Lean source)
    theorem tensorCoefficientPath_four_bv_envelope {K : ℕ} (hK : 0 < K) (p : Time → MvPolynomial (Fin 4) ℝ) (B : ℝ) (hB : 0 ≤ B) (hdeg : ∀ t i, (p t).degreeOf i ≤ 2 * (K - 1)) (hgrid : ∀ a : Fin 4 → Fin (2 * (K - 1) + 1), Continuous (fun t => eval (fun i => (a i : ℝ)) (p t))) (hcont : ∀ x ∈ normalizedCube 4, Continuous (fun t => eval x (p t))) (hBV : ∀ x (hx : x ∈ normalizedCube 4), eVariationOn (⟨fun t => eval x (p t), hcont x hx⟩ : Path) univ < ⊤) (hbound : ∀ x (hx : x ∈ normalizedCube 4), pathSize (⟨fun t => eval x (p t), hcont x hx⟩ : Path) ≤ B) : (∀ a, eVariationOn (tensorCoefficientPath p hdeg hgrid a) univ < ⊤) ∧ (∑ a, pathSize (tensorCoefficientPath p hdeg hgrid a)) ≤ (2 : ℝ) ^ (40 * K + 20) * B := by exact ⟨tensorCoefficientPath_bv_of_cube p hdeg hgrid hcont hBV, tensorCoefficientPath_four_size_envelope hK p B hB hdeg hgrid hcont hBV hbound⟩
    Causalean.Stat.Concentration.BoundedVariation.tensorCoefficientPath_four_bv_envelope · Causalean/Stat/Concentration/BoundedVariation/TensorCoefficient.lean:449
Weighted­Integral 1 core · 0 supporting An integral of continuous paths against a bounded scalar weight remains a continuous path. ★ weightedPathIntegral_size_le

Weighted integrals of bounded-variation paths

An integral of continuous paths against a bounded scalar weight remains a continuous path. Its supremum norm plus total variation is bounded by the common path-size envelope times the weight bound. This is the analytic step for integral coefficient extraction.

theorem weightedPathIntegral_size_le reviewed
Causalean.Stat.Concentration.BoundedVariation

Let a probability measure, a family of continuous paths indexed by its sample space together with a real weight function, and nonnegative numbers B and M be given. If at each time the weighted path value is integrable, the weight is bounded by M in absolute value everywhere, every path has bounded variation, and every path has supremum-plus-variation size at most B, then there is a continuous path whose value at each time is the integral of the weighted path values, which has bounded variation and size at most M B.

Formal statement
α :
f :
α → Path
w :
α → ℝ
B M :
ℝ
hB :
0 ≤ B
hM :
0 ≤ M
hInt :
∀ t : Time, Integrable (fun x => w x * f x t) μ
hweight :
∀ x, |w x| ≤ M
hBV :
∀ x, eVariationOn (f x) univ < ⊤
hsize :
∀ x, pathSize (f x) ≤ B
∃ g : Path,
conclusion 1
t :
g t = ∫ x, w x * f x t ∂μ
conclusion 2
conclusion 3
pathSize g ≤ M * B
Proof (Lean source)
theorem weightedPathIntegral_size_le {α : Type*} [MeasurableSpace α] (μ : Measure α) [IsProbabilityMeasure μ] (f : α → Path) (w : α → ℝ) (B M : ℝ) (hB : 0 ≤ B) (hM : 0 ≤ M) (hInt : ∀ t : Time, Integrable (fun x => w x * f x t) μ) (hweight : ∀ x, |w x| ≤ M) (hBV : ∀ x, eVariationOn (f x) univ < ⊤) (hsize : ∀ x, pathSize (f x) ≤ B) : ∃ g : Path, (∀ t : Time, g t = ∫ x, w x * f x t ∂μ) ∧ eVariationOn g univ < ⊤ ∧ pathSize g ≤ M * B := by let F : Time → α → ℝ := fun t x => w x * f x t have hF_bound (t : Time) (x : α) : ‖F t x‖ ≤ M * B := by have hf : ‖f x t‖ ≤ B := by calc ‖f x t‖ ≤ ‖f x‖ := ContinuousMap.norm_coe_le_norm (f x) t _ ≤ pathSize (f x) := by simp [pathSize, pathTV_nonneg] _ ≤ B := hsize x calc ‖F t x‖ = |w x| * ‖f x t‖ := by simp [F, norm_mul, Real.norm_eq_abs] _ ≤ M * B := mul_le_mul (hweight x) hf (norm_nonneg _) hM have hF_cont : Continuous (fun t : Time => ∫ x, F t x ∂μ) := by apply continuous_of_dominated (bound := fun _ => M * B) · intro t exact (hInt t).aestronglyMeasurable · intro t exact Filter.Eventually.of_forall (fun x => hF_bound t x) · exact integrable_const (M * B) · exact Filter.Eventually.of_forall (fun x => (continuous_const.mul (f x).continuous)) let g : Path := ⟨fun t => ∫ x, F t x ∂μ, hF_cont⟩ have hg (t : Time) : g t = ∫ x, w x * f x t ∂μ := rfl have hpart (t : Time) (n : ℕ) (u : ℕ → Time) (hu : Monotone u) : ‖g t‖ + ∑ i ∈ range n, ‖g (u (i + 1)) - g (u i)‖ ≤ M * B := by have hpoint (x : α) : ‖F t x‖ + ∑ i ∈ range n, ‖F (u (i + 1)) x - F (u i) x‖ ≤ M * B := by have hinc : (∑ i ∈ range n, ‖f x (u (i + 1)) - f x (u i)‖) ≤ pathTV (f x) := by have hs := eVariationOn.sum_le (f := f x) (n := n) hu (fun i => Set.mem_univ (u i)) have hs' := ENNReal.toReal_mono (ne_of_lt (hBV x)) hs rw [ENNReal.toReal_sum] at hs' · simp_rw [← dist_edist, Real.dist_eq] at hs' simpa [pathTV, Real.norm_eq_abs] using hs' · intro i hi exact ne_of_lt (edist_lt_top _ _) have hbase : ‖f x t‖ + ∑ i ∈ range n, ‖f x (u (i + 1)) - f x (u i)‖ ≤ B := by have ht := ContinuousMap.norm_coe_le_norm (f x) t have hz := hsize x dsimp [pathSize] at hz linarith have hw : 0 ≤ |w x| := abs_nonneg _ calc ‖F t x‖ + ∑ i ∈ range n, ‖F (u (i + 1)) x - F (u i) x‖ = |w x| * (‖f x t‖ + ∑ i ∈ range n, ‖f x (u (i + 1)) - f x (u i)‖) := by simp [F, ← mul_sub, norm_mul, Real.norm_eq_abs, Finset.mul_sum, mul_add] _ ≤ |w x| * B := mul_le_mul_of_nonneg_left hbase hw _ ≤ M * B := mul_le_mul_of_nonneg_right (hweight x) hB let D (i : ℕ) (x : α) := F (u (i + 1)) x - F (u i) x have hDInt (i : ℕ) : Integrable (D i) μ := (hInt (u (i + 1))).sub (hInt (u i)) have hDNormInt (i : ℕ) : Integrable (fun x => ‖D i x‖) μ := (hDInt i).norm have hFNormInt : Integrable (fun x => ‖F t x‖) μ := (hInt t).norm have hsumInt : Integrable (fun x => ∑ i ∈ range n, ‖D i x‖) μ := integrable_finsetSum _ (fun i hi => hDNormInt i) have hD_eq (i : ℕ) : g (u (i + 1)) - g (u i) = ∫ x, D i x ∂μ := by rw [hg, hg, ← integral_sub (hInt (u (i + 1))) (hInt (u i))] calc ‖g t‖ + ∑ i ∈ range n, ‖g (u (i + 1)) - g (u i)‖ ≤ (∫ x, ‖F t x‖ ∂μ) + ∑ i ∈ range n, ∫ x, ‖D i x‖ ∂μ := by apply add_le_add · simpa [g] using (norm_integral_le_integral_norm (fun x => F t x) (μ := μ)) · apply Finset.sum_le_sum intro i hi rw [hD_eq i] exact norm_integral_le_integral_norm (D i) _ = ∫ x, (‖F t x‖ + ∑ i ∈ range n, ‖D i x‖) ∂μ := by rw [integral_add hFNormInt hsumInt] rw [integral_finsetSum (range n) (fun i hi => hDNormInt i)] _ ≤ ∫ x, (M * B) ∂μ := by apply integral_mono (hFNormInt.add hsumInt) (integrable_const _) intro x exact hpoint x _ = M * B := by simp have hnorm : ‖g‖ ≤ M * B := by apply (ContinuousMap.norm_le g (mul_nonneg hM hB)).2 intro t simpa using hpart t 0 (fun _ => t) monotone_const have hvar : eVariationOn g univ ≤ ofReal (M * B - ‖g‖) := by apply iSup_le rintro ⟨n, ⟨u, hu, hus⟩⟩ have hs : (∑ i ∈ range n, ‖g (u (i + 1)) - g (u i)‖) ≤ M * B - ‖g‖ := by have hc : 0 ≤ M * B - ∑ i ∈ range n, ‖g (u (i + 1)) - g (u i)‖ := by have hp := hpart timeZero n u hu have ht := norm_nonneg (g timeZero) linarith have hn : ‖g‖ ≤ M * B - ∑ i ∈ range n, ‖g (u (i + 1)) - g (u i)‖ := by apply (ContinuousMap.norm_le g hc).2 intro t have hp := hpart t n u hu linarith linarith calc (∑ i ∈ range n, edist (g (u (i + 1))) (g (u i))) = ofReal (∑ i ∈ range n, ‖g (u (i + 1)) - g (u i)‖) := by rw [ENNReal.ofReal_sum_of_nonneg] · simp [edist_dist, Real.dist_eq, abs_sub_comm] · intro i hi exact norm_nonneg _ _ ≤ ofReal (M * B - ‖g‖) := ENNReal.ofReal_le_ofReal hs have hfinite : eVariationOn g univ < ⊤ := lt_of_le_of_lt hvar ENNReal.ofReal_lt_top refine ⟨g, hg, hfinite, ?_⟩ have hnonneg : 0 ≤ M * B - ‖g‖ := sub_nonneg.mpr hnorm have htv : pathTV g ≤ M * B - ‖g‖ := by simpa [pathTV, ENNReal.toReal_ofReal hnonneg] using (ENNReal.toReal_mono (ne_of_lt (ENNReal.ofReal_lt_top)) hvar) dsimp [pathSize] linarith
Causalean.Stat.Concentration.BoundedVariation.weightedPathIntegral_size_le · Causalean/Stat/Concentration/BoundedVariation/WeightedIntegral.lean:20 · uses Path , Time , pathSize