AFTD Auto-Formalizing Theoretical Domains

finite_field_xor_five_avoids_unit_three_seventeen

theoremverified

There are two Boolean functions on the field with five elements whose coordinatewise XOR colors the finite plane without a false unit triple or a true unit seventeen-term progression.

Statement

theorem finite_field_xor_five_avoids_unit_three_seventeen :
    ∃ f g : ZMod 5 → Bool,
      (∀ x v : Fin 2 → ZMod 5, (∑ i : Fin 2, (v i)^2) = 1 →
        ¬ ∀ k : Fin 3, xor (f (x 0 + (k.val : ZMod 5)*v 0))
          (g (x 1 + (k.val : ZMod 5)*v 1)) = false) ∧
      (∀ x v : Fin 2 → ZMod 5, (∑ i : Fin 2, (v i)^2) = 1 →
        ¬ ∀ k : Fin 17, xor (f (x 0 + (k.val : ZMod 5)*v 0))
          (g (x 1 + (k.val : ZMod 5)*v 1)) = true)
Source
OP-1482; sharp small-prime boundary of the separable XOR family
Verified
17 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

The proof, explained

The theorem is proved by exhibiting explicit Boolean functions $f$ and $g$ on the finite field $\mathbb{Z}/5\mathbb{Z}$ and verifying the two conditions by exhaustive evaluation. The function $f$ is defined to be true on $\{0, 1, 3\}$ and false on $\{2, 4\}$, while $g$ is true on $\{0, 3\}$ and false on $\{1, 2, 4\}$. Because the plane $(\mathbb{Z}/5\mathbb{Z})^2$ contains only 25 points and 4 unit vectors, both the absence of monochromatic false 3-term progressions and the absence of monochromatic true 17-term progressions are finite decidable statements, which are verified directly by computation.

  1. It suffices to verify the two conditions for explicit candidate functions $f$ and $g$.

    We provide explicit witnesses for the existential quantifier: $f(x)$ is defined to be false on $\{2, 4\}$ and true on $\{0, 1, 3\}$, while $g(y)$ is defined to be true on $\{0, 3\}$ and false on $\{1, 2, 4\}$. This splits the proof into two independent verification goals for the coloring $(x, y) \mapsto f(x) \oplus g(y)$.

    lines 9–10

      refine ⟨fun x => !(decide (x ∈ ({2,4} : Finset (ZMod 5)))),
        fun y => decide (y ∈ ({0,3} : Finset (ZMod 5))), ?_, ?_⟩
  2. No 3-term unit progression in the plane is monochromatic false under $f \oplus g$. automation

    For every base point $x \in (\mathbb{Z}/5\mathbb{Z})^2$ and unit vector $v \in (\mathbb{Z}/5\mathbb{Z})^2$ (satisfying $v_0^2 + v_1^2 = 1$), the coloring $f(x_0 + k v_0) \oplus g(x_1 + k v_1)$ across $k \in \{0, 1, 2\}$ is not identically false. Since the plane has only 25 points and 4 unit vectors, this finite statement is verified by exhaustive computation using the `decide` tactic.

    lines 11–13

      · set_option maxRecDepth 32768 in
          set_option maxHeartbeats 3000000 in
            decide
  3. No 17-term unit progression in the plane is monochromatic true under $f \oplus g$. automation

    For every base point $x \in (\mathbb{Z}/5\mathbb{Z})^2$ and unit vector $v \in (\mathbb{Z}/5\mathbb{Z})^2$, the coloring across $k \in \{0, \dots, 16\}$ is not identically true. This finite check over all point-direction pairs is likewise discharged by exhaustive computation via `decide`.

    lines 14–16

      · set_option maxRecDepth 32768 in
          set_option maxHeartbeats 3000000 in
            decide

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

theorem finite_field_xor_five_avoids_unit_three_seventeen :    ∃ f g : ZMod 5 → Bool,      (∀ x v : Fin 2 → ZMod 5, (∑ i : Fin 2, (v i)^2) = 1 →        ¬ ∀ k : Fin 3, xor (f (x 0 + (k.val : ZMod 5)*v 0))          (g (x 1 + (k.val : ZMod 5)*v 1)) = false) ∧      (∀ x v : Fin 2 → ZMod 5, (∑ i : Fin 2, (v i)^2) = 1 →        ¬ ∀ k : Fin 17, xor (f (x 0 + (k.val : ZMod 5)*v 0))          (g (x 1 + (k.val : ZMod 5)*v 1)) = true) := by  refine ⟨fun x => !(decide (x ∈ ({2,4} : Finset (ZMod 5)))),    fun y => decide (y ∈ ({0,3} : Finset (ZMod 5))), ?_, ?_⟩  · set_option maxRecDepth 32768 in      set_option maxHeartbeats 3000000 in        decide  · set_option maxRecDepth 32768 in      set_option maxHeartbeats 3000000 in        decide
See it in the graphDiscuss this resultChallenge it