Begin with two atoms and one first witness

Let

\[ \Omega=\{\text{amber},\text{blue}\} \]

carry the uniform probability measure, so each atom has mass \(1/2\). Let the base map be the identity. This system preserves the measure but is not ergodic: each singleton is invariant and has nonzero, nonfull mass.

Use the centered process

\[ Y_n(\text{amber})=-(n-1), \qquad Y_n(\text{blue})=0. \]

Natural-number subtraction is truncated, so \(Y_0(\text{amber})=0\), and \(Y_1=0\) at both atoms. Choose the slope

\[ c=-\frac34. \]

A positive length \(n\) is a strict bad-block witness at \(x\) when

\[ Y_n(x)\lt cn. \]

For blue this never happens: \(0\) cannot lie below the negative number \(-3n/4\). For amber, the complete first ledger is:

\(n\)\(Y_n(\text{amber})\)\(cn\)strict witness?reason
\(0\)\(0\)\(0\)nowitnesses must have positive length
\(1\)\(0\)\(-3/4\)nothe value lies above the line
\(2\)\(-1\)\(-3/2\)nothe value lies above the line
\(3\)\(-2\)\(-9/4\)nothe value lies above the line
\(4\)\(-3\)\(-3\)noequality is not strict
\(5\)\(-4\)\(-15/4\)yesfirst strict witness
\(6\)\(-5\)\(-9/2\)yesthe point remains discoverable
\(7\)\(-6\)\(-21/4\)yesthe point remains discoverable

The algebra isolates the same boundary:

\[ -(n-1)\lt-\frac34n \quad\Longleftrightarrow\quad 1\lt\frac14n \quad\Longleftrightarrow\quad 4\lt n. \]

If \(B_m(c)\) searches only lengths \(1,\ldots,m\), then

\[ B_0(c)=B_1(c)=\cdots=B_4(c)=\varnothing, \]

while

\[ B_5(c)=B_6(c)=\cdots=\{\text{amber}\}. \]

Removing the cap does not create an infinite witness. It merely permits the finite witness \(n=5\):

\[ B_\infty(c) {} = \bigcup_{m\in\mathbb N}B_m(c) =\{\text{amber}\}, \qquad \mu(B_\infty(c))=\frac12. \]
A uniform two-atom identity system is shown. Amber has centered value minus n minus one, blue has value zero, and the strict comparison line has slope negative three quarters. Lengths zero through four fail, with equality at four, while length five is the first strict witness. Caps zero through four are empty, every later cap is amber, the union has mass one half, and the rate-ratio bound is two thirds. A slope-zero panel shows cap one empty and cap two amber.
FigureExact cap ledger: amber first crosses strictly below the line \(cn=-3n/4\) at \(n=5\); equality at \(n=4\) is excluded. Thus the nested cap sequence stabilizes from \(\varnothing\) to \(\{\text{amber}\}\), and the all-length event has mass \(1/2\). The normalized integral is bounded below by \(\delta=-1/2\), giving the unchanged ceiling \(\delta/c=2/3\). The slope-zero boundary separately shows why \(Y_1=0\) contributes nothing while \(Y_2=-1\) does.

See the rate premise numerically

Uniform integration gives, for every positive \(n\),

\[ \int_\Omega Y_n\,d\mu {} = \frac12\bigl(-(n-1)\bigr)+\frac12\cdot0 =-\frac{n-1}{2}. \]

After normalization,

\[ \frac{\int_\Omega Y_n\,d\mu}{n} =-\frac{n-1}{2n} =-\frac12+\frac{1}{2n}. \]

Set

\[ \delta=-\frac12. \]

Then \(\delta\) is a lower bound for every positive normalized integral, and

\[ c=-\frac34\lt-\frac12=\delta. \]

The generic RMT-31 conclusion becomes

\[ \mu(B_\infty(c)) =\frac12 \le \frac{\delta}{c} =\frac{-1/2}{-3/4} =\frac23. \]

The theorem does not need ergodicity, and this identity model is explicitly nonergodic. It also does not need probability normalization; the uniform probability is used here only because it makes every number transparent.

Let equality fail first and strictness succeed later

Set the slope to zero while keeping the same process. At length one,

\[ Y_1(\text{amber})=0=0\cdot1, \]

so the strict comparison fails. At length two,

\[ Y_2(\text{amber})=-1\lt0\cdot2, \]

so amber enters. Therefore

\[ B_1(0)=\varnothing, \qquad B_2(0)=\{\text{amber}\}. \]

This nearby boundary prevents two common mistakes: replacing strict \(\lt\) by non-strict \(\le\), or deciding the uncapped event from length one alone.

Separate one bad length from recurrence and invariance

Now use a different two-atom model. Let the base map collapse both atoms to blue:

\[ T(\text{amber})=\text{blue}, \qquad T(\text{blue})=\text{blue}. \]

The Dirac measure at blue is preserved. Define a one-shot centered process by

\[ Y_n(\text{blue})=0 \]

for every \(n\), and

\[ Y_1(\text{amber})=0, \qquad Y_n(\text{amber})=-1\quad(n\ge2). \]

Choose \(c=-2/5\). Amber is strict at exactly one positive length:

\(n\)\(Y_n(\text{amber})\)\(cn\)strict?
\(1\)\(0\)\(-2/5\)no
\(2\)\(-1\)\(-4/5\)yes
\(3\)\(-1\)\(-6/5\)no
\(4\)\(-1\)\(-8/5\)no

For \(n\ge3\), the line keeps moving downward while the one-shot value stays at \(-1\), so there are no arbitrarily late witnesses. Nevertheless,

\[ B_\infty(-2/5)=\{\text{amber}\} \]

because the raw event asks for one witness. The collapse map never lands at amber, hence

\[ T^{-1}\bigl(B_\infty(-2/5)\bigr)=\varnothing \ne \{\text{amber}\}=B_\infty(-2/5). \]
A collapse map sends both amber and blue to blue and preserves a Dirac mass at blue. Amber has a one-shot centered value negative one from length two onward against slope negative two fifths. It is strictly below the line only at length two, so the raw event is amber, but its preimage is empty. Both sets have zero Dirac-blue measure although they are setwise unequal.
FigureChecked non-invariance model: one strict witness at \(n=2\) puts amber in the raw all-length event, even though no later length works. Because the collapse map sends both atoms to blue, the preimage of \(\{\text{amber}\}\) is empty. The preserved Dirac-blue measure assigns both sets mass zero, so this example is a counterexample to setwise invariance without contradicting almost-everywhere equality. It also makes the once-bad versus asymptotic distinction numerical.

The two models serve different purposes. The identity model checks nested caps, the first strict witness, the uniform rate premise, and the \(1/2\le2/3\) ratio. The collapse model checks that a one-witness union can be setwise noninvariant even for a preserved finite measure and a valid shifted-subadditive process.

RMT-30 fixes a natural-number cap \(m\) and controls the points at which some centered block of length at most \(m\) falls strictly below a line. RMT-31 removes the cap. Three operations must remain separate:

  1. identify the all-length event exactly as a nested union;
  2. take the limit in the native extended measure type; and
  3. project to real measure only after ruling out an infinite target.

The last operation is where finite mass enters. It is not needed for the set identity, null measurability, or extended-measure continuity. Once the real limit is justified, the same upper bound that RMT-30 proves for every cap passes to the union by closedness of an upper interval.

This is one measure-theoretic bridge inside Kingman’s much stronger subadditive ergodic theorem (Kingman 1968). The finite interval-decomposition perspective is also visible in Steele’s exposition (Steele 1989); neither source is claimed to contain this repository’s Lean interface.

This chapter is the textbook companion to the RMT-31 Development Notebook. Its input comes from Finite Bad-Block Measure Bounds Before Kingman Lower Liminf. Useful compact references are orbit-majorant centering , finite orbit-visit count , and integrated log-positive growth rate .

Choose a route up

RouteBeginDestination
EventStart with finite capsSeparate one witness from recurrent failure
SetNest the capsProve the exact increasing union
RegularityTake the countable null-measurable unionSee why finite mass is absent
MeasureUse extended measure firstApply unconditional continuity from below
ProjectionCross the real-projection cliffIsolate local finiteness
BoundTransport the uniform RMT-30 ratioPreserve the ratio without loss
CocycleSpecialize to log-positive cocyclesDischarge the generic rate premise
BoundaryThe raw event need not be invariantRead the checked countermodel
Next layerContinue into the checked RMT-32 eventReach ergodic null selection without claiming a liminf bridge
PracticeThirty solved exercisesRebuild every bridge

Common setup and notation

Let \(\Omega\) be a type, \(\mu\) a measure, and \(T:\Omega\to\Omega\) a map. An integrable shifted-subadditive candidate is a family \(X_n:\Omega\to\mathbb R\) satisfying

\[ X_{a+b}(\omega)\le X_b(T^a\omega)+X_a(\omega). \]

The repository centers it by subtracting the one-step orbit sum:

\[ Y_n(\omega) {} := X_n(\omega)-\sum_{j=0}^{n-1}X_1(T^j\omega). \]

This is pointwise orbit-majorant centering , not expectation centering. It gives \(Y_1=0\), preserves shifted subadditivity, and makes \(Y_n\le0\) for positive \(n\). A block is bad at \(\omega\) when \(Y_n(\omega)\lt cn\). Equality is not a witness.

Start with finite caps

For \(m\in\mathbb N\), RMT-30 defines

\[ B_m(c) {} := \bigcup_{1\le n\le m}\{\omega:Y_n(\omega)\lt cn\}. \]

The cap-zero set is empty. At a positive cap, membership means at least one allowed length works, not that every length works. RMT-31 defines

\[ B_\infty(c):=\bigcup_{m\in\mathbb N}B_m(c). \]

The infinity symbol describes the search range. Every actual witness is finite. The checked membership theorem is

\[ \omega\in B_\infty(c) \quad\Longleftrightarrow\quad \exists n\in\mathbb N,\quad 0\lt n\ \text{and}\ Y_n(\omega)\lt cn. \]

This is a once-bad event. It does not mean failures occur infinitely often, eventually, or along an unbounded sequence.

Nested finite bad-block caps grow with the search window. A point whose first strict witness is at length three is absent from the first two caps, enters the third cap, remains in later caps, and belongs to the union because of one finite witness rather than infinitely many witnesses.
FigureFinding: removing the cap preserves finite witness semantics. A point enters when one positive witness becomes available and remains in every larger search window. The nesting shows monotonicity of events in the cap, not monotonicity of the centered process in time. The witness length and shapes are conceptual, not measured data.

The compiled two-point process calibrates strictness. It has \(Y_1=0\) at both points, while one point has \(Y_2=-1\). At slope \(c=0\), equality at time one contributes nothing but time two is a strict witness. The all-length event can therefore be nonempty when the cap-one event is empty.

Nest the caps

If \(m\le M\), every witness with \(1\le n\le m\) also satisfies \(1\le n\le M\). Thus \(B_m(c)\subseteq B_M(c)\). This is monotonicity of the search window, not a claim that \(Y_m(\omega)\le Y_M(\omega)\).

The all-length definition is already the union, so centeredAllLengthBadBlockSet_eq_iUnion_finite is proved by rfl. The theorem finiteCenteredBadBlockSet_subset_allLength packages inclusion of any cap. Conversely, given an uncapped witness \(n\), choose cap \(m=n\). No compactness, limiting witness, supremum, or infinite maximizing time is involved.

Take the countable null-measurable union

Assume \(X\) is an integrable shifted-subadditive candidate and \(T\) preserves \(\mu\). RMT-30 proves every \(B_m(c)\) null measurable. RMT-31 uses Mathlib’s closure under countable null-measurable unions to prove

\[ \operatorname{NullMeasurableSet}_\mu(B_\infty(c)). \]

Integrability supplies almost-everywhere measurability; it need not make the chosen representatives ordinarily measurable. The theorem does not claim an ordinary MeasurableSet certificate. Finite total mass, probability, and ergodicity are absent. Preservation transports integrability through the dynamics; it does not make this raw union invariant.

Use extended measure first

Lean measures take values in \(\mathbb R_{\ge0\infty}\). Since the caps increase and their union is exact, continuity from below gives

\[ \mu(B_m(c))\longrightarrow\mu(B_\infty(c)). \]

tendsto_measure_finiteCenteredBadBlockSet needs no measurability of the events, integrability, subadditivity, preservation, finite mass, probability, or ergodicity. Mathlib’s tendsto_measure_iUnion_atTop consumes only the increasing-set geometry and permits an infinite target.

An increasing sequence of finite bad-block caps feeds directly into continuity from below in extended nonnegative real measure. The limit is the measure of the union, whether finite or infinite, and no set-measurability, integrability, preservation, or finite-mass gate appears.
FigureFinding: continuity from below belongs first in extended nonnegative real measure, where infinity remains a legitimate limit. The theorem consumes only nesting and the exact union. Separate regularity and dynamical hypotheses are useful elsewhere, but they are not hidden inputs to this limit. The plate is logical, not quantitative.

Cross the real-projection cliff

Mathlib’s real-valued measure view is

\[ \mu_{\mathbb R}(S):=\operatorname{toReal}(\mu(S)). \]

At infinity, \(\operatorname{toReal}(\infty)=0\), so this projection is not continuous there. RMT-31 therefore assumes the local gate

\[ \mu(B_\infty(c))\ne\infty \]

before composing ENNReal.tendsto_toReal with extended continuity. The result is

\[ \mu_{\mathbb R}(B_m(c))\longrightarrow \mu_{\mathbb R}(B_\infty(c)). \]

The gate concerns one event, not all of \(\Omega\). A finite measure space is a convenient stronger interface because every subset has measure at most the finite total mass; Lean discharges the target by finiteness.

The upper lane projects a finite extended-measure target to real measure and preserves convergence. The lower lane shows the infinity cliff, where the real projection sends infinite mass to zero and cannot generally preserve a limit. Finite total measure automatically certifies the union target.
FigureFinding: real-measure continuity is a projection theorem with a finite-target premise, not a second unconditional continuity theorem. Local event finiteness is the checked gate; finite total mass discharges it automatically. The infinity lane shows information loss and does not claim failure for every particular infinite-target sequence.

Transport the uniform RMT-30 ratio

Assume \(\mu\) is finite, \(T\) preserves \(\mu\), and \(X\) is an integrable shifted-subadditive candidate. Suppose

\[ \delta\le \frac{\int_\Omega Y_n\,d\mu}{n} \qquad\text{for every }n\ne0, \]

and choose \(c\lt\delta\). RMT-30 proves for every cap \(m\) that

\[ \mu_{\mathbb R}(B_m(c))\le\frac{\delta}{c}. \]

The right side is independent of \(m\). Finite mass gives real convergence of the cap measures. Lean’s le_of_tendsto’ then says that the limit of values below one fixed ceiling remains below that ceiling:

\[ \boxed{\mu_{\mathbb R}(B_\infty(c))\le\frac{\delta}{c}}. \]

The limit passage loses no factor and introduces no error term. It does not repeat interval packing. RMT-30 has done the finite combinatorics; RMT-31 transports the cap-uniform conclusion. Since \(Y_1=0\), the rate premise forces \(\delta\le0\), and \(c\lt\delta\) forces \(c\lt0\).

Every finite cap lies below the same ratio ceiling. Finite total measure supplies convergence of the real cap measures, and le_of_tendsto' carries that unchanged ceiling to the all-length union. The diagram separates the RMT-30 finite estimate from the RMT-31 closed-limit step.
FigureFinding: uniformity in the cap is the transferable resource. RMT-30 proves the same ratio for each cap; RMT-31 proves real convergence under finite mass and applies le_of_tendsto’ to retain the ceiling at the union. No product monotonicity, limit-integral interchange, or new packing argument is used.

Finite mass need not mean probability

The theorem uses IsFiniteMeasure μ, not probability. The source checks a measure of total mass two. Under rescaling, event mass and raw integrals scale, so a compatible \(\delta\) scales too. A two-atom identity example is nonergodic, has bad set exactly one atom of mass \(1/2\), and satisfies the displayed estimate \(1/2\le2/3\).

Specialize to log-positive cocycles

For a discrete matrix cocycle \(C\), take \(X_n(\omega)=\log^+\lVert C(n,\omega)\rVert_\infty\). The named event is DiscreteMatrixCocycle.centeredLogPlusAllLengthBadBlockSet. The hypothesis C.HasIntegrableGeneratorLogPlus packages the generic candidate and one-step integrability. Define

\[ \delta_C:=\gamma^+_\mu(C)-\int_\Omega X_1\,d\mu, \]

where \(\gamma^+_\mu(C)\) is the integrated log-positive growth rate . The deterministic Fekete interface supplies the uniform rate premise. For every \(c\lt\delta_C\),

\[ \mu_{\mathbb R}(B_\infty^C(c))\le\frac{\delta_C}{c}. \]

The theorem assumes no ergodicity and no positive-dimension premise; it compiles with an empty finite matrix index. It concerns log-positive norm, not signed logarithmic growth or a Lyapunov exponent.

The raw event need not be invariant

An all-length union is not automatically invariant. It records one bad block starting now, and moving the origin can erase that witness.

The source compiles a countermodel on Bool:

  • the base map sends both points to true;
  • the Dirac mass at true is preserved;
  • the one-shot process is zero at true;
  • at false, it is zero before length two and \(-1\) thereafter;
  • at slope \(-2/5\), the bad event is exactly {false}.

The preimage of that singleton is empty, so

\[ T^{-1}B_\infty(-2/5)\ne B_\infty(-2/5). \]

The source checks the integrable shifted-subadditive candidate and preservation before proving non-invariance.

The left lane shows a checked collapse-map model where false has one later bad witness, the raw once-bad event is the singleton false, and shifting sends the point to true, so the event's preimage is empty and invariance fails. The right lane summarizes checked RMT-32: rational-slack recurrence, one-sided inclusion, finite-measure almost-invariance, ergodic empty-or-full dichotomy, and probability-based null selection.
FigureFinding: a union over all lengths is still a once-bad event tied to the current origin. In the checked model, shifting removes the sole bad starting point even though the map preserves the measure and the process satisfies the generic interface. The now-checked RMT-32 lane proves a one-sided preimage inclusion first, then uses preservation and finite mass for almost-invariance. Finite-measure ergodicity yields the empty-or-full dichotomy; probability normalization and the strict ratio select the null branch.

Null measurability does not imply invariance. Measure preservation does not make every dynamically defined set invariant. A subunit bound cannot become a zero-one conclusion until the right event is invariant or almost invariant and the matching ergodic hypothesis is present.

RMT-32 now supplies the event layer

RMT-32 does not merely add ergodicity to \(B_\infty(c)\). It replaces one positive witness by an asymptotic statement: an intersection over starting cutoffs of unions over later positive lengths. To represent strict lower deviation with a durable strict gap, it chooses one rational margin \(q\lt c\).

The checked change is from

\[ \exists n\gt0,\quad Y_n(\omega)\lt cn \]

to a statement like

\[ q\in\mathbb Q,\quad q\lt c,\qquad \forall N,\ \exists n\ge N,\quad 0\lt n\ \text{and}\ Y_n(\omega)\lt qn. \]

The strict rational slack matters. A sequence can lie below \(c\) infinitely often while approaching \(c\), so those witnesses alone do not prove that its lower liminf is strictly below \(c\).

The new Rational-Slack Lower-Deviation Events and Ergodic Null Selection chapter follows the completed proof. RMT-32 establishes countable null measurability, a threshold-relaxed fixed-slope preimage inclusion, rational density at the target, and almost-invariance under preservation plus finite mass. Finite-measure ergodicity yields an almost-empty or almost-full dichotomy. Probability is not needed for that fork; probability normalization and RMT-31’s strict subunit ratio select the null branch.

The exact equivalence with a library-level real lower limit remains RMT-33’s job. RMT-31 supplies the quantitative once-bad ceiling used in branch selection, while RMT-32 supplies the distinct asymptotic event and rigidity layer.

Seven bridges from the two-atom ledgers to Lean

The finite tables used lists of atoms and exact rational comparisons. The project module states the same architecture for arbitrary sets, measures, and centered subadditive processes. Each bridge aligns ordinary language, paper mathematics, exact Lean syntax, and the tokens that carry the proof.

Bridge 1: remove the cap without inventing an infinite witness

One idea, three languages Read across, then read the syntax map
A human says
A point belongs to the all-length event exactly when one positive finite length is a strict witness.
On paper
\(\omega\in B_\infty(c)\Longleftrightarrow\exists n\in\mathbb N,\ 0\lt n\ \land\ Y_n(\omega)\lt cn.\)
In Lean
mem_centeredAllLengthBadBlockSet_iff
Syntax map
  • centeredAllLengthBadBlockSet T X c is the union over natural caps.
  • centeredProcess T X n ω is the centered value \(Y_n(\omega)\).
  • The witness carries 0 < n; cap zero contributes nothing.
  • The comparison remains strict. No “infinitely often,” limit, supremum, or infinite length appears.

Bridge 2: enlarge only the search window

One idea, three languages Read across, then read the syntax map
A human says
If cap m is at most cap M, every witness allowed under m is still allowed under M.
On paper
\(m\le M\Longrightarrow B_m(c)\subseteq B_M(c).\)
In Lean
finiteCenteredBadBlockSet_mono hmM c
Syntax map
  • hmM : m ≤ M is the only premise.
  • A witness supplies 1 ≤ n and n ≤ m; transitivity gives n ≤ M.
  • Neither a measurable space nor a measure is needed.
  • This theorem does not compare \(Y_m\) and \(Y_M\); the process itself need not be monotone in time.

Bridge 3: take the countable null-measurable union

One idea, three languages Read across, then read the syntax map
A human says
If every finite cap is null measurable, their countable all-length union is null measurable too.
On paper
\(\bigl[\forall m,\ \operatorname{NullMeasurableSet}_\mu(B_m(c))\bigr]\Longrightarrow\operatorname{NullMeasurableSet}_\mu(B_\infty(c)).\)
In Lean
hX.nullMeasurableSet_centeredAllLengthBadBlockSet hT c
Syntax map
  • hX : IsIntegrableSubadditiveProcessCandidate T μ X supplies the RMT-30 regularity for each cap.
  • hT : MeasurePreserving T μ μ transports integrability along the dynamics.
  • NullMeasurableSet.iUnion closes the countable union.
  • No finite-mass, probability, ergodicity, or ordinary MeasurableSet premise is added.

Bridge 4: take continuity in extended measure first

One idea, three languages Read across, then read the syntax map
A human says
The extended measures of the nested finite caps converge to the extended measure of their union, even when the target is infinite.
On paper
\(\mu(B_m(c))\longrightarrow\mu(B_\infty(c))\quad\text{in }\mathbb R_{\ge0\infty}.\)
In Lean
tendsto_measure_finiteCenteredBadBlockSet (T := T) (μ := μ) X c
Syntax map
  • μ (…) is an extended nonnegative real value, so \(\infty\) remains legitimate.
  • atTop means that the natural cap tends upward without bound.
  • nhds identifies the target neighborhood filter.
  • tendsto_measure_iUnion_atTop consumes only the cap monotonicity and exact union; event measurability and finite mass are absent.

Bridge 5: cross to Measure.real only at a finite target

One idea, three languages Read across, then read the syntax map
A human says
Real-valued cap measures converge only after certifying that the union’s extended measure is not infinity.
On paper
\(\mu(B_\infty(c))\ne\infty\Longrightarrow\mu_{\mathbb R}(B_m(c))\longrightarrow\mu_{\mathbb R}(B_\infty(c)).\)
In Lean
tendsto_measureReal_finiteCenteredBadBlockSet (T := T) (μ := μ) X c hfinite
Syntax map
  • hfinite : μ (centeredAllLengthBadBlockSet T X c) ≠ ∞ is local to the target event.
  • Measure.real is ENNReal.toReal applied to a measure value.
  • Since toReal ∞ = 0, continuity cannot be composed through the infinity cliff without hfinite.
  • [IsFiniteMeasure μ] is a convenient stronger assumption used later to discharge this local gate automatically.

Bridge 6: preserve the finite-cap ratio at the union

One idea, three languages Read across, then read the syntax map
A human says
A cap-uniform centered rate ratio passes unchanged to all positive lengths on a finite measure space.
On paper
\(\delta\le(\int Y_n\,d\mu)/n\ \forall n\gt0,\ c\lt\delta\Longrightarrow\mu_{\mathbb R}(B_\infty(c))\le\delta/c.\)
In Lean
hX.measureReal_centeredAllLengthBadBlockSet_le_rateRatio hT δ c hδ hc
Syntax map
  • hδ is the lower bound for every nonzero normalized centered integral.
  • hc : c < δ is the strict slope separation.
  • RMT-30 supplies the same ceiling δ / c for every cap.
  • le_of_tendsto’ carries that closed upper bound through the real-measure limit with no extra factor or error term.

Bridge 7: specialize the generic bridge to a matrix cocycle

One idea, three languages Read across, then read the syntax map
A human says
For a discrete matrix cocycle with integrable log-positive generator, the same all-length ratio holds with the integrated Fekete offset.
On paper
\(c\lt\gamma_\mu^+(C)-\int X_1\,d\mu\Longrightarrow\mu_{\mathbb R}(B_\infty^C(c))\le\bigl(\gamma_\mu^+(C)-\int X_1\,d\mu\bigr)/c.\)
In Lean
hC.measureReal_centeredLogPlusAllLengthBadBlockSet_le_rateRatio c hc
Syntax map
  • hC : C.HasIntegrableGeneratorLogPlus supplies the generic candidate, preservation, and the needed integrability.
  • C.integratedLogPlusGrowthRate hC is the deterministic integrated log-positive growth rate.
  • C.integratedLogPlusNorm 1 is the one-step integral.
  • The theorem adds neither ergodicity nor a nonempty matrix index and still asserts only a once-bad measure bound.

Type-check the exact project interface

Try it in the repository NonlinearDynamics/Random/RandomCocycles/SubadditiveAllLengthBadBlockMeasure.lean

For a full project check, place this probe in a project scratch file after installing the repository’s pinned dependencies:

import NonlinearDynamics.Random.RandomCocycles.SubadditiveAllLengthBadBlockMeasure

open NonlinearDynamics.Random.RandomCocycles

#check centeredAllLengthBadBlockSet
#check mem_centeredAllLengthBadBlockSet_iff
#check finiteCenteredBadBlockSet_mono
#check centeredAllLengthBadBlockSet_eq_iUnion_finite
#check finiteCenteredBadBlockSet_subset_allLength
#check IsIntegrableSubadditiveProcessCandidate.nullMeasurableSet_centeredAllLengthBadBlockSet
#check tendsto_measure_finiteCenteredBadBlockSet
#check tendsto_measureReal_finiteCenteredBadBlockSet
#check IsIntegrableSubadditiveProcessCandidate.measureReal_centeredAllLengthBadBlockSet_le_rateRatio
#check DiscreteMatrixCocycle.centeredLogPlusAllLengthBadBlockSet
#check DiscreteMatrixCocycle.HasIntegrableGeneratorLogPlus.measureReal_centeredLogPlusAllLengthBadBlockSet_le_rateRatio

From the repository root, type:

cd formalization
lake env lean NonlinearDynamics/Random/RandomCocycles/SubadditiveAllLengthBadBlockMeasure.lean

This is a full project check. It may compile substantial dependencies and therefore may require substantial disk space and memory. It validates the authoritative 481-line source.

Full project check, from the repository root
cd formalization
lake env lean -DwarningAsError=true NonlinearDynamics/Random/RandomCocycles/SubadditiveAllLengthBadBlockMeasure.lean

Resource note: this exact file uses the repository's pinned Lean and Mathlib dependencies. Initial project setup can require substantial disk space and build time. For a lightweight first step on macOS or Linux, use the page's standalone Lean-core or Std tutorial.

Run both two-atom ledgers with Std

The following file imports only Lean’s Std library. It computes the nested caps, first witness, union mass, ratio, slope-zero strictness boundary, and collapse-map preimage with exact rational arithmetic. It neither imports Mathlib nor opens this project. Save the block byte for byte as /tmp/AllLengthBadBlockDeepDiveTutorial.lean:

import Std

namespace AllLengthBadBlockDeepDiveTutorial

inductive Atom where
  | amber
  | blue
  deriving Repr, DecidableEq

def atoms : List Atom := [.amber, .blue]

def atomName : Atom → String
  | .amber => "amber"
  | .blue => "blue"

def centered (n : Nat) : Atom → Rat
  | .amber => -((n - 1 : Nat) : Rat)
  | .blue => 0

def slope : Rat := -(3 : Rat) / 4

def strictBadAt (n : Nat) (x : Atom) : Bool :=
  decide (0 < n ∧ centered n x < slope * (n : Rat))

def capEvent (cap : Nat) : List Atom :=
  atoms.filter fun x =>
    (List.range (cap + 1)).any fun n => strictBadAt n x

def firstWitness (x : Atom) : Option Nat :=
  ((List.range 12).map (· + 1)).find? fun n => strictBadAt n x

def eventMass (event : List Atom) : Rat :=
  (event.length : Rat) / 2

structure CapRow where
  cap : Nat
  event : List String
  mass : Rat
  deriving Repr, DecidableEq

def capRow (cap : Nat) : CapRow :=
  let event := capEvent cap
  { cap := cap
    event := event.map atomName
    mass := eventMass event }

def strictAtSlope (c : Rat) (n : Nat) (x : Atom) : Bool :=
  decide (0 < n ∧ centered n x < c * (n : Rat))

def capEventAtSlope (c : Rat) (cap : Nat) : List Atom :=
  atoms.filter fun x =>
    (List.range (cap + 1)).any fun n => strictAtSlope c n x

def collapse : Atom → Atom
  | .amber => .blue
  | .blue => .blue

def oneShotCentered (n : Nat) : Atom → Rat
  | .amber => if 2 ≤ n then -1 else 0
  | .blue => 0

def oneShotBadAt (n : Nat) (x : Atom) : Bool :=
  decide (0 < n ∧
    oneShotCentered n x < (-(2 : Rat) / 5) * (n : Rat))

def oneShotEvent (cap : Nat) : List Atom :=
  atoms.filter fun x =>
    (List.range (cap + 1)).any fun n => oneShotBadAt n x

def oneShotPreimage (cap : Nat) : List Atom :=
  atoms.filter fun x => (oneShotEvent cap).contains (collapse x)

#eval (List.range 9).map capRow
#eval atoms.map fun x => (atomName x, firstWitness x)
#eval (capEvent 12).map atomName
#eval (eventMass (capEvent 12), (-(1 : Rat) / 2) / slope)
#eval ((capEventAtSlope 0 1).map atomName,
  (capEventAtSlope 0 2).map atomName)
#eval ((oneShotEvent 12).map atomName,
  (oneShotPreimage 12).map atomName)

example : ((List.range 8).map fun n => strictBadAt n .amber) =
    [false, false, false, false, false, true, true, true] := by
  native_decide

example : capEvent 4 = [] := by native_decide
example : capEvent 5 = [.amber] := by native_decide
example : eventMass (capEvent 12) = (1 : Rat) / 2 := by
  native_decide
example : eventMass (capEvent 12) ≤ (-(1 : Rat) / 2) / slope := by
  native_decide
example : capEventAtSlope 0 1 = [] := by native_decide
example : capEventAtSlope 0 2 = [.amber] := by native_decide
example : oneShotEvent 12 = [.amber] := by native_decide
example : oneShotPreimage 12 = [] := by native_decide

end AllLengthBadBlockDeepDiveTutorial

Important syntax:

  • inductive Atom creates exactly the two named atoms;
  • Rat keeps the slopes, masses, and ratio exact;
  • List.range (cap + 1) searches lengths zero through the cap, while strictBadAt separately requires positive length;
  • List.any implements existence of one witness;
  • List.filter materializes the finite event;
  • find? returns some 5 for amber and none for blue; and
  • each native_decide example supplies a kernel-checked proof of a displayed boundary or inequality.

With the pinned compiler installed, a human types:

source "$HOME/.elan/env"
elan run leanprover/lean4:v4.32.0 lean \
  /tmp/AllLengthBadBlockDeepDiveTutorial.lean

This is a standalone tutorial suitable for a normal macOS or Linux host. It imports only Std, enumerates two atoms, and does not compile Mathlib or this project. Successful execution prints exactly:

[{ cap := 0, event := [], mass := 0 },
 { cap := 1, event := [], mass := 0 },
 { cap := 2, event := [], mass := 0 },
 { cap := 3, event := [], mass := 0 },
 { cap := 4, event := [], mass := 0 },
 { cap := 5, event := ["amber"], mass := (1 : Rat)/2 },
 { cap := 6, event := ["amber"], mass := (1 : Rat)/2 },
 { cap := 7, event := ["amber"], mass := (1 : Rat)/2 },
 { cap := 8, event := ["amber"], mass := (1 : Rat)/2 }]
[("amber", some 5), ("blue", none)]
["amber"]
((1 : Rat)/2, (2 : Rat)/3)
([], ["amber"])
(["amber"], [])

The first output is the increasing cap sequence. The next three outputs identify the first witness, union, mass, and ratio. The final two certify the slope-zero strictness boundary and the collapse model’s unequal raw event and preimage. These finite computations do not model extended nonnegative real measure, Measure.real, null measurability, or filter convergence; those are the responsibilities of the project module.

The eleven-declaration interface

The frozen 481-line source exposes exactly eleven public declarations in source order. Its SHA-256 is 53438522344c078d64473316a594570993d694ada909a33184579cec6a996fb7.

No.DeclarationExact responsibility
1centeredAllLengthBadBlockSetDefines the union of every finite centered bad-block cap
2mem_centeredAllLengthBadBlockSet_iffRewrites membership as one positive finite strict witness
3finiteCenteredBadBlockSet_monoProves monotonicity in the search cap
4centeredAllLengthBadBlockSet_eq_iUnion_finiteRestates the definitional union exactly
5finiteCenteredBadBlockSet_subset_allLengthEmbeds each fixed cap in the all-length event
6IsIntegrableSubadditiveProcessCandidate.nullMeasurableSet_centeredAllLengthBadBlockSetTakes the countable null-measurable union under preservation
7tendsto_measure_finiteCenteredBadBlockSetGives unconditional continuity from below in extended measure
8tendsto_measureReal_finiteCenteredBadBlockSetProjects the limit to real measure under local target finiteness
9IsIntegrableSubadditiveProcessCandidate.measureReal_centeredAllLengthBadBlockSet_le_rateRatioTransfers the cap-uniform generic ratio through the real limit
10DiscreteMatrixCocycle.centeredLogPlusAllLengthBadBlockSetNames the cocycle’s log-positive all-length event
11DiscreteMatrixCocycle.HasIntegrableGeneratorLogPlus.measureReal_centeredLogPlusAllLengthBadBlockSet_le_rateRatioSpecializes the unchanged ratio to the cocycle Fekete offset

Fifteen private support items

These source-local declarations build boundary models without enlarging the public API:

No.Private itemRole
1rmt31ZeroProcessDefines the identically zero process
2rmt31ZeroProcess_candidateCertifies integrability and shifted subadditivity of the zero process
3rmt31TwoPointProbabilityDefines the equal-weight measure on Bool
4private IsProbabilityMeasure rmt31TwoPointProbability instanceProves that the two weights sum to one
5rmt31Id_not_preErgodicProves identity on the two-atom probability space is not pre-ergodic
6rmt31TwoPointProcessDefines zero on blue/true and \(-(n-1)\) on amber/false
7rmt31TwoPointProcess_candidateCertifies the displayed process as an integrable shifted-subadditive candidate
8rmt31MassTwoMeasureDefines a finite measure of total mass two on Unit
9private IsFiniteMeasure rmt31MassTwoMeasure instanceSupplies its finite-measure certificate
10rmt31CollapseSends both Boolean points to true
11rmt31OneShotProcessDefines the zero/negative-one one-shot process
12rmt31_iterate_collapse_trueShows every iterate keeps true fixed
13rmt31_iterate_collapse_of_ne_zeroShows every positive iterate sends either point to true
14rmt31OneShotProcess_candidateCertifies the one-shot process as an integrable shifted-subadditive candidate
15rmt31Collapse_preservingProves the collapse map preserves the Dirac measure at true

Ten anonymous compiled examples

The examples are checked propositions but do not create public names:

ProbeExact boundary checked
1Every cap-zero event is empty
2Every finite cap embeds in the all-length union
3The zero process has no strict witness below a negative slope
4Every all-length event has real measure zero under the zero measure
5The nonergodic uniform two-point identity model has event mass \(1/2\) and satisfies \(1/2\le2/3\)
6Equality at length one for slope zero is excluded, while length two gives a later strict witness
7The cap-one event for the two-point process is the whole space exactly when \(0\lt c\), and is empty otherwise
8The generic ratio theorem works for a finite measure of total mass two, not only a probability
9The cocycle theorem compiles with an empty matrix index
10The preserved collapse-map model has a raw event unequal to its preimage

Seven axiom reports

The source prints the axiom footprints of:

  1. mem_centeredAllLengthBadBlockSet_iff;
  2. finiteCenteredBadBlockSet_mono;
  3. IsIntegrableSubadditiveProcessCandidate.nullMeasurableSet_centeredAllLengthBadBlockSet;
  4. tendsto_measure_finiteCenteredBadBlockSet;
  5. tendsto_measureReal_finiteCenteredBadBlockSet;
  6. IsIntegrableSubadditiveProcessCandidate.measureReal_centeredAllLengthBadBlockSet_le_rateRatio; and
  7. DiscreteMatrixCocycle.HasIntegrableGeneratorLogPlus.measureReal_centeredLogPlusAllLengthBadBlockSet_le_rateRatio.

Assumption and nonclaim ledger

LayerRequiredAbsent or unproved
DefinitionMap, process, slopeMeasurable space, measure, subadditivity
UnionNatural witness boundsEvery analytic premise
Null measurabilityCandidate, preservationFinite mass, probability, ergodicity
Extended limitIncreasing caps, unionSet measurability, preservation, finite mass
Real limitFinite measure of unionFinite total mass as such
Generic ratioFinite measure, preservation, candidate, uniform rate, \(c\lt\delta\)Probability, ergodicity, invariance
Cocycle ratioFinite measure, finite decidable matrix index, cocycle with bundled base preservation, integrable log-positive generatorNonempty matrix index, probability, ergodicity, signed log growth
FutureNot in RMT-31Lower liminf, zero-one rigidity, Kingman convergence

The module proves no lower-liminf inequality, almost-everywhere convergence, \(L^1\) convergence, signed logarithmic growth, Lyapunov exponent, or Oseledets splitting.

Thirty solved exercises

Exercise 1: unpack membership

What does \(\omega\in B_\infty(c)\) mean?

Solution. One finite \(n\) satisfies \(0\lt n\) and \(Y_n(\omega)\lt cn\). There is no predetermined cap.

Exercise 2: reject recurrence

Does membership imply infinitely many bad lengths?

Solution. No. A single existential witness suffices.

Exercise 3: compute cap zero

What is \(B_0(c)\)?

Solution. It is empty because no positive length is at most zero.

Exercise 4: recover a cap

Given an uncapped witness \(n\), which cap works?

Solution. Choose \(m=n\); then \(n\le m\) by reflexivity.

Exercise 5: prove finite inclusion

Why is \(B_m(c)\subseteq B_\infty(c)\)?

Solution. It is one term of the defining union.

Exercise 6: prove monotonicity

Why does \(m\le M\) imply \(B_m(c)\subseteq B_M(c)\)?

Solution. Reuse the witness and compose \(n\le m\) with \(m\le M\).

Exercise 7: reject process monotonicity

Does Exercise 6 prove \(Y_m(\omega)\le Y_M(\omega)\)?

Solution. No. Search windows grow; terminal process values need not.

Exercise 8: test equality

If \(Y_n(\omega)=cn\), is \(n\) a bad witness?

Solution. No. The definition requires strict inequality.

Exercise 9: use a later witness

Can equality at time one coexist with all-length membership?

Solution. Yes. A later length can be strictly bad; the compiled example uses time two at slope zero.

Exercise 10: classify the union

Is equality with the cap union only almost everywhere?

Solution. No. It is exact set equality and is definitional.

Exercise 11: build null measurability

Why is the all-length event null measurable?

Solution. Every cap is null measurable and countable unions preserve that property.

Exercise 12: avoid stronger regularity

May this be restated as ordinary measurability?

Solution. Not generally. Null measurability permits a null-set difference from a measurable representative.

Exercise 13: remove finite mass

Where is finite mass used in Exercise 11?

Solution. Nowhere. Countable-union closure has no finiteness premise.

Exercise 14: state native continuity

Which limit is unconditional?

Solution. \(\mu(B_m(c))\to\mu(B_\infty(c))\) in extended measure, even at an infinite target.

Exercise 15: locate set measurability

Does that continuity theorem require measurable caps?

Solution. No. The Mathlib theorem used here accepts increasing sets without that premise.

Exercise 16: compute the cliff

What is \(\operatorname{toReal}(\infty)\)?

Solution. Zero. The projection loses the extended infinity information.

Exercise 17: state the local gate

What permits real-measure convergence?

Solution. The target event’s extended measure must differ from infinity.

Exercise 18: compare finiteness notions

Can the real theorem apply when \(\mu(\Omega)=\infty\)?

Solution. Yes, if this particular union event has finite measure.

Exercise 19: discharge the gate

Why does a finite measure instance suffice?

Solution. The event measure is bounded by the finite total mass.

Exercise 20: transfer a ceiling

If \(x_m\to x\) and \(x_m\le C\), why is \(x\le C\)?

Solution. The closed interval ending at \(C\) contains every term and therefore its limit. Lean uses le_of_tendsto’.

Exercise 21: locate the finite input

What does RMT-30 contribute?

Solution. It proves the same ratio ceiling for every finite cap.

Exercise 22: avoid new packing

Why is interval packing absent from RMT-31?

Solution. Packing already proved the uniform finite theorem; RMT-31 only transports it through a limit.

Exercise 23: force the rate sign

Why is \(\delta\le0\)?

Solution. Apply the rate premise at time one, where \(Y_1=0\).

Exercise 24: force the slope sign

Why is \(c\lt0\)?

Solution. Combine \(c\lt\delta\) with \(\delta\le0\).

Exercise 25: remove probability

Does the generic theorem require total mass one?

Solution. No. It requires finite mass and compiles for mass two.

Exercise 26: remove ergodicity

What does the two-atom identity model show?

Solution. A nonergodic system has a half-mass bad event satisfying \(1/2\le2/3\).

Exercise 27: identify the cocycle rate

What plays the role of \(\delta\)?

Solution. The integrated log-positive Fekete rate minus the one-step log-positive integral.

Exercise 28: permit an empty index

Why can the matrix index be empty?

Solution. The proof uses a bundled norm-process interface and never chooses a coordinate.

Exercise 29: diagnose non-invariance

Why is the singleton event not invariant?

Solution. The collapse map sends both points to true, so the preimage of {false} is empty.

Exercise 30: design RMT-32

What must replace one-witness membership?

Solution. Arbitrarily late witnesses with suitable rational slack, a lower-liminf interpretation, a proved one-sided preimage inclusion, and an almost-invariance upgrade using preservation plus finite mass.

Choose the appropriate runnable path

There are two deliberately separate runnable paths.

  • The Std worksheet is a tiny two-atom arithmetic tutorial suitable for an ordinary macOS or Linux host.
  • The exact project import, extended-measure API, Measure.real, filter limits, candidate interface, and source check use the full project command in Type-check the exact project interface.

The distinction is about resource use, not pedagogy. Readers should type, run, and modify the standalone tutorial. The Mathlib-backed proof remains fully visible; checking it may require substantial disk space and memory.

The paired Development Notebook gives the implementation ledger and review history.

Continue the learning path

Finite Bad-Block Measure Bounds Before Kingman Lower Liminf derives the uniform finite-cap ratio.

From Finite Maximal Bounds to an Infinite Weak Estimate develops the analogous increasing-union and real-projection bridge.

Infinite-horizon Birkhoff-average exceedance event is a comparison for another one-witness event. Birkhoff sum and almost everywhere review language used in the regularity and future asymptotic layers.

References

These primary sources and library references use Mathlib 4.32.0 at pinned commit 81a5d257c8e410db227a6665ed08f64fea08e997.

J. F. C. Kingman. The ergodic theory of subadditive stochastic processes, JRSS Series B 30(3), 499-510, 1968, doi:10.1111/j.2517-6161.1968.tb00749.x. This is the primary source for the full theorem RMT-31 does not claim.

J. Michael Steele. Kingman’s subadditive ergodic theorem, Annales de l’Institut Henri Poincare 25(1), 93-98, 1989. Its interval decomposition motivates the finite machinery; RMT-31 isolates the union step.

Mathlib contributors. Continuity from below, Mathlib 4.32.0. It supplies the unconditional extended-measure limit.

Mathlib contributors. Continuity of ENNReal.toReal away from infinity, Mathlib 4.32.0. RMT-31 uses it only at a finite target.

Mathlib contributors. Definition of Measure.real, Mathlib 4.32.0. The definition totalizes infinite mass to zero.

Mathlib contributors. Null-measurable sets, Mathlib 4.32.0. The proof uses countable-union closure here.

Mathlib contributors. Closed-order limit lemmas, Mathlib 4.32.0. The ratio proof uses le_of_tendsto’ to retain a common upper bound at the real-measure limit.