Alphabeta Math
LemmaStatement: AI-adaptedProof: 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.

Efficient coherent amplitude-grid rounding

Statement

For every integer k≥2, put M=2k. There is a deterministic uniformly generated finite reversible circuit with the action

∣y,z,0w⟩⟼∣y,zXORaM(y),0w⟩

for every k-bit integer 0≤y<M and every (2k+1)-bit target z, where aM(y) is an integer satisfying

0≤aM(y)≤M2,aM(0)=0,∣aM(y)M2−sin⁡2(πyM)∣≤34M2.

Circuit generation time, gate count in X, CNOT and Toffoli, serial depth, and clean workspace are all polynomial in k. The identity holds on arbitrary coherent inputs and with finite reference registers. Its actual inverse and coherent controls have the same polynomial resource order. The algorithm uses only bounded exact integer/rational arithmetic with fixed loop counts depending on k; it performs no real equality test or equality-dependent precision refinement. The output encodes the rational aM(y)/M2 by its numerator and the known fixed denominator.

Facts & Assumptions

Given: k≥2, M=2k, and a k-bit input y.

[F1]

The principal arctangent has derivative 1/(1+x2) and its integral formula. (Principal arctangent: derivative, integral, power series, and the Gregory–Leibniz series).

[F4]

The finite Taylor remainder is bounded by the derivative bound times ∣x∣n/n!. (A uniform derivative bound gives a uniform Taylor remainder bound).

[F6]

A finite Boolean DAG admits compute-copy-reverse with the declared linear gate/work overhead. (Reversible embedding of a Boolean circuit, Gate, workspace, and serial-depth costs of reversible embedding).

Proof

1.1givenF1F2F3algebra

Put a=arctan⁡(1/5) and b=arctan⁡(1/239). Principal monotonicity and tan⁡(π/4)=1 give 0<b<a<π/4. The tangent double-angle formula gives tan⁡(2a)=5/12<1, so 2a<π/4 and 0<4a<π/2. A second doubling gives tan⁡(4a)=120/119>1, hence 4a>π/4>b. The subtraction formula gives tan⁡(4a−b)=120/119−1/2391+(120/119)(1/239)=1. All denominators are positive, and 0<4a−b<4a<π/2. Injectivity of the principal tangent branch therefore proves 4a−b=π/4, or π=16arctan⁡(1/5)−4arctan⁡(1/239). This is a local proof of the needed Machin identity.

2.1F1step 1.1algebra

For 0≤x<1 and any integer J≥1, the exact finite geometric identity is 11+t2=∑j=0J−1(−1)jt2j+(−1)Jt2J1+t2. Integrating from zero to x and using the arctangent integral yields ∣arctan⁡x−∑j=0J−1(−1)jx2j+12j+1∣≤x2J+12J+1. This is a finite bound, requiring no limit test during the algorithm. Set J=k+8 and form the exact rational π^=16∑j=0J−1(−1)j(2j+1)52j+1−4∑j=0J−1(−1)j(2j+1)2392j+1. Step 1.1 and the finite integral estimate above give ∣π^−π∣≤2052J+1≤11024M2, because 52k≥22k=M2 and 20⋅1024<517. In particular 0<π^<4: for the lower bound, π/4=∫01(1+t2)−1 dt>1/2 gives π>2; for the upper bound, step 1.1 and arctan⁡(1/5)<1/5 give π<16/5, and the displayed error is below 1/1024.

3.1F3F4step 2.1algebra

Set x=π^y/M, so 0≤x<4, and set the even integer n=16(k+4). Compute the exact rational sine polynomial S(x)=∑j=0n/2−1(−1)jx2j+1(2j+1)!. Every derivative of sine has absolute value at most one. The Taylor remainder bound at degree n−1 gives ∣S(x)−sin⁡x∣≤4nn!≤(32n)n/2≤2−n/2≤14096M2. Indeed the last n/2 factors in n! are at least n/2, so n!≥(n/2)n/2, and n≥96≥64. Finally n/2=8(k+4)≥2k+12 gives the stated precision.

3.2step 2.1algebra

All rational computations above have polynomial bit length in k. For the arctangent sum at q∈{5,239}, one may take as an unreduced common denominator Dq=∏j=0J−1(2j+1)q2j+1, whose bit length is O(J2+Jlog⁡(J+1))=O(k2). Obtain each numerator by exact division of this known multiple, then sum with the indicated signs. A common denominator for π^ is D5D239, still of O(k2) bits; the same bound holds for its numerator. Therefore x=P/Q can be written with integer P≥0, Q>0 of O(k2) bits, without rational reduction.

4.1F3F5step 2.1step 3.1algebra

The derivative bound for sine and the mean value theorem give ∣sin⁡x−sin⁡(πy/M)∣≤∣π^−π∣y/M≤1/(1024M2). Put s=sin⁡(πy/M) and d=5/(4096M2). Step 3.1 implies ∣S(x)−s∣≤d<1 and ∣s∣≤1. Consequently ∣S(x)2−s2∣≤d(2+d)≤3d=154096M2<14M2. Thus the exact rational square r=S(x)2 approximates the desired probability with absolute error strictly below 1/(4M2).

5.1givenstep 4.1algebra

If y=0, set aM(y)=0 explicitly. Otherwise write the exact rational r=U/V with integers U≥0 and V>0, without requiring cancellation to lowest terms. Use integer division to compute q=⌊2M2U+V2V⌋,aM(y)=min⁡(M2,max⁡(0,q)). The floor rule is deterministic nearest-grid rounding, breaking rational half-grid ties upward. Hence ∣q/M2−r∣≤1/(2M2). Clipping to [0,1] cannot increase distance from the true probability s2∈[0,1]. Step 4.1 therefore gives ∣aM(y)/M2−s2∣<14M2+12M2=34M2. For y=0, the exact target is zero, so the bound also holds. Every comparison in this procedure compares finite integers, including any tie; there is no comparison against an exact transcendental number.

6.1step 3.1step 3.2algebra

A common denominator for the sine polynomial is D=Qn−1(n−1)!. Its jth integer numerator term is (−1)jP2j+1Qn−2j−2(n−1)!(2j+1)!. All exponents are nonnegative and every indicated division is exact. The powers, factorials, terms, common denominator, and signed partial sums have O(k3) bits: n=O(k), log⁡P,log⁡Q=O(k2), and log⁡((n−1)!)=O(klog⁡(k+1)). Summing O(k) terms adds only O(log⁡(k+1)) extra bits. Thus S=A/D can be computed with O(k3)-bit signed integers; U=A2, V=D2, and the final integer division in step 5.1 have the same bit-length order.

7.1step 5.1step 3.2step 6.1constructalgebra

There are only polynomially many arithmetic operations: products for the two denominators, powers and factorials, O(k) Taylor terms and their exact divisions, and one final quotient/clamp. Schoolbook addition, subtraction and comparison of L-bit integers use O(L) elementary Boolean operations, multiplication uses O(L2) operations by summing shifted partial products, and long division uses O(L2) operations by O(L) shift/compare/subtract stages. Signed integers can use a sign bit and a magnitude of the fixed safe length; all denominators are known positive. The operation counts and safe register lengths depend only on k. Unroll their loops and implement data branches by Boolean selection between the two computed results. Thus a deterministic classical generator produces a Boolean DAG for y↦aM(y) of polynomial size and description length in k, in polynomial time. This also covers generation of the rational constants; no constant table of exponential length or unit-cost unbounded integer arithmetic is assumed.

8.1F6step 7.1constructalgebra∎

Apply compute-copy-reverse to that Boolean DAG: evaluate its nodes in fresh clean bits, XOR-copy its (2k+1) output bits to z, and reverse every evaluation gate. The inspected reversible embedding theorem gives the asserted XOR action, polynomial elementary gate count, serial depth and clean workspace, all restored to zero. The Boolean circuit's uniform generation proof in step 7.1, followed by the finite node-gadget compiler, gives polynomial-time generation of the actual reversible gate list. The clean identity extends by linearity to coherent inputs and finite references. Its actual reversal has identical gate count. For an external control, either use a compute/controlled-copy/uncompute construction on the same Boolean function, or control the fixed reversible gate list; the former directly gives a constant-factor resource increase and restores all scratch. No real-number refinement or measurement occurs. This proves the Statement.

Depends on

Used by

Dependency tree · two levels

67 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