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.
Reversible Arithmetic and Oracle Conversion
1 · Prerequisites
- Absolute and Conditional Convergence; Rearrangement; Products
- Algebraic Closure, Embeddings, and Separability
- Algebraic Extensions, Extension Degree, and Finite Fields
- Binary Operations, Monoids, Groups and Subgroups
- Boolean Circuits and Nonuniform Complexity
- Bounded Linear Operators and Quotient Spaces
- Circuit Syntax, Denotational Semantics, and Measurement
- Clifford+T Exact and Approximate Synthesis
- Compactness in Metric Spaces
- Completeness, Completion, and Uniform Continuity
- Complex Norms and Realification
- Complexification, Realification and Real Structures
- Composition Series, the Jordan–Hölder Theorem and Solvable Groups
- Computational Problems, Promises, and Cost Models
- 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
- Continuity, IVT, EVT, and Uniform Continuity
- Continuous-Gate Universality and Exact Synthesis
- Controlled Gates, Phase, and Entanglement
- Cosets, Index and Lagrange's Theorem
- Countability and Uncountability
- Cyclic Groups and Direct Products
- Determinants of Matrices over a Commutative Ring
- Diagonalisation and the Minimal Polynomial
- Divisibility, Euclidean Domains, Principal Ideal Domains and Unique Factorisation
- Divisibility, Greatest Common Divisors and Bézout's Identity
- Dual Spaces, Bilinear and Quadratic Forms, and Sylvester's Law of Inertia
- Eigenvalues, Eigenvectors and the Characteristic Polynomial
- Filters and Ultrafilters
- Finite Counting, Factorials and Binomial Coefficients
- Finite Dimensional Normed Spaces and Riesz Lemma
- Finite-Dimensional Complex Inner-Product Spaces and Matrix Interfaces
- Formal Languages, Encodings, and Decision Problems
- Foundations of the Real Numbers for Analysis
- Free Modules, Exact Sequences, Projective and Injective Modules
- Fundamental Trigonometric Identities
- Group Actions, Orbits, Stabilisers and Cayley's Theorem
- Group Homomorphisms and the Isomorphism Theorems
- Hilbert Space Geometry and Riesz Representation
- Ideals, Quotient Rings and the Isomorphism Theorems for Rings
- Inner Product Spaces, Gram-Schmidt, Projections and Adjoints
- Limits of Real Functions
- limsup, liminf, and Subsequential Limits
- Linear Independence, Bases and Dimension
- Linear Recurrences and Rational Generating Functions
- Linear Transformations, Rank-Nullity and Quotient Spaces
- Matrices, the Matrix of a Linear Map, and Change of Basis
- Measurements, POVMs, and Instruments
- Metric Spaces
- Modules, Submodules, Quotient Modules and the Isomorphism Theorems
- Monotone Functions, Discontinuities, and Continuity Sets
- Monotone Sequences, Bolzano-Weierstrass, and Cauchy Completeness
- Normal Subgroups and Quotient Groups
- Normed and Banach Spaces
- Order, Zorn's Lemma, and the Axiom of Choice
- Polynomial Rings, the Division Algorithm and Roots
- Power Series and Real-Analytic Functions
- Primes, Euclid's Lemma and the Fundamental Theorem of Arithmetic
- Properties of the Integral and the Working FTC
- Pure and Mixed States, Ensembles, and Schmidt Decomposition
- Qubits, Bloch Sphere, Pauli Algebra, and One-Qubit Gates
- Registers, Tensor Products, and Partial Trace
- Relations, Functions, and Quotients
- Resource Bounds and Machine Invariance
- Reversible Computation, Ancillas, and Coherent Oracles
- Rings, Subrings, Integral Domains and Fields
- Rⁿ as a Normed Space; Vector-Valued Functions
- Roots, Rational Powers, and Classical Inequalities
- Sequences and Limits
- Sequences and Series of Functions; Uniform Convergence
- Series: Convergence and the Nonnegative Tests
- Simple Field Extensions and the Construction of the Complex Numbers
- Sine, Cosine, and the Definition of Pi
- Splitting Fields
- Strongly Continuous Semigroups and Hille Yosida
- Suprema and Infima
- Sylow's Theorems, p-Groups and Nilpotent Groups
- Symmetric Groups, Cycle Decomposition and the Sign Homomorphism
- Tensor Products of Modules
- The Complex Exponential and Euler's Formula
- The Derivative and the Mean Value Theorems
- The Determinant of a Linear Operator, Cofactors and Cramer's Rule
- The Exponential Function
- The Fundamental Theorem of Algebra
- The Fundamental Theorem of Finite Abelian Groups
- The Galois Correspondence
- The Polynomial Hierarchy and Relativization
- The Riemann Integral: Definition and Integrability
- The Spectral Theorem, Positive Operators and Singular Value Decomposition
- The ZFC Axioms and the Basic Set Constructions
- Topology of ℝ
- Triangularisation, Generalised Eigenspaces and Jordan Canonical Form
- Turing Machines, Configurations, and Computation
- Uniform Circuit Families, Promise Problems, and Complexity
- Vector Spaces, Linear Subspaces, Span and Direct Sums
2 · Summary
This page fixes the standard XOR query and the binary phase query for a total Boolean function. It proves phase kickback, the conversion from a standard query using an explicitly prepared target, and the reverse conversion only when controlled phase access is granted. Query calls and nonoracle gate costs remain separate. The page also gives a clean compute-copy-uncompute argument, the two-residue operations and parity dot product, and an exact reversible Toffoli circuit. A constant phase is invisible when used alone but becomes a relative phase under an explicit control.
Each exact circuit count uses a local operation model that permits its named gates as callable members of the declared finite gate alphabet; defining a gate matrix alone does not grant an operation call. Explicit oracle calls remain separate from nonoracle gate occurrences.
3 · Logical flowchart
4 · Definitions, theorems and proofs
Standard bit-flip query convention
Definition
Let and let be a total function. The standard bit-flip query for is the coherent XOR action
on the ordered -bit address register followed by the ordered -bit target register. Here is componentwise addition modulo two, and words label the ordered computational basis as in Finite registers and their ordered computational bases and Big-endian encoding of ordered bit strings. The address is unchanged. One invocation is one query under Promise query instance and oracle family; its query cost is separate from elementary gate cost.
The map is an involution and is unitary by A total Boolean XOR oracle is unitary and involutive. No injectivity of is assumed.
Facts & Assumptions
Given: A total Boolean function on finite ordered address and target registers, with the XOR action above.
A total Boolean XOR oracle is unitary and involutive: every total Boolean XOR oracle is unitary and its square is the identity, without an injectivity hypothesis.
Verification
On each computational-basis input , the defined action leaves fixed and changes to . Applying it twice changes the target to , since each bit toggled twice returns to its original value. Hence the action is involutive on every basis vector.
The displayed action is exactly the total Boolean XOR oracle in [F1], so [F1] gives its unitarity. Because the action retains each address and only translates its target by , it does not require distinct addresses to have distinct function values; no injectivity assumption is needed.
Binary phase-query convention
Definition
For a Boolean function , the phase query is the linear operator on the address register defined on its ordered computational basis by
This definition supplies uncontrolled access only. Controlled access to is a separate promise and is not implied by an uncontrolled call.
Facts & Assumptions
Given: A Boolean function on and the ordered computational basis of the -bit address register.
Finite registers and their ordered computational bases: the -bit register has the ordered computational basis indexed by , including the one-dimensional empty register when .
Promise query instance and oracle family: a query function is total on the address domain; the promise restricts instances, not addresses.
The product basis is orthonormal and tensor dimensions multiply: the ordered computational-basis vectors of the address register form an orthonormal basis, including the empty register.
Verification
For each basis vector , the coefficient is either or . Therefore maps the ordered basis to scalar multiples of itself and preserves each basis vector's norm.
Distinct basis vectors remain orthogonal because their images are scalar multiples of the same distinct basis vectors; the diagonal coefficients have modulus one. By [F4] these vectors form an orthonormal basis, so the linear extension preserves the inner product on a basis and hence on every vector; it is unitary in finite dimension.
Applying twice to gives . The basis spans the register by [F4], so on the whole register.
Phase kickback from the standard bit query
Statement
Let be a total Boolean function. If the one-bit target of its standard query is prepared in
then one standard query acts on every address basis vector by
Thus the address acquires exactly the phase query , while the target returns unchanged. The same identity holds for every address superposition.
Facts & Assumptions
Given: The total Boolean function, the standard XOR query, and the normalized target vector .
Binary phase-query convention: , extended linearly.
Pure state and ray: a normalized nonzero vector represents a pure state; the displayed unit vector is an allowed target state.
Finite registers and their ordered computational bases, The computational basis is orthonormal and The product basis is orthonormal and tensor dimensions multiply: the ordered computational-basis vectors span each finite address register, including the zero-qubit register.
Dirac Notation Conversion: ket notation denotes the corresponding vectors with the repository's stated inner-product convention.
Proof
If , the query leaves the target bits unchanged, so it fixes . If , it swaps the target basis vectors and sends to . Therefore in both cases the target returns unchanged and the scalar is .
By [F2], the address factor in step 1.1 is exactly . Any address vector is a finite linear combination by [F4]; linearity of gives . Hence the target is unchanged and the identity holds on every superposition.
One standard query implements one phase query
Statement
Let be total. Starting a target qubit in , apply and then , and make one standard bit query. Since , phase kickback implements on the address and returns the target to . This conversion uses one query plus exactly two nonoracle one-qubit gates; the target preparation is explicit and assumes no preprepared state or generic amplitude loading.
Facts & Assumptions
Given: The zero-initialized target, the standard bit query, and the exact one-qubit gate matrices in the ordered computational basis.
Standard bit-flip query convention: one query applies .
Phase kickback from the standard bit query: a target in converts one standard query to the phase query and returns unchanged.
Finite circuit resource accounting: the declared gate count counts each and occurrence once, separately from black-box calls.
Nonoracle quantum gate cost: query calls and gates outside those calls are separate resource coordinates, and the latter count preparation gates.
For the explicit preparation from and its two-gate count, the selected nonoracle operation model has a finite gate alphabet containing and permitting and as callable gates, each occurrence is counted once, and the standard query is charged separately as one oracle call.
The phase identity in [F3] for an already prepared target does not require [A1]; [A1] is needed only for the displayed preparation from and its gate count.
Proof
From [F4], after the first gate the target is , and after the second it is . The chronological order is therefore , not .
Apply the standard query once. The phase-kickback theorem [F3], using the query action [F1] and the target established in step 1.1, gives on the address and returns the target to . By [F2] this address action is exactly the defined phase query.
The preparation has one and one , hence two nonoracle gates by [F5]–[F6], and the oracle is invoked once by [F1]. These counts are separate; the construction makes no generic state-preparation call.
Controlled phase access implements a standard bit query
Statement
Let be total. Assume the operation model explicitly supplies the controlled phase call
with the output qubit as the first, control register. On address and output , apply to the output, make one controlled phase call, and apply again. The result is , so this implements one standard query with one controlled phase call and two nonoracle gates. Bare uncontrolled access does not satisfy the stated access hypothesis.
Facts & Assumptions
Given: A Boolean function and explicit controlled access to , with control-first register order. The operation model's declared finite nonoracle gate alphabet contains and permits as a callable gate, counting each occurrence once; the controlled phase-query call is an oracle operation charged separately from those gates.
Standard bit-flip query convention: the standard query maps to .
Controlled Unitary Access: controlled access is the explicit block operation ; it is not inferred from an ordinary call.
Finite circuit resource accounting: each gate occurrence is counted once in the declared gate model.
Nonoracle quantum gate cost: gates outside a designated query call are charged separately from that query.
Finite registers and their ordered computational bases, The computational basis is orthonormal and The product basis is orthonormal and tensor dimensions multiply: the ordered address-output computational states form a complete basis of the joint register.
Proof
Fix . By [F1] and [F3], the controlled phase call acts on the output qubit by . If , this is ; if , it is .
The two possible output operators after the surrounding Hadamards are and , using the matrix in [F4]. Thus for both and the output bit becomes , while is unchanged. By [F7], these computational states form a basis, so the equality extends by linearity to every input superposition, which is exactly [F2].
The circuit uses the explicitly granted controlled phase call once and has two occurrences. By [F5]–[F6] these are two separately charged nonoracle gates; no uncontrolled call is promoted to controlled access.
Compute-copy-uncompute yields a clean coherent function query
Statement
Let be total. Suppose a finite nonoracle gate circuit preserves the address and, from zero value and workspace registers, computes
for every , with gate count . Suppose its exact inverse circuit is available with the same gate count and acts only on the address, value, and workspace registers. Applying , copying the output bits to a fresh target by CNOTs, and applying implements the standard query, restores the value and workspace registers to zero, and uses exactly gate occurrences. Any query calls in a different implementation must be charged separately.
For a finite Boolean DAG with noninput nodes, input-port uses counted with multiplicity, and ordered output ports, the current QC10 reversible-embedding construction itself already implements the clean XOR query. Its local cost theorem gives at most gates and clean work bits. Thus its size is , and is when , as for the stated bounded-fan-in graphs. No depth bound is inferred from the classical Boolean DAG.
Facts & Assumptions
Given: A total function, a clean reversible evaluator with an exact same-count inverse, a fresh target register, and the QC10 Boolean-DAG supplier for the concrete cost statement. The operation model's declared finite nonoracle gate alphabet contains and permits CNOT for the generic copy step; and its exact inverse are available as circuits over that model. For the concrete QC10 cost claim, it contains and permits , CNOT and Toffoli, each counted as one nonoracle gate occurrence. Any black-box query calls are charged separately.
Clean and dirty ancillas: a clean workspace initialized at zero must return exactly to zero for every allowed data input.
Inverse Unitary Access: the inverse circuit applies the gate inverses in reverse chronological order; its availability and charge are explicit.
CNOT and Control-Target Order: CNOT from a control bit to a distinct target bit maps to .
Standard bit-flip query convention: the desired standard action is .
Reversible embedding of a Boolean circuit: the QC10 procedure evaluates each Boolean-DAG node into work bits, copies the ordered output ports into the target, and reverses its evaluation list.
Gate, workspace, and serial-depth costs of reversible embedding: for the specified DAG and gate model, that procedure implements the standard XOR action with clean work and at most gates and work bits.
Finite circuit resource accounting: gate size counts each occurrence; oracle calls, depth, width, and other costs are separate coordinates.
Finite registers and their ordered computational bases, The computational basis is orthonormal and The product basis is orthonormal and tensor dimensions multiply: the ordered basis vectors of the joint address, value, workspace and target registers form a complete basis.
Proof
On basis input , the first circuit produces by the assumed evaluator identity. The output register is a separate factor from the fresh target.
Applying one CNOT from each output bit to its corresponding target bit leaves , , and the zero workspace unchanged, and changes to by [F3].
Apply to the address, value, and workspace factors. Since on those factors and does not act on the target, the result is . This is the standard query action [F4] with clean work [F1]. The gate count is by [F2] and [F7].
The basis vectors with value and work initially zero span the allowed input subspace by [F8]. The composed circuit is linear, so step 3.1 extends to every superposition in that subspace. Thus the standard query action and clean-work identity hold for all allowed vector inputs.
The finite Boolean-DAG procedure [F5] already includes its own output copy and reverse pass. Therefore its complete elementary gate-occurrence bound for implementing the XOR action is the supplier bound [F6], not an additional application of the generic construction. The stated asymptotic forms follow by dividing the exact bound by the indicated parameter relation when that relation holds.
Binary residue carrier and operations
Definition
Set
with addition and multiplication induced by the quotient operations
from Addition and multiplication on by and . This item fixes the two residue classes and their operations. It does not assert the field axioms; those must be established separately before an argument uses field properties.
Facts & Assumptions
Given: The quotient-set and arithmetic definitions for the modulus .
The congruence class and the quotient set : two residue classes modulo are equal exactly when their representatives are congruent modulo .
Addition and multiplication on by and : addition and multiplication are the representative-independent operations and .
Congruence modulo an integer: when , including the moduli and : means divides .
Verification
Every integer has the form for some and . For , induction starts with ; from obtain , and from obtain . For , apply the nonnegative case to : if , then , and if , then . By [F3], , so [F1] gives . Hence every quotient class is one of .
The classes and are distinct: equality would give by [F1], hence by [F3], which is impossible because no integer satisfies . Together with step 1.1, this proves that the quotient has exactly the two listed classes.
Applying [F2] to representatives and gives the addition table , , , , and the multiplication table , , . Since steps 1.1 and 2.1 show that these are all quotient classes, the tables are exhaustive; both operations take values in this carrier and are exactly the quotient operations.
Binary dot product as parity
Definition
For and , define the one-bit binary dot product
where is Boolean conjunction and is the left-to-right fold of XOR, with empty fold . It is the parity of the number of coordinates where both bits are . Under the quotient operations of Binary residue carrier and operations, this bit represents the sum in ; the equality uses only the operation definitions, not the field axioms.
Facts & Assumptions
Given: A length- pair of binary strings , where may be zero.
Input encoding and size for algorithmic tasks: bit strings are the specified finite binary encodings, and their length fixes the width .
Binary residue carrier and operations: the two classes have quotient addition and multiplication; their addition table is XOR and their multiplication table is Boolean conjunction.
The congruence class and the quotient set : the carrier consists of the residue classes modulo .
Addition and multiplication on by and : the quotient operations are induced by integer addition and multiplication on representatives.
Verification
For bits , the four cases give . Thus for each coordinate by [F2] and [F4].
Let and for . The base case has , the empty sum. If is the left-to-right sum of the first coordinate products, the addition table in [F2] and the coordinate identity in step 1.1 give . Hence the identity holds at every by finite induction, including .
At , is the defined XOR fold , so step 2.1 proves that its residue class is the sum of the coordinate products in the quotient operations. No field axiom is used.
Reversible binary dot-product query
Definition
Input: An integer , ordered -bit registers , a one-bit target , and one distinct clean work bit .
Output: The reversible map
Gate model: Use an operation model whose declared finite nonoracle gate alphabet contains and permits Toffoli and CNOT as callable gates; each listed occurrence counts once under Finite circuit resource accounting. This procedure makes no black-box oracle call.
Instructions: For , apply Toffoli with controls and target . Apply CNOT from to . Then apply those same Toffoli gates in reverse order, from down to . All gates act on the ordered computational-basis registers of Finite registers and their ordered computational bases; their basis actions are fixed in Toffoli and Fredkin gates and CNOT and Control-Target Order. For , the forward and reverse loops are empty and the XOR fold is .
The procedure uses Toffoli occurrences and one CNOT occurrence, with one clean work bit. It has no failure branch.
Reversible binary dot product: correctness and exact cost
Statement
For every , the algorithm Reversible binary dot-product query maps every computational-basis input to
It therefore implements the same linear map on superpositions. Its exact cost is Toffoli gates, one CNOT, and one clean work bit; it has no failure branch.
Facts & Assumptions
Given: , binary strings , an arbitrary target bit , a clean work bit , and the stated gate sequence. The operation model's declared finite nonoracle gate alphabet contains and permits Toffoli and CNOT as callable gates, each occurrence is counted once under [F7], and this circuit makes no black-box oracle calls.
Reversible binary dot-product query: the sequence accumulates coordinate products into , copies to , and reverses the Toffoli sequence.
Binary dot product as parity: is the left-to-right XOR fold of the bits , with empty fold .
Toffoli and Fredkin gates: Toffoli preserves its two controls and toggles its target by their product.
CNOT and Control-Target Order: CNOT preserves its control and toggles its target by the control value.
Clean and dirty ancillas: a clean ancilla starts and ends exactly at zero.
The computational basis is orthonormal and The product basis is orthonormal and tensor dimensions multiply: the ordered computational-basis product vectors of the data, target and work registers form a basis of their joint register.
Dirac Notation Conversion: ket notation denotes the corresponding vectors, with the repository's stated inner-product convention.
Finite circuit resource accounting: each occurrence of a declared gate contributes one occurrence to the gate count.
Proof technique: induction on the forward and reverse loop indices.
Proof
Before any Toffoli gate, , which is the empty parity .
If after processing coordinates the work bit is , the next Toffoli leaves the controls unchanged and changes to by [F3]. Thus the forward invariant holds for every .
At the end of the forward loop, by [F2]. This includes , for which step 1.1 is already the final state.
The CNOT now changes to and leaves unchanged by [F4].
In the reverse loop, define to be the accumulator after the gates for coordinates have been applied. Before any reverse gate, . If , the next Toffoli toggles by , so . Descending through therefore ends at . The reverse gates do not change , so the work bit is clean.
The input basis map is the claimed map by steps 3.1 and 4.1. Every gate is linear, and the computational basis spans the finite joint register by [F6], so the same identity holds on every superposition. The forward and reverse loops each have Toffoli occurrences and there is one CNOT, giving the exact stated nonoracle gate-occurrence count; the algorithm has no branch and makes no oracle call.
A constant phase query is invisible alone and relative under control
Statement
Let be constant with value . Its phase query is . A standalone call therefore leaves every pure-state measurement law unchanged. If the model explicitly grants controlled phase-query access, the two constant cases are distinguishable: on address and control , control of returns when and when . Measuring the control in the basis distinguishes them with certainty. No controlled access is inferred from a bare phase-query call.
Facts & Assumptions
Given: A constant Boolean function, the associated phase query, finite-dimensional quantum registers, and—only for the controlled conclusion—an explicit controlled phase-query call.
Standalone Global Phase Leaves Pure-State POVM Probabilities Unchanged: multiplication of a normalized pure-state vector by a scalar of modulus one leaves every finite POVM outcome probability unchanged.
Controlled Unitary Access: an explicitly controlled call is the control-first block operator .
Exact one-qubit gates and rotations: fixes the exact one-qubit matrices and the ordered qubit basis.
The computational basis is orthonormal: the ordered qubit computational basis is orthonormal.
A Controlled Global Phase Becomes a Relative Control Phase: for a nonzero finite-dimensional space, unitary , and real , separate controlled access to both and gives different measurement laws when ; the theorem supplies an explicit eigenvector input and control measurement.
Controlled access to is an explicit operation-model assumption. The controlled identity is the identity operator and requires no oracle call.
Proof
Since for every address , [F1] gives on a basis; hence .
Under [A1], the controlled block is if . If , it is by [F3]. Applying these blocks to gives respectively and . This is the , relative-phase instance of [F6]; the controlled identity is the identity operation and the other block is the explicitly granted controlled phase call.
The scalar has modulus one. Applying [F2] to any normalized address state shows that the standalone call preserves every finite POVM outcome law. This verifies the statement even when and the vector acquires a minus sign.
The explicit vectors and have unit norm and inner product zero by [F5]. The two control outputs therefore give opposite deterministic outcomes when measured in that basis, proving distinguishability. The proof uses the explicitly controlled operation [A1] and makes no claim from uncontrolled access alone.
5 · Examples, counterexamples and false statements
None yet.