Accepted Atlas resultNot recorded for the preferred artifact
These states distinguish upstream identity, local reproduction, review, and Atlas acceptance. This page is part of the public, read-only Mathlib landmark collection.
Formal orientation
Statement map
This deterministic map orients the reader from the mathematical summary to the pinned declaration and exact checked form. The HTML statement below is authoritative.
The theorem at a glance
Lagrange's Four-Square Theorem at a glance
A source-bound editorial overview of the exact Mathlib formulation. The image is explanatory; the statement map, formal type, and pinned source remain authoritative.
Every natural number has a representation as four natural-number squares, with zero terms allowed. Generated explanation only; the exact HTML statement and pinned source are authoritative.Detailed visual description
The poster connects the exact four-square statement to Euler multiplication, the modular prime seed, least-multiplier descent, and final multiplicative induction without adding a representation count or uniqueness claim.
Lagrange's Four-Square Theorem schematic
Loading full-resolution image…
Euler multiplication and a least-multiplier prime descent assemble four-square representations for every natural number.Open original image in a new tab ↗
Euler multiplication and a least-multiplier prime descent assemble four-square representations for every natural number. Generated explanation only; the exact HTML statement and pinned source are authoritative.Detailed visual description
The recurring four-arm rosette represents one sum of four squares. Euler's braid preserves that form under multiplication, the multiplier around a prime shrinks to one, and prime representations then assemble into a representation of an arbitrary natural number.
Complementary intuition
A mathematical landmark
Lagrange's theorem gives a universal additive representation of every natural number. Mathlib's proof combines Euler's four-square identity, prime descent, and multiplicative induction.
The low-text schematic gives the theorem a visual identity; it does not replace the source-bound poster or exact statement.
Authoritative formal type
Exact Mathlib statement
theorem Nat.sum_four_squares (n : ℕ) : ∃ a b c d : ℕ, a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = n
Selected evidence declaration text
theorem Nat.sum_four_squares (n : ℕ) : ∃ a b c d : ℕ, a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = n
Proof architecture
Euler multiplication and Lagrange descent
5 curated stages
Mathlib proves that every natural number is a sum of four natural-number squares by establishing Euler's multiplicative identity, representing a multiple of each prime, descending a least positive multiplier to one, and extending prime representations to all naturals by multiplicative induction.
These source-anchored stages explain the retained Mathlib proof route. They are generated explanations, not proof evidence or an extracted Lean proof-term dependency graph.
01
Two four-square representations multiply into another
Two four-square representations multiply into another
Loading full-resolution image…
Euler's identity combines two four-coordinate representations while preserving the sum-of-four-squares form of their product.Open original image in a new tab ↗
Euler's identity combines two four-coordinate representations while preserving the sum-of-four-squares form of their product.
(sum of four squares) · (sum of four squares) = sum of four squares
The proof first establishes Euler's four-square identity in a commutative ring and then a natural-number version using integer absolute values. This identity supplies the multiplicative step used both in prime descent and in the final induction.
02
Start with four squares equal to a small positive multiple of a prime
Start with four squares equal to a small positive multiple of a prime
Loading full-resolution image…
A modular sum-of-two-squares argument yields a four-square representation of k p with the multiplier strictly between zero and p.Open original image in a new tab ↗
A modular sum-of-two-squares argument yields a four-square representation of k p with the multiplier strictly between zero and p.
0 < k < p and a²+b²+c²+d² = k p
For an odd prime, Mathlib uses a congruence for a sum of two squares modulo p, adds the square of one and the square of zero, and extracts a positive multiplier smaller than the prime. The prime two is handled directly.
03
Minimality prepares a smaller multiplier
Minimality prepares a smaller multiplier
Loading full-resolution image…
Choose the least represented positive multiplier; halve it when even, or replace all four coordinates by least absolute residues when odd.Open original image in a new tab ↗
Choose the least represented positive multiplier; halve it when even, or replace all four coordinates by least absolute residues when odd.
m minimal; either m/2 or 0 < r < m
Nat.findX selects a minimal positive m with four squares equal to m p. If m is even, a parity lemma divides the representation by two. If m is odd, each coordinate is replaced by a congruent representative with absolute value less than half m, producing a positive quotient r<m.
04
The four-square identity completes the descent
The four-square identity completes the descent
Loading full-resolution image…
Euler's identity combines the reduced residues with the original representation and, after division, represents r p, contradicting minimality.Open original image in a new tab ↗
Euler's identity combines the reduced residues with the original representation and, after division, represents r p, contradicting minimality.
m = 1; hence p = a²+b²+c²+d²
In the odd case, a reordered four-square representation of m r is multiplied by the representation of m p. The Euler outputs are all divisible by m; division yields a four-square representation of r p with r<m. Together with the even case, this makes every assumption m>1 impossible, so the prime itself is a sum of four squares.
05
Multiplicative induction reaches every natural number
Multiplicative induction reaches every natural number
Loading full-resolution image…
Zero and one are immediate, primes use the descent, and products use Euler's identity, completing multiplicative induction.Open original image in a new tab ↗
Zero and one are immediate, primes use the descent, and products use Euler's identity, completing multiplicative induction.
∀ n : ℕ, ∃ a b c d : ℕ, a²+b²+c²+d²=n
Nat.sum_four_squares invokes Nat.recOnMul. The zero and one cases use representations with zero terms; the prime case invokes the theorem from page 4; and the product case combines two inductive representations with Euler's identity. Therefore every natural number has a four-square representation.
Claim boundary
No new theorem is claimed
This target indexes Mathlib's existence theorem that every natural number is a sum of four squares of natural numbers. It does not count representations, require all four terms to be nonzero, or claim a new proof.
Proof Atlas did not originate Lagrange's Four-Square Theorem or Mathlib's declaration.
The theorem asserts existence only: it neither counts representations nor requires every term to be nonzero.
The generated explanation and visuals are not proof evidence.