Alphabeta Math
TheoremStatement: Literature-sourcedProof: AI-adaptedPipeline-generatedjudge pass (gpt-6-luna)
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.

Correctness of the reversible modular multiplier

Statement

For N≥2, n=⌈log⁡2N⌉, and a unit a(modN) with supplied inverse a−1, the circuit of Reversible modular multiplication by a unit is unitary. On a computational-basis state it fixes the control bit, sends ∣z⟩ to ∣az mod N⟩ if c=1 and z<N, and fixes z if c=0 or z≥N. All Boolean value, target, and scratch registers return to zero. Its action therefore extends coherently to superpositions.

Facts & Assumptions

Given: N≥2, a unit a(modN) and inverse a−1, a one-bit control and an n-bit data register, and the construction in Reversible modular multiplication by a unit.

[F1]

The circuit computes the total function fa(c,z) into a clean target by an XOR oracle, swaps that target with z, then computes fa−1 on the new data to clear the old-data target (Reversible modular multiplication by a unit). Its gate list acts in the declared chronological order on the stated wires (Denotational semantics of a finite layered circuit).

[F2]

Reversible embedding maps ∣x,y,0w⟩ to ∣x,y⊕f(x),0w⟩ for every basis input and target, restores clean work, and extends to superpositions; a clean register begins in its all-zero basis vector (Gate, workspace, and serial-depth costs of reversible embedding, Clean and dirty ancillas).

[F3]

A coherent XOR oracle acts as ∣x,y⟩↦∣x,y⊕f(x)⟩ and is a unitary involution for every total Boolean f on the ordered computational-basis register (Coherent XOR function oracle, A total Boolean XOR oracle is unitary and involutive, Finite registers and their ordered computational bases).

Proof

1.1givenF1algebra

The DAG's XOR formula is (u∨v)∧¬(u∧v), which is u+v modulo 2 for each of the four input pairs. In its adder, Ui+Vi+di=si+2di+1: if both input bits are 1 the carry is 1, if exactly one is 1 the carry is di, and if both are 0 the carry is 0; the displayed sum bit has the corresponding parity. Multiplying by 2i and summing proves U+V+d0=S+2wdw. Subtraction therefore represents U+(2w−1−V)+1=U−V+2w; its carry is 1 exactly when U≥V, and its low bits are U−V modulo 2w. The selector's disjoint branches give U for h=1 and V for h=0.

2.1F1step 1.1inductionalgebra

After the first i product rows, the accumulator is z∑j<iaj2j. This holds initially and is preserved by step 1.1; no overflow occurs because every partial sum is at most az<22n. Thus the final product bits represent az even for invalid input encodings. In the remainder loop, the invariant is that R is the remainder modulo N of the already scanned product prefix and 0≤R<N. Appending bit Pℓ gives V=2R+Pℓ<2N. Subtraction and selection from step 1.1 give V−N if V≥N and V otherwise, so the next value lies in [0,N) and is the new prefix remainder. It fits n bits, making the discarded high bit zero, even when N=2n. Induction proves the final R=az mod N. The final no-borrow comparison gives v=1 exactly when z<N, and selection by c∧v therefore computes precisely fa(c,z). The same argument applies to a−1.

3.1givenF1F4step 2.1algebra

Fix c,z. If c=0 or z≥N, the defining function and its inverse-function counterpart both return z. If c=1 and z<N, the first function returns z′=az mod N<N and the inverse function returns a−1z′ mod N=z, by [F4]. Thus in every case fa−1(c,fa(c,z))=z.

4.1F1F2F3step 3.1algebra

By [F2] and [F3], the first computation adds fa(c,z) into a clean target and restores all value-computation work. A bitwise swap made from CNOTs acts as (u,v)↦(u,u⊕v)↦(v,u⊕v)↦(v,u), so after the three CNOTs per bit the data register contains fa(c,z) and the target contains the old z.

5.1F1F2step 3.1step 4.1algebra

Apply the clean XOR computation for fa−1 to the new data and the target holding old z. Step 3.1 says its output is exactly that old z, so XOR changes the target to z⊕z=0 and restores its computation work by [F2]. Hence all temporary registers are clean and the data/control action is the claimed one.

6.1F2F4step 5.1algebra∎

On valid residue encodings, multiplication by a is a bijection of the residue register because a−1 is its inverse; on invalid encodings and at control 0 the map is the identity. It is therefore a permutation of the full finite computational basis. A basis permutation is unitary, and [F2] supplies the same action on arbitrary superpositions with clean work. This proves the statement.

Depends on

Used by

Dependency tree · two levels

50 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