pell_word_prefix
def
The prefix v_j of u_n consisting of its first j two-letter blocks, v_j = c_1c_2 c_2c_3 … c_jc_(j+1), built by appending one block at a time; v_0 = [] and v_(j+1) = v_j ++ [c_(j+1), c_(j+2)].
Statement
def pell_word_prefix : ℕ → List (Fin 5)- Source
- step towards pell_nfa_run_count_lower_bound
- Verified
- 19 Oct 2026
- Axioms
- none listed
- Used by 5
- pell_word_lengthThe word u_n = c_1c_2…c_(n-2)c_(n-1) has length 2(n-2).
- pell_prefix_first_letter_vectorAfter appending only the letter c_(i+1) to the prefix, the run counts are P(i+1)-P(i) at q_i, 2P(i) at q_(i+1), (P(i+1)-P(i))+2P(i) at…
- pell_prefix_base_countThe prefix c_1c_2 has 1 run from q_1 to q_2, 2 runs from q_1 to q_3, 1 run from q_1 to q_4, and no runs to any other state, in A_n.
- pell_word_getThe j-th letter of u_n is c_(j/2+1) if j is even and c_(j/2+2) if j is odd.
- pell_word_eq_prefixThe word u_n is the prefix v_(n-2) of the block-by-block sequence.
Lean source view module on GitHub
/-- The prefix of pell_word n consisting of its first j two-letter blocks. -/ def pell_word_prefix : ℕ → List (Fin 5) | 0 => [] | i + 1 => pell_word_prefix i ++ [⟨(i + 1) % 5, Nat.mod_lt _ (by decide)⟩, ⟨(i + 2) % 5, Nat.mod_lt _ (by decide)⟩]