trifferent_is_bad
def
A triple of ternary words $x, y, z \in (\mathrm{Fin}\,3)^n$ of blocklength $n$ is bad if it has no rainbow coordinate, that is, for every coordinate $i \in \mathrm{Fin}\,n$, the set $\{x_i, y_i, z_i\}$ has cardinality at most $2$.
Statement
def trifferent_is_bad {n : ℕ} (x y z : Fin n → Fin 3) : Prop
- Defined in
- arXiv:2611.33212, Section 2.1
- Verified
- 28 Nov 2026
- Axioms
- none listed
- Used by 4
- trifferent_code_alteration_lemmaLet $n$ be an implicit natural number, $\mu$ a probability measure on $\mathrm{Fin}\,n \to \mathrm{Fin}\,3$, and $M$ a natural number with…
- trifferent_errorFor an implicit natural number $n$ and a measure $\mu$ on $\mathrm{Fin}\,n \to \mathrm{Fin}\,3$,
trifferent_error$\mu$ is the real… - trifferent_is_bad_of_eqFor any ternary words $x, y \in (\mathrm{Fin}\,3)^n$, the triple $(x, x, y)$ has no rainbow coordinate, and is therefore bad.
- IsTrifferentCodeFor an implicit natural number $n$, a finite set of ternary words $C : \mathrm{Finset}\,(\mathrm{Fin}\,n \to \mathrm{Fin}\,3)$ satisfies…
Read back from the Lean
Given a natural number n and three functions x, y, z : Fin n → Fin 3, trifferent_is_bad x y z asserts that for every index i : Fin n, the cardinality of the finite set {x i, y i, z i} is at most 2 (that is, at each coordinate i, at least two of x i, y i, and z i are equal, so they do not all three take distinct values).
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
/-- A triple of ternary words of blocklength n is bad if it has no rainbow coordinate. -/ def trifferent_is_bad {n : ℕ} (x y z : Fin n → Fin 3) : Prop := ∀ i : Fin n, ({x i, y i, z i} : Finset (Fin 3)).card ≤ 2