The Markov error count: a law on the last k symbols, and its bound #
DrivenColumns.lean proves a finite-valued sequence driven by an eventually periodic input
eventually periodic, and exhibits a column that is not. This file connects two currencies: a
sequence is eventually periodic exactly when SOME fixed law on its last k symbols answers
correctly from some point on, and exactly when the fewest errors any such law makes stays bounded as
the horizon grows. The fewest errors any such predictor makes before a horizon T is the error
count of the best Markov predictor of order k in hindsight; divided by T it is the k-th order
Markov predictability of Feder, Merhav and Gutman (1992), up to the convention for the first k
symbols.
A sequence is eventually exact at order k when some law on its last k symbols answers the
next symbol from some step on (EventuallyExact).
Main results #
EventuallyExact— the order-klaw condition.eventuallyExact_of_eventuallyPeriodicreads it off eventual periodicity directly, at the period as order;eventuallyPeriodic_of_eventuallyExactis the converse, over a finite alphabet, by casting the law's own driven register (shiftAppendStep) as an instance ofDrivenColumns.eventuallyPeriodic_of_driven;exists_eventuallyExact_iff_eventuallyPeriodicfolds the two directions into one equivalence, andeventuallyExact_nat_id_not_eventuallyPeriodicguards the finite-alphabet hypothesis: the naturals' own identity is exact at order1yet never eventually periodic.predictorErrors,markovErrorCount— how many errors a fixed law makes before a horizon, and the fewest errors any law on the given order makes.markovErrorCount_bounded_iff_eventuallyExactandexists_markovErrorCount_bounded_iff_eventuallyPeriodicare the two count-currency counterparts of the law-currency facts above, the second existentially over the order.exists_eventuallyExact_observedWindow_iff/exists_markovErrorCount_bounded_observedWindow_iff— both currencies ofeventuallyPeriodic_observedWindow_iff's window form, read at a local rule's observed window: the width-(m + 1)window meets the condition iff its two boundary columns each do, at their own (separate) orders.eventuallyExact_observedColumn_f90_single,not_exists_eventuallyExact_observedColumn_f90_single_one,markovErrorCount_observedColumn_f90_single_one_unbounded— the guard pair, both currencies, at the columnnot_eventuallyPeriodic_observedColumn_f90_single_onealready treats: the center column is eventually exact at order0, and the cell beside it is eventually exact at NO order, with an unbounded Markov error count at every order.LocalRule.ZeroByEndpoints.exists_markovErrorCount_bounded_observedColumn,LocalRule.ZeroByEndpoints.exists_markovErrorCount_bounded_observedWindow— the observer's bill against the system's growth read at the class level: at every rule of the zero class some order gives every cell's count, and every window's, a bound.LocalRule.ZeroByEndpoints.exists_markovErrorCount_bounded_observedColumn_nonvacuousmeets both named hypotheses at once at rule170, andexists_markovErrorCount_bounded_observedColumn_zero_class_guardshows the class hypothesis load-bearing: rule90is in the other class and one cell's count there is unbounded at every order.
Scope #
The two window theorems are registered as [RuleSpace] §4 Proposition 4.3, clause (i), row RS-7;
nothing else here is registered against any paper: the class-level corollary is registered against
none, [RuleSpace] §3 Proposition 3.1 being the class it ranges over and Proposition 4.3 the
count's registration, cited for that reason alone, and it claims nothing at the twenty-eight
rules in neither class; [RuleSpace] §4 Proposition 4.2 is what the rest extends, cited for that
reason alone. The two window theorems are stated at a general local rule LocalRule.finRule f hq,
never specialized beyond the guard pair's own column.
A law on the last k symbols, and eventual periodicity #
A law on the last k symbols: some function of the window x t, …, x (t + k - 1)
answers x (t + k), from some point on.
Equations
Instances For
Eventual periodicity gives a law: the law that answers the oldest symbol its own period holds, at the period as order.
A law gives eventual periodicity, over a finite alphabet. At k = 0 the law directly gives
x eventually constant. At k > 0 the block of the last k symbols is itself driven — over a
one-point input, by shiftAppendStep — hence eventually periodic by eventuallyPeriodic_of_driven,
and x is its 0-th coordinate.
The two directions above, as one equivalence.
The finite alphabet is load-bearing in eventuallyPeriodic_of_eventuallyExact: the law
that adds one to its one symbol is exact from the start, and the identity on the naturals repeats
nowhere.
The Markov error count #
How many errors a fixed law on the last k symbols makes, before horizon T.
Equations
- ECA.predictorErrors k L x T = {t ∈ Finset.range T | (L fun (i : Fin k) => x (t + ↑i)) ≠ x (t + k)}.card
Instances For
The Markov error count: the fewest errors any law on the last k symbols makes before T.
Equations
- ECA.markovErrorCount k x T = ⨅ (L : (Fin k → α) → α), ECA.predictorErrors k L x T
Instances For
A bounded Markov error count is a law: the laws are finitely many, the infimum over a
nonempty finite family in ℕ is attained at each T (ciInf_mem), so one law attains the
infimum at infinitely many T (Finite.exists_infinite_fiber, the pigeonhole), hence — by
monotonicity — at every T; a monotone count bounded above stops rising, and from the last rise on
that law never errs.
The existential count-currency form: bounded Markov error count at SOME order, exactly when eventually periodic.
The window of a local rule #
The window's law-currency form: the width-(m + 1) window is eventually exact at SOME
order iff its two boundary columns each are, at their own (separate) orders — three applications
of the pieces above around eventuallyPeriodic_observedWindow_iff.
The window's count-currency form, the same fact read through markovErrorCount: both sides
reduce to exists_markovErrorCount_bounded_iff_eventuallyPeriodic, and what remains is exactly
eventuallyPeriodic_observedWindow_iff.
The guards at rule 90 #
The center column is eventually exact at order 0: it is eventually 0, from step 1 on.
The cell beside it is eventually exact at NO order.
Its Markov error count is unbounded, at every order.
The count at the two classes of rules #
The observer's bill at the zero class: at every rule of the zero class, every cell's
Markov error count is bounded at some order. It is
exists_markovErrorCount_bounded_iff_eventuallyPeriodic read through
LocalRule.ZeroByEndpoints.eventuallyPeriodic_observedColumn; the class is
[RuleSpace] §3 Proposition 3.1's and the count's registration [RuleSpace] §4 Proposition 4.3,
cited for that reason alone.
The same bill at every window of the zero class: the width-(m + 1) window at cell a
has a bounded count at some order, by the window form through the column form at its two end
cells.
Both hypotheses of the corollary hold at once, at rule 170 (the shift) from the single
seed 1 at cell 0, and its conclusion is asserted there.
The class hypothesis is load-bearing: rule 90 lies in the other class, and at it the
cell-one column's Markov error count exceeds every bound, at every order.
Axiom audit #
Every public theorem above is #print axioms-clean on the standard triple, and the guards below
make that build-enforced.