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 · 8 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 6 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.

Quadratic Residues and the Legendre Symbol

1 · Prerequisites

2 · Summary

For a prime modulus, the nonzero residue classes form a cyclic unit group of order p-1. Congruence and quotient-ring algebra translate integer equations into equations in that group, while the power-congruence criterion counts their roots and the polynomial root bound controls equations over the field of prime residue classes. These facts make squaring a finite group operation whose image can be studied without choosing representatives.

A unit is a quadratic residue when its class is a square, and for an odd prime the square classes form an index-two subgroup. The Legendre symbol extends this dichotomy by a separate zero value, becomes the unique nontrivial sign character on the unit group, and satisfies Euler's criterion and multiplicativity. Exact solution counts follow for quadratic and general quadratic congruences. A signed permutation of the prime half-system yields Gauss's lemma, from which the formula for (2/p) follows; Euler's criterion gives the corresponding formula for (-1/p).

3 · Logical flowchart

4 · Definitions, theorems and proofs

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

Quadratic residues and nonresidues modulo an integer

Definition

Let n2 and let aZ satisfy gcd(a,n)=1. The integer a is a quadratic residue modulo n if there is an integer x with

x2a(modn),

and otherwise it is a quadratic nonresidue modulo n.

By For n1, [a]n is a unit if and only if gcd(a,n)=1, the coprimality hypothesis says that [a]n is a unit. Thus the terms quadratic residue and quadratic nonresidue here apply only to unit classes; a nonunit target belongs to neither class.

PropositionStatement: AI-adaptedProof: AI-adaptedprecheck passaudited 2026-08-16Open item page →

Quadratic residuosity is representative-independent and the residues are the image of squaring

Statement

Let n2. Whether an integer a with gcd(a,n)=1 is a quadratic residue modulo n depends only on its class [a]n. Moreover, the quadratic-residue classes are exactly

{u2:u(Z/n)×},

the image of squaring on the unit group.

Facts & Assumptions

Given: An integer n2 and integers representing unit classes modulo n.

[L1]

For gcd(a,n)=1, the integer a is a quadratic residue modulo n exactly when some integer x satisfies x2a(modn) (Quadratic residues and nonresidues modulo an integer).

[L2]

Two classes in Z/n are equal exactly when their representatives are congruent modulo n (The congruence class [a]n and the quotient set Z/n).

[L3]

The class [a]n is a unit exactly when gcd(a,n)=1, and this condition depends only on the class (For n1, [a]n is a unit if and only if gcd(a,n)=1).

[L4]

A class uZ/n is a unit exactly when some vZ/n satisfies uv=[1]n (The unit group (Z/n)× and Euler's totient φ(n)=(Z/n)× for n1).

Proof

technique · direct
1.1

If ab(modn) and x2a(modn), then [x]n2=[a]n=[b]n, so x2b(modn); reversing the roles of a and b gives the converse.

L1L2given
2.1

By [L3], congruent representatives are simultaneously units. If [x]n2=[a]n and [a]n is a unit with inverse v, then [x]n([x]nv)=[x]n2v=[1]n, so [x]n is a unit. Thus every quadratic-residue class lies in the image of squaring on (Z/n)×.

L3L4L5step 1.1
3.1

Conversely, let u=[x]n be a unit with u2=[a]n. By [L4] there is v with uv=[1]n, so u2v2=[1]n by [L5] and [a]n=u2 is itself a unit; [L3] then gives gcd(a,n)=1, which is the hypothesis [L1] requires. Since [x]n2=[a]n, [L2] gives x2a(modn), so [L1] makes a a quadratic residue. Hence the quadratic-residue classes are exactly the displayed image.

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

A coprime exponent gives a unique nonzero k-th root modulo a prime

Statement

Let p be prime, let k1, and let aZ satisfy pa and gcd(k,p1)=1. Then xka(modp) has a unique nonzero solution class. If 0 and

k1(modp1),

then that class is [a]p; the formula is independent of the chosen nonnegative representative of the inverse class.

Facts & Assumptions

Given: A prime p, an integer k1, and aZ with pa and gcd(k,p1)=1.

[L1]

If n1 admits a primitive root, gcd(a,n)=1, m1, and d=gcd(m,φ(n)), then xma(modn) is solvable if and only if aφ(n)/d1(modn) (Euler's criterion: if n has a primitive root, gcd(a,n)=1, and m1, then xma(modn) is solvable if and only if aφ(n)/gcd(φ(n),m)1(modn)).

[L2]

Every prime admits a primitive root modulo that prime (Every prime modulus admits a primitive root).

[L3]

For every prime p, φ(p)=p1 (φ(1)=1, and φ(p)=p1 for every prime p).

[L4]

Under the hypotheses of [L1], a soluble congruence xma(modn) has exactly gcd(φ(n),m) solution classes (If n has a primitive root, gcd(a,n)=1, m1, and xma(modn) is solvable, then it has exactly gcd(φ(n),m) solution classes modulo n).

[L5]

For u,vZ and n1, the congruence uyv(modn) is soluble exactly when gcd(u,n) divides v, and then it has exactly gcd(u,n) solution classes (For n1, axb(modn) is solvable exactly when gcd(a,n)b, and then has exactly gcd(a,n) solution classes modulo n).

Proof

technique · direct
1.1

By [L7], gcd(a,p)=1. Facts [L2] and [L3] specialise [L1] to modulus p, while gcd(k,p1)=1 reduces its test to ap11(modp), which holds by [L6]. Thus the root congruence is soluble.

L1L2L3L6L7given
2.1

Applying [L4] with n=p and m=k gives exactly gcd(p1,k)=1 solution class, so the root is unique. It is nonzero because a zero root would give xk0(modp), contrary to pa.

L2L3L4step 1.1given
3.1

By [L5], the congruence k1(modp1) has one solution class and has nonnegative representatives. If p=2, every such a is odd, so it represents the sole unit class and hence the unique root from step 2.1. Suppose p is odd. For a nonnegative representative , the congruence forces >0, so k=1+t(p1) with t0; then [L6] gives (a)k=a1+t(p1)a(modp). Two nonnegative representatives differ by a multiple of p1; ordering them and applying [L6] to the nonnegative difference shows that their powers of a represent the same class.

L5L6L7step 2.1algebra
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-16Open item page →

The nonzero squares modulo an odd prime form an index-two subgroup

Statement

Let p be an odd prime. The nonzero quadratic-residue classes form the subgroup

((Z/p)×)2:={u2:u(Z/p)×}.

For every primitive root g modulo p, this subgroup is g2 and has index two in (Z/p)×.

Facts & Assumptions

Given: An odd prime p and the unit group G=(Z/p)×.

[L1]
[L2]

For a group element g, the subgroup g is exactly the set of all integer powers of g (g={gn:nZ}, and every cyclic group is abelian).

[L4]

The quadratic-residue classes modulo p are exactly the image of squaring on G (Quadratic residuosity is representative-independent and the residues are the image of squaring).

[L6]

For every integer t, there are unique integers q,r with t=2q+r and 0r<2 (Division with remainder in Z: for aZ and b>0 there are unique q,rZ with a=qb+r and 0r<b).

[L7]

The index [G:H] of a finite-index subgroup is the cardinality of its coset space G/H (The coset set G/H and the index [G:H] of a subgroup).

Proof

technique · direct
1.1

By [L1] and [L3], choose gG with G=g; then every uG is gt for some tZ by [L2].

L1L2L3choose
2.1

If u=gt, then u2=g2t by [L5], so every square lies in g2; conversely (g2)q=(gq)2, so every element of g2 is a square. By [L4], the quadratic-residue classes are therefore exactly g2.

L4L5L6step 1.1
3.1

Write each exponent as t=2q+r with r{0,1} by [L6]. Then gt lies in g2 when r=0 and in gg2 when r=1. These cosets are distinct: if g=g2q, then the order p1 of g would divide the odd integer 2q1, impossible because p1 is even. Hence there are exactly two cosets, so the subgroup has index two by [L7].

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

An odd prime has (p1)/2 nonzero quadratic residues and as many nonresidues

Statement

For an odd prime p, exactly (p1)/2 nonzero classes are quadratic residues modulo p, and exactly (p1)/2 are quadratic nonresidues. Each nonzero quadratic residue has exactly two square roots modulo p, while each nonresidue has none.

Facts & Assumptions

Given: An odd prime p.

[L1]

The nonzero quadratic-residue classes form the subgroup ((Z/p)×)2={u2:u(Z/p)×}, and this subgroup has index two in (Z/p)× (The nonzero squares modulo an odd prime form an index-two subgroup).

[L2]

If G is finite and HG, then G=[G:H]H (Lagrange's theorem: G=[G:H]H for every subgroup H of a finite group G).

[L3]

Under its primitive-root, coprimality, positivity, and solubility hypotheses, xma(modn) has exactly gcd(φ(n),m) solution classes (If n has a primitive root, gcd(a,n)=1, m1, and xma(modn) is solvable, then it has exactly gcd(φ(n),m) solution classes modulo n).

[L4]

Every prime admits a primitive root modulo that prime (Every prime modulus admits a primitive root).

[L5]

For every prime p, φ(p)=p1 (φ(1)=1, and φ(p)=p1 for every prime p).

[L6]

The group (Z/p)× is cyclic of order p1 (For every prime p, the multiplicative group (Z/pZ)× is cyclic).

Proof

technique · direct
1.1

Let Q={u2:uG} be the subgroup of nonzero square classes, which by [L1] is exactly the set of quadratic-residue classes. By [L1], [G:Q]=2 for G=(Z/p)×, and [L6] gives G=p1; hence [L2] gives Q=(p1)/2. Its complement in G has the same cardinality, and since [L1] identifies Q with the quadratic-residue classes, that complement consists exactly of the nonresidues.

L1L2L6given
1.2

If a represents a class in Q, then pa, so [L7] gives gcd(a,p)=1. Facts [L4] and [L5] discharge the prime specialisation of [L3], which gives gcd(p1,2)=2 roots because p is odd.

L3L4L5L7algebra
2.1

A nonresidue has no square root by the description of Q in [L1], while step 1.2 gives exactly two roots for each member of Q. Together with step 1.1, this proves all assertions.

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

The Legendre symbol, including its zero value

Definition

Let p be an odd prime and let aZ. The Legendre symbol is

(ap):={0,pa,1,pa and a is a quadratic residue modulo p,1,pa and a is a quadratic nonresidue modulo p.

The zero branch is separate from the quadratic residue and nonresidue branches of Quadratic residues and nonresidues modulo an integer, which apply only to unit numerators.

PropositionStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-16Open item page →

The Legendre symbol is well defined on residue classes

Statement

For every odd prime p, the Legendre symbol belongs to {1,0,1}, depends only on the numerator modulo p, and satisfies

(ap)=0pa.

Facts & Assumptions

Given: An odd prime p and integers a,b with ab(modp).

[L1]

The Legendre symbol is 0 on a numerator divisible by p, 1 on a quadratic residue modulo p, and 1 on a quadratic nonresidue (The Legendre symbol, including its zero value).

[L2]
[L3]

Quadratic residuosity of a unit integer depends only on its residue class (Quadratic residuosity is representative-independent and the residues are the image of squaring).

Proof

technique · direct
1.1

By [L2], p(ab), so pa exactly when pb. Thus congruent numerators enter the zero branch of [L1] simultaneously.

L1L2given
2.1

If pa, then also pb by step 1.1, and [L3] says that a and b are simultaneously quadratic residues or simultaneously nonresidues. Hence [L1] assigns them the same sign.

L1L3step 1.1
3.1

The three disjoint branches in [L1] give only the values 1,0,1; step 1.1 proves that divisibility gives value zero, and the two unit branches give nonzero values. Therefore the symbol is representative-independent and is zero exactly when p divides its numerator.

L1step 1.1step 2.1
PropositionStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-16Open item page →

On the units, the Legendre symbol is the unique nontrivial homomorphism to {±1}

Statement

Let p be an odd prime. Restricted to (Z/p)×, the Legendre symbol is the unique nontrivial homomorphism

χp:(Z/p)×{±1}.

It is surjective, and its kernel is the subgroup of nonzero square classes.

Facts & Assumptions

Given: An odd prime p, the unit group G=(Z/p)×, and the multiplicative group {±1}.

[L1]

On unit classes, the Legendre symbol takes values in {±1} and is representative-independent (The Legendre symbol is well defined on residue classes).

[L2]

The nonzero square classes form an index-two subgroup Q of G (The nonzero squares modulo an odd prime form an index-two subgroup).

[L3]

For a group homomorphism f:GH, kerf={g:f(g)=eH} and f is surjective exactly when its image is H (The kernel and image of a group homomorphism).

[L4]

A group homomorphism satisfies f(xy)=f(x)f(y) for every x,y in its domain (Monoid homomorphism and group homomorphism).

[L5]
[L7]

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

Proof

technique · direct
1.1

By [L2] the quadratic-residue classes are exactly the members of Q, so [L7] assigns the value 1 to every class in Q and, every unit class outside Q being a nonresidue, the value 1 to every class in the other coset; [L1] makes this independent of representatives. Thus its value-one set is exactly Q, and both values occur.

L1L2L3L7given
2.1

Choose hGQ, which is possible because [L2] gives index two. The two left cosets are Q and hQ, so every element outside Q has the form hq with qQ. The cyclic group G from [L5] is abelian, and h2 is a square, hence belongs to Q by [L2]. It follows that products from QQ, QhQ, and hQhQ lie respectively in Q, hQ, and Q. The corresponding signs multiply as 11=1, 1(1)=1, and (1)2=1. Hence χp(xy)=χp(x)χp(y), so [L4] makes χp a homomorphism; step 1.1 and [L3] give its kernel and surjectivity.

L2L3L4L5step 1.1choose
3.1

Choose a generator g of G by [L5]. Were gQ, every power of g would lie in the subgroup Q and so G=gQ, contradicting the index two of [L2]; hence gQ and step 1.1 gives χp(g)=1, so χp(gn)=(1)n by [L6]. If a homomorphism ψ:G{±1} sent g to 1, then [L6] would make ψ(gn)=1 for every integer n, so ψ would be trivial. Every nontrivial ψ therefore sends g to 1, and [L6] gives ψ(gn)=(1)n=χp(gn) for every n. Since g generates G, ψ=χp.

L2L5L6step 1.1step 2.1choose
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-16Open item page →

Euler's criterion: (a/p)a(p1)/2(modp)

Statement

For every integer a and odd prime p,

(ap)a(p1)/2(modp).

Facts & Assumptions

Given: An integer a and an odd prime p.

[L1]

The Legendre symbol is 0 when pa, 1 when a is a quadratic residue modulo p, and 1 when a is a quadratic nonresidue (The Legendre symbol, including its zero value).

[L2]

If n1 admits a primitive root, gcd(a,n)=1, m1, and d=gcd(m,φ(n)), then xma(modn) is soluble exactly when aφ(n)/d1(modn) (Euler's criterion: if n has a primitive root, gcd(a,n)=1, and m1, then xma(modn) is solvable if and only if aφ(n)/gcd(φ(n),m)1(modn)).

[L3]

Every prime admits a primitive root modulo that prime (Every prime modulus admits a primitive root).

[L4]

For every prime p, φ(p)=p1 (φ(1)=1, and φ(p)=p1 for every prime p).

[L6]

For every prime p, the quotient Z/p is a field (For every prime p, the two operations on Z/p make it a field).

[L8]

A nonzero polynomial of degree n over an integral domain has at most n distinct roots (A nonzero polynomial of degree n over an integral domain has at most n distinct roots).

Proof

technique · direct
1.1

If pa, then [L1] gives (a/p)=0, while (p1)/21 and hence a(p1)/20(modp). The criterion holds in this case.

L1givenalgebra
1.2

Suppose pa. By [L9], gcd(a,p)=1; [L3] and [L4] specialise [L2] with m=2 and d=2. Thus a is a square modulo p exactly when a(p1)/21(modp).

L1L2L3L4L9algebra
1.3

Put y=[a(p1)/2]p. By [L5], y2=[1]p. Facts [L6] and [L7] make Z/p an integral domain, and [L8] says that the degree-two polynomial X21 has at most two roots there. The two distinct roots [1]p and [1]p already exist because p is odd, so y is one of them.

L5L6L7L8algebra
2.1

In the unit case, step 1.2 gives y=[1]p exactly for a quadratic residue; otherwise step 1.3 forces y=[1]p. These are precisely the two values prescribed by [L1]. Combining this with step 1.1 proves the congruence for every integer a.

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

The Legendre symbol is multiplicative for all integer numerators

Statement

For every odd prime p and all integers a,b,

(abp)=(ap)(bp).

Consequently, if pc, then (ac2/p)=(a/p).

Facts & Assumptions

Given: An odd prime p and integers a,b,c.

[L1]

The Legendre symbol is 0 when its numerator is divisible by p, 1 on a quadratic residue, and 1 on a quadratic nonresidue (The Legendre symbol, including its zero value).

[L2]

A class [a]p is a unit exactly when gcd(a,p)=1 (For n1, [a]n is a unit if and only if gcd(a,n)=1).

[L3]

Restricted to (Z/p)×, the Legendre symbol is a homomorphism to {±1} whose kernel is the nonzero square subgroup (On the units, the Legendre symbol is the unique nontrivial homomorphism to {±1}).

Proof

technique · direct
1.1

If p divides a or b, then it divides ab. By [L1], the left side is zero and one factor on the right is zero, so the identity holds.

L1L2given
2.1

If p divides neither factor, then [L2] makes [a]p and [b]p units. The homomorphism identity in [L3] gives the displayed multiplicativity.

L2L3step 1.1
3.1

If pc, then [c]p2 lies in the kernel described by [L3], so (c2/p)=1. Applying the proved multiplicative identity to a and c2 gives (ac2/p)=(a/p).

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

x2a(modp) has exactly 1+(a/p) solution classes

Statement

For every integer a and odd prime p, the congruence

x2a(modp)

has exactly 1+(a/p) solution classes modulo p.

Facts & Assumptions

Given: An integer a and an odd prime p.

[L1]

The Legendre symbol is 0 when pa, 1 when a is a quadratic residue modulo p, and 1 when a is a quadratic nonresidue (The Legendre symbol, including its zero value).

[L4]

Under its primitive-root, coprimality, positivity, and solubility hypotheses, xma(modn) has exactly gcd(φ(n),m) solution classes (If n has a primitive root, gcd(a,n)=1, m1, and xma(modn) is solvable, then it has exactly gcd(φ(n),m) solution classes modulo n).

[L5]

Every prime admits a primitive root modulo that prime (Every prime modulus admits a primitive root).

[L6]

For every prime p, φ(p)=p1 (φ(1)=1, and φ(p)=p1 for every prime p).

Proof

technique · direct
1.1

If pa, the equation in the field [L2] is [x]p2=[0]p. Since [L3] gives no zero divisors, [x]p=[0]p is the unique solution. This count is 1+0 by [L1].

L1L2L3given
1.2

Suppose pa. By [L7], gcd(a,p)=1. If (a/p)=1, the congruence is soluble by [L1], and [L4], [L5], and [L6] give exactly gcd(p1,2)=2 roots. If (a/p)=1, [L1] says that no root exists.

L1L4L5L6L7algebra
2.1

The three possible symbol values 0,1,1 therefore give respectively one, two, and zero solution classes, which in every case equals 1+(a/p).

L1step 1.1step 1.2
CorollaryStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + gpt-5.6-terra)audited 2026-08-16Open item page →

The discriminant counts roots of Ax2+Bx+C0(modp) for odd prime pA

Statement

Let p be an odd prime, and let A,B,CZ with pA. Put Δ=B24AC. Then

Ax2+Bx+C0(modp)

has exactly

1+(Δp)

solution classes modulo p.

Facts & Assumptions

Given: An odd prime p and integers A,B,C with pA; write Δ=B24AC.

[L2]

A class [u]p is a unit exactly when gcd(u,p)=1 (For n1, [a]n is a unit if and only if gcd(a,n)=1).

[L3]

If u,vZ, n1, and d=gcd(u,n), then uxv(modn) is soluble exactly when dv, and when soluble it has exactly d solution classes (For n1, axb(modn) is solvable exactly when gcd(a,n)b, and then has exactly gcd(a,n) solution classes modulo n).

[L4]

For every integer d and odd prime p, the congruence y2d(modp) has exactly 1+(d/p) solution classes (x2a(modp) has exactly 1+(a/p) solution classes).

Proof

technique · direct
1.1

In the commutative ring [L1], the identity (2Ax+B)2Δ=4A(Ax2+Bx+C) holds.

L1givenalgebra
2.1

Since p is odd and pA, the prime p divides neither 2A nor 4A, so [L2] makes both classes units. Fact [L3] then says that x2Ax+B is a bijection of the residue classes, and cancellation of the unit 4A in step 1.1 shows that the original congruence is equivalent to (2Ax+B)2Δ(modp).

L2L3step 1.1
3.1

The bijection in step 2.1 preserves the number of solutions, and [L4] gives exactly 1+(Δ/p) solutions to the square congruence.

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

Multiplication by a with pa permutes an odd prime's signed half-system up to sign

Statement

Let p be an odd prime, let pa, and put m=(p1)/2. For each 1jm, there are unique εj{1,1} and rj{1,,m} such that

ajεjrj(modp).

The absolute representatives r1,,rm are a permutation of 1,,m.

Facts & Assumptions

Given: An odd prime p, an integer a with pa, and m=(p1)/2.

[L1]

Proof

technique · direct
1.1

For 1jm, [L1] gives the standard representative sj of aj. It is nonzero because [L2] permits cancellation of the nonzero classes [a]p and [j]p. If sjm, set (εj,rj)=(1,sj); if sj>m, set (εj,rj)=(1,psj). Since p=2m+1, this gives the stated unique signed representative with 1rjm.

L1L2given
2.1

If rj=rk, then ajak or ajak(modp). Cancelling [a]p by [L2] gives jk or jk(modp). In the first case jk<p forces j=k; in the second, 2j+kp1, so p(j+k), a contradiction. Thus jrj is injective.

L2step 1.1
3.1

The map jrj is an injection from the finite set {1,,m} to itself, so [L3] makes it a bijection. Therefore r1,,rm is a permutation of the half-system.

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

Gauss's quadratic-residue lemma

Statement

Let p be an odd prime and let pa. Let N(a,p) be the number of least positive residues of

a,2a,,p12a

modulo p that exceed p/2. Then

(ap)=(1)N(a,p).

Facts & Assumptions

Given: An odd prime p, an integer a with pa, and m=(p1)/2.

[L1]

There are unique signs εj{±1} and a permutation r1,,rm of 1,,m with ajεjrj(modp) for 1jm (Multiplication by a with pa permutes an odd prime's signed half-system up to sign).

[L3]

A class [u]p is a unit exactly when gcd(u,p)=1 (For n1, [a]n is a unit if and only if gcd(a,n)=1).

[L4]

Euler's criterion gives (a/p)a(p1)/2(modp) (Euler's criterion: (a/p)a(p1)/2(modp)).

[L7]

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

Proof

technique · direct
1.1

Use [L1] to write ajεjrj(modp) for 1jm. A sign is negative exactly when the least positive residue of aj exceeds p/2, so exactly N(a,p) of the signs are negative.

L1given
2.1

Multiply the m congruences using [L2] and [L5]. Since the rj permute 1,,m, this gives amm!(1)N(a,p)m!(modp).

L2L5step 1.1algebra
3.1

Every factor j satisfies 1jm<p, so pj and [L6] gives gcd(j,p)=1; then [L3] makes each [j]p a unit, so their product [m!]p is a unit and can be cancelled from step 2.1. Hence am(1)N(a,p)(modp).

L3L5L6step 2.1
4.1

By [L4], (a/p)am(1)N(a,p)(modp). Since pa, [L7] gives (a/p){1,1}, and (1)N(a,p) is likewise 1 or 1; two such integers differing by a multiple of the odd prime p differ by at most 2<p, so the congruence is equality in Z.

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

First supplement: (1/p)=(1)(p1)/2

Statement

For every odd prime p,

(1p)=(1)(p1)/2.

Equivalently, (1/p)=1 if and only if p1(mod4), while (1/p)=1 if and only if p3(mod4).

Facts & Assumptions

Given: An odd prime p.

[L1]

Euler's criterion gives (a/p)a(p1)/2(modp) for every integer a (Euler's criterion: (a/p)a(p1)/2(modp)).

[L2]

Division by a positive integer has a unique quotient and remainder in the standard range (Division with remainder in Z: for aZ and b>0 there are unique q,rZ with a=qb+r and 0r<b).

[L3]
[L4]

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

Proof

technique · direct
1.1

Substitute a=1 in [L1]. An odd prime never divides 1, so [L4] gives (1/p){1,1}, and (1)(p1)/2 is likewise 1 or 1; two such integers differ by at most 2<p, so their congruence modulo the odd prime p is equality: (1/p)=(1)(p1)/2.

L1L4givenalgebra
1.2

By [L2], write p=4q+r with 0r<4. Since p is odd, r is 1 or 3. If r=1, then (p1)/2=2q is even; if r=3, then (p1)/2=2q+1 is odd.

L2algebra
2.1

By [L3], the two remainder cases in step 1.2 are exactly p1(mod4) and p3(mod4). Combining their parities with step 1.1 proves both biconditionals.

L3step 1.1step 1.2
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-16Open item page →

Second supplement: (2/p)=(1)(p21)/8

Statement

For every odd prime p,

(2p)=(1)(p21)/8.

Equivalently, (2/p)=1 if and only if p1 or 7(mod8), while (2/p)=1 if and only if p3 or 5(mod8).

Facts & Assumptions

Given: An odd prime p.

[L1]

If N(a,p) counts the least positive residues of aj modulo p, for 1j(p1)/2, that exceed p/2, then (a/p)=(1)N(a,p) (Gauss's quadratic-residue lemma).

[L2]

Division by a positive integer has a unique quotient and remainder in the standard range (Division with remainder in Z: for aZ and b>0 there are unique q,rZ with a=qb+r and 0r<b).

[L3]

Proof

technique · direct
1.1

Put m=(p1)/2. For 1jm, the least positive residue of 2j is 2j itself because 2jp1. It exceeds p/2 exactly when j>p/4, so [L1] counts precisely the integers with p/4<j<p/2.

L1givenalgebra
2.1

By [L2], write p=8q+r with 0r<8. Since p is odd, r{1,3,5,7}. In these cases the crossing indices of step 1.1 are respectively 2q+1,,4q; 2q+1,,4q+1; 2q+2,,4q+2; and 2q+2,,4q+3. Their counts are 2q, 2q+1, 2q+1, and 2q+2.

L2L3step 1.1algebra
3.1

For r=1,3,5,7, direct substitution gives (p21)/8=8q2+2q, 8q2+6q+1, 8q2+10q+3, and 8q2+14q+6, respectively. These have parity even, odd, odd, and even, exactly matching the four crossing counts in step 2.1.

L3step 2.1algebra
4.1

Fact [L1] and step 3.1 give (2/p)=(1)(p21)/8. The exhaustive remainder cases yield value 1 exactly for residues 1,7 modulo 8, and value 1 exactly for residues 3,5.

L1step 1.1step 3.1

5 · Examples, counterexamples and false statements

None yet.

Sources