AFTD Auto-Formalizing Theoretical Domains

decidable_is_constant_word

instanceoriginal

Decidability instance for the predicate that a word on Fin n over a type with decidable equality is constant.

Statement

instance decidable_is_constant_word {n : ℕ} {α : Type*} [DecidableEq α] (y : Fin n → α) : Decidable (is_constant_word y)
Related work
folklore
Verified
11 Nov 2026
Axioms
none listed
Built on 1
  • is_constant_wordA word y on the finite index set Fin n is constant if all its symbols are equal, that is, y i = y j for all i and j in Fin n.
Used by 4

Read back from the Lean

For any natural number $n$, any type $\alpha$ with decidable equality, and any function $y : \mathrm{Fin}\ n \to \alpha$, it is decidable whether $y$ is a constant word (i.e., whether is_constant_word y holds).

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

/-- Decidability of the constant word predicate on a finite alphabet with decidable equality. -/
instance decidable_is_constant_word {n : ℕ} {α : Type*} [DecidableEq α] (y : Fin n → α) : Decidable (is_constant_word y) := Fintype.decidableForallFintype
See it in the graphDiscuss this resultChallenge it