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.
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 .
Depends on
- The Jacobi symbol, with its zero value and empty-product convention
- The Jacobi symbol is well defined on numerator residue classes
- The Jacobi symbol is multiplicative in numerator and denominator
- The two supplementary laws for the Jacobi symbol
- Quadratic reciprocity for coprime odd Jacobi denominators
- Division with remainder in $\mathbb{Z}$: for $a \in \mathbb{Z}$ and $b > 0$ there are unique $q, r \in \mathbb{Z}$ with $a = qb + r$ and $0 \le r < b$
- For a prime $p$ and a nonzero integer $a$: $p^{v_p(a)} \mid a$ and $p^{v_p(a)+1} \nmid a$; $p^{k} \mid a$ holds exactly for $k \le v_p(a)$; $v_p(a) \ge 1$ exactly when $p \mid a$; $v_p(1) = v_p(-1) = 0$; and $v_p(p) = 1$
Used by
Dependency tree · next 3 levels
Direct dependencies and their dependencies through the next three levels: 97 results over 28 levels. An arrow runs from a result to what uses it, and this result sits at the bottom with a heavier outline. Click the chart to enlarge it.
Sources
- V. Shoup, A Computational Introduction to Number Theory and Algebra, 2nd ed., §12.3 (standard reference, not scraped)
- P. Hackman, Elementary Number Theory, §D.II (standard reference, not scraped)
- A. Gorodnik, Number Theory, Lecture 10, §1 (standard reference, not scraped)