AFTD Auto-Formalizing Theoretical Domains

cube_root_identity_distinct

theoremverifiedformalization

If ω is a primitive cube root of unity in ℂ and x, y ∈ {1, ω, ω^2} are distinct, then (x - y)^2 = -3xy.

Statement

theorem cube_root_identity_distinct (ω x y : ℂ) (hω : ω ^ 2 + ω + 1 = 0)
    (hx : x ∈ ({1, ω, ω ^ 2} : Set ℂ)) (hy : y ∈ ({1, ω, ω ^ 2} : Set ℂ)) (hxy : x ≠ y) :
    (x - y) ^ 2 = -3 * x * y
Formalizes
arXiv:2610.41820 Lemma 2.4, Eq. (15)
Verified
04 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

Read back from the Lean

For any complex numbers $\omega$, $x$, and $y$, if $\omega^2 + \omega + 1 = 0$, $x \in \{1, \omega, \omega^2\}$, $y \in \{1, \omega, \omega^2\}$, and $x \ne y$, then $(x - y)^2 = -3xy$.

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 theorem states that any two distinct elements x, y from {1, ω, ω²}, where ω satisfies ω² + ω + 1 = 0, satisfy (x - y)² = -3xy. The proof proceeds by exhaustive case analysis over all nine pairs (x, y) in {1, ω, ω²}². The three diagonal cases with x = y contradict the assumption x ≠ y, while each of the six distinct pairs reduces via polynomial algebra to an explicit multiple of ω² + ω + 1 = 0.

  1. The proof reduces to nine cases corresponding to all pairs (x, y) ∈ {1, ω, ω²}².

    Rewriting with Set.mem_insert_iff and Set.mem_singleton_iff unfolds the set membership hypotheses hx and hy into disjunctions x = 1 ∨ x = ω ∨ x = ω² and y = 1 ∨ y = ω ∨ y = ω². Case analysis on both disjunctions divides the goal into nine subgoals, one for each assignment of values to x and y.

    lines 5–6

    uses Set.mem_insert_iff, Set.mem_singleton_iff

      simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hx hy
      rcases hx with hx | hx | hx <;> rcases hy with hy | hy | hy
  2. The case x = 1 and y = 1 is impossible.

    Substituting x = 1 and y = 1 into the distinctness hypothesis x ≠ y produces 1 ≠ 1, which is a contradiction.

    line 7

      · rw [hx, hy] at hxy; contradiction
  3. The identity holds when x = 1 and y = ω.

    Substituting x = 1 and y = ω gives (1 - ω)² = -3ω. Moving all terms to one side yields (1 - ω)² + 3ω = ω² + ω + 1, which vanishes by the hypothesis hω : ω² + ω + 1 = 0.

    line 8

      · rw [hx, hy]; linear_combination hω
  4. The identity holds when x = 1 and y = ω².

    Substituting x = 1 and y = ω² gives (1 - ω²)² = -3ω². The difference (1 - ω²)² + 3ω² expands to ω⁴ + ω² + 1, which factors as (ω² - ω + 1)(ω² + ω + 1) and therefore vanishes by hω.

    line 9

      · rw [hx, hy]; linear_combination (ω ^ 2 - ω + 1) * hω
  5. The identity holds when x = ω and y = 1.

    Substituting x = ω and y = 1 gives (ω - 1)² = -3ω. The difference (ω - 1)² + 3ω equals ω² + ω + 1, which vanishes by hω.

    line 10

      · rw [hx, hy]; linear_combination hω
  6. The case x = ω and y = ω is impossible.

    Substituting x = ω and y = ω into x ≠ y gives ω ≠ ω, a contradiction.

    line 11

      · rw [hx, hy] at hxy; contradiction
  7. The identity holds when x = ω and y = ω².

    Substituting x = ω and y = ω² gives (ω - ω²)² = -3ω³. The difference (ω - ω²)² + 3ω³ expands to ω⁴ + ω³ + ω² = ω²(ω² + ω + 1), which vanishes by hω.

    line 12

      · rw [hx, hy]; linear_combination ω ^ 2 * hω
  8. The identity holds when x = ω² and y = 1.

    Substituting x = ω² and y = 1 gives (ω² - 1)² = -3ω². The difference (ω² - 1)² + 3ω² expands to ω⁴ + ω² + 1 = (ω² - ω + 1)(ω² + ω + 1), which vanishes by hω.

    line 13

      · rw [hx, hy]; linear_combination (ω ^ 2 - ω + 1) * hω
  9. The identity holds when x = ω² and y = ω.

    Substituting x = ω² and y = ω gives (ω² - ω)² = -3ω³. The difference (ω² - ω)² + 3ω³ expands to ω⁴ + ω³ + ω² = ω²(ω² + ω + 1), which vanishes by hω.

    line 14

      · rw [hx, hy]; linear_combination ω ^ 2 * hω
  10. The case x = ω² and y = ω² is impossible.

    Substituting x = ω² and y = ω² into x ≠ y gives ω² ≠ ω², a contradiction.

    line 15

      · rw [hx, hy] at hxy; contradiction
Set.mem_insert_iff
An element x belongs to the set insert a s if and only if x = a or x ∈ s.
Set.mem_singleton_iff
An element a belongs to the singleton set {b} if and only if a = b.

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

/-- On the cube roots of unity, the squared difference of distinct elements is -3 times their product. -/theorem cube_root_identity_distinct (ω x y : ℂ) (hω : ω ^ 2 + ω + 1 = 0)    (hx : x ∈ ({1, ω, ω ^ 2} : Set ℂ)) (hy : y ∈ ({1, ω, ω ^ 2} : Set ℂ)) (hxy : x ≠ y) :    (x - y) ^ 2 = -3 * x * y := by  simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hx hy  rcases hx with hx | hx | hx <;> rcases hy with hy | hy | hy  · rw [hx, hy] at hxy; contradiction  · rw [hx, hy]; linear_combination hω  · rw [hx, hy]; linear_combination (ω ^ 2 - ω + 1) * hω  · rw [hx, hy]; linear_combination hω  · rw [hx, hy] at hxy; contradiction  · rw [hx, hy]; linear_combination ω ^ 2 * hω  · rw [hx, hy]; linear_combination (ω ^ 2 - ω + 1) * hω  · rw [hx, hy]; linear_combination ω ^ 2 * hω  · rw [hx, hy] at hxy; contradiction
See it in the graphDiscuss this resultChallenge it