ternary_nae
def
The ternary not-all-equal Boolean function NAE₃ on 3 bits, which outputs 0 on 000 and 111 and 1 otherwise.
Statement
def ternary_nae (x : Fin 3 → Bool) : Bool- Defined in
- arXiv:2611.16412 Section 5
- Verified
- 13 Nov 2026
- Axioms
- none listed
- Used by 1
- recursive_naeThe k-th recursive block composition F_k = NAE₃^{∘ k} of the ternary not-all-equal Boolean function on 3^k bits.
Read back from the Lean
Definition of a function ternary_nae that takes a map x : Fin 3 → Bool and returns a Bool. It is defined as the boolean negation of (x 0 == x 1) && (x 1 == x 2); that is, it evaluates to true if not all three values x 0, x 1, and x 2 are equal, and false if x 0 = x 1 = x 2.
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 ternary not-all-equal Boolean function on 3 bits, outputting 0 on 000 and 111 and 1 otherwise. -/ def ternary_nae (x : Fin 3 → Bool) : Bool := !((x 0 == x 1) && (x 1 == x 2))