Definition
The characterization that a prime p can be expressed as a sum of two integer squares precisely when p = 2 or p ≡ 1 (mod 4); extended to integers: an integer n is a sum of two squares iff every prime congruent to 3 (mod 4) appears with even exponent in n's prime factorization.

Principle

Principle
The organizing principle is the correspondence between representations by norms in the Gaussian integers and congruence conditions on prime factors: factorization in Z[i] and parity of exponents control representability as x^2 + y^2.

Demonstration

Demonstration
Concrete example: the prime 5 satisfies 5 ≡ 1 (mod 4) and 5 = 1^2 + 2^2; by contrast the prime 3 (≡ 3 mod 4) cannot be written as a sum of two integer squares.

Misapplication

Misapplication
A plausible misuse is to assume that p ≡ 1 (mod 4) gives a unique representation up to order and sign; while representations are constrained, uniqueness does not follow without further conditions, and composites require the exponent parity test.

Consequence

Consequence
Correct application classifies sums-of-two-squares among integers, enabling explicit construction of representations using Gaussian integer factorization and informing problems in arithmetic geometry and quadratic forms.

Reversal

Reversal
The reversal emphasizes primes p ≡ 3 (mod 4), which cannot be expressed as a sum of two squares; flipping the congruence condition shows the sharp dichotomy at modulus 4.

Boundary

Boundary
Scope: statements concern integer sums of integer squares; they exclude rational or algebraic-square decompositions without conversion, and require standard prime factorization over Z for the integer criterion.

Semantic Tension

Semantic Tension
Tension exists with broader sums-of-powers problems (e.g., Waring's problem) and with representations by other quadratic forms; the two-squares theorem is specific to the form x^2 + y^2 and to Gaussian integer techniques.

Synthesis

Synthesis
Fermat's Two-Squares Theorem links a simple congruence condition modulo 4 and parity in prime exponents to a norm-representation in Z[i]: primes and integers are representable as sums of two squares exactly when their factorization meets the theorem's modular and parity constraints.