thue_morse_word
def
The n-th Thue-Morse word t_n over the alphabet {false, true}, defined recursively by t_0 = [false] and t_{n+1} obtained by replacing each false with [false, true] and each true with [true, false].
Statement
def thue_morse_word : ℕ → List Bool- Defined in
- arXiv:2610.10950
- Verified
- 29 Oct 2026
- Axioms
- none listed
- Used by 7
- thue_morse_min_factor_coverages_finsetThe finite set of inclusion-minimal factor coverages H_min(t_n) of the n-th Thue-Morse word, realized as a Finset of subsets of the…
- thue_morse_unhit_mean_nonnegFor all n and k, 0 ≤ thue_morse_unhit_mean n k.
- thue_morse_random_attractor_prob_zeroFor every natural number n, thue_morse_random_attractor_prob n 0 = 0.
- thue_morse_random_attractor_prob_mem_unit_intervalFor all n and k, 0 ≤ thue_morse_random_attractor_prob n k ≤ 1.
- thue_morse_word_lengthFor every natural number n, the length of the n-th Thue-Morse word t_n is 2^n.
- thue_morse_min_factor_coverages_finset_memFor every n and every C, C belongs to thue_morse_min_factor_coverages_finset n if and only if C is an inclusion-minimal factor coverage of…
- thue_morse_random_attractor_probFor natural numbers n and k, the real number defined as the ratio whose numerator is the cardinality of the finset of functions f : Fin k…
Read back from the Lean
A function thue_morse_word from the natural numbers ℕ to List Bool, defined recursively by:
- thue_morse_word 0 is [false];
- thue_morse_word (n + 1) is the concatenation of the lists obtained by replacing each element b in thue_morse_word n with [true, false] if b = true, and with [false, true] if b = false.
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 n-th Thue-Morse word of length 2^n over {false, true}. -/ def thue_morse_word : ℕ → List Bool | 0 => [false] | n + 1 => (thue_morse_word n).flatMap (fun b => match b with | true => [true, false] | false => [false, true])