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.
Quadratic Reciprocity and the Jacobi Symbol
1 · Prerequisites
- Binary Operations, Monoids, Groups and Subgroups
- Congruences, the Integers Modulo n and the Chinese Remainder Theorem
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Cosets, Index and Lagrange's Theorem
- Countability and Uncountability
- Cyclic Groups and Direct Products
- Divisibility, Greatest Common Divisors and Bézout's Identity
- Finite Counting, Factorials and Binomial Coefficients
- Foundations of the Real Numbers for Analysis
- Group Homomorphisms and the Isomorphism Theorems
- Normal Subgroups and Quotient Groups
- Polynomial Rings, the Division Algorithm and Roots
- Primes, Euclid's Lemma and the Fundamental Theorem of Arithmetic
- Primitive Roots and Unit Groups Modulo N
- Quadratic Residues and the Legendre Symbol
- Relations, Functions, and Quotients
- Rings, Subrings, Integral Domains and Fields
- Roots, Rational Powers, and Classical Inequalities
- The Fundamental Theorem of Finite Abelian Groups
- The ZFC Axioms and the Basic Set Constructions
2 · Summary
Gauss's lemma turns a Legendre symbol into the parity of a finite lower-half count. For two distinct odd primes, the two counts occupy opposite sides of a rectangle with no lattice point on its diagonal, so their sum gives the sign in quadratic reciprocity. After Gauss's lemma and its half-system permutation, the rectangle argument uses integer division, rational inequalities, and finite sets; it does not use a floor function or any result from real analysis.
The Jacobi symbol multiplies the prime Legendre symbols in an odd denominator's canonical factorisation, with value zero for noncoprime arguments and empty-product value one at denominator one. Its multiplicativity, supplementary laws, and reciprocity yield a terminating Euclidean evaluation algorithm. On unit groups it is a sign character: every square lies in its kernel, but the kernel can be larger. Direct lifting at odd prime powers, the separate criterion for powers of two, and the Chinese remainder theorem then give a complete criterion and exact count for unit square roots modulo a positive integer.
3 · Logical flowchart
4 · Definitions, theorems and proofs
Gauss's lemma as a lower-half lattice-point count
Statement
Let and be distinct odd primes. Put .
Then .
Thus Gauss's sign count (Gauss's quadratic-residue lemma) can be read as the parity of a finite set of lattice points, without introducing floor notation.
Facts & Assumptions
Given: Distinct odd primes , and .
If is the number of least positive residues of modulo that exceed , then (Gauss's quadratic-residue lemma).
For every integer and positive integer , there are unique integers such that and (Division with remainder in : for and there are unique with and ).
For each , there are unique and such that , and is a permutation of (Multiplication by with permutes an odd prime's signed half-system up to sign).
Proof
For each , [L2] gives with ; since , one has . The positive integers satisfying are exactly , so .
In the notation of [L3], when and when ; the negative signs are exactly the residues counted by . Summing the equations of step 1.1 and reducing modulo gives , because and are odd. Also , while the permutation in [L3] gives . Hence , and [L1] yields .
The two reciprocity lattice counts partition an open rectangle
Statement
Let and be distinct odd primes, and let and be the lower-half lattice counts of Gauss's lemma as a lower-half lattice-point count. Then .
Facts & Assumptions
Given: Distinct odd primes and the integer rectangle .
If a prime divides a product , then or (Euclid's lemma: if is prime and then or ).
Proof
No point lies on the diagonal : equality would give , so [L2] would give or ; distinctness of the primes rules out the first alternative, while rules out the second. Thus every point of satisfies exactly one of and .
The points of with are exactly those counted by : the inequality itself forces , hence ; after interchanging the coordinates and the primes, the points with are exactly those counted by . By step 1.1 these two sets partition , whose cardinality is .
Quadratic reciprocity for distinct odd primes
Statement
For distinct odd primes , .
Equivalently, the two Legendre symbols agree unless , in which case they have opposite signs.
Facts & Assumptions
Given: Distinct odd primes and .
For distinct odd primes , the lower-half count satisfies (Gauss's lemma as a lower-half lattice-point count).
For the two orientations of the rectangle, (The two reciprocity lattice counts partition an open rectangle).
Proof
Applying [L1] in both orientations, multiplying, and then using [L2] gives .
The exponent is , which is odd exactly when both factors are odd, equivalently when . Since the Legendre symbols are signs for distinct primes, their product is then , and in every other case it is , proving the equivalent formulation.
The Jacobi symbol, with its zero value and empty-product convention
Definition
Let and let be an odd positive integer. For odd with canonical prime factorisation , define .
This is the Jacobi symbol of modulo . The prime factors are distinct, every exponent is positive, and each factor on the right is a Legendre symbol (The Legendre symbol, including its zero value). When , the factor list is empty and the finite-product convention (The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity) gives
The value is exactly when , and . Independence from the ordering of the canonical factors, dependence only on , and the stated zero criterion are proved in The Jacobi symbol is well defined on numerator residue classes ↗.
The Jacobi symbol is well defined on numerator residue classes
Statement
For every integer and odd positive integer , the product in The Jacobi symbol, with its zero value and empty-product convention is independent of the ordering used to list the canonical prime factors and belongs to . The Jacobi symbol depends only on , and it is zero exactly when . At it has the value .
Facts & Assumptions
Given: An integer and an odd positive integer .
For odd with canonical prime factorisation , define (The Jacobi symbol, with its zero value and empty-product convention).
In a prime factorisation of a positive integer, the exponents are determined by the integer; primes outside the factor list have exponent zero (For and any injective list of primes containing every prime divisor of , one has ; the exponents are determined by , and for every prime outside the list).
For every odd prime , the Legendre symbol belongs to , depends only on the numerator modulo , and equals zero exactly when divides the numerator (The Legendre symbol is well defined on residue classes).
Every integer greater than has a prime divisor (Every integer has a prime divisor; indeed the least divisor of that exceeds is prime).
Proof
The uniqueness in [L2] fixes the set of prime factors and every exponent in [L1]; changing their order does not change a finite product of integers. Each factor belongs to by [L3], so their product does too, and at the empty product is .
If , then for every prime factor of , so [L3] makes every corresponding factor in [L1] equal. The product is zero exactly when some prime factor of divides , which gives ; conversely, if , [L4] supplies a prime divisor of the gcd, hence a prime factor of dividing , and [L3] makes that Legendre factor zero.
The Jacobi symbol is multiplicative in numerator and denominator
Statement
For integers and an odd positive integer ,
For an integer and odd positive integers ,
No coprimality hypothesis is imposed on either pair of arguments.
Facts & Assumptions
Given: Integers and odd positive integers .
For odd with canonical prime factorisation , the Jacobi symbol is (The Jacobi symbol, with its zero value and empty-product convention).
For every odd prime and integers , (The Legendre symbol is multiplicative for all integer numerators).
Canonical prime-factor exponents are determined by the positive integer being factored (For and any injective list of primes containing every prime divisor of , one has ; the exponents are determined by , and for every prime outside the list).
For a prime and nonzero integers , ( for nonzero integers , and whenever , and are all nonzero).
Every positive integer has a finite prime factorisation, unique up to the order of its prime factors (The fundamental theorem of arithmetic: every integer is a product of primes, and the factorisation is unique up to order — if with every and prime, then and for some ).
Proof
Apply [L2] to every prime factor in [L1] and regroup the finite product: . This remains valid when a Legendre factor is zero.
By [L5], choose finite prime factorisations of and ; concatenating their factor lists gives a prime factorisation of . Grouping equal primes and using [L3] and [L4], the exponent of each prime in is the sum of its exponents in and . Substituting those sums in [L1] and regrouping gives . If either denominator is , its factor list is empty and its contribution is .
For fixed odd modulus, the Jacobi symbol is a homomorphism on the unit group
Statement
Fix an odd positive integer . The assignment is a group homomorphism .
Here is the two-element multiplicative group, except that the image is the one-element subgroup when the character is trivial.
Facts & Assumptions
Given: An odd positive integer and unit classes .
The Jacobi symbol belongs to , depends only on , and is zero exactly when (The Jacobi symbol is well defined on numerator residue classes).
For odd positive , (The Jacobi symbol is multiplicative in numerator and denominator).
The unit group consists of the invertible residue classes modulo under multiplication (The unit group and Euler's totient for ).
The class is a unit if and only if (For , is a unit if and only if ).
A group homomorphism is a function satisfying for all (Monoid homomorphism and group homomorphism).
Proof
By [L1], the value depends only on the residue class. By [L3] and [L4], a unit class has , so [L1] rules out the value zero; hence is a well-defined function from to .
For unit classes and , [L2] gives , which is the condition in [L5]. Thus is a group homomorphism, including when and the unit group has one element.
The two supplementary laws for the Jacobi symbol
Statement
For every odd positive integer ,
Both formulas include , where each Jacobi symbol and each displayed power of equals .
Facts & Assumptions
Given: An odd positive integer .
The Jacobi symbol is the product of the prime Legendre symbols, taken with the multiplicities in the canonical prime factorisation (The Jacobi symbol, with its zero value and empty-product convention).
For odd positive , (The Jacobi symbol is multiplicative in numerator and denominator).
For every odd prime , (First supplement: ).
For every odd prime , (Second supplement: ).
Proof
Expand through [L1], applying [L3] to every prime factor with multiplicity and [L2] to multiply the contributions. For odd , the difference is even, so iteration through the factor list gives ; for the empty factor list , both sides are .
Similarly, [L1] and [L4] give the product of the signs with multiplicity. For odd , the difference is even, because each of and is divisible by . Iterating this identity gives , again with value at .
Quadratic reciprocity for coprime odd Jacobi denominators
Statement
For coprime odd positive integers ,
The formula includes or .
Facts & Assumptions
Given: Coprime odd positive integers .
For distinct odd primes , (Quadratic reciprocity for distinct odd primes).
For an odd positive denominator, the Jacobi symbol is the product of the Legendre symbols over its canonical prime factors with multiplicity (The Jacobi symbol, with its zero value and empty-product convention).
The Jacobi symbol is multiplicative in both its numerator and its odd positive denominator (The Jacobi symbol is multiplicative in numerator and denominator).
The primes and their exponents in the canonical factorisation of a positive integer are determined by that integer (For and any injective list of primes containing every prime divisor of , one has ; the exponents are determined by , and for every prime outside the list).
Every positive integer has a finite prime factorisation, unique up to the order of its prime factors (The fundamental theorem of arithmetic: every integer is a product of primes, and the factorisation is unique up to order — if with every and prime, then and for some ).
Proof
By [L5], and have finite prime factorisations; grouping equal factors and using [L4], write their canonical forms as and . Expanding both Jacobi symbols by [L2] and [L3] expresses their product as . Coprimality makes every distinct from every , so [L1] turns this into , where .
For a product of odd integers, repeated use of gives and modulo . Their product is congruent to , so step 1.1 gives the stated sign. If either integer is , the relevant prime list and cross-product are empty and both sides equal .
The Euclidean algorithm computes the Jacobi symbol without factoring the denominator
Statement
Let and let be odd. Starting from , repeat the following deterministic procedure:
- if , return ;
- otherwise let be the least nonnegative remainder of modulo , and return if ;
- write with odd, replace by , then replace it by and replace by .
The Euclidean Jacobi algorithm terminates and returns without factoring the odd denominator .
Facts & Assumptions
Given: An integer , an odd positive integer , and the algorithmic state described in the Statement.
The Jacobi symbol satisfies and is zero exactly when (The Jacobi symbol, with its zero value and empty-product convention).
The Jacobi symbol depends only on its numerator modulo the odd positive denominator (The Jacobi symbol is well defined on numerator residue classes).
For odd positive , (The Jacobi symbol is multiplicative in numerator and denominator).
For odd positive , (The two supplementary laws for the Jacobi symbol).
For coprime odd positive , (Quadratic reciprocity for coprime odd Jacobi denominators).
Division by a positive integer has a unique remainder with (Division with remainder in : for and there are unique with and ).
Every nonzero integer has a uniquely determined maximal power dividing it and can be written with odd (For a prime and a nonzero integer : and ; holds exactly for ; exactly when ; ; and ).
Proof
Maintain the invariant . By [L2] and [L6], replacing by preserves the current symbol. If , then [L3] and [L4] give . When , [L5] gives ; when the gcd exceeds , [L1] makes both Jacobi symbols zero, so the same signed equality remains true. Thus every nonterminal update preserves the invariant.
At a nonterminal update, and the new denominator is the positive odd part , so it is strictly smaller than . A strictly decreasing chain of positive integers cannot have more terms than its initial value, so the procedure reaches a terminal state.
If , [L1] and the invariant give . If while , then divides , so [L1] gives and the invariant gives the returned value . These are all terminal states, proving correctness and termination; only division, extraction of powers of , and sign updates were used, not a factorisation of .
A unit square modulo an odd integer has Jacobi symbol one
Statement
If is a unit square modulo an odd positive integer , then .
Explicitly, if and for some integer , then the Jacobi symbol of modulo is .
Facts & Assumptions
Given: An odd positive integer and integers such that and .
The assignment is a group homomorphism (For fixed odd modulus, the Jacobi symbol is a homomorphism on the unit group).
A residue class is a unit if and only if (For , is a unit if and only if ).
Proof
By [L2], is a unit. If is its inverse, then , so is also a unit and lies in the domain of [L1].
Applying [L1] to gives , since .
Jacobi symbol minus one obstructs quadratic residuosity
Statement
Let be an odd positive integer and let satisfy . If , then is not a square modulo .
Facts & Assumptions
Given: An odd positive integer and an integer with and .
If is a unit square modulo an odd positive integer , then (A unit square modulo an odd integer has Jacobi symbol one).
Proof
If were a square modulo , the gcd hypothesis would make it a unit square and [L1] would give .
This contradicts the given value , so is not a square modulo .
A nonsingular square root lifts uniquely by one odd-prime-power step
Statement
Let be an odd prime, let , and let satisfy and . Then there is a unique class such that .
Equivalently, the root class of modulo has exactly one lift to a root class modulo .
Facts & Assumptions
Given: An odd prime , an integer , and integers with and .
If , then is soluble exactly when , and when soluble it has exactly solution classes modulo (For , is solvable exactly when , and then has exactly solution classes modulo ).
If a prime divides a product , then or (Euclid's lemma: if is prime and then or ).
If a prime does not divide an integer , then (For a prime and any integer , is when and otherwise; so makes and coprime).
Proof
Reducing the given congruence modulo shows that would force , contrary to the hypothesis. If , [L2] would give or ; both are impossible because is odd. Hence , and [L3] gives .
Write . Every class modulo reducing to modulo has a unique form with modulo , and expansion gives . Since , the lift is a root modulo exactly when . By step 1.1 and [L1], this linear congruence has exactly one solution class modulo .
Unit square criterion and root count modulo odd prime powers
Statement
For an odd prime , , and , the congruence is soluble if and only if .
When soluble it has exactly two solution classes modulo .
Facts & Assumptions
Given: An odd prime , an integer , and an integer with .
Every root modulo has a unique lift to a root modulo when and (A nonsingular square root lifts uniquely by one odd-prime-power step).
The congruence has exactly solution classes modulo ( has exactly solution classes).
For , the Legendre symbol is when is a square modulo and otherwise (The Legendre symbol, including its zero value).
Proof
Any root modulo reduces to a root modulo . Since , [L3] makes a sign, and [L2] says that a root exists only when , equivalently when .
Conversely, if , [L2] gives exactly two root classes modulo . For these are the required roots. For , repeatedly apply [L1] from exponent through exponent to lift each class uniquely; the two lifted classes remain distinct because their reductions modulo are distinct.
Every root modulo reduces to one of the two roots modulo , and at every successive exponent [L1] forces it to be the unique lift of that reduction. Thus step 1.2 constructs all roots, so there are exactly two. Together with step 1.1 this proves both directions of the criterion and the count.
Unit square criterion and root count modulo powers of two
Statement
Let be odd.
- Modulo , the congruence has exactly one solution class.
- Modulo , it is soluble if and only if , and then it has exactly two solution classes.
- For , the congruence is soluble if and only if ; when soluble, the number of roots is one for modulus , two for modulus , and four for modulus with .
Facts & Assumptions
Given: An odd integer and an integer exponent .
For , every unit modulo has a unique representation with and modulo (For , , generated uniquely as ).
Proof
Modulo , the unique odd class is and its square is . Modulo , the odd classes and both square to , so an odd target is soluble exactly when it is modulo , and then both odd classes are roots.
Let and write a unit uniquely as by [L1]. Squaring sends to , so a unit is a square exactly when and is even. Modulo , the four coordinate-parity possibilities give residues , respectively, so this condition is equivalent to .
The kernel of the squaring map in the coordinates of [L1] has the two choices for and the two solutions of modulo , hence has four elements. Every nonempty fibre of a group homomorphism is a translate of its kernel, so every soluble target for has exactly four roots. Together with step 1.1, this proves all criteria and counts.
A unit is a square modulo exactly when it is a square at every prime-power factor
Statement
Let and let . A unit is a square modulo if and only if it is a square modulo every prime-power factor of .
Equivalently, for every odd prime one must have ; for the factor , there is no additional condition when , one needs when , and one needs when . At , the unique unit class is a square.
Facts & Assumptions
Given: A positive integer and a unit class .
For an odd prime , , and , the congruence is soluble if and only if (Unit square criterion and root count modulo odd prime powers).
For powers of , the unit square criterion is automatic modulo , is modulo , and is modulo for (Unit square criterion and root count modulo powers of two).
For pairwise coprime positive integers with product , the Chinese remainder map gives , including the empty list (For pairwise coprime positive moduli, the Chinese remainder bijection restricts to an isomorphism of unit groups).
The prime factors and exponents in the canonical factorisation of a positive integer are determined by that integer (For and any injective list of primes containing every prime divisor of , one has ; the exponents are determined by , and for every prime outside the list).
Every positive integer has a finite prime factorisation, unique up to the order of its prime factors (The fundamental theorem of arithmetic: every integer is a product of primes, and the factorisation is unique up to order — if with every and prime, then and for some ).
Proof
By [L5], has a finite prime factorisation; grouping equal factors and using [L4] gives its uniquely determined nontrivial prime-power factors, which are pairwise coprime. Apply [L3] to identify the unit group modulo with the product of their unit groups; when , this is the empty product of groups and has one element.
Under the isomorphism of step 1.1, a global square maps to a square in every component. Conversely, if every component is a square, choose one root in each of the finitely many nonempty local root sets and apply the inverse CRT isomorphism to obtain a global root. Substitution of [L1] and [L2] gives the explicit local conditions in the Statement, and the empty product handles .
The number of square roots of a unit modulo is the product of the local counts
Statement
Let be a unit square modulo . The number of square roots is the product of the local root counts.
More explicitly, write with distinct odd primes . The number of roots of is , where
For odd , the soluble unit congruence has exactly roots. At the empty product gives one root.
Facts & Assumptions
Given: A positive integer and a unit for which is soluble.
A soluble unit square congruence modulo an odd prime power has exactly two root classes (Unit square criterion and root count modulo odd prime powers).
A soluble unit square congruence modulo has one root for , two roots for , and four roots for (Unit square criterion and root count modulo powers of two).
The Chinese remainder map is a group isomorphism from the unit group modulo a product of pairwise coprime positive integers to the product of their unit groups, including the empty product (For pairwise coprime positive moduli, the Chinese remainder bijection restricts to an isomorphism of unit groups).
Every positive integer has a finite prime factorisation, unique up to the order of its prime factors (The fundamental theorem of arithmetic: every integer is a product of primes, and the factorisation is unique up to order — if with every and prime, then and for some ).
Proof
By [L4], group the finite prime factorisation of into its pairwise coprime prime-power factors. Restrict the CRT isomorphism [L3] to the equation . It gives a bijection from the global root set to the Cartesian product of the root sets in those components, because an element satisfies the global equation exactly when each component satisfies its local equation.
The cardinality of that finite Cartesian product is the product of its local cardinalities. Each odd-prime-power factor contributes by [L1], while [L2] gives the factor for the two-part; if there are no prime-power factors, the empty product is . This is the displayed formula.
The kernel of the Jacobi map and the subgroup of unit squares
Statement
Let be an odd positive integer in canonical prime factorisation, let , and let . Then
The Jacobi homomorphism is trivial if and only if is a square. Consequently,
For , one has and every group and index above is trivial and equal to one.
Facts & Assumptions
Given: An odd positive integer in canonical prime factorisation and its unit group .
The assignment is a group homomorphism (For fixed odd modulus, the Jacobi symbol is a homomorphism on the unit group).
Every unit square modulo an odd positive integer has Jacobi symbol one (A unit square modulo an odd integer has Jacobi symbol one).
For odd , the soluble unit congruence has exactly roots (The number of square roots of a unit modulo is the product of the local counts).
For every odd prime and , the group is cyclic of even order (For every odd prime and , is cyclic of order ).
The Chinese remainder map gives , including the empty factorisation (For pairwise coprime positive moduli, the Chinese remainder bijection restricts to an isomorphism of unit groups).
For a group homomorphism , one has (First isomorphism theorem for groups: ).
If is finite and , then (Lagrange's theorem: for every subgroup of a finite group ).
For a finite-index subgroup, (The coset set and the index of a subgroup).
If and is finite, then (For with finite, ).
For an odd prime , a unit is a square modulo if and only if its Legendre symbol modulo is one (Unit square criterion and root count modulo odd prime powers).
For a homomorphism , and (The kernel and image of a group homomorphism).
Canonical prime-factor exponents are determined by the integer (For and any injective list of primes containing every prime divisor of , one has ; the exponents are determined by , and for every prime outside the list).
For a prime and nonzero integers , ( for nonzero integers , and whenever , and are all nonzero).
The Jacobi symbol is the product of the prime Legendre symbols with their canonical multiplicities (The Jacobi symbol, with its zero value and empty-product convention).
Proof
Since is abelian, the squaring map , , is a homomorphism with image . By [L2] and the kernel definition [L11], every element of lies in , so .
The kernel of is the root set of , which has elements by [L3]. Applying [L6] to and then [L7] and [L8] gives . This also holds for , when [L5] identifies with the one-element group.
By [L12] and [L13], is a square exactly when every exponent is even. In that case [L14] makes every value of equal to . If some is odd, [L4] supplies a generator, hence a nonsquare, in ; [L10] gives it Legendre symbol . Combine it with identity elements in the other factors by [L5]. Formula [L14] gives the resulting global unit Jacobi value , so [L1] is surjective. Therefore is trivial exactly when is a square.
If is a square, step 1.3 gives , so step 1.2 yields . Otherwise [L1], [L6], [L7], [L8], and [L11] give ; applying [L9] to and using step 1.2 gives .
5 · Examples, counterexamples and false statements
None yet.
Sources
Standard references
Recommended treatments; not extraction sources.
- P. Hackman, Elementary Number Theory, §D.V
- A. Gorodnik, Number Theory, Lecture 9, §2
- W. Stein, Elementary Number Theory, §§4.1 and 4.3
- P. Hackman, Elementary Number Theory, §D.II
- A. Gorodnik, Number Theory, Lecture 10, §1
- V. Shoup, A Computational Introduction to Number Theory and Algebra, 2nd ed., §12.2
- V. Shoup, A Computational Introduction to Number Theory and Algebra, 2nd ed., §12.3
- A. Gorodnik, Number Theory, Lecture 7, §1
- P. Hackman, Elementary Number Theory, §B.VII
- P. Hackman, Elementary Number Theory, §§B.VII and D.I
- V. Shoup, A Computational Introduction to Number Theory and Algebra, 2nd ed., §12.4
- V. Shoup, A Computational Introduction to Number Theory and Algebra, 2nd ed., Exercise 12.3