Equation (5.7.1) — Composition of two-square representations
ProvedSteinENT.two_squares_compositionnumber-theory
For any integers ,
The identity explicitly composes two representations and shows that represented integers are closed under multiplication.
Preamble
import Mathlib.NumberTheory.SumTwoSquares import Mathlib.NumberTheory.DiophantineApproximation.Basic import Mathlib.Tactic
Formal statement
namespace SteinENT
theorem two_squares_composition (x₁ y₁ x₂ y₂ : ℤ) :
(x₁ ^ 2 + y₁ ^ 2) * (x₂ ^ 2 + y₂ ^ 2) =
(x₁ * x₂ - y₁ * y₂) ^ 2 + (x₁ * y₂ + x₂ * y₁) ^ 2 := by sorry
end SteinENTSource
William Stein, Elementary Number Theory: Primes, Congruences, and Secrets, author-hosted 2017 PDF, Equation (5.7.1), printed pp. 119. https://wstein.org/ent/ent.pdf ; pinned author TeX commit c4984c7ddb22258674816f8c000b0d8eb485d694, body.tex lines 6978–6982: https://github.com/williamstein/ent/blob/c4984c7ddb22258674816f8c000b0d8eb485d694/body.tex
Read-back
What the Lean code literally says, in plain math · Codex (exact model identifier unavailable in auditor runtime)
Read-back model: unavailable (the exact runtime model identifier is not exposed).
For every four integers , the integer equality holds. Each of the four integers is unrestricted and may be positive, zero, or negative, including the case where either or both pairs are ; there are no positivity, coprimality, distinctness, or other hypotheses. All multiplication, addition, subtraction, and squaring in the equality are integer operations, so subtraction is ordinary integer subtraction.
Human review
Confirmed by the mission captain (proposal self-audit).