AFTD Auto-Formalizing Theoretical Domains

good_slopes_prime5_two_rows_three_heights_counterexample

theoremverified

There are five points over Z/5 with two specified injective directions, at most three distinct second coordinates, and no containing affine line. This refutes the proposed two-direction strengthening of the field-five step.

Statement

theorem good_slopes_prime5_two_rows_three_heights_counterexample :
    ∃ S : Finset (ZMod 5 × ZMod 5),
      S.card = 5 ∧
      (S.image fun p => p.2 + p.1).card = 5 ∧
      (S.image fun p => p.2 + 2*p.1).card = 5 ∧
      (S.image fun p => p.2).card ≤ 3 ∧
      (¬ ∃ a b : ZMod 5, ∀ p ∈ S, p.2 + a*p.1 = b) ∧
      (¬ ∃ x : ZMod 5, ∀ p ∈ S, p.1 = x)
Source
Counterexample identified in computation 27596 for the OP-1027 fiber investigation.
Verified
15 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

The proof, explained

The theorem is proved constructively by exhibiting the explicit five-point subset $S = \{(0,0), (0,1), (0,2), (1,2), (4,0)\} \subseteq (\mathbb{Z}/5)^2$. Direct finite evaluation verifies that $S$ has size 5, the two directional projection maps $(x,y) \mapsto y + x$ and $(x,y) \mapsto y + 2x$ are injective on $S$, and the second coordinates take only 3 distinct values $\{0, 1, 2\}$. Finally, $S$ cannot lie on any affine line: any non-vertical line $y + ax = b$ containing $(0,0)$ and $(0,1)$ would force $0 = b = 1$, and any vertical line $x = c$ containing $(0,0)$ and $(1,2)$ would force $0 = x = 1$, both contradicting $0 \neq 1$ in $\mathbb{Z}/5$.

  1. The set $S = \{(0,0), (0,1), (0,2), (1,2), (4,0)\} \subseteq (\mathbb{Z}/5)^2$ has 5 elements, injects under both $(x, y) \mapsto y + x$ and $(x, y) \mapsto y + 2x$, and has second-coordinate projection of size at most 3.

    We define the candidate set $S = \{(0,0), (0,1), (0,2), (1,2), (4,0)\}$. The first four conjuncts are verified by direct finite computation (`decide`): $S$ consists of 5 distinct points; its image under $(x,y) \mapsto y + x$ is $\{0, 1, 2, 3, 4\}$, which has size 5; its image under $(x,y) \mapsto y + 2x$ is $\{0, 1, 2, 4, 3\}$, which has size 5; and its image under the projection $(x,y) \mapsto y$ is $\{0, 1, 2\}$, which has cardinality $3 \le 3$. This leaves the final two goals: showing that $S$ is not contained in any affine line.

    lines 9–10

      let S : Finset (ZMod 5 × ZMod 5) := {(0,0), (0,1), (0,2), (1,2), (4,0)}
      refine ⟨S, by decide, by decide, by decide, by decide, ?_, ?_⟩
  2. The set $S$ is not contained in any non-vertical affine line.

    Suppose, for contradiction, that there exist $a, b \in \mathbb{Z}/5$ such that every point $(x,y) \in S$ satisfies $y + ax = b$. Specializing to $(0,0) \in S$ gives $0 + a \cdot 0 = b$, which simplifies by `mul_zero` and `add_zero` to $0 = b$. Specializing to $(0,1) \in S$ gives $1 + a \cdot 0 = b$, which simplifies to $1 = b$. Transitivity then forces $0 = 1$, contradicting the fact that $0 \neq 1$ in $\mathbb{Z}/5$.

    lines 11–15

    uses mul_zero, add_zero

      · rintro ⟨a,b,h⟩
        have h0 := h (0,0) (by decide)
        have h1 := h (0,1) (by decide)
        simp only [mul_zero, add_zero] at h0 h1
        exact (by decide : (0 : ZMod 5) ≠ 1) (h0.trans h1.symm)
  3. The set $S$ is not contained in any vertical affine line.

    Suppose, for contradiction, that there exists $x \in \mathbb{Z}/5$ such that every point in $S$ has first coordinate equal to $x$. Specializing to $(0,0) \in S$ gives $0 = x$, while specializing to $(1,2) \in S$ gives $1 = x$. Transitivity forces $0 = 1$, which again contradicts $0 \neq 1$ in $\mathbb{Z}/5$.

    lines 16–19

      · rintro ⟨x,h⟩
        have h0 := h (0,0) (by decide)
        have h1 := h (1,2) (by decide)
        exact (by decide : (0 : ZMod 5) ≠ 1) (h0.trans h1.symm)
mul_zero
Multiplying any element by zero on the right gives zero ($a \cdot 0 = 0$).
add_zero
Adding zero on the right leaves an element unchanged ($a + 0 = a$).

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 good_slopes_prime5_two_rows_three_heights_counterexample :    ∃ S : Finset (ZMod 5 × ZMod 5),      S.card = 5 ∧      (S.image fun p => p.2 + p.1).card = 5 ∧      (S.image fun p => p.2 + 2*p.1).card = 5 ∧      (S.image fun p => p.2).card ≤ 3 ∧      (¬ ∃ a b : ZMod 5, ∀ p ∈ S, p.2 + a*p.1 = b) ∧      (¬ ∃ x : ZMod 5, ∀ p ∈ S, p.1 = x) := by  let S : Finset (ZMod 5 × ZMod 5) := {(0,0), (0,1), (0,2), (1,2), (4,0)}  refine ⟨S, by decide, by decide, by decide, by decide, ?_, ?_⟩  · rintro ⟨a,b,h⟩    have h0 := h (0,0) (by decide)    have h1 := h (0,1) (by decide)    simp only [mul_zero, add_zero] at h0 h1    exact (by decide : (0 : ZMod 5) ≠ 1) (h0.trans h1.symm)  · rintro ⟨x,h⟩    have h0 := h (0,0) (by decide)    have h1 := h (1,2) (by decide)    exact (by decide : (0 : ZMod 5) ≠ 1) (h0.trans h1.symm)
See it in the graphDiscuss this resultChallenge it