How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Sums of Two Squares — Examples
1 · Prerequisites
- Binary Operations, Monoids, Groups and Subgroups
- Congruences, the Integers Modulo n and the Chinese Remainder Theorem
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Cosets, Index and Lagrange's Theorem
- Countability and Uncountability
- Cyclic Groups and Direct Products
- Divisibility, Greatest Common Divisors and Bézout's Identity
- Finite Counting, Factorials and Binomial Coefficients
- Foundations of the Real Numbers for Analysis
- Group Homomorphisms and the Isomorphism Theorems
- Inclusion–Exclusion, the Pigeonhole Principle and Double Counting
- Normal Subgroups and Quotient Groups
- Polynomial Rings, the Division Algorithm and Roots
- Primes, Euclid's Lemma and the Fundamental Theorem of Arithmetic
- Primitive Roots and Unit Groups Modulo N
- Quadratic Residues and the Legendre Symbol
- Relations, Functions, and Quotients
- Rings, Subrings, Integral Domains and Fields
- Roots, Rational Powers, and Classical Inequalities
- Sums of Two Squares
- Suprema and Infima
- The Fundamental Theorem of Finite Abelian Groups
- The ZFC Axioms and the Basic Set Constructions
2 · Summary
3 · Logical flowchart
4 · Definitions, theorems and proofs
None yet.
5 · Examples, counterexamples and false statements
Thue's collision argument gives
Example
The prime has . Thue's collision construction with the square produces the representation
Facts & Assumptions
Given: The prime and the residue .
If is prime and , then there are nonzero integers with and (Thue's lemma on small nonzero representatives).
A representation of a nonnegative integer as a sum of two squares is an ordered pair such that (Representations and primitive representations as sums of two squares).
Verification
One has , and , so the maximal integer with is .
In the map on , the distinct pairs and collide because . Their coordinate differences are , exactly as in [L1].
The bounds give , and step 2.1 together with makes the sum divisible by . Directly, , so is a representation in the sense of [F1].
Extended Euclid gives from the root of
Example
Starting from , the Euclidean algorithm yields without searching the full collision square.
Facts & Assumptions
Given: The congruence .
A representation of a nonnegative integer as a sum of two squares is an ordered pair such that (Representations and primitive representations as sums of two squares).
Verification
The Euclidean divisions and give .
Hence , and the given square-root congruence gives ; therefore .
Direct evaluation gives , so is a two-square representation of by [F1].
Prime factorisation gives two representations of as a sum of two squares
Example
The factorisation and the two sign variants in the two-square identity give
Facts & Assumptions
Given: The integers , , and their product .
A representation of a nonnegative integer as a sum of two squares is an ordered pair such that (Representations and primitive representations as sums of two squares).
For all integers , (The Brahmagupta–Fibonacci two-square identity).
Verification
Directly, and .
The first sign variant in [L1] gives , since and .
The second sign variant gives , since and .
Both pairs satisfy [F1]. They are essentially different because the unordered absolute-coordinate sets and differ.
is not a sum of two squares
Statement refuted
Every positive integer is a sum of two integer squares. The integer is a counterexample.
Facts & Assumptions
Given: The integer .
A representation of a nonnegative integer as a sum of two squares is an ordered pair such that (Representations and primitive representations as sums of two squares).
If is prime and , then and (A prime congruent to modulo divides both coordinates of a divisible two-square sum).
A positive integer is a sum of two squares if and only if every prime occurs to an even exponent in its canonical prime factorisation (Characterisation of positive integers that are sums of two squares).
Counterexample
The factorisation contains the prime to exponent one.
If , [L1] would give and hence , contrary to step 1.1. Thus no representation in the sense of [F1] exists.
Equivalently, step 1.1 violates the even-exponent condition in [L2].
The representations recover the factors and
Example
The normalized representations
feed the factorisation construction and recover .
Facts & Assumptions
Given: The displayed representations of .
A representation of a nonnegative integer as a sum of two squares is an ordered pair such that (Representations and primitive representations as sums of two squares).
For an odd integer, two essentially different normalized representations force a factorisation with (Two essentially different two-square representations factor an odd integer).
Verification
Both equalities are direct, and and are positive odd-even normalized pairs with .
In the notation of [L1], the values , , , give , , , and .
The resulting factors are and , and .
The primitive two-square criterion distinguishes , , and
Example
The integers and have primitive representations, whereas is representable but has no primitive two-square representation:
Facts & Assumptions
Given: The three displayed integers and coordinate pairs.
A two-square representation is primitive when its coordinate gcd is (Representations and primitive representations as sums of two squares).
A positive integer has a primitive two-square representation if and only if and no prime divides (Characterisation of primitive sums of two squares).
Verification
One has with , and with , so both displayed representations are primitive by [F1].
One has , but , so the displayed representation is not primitive.
Since and , [L1] excludes every primitive representation of , not just the displayed one.
is representable but has no primitive two-square representation
Statement refuted
Every integer representable as a sum of two squares has a primitive two-square representation. The integer is a counterexample.
Facts & Assumptions
Given: The integer .
A two-square representation is primitive when its coordinate gcd is (Representations and primitive representations as sums of two squares).
A positive integer has a primitive two-square representation if and only if and no prime divides (Characterisation of primitive sums of two squares).
Counterexample
Directly, , but , so the displayed representation is not primitive.
In any equality , square residues modulo force both and even. Thus no representation of a multiple of four can be primitive.
Since , [L1] gives the same conclusion: has no primitive representation despite step 1.1.
Squarefree sums of two squares up to
Example
Among the squarefree positive integers at most , those representable as sums of two squares are
Every displayed representation below is primitive.
Facts & Assumptions
Given: Positive integers at most .
A two-square representation is primitive when its coordinate gcd is (Representations and primitive representations as sums of two squares).
A positive integer is squarefree if no square of a prime divides (Squarefree positive integers).
A squarefree positive integer is a sum of two squares if and only if none of its odd prime factors is congruent to modulo ; every such representation is primitive (Squarefree sums of two squares).
Verification
Trial division gives the squarefree positive integers at most as .
Applying [L1] removes exactly those having an odd prime factor congruent to modulo , leaving .
The complete witness list is , , , , , , , and . Each coordinate gcd is one, as [F1] and [L1] require.
Sources
- P. Hackman, Elementary Number Theory, Chapter E, Example E.I.4
- P. Hackman, Elementary Number Theory, Chapter E, Example E.II.3(a)
- P. Hackman, Elementary Number Theory, Chapter E, Example E.II.3(b)
- P. Hackman, Elementary Number Theory, Chapter E, Theorem E.I.3 and Example E.II.3(a)
- P. Hackman, Elementary Number Theory, Chapter E, Example E.II.7(a)–(c)
- P. Hackman, Elementary Number Theory, Chapter E, Example E.II.7(d)
- P. Hackman, Elementary Number Theory, Chapter E, Theorems E.II.2 and E.II.4