AFTD Auto-Formalizing Theoretical Domains

good_slopes_f3_two_directions_line

theoremverified

If two maps from a three-element index set to the field with three elements have the property that both y+s and y+2s are injective, then s is constant or y is constant.

Statement

theorem good_slopes_f3_two_directions_line (s y : Fin 3 → ZMod 3) (h1 : Function.Injective (fun i => y i + s i)) (h2 : Function.Injective (fun i => y i + 2 * s i)) : (∀ i j, s i = s j) ∨ (∀ i j, y i = y j)
Source
Fiber rigidity step for OP-1027, using the two nonzero directions in the field with three elements; compare the finite-field direction arguments in arXiv:2611.04551.
Verified
11 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

The proof, explained

The proof proceeds by finite exhaustive verification. Because the domain and codomain each have size 3, there are only $3^3 = 27$ functions from $\mathrm{Fin}\ 3$ to $\mathbb{Z}/3\mathbb{Z}$, giving $27^2 = 729$ pairs $(s, y)$ to test. Lean verifies the universal statement by computation using the `decide` tactic, and then specialises it to the given functions $s$ and $y$ and the injectivity hypotheses.

  1. For any functions $s, y : \mathrm{Fin}\ 3 \to \mathbb{Z}/3\mathbb{Z}$, if $y + s$ and $y + 2s$ are injective, then $s$ is constant or $y$ is constant. automation

    Because the domain and codomain both have three elements, there are only $3^3 = 27$ possible functions and $27^2 = 729$ possible pairs of functions $(s, y)$. Both injectivity and constancy are decidable predicates on finite types, so Lean's `decide` tactic proves this universal statement by exhaustive finite computation.

    line 2

      have h : ∀ (s y : Fin 3 → ZMod 3), Function.Injective (fun i => y i + s i) → Function.Injective (fun i => y i + 2 * s i) → (∀ i j, s i = s j) ∨ (∀ i j, y i = y j) := by decide
  2. Either $s$ is constant or $y$ is constant.

    Specialise the universal statement $h$ established in the previous step to the specific functions $s$ and $y$, applying the injectivity hypotheses $h_1$ and $h_2$.

    line 3

      exact h s y h1 h2

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_f3_two_directions_line (s y : Fin 3 → ZMod 3) (h1 : Function.Injective (fun i => y i + s i)) (h2 : Function.Injective (fun i => y i + 2 * s i)) : (∀ i j, s i = s j) ∨ (∀ i j, y i = y j) := by  have h : ∀ (s y : Fin 3 → ZMod 3), Function.Injective (fun i => y i + s i) → Function.Injective (fun i => y i + 2 * s i) → (∀ i j, s i = s j) ∨ (∀ i j, y i = y j) := by decide  exact h s y h1 h2
See it in the graphDiscuss this resultChallenge it