Strict stationarity; the -, -, -mixing coefficients; asymptotic variance
DefinitionMixingCoefficientsThe classical dependence coefficients for a sequence of random variables on a probability space, with and .
The sequence is strictly stationary if for every the shifted sequence has the same law, as a random sequence, as .
The strong (-) mixing coefficient at lag (source, Definition 1):
The -mixing coefficient (Definition 2): , the supremum over and over square-integrable random variables measurable with respect to and measurable with respect to .
The uniform (-) mixing coefficient (Definition 3):
The asymptotic variance of a centered stationary sequence: . A sequence is bounded in probability if for every there is with for all .
These notions carry the classical CLTs for dependent sequences (Ibragimov–Linnik, Doukhan–Massart–Rio, Billingsley) and connect Markov chain ergodicity to them; none previously existed on the platform and all are reusable for general processes.
Formalization Note Sequences are indexed from , so the source's appears here as ; under strict stationarity the notions agree. Each coefficient is a real supremum over the indicated (sub--algebra measurable) events or random variables; correlations of degenerate pairs contribute .
import Mathlib.Probability.Moments.Covariance
import Mathlib.Probability.Moments.Variance
import Mathlib.Analysis.SpecialFunctions.Sqrt
/-!
Strict stationarity, the three classical mixing coefficients (α, ρ, φ) of a
sequence of random variables, the asymptotic variance series, and boundedness
in probability.
Source: Galin L. Jones, *On the Markov Chain Central Limit Theorem*,
Probability Surveys 1 (2004) 299-320 (arXiv math/0409112v2), §3
(Definitions 1-3) and §4 (the variance `σ²` of Theorems 5-8; boundedness in
probability in Theorem 4).
Indexing note: sequences are indexed from `0`, so the paper's past σ-algebra
`F₁ᵏ = σ(Y₁, …, Y_k)` is encoded as `σ(Y_0, …, Y_k)` and partial sums are
`S_n = ∑_{i<n} Y_i`; under strict stationarity these conventions agree with the
paper's.
-/
open MeasureTheory ProbabilityTheory
open scoped ProbabilityTheory
namespace MarkovChainCLT
/-- The σ-algebra on `Ω` generated by the random variables `Y i` for `i ∈ s`. -/
@[reducible]
def processSigma {Ω E : Type*} [MeasurableSpace E] (Y : ℕ → Ω → E) (s : Set ℕ) :
MeasurableSpace Ω :=
⨆ i ∈ s, MeasurableSpace.comap (Y i) inferInstance
/-- A sequence of random variables is **strictly stationary** if shifting time by any
`k` leaves the law of the whole sequence (as a random element of `ℕ → E`)
unchanged. -/
def IsStrictlyStationary {Ω E : Type*} [MeasurableSpace Ω] [MeasurableSpace E]
(P : Measure Ω) (Y : ℕ → Ω → E) : Prop :=
∀ k : ℕ, Measure.map (fun ω => (fun n => Y (n + k) ω)) P
= Measure.map (fun ω => (fun n => Y n ω)) P
/-- The **strong (α-) mixing coefficient** of the sequence `Y` at lag `n`
(Jones 2004, §3, Definition 1):
`α(n) = sup_k sup { |P(A ∩ B) - P(A) P(B)| : A ∈ σ(Y_0, …, Y_k), B ∈ σ(Y_{k+n}, …) }`. -/
noncomputable def alphaMixingCoef {Ω E : Type*} [MeasurableSpace Ω] [MeasurableSpace E]
(P : Measure Ω) (Y : ℕ → Ω → E) (n : ℕ) : ℝ :=
sSup {r | ∃ k : ℕ, ∃ A B : Set Ω,
MeasurableSet[processSigma Y (Set.Iic k)] A ∧
MeasurableSet[processSigma Y (Set.Ici (k + n))] B ∧
r = |(P (A ∩ B)).toReal - (P A).toReal * (P B).toReal|}
/-- The **ρ-mixing (asymptotically-uncorrelated) coefficient** of the sequence `Y` at
lag `n` (Jones 2004, §3, Definition 2): the supremum of `|corr(U, V)|` over
square-integrable `U` measurable w.r.t. the past `σ(Y_0, …, Y_k)` and `V`
measurable w.r.t. the future `σ(Y_{k+n}, …)`. -/
noncomputable def rhoMixingCoef {Ω E : Type*} [MeasurableSpace Ω] [MeasurableSpace E]
(P : Measure Ω) (Y : ℕ → Ω → E) (n : ℕ) : ℝ :=
sSup {r | ∃ k : ℕ, ∃ U V : Ω → ℝ,
Measurable[processSigma Y (Set.Iic k)] U ∧
Measurable[processSigma Y (Set.Ici (k + n))] V ∧
MemLp U 2 P ∧ MemLp V 2 P ∧
r = |cov[U, V; P]| / (Real.sqrt (Var[U; P]) * Real.sqrt (Var[V; P]))}
/-- The **uniform (φ-) mixing coefficient** of the sequence `Y` at lag `n`
(Jones 2004, §3, Definition 3):
`φ(n) = sup_k sup { |P(B | A) - P(B)| : A ∈ σ(Y_0, …, Y_k), P(A) ≠ 0,
B ∈ σ(Y_{k+n}, …) }`. -/
noncomputable def phiMixingCoef {Ω E : Type*} [MeasurableSpace Ω] [MeasurableSpace E]
(P : Measure Ω) (Y : ℕ → Ω → E) (n : ℕ) : ℝ :=
sSup {r | ∃ k : ℕ, ∃ A B : Set Ω,
MeasurableSet[processSigma Y (Set.Iic k)] A ∧ P A ≠ 0 ∧
MeasurableSet[processSigma Y (Set.Ici (k + n))] B ∧
r = |(P (A ∩ B)).toReal / (P A).toReal - (P B).toReal|}
/-- The **asymptotic variance series** of a (centered, stationary) real sequence:
`σ² = E[Y₀²] + 2 ∑_{k≥1} E[Y₀ Y_k]` (Jones 2004, Theorems 5-8; the `tsum` is the
honest limit whenever the covariance series is summable, which the theorems assert
separately). -/
noncomputable def seqAsymptoticVariance {Ω : Type*} [MeasurableSpace Ω]
(P : Measure Ω) (Y : ℕ → Ω → ℝ) : ℝ :=
(∫ ω, (Y 0 ω) ^ 2 ∂P) + 2 * ∑' k : ℕ, ∫ ω, Y 0 ω * Y (k + 1) ω ∂P
/-- A sequence of real random variables is **bounded in probability** (tight):
`∀ ε > 0, ∃ K, sup_n P(|Z_n| > K) ≤ ε`. -/
def BoundedInProbability {Ω : Type*} [MeasurableSpace Ω] (Z : ℕ → Ω → ℝ)
(P : Measure Ω) : Prop :=
∀ ε : ℝ, 0 < ε → ∃ K : ℝ, ∀ n : ℕ, (P {ω | K < |Z n ω|}).toReal ≤ ε
end MarkovChainCLT
Read-back
What the Lean code literally says, in plain math · claude-fable-5
processSigma — For arbitrary types and where only carries a σ-algebra, a family of maps indexed by , and a set : the σ-algebra on defined as the supremum over of the pullback σ-algebras — that is, the smallest σ-algebra on making every with measurable. No measurability of the relative to any ambient structure on is assumed (none exists in this definition). For the supremum is the trivial σ-algebra . The definition is marked reducible.
IsStrictlyStationary — For types and both with σ-algebras, a measure on (not assumed to be a probability measure), and : the proposition that for every , the pushforward of under the map , a map into the product space of sequences , equals the pushforward of under . No measurability hypothesis on appears anywhere; the pushforward of a measure under a map that is not almost-everywhere measurable is by convention the zero measure, so for non-measurable the equality can hold degenerately with both sides equal to the zero measure.
alphaMixingCoef — For a measure on , maps , and : the real supremum of the set of all reals such that there exist and sets with measurable with respect to the σ-algebra generated by (the supremum of the pullback σ-algebras of , ), measurable with respect to the σ-algebra generated by , and , where converts to with . The supremum ranges over all splitting times jointly with and ; is allowed, in which case the two generating index ranges overlap at . The candidate set contains (take ). Junk conventions: sets of infinite measure enter through the value ; the real supremum of a set unbounded above is (possible when is not finite).
rhoMixingCoef — For , , as above: the real supremum of the set of all reals such that there exist and functions with measurable as a map from equipped with the σ-algebra generated by , measurable from equipped with the σ-algebra generated by , both and in (this membership is with respect to the ambient σ-algebra on ), and . Here is the Bochner integral (equal to by convention if the integrand is not integrable), and is the variance computed in the extended nonnegative reals and converted to with . Junk conventions: when either variance is (e.g. constant almost everywhere) the denominator is and real division by yields , so such pairs contribute the value ; if no admissible pair exists at all (for instance when constants fail to be in , as for an infinite measure , and nothing else qualifies) the candidate set is empty and the real supremum of the empty set is ; a candidate set unbounded above likewise yields .
phiMixingCoef — For , , as above: the real supremum of the set of all reals such that there exist and sets with measurable with respect to the σ-algebra generated by and (as an extended-nonnegative value), measurable with respect to the σ-algebra generated by , and , with the conversion sending to . Junk conventions: a set with satisfies yet has , and real division by yields , so such an contributes ; if no admissible with exists (e.g. the zero measure) the candidate set is empty and its real supremum is ; an unbounded candidate set also yields .
seqAsymptoticVariance — For a measure on and real-valued maps : the real number . All integrals are Bochner integrals, each equal to by convention when its integrand is not integrable; the infinite series is a topological sum, equal to by convention when the family of integrals is not summable. The cross terms always pair with for (lags ); no means are subtracted anywhere, and no stationarity, measurability, or probability-measure hypotheses appear.
BoundedInProbability — For maps and a measure on (not assumed to be a probability measure): the proposition that for every real there exists a real (no sign constraint — may be negative) such that for every , , where converts to with . The set is not required to be measurable ( is applied to it as an outer measure), and no measurability of is assumed. Junk convention: if that set has -measure , the conversion yields and the inequality holds trivially.
Confirmed by the mission captain (proposal self-audit).