AFTD Auto-Formalizing Theoretical Domains

good_slopes_fiber15_neighbors_force

theoremverified

On any set of points over the residues modulo 15, if y+4x is surjective and the forms y+7x, y+11x and y+13x are injective, then y+x is injective.

Statement

theorem good_slopes_fiber15_neighbors_force (S : Set (ZMod 15 × ZMod 15)) (h4 : ∀ t, ∃ p ∈ S, good_slopes_fiber15_form 4 p = t) (h7 : Set.InjOn (good_slopes_fiber15_form 7) S) (h11 : Set.InjOn (good_slopes_fiber15_form 11) S) (h13 : Set.InjOn (good_slopes_fiber15_form 13) S) : Set.InjOn (good_slopes_fiber15_form 1) S
Source
Direction-neighbor rigidity for OP-1027, tested in experiment 21991, using the normalized argument good_slopes_fiber15_anchored_rigidity.
Verified
11 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2

The proof, explained

We prove that the linear form y+x is injective on S by contradiction. If two distinct points p, q ∈ S have the same value under y+x, their difference vector is of the form (d, -d). The injectivity of y+7x and y+11x forces 6d ≠ 0 and 10d ≠ 0, which implies that d is a unit u modulo 15. Translating and scaling S by this unit maps p to (0, 0) and q to (1, 14) while preserving surjectivity of y+4x and injectivity of y+7x, y+11x, and y+13x, which contradicts the anchored rigidity theorem good_slopes_fiber15_anchored_rigidity.

  1. Any residue d ∈ ℤ/15ℤ satisfying 6d ≠ 0 and 10d ≠ 0 is invertible. automation

    In ℤ/15ℤ, non-zero multiples of 6 are those not divisible by 5, and non-zero multiples of 10 are those not divisible by 3. Any element killed by neither is coprime to 15 and therefore a unit, which Lean confirms by finite exhaustion.

    line 1

    private theorem fiber15_unit_test : ∀ d : ZMod 15, 6*d ≠ 0 → 10*d ≠ 0 → IsUnit d := by decide
  2. Assume for contradiction that y+x is not injective on S, yielding distinct points p, q ∈ S whose coordinates differ by q₁ - p₁ = d and q₂ - p₂ = -d.

    We introduce points p, q ∈ S where y+x takes the same value and assume for contradiction that p ≠ q. Letting d = q₁ - p₁, subtracting the equation p₂ + p₁ = q₂ + q₁ gives q₂ - p₂ = -d.

    lines 4–9

      intro p hp q hq heq
      by_contra hne
      let d : ZMod 15 := q.1 - p.1
      have hdy : q.2 - p.2 = -d := by
        dsimp [d, good_slopes_fiber15_form] at *
        linear_combination -heq
  3. For any slope a ∈ ℤ/15ℤ, the difference between the linear form y+ax at q and at p is (a-1)d.

    Expanding the definition of the form y+ax, the difference is (q₂ + a q₁) - (p₂ + a p₁) = (q₂ - p₂) + a(q₁ - p₁). Substituting q₂ - p₂ = -d and q₁ - p₁ = d yields -d + ad = (a-1)d.

    lines 10–13

      have hdiff (a : ZMod 15) : good_slopes_fiber15_form a q - good_slopes_fiber15_form a p = (a-1)*d := by
        dsimp [good_slopes_fiber15_form, d]
        dsimp [d] at hdy
        linear_combination hdy
  4. The coordinate difference d satisfies 6d ≠ 0.

    If 6d = 0, then evaluating the form y+7x at q and p gives difference (7-1)d = 6d = 0. By the injectivity of y+7x on S, this would force p = q, contradicting p ≠ q.

    lines 14–22

    uses sub_eq_zero.mp

      have hd6 : 6*d ≠ 0 := by
        intro hz
        apply hne
        apply h7 hp hq
        have hh := hdiff 7
        have hh' : good_slopes_fiber15_form 7 q - good_slopes_fiber15_form 7 p = 0 := by
          rw [hh]
          convert hz using 1 <;> ring
        exact (sub_eq_zero.mp hh').symm
  5. The coordinate difference d satisfies 10d ≠ 0.

    If 10d = 0, then evaluating the form y+11x at q and p gives difference (11-1)d = 10d = 0. By the injectivity of y+11x on S, this would force p = q, contradicting p ≠ q.

    lines 23–31

    uses sub_eq_zero.mp

      have hd10 : 10*d ≠ 0 := by
        intro hz
        apply hne
        apply h11 hp hq
        have hh := hdiff 11
        have hh' : good_slopes_fiber15_form 11 q - good_slopes_fiber15_form 11 p = 0 := by
          rw [hh]
          convert hz using 1 <;> ring
        exact (sub_eq_zero.mp hh').symm
  6. The difference d is an invertible element u, and the affine equivalence e(r) = u⁻¹(r - p) produces a set T = e(S) on which the form y+ax scales by u⁻¹ relative to S.

    Since 6d ≠ 0 and 10d ≠ 0, the unit test implies d is a unit u. We define the affine bijection e by translating by -p and scaling coordinates by u⁻¹, and set T = e(S). Expanding the coordinates shows that y+ax evaluated at e(r) equals u⁻¹ times the difference between y+ax at r and at p.

    lines 32–39

    uses fiber15_unit_test, Equiv.subRight, Units.mulLeft_apply

      obtain ⟨u, hu⟩ := fiber15_unit_test d hd6 hd10
      let e : (ZMod 15 × ZMod 15) ≃ (ZMod 15 × ZMod 15) :=
        (Equiv.subRight p).trans ((u⁻¹).mulLeft.prodCongr (u⁻¹).mulLeft)
      let T : Set (ZMod 15 × ZMod 15) := e '' S
      have heform (a : ZMod 15) (r : ZMod 15 × ZMod 15) :
          good_slopes_fiber15_form a (e r) = (↑(u⁻¹) : ZMod 15) * (good_slopes_fiber15_form a r - good_slopes_fiber15_form a p) := by
        simp [e, good_slopes_fiber15_form, Units.mulLeft_apply]
        ring
  7. The point (0, 0) belongs to T.

    The point p belongs to S, and its image under e is u⁻¹(p - p) = (0, 0) ∈ T.

    lines 40–42

      have hT0 : (0,0) ∈ T := by
        refine ⟨p,hp,?_⟩
        ext <;> simp [e]
  8. The point (1, 14) belongs to T.

    The point q belongs to S, and its image under e has first coordinate u⁻¹(q₁ - p₁) = u⁻¹d = 1 and second coordinate u⁻¹(q₂ - p₂) = u⁻¹(-d) = -1 = 14 in ℤ/15ℤ. Thus e(q) = (1, 14) ∈ T.

    lines 43–53

    uses Prod.ext, Units.inv_mul, mul_neg

      have hT1 : (1,14) ∈ T := by
        refine ⟨q,hq,?_⟩
        apply Prod.ext
        · change (↑(u⁻¹) : ZMod 15) * (q.1-p.1) = 1
          change (↑(u⁻¹) : ZMod 15) * d = 1
          rw [← hu]
          exact Units.inv_mul u
        · change (↑(u⁻¹) : ZMod 15) * (q.2-p.2) = 14
          rw [hdy, ← hu]
          have h14 : (14 : ZMod 15) = -1 := by decide
          rw [h14, mul_neg, Units.inv_mul]
  9. The form y+4x is surjective on T.

    Given any target value t, surjectivity of y+4x on S provides a point r ∈ S where the form evaluates to ut + (p₂ + 4p₁). Applying the transformation formula, the form at e(r) evaluates to u⁻¹(ut) = t.

    lines 54–59

    uses mul_add, mul_assoc

      have hT4 : ∀ t, ∃ r ∈ T, good_slopes_fiber15_form 4 r = t := by
        intro t
        obtain ⟨r,hr,hr4⟩ := h4 ((u : ZMod 15)*t + good_slopes_fiber15_form 4 p)
        refine ⟨e r, ⟨r,hr,rfl⟩, ?_⟩
        rw [heform,hr4]
        simp [mul_add, ← mul_assoc]
  10. For any slope a, injectivity of y+ax on S implies injectivity of y+ax on T.

    If the form y+ax agrees on e(r) and e(s) in T, the scaling formula implies that the form on r and s differed from the form on p by the same amount, so it agrees on r and s. Injectivity on S gives r = s, hence e(r) = e(s).

    lines 60–73

    uses congrArg, Units.mul_inv, mul_assoc, one_mul

      have hTinj (a : ZMod 15) (ha : Set.InjOn (good_slopes_fiber15_form a) S) :
          Set.InjOn (good_slopes_fiber15_form a) T := by
        intro r hr s hs hrs
        obtain ⟨r,hr,rfl⟩ := hr
        obtain ⟨s,hs,rfl⟩ := hs
        apply congrArg e
        apply ha hr hs
        rw [heform,heform] at hrs
        have hh := congrArg (fun z : ZMod 15 => (u : ZMod 15)*z) hrs
        have hh' : good_slopes_fiber15_form a r - good_slopes_fiber15_form a p =
            good_slopes_fiber15_form a s - good_slopes_fiber15_form a p := by
          have huinv : (u : ZMod 15) * (↑(u⁻¹) : ZMod 15) = 1 := Units.mul_inv u
          simpa only [← mul_assoc, huinv, one_mul] using hh
        linear_combination hh'
  11. The existence of T contradicts the anchored rigidity theorem, completing the proof that y+x is injective on S.

    The set T contains (0, 0) and (1, 14), has y+4x surjective, and inherits injectivity of y+7x, y+11x, and y+13x from S. These are precisely the hypotheses of good_slopes_fiber15_anchored_rigidity, which derives False and refutes the assumption that y+x was not injective.

    line 74

    uses good_slopes_fiber15_anchored_rigidity

      exact good_slopes_fiber15_anchored_rigidity T hT0 hT1 hT4 (hTinj 7 h7) (hTinj 11 h11) (hTinj 13 h13)
fiber15_unit_test
In ℤ/15ℤ, if 6d ≠ 0 and 10d ≠ 0, then d is invertible.
sub_eq_zero.mp
If a - b = 0, then a = b.
Equiv.subRight
The equivalence of an additive group with itself given by right subtraction x ↦ x - p.
Units.mulLeft_apply
The action of the unit multiplication permutation u.mulLeft on x evaluates to u * x.
Prod.ext
Two pairs are equal if their first components are equal and their second components are equal.
Units.inv_mul
Multiplying the inverse of a unit by the unit itself yields 1: u⁻¹ * u = 1.
mul_neg
Multiplication distributes over negation: a * (-b) = -(a * b).
mul_add
Left distributivity of multiplication over addition: a * (b + c) = a * b + a * c.
mul_assoc
Associativity of multiplication: (a * b) * c = a * (b * c).
congrArg
Applying a function to equal inputs yields equal outputs: if a = b then f a = f b.
Units.mul_inv
Multiplying a unit by its inverse yields 1: u * u⁻¹ = 1.
one_mul
1 is a left identity for multiplication: 1 * a = a.
good_slopes_fiber15_anchored_rigidity
No subset of (ℤ/15ℤ)² can simultaneously contain (0, 0) and (1, 14), have y+4x surjective, and have y+7x, y+11x, and y+13x injective.

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

private theorem fiber15_unit_test : ∀ d : ZMod 15, 6*d ≠ 0 → 10*d ≠ 0 → IsUnit d := by decidetheorem good_slopes_fiber15_neighbors_force (S : Set (ZMod 15 × ZMod 15)) (h4 : ∀ t, ∃ p ∈ S, good_slopes_fiber15_form 4 p = t) (h7 : Set.InjOn (good_slopes_fiber15_form 7) S) (h11 : Set.InjOn (good_slopes_fiber15_form 11) S) (h13 : Set.InjOn (good_slopes_fiber15_form 13) S) : Set.InjOn (good_slopes_fiber15_form 1) S := by  intro p hp q hq heq  by_contra hne  let d : ZMod 15 := q.1 - p.1  have hdy : q.2 - p.2 = -d := by    dsimp [d, good_slopes_fiber15_form] at *    linear_combination -heq  have hdiff (a : ZMod 15) : good_slopes_fiber15_form a q - good_slopes_fiber15_form a p = (a-1)*d := by    dsimp [good_slopes_fiber15_form, d]    dsimp [d] at hdy    linear_combination hdy  have hd6 : 6*d ≠ 0 := by    intro hz    apply hne    apply h7 hp hq    have hh := hdiff 7    have hh' : good_slopes_fiber15_form 7 q - good_slopes_fiber15_form 7 p = 0 := by      rw [hh]      convert hz using 1 <;> ring    exact (sub_eq_zero.mp hh').symm  have hd10 : 10*d ≠ 0 := by    intro hz    apply hne    apply h11 hp hq    have hh := hdiff 11    have hh' : good_slopes_fiber15_form 11 q - good_slopes_fiber15_form 11 p = 0 := by      rw [hh]      convert hz using 1 <;> ring    exact (sub_eq_zero.mp hh').symm  obtain ⟨u, hu⟩ := fiber15_unit_test d hd6 hd10  let e : (ZMod 15 × ZMod 15) ≃ (ZMod 15 × ZMod 15) :=    (Equiv.subRight p).trans ((u⁻¹).mulLeft.prodCongr (u⁻¹).mulLeft)  let T : Set (ZMod 15 × ZMod 15) := e '' S  have heform (a : ZMod 15) (r : ZMod 15 × ZMod 15) :      good_slopes_fiber15_form a (e r) = (↑(u⁻¹) : ZMod 15) * (good_slopes_fiber15_form a r - good_slopes_fiber15_form a p) := by    simp [e, good_slopes_fiber15_form, Units.mulLeft_apply]    ring  have hT0 : (0,0) ∈ T := by    refine ⟨p,hp,?_⟩    ext <;> simp [e]  have hT1 : (1,14) ∈ T := by    refine ⟨q,hq,?_⟩    apply Prod.ext    · change (↑(u⁻¹) : ZMod 15) * (q.1-p.1) = 1      change (↑(u⁻¹) : ZMod 15) * d = 1      rw [← hu]      exact Units.inv_mul u    · change (↑(u⁻¹) : ZMod 15) * (q.2-p.2) = 14      rw [hdy, ← hu]      have h14 : (14 : ZMod 15) = -1 := by decide      rw [h14, mul_neg, Units.inv_mul]  have hT4 : ∀ t, ∃ r ∈ T, good_slopes_fiber15_form 4 r = t := by    intro t    obtain ⟨r,hr,hr4⟩ := h4 ((u : ZMod 15)*t + good_slopes_fiber15_form 4 p)    refine ⟨e r, ⟨r,hr,rfl⟩, ?_⟩    rw [heform,hr4]    simp [mul_add, ← mul_assoc]  have hTinj (a : ZMod 15) (ha : Set.InjOn (good_slopes_fiber15_form a) S) :      Set.InjOn (good_slopes_fiber15_form a) T := by    intro r hr s hs hrs    obtain ⟨r,hr,rfl⟩ := hr    obtain ⟨s,hs,rfl⟩ := hs    apply congrArg e    apply ha hr hs    rw [heform,heform] at hrs    have hh := congrArg (fun z : ZMod 15 => (u : ZMod 15)*z) hrs    have hh' : good_slopes_fiber15_form a r - good_slopes_fiber15_form a p =        good_slopes_fiber15_form a s - good_slopes_fiber15_form a p := by      have huinv : (u : ZMod 15) * (↑(u⁻¹) : ZMod 15) = 1 := Units.mul_inv u      simpa only [← mul_assoc, huinv, one_mul] using hh    linear_combination hh'  exact good_slopes_fiber15_anchored_rigidity T hT0 hT1 hT4 (hTinj 7 h7) (hTinj 11 h11) (hTinj 13 h13)
See it in the graphDiscuss this resultChallenge it