Documentation

CslibFrontier.Foundations.Combinatorics.FunctionalGraph.EndpointCheckpoints

Endpoint minima as orbit checkpoints #

Rank the states of a functional graph. Mark a state when its next L + 1 states, counting the state itself, are distinct and either endpoint has minimum rank. An orbit with a simple prefix of length 2 * L then reaches a mark in fewer than L steps. More precisely, the index of any minimum in the prefix determines the mark by a single comparison.

The selection rule adapts Edgar's closed syncmers to orbit windows Edgar, Methods, “Closed syncmers”, and Fig. 1. Edgar breaks ties on the left. Here either endpoint may be tied for the minimum. The size of the mark set depends on the ranking.

def Cslib.FunctionalGraph.IsEndpointCheckpoint {α : Type u_1} {β : Type u_2} [LinearOrder β] (f : α → α) (rank : α → β) (L : ℕ) (z : α) :

The orbit window from z through f^[L] z is simple and has a minimum at an endpoint.

theorem Cslib.FunctionalGraph.isEndpointCheckpoint_of_min {α : Type u_1} {β : Type u_2} [LinearOrder β] (f : α → α) (rank : α → β) {L : ℕ} {x : α} (hinj : Function.Injective fun (j : Fin (2 * L)) => f^[↑j] x) (i : Fin (2 * L)) (hmin : ∀ (j : Fin (2 * L)), rank (f^[↑i] x) ≤ rank (f^[↑j] x)) :
IsEndpointCheckpoint f rank L (f^[if ↑i < L then ↑i else ↑i - L] x)

Folding a minimum index in a simple prefix of length 2 * L selects a window whose minimum is at the left endpoint in the first half and at the right endpoint in the second.

theorem Cslib.FunctionalGraph.exists_endpointCheckpoint {α : Type u_1} {β : Type u_2} [LinearOrder β] (f : α → α) (rank : α → β) {L : ℕ} (hL : 0 < L) {x : α} (hinj : Function.Injective fun (j : Fin (2 * L)) => f^[↑j] x) :
∃ d < L, IsEndpointCheckpoint f rank L (f^[d] x)

Every simple prefix of length 2 * L reaches an endpoint checkpoint within its first L states. The ranking and the starting state are arbitrary.

theorem Cslib.FunctionalGraph.exists_endpointCheckpoint_near_transient {α : Type u_1} {β : Type u_2} [LinearOrder β] (f : α → α) (rank : α → β) [Finite α] {L t : ℕ} (hL : 0 < L) (x : α) (hfar : 2 * L ≤ t) (ht : t ≤ transientDepth f x) :
∃ (a : α), IsEndpointCheckpoint f rank L a ∧ (∃ j ≤ transientDepth f x, f^[j] x = a) ∧ transientDepth f (f^[t] x) ≤ transientDepth f a ∧ transientDepth f a ≤ transientDepth f (f^[t] x) + 2 * L

For an orbit still in its transient part after at least 2 * L steps, some checkpoint on that orbit is at most 2 * L steps before the target. The first inequality on depths ensures that a forward walk from the checkpoint can reach the target.

theorem Cslib.FunctionalGraph.iterate_of_ancestor_depth_window {α : Type u_1} (f : α → α) [Finite α] {x a : α} {t K : ℕ} (ht : t ≤ transientDepth f x) (ha : ∃ j ≤ transientDepth f x, f^[j] x = a) (hlo : transientDepth f (f^[t] x) ≤ transientDepth f a) (hhi : transientDepth f a ≤ transientDepth f (f^[t] x) + K) :
have k := transientDepth f a - transientDepth f (f^[t] x); k ≤ K ∧ f^[k] a = f^[t] x

Every ancestor in the target depth window yields the same answer. Taking the difference of depths gives the exact suffix length to walk, bounded by the width of the window.