The two-state parity walk and its sign-weighted Azuma bound #
The parity walk is the two-state chain x ↦ ¬x ⊕ ξ driven by independent noise bits ξ.
It is the smallest genuinely dependent stationary source: the uniform law on Bool is stationary
for it, and consecutive states are perfectly anti-correlated up to the noise rate.
This module supplies the analytic engine a single-orbit Hoeffding bound for such a chain needs. The engine is one theorem:
hasSubgaussianMGF_signedSum— ifξis an independent family of noise bits whose characterzeta ∘ ξhas a common meanmfrom indexdon, andσ uis anyBool-valued observable of the strict pastξ 0, …, ξ (u + d - 1), then∑_{u < n} χ(σ u) · (ζ(ξ (u+d)) − m)has a sub-Gaussian moment-generating function with parametern— the same parameter an i.i.d. sum of[−1,1]-valued centred variables gets.
The point is the sign weighting: the multiplier χ(σ u) ∈ {±1} may depend arbitrarily on the
past, so a dependent chain's Birkhoff sum falls into this shape whenever the chain's character
obeys a multiplicative recursion at some lag. The proof is Hoeffding's lemma applied one step at a
time, with the past factored out by independence — no conditional expectations, no filtration, and
no general dependent-process concentration.
The second half of the module cashes the recursion in. lagSum_telescope rewrites the Birkhoff
sum of the character as one signed sum plus a boundary term, and the denominator that appears there
is 1 − m with m ≤ 0 — not the spectral gap 1 + m. That is the whole point of the
alternating sign: the summands cancel in pairs, so the boundary term stays O(lag) and the
constant that comes out carries no dependence on the noise rate.
Main results #
chi,zeta— the nontrivial character of(Bool, xor)and its negative, with the multiplicativitychi_xorthat makes the whole development algebraic.walk,par,walk_eq_xor_par— the parity-walk orbit, the noise parity that drives it, and the identity showing the orbit is the initial state xor-shifted by that parity.hasSubgaussianMGF_blockSignedSum— the engine (above), stated over disjoint noise blocks: each step's increment is a bounded reading of its own block, so a multiplier built from two or more noise bits at once is in range. Only pairwise independence of a block from its own past is used, never mutual independence of the derived block readings.hasSubgaussianMGF_signedSum— the engine at one fresh noise bit per step, the singleton-block case.measureReal_abs_ge_le— the two-sided Chernoff bound for a sub-Gaussian variable, in the2·exp(−ε²/(2c))shape the SQ-oracle interface consumes.lagSum_telescope_gen/abs_chiSum_le_gen— the telescoping identity against an arbitrary multiplier sequence, and the resulting deterministic bound(1 − m)·|Birkhoff sum| ≤ |signed sum| + 2·lag. The weight1 − mis the whole story of the constant: atm ≤ 0it helps (abs_chiSum_le), at0 ≤ m < 1it is the spectral gap.chiSum_tail_gen/chiSum_tail— the single-orbit tail, for anyBoolprocess whose character satisfies a lag-Krecursion against an independent noise family; the noise offset is a separate parameter, so a query read through a window pays a boundary allowance in the lag alone and never in its own offset.
The character of (Bool, xor) #
The parity walk's per-step multiplier ζ = −χ: it is +1 exactly when the noise bit fires.
The sign is what distinguishes the parity walk from a lazy random walk — the deterministic
complement ¬ contributes the −, and makes consecutive states anti-correlated.
Instances For
xor of two measurable Bool-valued maps is measurable, for an arbitrary σ-algebra on the
domain — stated without the ambient instance so that it applies to a sub-σ-algebra such as
pastAlg.
The parity walk #
One step of the parity walk: x ↦ ¬x ⊕ ξ.
Equations
- ReflectiveSubsystems.walkStep x b = !(x ^^ b)
Instances For
The parity walk's orbit from x₀ under the noise word ξ: the step into time s+1 reads the
noise bit ξ s.
Equations
- ReflectiveSubsystems.walk x₀ ξ 0 = x₀
- ReflectiveSubsystems.walk x₀ ξ s.succ = ReflectiveSubsystems.walkStep (ReflectiveSubsystems.walk x₀ ξ s) (ξ s)
Instances For
The parity of the noise prefix, with each bit complemented — the deterministic part of the walk's drift folded in.
Equations
- ReflectiveSubsystems.par ξ 0 = false
- ReflectiveSubsystems.par ξ s.succ = (ReflectiveSubsystems.par ξ s ^^ !ξ s)
Instances For
The walk is its initial state shifted by the noise parity. The two-state chain has no dynamics beyond this: the whole trajectory is one bit of initial condition xor a running parity of complemented noise bits.
The prefix parity is additive. A noise-parity prefix splits at any point into the parity
up to the split and the parity of the shifted tail — the deterministic fact behind why two
observations of the same residue class, arbitrarily far apart, differ by only a bounded window of
tape bits (ReflectiveSubsystems.obs_xor_obs_add_mul).
The noise-parity character is a product of noise characters. Each step of the prefix
parity complements one more tape bit, and each complement contributes its own noise character —
the identity ReflectiveSubsystems.chi_pairObs_lagK is exactly this at d = 1.
A parity-walk orbit is measurable once its initial state and the noise bits it reads are.
The noise σ-algebra of the strict past #
The σ-algebra generated by the noise bits indexed by a set t.
Equations
- ReflectiveSubsystems.noiseAlg ξ t = ⨆ i ∈ t, MeasurableSpace.comap (ξ i) inferInstance
Instances For
The σ-algebra generated by the noise bits ξ 0, …, ξ (n-1) — the strict past at time n.
Equations
- ReflectiveSubsystems.pastAlg ξ n = ReflectiveSubsystems.noiseAlg ξ {i : ℕ | i < n}
Instances For
Disjoint blocks #
The engine below reads one block of noise indices per step rather than one index. pastSet A n
is what a step-n multiplier may look at: everything outside every block from n on. With the
blocks pairwise disjoint that set contains all the earlier blocks, so the partial sums are
measurable for it, while being disjoint from the current block — the two facts the induction
needs.
Disjoint noise sets read independent things. Under mutual independence of the noise bits,
anything read off the coordinates in t is independent of anything read off the coordinates outside
t. This is the only probabilistic input the rest of the file needs; it comes from Mathlib's
indep_biSup_compl, so no filtration or conditional expectation appears anywhere here.
The engine: a sub-Gaussian bound for sign-weighted noise sums #
The sign-weighted partial sum over disjoint noise blocks: the multiplier χ(σ u) is an
arbitrary {±1}-valued reading of everything outside the blocks from u on, and the increment
Y u − ρ a centred [−1, 1]-valued reading of the block A u alone.
Equations
- ReflectiveSubsystems.blockSignedSum σ Y ρ n ω = ∑ u ∈ Finset.range n, ReflectiveSubsystems.chi (σ u ω) * (Y u ω - ρ)
Instances For
The sign-weighted partial sum: the multiplier χ(σ u) is an arbitrary {±1}-valued reading of
the strict past, the increment ζ(ξ (u+d)) − m a centred noise character.
Equations
- ReflectiveSubsystems.signedSum ξ σ m d n ω = ∑ u ∈ Finset.range n, ReflectiveSubsystems.chi (σ u ω) * (ReflectiveSubsystems.zeta (ξ (u + d) ω) - m)
Instances For
The engine. A sum of n sign-weighted, centred block increments has a sub-Gaussian
moment-generating function with parameter n — the parameter an i.i.d. [−1,1] sum would get —
even though the signs may depend arbitrarily on everything the earlier blocks say.
At step n the exponential factors as exp(t·Sₙ)·exp(t·χ(σ n)·y); splitting on the two values of
σ n writes it as a sum of two products of a past factor and a present factor, independence
factors each integral, and the two present factors are the mgfs of ±y, both bounded by
exp(t²/2) by Hoeffding's lemma. The two past factors add back up to exp(t·Sₙ), so the
induction hypothesis closes the step.
Only pairwise independence of a block from its own past is used — no mutual independence of the derived block readings, which is what keeps this reachable without a σ-algebra grouping lemma.
The engine, at one fresh noise bit per step. The original shape: the multiplier χ(σ u)
reads the strict past at time u + d and the increment is that step's own noise character. It is
the block engine at the singleton blocks A u = {u + d}.
The two-sided Chernoff bound #
Two-sided Chernoff: a sub-Gaussian variable with parameter c leaves [-ε, ε] with
probability at most 2·exp(−ε²/(2c)), the shape the SQ-oracle interface consumes.
Cashing in the recursion: the telescoping bound #
The telescope. For any Bool sequence o whose character obeys a lag-K multiplicative
recursion χ(o u)·ν u = χ(o (u+K)) against any multiplier sequence ν, the signed sum of the
multipliers is the Birkhoff sum of χ ∘ o weighted by 1 − m, up to two boundary blocks of
length K.
The telescope at the parity walk's own multiplier, its noise character at lag k.
A Birkhoff block of length b has absolute value at most b.
The deterministic half of the tail bound. Under a lag-K multiplicative recursion against
any multiplier sequence, and for any |m| ≤ 1, the Birkhoff sum of the character through time
N + K is controlled by the signed sum up to two boundary blocks of length K — weighted by the
gap 1 − m.
The weight is the whole story of the constant. At m ≤ 0 — the parity walk's own alternating
sign — it is ≥ 1 and therefore helps: no spectral gap is divided by (abs_chiSum_le). At
0 ≤ m < 1 — a persistent multiplier, which is what a cross-class pair character has — it is the
gap itself, and dividing by it is where a noise-rate dependence necessarily enters.
The deterministic half of the tail bound, at the alternating sign. Under the lag-k
recursion and -1 ≤ m ≤ 0, the Birkhoff sum of the character through time N + k exceeds the
signed sum by at most 2k.
This inequality is where the parity walk's anti-correlation is cashed in. The telescope's
denominator is 1 − m ≥ 1, so it helps: no spectral gap is divided by, and the boundary term
does not grow with the noise rate.
The single-orbit tail #
The single-orbit tail. Let ξ be a mutually independent family of noise bits whose
character has common mean m ∈ [−1, 0] from index k on, and let o be any Bool process read
off the strict past whose character obeys the lag-k recursion χ(o u)·ζ(ξ (u+k)) = χ(o (u+k)).
Then the Birkhoff sum of χ ∘ o through time N + k obeys a genuine exponential tail, with the
boundary allowance 2k and the sub-Gaussian parameter N.
For k = 1 this is the parity walk x ↦ ¬x ⊕ ξ itself; larger k is the noisy window chain
(ReflectiveSubsystems/NoisyWindowChain.lean). Note what does not appear: the noise rate. The
bound is uniform over m ∈ [−1, 0], i.e. over every noise level from deterministic alternation to
unbiased.
The telescope's lag K and the noise offset d are separate parameters: d = K = k is the chain
read from time 0, while d = a + k with K = k is the same chain read through a window
starting at offset a — whose boundary allowance is still 2k, not 2(a+k). That is what
keeps a shifted query's constant free of its own offset.
The single-orbit tail at the chain's own lag, read from time 0.
Axiom audit #
Both capstones are #print axioms-clean on the standard triple, and the guards below make that
build-enforced.