Alphabeta Math
LemmaStatement: AI-adaptedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-26
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.

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: d∣a when a=dq for some integer q). Let x∈Z. Then x2 is congruent to 0, to 1 or to 4 modulo 8 (Congruence modulo an integer: a≡b(modn) when n∣(a−b), including the moduli 0 and 1). More precisely, if x is odd then x2≡1(mod8), and if x is even then x2≡0(mod8) or x2≡4(mod8).

Consequently, if x is odd then x2≡1(mod4), and if x is even then x2≡0(mod4).

Facts & Assumptions

Given: An integer x.

[F1]

For a,b,n∈Z, a≡b(modn) means n∣(a−b) (Congruence modulo an integer: a≡b(modn) when n∣(a−b), including the moduli 0 and 1).

[F2]

For d,a∈Z, d∣a means a=dq for some q∈Z (Divisibility in Z: d∣a when a=dq for some integer q).

[L1]

For a,b∈Z with b≠0 there is exactly one pair (q,r) of integers with a=qb+r and 0≤r<∣b∣; moreover b∣a holds exactly when r=0 (Division with remainder for any nonzero divisor: for a∈Z and b≠0 there are unique q,r∈Z with a=qb+r and 0≤r<∣b∣).

[L2]

Let a be odd. For k≥3, the congruence x2≡a(mod2k) is soluble if and only if a≡1(mod8) (Unit square criterion and root count modulo powers of two).

Proof

technique · cases
1.1givenL1algebra

By [L1] with b=2 there is exactly one pair (q,r) with x=2q+r and 0≤r<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.

1.2assume-case oddL2F1algebra

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

1.3assume-case evenL1algebra

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.

2.1step 1.3assume-case uevenF1F2algebra

If u=2v then x2=16v2=8⋅2v2, so 8∣x2−0 and x2≡0(mod8).

2.2step 1.3assume-case uoddF1F2algebra

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

3.1step 1.2step 2.1step 2.2algebra

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.

4.1step 3.1step 1.2step 2.1step 2.2L3F1F2cases-exhaustive∎

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

Remarks

Where the odd case comes from. The published criterion Unit square criterion and root count modulo powers of two says that for k≥3 an odd a is a square modulo 2k exactly when a≡1(mod8). Reading it at k=3 in the direction "soluble implies a≡1(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.

Depends on

Used by

Dependency tree · two levels

14 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