is_alternating_word
def
For a function w : Fin n → Bool, is_alternating_word w asserts that w equals alternating_word n false or w equals alternating_word n true.
Statement
def is_alternating_word {n : ℕ} (w : Fin n → Bool) : Prop
- Defined in
- arXiv:2611.01064, Section 2
- Verified
- 03 Nov 2026
- Axioms
- none listed
- Built on 1
- alternating_wordGiven a natural number n and a boolean start, alternating_word n start is the function from Fin n to Bool that maps each index i : Fin n…
Read back from the Lean
For a natural number $n$ and a sequence $w : \text{Fin } n \to \text{Bool}$, is_alternating_word w asserts that $w$ is equal to alternating_word n false or $w$ is equal to alternating_word n true.
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
/-- Predicate asserting that a binary word of length n is one of the two alternating words. -/ def is_alternating_word {n : ℕ} (w : Fin n → Bool) : Prop := w = alternating_word n false ∨ w = alternating_word n true