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.
Gate and bit cost of modular multiplication and powering
Statement
Let , , and let be the standard representative of a known unit modulo . In the explicit schoolbook Boolean construction of Reversible modular multiplication by a unit, each controlled multiplication by a known unit has a Boolean DAG with . Under the compiler of Gate, workspace, and serial-depth costs of reversible embedding, the complete clean circuit, including both XOR computations, swaps, and inverse cleanup, uses elementary gates and clean work bits. Repeated-squaring constants and their inverses for powers can be computed in deterministic multitape bit transitions. No depth bound is asserted.
Facts & Assumptions
Given: , a standard unit representative, the stated schoolbook arithmetic, the reversible circuit in Reversible modular multiplication by a unit, and the resource models in Circuit-family and computation cost model and Classical bit-operation cost.
The reversible compiler uses at most elementary gates and at most clean work bits for an -bit output Boolean DAG (Gate, workspace, and serial-depth costs of reversible embedding).
The multiplier computes a controlled constant product, a remainder, a validity condition, the inverse cleanup, and swaps; its correctness is established by Correctness of the reversible modular multiplier and its circuit stages are specified in Reversible modular multiplication by a unit.
Bit cost counts multitape Turing-machine transitions and charges classical arithmetic, address/input work, and output writing; it is separate from gate and query costs (Classical bit-operation cost, Circuit-family and computation cost model).
Division by a positive integer gives a unique quotient and smaller nonnegative remainder; the Euclidean descent from with terminates at (Division with remainder in : for and there are unique with and , The Euclidean algorithm: for and the remainder descent from terminates, and the last nonzero remainder is ).
The operations in are well-defined ring operations, so congruences are preserved by subtraction and multiplication (For every natural , is an abelian group, multiplication is a commutative monoid operation, and both distributive laws hold).
A residue class modulo is a unit exactly when its representative is coprime to (For , is a unit if and only if ).
Every residue class modulo positive has a unique standard representative with (For , every class in has one representative with , so ; while is in bijection with ).
Proof
In the explicit DAG of [F2], XOR emits four nodes, each adder bit emits two XORs and three carry nodes, hence nodes, and subtraction emits one additional NOT per bit, hence nodes at width . Selection emits nodes. The product uses partial-product AND nodes and adders of width , totaling nodes. Its remainder stages use nodes. The final comparison uses nodes, validity/control uses two more, final selection uses , and the two shared constant nodes complete the count. Thus suffices for all ; every gate has at most two input ports, so . The correctness supplier in [F2] proves that the row sums never overflow and that each remainder stage needs only one conditional subtraction; these are exactly the loops just counted.
For the inverse computation, initialize and, while , divide with , set to its least residue, and simultaneously update to . Initially and ; these two congruences are preserved because by [F5]. The remainder pair is exactly the Euclidean descent in [F4], so it terminates at by [F6]. The invariant then gives , and [F7] gives the returned inverse constant . For its cost, at every division ; the new remainder is : if , then , while if , then and . Thus every two successive positive remainder values shrink by at least a factor of two, giving iterations. The quotients and remainders have bits, and always lie in , so the signed intermediate has bits as well (its magnitude is at most ). Schoolbook division, multiplication, subtraction and reduction each take multitape transitions, including signed reduction by dividing the absolute value and, when needed, replacing a nonzero remainder by . Hence this explicit loop costs transitions. Set , and for the remaining powers compute and . Induction gives and ; each stage uses two schoolbook modular products, so all powers and inverses still cost transitions.
Step 1.1 counts the complete Boolean function DAG, including the validity comparison, control, and conditional output, and gives . Apply [F1] separately to the forward and inverse functions; the two compiled XOR maps and their clean work each cost . The swap uses CNOT gates. Adding these counts proves the claimed gate and clean-work bounds; [F2] ensures they implement the required map.
The resource definition [F3] keeps gate count, classical bit transitions, and oracle queries separate. The preceding counts establish only gate/work and stated classical arithmetic bounds; no circuit layering or depth estimate follows from them.
Depends on
- Reversible modular multiplication by a unit
- Correctness of the reversible modular multiplier
- Gate, workspace, and serial-depth costs of reversible embedding
- Circuit-family and computation cost model
- Classical bit-operation cost
- 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$
- The Euclidean algorithm: for $a \in \mathbb{Z}$ and $b > 0$ the remainder descent from $(a,b)$ terminates, and the last nonzero remainder is $\gcd(a,b)$
- For every natural $n$, $(\mathbb{Z}/n,+)$ is an abelian group, multiplication is a commutative monoid operation, and both distributive laws hold
- For $n\ge1$, $[a]_n$ is a unit if and only if $\gcd(a,n)=1$
- For $n\ge 1$, every class in $\mathbb{Z}/n$ has one representative $r$ with $0\le r<n$, so $\lvert\mathbb{Z}/n\rvert=n$; while $\mathbb{Z}/0$ is in bijection with $\mathbb{Z}$
Used by
Dependency tree · two levels
72 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
- Ronald de Wolf, Quantum Computing: Lecture Notes, arXiv:1907.09415v6 (standard reference, not scraped)
- Peter W. Shor, Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer (standard reference, not scraped)