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.

17 results · all verified · 15 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. The 2 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.

Sums of Two Squares

1 · Prerequisites

2 · Summary

The first supplement to quadratic reciprocity determines exactly when 1 is a square modulo an odd prime. Canonical prime factorisation and p-adic valuations record the multiplicity of every prime divisor, while finite counting and the strong pigeonhole principle produce small congruent representatives. The existence and order properties of real square roots turn their integer bounds into strict inequalities.

A two-square representation is defined together with its primitive form, and the Brahmagupta–Fibonacci identity controls products. Thue's lemma yields Fermat's theorem for primes, while a factorisation lemma gives uniqueness up to signs and order. Prime-power analysis and the local obstruction at primes congruent to three modulo four lead to the full characterisation. Separate primitive-product and primitive-prime-power lemmas then give the primitive criterion and its product, divisor, and squarefree consequences.

3 · Logical flowchart

4 · Definitions, theorems and proofs

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Representations and primitive representations as sums of two squares

Definition

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)Z2 such that n=x2+y2.

It is primitive when gcd(x,y)=1 (Common divisor, and the greatest common divisor gcd(a,b), with the convention gcd(0,0):=0). Two representations are equivalent up to signs and order when one is obtained from the other by independently changing coordinate signs and possibly interchanging the coordinates, and essentially different when they are not so equivalent.

For a positive odd integer, a representation (x,y) is normalized when x and y are positive, x is odd, and y is even.

Remarks

The ordered-pair convention retains signs and order when a correspondence is being counted. Equivalence up to signs and order is invoked only when those symmetries are deliberately discarded.

LemmaStatement: Literature-sourcedProof: Literature-sourcedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

The Brahmagupta–Fibonacci two-square identity

Statement

For all integers a,b,c,d,

(a2+b2)(c2+d2)=(acbd)2+(ad+bc)2=(ac+bd)2+(adbc)2.

Facts & Assumptions

Given: Integers a,b,c,d.

Proof

technique · direct
1.1

Expanding gives (acbd)2+(ad+bc)2=a2c22abcd+b2d2+a2d2+2abcd+b2c2=(a2+b2)(c2+d2).

givenalgebra
2.1

Likewise (ac+bd)2+(adbc)2=a2c2+2abcd+b2d2+a2d22abcd+b2c2=(a2+b2)(c2+d2).

givenalgebra
CorollaryStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Sums of two squares are closed under products

Statement

The product of two nonnegative integers representable as sums of two squares is again representable as a sum of two squares (Representations and primitive representations as sums of two squares).

Facts & Assumptions

Given: Nonnegative integers m,n, each representable as a sum of two squares.

[F1]

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)Z2 such that n=x2+y2 (Representations and primitive representations as sums of two squares).

[L1]

For all integers a,b,c,d, (a2+b2)(c2+d2)=(acbd)2+(ad+bc)2=(ac+bd)2+(adbc)2 (The Brahmagupta–Fibonacci two-square identity).

Proof

technique · direct
1.1

Choose integers a,b,c,d with m=a2+b2 and n=c2+d2.

givenF1choose
2.1

Then mn=(acbd)2+(ad+bc)2 by the two-square identity.

step 1.1L1algebra
3.1

The displayed integer pair represents mn by [F1]. This also covers a zero factor, for which the pair (0,0) represents zero and the same formula gives the zero product.

step 2.1F1
PropositionStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Representations of an odd integer correspond to representations of twice that integer

Statement

Let m be a positive odd integer. The map

Φ(x,y)=(x+y,xy)

is a bijection from the ordered signed two-square representations of m to those of 2m, with inverse

Ψ(u,v)=(u+v2,uv2).

The same maps restrict to a bijection between the primitive representations (Representations and primitive representations as sums of two squares).

Facts & Assumptions

Given: A positive odd integer m.

[F1]

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)Z2 such that n=x2+y2 (Representations and primitive representations as sums of two squares).

[F2]

An integer d is a common divisor of a and b when da and db (Common divisor, and the greatest common divisor gcd(a,b), with the convention gcd(0,0):=0).

[L2]

If a prime p divides a product ab, then pa or pb (Euclid's lemma: if p is prime and pab then pa or pb).

Proof

technique · direct
1.1

If x2+y2=m, oddness of m makes x,y have opposite parity, so x+y and xy are odd; moreover (x+y)2+(xy)2=2m, so Φ sends representations of m to representations of 2m.

givenF1algebraconstruct
1.2

If u2+v2=2m, reduction modulo 4 shows that u and v are both odd: their squares cannot both be even because 2m2(mod4), and they cannot have opposite parity because their square sum would be odd. Thus Ψ(u,v) has integer coordinates, and their squared sum is (u2+v2)/2=m.

givenF1algebra
2.1

Direct substitution gives Ψ(Φ(x,y))=(x,y) and Φ(Ψ(u,v))=(u,v).

step 1.1step 1.2algebra
2.2

Suppose (x,y) is primitive and a common divisor greater than 1 divides both coordinates of Φ(x,y). By [L1] it has a prime divisor . Since x+y and xy are odd, is odd; because divides 2x and 2y, [L2] gives x and y, contradicting primitivity. Hence Φ(x,y) is primitive.

step 1.1F2L1L2algebra
2.3

Suppose (u,v) is primitive and a common divisor greater than 1 divides both coordinates of Ψ(u,v). A prime divisor supplied by [L1] then divides their sum u and difference v, contradicting primitivity. Hence Ψ(u,v) is primitive.

step 1.2F2L1algebra
3.1

The mutually inverse maps of step 2.1 give the first bijection, and steps 2.2 and 2.3 show that they restrict to mutually inverse maps on primitive representations.

step 2.1step 2.2step 2.3F1
LemmaStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

A prime congruent to 3 modulo 4 divides both coordinates of a divisible two-square sum

Statement

If q3(mod4) is prime and qx2+y2, then qx and qy. Consequently q2x2+y2.

Facts & Assumptions

Given: A prime q3(mod4) and integers x,y such that qx2+y2.

[F1]

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)Z2 such that n=x2+y2 (Representations and primitive representations as sums of two squares).

[L1]

For an odd prime p, (1/p)=1 if and only if p1(mod4), while (1/p)=1 if and only if p3(mod4) (First supplement: (1/p)=(1)(p1)/2).

[F2]

For an odd prime p, the Legendre symbol is 0 when p divides the numerator, 1 when its nonzero class is a square, and 1 otherwise (The Legendre symbol, including its zero value).

[L2]

For every prime p, addition and multiplication make Z/p a field (For every prime p, the two operations on Z/p make it a field).

[L3]

If a prime p divides ab, then pa or pb (Euclid's lemma: if p is prime and pab then pa or pb).

[F3]

The congruence ab(modn) means that n(ab) (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1).

Proof

technique · direct
1.1

The divisibility hypothesis is the congruence x2+y20(modq).

givenF1F3
2.1

If qy, then step 1.1 gives qx2, so [L3] gives qx; the same argument with the coordinates interchanged handles qx.

step 1.1L3algebra
2.2

If neither coordinate were divisible by q, the nonzero class of y would be invertible in the field Z/q, and step 1.1 would give (xy1)2=1. Thus 1 would be a nonzero quadratic residue and (1/q)=1.

step 1.1L2F2F3algebra
3.1

Since q3(mod4), [L1] instead gives (1/q)=1, contradicting step 2.2.

step 2.2L1F2given
4.1

Hence at least one coordinate is divisible by q, and step 2.1 makes both divisible by q. Writing x=qx0 and y=qy0 gives x2+y2=q2(x02+y02).

step 2.1step 3.1algebra
PropositionStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Every nonzero residue modulo an odd prime is a sum of two squares

Statement

Let p be an odd prime and let aZ with pa. Then there are integers x,y such that

x2+y2a(modp).

Facts & Assumptions

Given: An odd prime p and a nonzero class [a]Z/p.

[L1]

For an odd prime p, exactly (p1)/2 nonzero classes are quadratic residues modulo p (An odd prime has (p1)/2 nonzero quadratic residues and as many nonresidues).

[L4]

A subset of a finite set is finite and has cardinality at most that of the ambient set (A subset of a finite set is finite, with BA, and equality holds if and only if B=A).

[L5]

For every nN, (Z/n,+,[0]n) is an abelian group, and multiplication distributes over addition on both sides (For every natural n, (Z/n,+) is an abelian group, multiplication is a commutative monoid operation, and both distributive laws hold).

Proof

technique · contradiction
1.1

Let Q be the set of all square classes in Z/p, including zero. By [L1], Q=(p+1)/2.

givenL1algebra
2.1

Translation and negation are bijections of the additive group, so aQ:={az:zQ} also has (p+1)/2 elements.

step 1.1L5algebraconstruct
3.1

Suppose, for contradiction, that Q and aQ are disjoint. Then [L3] gives Q(aQ)=(p+1)/2+(p+1)/2=p+1.

step 1.1step 2.1L3assume-contraalgebra
4.1

But Q(aQ)Z/p, so [L2] and [L4] give Q(aQ)p, contradicting step 3.1.

step 3.1L2L4algebra
5.1

Choose zQ(aQ). Write z=[x2] and z=[ay2] for integers x,y. Then [x2+y2]=[a] by [L5], which is the required congruence.

step 4.1L5choosealgebradischarge-contradiction
LemmaStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Thue's lemma on small nonzero representatives

Statement

Let p be a prime and let aZ with pa. Then there are nonzero integers r,s with r,s<p and ras(modp).

Facts & Assumptions

Given: A prime p and an integer a with pa.

[L1]

Every nonempty finite subset of R has a maximum and a minimum (Every nonempty finite set of reals has a maximum and a minimum).

[L2]

Every nonnegative real t has a unique nonnegative square root t whose square is t (Square roots exist: a unique a0 with (a)2=a; the positives are {x2:x0}).

[L5]

If a map from a finite set A to a finite set B has A>B, then some fibre contains more than one element (If A>kB then every f:AB has a fibre with more than k elements, and for nonempty B some fibre has at least A/B elements).

[L6]

If a prime p divides uv, then pu or pv (Euclid's lemma: if p is prime and pab then pa or pb).

[F1]

The congruence uv(modn) means that n(uv) (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1).

Proof

technique · direct
1.1

The set H:={kN:kp and k2<p} is finite and contains 0, so [L1] gives its largest element h.

givenL1construct
2.1

One has (h+1)2>p: a strict inequality in the other direction would put h+1 in H, while equality would factor the prime p as (h+1)(h+1) with 1<h+1<p. Also h2<p=(p)2, so h<p by nonnegativity and [L2].

step 1.1L2givenalgebra
3.1

Put I:={0,1,,h}. Then [L3] gives I×I=(h+1)2>p=Z/p by step 2.1 and [L4].

step 2.1L3L4algebra
4.1

Apply [L5] to (i,j)[iaj]p. Distinct pairs (i,j),(i,j)I×I have the same image. With r=ii and s=jj, this says ras(modp).

step 3.1L5F1construct
5.1

The coordinate bounds give r,sh<p.

step 4.1step 2.1F1L2algebra
6.1

If r=0, then [F1] gives ps; the bound s<p<p forces s=0, contrary to distinctness. If s=0, then pra; [L6] and pa give pr, and the same bound forces r=0, again a contradiction.

step 5.1L6F1givenalgebra
7.1

Thus the integers r,s from step 4.1 are both nonzero, satisfy ras(modp), and obey the required strict bounds.

step 4.1step 5.1step 6.1
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Fermat's two-square theorem for primes

Statement

A prime p is a sum of two integer squares if and only if p=2 or p1(mod4) (Representations and primitive representations as sums of two squares).

Facts & Assumptions

Given: A prime p.

[F1]

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)Z2 such that n=x2+y2 (Representations and primitive representations as sums of two squares).

[L1]

If p is prime, pa, then there are nonzero integers r,s with r,s<p and ras(modp) (Thue's lemma on small nonzero representatives).

[L2]

For an odd prime p, (1/p)=1 if and only if p1(mod4) (First supplement: (1/p)=(1)(p1)/2).

[F2]

For an odd prime p, (a/p)=1 means that pa and a is a quadratic residue modulo p (The Legendre symbol, including its zero value).

[F3]

The congruence ab(modn) means that n(ab) (Congruence modulo an integer: ab(modn) when n(ab), including the moduli 0 and 1).

Proof

technique · direct
1.1

If an odd prime satisfies p=x2+y2, the square residues modulo 4 show that x,y have opposite parity and hence p1(mod4).

givenF1algebra
1.2

The remaining even prime has the representation 2=12+12.

F1algebra
1.3

For the converse direction, suppose p1(mod4). Then p is odd, and [L2] and [F2] provide an integer a with a21(modp) and pa.

givenL2F2F3choose
2.1

Apply [L1] to this a to obtain nonzero integers r,s with r,s<p and ras(modp).

step 1.3L1F3
3.1

Squaring the congruence in step 2.1 and using a21 gives pr2+s2. Moreover 0<r2+s2<p+p=2p. The only positive multiple of p below 2p is p, so p=r2+s2.

step 1.3step 2.1F1F3algebra
4.1

Step 1.1 proves necessity for odd primes, step 1.2 handles p=2, and step 3.1 proves sufficiency when p1(mod4).

step 1.1step 1.2step 3.1
LemmaStatement: AI-adaptedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Two essentially different two-square representations factor an odd integer

Statement

Let N be odd and suppose

N=x2+y2=u2+v2,

where x,u are positive odd integers, y,v are positive even integers, and 0<x<u. Then 0<v<y, and two essentially different normalized representations force a factorisation N=PQ with P,Q>1. More precisely, there are positive integers e,f,g,h such that

x=egfh,y=fg+eh,u=eg+fh,v=fgeh,

and N=(e2+f2)(g2+h2).

Facts & Assumptions

Given: The two normalized representations and inequalities in the Statement.

[L1]

For all integers a,b,c,d, (a2+b2)(c2+d2)=(acbd)2+(ad+bc)2=(ac+bd)2+(adbc)2 (The Brahmagupta–Fibonacci two-square identity).

[F1]

An integer d is a common divisor of a and b when da and db (Common divisor, and the greatest common divisor gcd(a,b), with the convention gcd(0,0):=0).

Proof

technique · direct
1.1

Since u2x2=y2v2>0, one has 0<v<y, and (ux)(u+x)=(yv)(y+v). All four factors are positive and even, so with A=(u+x)/2, B=(ux)/2, C=(y+v)/2, and D=(yv)/2 one has AB=CD.

givenalgebra
2.1

Let g=gcd(A,C) and write A=eg, C=fg. Positivity gives e,f,g>0, and gcd(e,f)=1, since a common divisor greater than one would make a common divisor of A,C larger than g.

step 1.1F1choose
3.1

The equality AB=CD becomes eB=fD. Since gcd(e,f)=1, [L2] gives eD and fB; write D=eh and B=fh with h>0.

step 1.1step 2.1L2algebra
4.1

From A=eg, B=fh, C=fg, and D=eh one obtains u=A+B=eg+fh, x=AB=egfh, y=C+D=fg+eh, and v=CD=fgeh.

step 2.1step 3.1algebra
5.1

By [L1], (e2+f2)(g2+h2)=(eg+fh)2+(fgeh)2=u2+v2=N. Each factor exceeds one because all four entries are positive.

step 4.1L1algebra
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

A prime congruent to 1 modulo 4 has one two-square representation up to signs and order

Statement

Let p1(mod4) be prime. There are unique positive integers x,y with x odd, y even, and

p=x2+y2.

Every ordered signed representation of p is obtained from this pair by changing signs and interchanging coordinates (Representations and primitive representations as sums of two squares).

Facts & Assumptions

Given: A prime p1(mod4).

[F1]

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)Z2 such that n=x2+y2 (Representations and primitive representations as sums of two squares).

[L1]

A prime p is a sum of two integer squares if and only if p=2 or p1(mod4) (Fermat's two-square theorem for primes).

[L2]

For an odd integer, two essentially different normalized representations force a factorisation N=PQ with P,Q>1 (Two essentially different two-square representations factor an odd integer).

Proof

technique · direct
1.1

By [L1], choose integers a,b with p=a2+b2.

givenL1F1choose
1.2

Neither coordinate is zero, since a prime cannot be a square of an integer greater than one. Since p is odd, exactly one coordinate is odd: two odd squares sum to 2 modulo 4, and two even squares give an even sum. Changing signs and interchanging coordinates therefore turns every representation into a positive normalized one.

givenF1algebra
2.1

If two normalized representations differed, their positive odd coordinates would differ; order them as 0<x<u and apply [L2]. This would write the prime p as a product of two integers greater than one, a contradiction. Hence the normalized representation is unique.

step 1.2L2given
3.1

Step 1.1 supplies the normalized pair, step 2.1 makes it unique, and undoing the sign changes and interchange in step 1.2 gives all ordered signed representations and no others.

step 1.1step 1.2step 2.1F1algebra
LemmaStatement: AI-adaptedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Prime powers represented as sums of two squares

Statement

Every power of 2 and every power of a prime p1(mod4) is a sum of two squares; a power of a prime q3(mod4) is representable exactly when its exponent is even. The exponent ranges over all of N, including zero.

Facts & Assumptions

Given: A prime and a natural exponent.

[F1]

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)Z2 such that n=x2+y2 (Representations and primitive representations as sums of two squares).

[L1]

The product of two nonnegative integers representable as sums of two squares is again representable as a sum of two squares (Sums of two squares are closed under products).

[L2]

If q3(mod4) is prime and qx2+y2, then qx and qy (A prime congruent to 3 modulo 4 divides both coordinates of a divisible two-square sum).

[L3]

A prime p is a sum of two integer squares if and only if p=2 or p1(mod4) (Fermat's two-square theorem for primes).

[L4]

If a property holds at 0 and passes from n to n+1, it holds for every nN (The principle of mathematical induction).

Proof

technique · direct
1.1

For every prime , the exponent-zero power is 0=1=12+02.

F1basealgebra
1.2

If q3(mod4), every even power has the explicit representation q2j=(qj)2+02.

F1constructalgebra
1.3

If q2j+1=x2+y2, then [L2] gives x=qx1 and y=qy1, so q2j1=x12+y12 when j1; at j=0, the same divisibility would make q2 divide q, which is impossible. Induction on j repeatedly reduces any alleged odd-exponent representation to that impossible base case.

F1L2L4algebradischarge-induction
2.1

The prime 2 and every prime p1(mod4) are represented by [L3]. Multiplying an induction-stage representation by the prime representation and using [L1] gives one for the next power, so [L4] represents all their natural powers.

step 1.1L1L3L4discharge-induction
3.1

Steps 1.1 and 2.1 handle 2 and primes congruent to one modulo four, while steps 1.2 and 1.3 prove both directions for primes congruent to three modulo four.

step 1.1step 2.1step 1.2step 1.3
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-24Open item page →

Characterisation of positive integers that are sums of two squares

Statement

A positive integer n is a sum of two squares if and only if every prime q3(mod4) occurs to an even exponent in its canonical prime factorisation.

Facts & Assumptions

Given: A positive integer n.

[F1]

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)Z2 such that n=x2+y2 (Representations and primitive representations as sums of two squares).

[L1]

The product of two nonnegative integers representable as sums of two squares is again representable as a sum of two squares (Sums of two squares are closed under products).

[L2]

If q3(mod4) is prime and qx2+y2, then qx and qy (A prime congruent to 3 modulo 4 divides both coordinates of a divisible two-square sum).

[L3]

Every power of 2 and every power of a prime p1(mod4) is a sum of two squares; a power of q3(mod4) is representable exactly when its exponent is even (Prime powers represented as sums of two squares).

[L7]

If a property holds at 0 and passes from j to j+1, it holds for every jN (The principle of mathematical induction).

Proof

technique · direct
1.1

For the reverse direction at n=1, the canonical factorisation is empty and (1,0) represents 1.

givenF1L4algebra
1.2

For the reverse direction at n>1, assume every three-mod-four prime has even valuation. By [L3], every prime-power factor in [L4] is representable.

givenL3L4
1.3

For the forward direction, suppose n=x2+y2 and let q3(mod4) divide n. By [L2], x=qx1 and y=qy1, so n=q2n1 with n1=x12+y12.

givenF1L2algebra
2.1

Repeatedly applying [L1] to the finite list of factors from step 1.2 gives a representation of their product n; step 1.1 supplies the empty-list case.

step 1.1step 1.2L1F1algebra
2.2

By [L5] and [L6], step 1.3 lowers the q-adic valuation by exactly two: vq(n1)=vq(n)2.

step 1.3L5L6algebra
3.1

If vq(n) were odd, induction on the number of two-step reductions in steps 1.3 and 2.2 would eventually give a represented integer of q-valuation one. Applying step 1.3 once more would make its valuation at least two, a contradiction. Thus vq(n) is even.

step 1.3step 2.2L7discharge-induction
4.1

Steps 2.1 and 3.1 prove the reverse and forward directions, respectively.

step 2.1step 3.1
LemmaStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Coprime primitively represented factors have a primitive product representation

Statement

If P=a2+b2 and Q=c2+d2 are primitive representations with gcd(P,Q)=1, then the Brahmagupta–Fibonacci construction gives a primitive representation of PQ. In particular, (acbd,ad+bc) is primitive.

Facts & Assumptions

Given: Primitive representations P=a2+b2, Q=c2+d2, with gcd(P,Q)=1.

[F1]

A two-square representation is primitive when its coordinate gcd is 1 (Representations and primitive representations as sums of two squares).

[L1]

For all integers a,b,c,d, (a2+b2)(c2+d2)=(acbd)2+(ad+bc)2=(ac+bd)2+(adbc)2 (The Brahmagupta–Fibonacci two-square identity).

[F2]

An integer d is a common divisor of a and b when da and db (Common divisor, and the greatest common divisor gcd(a,b), with the convention gcd(0,0):=0).

[L3]

If a prime divides uv, then u or v (Euclid's lemma: if p is prime and pab then pa or pb).

Proof

technique · contradiction
1.1

Put X=acbd and Y=ad+bc. By [L1], X2+Y2=PQ.

givenF1L1construct
1.2

Suppose, for contradiction, that (X,Y) is not primitive. Its positive gcd then exceeds one, so choose by [L2] a prime dividing both X and Y.

F2L2assume-contrachoose
2.1

The combinations aX+bY=cP and aYbX=dP are divisible by . Since (c,d) is primitive, cannot divide both; applying [L3] to the combination with coefficient not divisible by gives P.

step 1.2F1L3algebra
2.2

Similarly, cX+dY=aQ and cYdX=bQ. Primitivity of (a,b) and [L3] give Q.

step 1.2F1L3algebra
3.1

Steps 2.1 and 2.2 contradict gcd(P,Q)=1. Hence (X,Y) is primitive and, by step 1.1, primitively represents PQ.

step 1.1step 2.1step 2.2F1F2discharge-contradiction
LemmaStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-24Open item page →

Powers of primes congruent to 1 modulo 4 have primitive two-square representations

Statement

Every natural power of a prime congruent to 1 modulo 4 has a primitive two-square representation.

Facts & Assumptions

Given: A prime p1(mod4) and an exponent eN.

[F1]

A two-square representation is primitive when its coordinate gcd is 1 (Representations and primitive representations as sums of two squares).

[L1]

For all integers a,b,c,d, (a2+b2)(c2+d2)=(acbd)2+(ad+bc)2=(ac+bd)2+(adbc)2 (The Brahmagupta–Fibonacci two-square identity).

[L2]

A prime p is a sum of two integer squares if and only if p=2 or p1(mod4) (Fermat's two-square theorem for primes).

[L4]

If a prime divides uv, then u or v (Euclid's lemma: if p is prime and pab then pa or pb).

[L5]

If a property holds at 0 and passes from e to e+1, it holds for every eN (The principle of mathematical induction).

Proof

technique · induction
1.1

The pair (1,0) primitively represents p0=1.

F1basealgebra
1.2

By [L2], choose a,b with p=a2+b2. Neither coordinate is zero, and divisibility of either coordinate by p would force divisibility of the other and then p2p; in particular p divides neither coordinate. Any common prime divisor would have square dividing p, so (a,b) is primitive; the coordinates have opposite parity because p is odd.

givenL2F1choosealgebra
2.1

Assume pe=x2+y2 primitively. The two sign variants in [L1] give representations of pe+1 with coordinate pairs (axby,ay+bx) and (ax+by,aybx).

ihstep 1.2F1L1construct
3.1

If a prime divides both coordinates of either candidate, then 2pe+1 by step 2.1. The uniqueness of prime exponents in [L6], or [L4] iterated through the power, forces =p.

step 2.1L3L4L6algebra
3.2

If both candidates were coordinatewise divisible by p, their sums and differences would show that p divides 2ax,2ay,2bx,2by. Since p is odd and neither a nor b is divisible by p, [L4] would give px and py, contradicting the induction hypothesis.

step 2.1step 1.2L4ihalgebra
4.1

Thus at least one candidate has no common prime divisor; by [L3] its coordinate gcd cannot exceed one, so it is primitive. Step 1.1 and [L5] complete the induction.

step 1.1step 3.1step 3.2L3F1L5discharge-induction
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Characterisation of primitive sums of two squares

Statement

A positive integer n has a primitive two-square representation if and only if v2(n)1 and no prime q3(mod4) divides n.

Facts & Assumptions

Given: A positive integer n.

[F1]

A two-square representation is primitive when its coordinate gcd is 1 (Representations and primitive representations as sums of two squares).

[L1]

If q3(mod4) is prime and qx2+y2, then qx and qy (A prime congruent to 3 modulo 4 divides both coordinates of a divisible two-square sum).

[L2]

If P=a2+b2 and Q=c2+d2 are primitive representations with gcd(P,Q)=1, then the Brahmagupta–Fibonacci construction gives a primitive representation of PQ (Coprime primitively represented factors have a primitive product representation).

[L3]

Every natural power of a prime congruent to 1 modulo 4 has a primitive two-square representation (Powers of primes congruent to 1 modulo 4 have primitive two-square representations).

[L5]

For a prime p and a nonzero integer n, and every kN: pkn if and only if kvp(n); in particular vp(n)1 if and only if pn (For a prime p and a nonzero integer a: pvp(a)a and pvp(a)+1a; pka holds exactly for kvp(a); vp(a)1 exactly when pa; vp(1)=vp(1)=0; and vp(p)=1).

[L6]

For a finite pairwise-coprime list with partial products Pk, one has gcd(Pk,nj)=1 whenever kj (For a finite pairwise-coprime list of positive integers, the product divides every common multiple, and each initial product is coprime to every remaining modulus).

[L7]

If a prime p divides ab, then pa or pb (Euclid's lemma: if p is prime and pab then pa or pb).

[L8]

If a property holds at 0 and passes from j to j+1, it holds for every jN (The principle of mathematical induction).

Proof

technique · direct
1.1

For the forward direction, if n=x2+y2 primitively and a prime q3(mod4) divided n, [L1] would make q divide both coordinates, contrary to [F1].

givenF1L1
1.2

Squares modulo 4 show that 4x2+y2 forces both x and y even. Thus a primitive representation has 4n, and the divisibility clause of [L5] at p=2, k=2 makes that equivalent to v2(n)1.

F1L5algebra
1.3

For the reverse direction, assume the two stated prime conditions. In [L4], no three-mod-four prime occurs, the factor 2 occurs with exponent at most one, and all remaining nontrivial factors are powers of distinct primes congruent to one modulo four. The factors are pairwise coprime by uniqueness and [L7].

givenL4L5L7algebra
2.1

The possible factor 2 has the primitive representation (1,1), and every one-mod-four prime power has a primitive representation by [L3].

step 1.3L3F1construct
3.1

Combine these pairwise-coprime primitive representations one at a time using [L2]. The partial product is coprime to the next factor by [L6], so [L8] completes the finite induction. If the factor list is empty, n=1 and (1,0) is primitive.

step 1.3step 2.1L2L6L8F1discharge-induction
4.1

Steps 1.1 and 1.2 prove necessity, while step 3.1 proves sufficiency.

step 1.1step 1.2step 3.1
CorollaryStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Primitive sums of two squares are closed under products unless both factors are even

Statement

Let m,n be positive integers that have primitive two-square representations. If m and n are not both even, then mn has a primitive two-square representation.

Facts & Assumptions

Given: Positive primitively represented integers m,n.

[L1]

A positive integer n has a primitive two-square representation if and only if v2(n)1 and no prime q3(mod4) divides n (Characterisation of primitive sums of two squares).

Proof

technique · direct
1.1

By [L1] and [L3], every prime congruent to three modulo four has valuation zero in each factor. By [L2], its valuation in the product is zero, so [L3] shows that it does not divide the product.

givenL1L2L3
1.2

Again by [L1]–[L3], v2(mn)=v2(m)+v2(n)1 because at least one of m,n is odd and therefore has 2-adic valuation zero.

givenL1L2L3algebra
2.1

The two conditions in [L1] hold for mn, so the product has a primitive two-square representation.

step 1.1step 1.2L1
CorollaryStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Divisors greater than one of primitively represented integers are primitively represented

Statement

If a positive integer n has a primitive two-square representation and d>1 divides n, then d has a primitive two-square representation.

Facts & Assumptions

Given: A primitively represented positive integer n and a divisor d>1 of n.

[L1]

A positive integer n has a primitive two-square representation if and only if v2(n)1 and no prime q3(mod4) divides n (Characterisation of primitive sums of two squares).

Proof

technique · direct
1.1

Since dn, the divisibility criterion in [L2] gives vp(d)vp(n) for every prime p. Thus v2(d)1, and no three-mod-four prime can divide d, because none divides n by [L1].

givenL1L2
2.1

The two inherited conditions in step 1.1 satisfy [L1], so d has a primitive two-square representation.

step 1.1L1
CorollaryStatement: AI-adaptedProof: AI-generatedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Squarefree sums of two squares

Statement

A squarefree positive integer is a sum of two squares if and only if none of its odd prime factors is congruent to 3 modulo 4; every such representation is primitive.

Facts & Assumptions

Given: A squarefree positive integer n.

[F1]

A positive integer n is squarefree if no square of a prime divides n; equivalently, every exponent in its canonical prime factorisation is 0 or 1 (Squarefree positive integers).

[L1]

A positive integer n is a sum of two squares if and only if every prime q3(mod4) occurs to an even exponent in its canonical prime factorisation (Characterisation of positive integers that are sums of two squares).

[L2]

A positive integer n has a primitive two-square representation if and only if v2(n)1 and no prime q3(mod4) divides n (Characterisation of primitive sums of two squares).

[F2]

An integer d is a common divisor of a and b when da and db (Common divisor, and the greatest common divisor gcd(a,b), with the convention gcd(0,0):=0).

[L4]

If a prime p divides ab, then pa or pb (Euclid's lemma: if p is prime and pab then pa or pb).

Proof

technique · direct
1.1

By [F1], every prime exponent of n is zero or one. Consequently the even-exponent condition in [L1] for a prime congruent to three modulo four is equivalent to that prime not dividing n.

F1L1algebra
1.2

To see that every representation is primitive, suppose n=x2+y2 and gcd(x,y)>1. By [L3] choose a prime dividing the gcd. Then x and y by [F2], so 2n, contradicting [F1].

F1F2L3L4assume-contraalgebradischarge-contradiction
2.1

Squarefreeness also gives v2(n)1, so the same exclusion of three-mod-four primes satisfies [L2] and yields a primitive representation whenever n is represented.

step 1.1L2F1
3.1

Step 1.1 proves the representation criterion, step 2.1 supplies primitivity under that criterion, and step 1.2 shows that every representation has it.

step 1.1step 2.1step 1.2

5 · Examples, counterexamples and false statements

None yet.

Sources