is_t_spaced_word
def
A word y : Fin n → Fin q is t-spaced if y i ≠ y j for all indices i, j : Fin n satisfying i.val < j.val and j.val ≤ i.val + t.
Statement
def is_t_spaced_word (t : ℕ) {n q : ℕ} (y : Fin n → Fin q) : Prop
- Defined in
- knowledgebase, OP-1503
- Verified
- 11 Nov 2026
- Axioms
- none listed
- Used by 2
- op_1503_spaced_word_two_iffFor any word y : Fin n → Fin q, y is 2-spaced if and only if y is a proper coloring of the square of the path (is_square_path_coloring y).
- op_1503_canonical_spaced_word_is_spacedFor any natural numbers t, q, and n with t + 1 ≤ q, the canonical spaced word qary_canonical_spaced_word t q n htq is t-spaced.
Read back from the Lean
For a natural number t, implicit natural numbers n and q, and a function y : Fin n → Fin q, is_t_spaced_word t y is the proposition that for all i, j : Fin n, if i.val < j.val and j.val ≤ i.val + t, then y i ≠ y j (that is, any two distinct positions at distance at most t have distinct values under y).
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
/-- Property that a q-ary word has distinct symbols at all pairs of indices within distance at most t. -/ def is_t_spaced_word (t : ℕ) {n q : ℕ} (y : Fin n → Fin q) : Prop := ∀ (i j : Fin n), i.val < j.val → j.val ≤ i.val + t → y i ≠ y j