Alphabeta Math
TheoremStatement: Literature-sourcedProof: AI-adaptedSession-authored (Fable 5 assisted)precheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24
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.

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

Depends on

Used by

Dependency tree · two levels

16 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.

Sources