AFTD Auto-Formalizing Theoretical Domains

op_2178_eisenstein_inner_product_classification

theoremverifiedformalization

If an Eisenstein element u in 2 + 3ℤ[ω] satisfies |u|² ≤ 4, then u = -1 or u = 2.

Statement

theorem op_2178_eisenstein_inner_product_classification (a b : ℤ) :
    let ω : ℂ := (-1 + (Real.sqrt 3 : ℂ) * Complex.I) / 2
    let u : ℂ := 2 + 3 * ((a : ℂ) + (b : ℂ) * ω)
    Complex.normSq u ≤ 4 → u = -1 ∨ u = 2
Formalizes
arXiv:2611.27591 Lemma 9
Verified
24 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
  • LinearOrder.toTotalPreorderEvery LinearOrder is a TotalPreorder.
  • TotalPreorderA total preorder: a preorder where ≤ is total (complete). This is weaker than LinearOrder — it does NOT require antisymmetry or…

Read back from the Lean

For all integers $a$ and $b$, define the complex numbers $\omega = \frac{-1 + \sqrt{3}i}{2}$ and $u = 2 + 3(a + b\omega)$. If the complex squared norm of $u$ is at most $4$ ($\operatorname{normSq}(u) \le 4$), then $u = -1$ or $u = 2$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

The Eisenstein element u = 2 + 3(a + bω) is expanded into real and imaginary parts using ω = (-1 + i√3)/2. Computing the squared norm |u|² and completing the square yields the identity (3(2a - b) + 4)² + 27b² = 16 + 4(|u|² - 4). The assumption |u|² ≤ 4 forces 27b² ≤ 16, so the integer b must be 0. Setting b = 0 reduces the bound to (6a + 4)² ≤ 16, leaving only the integer solutions a = -1 and a = 0, which correspond directly to u = -1 and u = 2.

  1. Assume |u|² ≤ 4 for u = 2 + 3(a + bω), and note that (√3)² = 3.

    We introduce the definition of ω = (-1 + √3·i)/2, the element u = 2 + 3(a + bω), and the hypothesis |u|² ≤ 4. Since 0 ≤ 3, the property Real.mul_self_sqrt confirms that (√3)² = 3.

    lines 6–8

    uses Real.mul_self_sqrt

      intro ω u hu
      have h3 : (0 : ℝ) ≤ 3 := by norm_num
      have hsq : Real.sqrt 3 * Real.sqrt 3 = 3 := Real.mul_self_sqrt h3
  2. Re(u) = 2 + 3a - 3b/2 and Im(u) = 3b√3/2.

    Substituting ω into u and expanding into real and imaginary components yields the explicit formulas for Re(u) and Im(u) by standard ring arithmetic.

    lines 9–10

      have h_re_im : u.re = 2 + 3 * a - (3 : ℝ) * b / 2 ∧ u.im = 3 * b * Real.sqrt 3 / 2 := by
        dsimp [u, ω]; simp; constructor <;> ring
  3. |u|² = 4 + 12a - 6b + 9(a² - ab + b²).

    Using Complex.normSq_apply, the squared norm is Re(u)² + Im(u)². Substituting the formulas for the real and imaginary parts and eliminating (√3)² with the fact that (√3)² = 3 gives this quadratic expression in a and b.

    lines 11–14

    uses Complex.normSq_apply

      have h_normSq : Complex.normSq u =
          4 + 12 * (a : ℝ) - 6 * (b : ℝ) + 9 * ((a : ℝ)^2 - (a : ℝ) * (b : ℝ) + (b : ℝ)^2) := by
        rw [Complex.normSq_apply, h_re_im.1, h_re_im.2]
        linear_combination (9 * (b : ℝ)^2 / 4) * hsq
  4. (3(2a - b) + 4)² + 27b² - 16 ≤ 0 over the reals.

    Completing the square shows the algebraic identity (3(2a - b) + 4)² + 27b² - 16 = 4(|u|² - 4). Since |u|² ≤ 4 by assumption, the right-hand side is at most 0, and hence the left-hand side is at most 0.

    lines 15–21

      have h_id_real : ((3 * (2 * a - b) + 4)^2 + 27 * b^2 - 16 : ℝ) =
          4 * (Complex.normSq u - 4) := by
        rw [h_normSq]
        ring
      have h_le_real : ((3 * (2 * a - b) + 4)^2 + 27 * b^2 - 16 : ℝ) ≤ 0 := by
        rw [h_id_real]
        linarith
  5. (3(2a - b) + 4)² + 27b² ≤ 16 for integers a and b.

    Casting the real inequality back to the integers establishes (3(2a - b) + 4)² + 27b² - 16 ≤ 0 in ℤ, which rearranges to (3(2a - b) + 4)² + 27b² ≤ 16.

    lines 22–25

      have h_le_16 : (3 * (2 * a - b) + 4)^2 + 27 * b^2 ≤ 16 := by
        have h_le_int : (3 * (2 * a - b) + 4)^2 + 27 * b^2 - 16 ≤ 0 := by
          exact_mod_cast h_le_real
        linarith
  6. b = 0.

    Since (3(2a - b) + 4)² is a square, it is non-negative, implying 27b² ≤ 16. For an integer b, this forces b = 0. We then substitute b = 0 everywhere.

    lines 26–27

      have hb : b = 0 := by nlinarith
      subst hb
  7. -4 ≤ 6a + 4 ≤ 4.

    With b = 0, the inequality simplifies to (6a + 4)² ≤ 16, which is equivalent to the two-sided linear bound -4 ≤ 6a + 4 ≤ 4.

    lines 28–29

      have ha : -4 ≤ 6 * a + 4 ∧ 6 * a + 4 ≤ 4 := by
        constructor <;> nlinarith
  8. u = -1 or u = 2.

    The integer bounds -4 ≤ 6a + 4 ≤ 4 restrict a to {-1, 0}. Evaluating u with b = 0 shows that a = -1 yields u = 2 + 3(-1) = -1, while a = 0 yields u = 2 + 3(0) = 2.

    lines 30–36

      rcases (by omega : a = -1 ∨ a = 0) with rfl | rfl
      · left
        dsimp [u]
        ring
      · right
        dsimp [u]
        ring
Real.mul_self_sqrt
The square of the square root of a non-negative real number x is x itself: √x * √x = x.
Complex.normSq_apply
The squared norm of a complex number z is the sum of the squares of its real and imaginary parts: |z|² = (Re z)² + (Im z)².

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

/-- Classification of elements in 2 + 3ℤ[ω] of norm squared at most 4 (arXiv:2611.27591 Lemma 9). -/theorem op_2178_eisenstein_inner_product_classification (a b : ℤ) :    let ω : ℂ := (-1 + (Real.sqrt 3 : ℂ) * Complex.I) / 2    let u : ℂ := 2 + 3 * ((a : ℂ) + (b : ℂ) * ω)    Complex.normSq u ≤ 4 → u = -1 ∨ u = 2 := by  intro ω u hu  have h3 : (0 : ℝ) ≤ 3 := by norm_num  have hsq : Real.sqrt 3 * Real.sqrt 3 = 3 := Real.mul_self_sqrt h3  have h_re_im : u.re = 2 + 3 * a - (3 : ℝ) * b / 2 ∧ u.im = 3 * b * Real.sqrt 3 / 2 := by    dsimp [u, ω]; simp; constructor <;> ring  have h_normSq : Complex.normSq u =      4 + 12 * (a : ℝ) - 6 * (b : ℝ) + 9 * ((a : ℝ)^2 - (a : ℝ) * (b : ℝ) + (b : ℝ)^2) := by    rw [Complex.normSq_apply, h_re_im.1, h_re_im.2]    linear_combination (9 * (b : ℝ)^2 / 4) * hsq  have h_id_real : ((3 * (2 * a - b) + 4)^2 + 27 * b^2 - 16 : ℝ) =      4 * (Complex.normSq u - 4) := by    rw [h_normSq]    ring  have h_le_real : ((3 * (2 * a - b) + 4)^2 + 27 * b^2 - 16 : ℝ) ≤ 0 := by    rw [h_id_real]    linarith  have h_le_16 : (3 * (2 * a - b) + 4)^2 + 27 * b^2 ≤ 16 := by    have h_le_int : (3 * (2 * a - b) + 4)^2 + 27 * b^2 - 16 ≤ 0 := by      exact_mod_cast h_le_real    linarith  have hb : b = 0 := by nlinarith  subst hb  have ha : -4 ≤ 6 * a + 4 ∧ 6 * a + 4 ≤ 4 := by    constructor <;> nlinarith  rcases (by omega : a = -1 ∨ a = 0) with rfl | rfl  · left    dsimp [u]    ring  · right    dsimp [u]    ring
See it in the graphDiscuss this resultChallenge it