good_slopes_prime5_anchored_line
A set of five points over the field with five elements that contains (0,0) and (1,4), and on which y+2x, y+3x and y+4x are injective, lies on the line y+x=0.
Statement
theorem good_slopes_prime5_anchored_line (S : Finset (ZMod 5 × ZMod 5)) (hcard : S.card = 5) (h0 : (0,0) ∈ S) (h1 : (1,4) ∈ S) (h2 : Set.InjOn (fun p : ZMod 5 × ZMod 5 => p.2 + 2 * p.1) S) (h3 : Set.InjOn (fun p : ZMod 5 × ZMod 5 => p.2 + 3 * p.1) S) (h4 : Set.InjOn (fun p : ZMod 5 × ZMod 5 => p.2 + 4 * p.1) S) : ∀ p ∈ S, p.2 + p.1 = 0
- Source
- Finite prime-plane direction lemma for the 35-point fiber route to OP-1027; compare arXiv:2611.01465, Lemma 4.7.
- Verified
- 11 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Used by 1
- good_slopes_fiber35_unit_gapFor any 35 points over the residues modulo 35, if at least one unit direction fails to be injective, then at most 20 of the 24 unit…
The proof, explained
We prove that every point in S lies on y + x = 0 by contradiction. Assuming some point p ∈ S does not lie on this line, the injectivity of the three linear forms forces every other point q ∈ S to coincide with (0,0), (1,4), or p, by an exhaustive finite check over (ZMod 5)². This implies S ⊆ {(0,0), (1,4), p}, contradicting that S has 5 elements.
Any point q in the field satisfying the pairwise injectivity conditions with an off-line point p and the anchor points must be (0,0), (1,4), or p. automation
Because ZMod 5 × ZMod 5 is a finite set of 25 elements, the universal quantification over all pairs of points (p, q) and slopes a ∈ {2, 3, 4} is decided by exhaustive computation.
q = (0,0) ∨ q = (1,4) ∨ q = p := by decide
Assume for contradiction that some point p in S does not lie on the line y + x = 0.
We enable classical reasoning, rewrite the injectivity assumptions in terms of form5, introduce an arbitrary point p ∈ S, and assume for contradiction that p.2 + p.1 ≠ 0.
classical change Set.InjOn (form5 2) S at h2 change Set.InjOn (form5 3) S at h3 change Set.InjOn (form5 4) S at h4 intro p hp by_contra hpbad
For each slope a ∈ {2, 3, 4}, the form form5 a is injective on S.
We perform a case split on the value of a ∈ {2, 3, 4}; each case matches one of the given injectivity hypotheses h2, h3, or h4.
have hinj : ∀ a : ZMod 5, a = 2 ∨ a = 3 ∨ a = 4 → Set.InjOn (form5 a) S := by intro a ha rcases ha with rfl | rfl | rfl <;> assumption
The set S is a subset of {(0,0), (1,4), p}.
For every point q ∈ S, since (0,0), (1,4), p, and q all belong to S, the injectivity of form5 a ensures that whenever two points produce equal values, they are identical. Applying the compatibility table prime5_compatibility_table to p and q forces q to be (0,0), (1,4), or p. Unfolding finset membership finishes the inclusion.
uses
prime5_compatibility_table,Finset.mem_insert,Finset.mem_singletonhave hsub : S ⊆ {(0,0), (1,4), p} := by intro q hq have ht := prime5_compatibility_table p q hpbad (by intro a ha have hi := hinj a ha exact ⟨fun h => hi hp h0 h, fun h => hi hp h1 h, fun h => hi hq h0 h, fun h => hi hq h1 h, fun h => hi hp hq h⟩) simp only [Finset.mem_insert, Finset.mem_singleton] tauto
A contradiction is reached because |S| = 5 but |S| ≤ 3.
Since S ⊆ {(0,0), (1,4), p}, its cardinality is at most the cardinality of {(0,0), (1,4), p} by Finset.card_le_card. The latter set has at most 3 elements by Finset.card_le_three. Since |S| = 5, linear integer arithmetic (omega) derives a contradiction.
uses
Finset.card_le_card,Finset.card_le_threehave hc := Finset.card_le_card hsub have hbound : ({(0,0), (1,4), p} : Finset (ZMod 5 × ZMod 5)).card ≤ 3 := Finset.card_le_three omega
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option maxRecDepth 10000set_option maxHeartbeats 6000000private def form5 (a : ZMod 5) (p : ZMod 5 × ZMod 5) := p.2 + a * p.1private theorem prime5_compatibility_table : ∀ p q : ZMod 5 × ZMod 5, p.2 + p.1 ≠ 0 → (∀ a : ZMod 5, a = 2 ∨ a = 3 ∨ a = 4 → (form5 a p = form5 a (0,0) → p = (0,0)) ∧ (form5 a p = form5 a (1,4) → p = (1,4)) ∧ (form5 a q = form5 a (0,0) → q = (0,0)) ∧ (form5 a q = form5 a (1,4) → q = (1,4)) ∧ (form5 a p = form5 a q → p = q)) → q = (0,0) ∨ q = (1,4) ∨ q = p := by decidetheorem good_slopes_prime5_anchored_line (S : Finset (ZMod 5 × ZMod 5)) (hcard : S.card = 5) (h0 : (0,0) ∈ S) (h1 : (1,4) ∈ S) (h2 : Set.InjOn (fun p : ZMod 5 × ZMod 5 => p.2 + 2 * p.1) S) (h3 : Set.InjOn (fun p : ZMod 5 × ZMod 5 => p.2 + 3 * p.1) S) (h4 : Set.InjOn (fun p : ZMod 5 × ZMod 5 => p.2 + 4 * p.1) S) : ∀ p ∈ S, p.2 + p.1 = 0 := by classical change Set.InjOn (form5 2) S at h2 change Set.InjOn (form5 3) S at h3 change Set.InjOn (form5 4) S at h4 intro p hp by_contra hpbad have hinj : ∀ a : ZMod 5, a = 2 ∨ a = 3 ∨ a = 4 → Set.InjOn (form5 a) S := by intro a ha rcases ha with rfl | rfl | rfl <;> assumption have hsub : S ⊆ {(0,0), (1,4), p} := by intro q hq have ht := prime5_compatibility_table p q hpbad (by intro a ha have hi := hinj a ha exact ⟨fun h => hi hp h0 h, fun h => hi hp h1 h, fun h => hi hq h0 h, fun h => hi hq h1 h, fun h => hi hp hq h⟩) simp only [Finset.mem_insert, Finset.mem_singleton] tauto have hc := Finset.card_le_card hsub have hbound : ({(0,0), (1,4), p} : Finset (ZMod 5 × ZMod 5)).card ≤ 3 := Finset.card_le_three omega