Block averages of a real-valued process #
The empirical mean of a process over a finite selection of coordinates, with its elementary
algebra. Nothing here involves a measure: blockAverage X k is a function of ω, and the three
lemmas below are the pointwise formula, the scaled-sum normal form, and the value on a constant
block. average_sub_sq_eq_sum_sum records the one further piece of average algebra used
downstream: the square of a deviation from an average, expanded as a double sum.
birkhoffAverage_eq_prefixAverage identifies a Birkhoff average of an arbitrary self-map with a
prefix average of the iterated observable, which is how Mathlib's mean-ergodic theory reaches this
API; it is stated for an arbitrary self-map because no dynamical content enters — both sides are
the same normalised sum.
It also carries the standard selections, all measure-free. prefixAverage X n averages the first
n coordinates and followingAverage X n the n after them, with their pointwise formulas.
fixedStart r is the same fixed-start window in moving-selection form — a family
∀ n, Fin (n + 1) → ℕ rather than a single block — which is the shape the L² convergence
theorems quantify over. It belongs here because it is a generic block selection with no disjointness
content; the disjoint windows those theorems also accept are disjointWindow in
Process/DisjointWindow.lean. fixedStart_injective gives injectivity at each length and
fixedStart_eventually_injective the eventual form the limit theorems take.
Measure-theoretic facts about all three — square-integrability, conditional expectations, variances
and covariances under contractability — live with the L² averaging library in
Exchangeability/L2/BlockAverages.lean and Exchangeability/L2/LongTailAverages.lean, which import
this module. Keeping the definitions here means a route that only needs the algebra does not import
the L² machinery to get them: the Koopman route needs prefixAverage to state its Birkhoff
bridge, and has no L² content of its own.
The block average of a real-valued process X over a finite selection k : Fin n → ℕ:
the empirical mean n⁻¹ • ∑ i, X (k i) of the block (X (k i))ᵢ.
Equations
- TauCeti.Probability.blockAverage X k = Finset.univ.expect fun (i : Fin n) => X (k i)
Instances For
A block average of a constant block. If every coordinate of a nonempty block takes the
value c at ω, then so does the block average: the normalisation n⁻¹ cancels the n terms.
The average of the first n coordinates of a real-valued process.
Equations
- TauCeti.Probability.prefixAverage X n = TauCeti.Probability.blockAverage X fun (i : Fin n) => ↑i
Instances For
The average of the n coordinates immediately following the first n coordinates.
Equations
- TauCeti.Probability.followingAverage X n = TauCeti.Probability.blockAverage X fun (i : Fin n) => n + ↑i
Instances For
A prefix average is the block average over the selection i ↦ i.
A following-block average is the block average over the selection i ↦ n + i.
A product of block averages is an average of products. Purely algebraic: the product of
sums distributes by Fintype.prod_sum, and the normalisations multiply. Disjointness of the
selections plays no role here — it matters only for what the individual terms mean.
The fixed-start selection: the window of length n + 1 beginning at r.
Equations
- TauCeti.Probability.fixedStart r x✝ j = r + ↑j
Instances For
The fixed-start selection is injective at each length.
The eventual form, as the moving-selection theorems take it.
The squared deviation of an average, as a double sum. For a nonempty finite index set s,
the square of (#s)⁻¹ * ∑ i ∈ s, a i - b is (#s)⁻¹ ^ 2 times the double sum of
(a i - b) * (a j - b) over s × s.
A Birkhoff average is a prefix average of the iterated observable. For any self-map T and
any real observable F, birkhoffAverage ℝ T F n is the prefix average of i ↦ F ∘ T^[i].
Nothing about any particular dynamical system enters: both sides are the same normalised sum. This is the bridge from Mathlib's mean-ergodic theory, which speaks of Birkhoff averages, to the block-average API, which speaks of averages of a process over a selection of coordinates.
The unit interval #
A block average of [0,1]-valued coordinates stays in [0,1]. This is the bound the product
convergence lemmas need, and it is pure order algebra — no measure and no norm is involved, so the
‖·‖ ≤ 1 form is left to the consumer that has a normed structure in scope.