The successor array of a sequence #
For a sequence x : ℕ → α, its successor array records, for each value a, the values that
follow successive visits to a. Together with x 0, this array determines the original sequence.
The reconstruction is total: entries after the last genuine visit use the junk value supplied by
Nat.nth, but the round-trip theorem never reads them.
Main definitions #
TauCeti.visitCount: the number of visits to a value before a given index.TauCeti.visitTime: the index of a given visit to a value.TauCeti.successorArray: the values following successive visits to each value.TauCeti.visitedSuccessorArray: the successor array with the rows of unvisited values reset to constants.TauCeti.visitCell: the cell of the successor array a sequence uses at a given time.TauCeti.pathOfSuccessors: reconstruction from an initial value and successor array.
Main results #
TauCeti.visitCount_monotone: visit counts are monotone in the horizon.TauCeti.visitCount_add: a visit count splits at any intermediate index.TauCeti.visitTime_eq_of_eqOn: a visit time is read off any sequence agreeing with the original up to that time.TauCeti.successorArray_visitCount: the defining step relation of the successor array.TauCeti.visitTime_eq_iff: the fibres of the visit times, including the junk-value branch.TauCeti.successorArray_eq_successorArray_zero_of_forall_ne: the successor row of a value the sequence never visits is constant, and repeats the cell the starting value indexes.TauCeti.apply_visitTime_of_infiniteandTauCeti.visitTime_strictMono_of_infinite: visit times are genuine and strictly increasing when the value occurs infinitely often.TauCeti.apply_visitTime_of_leandTauCeti.visitTime_lt_visitTime_of_le: the same two facts below a visit that is known to exist.TauCeti.visitTime_lt_of_lt_visitCount: a visit indexed below a visit count is realised before the horizon.TauCeti.apply_visitTime_of_lt_visitCount: such an index names a genuine visit.TauCeti.visitCount_visitTime_of_lt_visitCount: exactly the indexed number of visits precede that visit.TauCeti.occCount_succ_add_zero_eq_visitCount_add_last: the arrival/departure balance of a finite prefix.TauCeti.successorArray_pathOfSuccessors_of_lt_visitCount: a reconstruction consumes exactly the successor entries it was prescribed.TauCeti.eq_pathOfSuccessors: the uniqueness principle for the reconstruction.TauCeti.pathOfSuccessors_successorArray: reconstruction inverts the successor decomposition.TauCeti.visitCell_injective: distinct times use distinct cells.TauCeti.eqOn_iff_successorArray_visitCell: a finite initial segment of a sequence is pinned down by its initial value together with the successor-array entries at the cells that segment designates. This is the finite-horizon form ofTauCeti.eq_pathOfSuccessors, and the form a finite-path event needs: the cells are read off a reference sequence, so they do not move with the sequence being described.TauCeti.eqOn_iff_visitCell_of_apply_visitCell_eq_succis the same criterion for any array agreeing with the successor array at the cells the sequence consumes, such asTauCeti.visitedSuccessorArray.
References #
- P. Diaconis and D. Freedman, "de Finetti's theorem for Markov chains", Annals of Probability 8 (1980), 115–130.
The number of times the sequence x visits a strictly before n.
Equations
- TauCeti.visitCount x a n = Function.occCount (fun (i : Fin n) => x ↑i) a
Instances For
The value immediately following the k-th visit of x to a. It is junk if that visit does
not exist.
Equations
- TauCeti.successorArray x a k = x (TauCeti.visitTime x a k + 1)
Instances For
The successor array with the rows of the values the sequence never visits reset to a constant:
the (a, k)-entry is successorArray x a k if x visits a, and a itself otherwise. Unlike
TauCeti.successorArray, whose unvisited rows repeat a genuine successor entry, the unvisited rows
of this array carry no information about the sequence beyond the fact that it avoids them.
Equations
- TauCeti.visitedSuccessorArray x a k = if ∃ (n : ℕ), x n = a then TauCeti.successorArray x a k else a
Instances For
The sequence rebuilt from an initial value and a successor array.
Equations
- TauCeti.pathOfSuccessors a₀ s n = TauCeti.pathOfSuccessorsUpTo✝ a₀ s n n
Instances For
The defining equation for visit counts.
The defining equation for an entry of the successor array.
The defining equation for an entry of the visited successor array.
Visit counts are Nat.count of the visiting predicate.
Visit counts are monotone in the horizon.
Visit counts before n depend only on sequence values before n.
Splitting a visit count at the final index.
One more visit is counted when the sequence has the specified value.
No visit is added when the sequence has a different value.
Splitting a visit count at an intermediate index. The visits before m + n are the visits
before m together with the visits the sequence shifted by m makes before n.
The arrival/departure balance of a finite prefix. Reading the first t successors of z
as a word, its occurrences of b together with a possible occurrence of b at time 0 match the
visits of z to b before t together with a possible visit at time t.
A stretch of a sequence that avoids a contributes nothing to its visit count.
A visit count is positive exactly when the sequence visits the value before the horizon.
A time at which x has value a is the visit indexed by the number of earlier visits.
A visit time is read off any sequence agreeing with the original up to that time. If x
and y agree through index n, and n is a visit of y to a preceded by exactly k earlier
visits, then n is the k-th visit of x as well.
This is what transfers the visit structure of a reference path to a process known only to spell that path out over a finite horizon.
The zeroth successor of a value the sequence starts at is its entry at time one.
An unvisited row of the successor array duplicates the cell (x 0, 0). The row of a value
the sequence never takes carries no information of its own: each of its entries repeats the first
successor of the value the sequence starts at.
This ties two cells of the successor array of any sequence that leaves a value unvisited, so a
reindexing that moves the second of them can break the tie, and with it the array. Whether it
does depends on the sequence;
TauCeti.Probability.spareStateProcess_not_rowExchangeable_successorProcess exhibits one where
it does.
A visit index below the visit count at time n is realised strictly before n.
A visit index below the visit count at time n names a genuine visit.
Before a realised visit indexed by k, there are exactly k earlier visits.
A consumed successor entry is read off any sequence agreeing with the original over the
horizon that consumes it. Below the visit count at time m, the entry successorArray x a k
is realised at a visit before m, so it only sees the values of x up to m.
If some time is the m-th visit of x to a, then every earlier visit is realised too: for
k ≤ m some time is the k-th visit.
At a visit to a, the sequence moves to the corresponding entry of its successor array.
The step relation of the successor array.
The rebuilt sequence starts at the given initial value.
The recursion equation for the rebuilt sequence.
A sequence satisfying the reconstruction equations is the rebuilt sequence.
Every entry a rebuilt sequence has already consumed is the prescribed one. Below the visit
count of a at any horizon, the successor array of the reconstruction agrees with the successor
array it was built from, even though the two may differ on unused entries.
Rebuilding from a sequence's initial value and successor array recovers the sequence.
The cell of the successor array that x uses at time n: the value it takes there, paired
with the number of earlier visits to that value.
Equations
- TauCeti.visitCell x n = (x n, TauCeti.visitCount x (x n) n)
Instances For
Distinct times use distinct cells. Two times carrying the same value are separated by that value's visit counts, which strictly increase across the earlier of the two.
Conversely, a sequence with the same initial value as w whose successor-array entries at the
cells w designates are the ones w prescribes agrees with w up to n.
The criterion of TauCeti.eqOn_iff_successorArray_visitCell for any array that records the
successors at the cells the sequence consumes. Only the entries of s at the cells
visitCell x i are constrained: the remaining entries, including the unconsumed cells of a visited
row, are arbitrary. The cells a reference sequence designates are consumed by any sequence agreeing
with it, so such an s pins the initial segment down just as well as the successor array.
A finite initial segment is pinned down by its initial value and the successor-array entries
at the cells it designates. Both the cells and the prescribed successors are read off the
reference sequence w, so the right-hand side is a condition on x through finitely many entries
of its successor array at cells that do not depend on x.
On a row the sequence never visits, the visited successor array is constant, equal to the row's own value.
At every cell consumed by a sequence, its visited successor array records the next value.
Rebuilding from a sequence's initial value and visited successor array recovers the sequence.
A consumed entry of the visited successor array is read off any sequence agreeing with the
original over the horizon that consumes it. A row with a visit before m is visited by both
sequences, so this is TauCeti.successorArray_congr.