Alphabeta Math
Session-authored (Fable 5 assisted)
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.

14 results · all verified · 14 also independently AI-judged
Every result on this page is machine-checked by a proof checker and read in full and owner-audited; the judge is an additional, independent cross-model AI review of the proofs; all 14 also cleared it.

Lagrange Four Square Theorem

1 · Prerequisites

2 · Summary

Division with remainder for a nonzero divisor, the divisibility relation with its linearity and transitivity, and congruence modulo an integer together with its compatibility with addition and multiplication are the working tools here. From the theory of quadratic residues the development takes the proposition that for an odd prime p and an integer a with pa there are integers x,y with x2+y2a(modp), used at a=1, and the criterion deciding when an odd integer is a square modulo a power of two, used at modulus 8. Cancellation of a nonzero factor in Z, the fact that a nonempty set of integers bounded below has a least element, the existence of a prime divisor of any integer above 1, and induction over N supply the minimality and induction arguments.

A representation of a nonnegative integer as a sum of four squares is an ordered integer quadruple, and Euler's product identity in a fixed sign pattern makes such representations closed under multiplication. For a prime p the congruence x2+y2+10(modp) is solvable; replacing a solution by its least absolute remainders produces a multiple pm with 1m<p that is a sum of four squares. The centred residue quadruple of a representation of pm has norm mn with 1n<m, and the identity carries the representation down to pn, so the least admissible multiplier is 1 and every prime is a sum of four squares; closure under products extends this to every nonnegative integer. A congruence argument modulo 8 then shows that every positive integer of the form 4am with m7(mod8) is no sum of three squares.

3 · Logical flowchart

4 · Definitions, theorems and proofs

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

Representations as sums of four squares

Definition

Let n be a nonnegative integer. A representation of n as a sum of four squares is an ordered quadruple (a,b,c,d)Z4 with n=a2+b2+c2+d2. The integer n is a sum of four integer squares when at least one such quadruple exists.

Two representations (a,b,c,d) and (a,b,c,d) of the same n are equivalent up to signs and order when one is obtained from the other by permuting the four coordinates and independently changing the sign of any of them, and essentially different when they are not so equivalent. Since changing a sign does not change an absolute value and permuting the coordinates permutes them, two representations are equivalent exactly when the multisets {a,b,c,d} and {a,b,c,d} coincide.

Remarks

The coordinates range over all of Z. They may be zero, they may be negative, and they may repeat. So an integer written as a sum of one, two or three squares is a sum of four squares as well, its remaining coordinates being 0; and 1 is an admissible coordinate wherever 1 is, with the same square. This matters where the identity of Euler's four-square product identity is applied, since its output coordinates are frequently negative or zero even when its inputs are not.

Only nonnegative n is defined. A square is nonnegative and a sum of four nonnegative integers is nonnegative, so no negative integer admits a quadruple and the definition would be vacuous there.

The value 0. A sum of four squares vanishes exactly when each square vanishes, so 0=02+02+02+02 and (0,0,0,0) is the only representation of 0. Every representation of a positive integer therefore has at least one nonzero coordinate.

Agreement with the two-square convention. The convention here is the one Representations and primitive representations as sums of two squares uses for pairs: a representation is an ordered tuple, so order and sign are recorded, and equivalence up to signs and order is what quotients them out. The only change is the number of coordinates. That every nonnegative integer has at least one representation is Lagrange's four-square theorem: every nonnegative integer is a sum of four integer squares; the definition itself asserts nothing about existence.

LemmaStatement: Literature-sourcedProof: AI-generatedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

Euler's four-square product identity

Statement

Let x1,x2,x3,x4 and y1,y2,y3,y4 be integers, and set

z1=x1y1+x2y2+x3y3+x4y4,z2=x1y2x2y1x3y4+x4y3,z3=x1y3+x2y4x3y1x4y2,z4=x1y4x2y3+x3y2x4y1.

Then

(x12+x22+x32+x42)(y12+y22+y32+y42)=z12+z22+z32+z42.

Facts & Assumptions

Given: Integers x1,x2,x3,x4,y1,y2,y3,y4, and z1,z2,z3,z4 defined by the four displayed formulas.

Proof

technique · direct
1.1

Expanding the left-hand side term by term gives the sixteen products xi2yj2 with 1i4 and 1j4, each with coefficient 1.

givenalgebra
1.2

Squaring z1 gives z12=x12y12+x22y22+x32y32+x42y42+2(x1x2y1y2+x1x3y1y3+x1x4y1y4+x2x3y2y3+x2x4y2y4+x3x4y3y4).

givenalgebra
1.3

Squaring z2 gives z22=x12y22+x22y12+x32y42+x42y32+2(x1x2y1y2x1x3y2y4+x1x4y2y3+x2x3y1y4x2x4y1y3x3x4y3y4).

givenalgebra
1.4

Squaring z3 gives z32=x12y32+x22y42+x32y12+x42y22+2(x1x2y3y4x1x3y1y3x1x4y2y3x2x3y1y4x2x4y2y4+x3x4y1y2).

givenalgebra
1.5

Squaring z4 gives z42=x12y42+x22y32+x32y22+x42y12+2(x1x2y3y4+x1x3y2y4x1x4y1y4x2x3y2y3+x2x4y1y3x3x4y1y2).

givenalgebra
2.1

The terms xi2yj2 occurring in steps 1.2 to 1.5 are the sixteen products of step 1.1, each occurring once: z12 contributes the pairs (i,j) with i=j, z22 those with {i,j}={1,2} or {3,4}, z32 those with {i,j}={1,3} or {2,4}, and z42 those with {i,j}={1,4} or {2,3}.

step 1.1step 1.2step 1.3step 1.4step 1.5algebra
2.2

The remaining terms of steps 1.2 to 1.5 cancel in six pairs of coordinate pairs: 2x1x2y1y2 and 2x3x4y3y4 from z12 against their negatives in z22; 2x1x3y1y3 and 2x2x4y2y4 from z12 against their negatives in z32; 2x1x4y1y4 and 2x2x3y2y3 from z12 against their negatives in z42; 2x1x4y2y3 and 2x2x3y1y4 from z22 against their negatives in z32; 2x1x3y2y4 and 2x2x4y1y3 from z42 against their negatives in z22; and 2x1x2y3y4 and 2x3x4y1y2 from z32 against their negatives in z42.

step 1.2step 1.3step 1.4step 1.5algebra
3.1

Adding steps 1.2 to 1.5 and using steps 2.1 and 2.2, the sum z12+z22+z32+z42 equals the sixteen products of step 1.1, which is the left-hand side; since the computation used only the ring axioms, it is an identity of polynomials with integer coefficients and holds for every choice of the eight integers, negative or zero included.

step 2.1step 2.2algebra
CorollaryStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

Sums of four squares are closed under products

Statement

Let m and n be nonnegative integers. If each of m and n is a sum of four integer squares (Representations as sums of four squares), then mn is a sum of four integer squares.

Facts & Assumptions

Given: Nonnegative integers m and n, each a sum of four integer squares.

[F1]

A representation of a nonnegative integer n as a sum of four squares is an ordered quadruple (a,b,c,d)Z4 with n=a2+b2+c2+d2; the integer is a sum of four integer squares when at least one such quadruple exists (Representations as sums of four squares).

[L1]

For all integers x1,,x4,y1,,y4, setting z1=x1y1+x2y2+x3y3+x4y4, z2=x1y2x2y1x3y4+x4y3, z3=x1y3+x2y4x3y1x4y2 and z4=x1y4x2y3+x3y2x4y1 gives (x12+x22+x32+x42)(y12+y22+y32+y42)=z12+z22+z32+z42 (Euler's four-square product identity).

Proof

technique · direct
1.1

Fix quadruples (x1,x2,x3,x4) and (y1,y2,y3,y4) of integers with m=x12+x22+x32+x42 and n=y12+y22+y32+y42, which the hypothesis supplies.

givenF1choose
2.1

With z1,z2,z3,z4 formed from those eight integers by the displayed formulas, mn=(x12+x22+x32+x42)(y12+y22+y32+y42)=z12+z22+z32+z42.

step 1.1L1
3.1

The four integers z1,z2,z3,z4 therefore form a quadruple in Z4 whose squares sum to mn, so mn is a sum of four integer squares; no coordinate is required to be positive or nonzero, so the argument is unaffected when a zi vanishes or is negative, and it covers m=0 and n=0, whose quadruple (0,0,0,0) satisfies the hypothesis and returns z1=z2=z3=z4=0.

step 2.1F1algebra

Remarks

What the identity does and does not give. The four coordinates zi are determined by the two chosen quadruples, so a different choice of representation of m or of n generally produces a different representation of mn. The statement asserts existence only; it makes no claim about how many representations mn has, nor that every representation of mn arises this way.

Why the closure is needed. Reducing Lagrange's four-square theorem: every nonnegative integer is a sum of four integer squares to Every prime is a sum of four integer squares requires exactly this: a factorisation of n into primes is useless unless the property being proved is inherited by products.

LemmaStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

For every prime p the congruence x2+y2+10(modp) is solvable

Facts & Assumptions

Given: A prime p.

[F1]

An integer p is prime when p>1 and dp with d>0 force d=1 or d=p; in words, p exceeds 1, and its only positive divisors are 1 and p (Prime and composite integers: p is prime when p>1 and its only positive divisors are 1 and p).

[F2]

For a,b,nZ, ab(modn) means n(ab) (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1).

[F3]

For d,aZ, da means a=dq for some qZ (Divisibility in Z: da when a=dq for some integer q).

[L1]

Let p be an odd prime and let aZ with pa. Then there are integers x,y such that x2+y2a(modp) (Every nonzero residue modulo an odd prime is a sum of two squares).

[L2]

The group of units of the commutative monoid (Z,,1) is {1,1}; equivalently, for uZ the condition u1 holds exactly when u=1 or u=1 ((Z,,1) is a commutative monoid whose group of units is {1,1}; equivalently u1 holds exactly for u=1 and u=1).

[L3]

If aa(modn) and bb(modn), then a+ba+b(modn), abab(modn) and abab(modn) (Congruent integers may be added, subtracted and multiplied: representative changes preserve both arithmetic operations).

Proof

technique · cases
1.1

If 2p then 2 is a positive divisor of p, so [F1] forces 2=1 or 2=p, and 21 leaves p=2; hence either p=2 or p is odd, and these two cases exhaust the primes.

givenF1algebra
1.2

In the case p=2, take x=1 and y=0: then x2+y2+1=1+0+1=2 and 2(20), so x2+y2+10(mod2).

assume-case twoF2algebra
1.3

In the case p odd, p1: otherwise 1=pq for some integer q by [F3], hence 1=p(q), so p1 and [L2] gives p=1 or p=1, both contradicting p>1 from [F1].

assume-case oddF1F3L2algebra
2.1

For the odd case, apply [L1] to the odd prime p with a=1, whose hypothesis p1 is step 1.3: there are integers x,y with x2+y21(modp).

step 1.3L1
3.1

For the odd case, 11(modp) since p0, so adding this to step 2.1 through [L3] gives x2+y2+11+1=0(modp).

step 2.1L3F2algebra
4.1

Both cases produce integers x,y with x2+y2+10(modp), and by step 1.1 no prime falls outside them.

step 1.2step 3.1cases-exhaustive

Remarks

Where the odd case comes from. For odd p the work is done by Every nonzero residue modulo an odd prime is a sum of two squares at a=1: the set Q of square classes modulo p, the zero class included, and the set of classes 1z for zQ are two subsets of Z/p with (p+1)/2 elements each, so they meet, and a common value gives x21y2. The hypothesis pa of that proposition is what step 1.3 discharges, by an argument that does not use oddness; oddness is needed only to make the proposition applicable at all.

Why p=2 is separate. The cited proposition is stated for odd primes, so it says nothing at p=2; the pair (1,0) settles that case by computation rather than by weakening the proposition's hypothesis.

LemmaStatement: AI-adaptedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

The least absolute remainder modulo a positive integer

Statement

Let m be an integer with m1 and let aZ. Then there is exactly one integer r with

ar(modm)andm<2rm,

that is, exactly one integer r satisfying ar(modm) and m<2rm, and consequently 4r2m2. Call this r the least absolute remainder of a modulo m.

Facts & Assumptions

Given: An integer m with m1 and an integer a.

[F1]

For a,b,nZ, ab(modn) means n(ab) (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1).

[F2]

For d,aZ, da means a=dq for some qZ (Divisibility in Z: da when a=dq for some integer q).

[L1]

For a,bZ with b0 there is exactly one pair (q,r) of integers with a=qb+r and 0r<b; moreover ba holds exactly when r=0 (Division with remainder for any nonzero divisor: for aZ and b0 there are unique q,rZ with a=qb+r and 0r<b).

Proof

technique · direct
1.1

Since m1, the modulus is nonzero and m=m, so [L1] supplies exactly one pair (q,r0) of integers with a=qm+r0 and 0r0<m.

givenL1algebra
2.1

Define r:=r0 when 2r0m, and r:=r0m otherwise; the two branches are mutually exclusive and exhaustive, so r is a well-defined integer.

step 1.1construct
3.1

In either branch ar is an integer multiple of m, since ar0=qm and a(r0m)=(q+1)m; hence m(ar) and ar(modm).

step 2.1F1F2algebra
3.2

In either branch m<2rm: the first branch gives 02r0m from r00 and its own condition, while the second has 2r0>m and 2r0<2m, so 2r=2r02m satisfies m<2r<0.

step 2.1algebra
4.1

From m<2rm it follows that 2rm, and squaring the inequality between nonnegative integers gives 4r2=(2r)2m2.

step 3.2algebra
4.2

If an integer r also satisfies ar(modm) and m<2rm, then ar=mq1 and ar=mq2 for integers q1,q2 by [F1] and [F2], so rr=m(q2q1) and m(rr); adding m<2rm to m2r<m gives 2m<2(rr)<2m, so rr<m, and were rr0 then [L2] would give m=mrr<m; hence r=r.

step 3.2F1F2L2algebra
5.1

So r exists by steps 3.1 and 3.2, is unique by step 4.2, and satisfies 4r2m2 by step 4.1.

step 3.1step 3.2step 4.1step 4.2

Remarks

Where the tie falls. The normalisation is deliberately half-open on the right: 2r=m is permitted and 2r=m is not. The case 2r=m can arise only for even m, where r0 may equal the integer t with m=2t; then t and tm are congruent modulo m with t=tm, and the convention keeps t. Without the half-open choice both values would satisfy 2rm and the uniqueness clause would be false as stated.

The bound is stated in integers. Writing 4r2m2 rather than rm/2 avoids introducing a quotient that need not be an integer, and it is the form the estimates in Some multiple pm with 1m<p is a sum of four squares and The centred residue quadruple of pm=a2+b2+c2+d2 has norm mn with 1n<m use. The inequality 4r2m2 is an equality exactly when 2r=m.

LemmaStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

Some multiple pm with 1m<p is a sum of four squares

Statement

Let p be a prime (Prime and composite integers: p is prime when p>1 and its only positive divisors are 1 and p). Then there is an integer m with 1m<p for which pm is a sum of four integer squares (Representations as sums of four squares).

Facts & Assumptions

Given: A prime p.

[F1]

An integer p is prime when p>1 and dp with d>0 force d=1 or d=p; in words, p exceeds 1, and its only positive divisors are 1 and p (Prime and composite integers: p is prime when p>1 and its only positive divisors are 1 and p).

[F2]

A representation of a nonnegative integer n as a sum of four squares is an ordered quadruple (a,b,c,d)Z4 with n=a2+b2+c2+d2 (Representations as sums of four squares).

[F3]

For a,b,nZ, ab(modn) means n(ab) (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1).

[F4]

For d,aZ, da means a=dq for some qZ (Divisibility in Z: da when a=dq for some integer q).

[L1]

For every prime p there are integers x,y with x2+y2+10(modp) (For every prime p the congruence x2+y2+10(modp) is solvable).

[L2]

For an integer m1 and aZ there is exactly one integer r with ar(modm) and m<2rm, and consequently 4r2m2 (The least absolute remainder modulo a positive integer).

[L3]

If aa(modn) and bb(modn), then a+ba+b(modn) and abab(modn) (Congruent integers may be added, subtracted and multiplied: representative changes preserve both arithmetic operations).

Proof

technique · direct
1.1

Fix integers u,v with u2+v2+10(modp), which [L1] supplies for the prime p.

givenL1choose
2.1

Since p>1 by [F1], the modulus p satisfies the hypothesis of [L2]; let x and y be the least absolute remainders of u and v modulo p, so that xu(modp), yv(modp), 4x2p2 and 4y2p2.

step 1.1F1L2construct
3.1

By [L3] applied to the products xx and yy and then to the sums, x2+y2+1u2+v2+1(modp), and u2+v2+10(modp); hence x2+y2+10(modp), which by [F3] and [F4] says px2+y2+1.

step 1.1step 2.1L3F3F4algebra
4.1

Write x2+y2+1=pm with mZ, as [F4] permits; the left-hand side is at least 1 because x20 and y20, and p>0, so m1.

step 3.1F4algebra
5.1

Multiplying step 4.1 by 4 and using the two bounds of step 2.1 gives 4pm=4x2+4y2+4p2+p2+4=2p2+4; since p2 by [F1] we have p24, so 2p2+43p2<4p2, whence 4pm<4p2, pm<p2 and m<p.

step 2.1step 4.1F1algebra
6.1

The equation pm=x2+y2+12+02 of step 4.1 exhibits the quadruple (x,y,1,0)Z4 as a representation of pm, so pm is a sum of four integer squares with 1m<p.

step 4.1step 5.1F2

Remarks

Why the centring is needed. The pair (u,v) produced by [L1] is subject to no size condition, so u2+v2+1 can be an arbitrarily large multiple of p. Replacing u,v by their least absolute remainders leaves the congruence class untouched and buys the two bounds 4x2p2 and 4y2p2, which is what forces the multiplier below p.

The bound is not tight, and does not need to be. What the coordinate bounds give at step 5.1 is 4pm2p2+4, and only the weaker 4pm<4p2 is used. The comparison 2p2+4<4p2 needs just p2>2, which every prime satisfies, so p=2 needs no separate treatment even though the coordinate bound 4x2p2 can be attained there, at x=±1.

The case m=1. Nothing excludes it, and it is the case p=x2+y2+1 in which the prime is already a sum of four squares.

LemmaStatement: AI-adaptedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

The centred residue quadruple of pm=a2+b2+c2+d2 has norm mn with 1n<m

Statement

Let p be a prime (Prime and composite integers: p is prime when p>1 and its only positive divisors are 1 and p), let m be an integer with 1<m<p, and let a,b,c,d be integers with pm=a2+b2+c2+d2. Write a,b,c,d for the least absolute remainders of a,b,c,d modulo m (The least absolute remainder modulo a positive integer). Then there is an integer n with 1n<m and

a2+b2+c2+d2=mn.

Facts & Assumptions

Given: A prime p, an integer m with 1<m<p, integers a,b,c,d with pm=a2+b2+c2+d2, and the least absolute remainders a,b,c,d of a,b,c,d modulo m.

[F1]

An integer p is prime when p>1 and dp with d>0 force d=1 or d=p; in words, p exceeds 1, and its only positive divisors are 1 and p (Prime and composite integers: p is prime when p>1 and its only positive divisors are 1 and p).

[F2]

For a,b,nZ, ab(modn) means n(ab) (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1).

[F3]

For d,aZ, da means a=dq for some qZ (Divisibility in Z: da when a=dq for some integer q).

[L1]

For an integer m1 and aZ there is exactly one integer r with ar(modm) and m<2rm, and consequently 4r2m2 (The least absolute remainder modulo a positive integer).

[L2]

If aa(modn) and bb(modn), then a+ba+b(modn) and abab(modn) (Congruent integers may be added, subtracted and multiplied: representative changes preserve both arithmetic operations).

[L3]

Divisibility is linear: da and db imply dax+by for all x,yZ; in particular da+b and dab (Divisibility is reflexive and transitive on Z, and is linear: if da and db then dax+by for all integers x,y; also da implies dac, da and da).

[L4]

If xz=yz and z0, then x=y (The integers have no zero divisors; multiplicative cancellation).

Proof

technique · direct
1.1

Since m>1 the hypothesis m1 of [L1] holds, so a,b,c,d are defined and satisfy aa(modm), bb(modm), cc(modm), dd(modm) together with m<2am, 4a2m2 and the same three conditions for b, c and d.

givenL1construct
2.1

By [L2] applied to the products aa, bb, cc, dd and then to the sums, a2+b2+c2+d2a2+b2+c2+d2=pm(modm), and pm0(modm) since mpm; so by [F2] the modulus m divides a2+b2+c2+d2, and by [F3] there is an integer n with a2+b2+c2+d2=mn.

givenstep 1.1L2F2F3algebra
3.1

The left-hand side of step 2.1 is a sum of squares, hence at least 0, and m>0, so n0.

step 2.1algebra
3.2

Summing the four bounds 4a2m2, 4b2m2, 4c2m2, 4d2m2 of step 1.1 gives 4mn4m2, hence mnm2 and, dividing by the positive integer m, nm.

step 1.1step 2.1algebra
4.1

If n=0 then a2+b2+c2+d2=0 forces a=b=c=d=0, so [F2] and step 1.1 give ma, mb, mc and md; writing a=mα, b=mβ, c=mγ, d=mδ with [F3] then gives pm=m2(α2+β2+γ2+δ2).

step 2.1step 3.1F2F3algebra
4.2

If n=m then step 3.2 holds with equality, so each of the four bounds of step 1.1 is an equality: 4a2=m2 and likewise for b, c, d.

step 3.2step 1.1algebra
5.1

In the case n=0, cancelling the nonzero factor m in step 4.1 by [L4] gives p=m(α2+β2+γ2+δ2), so m is a positive divisor of p and [F1] forces m=1 or m=p, both excluded by 1<m<p; hence n1.

step 4.1F1L4algebra
5.2

In the case of step 4.2, m2=(2a)2 with m>0 gives 2a=m or 2a=m, and the normalisation m<2am of step 1.1 leaves 2a=m; so m=2s with s:=a a positive integer, and the same argument gives b=c=d=s.

step 4.2step 1.1algebra
6.1

Still in the case n=m, as(modm) gives a=s+mt=s(1+2t) for some integer t by [F2] and [F3], so a2s2=s2((1+2t)21)=4s2t(t+1), which m2=4s2 divides; the same holds for b, c and d.

step 5.2step 1.1F2F3algebra
7.1

In the same case, summing the four differences of step 6.1 and using [L3], m2 divides (a2+b2+c2+d2)4s2=pmm2, and m2 divides m2, so m2pm.

step 6.1L3algebra
8.1

Still in the case n=m, writing pm=m2k as [F3] permits and cancelling the nonzero factor m by [L4] gives p=mk, so m is a positive divisor of p and [F1] forces m=1 or m=p, both excluded by 1<m<p; hence nm.

step 7.1F1F3L4algebra
9.1

Therefore n1 by step 5.1, nm by step 3.2 and nm by step 8.1, that is 1n<m, with a2+b2+c2+d2=mn from step 2.1.

step 2.1step 3.2step 5.1step 8.1

Remarks

The two excluded values are excluded for the same reason. Both n=0 and n=m end in mp, which the hypotheses 1<m<p rule out. They differ in how they get there: n=0 says the four coordinates are already multiples of m, while n=m says each is congruent to half of m, and the second is possible only when m is even.

Why the even case cannot be waved away. The normalisation m<2rm admits 2r=m, so for even m a centred coordinate really can attain the bound 4r2=m2, and then the estimate of step 3.2 gives only nm rather than n<m. Steps 4.2 to 8.1 are what remove the remaining value. An alternative treatment halves all four coordinates first so that only odd moduli are descended through; the route taken here keeps the modulus arbitrary and pays for it with this one extra argument.

LemmaStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

Descent step: a smaller multiple of p is a sum of four squares

Statement

Let p be a prime (Prime and composite integers: p is prime when p>1 and its only positive divisors are 1 and p), let m be an integer with 1<m<p, and suppose pm is a sum of four integer squares (Representations as sums of four squares). Then there is an integer n with 1n<m for which pn is a sum of four integer squares.

Facts & Assumptions

Given: A prime p, an integer m with 1<m<p, and a representation of pm as a sum of four integer squares.

[F1]

An integer p is prime when p>1 and dp with d>0 force d=1 or d=p (Prime and composite integers: p is prime when p>1 and its only positive divisors are 1 and p).

[F2]

A representation of a nonnegative integer n as a sum of four squares is an ordered quadruple (a,b,c,d)Z4 with n=a2+b2+c2+d2 (Representations as sums of four squares).

[F3]

For a,b,nZ, ab(modn) means n(ab) (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1).

[F4]

For d,aZ, da means a=dq for some qZ (Divisibility in Z: da when a=dq for some integer q).

[L1]

For all integers x1,,x4,y1,,y4, setting z1=x1y1+x2y2+x3y3+x4y4, z2=x1y2x2y1x3y4+x4y3, z3=x1y3+x2y4x3y1x4y2 and z4=x1y4x2y3+x3y2x4y1 gives (x12+x22+x32+x42)(y12+y22+y32+y42)=z12+z22+z32+z42 (Euler's four-square product identity).

[L2]

For an integer m1 and aZ there is exactly one integer r with ar(modm) and m<2rm, and consequently 4r2m2 (The least absolute remainder modulo a positive integer).

[L3]

If p is prime, 1<m<p and pm=a2+b2+c2+d2 for integers a,b,c,d, then the least absolute remainders a,b,c,d of a,b,c,d modulo m satisfy a2+b2+c2+d2=mn for an integer n with 1n<m (The centred residue quadruple of pm=a2+b2+c2+d2 has norm mn with 1n<m).

[L4]

If aa(modn) and bb(modn), then a+ba+b(modn), abab(modn) and abab(modn) (Congruent integers may be added, subtracted and multiplied: representative changes preserve both arithmetic operations).

[L5]

If x,yZ are nonzero then xy0; consequently, if xz=yz and z0, then x=y (The integers have no zero divisors; multiplicative cancellation).

Proof

technique · direct
1.1

Fix integers a,b,c,d with pm=a2+b2+c2+d2, which the hypothesis supplies.

givenF2choose
2.1

Since m>1, [L2] applies with modulus m; let a,b,c,d be the least absolute remainders of a,b,c,d modulo m, so aa, bb, cc and dd modulo m.

step 1.1L2construct
3.1

By [L3] applied to p, m and the representation of step 1.1, there is an integer n with 1n<m and a2+b2+c2+d2=mn.

step 1.1step 2.1L3F1
3.2

Put A=aa+bb+cc+dd; substituting the congruences of step 2.1 and using [L4] gives Aa2+b2+c2+d2(modm), and a2+b2+c2+d2=pm0(modm) by [F3], so A0(modm).

step 1.1step 2.1L4F3algebra
3.3

Put B=abbacd+dc, C=ac+bdcadb and D=adbc+cbda; the same substitution and [L4] give Babbacd+dc=0, Cac+bdcadb=0 and Dadbc+cbda=0 modulo m.

step 2.1L4F3algebra
4.1

Applying [L1] to x=(a,b,c,d) and y=(a,b,c,d) produces exactly the four quantities A,B,C,D of steps 3.2 and 3.3 as z1,z2,z3,z4, so (pm)(mn)=A2+B2+C2+D2.

step 1.1step 2.1step 3.1L1
4.2

By [F3] and [F4] the congruences of steps 3.2 and 3.3 say mA, mB, mC and mD; write A=mA1, B=mB1, C=mC1, D=mD1 with A1,B1,C1,D1Z.

step 3.2step 3.3F3F4construct
5.1

Substituting step 4.2 into step 4.1 gives pm2n=m2(A12+B12+C12+D12).

step 4.1step 4.2algebra
6.1

Since m>1 is nonzero, m20 by [L5], so cancelling m2 in step 5.1 by [L5] gives pn=A12+B12+C12+D12.

step 5.1L5algebra
7.1

The quadruple (A1,B1,C1,D1)Z4 therefore represents pn as a sum of four integer squares, with 1n<m from step 3.1.

step 3.1step 6.1F2

Remarks

The sign pattern is doing the work. Steps 3.2 and 3.3 substitute aa, bb, cc, dd into the four bilinear forms of [L1] and read off that all four become divisible by m: the first because it becomes the norm pm, the other three because they become expressions in which the terms cancel identically. That is a property of this particular choice of signs, and Why the descent fixes one sign pattern in the four-square identity records which other choices share it.

The hypothesis m>1 is used twice. It gives the modulus of [L2] and it is part of what [L3] needs; and it is not a restriction in practice, since m=1 is the case in which p itself is already a sum of four squares and no descent is wanted.

TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

Every prime is a sum of four integer squares

Statement

Every prime is a sum of four integer squares. That is, for every prime p (Prime and composite integers: p is prime when p>1 and its only positive divisors are 1 and p) there is a quadruple (a,b,c,d)Z4 with p=a2+b2+c2+d2 (Representations as sums of four squares).

Facts & Assumptions

Given: A prime p.

[F1]

An integer p is prime when p>1 and dp with d>0 force d=1 or d=p (Prime and composite integers: p is prime when p>1 and its only positive divisors are 1 and p).

[F2]

A representation of a nonnegative integer n as a sum of four squares is an ordered quadruple (a,b,c,d)Z4 with n=a2+b2+c2+d2 (Representations as sums of four squares).

[L1]

For every prime p there is an integer m with 1m<p for which pm is a sum of four integer squares (Some multiple pm with 1m<p is a sum of four squares).

[L2]

If p is prime, 1<m<p and pm is a sum of four integer squares, then there is an integer n with 1n<m for which pn is a sum of four integer squares (Descent step: a smaller multiple of p is a sum of four squares).

[L3]

Let SZ be nonempty. If S has an upper bound, it has a greatest element; if S has a lower bound, it has a least element. In each case the element is unique (A nonempty set of integers bounded above has a greatest element, and a nonempty set of integers bounded below has a least element).

Proof

technique · contradiction
1.1

Suppose, for contradiction, that the prime p is not a sum of four integer squares.

assume-contra
1.2

Let S be the set of integers m with 1m<p for which pm is a sum of four integer squares; S is nonempty by [L1].

givenF1F2L1construct
2.1

The set S is bounded below by 1, so [L3] gives it a least element m0, and 1m0<p because m0S.

step 1.2L3
3.1

The value m0=1 is impossible: it would make p=p1 a sum of four integer squares, against step 1.1. Hence m0>1, and with step 2.1 this gives 1<m0<p.

step 1.1step 2.1F2algebra
4.1

Applying [L2] to the prime p and the multiplier m0, whose hypotheses 1<m0<p and "pm0 is a sum of four integer squares" are step 3.1 and membership of m0 in S, gives an integer n with 1n<m0 for which pn is a sum of four integer squares.

step 2.1step 3.1L2
5.1

Then 1n<m0<p, so nS while n<m0, contradicting the leastness of m0; the assumption of step 1.1 therefore fails, and p is a sum of four integer squares.

step 2.1step 4.1F2algebradischarge-contradiction

Remarks

What makes the descent terminate. The proof does not iterate the descent lemma; it applies it once, to the least multiplier, and reads the contradiction off leastness. The least element is supplied by [L3], for a set of integers bounded below, so no appeal to an infinite descending chain is needed and no infinite regress is written.

Where the hypothesis that p is prime enters. Twice, through [L1] and through [L2]. In [L1] it supplies the congruence and the bound p2 used to obtain a multiplier below p; in the construction underlying [L2] it is used when a positive divisor of p is forced to be 1 or p. For a composite modulus the multiplier can stall above 1, so the statement proved here is genuinely about primes; the passage from primes to all nonnegative integers is Lagrange's four-square theorem: every nonnegative integer is a sum of four integer squares, and it uses Sums of four squares are closed under products rather than a further descent.

TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

Lagrange's four-square theorem: every nonnegative integer is a sum of four integer squares

Statement

Every nonnegative integer is a sum of four integer squares. That is, for every integer n0 there is a quadruple (a,b,c,d)Z4 with n=a2+b2+c2+d2 (Representations as sums of four squares).

Facts & Assumptions

Given: The nonnegative integers.

[F1]

A representation of a nonnegative integer n as a sum of four squares is an ordered quadruple (a,b,c,d)Z4 with n=a2+b2+c2+d2 (Representations as sums of four squares).

[F2]

For d,aZ, da means a=dq for some qZ (Divisibility in Z: da when a=dq for some integer q).

[F3]

An integer p is prime when p>1 and dp with d>0 force d=1 or d=p (Prime and composite integers: p is prime when p>1 and its only positive divisors are 1 and p).

[L1]

Every prime is a sum of four integer squares. (Every prime is a sum of four integer squares).

[L2]

Let m and n be nonnegative integers; if each of m and n is a sum of four integer squares, then mn is a sum of four integer squares (Sums of four squares are closed under products).

[L3]

Let nZ with n>1 and put S:={dZ:dn and d>1}. Then S is nonempty and has a least element q, and q is prime; in particular every integer greater than 1 has a prime divisor (Every integer n>1 has a prime divisor; indeed the least divisor of n that exceeds 1 is prime).

[L4]

Let SZ be nonempty. If S has an upper bound, it has a greatest element; if S has a lower bound, it has a least element. In each case the element is unique (A nonempty set of integers bounded above has a greatest element, and a nonempty set of integers bounded below has a least element).

Proof

technique · contradiction
1.1

Suppose, for contradiction, that not every nonnegative integer is a sum of four integer squares.

assume-contra
2.1

Let T be the set of nonnegative integers that are not sums of four integer squares; by step 1.1 it is nonempty, and it is bounded below by 0, so [L4] gives it a least element n0.

step 1.1L4F1construct
3.1

Neither 0 nor 1 lies in T, since 0=02+02+02+02 and 1=12+02+02+02 are representations in the sense of [F1]; as n0T and n00, this forces n0>1.

step 2.1F1algebra
4.1

By [L3] the integer n0>1 has a prime divisor q, and by [F2] there is an integer k with n0=qk.

step 3.1L3F2choose
5.1

Here k1, since k0 would give n0=qk0 against n0>1; and k<n0, since step 4.1 gives q prime, so [F3] gives q>1, hence q2, and therefore n0=qk2k=k+k>k.

step 4.1F3algebra
6.1

Since 0k<n0 and n0 is least in T, the integer k is not in T, so k is a sum of four integer squares; and q is a sum of four integer squares by [L1].

step 2.1step 5.1L1
7.1

Both factors of n0=qk are nonnegative and are sums of four integer squares, so [L2] makes n0 one, contradicting n0T; the assumption of step 1.1 therefore fails, and every nonnegative integer is a sum of four integer squares.

step 4.1step 6.1L2F1discharge-contradiction

Remarks

Why 0 and 1 are treated by hand. The proof factors n0 through a prime divisor, and neither small value has one: 1 is a product of no primes at all and 0 is not a product of primes. Both are covered instead by the explicit quadruples in step 3.1, which the definition admits because coordinates may vanish.

Negative integers are outside the statement, not an omission. A square is nonnegative, and so is any sum of squares, so no negative integer is a sum of four integer squares, and the hypothesis n0 is the exact range where the conclusion can hold.

Four is not improvable. Some integers admit no representation with a vanishing coordinate, so they are not sums of three squares. The proposition Positive integers 4am with m7(mod8) are not sums of three integer squares and its corollary Positive integers 4am with m7(mod8) need four nonzero squares exhibit the family 4am with m7(mod8); they do not assert the converse classification.

RemarkRemark: AI-adaptedProof: Not applicablejudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

Why the descent fixes one sign pattern in the four-square identity

The four bilinear forms in Euler's four-square product identity are not the only ones that turn a product of two sums of four squares into a sum of four squares. Euler also recorded the variant with the same first coordinate and

z2=x1y2x2y1+x3y4x4y3,z3=x1y3x2y4x3y1+x4y2,z4=x1y4+x2y3x3y2x4y1,

which is the form Dummit's Lemma 1 displays, and the norm of a product of quaternions gives a third,

z1=x1y1x2y2x3y3x4y4,z2=x1y2+x2y1+x3y4x4y3,z3=x1y3x2y4+x3y1+x4y2,z4=x1y4+x2y3x3y2+x4y1,

which is the route MIT's Lecture 22 takes. All three are polynomial identities in the eight variables, so any of them proves that a product of two sums of four squares is again one.

The descent asks more of the identity than that. In Descent step: a smaller multiple of p is a sum of four squares the second quadruple is congruent to the first coordinatewise modulo m, and what the proof needs is that all four output coordinates then become divisible by m. Substituting y1x1, y2x2, y3x3, y4x4 modulo m and writing (a,b,c,d) for (x1,x2,x3,x4), the pattern fixed in Euler's four-square product identity gives

z1a2+b2+c2+d2,z2abbacd+dc=0,z3ac+bdcadb=0,z4adbc+cbda=0(modm),

and the first of these is the multiple pm, hence also 0 modulo m. Euler's second pattern behaves the same way: its last three coordinates become abba+cddc, acbdca+db and ad+bccbda, all identically 0. The quaternion pattern does not: under the same substitution its coordinates become a2b2c2d2, 2ab, 2ac and 2ad, and the hypotheses of Descent step: a smaller multiple of p is a sum of four squares — that m divides a2+b2+c2+d2 and that the second quadruple is the centred residue quadruple of the first — do not force z1, z2, z3 or z4 to vanish modulo m.

So the choice of signs is load-bearing for the divisibility step written here, and it is displayed rather than summarised for that reason. This says nothing about whether some other argument can descend with the quaternion pattern; a proof organised around quaternion divisibility rather than around congruences between bilinear forms is a different argument with a different bookkeeping, and nothing above bears on it.

LemmaStatement: AI-adaptedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

A square is congruent to 0, 1 or 4 modulo 8

Statement

Call an integer even when 2 divides it and odd otherwise (Divisibility in Z: da when a=dq for some integer q). Let xZ. Then x2 is congruent to 0, to 1 or to 4 modulo 8 (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1). More precisely, if x is odd then x21(mod8), and if x is even then x20(mod8) or x24(mod8).

Consequently, if x is odd then x21(mod4), and if x is even then x20(mod4).

Facts & Assumptions

Given: An integer x.

[F1]

For a,b,nZ, ab(modn) means n(ab) (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1).

[F2]

For d,aZ, da means a=dq for some qZ (Divisibility in Z: da when a=dq for some integer q).

[L1]

For a,bZ with b0 there is exactly one pair (q,r) of integers with a=qb+r and 0r<b; moreover ba holds exactly when r=0 (Division with remainder for any nonzero divisor: for aZ and b0 there are unique q,rZ with a=qb+r and 0r<b).

[L2]

Let a be odd. For k3, the congruence x2a(mod2k) is soluble if and only if a1(mod8) (Unit square criterion and root count modulo powers of two).

Proof

technique · cases
1.1

By [L1] with b=2 there is exactly one pair (q,r) with x=2q+r and 0r<2, so r=0 or r=1; that is, x=2u for an integer u, or x=2u+1 for an integer u, and these are the even and odd cases.

givenL1algebra
1.2

In the odd case, x=2u+1 gives x2=2(2u2+2u)+1, so x2 is odd; the congruence t2x2(mod23) has the solution t=x, so [L2] applied with a=x2 and k=3 gives x21(mod8).

assume-case oddL2F1algebra
1.3

In the even case, x=2u gives x2=4u2, and by [L1] with b=2 applied to u the integer u is itself either 2v or 2v+1 for an integer v.

assume-case evenL1algebra
2.1

If u=2v then x2=16v2=82v2, so 8x20 and x20(mod8).

step 1.3assume-case uevenF1F2algebra
2.2

If u=2v+1 then u2=2(2v2+2v)+1, so x2=4u2=8(2v2+2v)+4, whence 8x24 and x24(mod8).

step 1.3assume-case uoddF1F2algebra
3.1

Steps 1.2, 2.1 and 2.2 cover every integer x, so x2 is congruent to 0, to 1 or to 4 modulo 8, with 1 occurring exactly in the odd case.

step 1.2step 2.1step 2.2algebra
4.1

For the modulo-4 consequence: in the odd case 8x21 and 48, so [L3] gives 4x21 and x21(mod4); in the even case either 8x2, whence 4x2 by [L3], or x2=8w+4=4(2w+1) for an integer w, whence 4x2 directly, so x20(mod4) in both.

step 3.1step 1.2step 2.1step 2.2L3F1F2cases-exhaustive

Remarks

Where the odd case comes from. The published criterion Unit square criterion and root count modulo powers of two says that for k3 an odd a is a square modulo 2k exactly when a1(mod8). Reading it at k=3 in the direction "soluble implies a1(mod8)", with a=x2 and the solution t=x already in hand, is the whole odd case. The elementary route is also short — x=2u+1 gives x2=4u(u+1)+1 with u(u+1) even — and the citation is used instead because the criterion is the general statement of which this is the special case.

Which residues actually occur. All three do: 0=02, 1=12 and 4=22 realise the residues 0, 1 and 4. So the list cannot be shortened, and the modulo-8 classification of squares is exactly this list.

LemmaStatement: AI-adaptedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

No sum of three integer squares is congruent to 7 modulo 8

Statement

There are no integers x,y,z with x2+y2+z27(mod8) (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1). In fact, the residues modulo 8 attained by sums of three integer squares are exactly 0,1,2,3,4,5,6.

Facts & Assumptions

Given: Integers x,y,z.

[F1]

For a,b,nZ, ab(modn) means n(ab) (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1).

[L1]

For every integer x: if x is odd then x21(mod8), and if x is even then x20(mod8) or x24(mod8) (A square is congruent to 0, 1 or 4 modulo 8).

[L2]

If aa(modn) and bb(modn), then a+ba+b(modn) (Congruent integers may be added, subtracted and multiplied: representative changes preserve both arithmetic operations).

[L3]

For a,bZ with b0 there is exactly one pair (q,r) of integers with a=qb+r and 0r<b; moreover ba holds exactly when r=0 (Division with remainder for any nonzero divisor: for aZ and b0 there are unique q,rZ with a=qb+r and 0r<b).

Proof

technique · cases
1.1

By [L3] with b=2 each of x,y,z is even or odd; let t be how many of the three are odd, so t is 0, 1, 2 or 3, and these four values exhaust the possibilities.

givenL3construct
1.2

By [L1], each odd coordinate contributes a square congruent to 1 modulo 8, and each even coordinate contributes a square congruent to 0 or to 4 modulo 8.

L1
2.1

If t=3 then, adding the three contributions by [L2], x2+y2+z21+1+1=3(mod8).

step 1.1step 1.2assume-case threeL2F1algebra
2.2

If t=2 then x2+y2+z21+1+e(mod8) with e equal to 0 or 4, so the sum is congruent to 2 or to 6.

step 1.1step 1.2assume-case twoL2F1algebra
2.3

If t=1 then x2+y2+z21+e1+e2(mod8) with each ei equal to 0 or 4, giving 1, 5, 5 or 9; since 91(mod8), the sum is congruent to 1 or to 5.

step 1.1step 1.2assume-case oneL2F1algebra
2.4

If t=0 then x2+y2+z2e1+e2+e3(mod8) with each ei equal to 0 or 4, giving 0, 4, 8 or 12; since 80 and 124 modulo 8, the sum is congruent to 0 or to 4.

step 1.1step 1.2assume-case zeroL2F1algebra
3.1

Steps 2.1 to 2.4 cover the four values of t listed in step 1.1 and show that every sum of three squares is congruent to one of 0,1,2,3,4,5,6, never to 7, modulo 8. Conversely, the triples (0,0,0), (1,0,0), (1,1,0), (1,1,1), (2,0,0), (2,1,0) and (2,1,1) have sums of squares 0,1,2,3,4,5,6, respectively. Thus the attained residues are exactly the seven listed classes, and 7 is not attained.

step 2.1step 2.2step 2.3step 2.4F1algebracases-exhaustive

Remarks

Why the cases are counted by parity rather than listed by value. Enumerating the possible triples of residues from {0,1,4} would give ten unordered choices; grouping them by how many coordinates are odd gives four, because the odd coordinates contribute a fixed residue and only the even ones branch. The exhaustiveness is then visible from step 1.1 alone.

Every listed residue is attained. Taking (x,y,z) to be (0,0,0), (1,0,0), (1,1,0), (1,1,1), (2,0,0), (2,1,0) and (2,1,1) gives sums 0,1,2,3,4,5,6, so the second sentence of the Statement is an equality of sets and not merely an inclusion.

LemmaStatement: AI-adaptedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

If 4 divides x2+y2+z2 then x, y and z are all even

Statement

Let x,y,zZ and suppose 4x2+y2+z2 (Divisibility in Z: da when a=dq for some integer q). Then x, y and z are all even.

Facts & Assumptions

Given: Integers x,y,z with 4x2+y2+z2.

[F1]

For a,b,nZ, ab(modn) means n(ab) (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1).

[F2]

For d,aZ, da means a=dq for some qZ (Divisibility in Z: da when a=dq for some integer q).

[L1]

For every integer x: if x is odd then x21(mod4), and if x is even then x20(mod4) (A square is congruent to 0, 1 or 4 modulo 8).

[L2]

If aa(modn) and bb(modn), then a+ba+b(modn) and abab(modn) (Congruent integers may be added, subtracted and multiplied: representative changes preserve both arithmetic operations).

[L3]

For a,bZ with b0 there is exactly one pair (q,r) of integers with a=qb+r and 0r<b; moreover ba holds exactly when r=0 (Division with remainder for any nonzero divisor: for aZ and b0 there are unique q,rZ with a=qb+r and 0r<b).

Proof

technique · direct
1.1

By [L3] with b=2 each of x,y,z is even or odd; let t be how many of the three are odd, so t is one of 0,1,2,3.

givenL3construct
1.2

By [L1], modulo 4 each odd coordinate contributes a square congruent to 1 and each even coordinate contributes a square congruent to 0.

L1
2.1

Adding the three contributions by [L2], x2+y2+z2t(mod4), since the t odd coordinates each contribute 1 and the remaining ones contribute 0.

step 1.1step 1.2L2F1algebra
3.1

The hypothesis 4x2+y2+z2 says x2+y2+z20(mod4) by [F1] and [F2]; subtracting this from step 2.1 by the difference clause of [L2] gives 0t(mod4), that is 4t.

givenstep 2.1L2F1F2algebra
4.1

Since 0t<4, [L3] applied with a=t and b=4 has the unique pair (q,r)=(0,t), and it says 4t holds exactly when r=0; so step 3.1 forces t=0, meaning none of x,y,z is odd, that is x, y and z are all even.

step 1.1step 3.1L3algebra

Remarks

The modulus cannot be relaxed to 2. Divisibility of x2+y2+z2 by 2 leaves t=0 and t=2 both possible, and 12+12+02=2 realises the second, so 2 dividing the sum does not force the coordinates even. It is the count t being pinned to a single residue modulo 4 that makes the argument work, and that needs the modulus 4.

Where it is used. This is the halving step of Positive integers 4am with m7(mod8) are not sums of three integer squares: it is what licenses passing from a representation of 4σ(a)m to one of 4am.

PropositionStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

Positive integers 4am with m7(mod8) are not sums of three integer squares

Statement

Let aN and let m be a positive integer with m7(mod8) (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1). Then there are no integers x,y,z with 4am=x2+y2+z2, where 4a is the natural power of 4 in the commutative monoid (Z,,1) (Powers gn: natural exponents in a monoid and integer exponents in a group, with g0=e, (Z,,1) is a commutative monoid whose group of units is {1,1}; equivalently u1 holds exactly for u=1 and u=1).

Facts & Assumptions

Given: A positive integer m with m7(mod8).

[F1]

For a,b,nZ, ab(modn) means n(ab) (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1).

[F2]

For d,aZ, da means a=dq for some qZ (Divisibility in Z: da when a=dq for some integer q).

[L1]

There are no integers x,y,z with x2+y2+z27(mod8) (No sum of three integer squares is congruent to 7 modulo 8).

[L2]

If x,y,zZ and 4x2+y2+z2, then x, y and z are all even (If 4 divides x2+y2+z2 then x, y and z are all even).

[L3]

If x,yZ are nonzero then xy0; consequently, if xz=yz and z0, then x=y (The integers have no zero divisors; multiplicative cancellation).

[L4]

In a monoid (M,,e) the natural powers of gM satisfy g0=e and gσ(n)=gng for nN, where σ is the successor on N (Powers gn: natural exponents in a monoid and integer exponents in a group, with g0=e).

[L6]

Let SN. If 0S and σ(n)S whenever nS, then S=N (The principle of mathematical induction).

Proof

technique · induction
1.1

Let S be the set of aN such that for every positive integer m with m7(mod8) there are no integers x,y,z with 4am=x2+y2+z2.

givenconstruct
1.2

Base case 0S: by [L4] in the monoid of [L5], 40=1, so 40m=m and a representation m=x2+y2+z2 would give x2+y2+z27(mod8) by the hypothesis m7(mod8), which [L1] excludes.

baseL1L4L5F1algebra
2.1

Induction step: let aS, let m be a positive integer with m7(mod8), and suppose integers x,y,z satisfy 4σ(a)m=x2+y2+z2; by [L4] and [L5], 4σ(a)=4a4, so x2+y2+z2=4(4am) and hence 4x2+y2+z2 by [F2].

step 1.1ihL4L5F2algebra
3.1

By [L2] the coordinates x, y, z are then all even, so x=2x, y=2y and z=2z for integers x,y,z.

step 2.1L2construct
4.1

Substituting gives 4(4am)=x2+y2+z2=4(x2+y2+z2), and cancelling the nonzero factor 4 by [L3] yields 4am=x2+y2+z2, which contradicts aS since m is a positive integer congruent to 7 modulo 8.

step 2.1step 3.1L3algebra
5.1

So no such x,y,z exist and σ(a)S; with the base case of step 1.2, [L6] gives S=N, which is the assertion.

step 1.2step 4.1L6discharge-induction

Remarks

Three descriptions of the same integers. For a positive m, the condition m7(mod8) says m=8b+7 for an integer b, and b0 because 8b+7>0; so the integers excluded here are exactly those of the form 4a(8b+7) with a a natural number and b a nonnegative integer, which is how Dummit writes them. Crisman's phrase for the same set, an even power of two times an odd number congruent to seven modulo eight, is a third description: 4a=22a and every m7(mod8) is odd.

Only one direction is proved. The statement says these integers are not sums of three squares. Its converse, that every other nonnegative integer is a sum of three squares, is Legendre's three-square theorem; it is not available from this page's declared prerequisites, and nothing here uses it. In particular the argument above rules out no integer beyond the ones named.

Why the induction is on the exponent. The base case is a congruence computation modulo 8 and nothing more. The step is where the work is: it needs that a sum of three squares divisible by 4 has all coordinates even, which is If 4 divides x2+y2+z2 then x, y and z are all even, since without it the halved coordinates need not be integers.

CorollaryStatement: AI-adaptedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26Open item page →

Positive integers 4am with m7(mod8) need four nonzero squares

Statement

Let aN, let m be a positive integer with m7(mod8) (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1), and put n=4am, the power being the natural power in the commutative monoid (Z,,1) (Powers gn: natural exponents in a monoid and integer exponents in a group, with g0=e, (Z,,1) is a commutative monoid whose group of units is {1,1}; equivalently u1 holds exactly for u=1 and u=1). Then n is a sum of four integer squares, and in every representation (x1,x2,x3,x4)Z4 of n (Representations as sums of four squares) all four coordinates are nonzero.

Facts & Assumptions

Given: A natural number a, a positive integer m with m7(mod8), and n=4am.

[F1]

A representation of a nonnegative integer n as a sum of four squares is an ordered quadruple (a,b,c,d)Z4 with n=a2+b2+c2+d2 (Representations as sums of four squares).

[L1]

Every nonnegative integer is a sum of four integer squares (Lagrange's four-square theorem: every nonnegative integer is a sum of four integer squares).

[L2]

For aN and a positive integer m with m7(mod8), there are no integers x,y,z with 4am=x2+y2+z2 (Positive integers 4am with m7(mod8) are not sums of three integer squares).

[L3]

In a monoid (M,,e) the natural powers of gM satisfy g0=e and gσ(n)=gng for nN, where σ is the successor on N (Powers gn: natural exponents in a monoid and integer exponents in a group, with g0=e).

[L5]

The order on Z is total, xy implies x+zy+z, and 0<x, 0<y imply 0<xy (The integers form a totally ordered ring).

[L6]

The embedding of N into Z is injective, preserves order, and has image exactly the nonnegative integers (The naturals embed in the integers).

[L7]

On N, the strict order is membership and 0n whenever n0 (On N the order is membership: m<n    mn).

[L8]

One has m<n exactly when σ(m)n (Discreteness: σ(n) is the immediate successor), and 1=σ(0) (The natural numbers N (von Neumann)).

[L9]

Let SN. If 0S and σ(n)S whenever nS, then S=N (The principle of mathematical induction).

Proof

technique · contradiction
1.1

The integers satisfy 0<1, and every positive integer is at least 1: the first because the embedded natural number 1 is nonnegative and differs from the embedded natural number 0, which is the integer 0, by injectivity in [L6]; and if y>0 then [L6] writes y as the image of a unique natural t, with t0, so [L7] gives 0t, hence 0<t, and [L8] turns this into 1=σ(0)t, which order preservation in [L6] carries to 1y.

L6L7L8
1.2

Suppose, for contradiction, that some quadruple (x1,x2,x3,x4)Z4 satisfies n=x12+x22+x32+x42 with xj=0 for at least one index j.

assume-contra
2.1

Let U={aN:4a1}. Since 40=1 by [L3] in the monoid of [L4], the set U contains 0. If aU, then 4σ(a)=4a4 by [L3], and both factors are at least 1: 4a1 by the hypothesis aU, and step 1.1 gives 41 because 4 is a positive integer. Thus both factors are positive, so [L5] gives 4σ(a)>0, and step 1.1 then gives 4σ(a)1. Hence σ(a)U, and [L9] yields U=N.

step 1.1L3L4L5L9
3.1

Since m is positive, step 1.1 gives m1; and step 2.1 gives 4a1. So both factors in n=4am are positive, [L5] gives n>0, and in particular n is nonnegative.

step 1.1step 2.1L5
4.1

By [L1] applied to the nonnegative integer n of step 3.1, n is a sum of four integer squares, so a representation in the sense of [F1] exists.

step 3.1L1F1
5.1

Under the assumption of step 1.2, deleting the coordinate xj leaves three integers y1,y2,y3, the other coordinates in any order, with y12+y22+y32=x12+x22+x32+x42xj2=n=4am, which [L2] excludes; the assumption therefore fails, so every representation of n has all four coordinates nonzero, and by step 4.1 at least one representation exists.

step 4.1step 1.2L2F1algebradischarge-contradiction

Remarks

What the two clauses say together. Four squares suffice for n, by Lagrange's four-square theorem: every nonnegative integer is a sum of four integer squares, and three do not, by Positive integers 4am with m7(mod8) are not sums of three integer squares; the second clause is the sharper form of the latter, since a representation with a zero coordinate is exactly a representation of n by three squares with a fourth coordinate added. So for these n the number four in Lagrange's theorem cannot be lowered.

The smallest instances. Taking a=0 and m=7 gives n=7; taking a=1 and m=7 gives n=28; and taking a=0 and m=15 gives n=15, so the statement is not about 7 alone.

5 · Examples, counterexamples and false statements

None yet.

Sources