Zagier's "one-sentence proof" of Fermat's theorem on sums of two squares #
"The involution on the finite set S = {(x, y, z) : ℕ × ℕ × ℕ | x ^ 2 + 4 * y * z = p}
defined by
(x, y, z) ↦ (x + 2 * z, z, y - x - z) if x < y - z
(2 * y - x, y, x - y + z) if y - z < x < 2 * y
(x - 2 * y, x - y + z, y) if x > 2 * y
has exactly one fixed point, so |S|
is odd and the involution defined by
(x, y, z) ↦ (x, z, y)
also has a fixed point." — Don Zagier
This elementary proof (Nat.Prime.sq_add_sq'
) is independent of Nat.Prime.sq_add_sq
in
Mathlib.NumberTheory.SumTwoSquares
, which uses the unique factorisation of ℤ[i]
.
For a geometric interpretation of the piecewise involution (Zagier.complexInvo
)
see Moritz Firsching's MathOverflow answer.
Equations
- Zagier.instFintypeElemProdNatZagierSet k = ⋯.fintype
The obvious involution (x, y, z) ↦ (x, z, y)
.
Equations
- Zagier.obvInvo k ⟨(x_1, y, z), h⟩ = ⟨(x_1, z, y), ⋯⟩
Instances For
If obvInvo k
has a fixed point, a representation of 4 * k + 1
as a sum of two squares
can be extracted from it.
The complicated involution, defined piecewise according to how x
compares with
y - z
and 2 * y
.
Equations
Instances For
complexInvo k
is indeed an involution.
Any fixed point of complexInvo k
must be (1, 1, k)
.
The singleton containing (1, 1, k)
.
Equations
- Zagier.singletonFixedPoint k = {⟨(1, 1, k), ⋯⟩}
Instances For
complexInvo k
has exactly one fixed point.