phi_iter
For a positive integer k with proof hk : 0 < k, the n-th iterate phi_iter k hk n of phi_morphism k starting from [0] is defined recursively by phi_iter k hk 0 = [0] and phi_iter k hk (n + 1) = (phi_iter k hk n).flatMap (phi_morphism k).
Statement
def phi_iter (k : ℕ) (hk : 0 < k) : ℕ → List (Fin k)- Defined in
- arXiv:2611.13676 Sec. 1
- Verified
- 15 Nov 2026
- Axioms
- none listed
- Built on 1
- phi_morphismFor a positive integer k and a letter i in Fin k, phi_morphism k i is [0, i + 1] if i + 1 < k, and [0, i, i] if i + 1 = k.
- Used by 1
- u_wordFor a positive integer k with proof hk : 0 < k, the infinite word u_word k hk : ℕ → Fin k is the fixed point of phi_morphism k, where the…
Read back from the Lean
phi_iter is a definition taking a natural number k, a proof hk : 0 < k, and a natural number n, which returns a list of elements of Fin k (integers from $0$ to $k-1$). It is defined recursively on n:
- For n = 0, it returns the singleton list [0] (as an element of Fin k).
- For n + 1, it applies phi_morphism k to each element of phi_iter k hk n and flattens the resulting list of lists (via List.flatMap).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- The finite prefix sequence obtained by iterating phi_k starting from [0]. -/ def phi_iter (k : ℕ) (hk : 0 < k) : ℕ → List (Fin k) | 0 => [⟨0, hk⟩] | n + 1 => (phi_iter k hk n).flatMap (phi_morphism k)