betaFeedback

WorksPhysics and Astronomy

Formally Verified Asymptotic Optimality of Parallel Find-Any Search and Machine-Checked Benchmark Improvements in Lean 4

Abstract

A general finite-n query lower bound and an exact asymptotic optimality theorem are proved in Lean 4.35.0 for parallel GroverFindAny under the frozen specifications of DeepMind's formal-quantum-computation benchmark suite (arXiv:2611.09822v3). While the restricted single-checkpoint infimum rho_* = 1/2 + 1/pi was previously established by Fang and Heunen (2026), it is proved here that inf{R in R : Feasible(m,k,R)} = 1/2 + 1/pi across all OracleDynamicCircuit programs–permitting arbitrary finite workspace, adaptive intermediate measurements, and nested qWhile loops under uniform k-subset averaging, probability-one success, and expected parallel rounds–on all 121 dyadic grid cells. Two supplementary verified constructions are presented: a 5/16-module rewrite by which ArcsinK25ConstCost is reduced from 369,800 to 366,200 (3,662 T x 100 Q, TOFF=0, -0.9735%, with exact compiled counts and a 100-qubit non-vacuity witness), and single-cell (1024, 512) GroverFindAll bounds lowered by 0.038% (sign-only walk) and 0.946% (to 26,768,771,052/10^12 via 14 Kraus filters with restarts, proved uniformly for all n >= 80,000 above the inherited cutoff, exact fallback below); partial THCFactorization foundations are documented in Appendix B. All new derivations, formalizations, audits, and prose were produced purely by AI systems under human supervision; formal claims are machine-checked in Lean 4.35.0 against frozen libraries using standard axioms only, with the flagship FindAny theorems also accepted by two third-party kernels (nanoda, con-ron).

Introduction, epistemic classification, and overview

In fault-tolerant quantum algorithm design, competing trade-offs must be balanced among query complexity, non-Clifford gate counts (TT or Toffoli gates), and logical qubit counts [3, 4, 5, 6, 14, 13, 15, 16]. Because fault-tolerant circuits at their intended target scales lie far beyond exact classical state-vector simulation, formal-quantum-computation was introduced by Shirobokov et al. [1]: a Lean 4 library grounded in quantum Hoare logic with classical variables [17, 18, 19, 20], together with machine-checkable benchmark specifications (QuantumComputationSpecs) and an AI-discovered reference branch (discoveries). The following tasks are covered by those benchmarks: parallel unstructured search (GroverFindAny and GroverFindAll, where speedups up to 2.57× over the historical GR0 baseline are achieved at cell (1024, 512)), reversible fixed-point quantum arithmetic (ArcsinK25ConstCost, where prior baselines are reduced by 290× to spacetime cost 369,800), and large-scale quantum simulation challenges including the unsolved THCFactorization specification.

When correctness semantics and resource accounting are frozen inside a proof assistant, sharp impossibility barriers and verified circuit improvements can be formalized independently with machine-checked validity relative to the frozen specification and trusted Lean kernel, without access to the original authors’ internal search infrastructure. The present study was executed on a single 32 GB workstation in Lean 4.35.0 under a human-directed purely AI-generated workflow detailed in § 6.

Epistemic classification

To separate machine-checked theorems from external computations and incomplete infrastructure, every claim in this paper is assigned to one of three explicit tiers:

  • Tier (A) — Machine-checked Lean 4.35.0 theorems against frozen specifications. Every Tier (A) theorem is proved in Lean 4.35.0 against byte-identical copies of QuantumComputation (57 source files) and QuantumComputationSpecs (15 files: 7 .lean sources, 7 challenge JSONs, and ChallengeJsons/README.md) from commit 489edc7039aa4cdded53724b39ea90e33d2c88b4, with zero sorry, zero native_decide, and only subsets of Lean’s standard axioms {propext, Classical.choice, Quot.sound}. The same Lean 4.35.0 kernel implementation is invoked by both lean and leanchecker; additionally, the flagship FindAnyLowerBound and TighterFindAny theorems were exported via leanexport and independently accepted by two third-party checkers (nanoda 0.4.19 and con-ron—verified; § 6), whereas the remaining benchmark suites rest on the Lean 4.35.0 kernel alone.

  • Tier (B) — Partial formal foundations. Machine-checked Lean 4.35.0 modules (Track1THC, 9 modules, 1,956 lines; Appendix § 8) are provided in which algebraic and circuit-composition building blocks are verified against the frozen library without filling the public challenge holes.

  • Tier (C) — External certified numerics, bounded screens, and paper lower bounds. Arbitrary-precision interval enclosures in python-flint/Arb [22] (the external GR0 reference constant used to express asymptotic GroverFindAll speedup ratios and the exhaustive 16,777,217-input arcsin ULP audit), independent rational Taylor enclosures (enclose.py), finite Boolean Möbius, Pfaffian, and MILP computations, and paper proofs linking finite witnesses to restricted gate-model lower bounds (Appendix § 9) are classified here.

Hierarchy of results

The scientific weight of the contributions is deliberately stratified. The primary theoretical result is the general adaptive lower bound and exact asymptotic optimality of parallel GroverFindAny (§ 3). The ArcsinK25ConstCost reduction (§ 4, Theorem 4.1) and the single-cell asymptotic GroverFindAll upper bounds (§ 5) are presented as supplementary benchmark-specific constructions. The rational precision refinement TighterFindAny is recorded only as a brief technical remark (§ 3.4), and the partial THCFactorization modules are placed in Appendix § 8. The main results relative to the pinned discoveries commit a88de8ff65d78af564b2373088ca369dc95f6547 are summarized in Table 1.

Benchmark / ProblemPrior baseline [2, 1]Present workContributionTier
GroverFindAny (general adaptive model; 121 grid cells)Constant 1/2+1/π1/2 + 1/\pi and restricted-family infimum [2]; parallel upper bound [1]inf⁡{R:Feasible(m,k,R)}=1/2+1/π\inf\{R : \mathrm{Feasible}(m,k,R)\} = 1/2 + 1/\pi over all OracleDynamicCircuit + finite-nn boundGeneral adaptive optimality(A)
ArcsinK25ConstCost (Q2.23, 100 QQ)369,800 (3,698 T×100QT \times100 Q, TOFF = 0)366,200 (3,662 T×100QT \times100 Q, TOFF = 0) + exact compiled count & witness−3,600 spacetime (−36 TT, −0.9735%); 5/16 modules edited(A)
GroverFindAll (1024, 512) sign-only27,024,465,988/101210^{12} (≥ 2.574566× vs ext. GR0)27,014,193,664/101210^{12} (≥ 2.57554525548× vs ext. GR0)−0.038011% upper bound (eventual; n≥80,000n \ge80{,}000 engine)(A)/(C)†
GroverFindAll (1024, 512) weak filtersPinned discovery (≥ 2.574566× vs ext. GR0)26,768,771,052/101210^{12} (≥ 2.599158481606× vs ext. GR0)−0.946% vs pinned (−0.908% vs sign-only); 14 Kraus filters (all n≥80,000n \ge80{,}000)(A)/(C)†
THCFactorization (Appendix B)Unsolved (absent from discoveries)9 helper modules (1,956 lines), 0/7 def. holes + 0/2 thmsPartial infrastructure only(B)

Table 1. Stratified summary of results relative to google-deepmind/formal-quantum-computation (main 489edc70, discoveries a88de8ff). †In Lean 4.35.0, the single-cell (1024, 512) exact rational upper bound relative to vanillaFindAllCost is certified (Tier A); derived asymptotic speedup multipliers are obtained by dividing an externally enclosed 256-bit Arb lower bound for GR0 by the Lean upper bound (Tier C).

Hardware scope note. As documented in QuantumComputationDiscoveries/README.md on the discoveries branch of [1], 230–233 GB of peak RAM (plus swap) are required to run the upstream Lean comparator on the three large-scale quantum simulation benchmarks (P450Ground Energy, Photochemistry, StoppingPower), by which the 32 GB host workstation is exceeded; those benchmarks were not modified or re-verified.

Related work and exact positioning

To evaluate novelty precisely, the contributions must be positioned against four lines of prior work: adaptive expected-cost quantum search, parallel multi-item search, weak-measurement search protocols, and multiplicative-complexity circuit synthesis over F2\mathbb{F}_2.

Expected-cost optimality, BBHT, Zalka’s angle method, and Fang–Heunen [4, 5, 2]. Distinct settings are treated in classical optimality analyses of unstructured search. Grover’s algorithm for multiple marked items, unknown-size restart schedules, and general search lower bounds were analyzed by Boyer, Brassard, Høyer, and Tapp [4], whereby the standard π4N/k\frac{\pi}{4}\sqrt{N/k} fixed-budget scale was established. Exact fixed-budget optimality for a single marked item was proved by Zalka [5], by whom the shared-memory synchronous parallel query model adopted in QuantumComputationSpecs and the geometric angle-displacement technique were also introduced in the single-target setting. That geometric technique is extended to multi-target uniform kk-subset parallel oracles by the compression bound in § 3.2. Moreover, a strictly different variational problem is posed by the frozen GroverFindAny benchmark: minimizing the expected number of parallel oracle rounds, averaged uniformly over kk-element marked sets, among variable-stopping-time protocols that are required to terminate with certainty (probability one) on every marked set.

Crucially, the leading constant ρ⋆=1/2+1/π\rho_\star= 1/2 + 1/\pi is not new. An exact weak-measurement-conditioned loop for known target probability pp using (π/8+1/4+o(1))/p(\pi/8 + 1/4 + o(1))/\sqrt{p} iterations—from which, upon specialization to p=k/Np = k/N and division by the standard π4N/k\frac{\pi}{4}\sqrt{N/k} scale, precisely ρ∗=1/2+1/π\rho_* = 1/2 + 1/\pi is obtained—was derived by Fang and Heunen [2], together with a matching infimum within their continuous-angle analysis of a restricted single-checkpoint weakly measured loop family [2]. That result is cited directly by Shirobokov et al. [1], where 1/2+1/π1/2 + 1/\pi is recorded in Appendix E.§ 2 Eq. (9) and achievability is extended to parallel grid cells in Appendix E.§ 3.

The contribution of Section 3 is therefore neither the discovery of the constant 1/2+1/π1/2 + 1/\pi nor the upper-bound circuit, both of which belong to [2, 1]. Rather, an extended multi-target parallel angle-displacement bound is combined with a convex stopping potential that is non-decreasing under adaptive measurements, and it is formalized in Lean 4.35.0 that no asymptotic coefficient below 1/2+1/π1/2 + 1/\pi is achievable by any protocol in the full OracleDynamicCircuit class—wherein arbitrary finite workspace, arbitrary oracle-independent unitaries, arbitrary legal slot embeddings, adaptive intermediate measurements, and arbitrarily nested qWhile loops are permitted.

Quantum Las Vegas complexity (Belovs–Yolcu [7]). A general adversary framework for Las Vegas quantum query complexity is formulated by Belovs and Yolcu ([7], § 4.1), in which coherent query cost L(A,O,ξ)L(A,O,\xi) is measured by the squared norm of the active state component entering each query. In § 4.1 of [7], a one-way conversion is also noted from any algorithm BB using intermediate measurements to a deferred-measurement algorithm AA satisfying T(B,O,ξ)≥L(A,O,ξ)T(B,O,\xi) \ge L(A,O,\xi), by which coherent Las Vegas adversary lower bounds are shown to lower-bound operational expected query cost. However, that coherent lower bound is not tight for the operational realized-round cost in QuantumComputation (where each realized parallel oracle call across classical branches and nested loops is charged, as is any fixed unitary whose matrix coincides with an embedded oracle). Specifically, as a Tier (C) analytical comparison for single-target search with N≥2N \ge2 and a single bit oracle, the corresponding coherent Las Vegas adversary optimization is solved by Ladv∗=N−1/2L^*_{\mathrm{adv}} = \sqrt{N-1}/2: the bit-oracle feasibility condition 4ab=14ab = 1 is satisfied by primal weights a2=N−1/4a^2 = \sqrt{N-1}/4 on the target index and b2=1/(4N−1)b^2 = 1/(4\sqrt{N-1}) elsewhere, while the dual witness Γ=(J−I)/(2N−1)\Gamma= (J-I)/(2\sqrt{N-1}) (where JJ denotes the N×NN \times N all-ones matrix and (Δj)xy=1[x=j]≠[y=j](\Delta_j)_{xy} = \mathbf{1}_{[x=j]\ne[y=j]} denotes the binary difference mask for index jj) has star-graph norm ∥Γ∘Δj∥=1/2\lVert\Gamma\circ\Delta_j \rVert= 1/2 (so ∥2(Γ∘Δj)∥=1\lVert2(\Gamma\circ\Delta_j)\rVert= 1 for the full bit-oracle difference block) and top eigenvalue N−1/2\sqrt{N-1}/2. Thus an asymptotic leading constant of 1/21/2 (relative coefficient $2/\pi \approx 0.6366) is produced by the coherent adversary, rather than the sharp operational constant π/8+1/4≈0.6427\pi/8 + 1/4 \approx0.6427 (relative coefficient 1/2+1/π≈0.81831/2 + 1/\pi\approx0.8183). In Section 3, the sharp operational lower bound is proved directly in the quantum Hoare semantics of [17, 1].

Parallel multi-item search and weak measurements [5, 6, 8, 9]. Parallel unstructured search has been developed from Zalka [5] for parallel single-target queries and Grover and Radhakrishnan [6] for finding kk marked items using mm parallel processors. Likewise, weak measurements and controlled damping in quantum search have established precursors, including Mizel’s critically damped quantum search [8] and the weakly measured while-loop semantics of Andrés-Martínez and Heunen [9]. The Kraus pair (K0,t,K1,t)(K_{0,t}, K_{1,t}) employed in Section 5 is a standard partial projective test on the full-occupancy subspace; the incremental contribution of Section 5 lies in combining full-occupancy Kraus checks with the 24-segment Johnson walk, optimizing the schedule under survival-weighted branch accounting, and formally verifying the resulting finite-circuit restart bound in Lean 4.35.0.

Boolean multiplicative complexity and formal specification fidelity [10, 11, 12, 21]. Algebraic-degree lower bounds on multiplicative complexity (MC⁡(f)≥deg⁡(f)−1\operatorname{MC}(f) \ge\deg(f)-1) and polar-matrix canonicalization of quadratic Boolean forms over F2\mathbb{F}_2 were introduced by Schnorr [10] and Mirwald and Schnorr [11], and were further developed in low-complexity classification studies such as Çalık, Sönmez Turan, and Peralta [12]. In Section 4, these algebraic techniques are integrated with the live-wire spans, 50-ancilla budget, uncomputation constraints, residual phase cancellation, and full Lean 4.35.0 proof obligations of the frozen 25-bit arcsine circuit. Finally, as emphasized in the Lean FRO comparator documentation [21] (particularly regarding definition holes), solving the intended problem is not guaranteed by the absence of sorry or custom axioms alone; specification fidelity is established only when exact agreement of both public theorem signatures and the underlying model definitions against the frozen specification is verified.

Exact asymptotic optimality of parallel GroverFindAny

The greatest lower bound of feasible eventual relative coefficients in the frozen parallel GroverFindAny model is established to be

ρ∗=12+1π\rho_* = \frac{1}{2} + \frac{1}{\pi}

on every cell (m,k)(m,k) of the 121-cell dyadic grid. The lower bound itself is proved parametrically for all positive integers m,k>0m,k > 0; the 121-cell grid is the domain on which every strictly larger real coefficient is realized by the matching archived upper construction of [1].

The frozen model, formal statements, and scope boundaries

The abbreviations N=2nN = 2^n, S=groverTargetSets⁡ n kS = \operatorname{groverTargetSets}\ n\ k, and L=∣S∣L = \lvert S\rvert are adopted throughout this section, and groverParallelMarkingOracle⁡ m S\operatorname{groverParallelMarkingOracle}\ m\ S is denoted by OSO_S. A single source circuit CC, fixed before SS is drawn uniformly from SS, is given by the type

OracleDynamicCircuit⁡ (Unitary⁡ (2w)) Grover.Var⁡ w ((n+1)m).\operatorname{OracleDynamicCircuit}\ (\operatorname{Unitary}\ (2^w))\ \operatorname{Grover.Var}\ w\ ((n+1)m).

Within this type, arbitrary finite workspace ww (possibly depending on nn) may be allocated, arbitrary oracle-independent unitaries may be applied, legal embeddings of the mm-slot parallel oracle (each slot holding an nn-bit address and one marking bit) may be invoked, intermediate measurements with classical branching may be performed, and arbitrarily nested qWhile loops may be executed. The compiled program, cost model, and vanilla scaling are denoted by

PS=qset⁡;;C.compile⁡ QProg.qAssign⁡ OS,CS=CostModel.ofEmbeddedOracle⁡ OS,Vany⁡(n,m,k)=vanillaFindAnyCost⁡ n m k=π4Nmk.\begin{aligned} P_S &= \operatorname{qset} \mathbin{;;} C.\operatorname{compile}\ \operatorname{QProg.qAssign}\ O_S,\\ C_S &= \operatorname{CostModel.ofEmbeddedOracle}\ O_S,\\ V_{\operatorname{any}}(n,m,k) &= \operatorname{vanillaFindAnyCost}\ n\ m\ k = \frac{\pi}{4}\sqrt{\frac{N}{mk}}. \end{aligned}

Under the frozen cost model CSC_S, one oracle round is charged for each oracle invocation and also for any fixed unitary step whose matrix coincides with an embedded oracle. Total correctness with probability one for every marked set is denoted by H(C,k)H(C,k) (Lower.Correct):

∀S∈S,{⊤} PS {σ↦∃x∈S, σ(Grover.Var.res⁡)=x.val⁡}.\forall S \in\mathcal{S},\quad\{\top\}\ P_S\ \{\sigma\mapsto\exists x \in S,\ \sigma(\operatorname{Grover.Var.res}) = x.\operatorname{val}\}.

The certificate predicate AvgOracleCostBound⁡ k (S↦CS) (S↦PS) q\operatorname{AvgOracleCostBound}\ k\ (S \mapsto C_S)\ (S \mapsto P_S)\ q is abbreviated as A(C,k,q)A(C,k,q), under which per-set nonnegative real certificates qSq_S are required to satisfy the frozen CostBound for all S∈SS \in\mathcal{S} with uniform average at most qq. Values in R≥0∞\mathbb{R}_{\ge0}^{\infty} (ENNReal) are taken by the underlying operational cost expectedCost.

Theorem 3.1 (Finite certificate and actual expectation). Suppose n,m,k,w∈Nn,m,k,w \in\mathbb{N} are given with 0<m0 < m, 0<k0 < k, and k≤Nk \le N, and CC is a circuit of the type above. With

B(n,m,k)=(π/4+1/2)(1−k/N)2arcsin⁡mk/N,B(n,m,k) = \frac{(\pi/4 + 1/2)(1-k/N)}{2\arcsin\sqrt{mk/N}},

where Lean’s total real inverse sine (equal to π/2\pi/2 on arguments ≥1\ge1) is denoted by arcsin:

  1. (finite) Under H(C,k)H(C,k), the inequality B(n,m,k)≤qB(n,m,k) \le q is satisfied by every q∈Rq \in\mathbb{R} for which A(C,k,q)A(C,k,q) holds.

  1. (actual_expected_rounds) Under H(C,k)H(C,k), for every store σ:Store Grover.Var\sigma: \mathit{Store\ Grover.Var},

ENNReal.ofReal⁡(B(n,m,k))≤∑S∈SexpectedCost⁡(CS,PS,seed⁡(w,σ))L.\operatorname{ENNReal.ofReal}(B(n,m,k)) \le\frac{\sum_{S\in\mathcal{S}}\operatorname{expectedCost}(C_S,P_S,\operatorname{seed}(w,\sigma))}{L}.

where σ\sigma is paired with the pure quantum state ∣0w⟩|0^w\rangle by seed⁡(w,σ)\operatorname{seed}(w,\sigma) (Track2Grover.Path.seed). Infinite expected cost is included in the extended-real comparison, and no external certificate qq is required.

For fixed positive m,k∈Nm,k \in\mathbb{N} and R∈RR \in\mathbb{R}, the predicate Feasible(m,k,R)(m,k,R) is defined to hold whenever there exist w:N→Nw : \mathbb{N} \to\mathbb{N} and a family Cn:Lower.Circuit⁡ n m (w(n))C_n : \operatorname{Lower.Circuit}\ n\ m\ (w(n)) such that

∀n,1≤n⇒k≤2n⇒H(Cn,k),\forall n,\quad1 \le n \mathrel{\Rightarrow} k \le2^n \mathrel{\Rightarrow} H(C_n,k),
∃n0,∀n≥n0,k≤2n⇒A(Cn,k,RVany(n,m,k)).\exists n_0,\quad\forall n \ge n_0,\quad k \le2^n \mathrel{\Rightarrow} A(C_n,k,R V_{\mathrm{any}}(n,m,k)).

Theorem 3.2 (Asymptotic boundary and exact infimum). In namespace Track2Grover.FindAnyLowerBound:

  1. (asymptotic_real) For all m,k>0m,k > 0 and R∈RR \in\mathbb{R}, if Feasible(m,k,R)(m,k,R) holds then ρ∗≤R\rho_* \le R.

  1. (no_smaller_rational) For all m,k>0m,k > 0 and R∈Q≥0R \in\mathbb{Q}_{\ge0} with (R:R)<ρ∗(R : \mathbb{R}) < \rho_*, the predicate Feasible(m,k,R)(m,k,R) is false.

  1. (exact_infimum) For every (m,k)∈groverGrid×groverGrid(m,k) \in\mathit{groverGrid} \times\mathit{groverGrid} (where groverGrid={2j:0≤j≤10}\mathit{groverGrid} = \{2^j : 0 \le j \le10\}), the predicate IsGLB is satisfied at ρ∗\rho_* for {R∈R:Feasible⁡(m,k,R)}\{R \in\mathbb{R} : \operatorname{Feasible}(m,k,R)\}; equivalently,

inf⁡{R∈R:Feasible⁡(m,k,R)}=12+1π.\inf\{R \in\mathbb{R} : \operatorname{Feasible}(m,k,R)\} = \frac{1}{2} + \frac{1}{\pi}.

Explicit scope boundaries. Theorems 3.1 and 3.2 are restricted specifically to (i) expected parallel oracle rounds, (ii) uniform averaging over kk-element marked sets of known size kk, (iii) termination and marked output with probability one, (iv) circuits in the frozen OracleDynamic Circuit model with arbitrary finite workspace w(n)w(n), and (v) fixed positive (m,k)(m,k) as n→∞n \to\infty. Attainment at equality by a single real witness is not asserted by the infimum; because ρ∗\rho_* is irrational, equality with ρ∗\rho_* is impossible for any submitted nonnegative rational. Different success probabilities (e.g. bounded-error search) or non-uniform input distributions are excluded from these theorems.

Coherent progress potential and convexity under branching

The executions for all S∈SS \in\mathcal{S} are coupled into a direct-sum Hilbert space ⨁S∈SHw\bigoplus_{S\in\mathcal{S}}\mathcal{H}_w, and the subspace of vectors constant across the hidden label SS is denoted by KK, with orthogonal projection ΠK\Pi_K. For any nonzero branch vector xx, its squared norm is denoted by s=∥x∥2s = \lVert x\rVert^2 and its angle α(x)∈[0,π/2]\alpha(x) \in[0,\pi/2] to KK is defined by ∥ΠKx∥2=scos⁡2α(x)\lVert\Pi_Kx\rVert^2 = s\cos^2\alpha(x) (with zero contribution assigned to zero branches). With c=π/4+1/2c = \pi/4 + 1/2, the progress potential is defined by

Φ(s,α)={s(c−α),0≤α≤π/4,scos⁡2α,π/4<α≤π/2.\Phi(s,\alpha) = \begin{cases} s(c-\alpha), & 0 \le\alpha\le\pi/4,\\ s\cos^2\alpha, & \pi/4 < \alpha\le\pi/2. \end{cases}

In terms of the projected-mass fraction u=cos⁡2α∈[0,1]u = \cos^2\alpha\in[0,1], the per-unit-mass profile is given by

f(u)={u,0≤u≤12,c−arccos⁡u,12≤u≤1.f(u) = \begin{cases} u, & 0 \le u \le\frac{1}{2},\\ c-\arccos\sqrt{u}, & \frac{1}{2} \le u \le1. \end{cases}

At the junction u=1/2u = 1/2 (α=π/4\alpha= \pi/4), equal value (f(1/2)=1/2f(1/2) = 1/2) and equal first derivative (f′(u)=1/(2u(1−u))=1f'(u) = 1/(2\sqrt{u(1-u)}) = 1 at u=1/2u = 1/2) are shared by both pieces. On (1/2,1)(1/2,1),

f′′(u)=2u−14[u(1−u)]3/2>0;f''(u) = \frac{2u - 1}{4[u(1-u)]^{3/2}} > 0;

hence ff is continuous and convex on [0,1][0,1], and continuously differentiable on (0,1)(0,1) (indeed on [0,1)[0,1)), with matching one-sided derivatives equal to 11 at u=1/2u = 1/2 (whereas f′(u)→+∞f'(u) \to+\infty as u→1−u \to1^-, and the endpoint α=0\alpha= 0 is handled directly below). In the angle variable α\alpha, the derivative is bounded by ∣(cos⁡2α)′∣=∣sin⁡(2α)∣≤1|( \cos^2 \alpha)'| = |\sin(2\alpha)| \le1, by which a uniform unit Lipschitz bound in α\alpha across the junction is established.

One-round oracle displacement. Each physical marking oracle OSO_S is an involution in every density regime (Physical.act_involution in CoupledOracle.lean), so the coupled oracle U=⨁S∈SOSembU = \bigoplus_{S\in\mathcal{S}} O_S^{\mathrm{emb}} is a self-adjoint unitary involution (U=U†U = U^\dagger, U2=IU^2 = I). A label-constant vector y∈Ky \in\mathcal{K} is written in terms of its shared single-instance component y0∈Hwy_0 \in\mathcal{H}_w as y=(y0)S∈Sy = (y_0)_{S\in\mathcal{S}}, so that ∥y∥2=L∥y0∥2\lVert y\rVert^2 = L\lVert y_0\rVert^2. Each of the mm query addresses is contained in a uniform kk-subset SS with probability k/Nk/N; when the probability of an odd number of active hits is bounded by that of at least one hit (for which no independence across the mm slots is required), the unconditional compression inequality is obtained:

∑S∈S⟨y0,OSemby0⟩≥(1−2mk/N)L∥y0∥2,\sum_{S\in\mathcal{S}} \langle y_0, O_S^{\mathrm{emb}} y_0\rangle\ge(1 - 2mk/N)L\lVert y_0\rVert^2,
Re⁡⟨y,Uy⟩=⟨y,Uy⟩≥(1−2mk/N)∥y∥2.\operatorname{Re}\langle y, Uy\rangle= \langle y, Uy\rangle\ge(1 - 2mk/N)\lVert y\rVert^2.

for every legal slot embedding OSembO_S^{\mathrm{emb}}, even on entangled inputs (where realness of the inner product follows from self-adjointness of UU, and the inequality is trivial when 1−2mk/N<−11 - 2mk/N < -1). Whenever mk≤Nmk \le N, the angle bound v=2arcsin⁡mk/N∈[0,π]v = 2\arcsin\sqrt{mk/N} \in[0,\pi] is defined, so that cos⁡v=1−2mk/N\cos v = 1 - 2mk/N. For any unit vector y∈Ky \in\mathcal{K}, Re⁡⟨y,Uy⟩≥cos⁡v\operatorname{Re}\langle y,Uy\rangle\ge\cos v, so the angle between yy and UyUy is at most vv. For an arbitrary unit branch vector xx (possibly already correlated with SS), whenever ΠKx≠0\Pi_{\mathcal{K}}x \ne0 the normalized projection y=ΠKx/∥ΠKx∥∈Ky = \Pi_{\mathcal{K}}x/\lVert\Pi_{\mathcal{K}}x\rVert\in\mathcal{K} is chosen. By unitarity of UU, the spherical angle between UxUx and UyUy is equal to α(x)\alpha(x), while the angle between UyUy and y∈Ky \in\mathcal{K} is at most vv; by the spherical triangle inequality and the characterization of α(Ux)\alpha(Ux) as the minimal angle from UxUx to K\mathcal{K} (QueryAngle.one_query),

α(Ux)≤∠(Ux,y)≤∠(Ux,Uy)+∠(Uy,y)≤α(x)+v.\alpha(Ux) \le\angle(Ux,y) \le\angle(Ux,Uy) + \angle(Uy,y) \le\alpha(x) + v.

(If ΠKx=0\Pi_{\mathcal{K}}x = 0, then α(x)=π/2\alpha(x) = \pi/2, so α(Ux)≤π/2≤α(x)+v\alpha(Ux) \le\pi/2 \le\alpha(x) + v is satisfied directly.) When the same inequality is applied to UxUx and U2=IU^2 = I is invoked, α(x)=α(U2x)≤α(Ux)+v\alpha(x) = \alpha(U^2x) \le\alpha(Ux) + v is obtained, hence ∣α(Ux)−α(x)∣≤v|\alpha(Ux) - \alpha(x)| \le v. By the unit Lipschitz bound in α\alpha, the potential Φ(s,α)\Phi(s,\alpha) is reduced by at most svsv in a single parallel oracle round.

Adaptive measurement splitting. Oracle-independent measurements may branch asynchronously across classical stores, yet within any single branch history the classical control state is shared across all components indexed by S∈SS \in\mathcal{S}. The measurement instrument is therefore represented on the coupled space by block-diagonal Kraus operators IS⊗MiI_S \otimes M_i with ∑iMi†Mi=I\sum_i M_i^\dagger M_i = I, each commuting with the label-averaging projection ΠK\Pi_{\mathcal{K}}. Consequently, when a branch (s,α)(s,\alpha) is split into children (si,αi)(s_i,\alpha_i) with vi=(IS⊗Mi)xv_i = (I_S \otimes M_i)x and ui=cos⁡2αiu_i = \cos^2\alpha_i, both total mass (∑isi=s\sum_i s_i = s) and projected mass are preserved:

∑isiui=∑i∥ΠK(IS⊗Mi)x∥2=∑i∥(IS⊗Mi)ΠKx∥2=∥ΠKx∥2=su.\sum_i s_i u_i = \sum_i \lVert\Pi_{\mathcal{K}}(I_S \otimes M_i)x\rVert^2 = \sum_i \lVert(I_S \otimes M_i)\Pi_{\mathcal{K}}x\rVert^2 = \lVert\Pi_{\mathcal{K}}x\rVert^2 = su.

An affine supporting minorant at uu is obtained from the convexity of ff (the tangent line for 0<α≤π/40 < \alpha\le\pi/4, the identity u↦uu \mapsto u for α>π/4\alpha> \pi/4, and direct equality when α=0\alpha= 0 forces ui=1u_i = 1 on every positive-mass child), whereby split_potential (CoupledHistory.lean) is proved:

Φ(s,α)≤∑iΦ(si,αi).\Phi(s,\alpha) \le\sum_i \Phi(s_i,\alpha_i).

Thus the potential budget charged to oracle rounds cannot be reduced by adaptive measurement branching.

Finite execution-tree inequality. On any branch halted with classical output address zz, nonzero amplitude is supported only on hidden sets S∋zS \ni z (a fraction k/Nk/N of SS), so its projected mass fraction is bounded by u≤k/Nu \le k/N via Cauchy–Schwarz. By convexity of ff on [0,1][0,1] with f(0)=0f(0)=0 and f(1)=cf(1)=c,

f(u)≤(1−u)f(0)+uf(1)=cu,f(u) \le(1-u)f(0)+uf(1)=cu,

whereby the terminal potential of every halted branch is bounded above by c(k/N)sc(k/N)s (and in fact by (k/N)s(k/N)s whenever k/N≤1/2k/N \le1/2; see Remark 3.3). For a finite execution tree T\mathcal{T} started from an unnormalized label-constant vector x∈Kx \in K of squared norm ∥x∥2=L\lVert x\rVert^2=L, the expected oracle rounds executed on target set SS are denoted by qT(S)q_{\mathcal{T}}(S), the summed expected query count across SS by QT=∑S∈SqT(S)Q_{\mathcal{T}}=\sum_{S\in\mathcal{S}}q_{\mathcal{T}}(S), and the unnormalized unfinished timeout mass by hT=L−finished⁡(T,x)h_{\mathcal{T}}=L-\operatorname{finished}(\mathcal{T},x). When the branch inequalities are summed under zero wrong-output mass (cL≤vQT+c(k/N)(L−hT)+chT)(cL \le vQ_{\mathcal{T}}+c(k/N)(L-h_{\mathcal{T}})+ch_{\mathcal{T}}), the scaled tree bound (and its equivalent per-instance average form after division by L>0L>0) is obtained:

c(1−k/N)(L−hT)≤vQT⟺c(1−k/N)(1−hTL)≤vQTL.(1)c(1-k/N)(L-h_{\mathcal{T}})\le vQ_{\mathcal{T}} \qquad\Longleftrightarrow\qquad c(1-k/N)\left(1-\frac{h_{\mathcal{T}}}{L}\right)\le v\frac{Q_{\mathcal{T}}}{L}. \tag*{(1)}

Reduction from nested loops to finite trees and actual expected cost

The extension of (1) from finite trees to arbitrary OracleDynamicCircuit programs with nested qWhile loops and extended-real expectedCost is carried out across five formal stages in flat modules under Track2Grover/ (FiniteReduction.lean, LowerPath.lean, LowerScoreBridge.lean, LowerAccounts.lean, LowerSeed.lean, CoupledLimit.lean, and LowerActual.lean):

  1. Uniform finite unrolling of nested loops (Fuel.cap). Every loop in a program PP (regardless of nesting depth) is truncated simultaneously by a single natural-number fuel parameter i∈Ni \in\mathbb{N} via the recursive map qWhile g P ↦\mapsto unroll g (cap i P) i, where unroll g P′ 0 = abort and unroll g P′ (d+1) = qIf g (qSeq P′ (unroll g P′ d)) skip. Because structural truncation commutes with oracle compilation (compile_cut in LowerPath.lean), cap i (C.compile qAssign O_S) is represented exactly by a finite execution tree Ti\mathcal{T}_i with explicit timeout leaves.

  1. Monotonicity and cost domination (Fuel.cap_cost). The operational orders Below P₁ P₂ (satisfied when obs(P₁,δ,θ) ≤ obs(P₂,δ,θ) for all δ,θ\delta,\theta) and StateBelow δ η (satisfied when mass(δ,θ) ≤ mass(η,θ) for all θ\theta) are introduced on programs and states. By structural induction over sequential composition, conditionals, and loop unrollings, Below (cap i P) P is proved together with

expectedCost⁡(C,cap⁡iP,δ)≤expectedCost⁡(C,P,δ)\operatorname{expectedCost}(\mathcal{C},\operatorname{cap} i P,\delta) \le\operatorname{expectedCost}(\mathcal{C},P,\delta)

for every cost model C\mathcal{C} and state δ\delta. Combined with score_calls_le_cost (LowerScoreBridge.lean), the per-instance expected query count qi(S)q_i(S) of the truncated tree Ti\mathcal{T}_i is bounded by

qi(S)≤expectedCost⁡(CS,PS,seed⁡(w,σ))for all i,S,q_i(S) \leq\operatorname{expectedCost}(\mathcal{C}_S,\mathcal{P}_S,\operatorname{seed}(w,\sigma)) \quad\text{for all } i,S,
Qi:=∑S∈Sqi(S)≤∑S∈SexpectedCost⁡(CS,PS,seed⁡(w,σ)).Q_i := \sum_{S\in\mathcal{S}} q_i(S) \leq\sum_{S\in\mathcal{S}} \operatorname{expectedCost}(\mathcal{C}_S,\mathcal{P}_S,\operatorname{seed}(w,\sigma)).
  1. Cofinal convergence and vanishing unfinished mass (Fuel.cofinal). By structural induction on PP, lim⁡i→∞obs⁡(cap⁡ i P,δ,θ)=obs⁡(P,δ,θ)\lim_{i\to\infty}\operatorname{obs}(\operatorname{cap}\ i\ P,\delta,\theta)=\operatorname{obs}(P,\delta,\theta) is established for every initial state δ\delta and bounded effect θ\theta in the public cofinality theorem Fuel.cofinal (Approaches (fun t => cap t P) P, with fields mono, upper, and limit). Under Hoare total correctness H(C,k)H(C,k), unit trace and zero mass on incorrect stores are proved for the full output state on every S∈SS\in\mathcal{S} (correct_output_mass in LowerAccounts.lean). Wrong-output mass on every truncation TiT_i is therefore forced by monotonicity to vanish identically (bad(T_i,S)=0), while with θ=⊤\theta=\top the limit lim⁡i→∞finished⁡(Ti,x)=L\lim_{i\to\infty}\operatorname{finished}(T_i,x)=L is obtained, so the unnormalized unfinished mass hi=L−finished⁡(Ti,x)h_i=L-\operatorname{finished}(T_i,x) converges to 00 (and hi/L→0h_i/L\to0).

  1. Input-independence of the initial state (seed_reset). Because every compiled benchmark program begins with qset ; ; C.compile qAssign O_S, the quantum register is reset to ∣0w⟩\lvert0^w\rangle independently of SS. For any fixed initial classical store σ\sigma, δ=seed⁡(w,σ)\delta=\operatorname{seed}(w,\sigma) is invariant under qset (seed_reset in LowerSeed.lean), so the unnormalized coupled initial vector x=copy⁡(S,∣0w⟩)x=\operatorname{copy}(S,\lvert0^w\rangle) is placed identically inside the label-constant subspace KK with squared norm ∥x∥2=L=∣S∣\lVert x\rVert^2=L=\lvert S\rvert.

  1. Passing to the limit and handling infinite expected cost (Actual.mean_lower_bound). For any finite real bound qq with A(C,k,q)A(C,k,q), the summed query count is bounded by Qi≤LqQ_i\leq Lq for all ii; when Qi/L≤qQ_i/L\leq q is substituted into the normalized right-hand form of (1), c(1−k/N)(1−hi/L)≤vqc(1-k/N)(1-h_i/L)\leq vq is obtained, and in the limit hi→0h_i\to0 the finite bound B(n,m,k)=c(1−k/N)/v≤qB(n,m,k)=c(1-k/N)/v\leq q (finite) is proved. For the direct extended-real expectation in actual_expected_rounds, if ∑S∈SexpectedCost⁡(CS,PS,seed⁡(w,σ))=∞\sum_{S\in\mathcal{S}}\operatorname{expectedCost}(\mathcal{C}_S,\mathcal{P}_S,\operatorname{seed}(w,\sigma))=\infty, then division by L>0L>0 yields ∞\infty and the inequality is discharged trivially by le_top. Otherwise every summand is finite, so finite pointwise seed costs zS:=(expectedCost⁡(CS,PS,seed⁡(w,σ))).toNNReal⁡z_S := (\operatorname{expectedCost}(\mathcal{C}_S,\mathcal{P}_S,\operatorname{seed}(w,\sigma))).\operatorname{toNNReal} are extracted for that fixed initial state seed⁡(w,σ)\operatorname{seed}(w,\sigma) (distinct from an all-states AvgOracleCostBound certificate), with uniform average L−1∑S∈SzSL^{-1}\sum_{S\in\mathcal{S}}z_S equal to the real part of the mean. The proof across all regimes simultaneously is completed by applying CoupledLimit.of_seed_semantics directly to these seed costs with clipped density b=min⁡(mk/N,1)b=\min(mk/N,1) (where arcsin⁡b=arcsin⁡mk/N\arcsin\sqrt{b}=\arcsin\sqrt{mk/N} under Lean’s total arcsin, and the trivial compression bound 1−2⋅1=−11-2\cdot1=-1 when mk>Nmk>N is provided by Cauchy–Schwarz).

Dense regime, matching upper bound, and technical remarks

Although all density regimes are already covered uniformly in Actual.mean_lower_bound via the clipped density b=min⁡(mk/N,1)b=\min(mk/N,1), a case split on N≤2mkN\leq2mk is performed in the certificate entry Universal.finite using an independent, more elementary first-query argument (DenseFindAny, FirstQuery): when every oracle call is replaced by abort, a common oracle-independent output is produced whose average success probability over S\mathcal{S} is at most k/Nk/N, whereby at least 1−k/N1-k/N first queries are forced, dominating B(n,m,k)B(n,m,k) throughout N≤2mkN\leq2mk (including k=Nk=N, where the numerator is zero).

Upon division of B(n,m,k)B(n,m,k) by Vany(n,m,k)V_{\mathrm{any}}(n,m,k),

B(n,m,k)Vany(n,m,k)=(12+1π)(1−kN)mk/Narcsin⁡mk/N→n→∞12+1π\frac{B(n,m,k)}{V_{\mathrm{any}}(n,m,k)} = \left(\frac{1}{2}+\frac{1}{\pi}\right) \left(1-\frac{k}{N}\right) \frac{\sqrt{mk/N}}{\arcsin\sqrt{mk/N}} \xrightarrow[n\to\infty]{} \frac{1}{2}+\frac{1}{\pi}

is obtained for any fixed positive mm, kk, by which asymptotic_real and no_smaller_rational are proved. On every cell (m,k)∈groverGrid×groverGrid(m,k) \in\texttt{groverGrid} \times\texttt{groverGrid}, every real R>ρ∗R > \rho_* is realized in Track2Grover.Upper.arbitrarily_close (SharpUpper.lean) by adapting the existing FindAny circuit of [1] with arbitrary positive slack, whereby exact_infimum is established.

Remark 3.3 (Finite-nn sharpenings; Tier C). Two direct Tier (C) strengthenings of the finite-nn bound on expected parallel oracle rounds TrndT_{\rm rnd} are obtained from the same framework without altering the asymptotic limit ρ∗\rho_*. First, because ff is non-decreasing on [0,1][0,1], f(u)≤f(k/N)f(u) \le f(k/N) is satisfied on every halted branch; for mk≤Nmk \le N, summing branch inequalities gives (c−f(k/N))(L−hT)≤vQT(c-f(k/N))(L-hT) \le vQ_T, and hence ES,exec[Trnd]≥(c−f(k/N))/(2arcsin⁡mk/N)E_{\mathrm{S,exec}}[T_{\rm rnd}] \ge(c-f(k/N))/(2\arcsin\sqrt{mk/N}). In particular, whenever k/N≤1/2k/N \le1/2 and mk≤Nmk \le N (with η=k/N≤1/2\eta=k/N \le1/2), f(η)=ηf(\eta)=\eta gives

ES,exec[Trnd]≥π/4+1/2−k/N2arcsin⁡mk/N(k/N≤1/2, mk≤N),E_{\mathrm{S,exec}}[T_{\rm rnd}] \ge\frac{\pi/4+1/2-k/N}{2\arcsin\sqrt{mk/N}} \qquad(k/N \le1/2,\ mk \le N),

exceeding the numerator c(1−η)c(1-\eta) of Theorem 3.1 by (c−1)η>0(c-1)\eta> 0. Second, for 0<k<N0<k<N, producing any output with positive probability prior to the first oracle call is ruled out by probability-one correctness across all S∈SS \in\mathcal{S} (since every fixed address zz is excluded by some S∈SS \in\mathcal{S}), so ES,exec[Trnd]≥1E_{\mathrm{S,exec}}[T_{\rm rnd}] \ge1 is also satisfied unconditionally. These finite-nn sharpenings are Tier (C) paper corollaries and have not been substituted into the archived Lean 4.35.0 theorem.

Remark 3.4 (Technical note on TighterFindAny). With the physical circuit of [1] left unchanged, the submitted rational constant is tightened in the companion module TighterFindAny from 514159265358979323847/628318530717958647692 to

257079632679489661923314159265358979323846=12+13.14159265358979323846,\frac{257079632679489661923}{314159265358979323846} = \frac{1}{2} + \frac{1}{3.14159265358979323846},

a decrease of 1/628318530717958647692≈1.5915×10−211/628318530717958647692 \approx1.5915 \times10^{-21} lying 2.67831×10−222.67831 \times10^{-22} above ρ∗\rho_*. This is purely a formal certificate adjustment at the precision ceiling of Mathlib’s Real.pi_gt_d20, not an algorithmic advance.

Supplementary Construction I: Reversible fixed-point arcsine at spacetime cost 366,200

In the reference circuit for ArcsinK25ConstCost in [1], 3,698 TT gates are used on 100 logical qubits (50 data wires and 50 clean ancillas, TOFF = 0). Through two targeted rewrites of its reversible Boolean operation tables, the count is reduced to 3,662 TT gates while the computed lookup table, phase coherence, clean-ancilla return, and 100-qubit width are preserved, whereby the frozen spacetime metric TQTQ is lowered by 3,600 units (−36T-36T, −0.9735%-0.9735\%) to 366,200.

Specification, exact compiled gate counts, and non-vacuity

In the frozen specification (QuantumComputationSpecs.Primitives.Arcsin), both the register bit-width p.k∈Np.k \in\mathbb{N} and the maximum absolute error tolerance p.ε∈Rp.\varepsilon\in\mathbb{R} are bundled in the record p:ArcsinPrecp : \texttt{ArcsinPrec}. Under the frozen precision hypotheses $3 \le p.k$ and 2−(p.k−1)≤p.ε2^{-(p.k-1)} \le p.\varepsilon, each (p.k)(p.k)-bit word is encoded in signed two’s-complement Q2.(p.k−2)(p.k-2) format via dec⁡(u)\operatorname{dec}(u) signed(u) 2−(p.k−2)(u)\,2^{-(p.k-2)}, with 2p.k−1+12^{p.k-1}+1 valid inputs satisfying ∣dec⁡(u)∣≤1|\operatorname{dec}(u)| \le1. By the general parameterized theorem arcsin_correctness, it is certified that for every p:ArcsinPrec‘satisfyingp : \texttt{ArcsinPrec}` satisfying3 \le p.k$ and 2−(p.k−1)≤p.ε2^{-(p.k-1)} \le p.\varepsilon, there exists an output table z:Fin⁡(2p.k)→Fin⁡(2p.k)z : \operatorname{Fin}(2^{p.k}) \to\operatorname{Fin}(2^{p.k}) obeying ∣dec⁡(z(u))−arcsin⁡(dec⁡(u))∣≤p.ε|\operatorname{dec}(z(u))-\arcsin(\operatorname{dec}(u))| \le p.\varepsilon on all 2p.k−1+12^{p.k-1}+1 valid inputs such that the coherent lookup-addition unitary

∣w⟩∣b⟩∣0arcsinAncillas(p)⟩⟼∣w⟩∣(b+z(w)) mod 2p.k⟩∣0arcsinAncillas(p)⟩|w\rangle|b\rangle|0^{\text{arcsinAncillas}(p)}\rangle \longmapsto |w\rangle|(b+z(w))\bmod2^{p.k}\rangle|0^{\text{arcsinAncillas}(p)}\rangle

is realized by arcsinProgram p with clean ancilla return on every disjoint pair of data and ancilla registers (RealizesCleanSubroutine). Because the program is parameterized by the full record p, outside the benchmark regime (p.k=25∧1.25×10−7≤p.εp.k = 25 \mathbin{\wedge} 1.25 \times10^{-7} \leq p.\varepsilon) an exact half-ULP rounded fallback table is selected, whereas at the benchmark instance p=ArcsinPrec.k25p = \texttt{ArcsinPrec.k25} (p.k=25p.k = 25, p.ε=1.25×10−7p.\varepsilon= 1.25 \times10^{-7}, Q2.23 format, 16,777,217 valid inputs, arcsinAncillas.k25=50\texttt{arcsinAncillas.k25} = 50) the optimized 100-qubit circuit k25DynCircuit with table z25 is selected.

Theorem 4.1 (Benchmark correctness, spacetime bound, exact logical counts, and non-vacuity at ArcsinPrec.k25). At the benchmark specialization p=ArcsinPrec.k25p = \texttt{ArcsinPrec.k25} (p.k=25p.k = 25, p.ε=1.25×10−7p.\varepsilon= 1.25 \times10^{-7}, Q2.23, 50 data qubits and 50 clean ancillas):

  1. (arcsin_correctness.k25) In the proof term of the existential theorem arcsin_correctness instantiated at p=ArcsinPrec.k25p = \texttt{ArcsinPrec.k25}, the output table is witnessed by the concrete table z=z25z = \texttt{z25}, for which ∣dec⁡(z(u))−arcsin⁡(dec⁡(u))∣≤1.25×10−7\lvert\operatorname{dec}(z(u)) - \arcsin(\operatorname{dec}(u)) \rvert\leq1.25 \times10^{-7} on all 16,777,217 valid inputs is independently proved by z25_satisfies_abs_error, and the coherent lookup-addition unitary ∣u⟩∣b⟩∣050⟩↦∣u⟩∣(b+z(u)) mod 225⟩∣050⟩\lvert u\rangle\lvert b\rangle\lvert0^{50}\rangle\mapsto\lvert u\rangle\lvert(b + z(u)) \bmod2^{25}\rangle\lvert0^{50}\rangle is proved to be realized by arcsinProgram.k25 with clean ancilla return on every disjoint register placement (RealizesCleanSubroutine).

  1. (arcsin_k25_const_cost) Across every register placement (including overlapping placements), zero primitive TOFF gates and a spacetime cost of at most 366,200 are certified for arcsinProgram.k25.

  1. (ExactAudit.exactPublicK25) On every disjoint wire placement satisfying DisjointWires, the compiled logical gate counts and spacetime cost of arcsinProgram.k25 are proved to be exact:

T=3,662,TOFF=0,TQ=3,662(50+50)=366,200.T = 3{,}662,\qquad\mathrm{TOFF} = 0,\qquad TQ = 3{,}662(50 + 50) = 366{,}200.
  1. (ExactAudit.exactPublicK25_nonvacuous) The predicate DisjointWires and the exact compiled counts above are attained by the canonical contiguous placement of data wires 0–49 and ancilla wires 50–99 on 100 qubits (QRegister.block, DisjointWitness.lean).

Compiled logical TT gates are priced by these counts in the frozen Clifford+TT+measurement model (not fault-tolerant physical costs after quantum error correction). Because zero weight is assigned to Clifford gates in the frozen metric, the total number of Op102 instructions is increased from 19,705 to 19,961; consequently, the −0.9735% TT-count reduction cannot be equated directly to an identical end-to-end hardware speedup without full surface-code Clifford and routing analysis.

Polar-matrix factorization in s3aOps and product-basis change in s4_2Ops

Standard F2\mathbb{F}_2 quadratic-form canonicalization and multiplicative-complexity techniques [10, 11, 12] are adapted to the live-wire spans, ancilla constraints, and phase-coherence obligations of the arcsine pipeline:

Coefficient loader s3aOps (496 →\to 472 TT, −24 TT). Before s3aOps, the 440 reachable dyadic magnitude cubes are partitioned into 28 mutually exclusive coarse classes keyed by the five address wires 45, 46, 47, 48, 58 (27 classes of 16 states and 1 class of 8 states, constructed by group_stats in the archived script partitions.py), by which a one-hot class-indicator vector B=(B1,…,B28)∈F228B = (B_1,\ldots,B_{28}) \in\mathbb{F}_2^{28} is defined with the disjointness relations

BiBj=0(i≠j),Bj2=Bj,∑j=128Bj=1B_i B_j = 0\quad(i \ne j),\qquad B_j^2 = B_j,\qquad\sum_{j=1}^{28} B_j = 1

satisfied on every reachable state. At twelve Hadamard-gadget writes (target wires 51, 55, 66, 53, 50, 52, 54, 56, 62, 63, 64, and 65 in circuit order), each target bit is fitted over F2\mathbb{F}_2 as ϕ=ℓ+q(ξ)+ξTβ(B)\phi= \ell+ q(\xi) + \xi^{\mathsf{T}}\beta(B) on twelve live-wire parities ξ∈F212\xi\in\mathbb{F}_2^{12}, where ℓ\ell is affine in the live wires and the 28 class indicators, each component of β(B)\beta(B) lies in the surviving linear subspace of class-indicator sums spanned by the live wires, and the alternating polar matrix AA defined by q(x+y)+q(x)+q(y)=xTAyq(x+y)+q(x)+q(y)=x^{\mathsf{T}}Ay (with q(0)=0q(0)=0) is of full rank 12. With g(B)=A−1β(B)g(B)=A^{-1}\beta(B), the shift identity

q(ξ+g(B))=q(ξ)+ξTβ(B)+q(g(B))q(\xi+g(B))=q(\xi)+\xi^{\mathsf{T}}\beta(B)+q(g(B))

is satisfied identically over F2\mathbb{F}_2. Crucially, because BB is one-hot on reachable states (BiBj=0B_iB_j=0 for i≠ji\ne j, Bj2=BjB_j^2=B_j), every quadratic function of linear combinations of the class indicators—in particular q(g(B))q(g(B))—is reduced on reachable states to a linear combination of B1,…,B28B_1,\ldots,B_{28}; furthermore, in closed_forms.py, each emitted gadget is checked directly to verify that the resulting residual lies in the live affine wire span and matches the original target bit across all reachable states. By symplectic diagonalization, q(ξ+g(B))q(\xi+g(B)) is decomposed into six parity products up to an affine correction; because 1 TT is charged for each positive or negative parity step in an hGadget, 24 TT are saved when each of the twelve Hadamard gadgets is reduced from 8+8 steps (16 TT) to 7+7 steps (14 TT). Because coherent phase cancellation across superpositions is not guaranteed by Boolean agreement alone, the residual sign across all eight slice trees is computed and eliminated via a consolidated zero-TT-weight schedule of 22 ZZ and 178 CZCZ gates (200 corrections).

Forward 9-bit square s4_2Ops (172 →\to 160 TT, −12T-12 T). In the frozen truncated 9-bit square lookup, full-adder carries are given over F2\mathbb{F}_2 by maj⁡(a,c1,c2)=c2+(a+c2)(c1+c2)\operatorname{maj}(a,c_1,c_2)=c_2+(a+c_2)(c_1+c_2). Through evolutionary column-compression search, a 42-product graph was identified whose subsequent gates depend, modulo linear input terms, only on a 22-dimensional subspace of its first 24 product generators. When those generators are replaced by a rank-one product basis over the nine input bits and column compression is rescheduled within the 25 local scratch wires, a 347-operation table is obtained using 40 paid and 4 tt gates (down from 43) and 31 quadratic erasures, while the 21-AND reverse square s5_2CoreOps (84 TT) is left unchanged and exact agreement on all 100 wires is verified across all 1,024 input/flag combinations.

Patch scope, stage accounting, and local tightness

Only 5 of the 16 arcsine modules are modified relative to the pinned discoveries branch (Table 2); the remaining 11 modules, the core library, and the frozen specification are byte-identical. All 32 stage boundaries are listed in Table 3; in the 449-case and 4,705-case packed traces, a peak of 50 live ancillas along the execution trace is reached at eight distinct stages (s3a, s3bAdd, s3bPost, s4_2, s4_3, s5_1, s5_2Core, s5_3), showing why coordinated multistage rescheduling is required to reduce width below 100 qubits.

Modified arcsine moduleChange relative to pinned discoveries (a88de8ff)
ArcsinPublic numeral 369,800 →\to 366,200 and final multiplication bound.
StageTablesAForward square table s4_2Ops (43 →\to 40 paid ANDs).
StageTablesBSix sequences implementing the s3aOps gadget and phase rewrite.
StageCircuitBUpdated local and aggregate AND/TT count certificates.
StageProofBAggregate AND count 776 →\to 773 and compiled TT-bound 3,698 →\to 3,662.

Table 2. The five modified arcsine modules; the remaining 11 of 16 arcsine modules are byte-identical to upstream.

StageRef. TTNew TTAncillasStageRef. TTNew TTAncillas
s1B000/0/0s4_339239234/50/42
s1Y92920/23/0s4_420020042/49/42
s1Add96960/24/0s5_136036042/50/34
hop_0000/1/1s5_2Core848434/50/25
s2a68681/18/13hop_40025/26/25
s2b18818813/14/13s5_2Post646425/42/12
s2c0013/13/3hop_50012/12/12
s3a4964723/50/28s5_366466412/50/18
s3bAdd10410428/50/28hop_60018/18/18
s3bPost29429428/50/27s5_4767618/40/14
hop_10027/28/27s6a0014/21/13
s4_1484827/34/28s6b18818813/14/13
hop_20028/28/28s6c202013/18/1
s4_1Post0028/28/25hop_7001/1/0
hop_30025/26/25s7Y92920/23/0
s4_217216025/50/34s1B000/0/0

Table 3. Stage-by-stage TT-gate counts and start/peak/end packed ancilla counts in the 449-case trace (with the suffix Ops omitted; s1B is executed twice). Column sums are 3,698 (reference) and 3,662 (present work).

External accuracy enclosure and restricted lower bounds (Tier C). Independently of the universal Lean accuracy theorem z25_satisfies_abs_error, an exhaustive 128-bit Arb pass was run over all 8,388,609 magnitudes (extended by exact oddness to all 16,777,217 signed inputs), in which 16 candidates above 1.04304543162 ULP were screened and the top two were refined at 256-bit precision. Bound to the final candidate StageProofB.lean, worst-case magnitude u=3,932,278u = 3,932,278 (output integer 4,092,728) is identified with error 1.0485006779846463 ULP against the 1.048576 ULP limit (margin 7.5322×10−57.5322 \times10^{-5} ULP).

Surrounding stages are further characterized by two restricted Tier (C) local tightness analyses and one bounded MILP optimization screen (detailed in Appendix C, and explicitly distinguished from global circuit lower bounds): (i) algebraic degree 18 on wires 50, 55 of s2a and 72, 81 of s6c is established by an exhaustive 23-bit Boolean Möbius transform, from which, in the fixed-interface bit-trace model of Appendix C, a forward lower bound of 4(18−1)=684(18 - 1) = 68 TT is deduced for s2a and, via the reverse-direction affine-rank bound deg⁡≤1+12+ν\deg\le1 + 12 + \nu over the 12 added garbage coordinates, a lower bound of 20 TT is deduced for s6c (both attained tightly by the existing tables); (ii) when 17 reference products are held fixed in the reverse square s5_2CoreOps (spanning a 35-dimensional fixed subspace together with the 9 input and 9 output bits) and intermediates are restricted to the 39-dimensional total reference input/output/product span, 66 proper subspaces of the 4-dimensional quotient are screened down to a single eligible hyperplane H0H_0 on which an algebraic contradiction across all 7 nonzero directions is certified by 4-index Pfaffian parity witnesses (4,554–5,838 Pfaffians checked across 18,146 weight-≤2\le2 assignments per direction), proving 21 ANDs necessary within that restricted span; and (iii) in bounded MILP screens of the late-adder carry recurrence (scipy.optimize.milp with the HiGHS backend, relative gap 0, 10 s limit) with 39 scratch slots across 18 placements of the 8 helper products in 3–6 zero-return bursts, solver infeasibility below 166 ANDs is reported (SciPy return code 2, HiGHS model status 8; solver-reported infeasibility without an independently verified proof certificate, paired with a 200-slot positive control in which a checked 133-AND witness is found). Unrestricted circuit minimality and universal qubit lower bounds remain open.

Supplementary Construction II: Parallel GroverFindAll at (1024, 512)

In GroverFindAll, the entire kk-element marked set SS must be encoded in the output with probability one for every admissible n≥1n \ge1, k≤2nk \le2^n, and S∈SS \in\mathcal{S}. Exactly one cell, (m,k)=(1024,512)(m,k)=(1024,512), is claimed by both constructions below, for which an eventual-in-nn uniform-average cost upper bound

∃n0, ∀n≥n0,k≤2n⟹AvgOracleCostBound⁡(k,C,P,rVall(n,m,k))\exists n_0,\ \forall n \ge n_0,\quad k \le2^n \Longrightarrow\operatorname{AvgOracleCostBound}(k,C,P,rV_{\mathrm{all}}(n,m,k))

is proved, where Vall(n,m,k)=π4(∑ℓ=1kℓ−1/2)2n/mV_{\mathrm{all}}(n,m,k)=\frac{\pi}{4}\left(\sum_{\ell=1}^{k}\ell^{-1/2}\right)\sqrt{2^n/m}. Machine-checked asymptotic upper bounds are compared through the certified rationals rr given below; because distinct proofs may carry different slack, the ratio of two upper bounds does not automatically equal the exact ratio of true expected costs.

Sign-only Johnson walk and coherent full-occupancy Kraus filters

Both constructions are built on a width-one collective Johnson walk over subsets E⊂[N]E \subset[N] of cardinality ∣E∣=ℓsm=1024|E|=\ell_s m=1024 (where “width-one” denotes block multiplicity ℓs=1\ell_s=1, i.e. a single mm-slot register block per walk step, matching Rkm128kSeg.lS = 1), grouped into the 513 symmetric orbits indexed by occupancy j=∣E∩S∣∈{0,…,512}j=|E\cap S|\in\{0,\ldots,512\}. On this 513-dimensional orbital subspace, one discrete reflection-diffusion step DaltZSD_{\mathrm{alt}}Z_S (where ZSZ_S is the marked-set phase reflection and DaltD_{\mathrm{alt}} is the symmetric Johnson diffusion) is represented by the orthogonal orbital matrix UNU_N (dAltStepOrbMat (2^n) 1024 512). Matching the exact upstream sign convention of tridiagSkewMat and dAltGenMat in FindAllJohnsonAltStep.lean, the limiting continuous-time skew-symmetric tridiagonal generator GwalkG_{\mathrm{walk}} as N→∞N\to\infty is defined by superdiagonal entries (Gwalk)j,j+1=−bj(G_{\mathrm{walk}})_{j,j+1}=-b_j and subdiagonal entries (Gwalk)j+1,j=+bj(G_{\mathrm{walk}})_{j+1,j}=+b_j, where

bj=4(j+1)(m−j)(k−j)(0≤j<k=512, m=1024).b_j=\sqrt{4(j+1)(m-j)(k-j)}\qquad(0\le j<k=512,\ m=1024).

(In the independent limiting script enclose.py, the opposite sign convention −Gwalk=JparGwalkJpar-G_{\mathrm{walk}}=J_{\mathrm{par}}G_{\mathrm{walk}}J_{\mathrm{par}} is used, conjugated by Jpar=diag⁡((−1)j)J_{\mathrm{par}}=\operatorname{diag}((-1)^j); because every diagonal sign mask DtD_t and Kraus operator K0,tK_{0,t} is invariant under conjugation by JparJ_{\mathrm{par}} and e0e_0 is fixed by JparJ_{\mathrm{par}}, all surviving branch norms, click probabilities, and expected costs are identical under either convention.) For segment t∈{1,…,24}t\in\{1,\ldots,24\} with dimensionless normalized duration st=τt⋅10−9s_t=\tau_t\cdot10^{-9} and Lean macro-substep count nSubt, exactly Mt(N)=nSub⁡t⌊τt⌊N⌋109nSub⁡t⌋M_t(N)=\operatorname{nSub}_t\left\lfloor\frac{\tau_t\lfloor\sqrt{N}\rfloor}{10^9\operatorname{nSub}_t}\right\rfloor discrete walk steps are executed (altStepCount; Appendix A), so that the finite-NN orbital propagator UNMt(N)U_N^{M_t(N)} converges to Wt=exp⁡(stGwalk)W_t=\exp(s_tG_{\mathrm{walk}}) as N→∞N\to\infty.

Sign-only refinement (Track2Grover.FindAll). Through a re-optimized 24-segment schedule (Appendix A) certified in Lean via 432 degree-28 Taylor substeps across 122 kernel-checked checkpoints (using 17 semantic engine modules adapted from DeepMind’s discoveries branch with original Google LLC headers retained), the rational upper bound

rsign=27,014,193,6641012=52,762,0971,953,125,000r_{\mathrm{sign}}=\frac{27,014,193,664}{10^{12}}=\frac{52,762,097}{1,953,125,000}

is proved, whereby the pinned discovery’s bound rref=6,756,116,497/250,000,000,000=27,024,465,988/1012r_{\mathrm{ref}}=6,756,116,497/250,000,000,000=27,024,465,988/10^{12} is lowered by 0.038011%.

Extension with coherent full-occupancy Kraus filters (Track2Weak.FindAllWeak). To avoid spending late walk segments on amplitude that has already reached full occupancy j=512j=512, the sign-only walk is augmented with an ancilla flag and 14 active weak-measurement filters across the 24 stages (developed from weak-measurement search primitives [8, 9]). The archived weak-filter attenuation parameter stored for segment tt is denoted by a~t∈[0,1]\tilde{a}_t \in[0,1] (tabulated in Appendix § 7: a~t=1\tilde{a}_t=1 for t≤9t\leq9 and t=24t=24, with 14 nontrivial filters a~t∈(0,1)\tilde{a}_t\in(0,1) at t=10t=10–2323). When the separate terminal strong readout after segment 24 is incorporated into a unified recurrence, the effective stage attenuation parameter is defined by

at={a~t,1≤t≤23,0,t=24,K0,t=diag⁡(1,…,1,at),K1,t=1−at2∣512⟩⟨512∣.a_t = \begin{cases} \tilde{a}_t, & 1 \leq t \leq23,\\ 0, & t=24, \end{cases} \qquad K_{0,t}=\operatorname{diag}(1,\ldots,1,a_t), \qquad K_{1,t}=\sqrt{1-a_t^2}\lvert512\rangle\langle512\rvert.

satisfying K0,t†K0,t+K1,t†K1,t=IK_{0,t}^{\dagger}K_{0,t}+K_{1,t}^{\dagger}K_{1,t}=I for all t=1,…,24t=1,\ldots,24. Physically, at each active probe, the 1024 marker bits are computed by one parallel oracle call, the flag is rotated by an SS-independent unitary conditioned on the number of distinct marked addresses equaling 512 while the diagonal sign mask DtD_t is applied, the flag is measured, and the marker bits are uncomputed by a second oracle call. Upon a click (K1,tK_{1,t}), the state is projected strictly onto E⊇SE\supseteq S and immediate full readout is triggered; upon a no-click (K0,tK_{0,t}), coherence across all bins is preserved with only the ∣512⟩\lvert512\rangle amplitude attenuated.

In the actual finite-NN circuit, the uniform superposition of mm-element subsets is represented in the orbital basis by uNu_N (uOrbVecGen (2^n) 1024 512) with entries uN,j=(kj)(N−km−j)/(Nm)u_{N,j}=\sqrt{\binom{k}{j}\binom{N-k}{m-j}/\binom{N}{m}}, obeying ∥uN−e0∥2≤5×10−16≤10−15\lVert u_N-e_0\rVert_2\leq5\times10^{-16}\leq10^{-15} for all n≥80,000n\geq80{,}000 (vecNorm_uOrbVecGen_sub_e0_le, initialError). The unnormalized continuing-branch orbital state in the finite-NN circuit is propagated according to

x0(N)=uN,xt(N)=K0,tDtUNMt(N)xt−1(N),pt(N)=(1−at2)∣⟨512∣DtUNMt(N)xt−1(N)⟩∣2.x_0^{(N)}=u_N,\qquad x_t^{(N)}=K_{0,t}D_tU_N^{M_t(N)}x_{t-1}^{(N)},\qquad p_t^{(N)}=(1-a_t^2)\left|\langle512|D_tU_N^{M_t(N)}x_{t-1}^{(N)}\rangle\right|^2.

whereas in the N→∞N\to\infty limiting model, uNu_N and UNMt(N)U_N^{M_t(N)} are replaced by x0=e0x_0=e_0 and Wt=exp⁡(stGwalk)W_t=\exp(s_tG_{\mathrm{walk}}). In both models, segment tt’s walk cost is weighted by the surviving branch mass ∥xt−1(N)∥22\lVert x_{t-1}^{(N)}\rVert_2^2, and total single-attempt success probability is given by the sum of all click probabilities p(N)=∑t=124pt(N)p^{(N)}=\sum_{t=1}^{24}p_t^{(N)} (including the terminal strong read p24(N)p_{24}^{(N)} at a24=0a_{24}=0). Crucially, because the collective Johnson-walk orbit is permutation-symmetric in the hidden set SS, the same finite-NN orbital vector recurrence and uniform per-set bounds (p∗,w∗N+24,673)(p_*,w_*\sqrt{N}+24{,}673) are satisfied identically for every S∈SS\in\mathcal{S} (BatchBound.perSet); thus no invalid interchange of ratio and expectation is introduced when ΘS/pS\Theta_S/p_S is averaged over S∈SS\in\mathcal{S}.

In WeakAssembly, the first attempt is executed unconditionally and independent full restarts upon an incomplete terminal read are controlled by a measured qWhile loop, whereby total expected cost ≤ΘS/pS\leq\Theta_S/p_S (restart_cost) is proved from per-attempt expected cost ΘS\Theta_S and success probability pS>0p_S>0. Within each attempt, survival-weighted branch costs are accounted for in WeakAssemblyCost, WeakAssemblyStages, and WeakAssemblyTrialCost, with fixed per-attempt probe and readout overhead bounded by 24⋅1028+1=24,67324\cdot1028+1=24{,}673 oracle rounds. In Lean, the deviation ∥uN−e0∥2\lVert u_N-e_0\rVert_2, the finite-NN operator discretization error between UNMt(N)U_N^{M_t(N)} and WtW_t, and the degree-28 Taylor truncation and rounding errors are all bounded cumulatively across 163 macro-substeps at scale 101510^{15} (WeakCertFlow.lean, WeakCertRun.lean, distinct from the 432 degree-28 substeps of the sign-only certificate and from the independent 915-substep order-24 limiting propagation in enclose.py). The exact Lean numerical certificate and external limiting enclosures are collected in Table 4, certifying via Track2Weak.FindAllWeak that

Certified quantityExact value / intervalSource
Uniform single-attempt success pSp_SpS≥p∗=999,995,956,520/1012p_S \ge p_* = 999{,}995{,}956{,}520/10^{12}Cert.success12 (A)
Uniform attempt walk cost Θwalk\Theta_{\mathrm{walk}}Θwalk≤w∗N\Theta_{\mathrm{walk}} \le w_* \sqrt{N}<br>w∗=28,787,568,698,601,335,334/1021w_* = 28{,}787{,}568{,}698{,}601{,}335{,}334/10^{21}Cert.weightedCost21 (A)
Fixed per-attempt probe/read overhead≤24⋅1028+1=24,673\le24 \cdot1028 + 1 = 24{,}673 oracle roundsWeakAssemblyStages (A)
Final L2L^2 orbital error pad (seg. 24)≤35,144,918/1015≈3.5145×10−8\le35{,}144{,}918/10^{15} \approx3.5145 \times10^{-8}row23.walkPad (A)
Restart ratio bound C∗NC_* \sqrt{N} (n≥80,000n \ge80{,}000)C∗=28,787,685,101,031/1015C_* = 28{,}787{,}685{,}101{,}031/10^{15}Cert.retryUpper15 (A)
Restart gap and N\sqrt{N}-scale slackC∗−w∗/p∗≈7.12×10−16C_* - w_*/p_* \approx7.12 \times10^{-16};<br>rweakA−C∗≈3.37×10−13r_{\mathrm{weak}}^A - C_* \approx3.37 \times10^{-13}FiniteFromCutoff (A)
Limiting retry cost (enclose.py, ord. 24)[0.02878768025617972696, 0.02878768025617972697]N[0.02878768025617972696,\ 0.02878768025617972697]\sqrt{N}915 substeps (C)
Limiting archived-cont. cost (enclose.py)[0.02878765476018333366, 0.02878765476018333369]N[0.02878765476018333366,\ 0.02878765476018333369]\sqrt{N}915 substeps (C)

Table 4. Exact numerical certificate for Track2Weak.FindAllWeak at (1024,512)(1024,512), where A=Vall(n,1024,512)/N=(π/128)∑ℓ=1512ℓ−1/2≈1.0754205A = V_{\mathrm{all}}(n,1024,512)/\sqrt{N} = (\pi/128)\sum_{\ell=1}^{512}\ell^{-1/2} \approx1.0754205. All Tier (A) bounds hold uniformly across every S∈SS \in\mathcal{S} by orbit symmetry and are certified in Lean via 163 degree-28 Taylor substeps (WeakCertRun.lean, WeakCertBudget.lean). Tier (C) intervals are produced by independent order-24 rational propagation at scale 102610^{26} (enclose.py, refine_placement0_enclosure.json; full 42-digit endpoints archived).

rweak=26,768,771,0521012=6,692,192,763250,000,000,000.r_{\mathrm{weak}}=\frac{26{,}768{,}771{,}052}{10^{12}}=\frac{6{,}692{,}192{,}763}{250{,}000{,}000{,}000}.

by which the pinned discovery’s certified upper bound is reduced by 0.946% (and rsignr_{\mathrm{sign}} by 0.908%).

Finite cutoff and asymptotic regime (n≥80,000n \ge80{,}000 inherited engine threshold). The n≥80,000n \ge80{,}000 activation threshold (altN0 := 80000) is inherited directly from the finite-NN Johnson-walk error lemmas of the upstream-derived engine (FindAllJohnsonAltStep.lean and Rk128kEngine.lean), so n<80,000n < 80{,}000 is routed to the exact Stage1 fallback across all three walks (the pinned discovery, the sign-only walk, and weakChosenBatch). Although the public existential theorem groverFindAll_rel_cost in FindAllWeak.lean invokes the crude proof witness n0=max⁡(⌈(1016⋅24,673)2⌉,80,000)n_0 = \max(\lceil(10^{16} \cdot24{,}673)^2\rceil,80{,}000) constructed in WeakAssemblyCell.lean (normalized_batch_cost and routedBatch_rel_cost), absorbing the fixed overhead 24,673 inside the 7.12×10−167.12 \times10^{-16} restart rounding margin requires only (1016⋅24,673)2≤2140≤2n(10^{16} \cdot24{,}673)^2 \le2^{140} \le2^n, for which n≥140n \ge140 suffices (FiniteFromCutoff.finite_normalized). Consequently, the claimed ratio is established uniformly for every n≥80,000n \ge80{,}000 by the companion theorem:

Proposition 5.1 (Uniform weak-filter bound for all n≥80,000n \ge80{,}000; Tier A). By the companion theorem QuantumComputation.Specs.groverFindAll_cost_from_80000 (FiniteFromCutoff.lean, verified inside the 111-module leanchecker replay), for every n∈Nn \in\mathbb{N} satisfying 80,000≤n,80{,}000 \le n,

AvgOracleCostBound⁡(512,S↦CS,S↦Pn,Sweak,rweakVal⁡(n,1024,512))\operatorname{AvgOracleCostBound}\left(512, S \mapsto C_S, S \mapsto P_{n,S}^{\mathrm{weak}}, r_{\mathrm{weak}}\operatorname{Val}(n,1024,512)\right)

is proved, where Pn,SweakP_{n,S}^{\mathrm{weak}} denotes groverFindAllProgram nn 1024 512 applied to groverParallelMarkingOracle 1024 SS and rweak=26,768,771,052/1012r_{\mathrm{weak}} = 26{,}768{,}771{,}052/10^{12}.

Because n=80,000n = 80{,}000 corresponds to a search space of N=280,000≈2.5×1024,082N = 2^{80{,}000} \approx2.5 \times10^{24{,}082} items and 1024(80,000+1)=81,921,0241024(80{,}000+1) = 81{,}921{,}024 logical qubits are already required for the oracle slots alone before additional workspace, these Johnson-walk protocols are asymptotically motivated constructions with finite guarantees above an astronomically large cutoff, by which no practical speedup at realistic problem sizes is yielded.

External GR0 comparison and unformalized limiting candidate

Three logically distinct claims must be kept separate: (i) probability-one correctness for all admissible n≥1n \ge1 via the exact Stage1 fallback below 80,000; (ii) the uniform finite-nn relative-cost theorem relative to Vall(n,1024,512)V_{\mathrm{all}}(n, 1024, 512) for every n≥80,000n \ge80{,}000 (Proposition 5.1); and (iii) asymptotic coefficient comparison against the external GR0 baseline. While the primary machine-checked comparison is directly between the exact rationals rrefr_{\mathrm{ref}}, rsignr_{\mathrm{sign}}, and rweakr_{\mathrm{weak}}, in an external 256-bit Arb evaluation of the GR0 cap model its asymptotic relative coefficient gGR0g_{\mathrm{GR0}} is enclosed in [0.06957627832198676185,0.06957627832198676734][0.06957627832198676185, 0.06957627832198676734] (Tier C; the reference schedule was not independently re-derived from [1], Appendix E). When the lower endpoint gGR0,−g_{\mathrm{GR0},-} is divided by the positive Lean upper bounds, conservative asymptotic coefficient ratios of at least 2.57554525548×2.57554525548\times (sign-only) and 2.599158481606×2.599158481606\times (weak filters, +0.955% over the reference 2.574566×2.574566\times via rref/rweak−1r_{\mathrm{ref}}/r_{\mathrm{weak}} - 1) are obtained; no finite-nn lower bound on the actual cost of GR0 is claimed. Outward-rounded upper bounds on 1012r10^{12}r from two unformalized limiting numerical enclosures (refine_placement0_enclosure.json) are also recorded in Table 5; in the archived-continuation policy, partial terminal reads are retained without a finite-circuit Lean proof.

Construction and evidence1012r10^{12}rAsymptotic ext. GR0 factor
Pinned discovery [1], Lean upper bound (n≥80,000n \ge80{,}000)27,024,465,988≥2.574566×\ge2.574566\times
Sign-only walk, Lean upper bound (n≥80,000n \ge80{,}000)27,014,193,664≥2.57554525548×\ge2.57554525548\times
Weak filters + restart, Lean upper bound (all n≥80,000n \ge80{,}000)26,768,771,052≥2.599158481606×\ge2.599158481606\times
Weak filters + restart, enclose.py upper bound (Tier C)‡26,768,766,5472.599158919027×2.599158919027\times
Weak filters + archived cont., enclose.py upper bound (Tier C)‡26,768,742,8392.599161×2.599161\times

Table 5. Single-cell (1024, 512) relative-cost upper bounds and externally derived asymptotic GR0 coefficient ratios (gGR0,−/rg_{\mathrm{GR0},-}/r). Finite-circuit Lean 4.35.0 proofs are carried only by the rows above the rule (all three share the n≥80,000n \ge80{,}000 engine cutoff). ‡Outward-rounded upper bounds on 1012r10^{12}r (retry_ratio_rational_n12, incumbent_ratio_rational_n12) derived from the limiting cost intervals of Table 4; not finite-circuit Lean proofs.

Verification architecture, reproducibility, and pure-AI provenance

Verification inventory, claim map, and file-count reconciliation

All Lean proofs were compiled and replayed with the pinned isolated toolchain:

Lean (version 4.35.0, x86_64-w64-windows-gnu, commit eb6caf b7290e, Release)

with binary SHA-256 prefixes ec7a472d1c12a09b (lean.exe) and 9ef6baeb28d5e288 (lean checker.exe). Both upstream reference checkouts (main at 489edc7039aa4cdded53724b39ea90e33d2c88b4 and discoveries at a88de8ff65d78af564b2373088ca369dc95f6547) remained unmodified throughout, as verified by recursive byte comparison across all 57 core QuantumComputation source files and all 15 QuantumComputationSpecs files (7 .lean sources, 7 challenge JSONs, and ChallengeJsons/README.md).

The final verification state across all five project-module suites (counting verified project modules, excluding Mathlib and Core dependencies) is summarized in Table 6, and the direct mapping from headline paper claims to exact fully qualified Lean declarations, entry files, and archived receipts is presented in Table 7. Across all five suites, exactly 288 Lean 4.35.0 project modules were replayed by leanchecker.exe (31 + 20 + 117 + 111 + 9 = 288; in Track2Weak, the 111 replayed project modules comprise the 109 modules in the transitive project closure of FindAllWeak plus the 2 companion modules FiniteFromCutoff and WeakAssemblyControl, listed individually in track2weak_clean_all_leanchecker.json). Exactly 279 .lean files are staged in the companion archive because in Track 3 (20 replayed project modules: 16 arcsine modules plus Track3Audit, ExactCount, ExactPublic, and DisjointWitness), the 11 unmodified byte-identical upstream arcsine modules are omitted rather than duplicated while 2 standalone helper scripts (CompareFrozen.lean and ReplacementTables.lean, separate from the 20 replayed proof modules) are included (20 − 11 + 2 = 11, giving 31 + 11 + 117 + 111 + 9 = 279).

Project-module suiteModulesleancheckerInterface, staged files & notes
Track 2B/C: FindAny LowerBound + Tighter FindAny3131/31 exit 0Direct import of frozen spec + 16/16 match (9 types, 7 bodies); 31 staged
Track 3: Arcsin (16) + audit + exact + witness2020/20 exit 025/25 frozen decls matched; 11/16 upstream identical; 9 proof + 2 helper scripts staged
Track 2A: FindAll (sign-only)117117/117 exit 018/18 interface match; 117 staged
Track 2W: Track2Weak (weak filters)111111/111 exit 018/18 literal types, 11/11 norm. bodies; 109 closure + 2 companion modules; 111 staged
Track 1: Track1THC (App. B, partial)99/9 exit 00/7 def. holes + 0/2 thms; no separate agent audit; 9 staged
Total288288/288 exit 0279 staged .lean; std. axioms only

Table 6. Final verification inventory across all five Lean 4.35.0 project-module suites (excluding Mathlib/Core). Standard axioms denote subsets of {propext, Classical.choice, Quot.sound}. Track 2A records 117/117 exit-0 replays across findall_replay_manifest.json (17 engine modules, 96 trajectory modules, and 4 entry/data logs); Track 3 (16-module replay plus 4 standalone replays) and Track 2W (111-module namespace replay in track2weak_clean_all_leanchecker.json) record aggregate leanchecker exit 0; Track 2B/C (findany_replay_manifest.json) and Track 1 record per-module receipts.

Paper claimDeclaration (with namespace prefix)2Entry fileArchived receipt (receipts/)
Thm. 3.1 (finite & actual rounds)FA.finite, FA.actual_expected_roundsFindAny LowerBound.leantrack2_grover/findany_replay_manifest.json
Thm. 3.2 (infimum 1/2+1/π1/2 + 1/\pi)FA.asymptotic_real, FA.no_smaller_rational, FA.exact_infimumFindAny LowerBound.leantrack2_grover/Track2Grover.FindAny LowerBound_checker.log
Thm. 4.1(1)–(2) (correctness, 366,200)QCS.arcsin_correctness, QCS.arcsin_k25_const_costPrimitives/Arcsin.leantrack3_arcsin/track3_leanchecker_final.json
Thm. 4.1(3)–(4) (exact count, witness)QCS.ArcsinImpl.ExactAudit.exactPublicK25, exactPublicK25_nonvacuousExactPublic.lean, Disjoint Witness.leantrack3_arcsin/track3_exact_public_leanchecker.json, track3_disjoint_witness_leanchecker.json
§5 sign-only (27,014,193,664/101210^{12})QCS.groverFindAll_rel_cost (Track2Grover pkg.)Track2Grover/FindAll.leantrack2_grover/findall_replay_manifest.json
§5 & Prop. 5.1 (weak, n≥80,000n \ge80{,}000)QCS.groverFindAll_rel_cost, QCS.groverFindAll_cost_from_80000 (Track2Weak pkg.)FindAllWeak.lean, Finite FromCutoff.leantrack2_weak/track2weak_clean_all_leanchecker.json

Table 7. Claim-to-declaration map linking headline Tier (A) results to fully qualified Lean 4.35.0 declarations, entry files, and exact archived leanchecker receipts in the companion release. 2Namespace prefixes: FA = Track2Grover.FindAnyLowerBound, QCS = QuantumComputation.Specs. Note that QCS.groverFindAll_rel_cost is declared independently in the two separate packages Track2Grover and Track2Weak.

Zero occurrences of forbidden escape hatches (sorry, admit, native_decide, axiom, unsafe, implemented_by, extern, ofReduceBool, trustCompiler; kernel-checked decide +kernel occurs in 144 files) are confirmed by comment-stripped static token scans across all 279 staged .lean files, and zero occurrences of sorryAx appear in any archived receipt. Interface fidelity was verified via in-house comparison scripts (CompareFrozen.lean: 25/25 frozen arcsine declarations matched; interface.py: 16/16 checks on FindAny (9 public types + 7 fixed bodies), and 18/18 literal public FindAll declaration types with 11/11 normalized / 10/11 raw model bodies matched, differing only in one compiler-generated hygiene instance name in AvgOracleCostBound; four harmless unusedVariables warnings are emitted in FindAllWeak.lean). The upstream lake comparator driver [21] over ChallengeJsons was not executed locally because it relies on Linux sandboxing (bwrap/landrun), which is unavailable on this Windows workstation (WSL is disabled; instructions for running it on Linux against the release patch are provided in the archive README.md). Independent of Lean’s C++ kernel, all five flagship theorems of FindAnyLowerBound (finite, actual_expected_rounds, asymptotic_real, no_smaller_rational, exact_infimum) and the four public theorems of TighterFindAny were exported via leanexport (format 3.1.0) and accepted with zero errors by two independent third-party kernels: nanoda 0.4.19 (Rust; 49,235 and 46,246 declarations checked, strictly enforcing {propext, Classical.choice, Quot.sound}) and con-ron-verified (47,256 and 44,302 declarations accepted; archived in receipts/external_checkers/).

Pure-AI provenance and role separation

In this manuscript, purely AI-generated research directed, scoped, and curated by the human author (Robert Kadlec, Masaryk University, Brno) is reported; this paper is part of a broader research project in which the respective competencies of humans and large language models are investigated. All new contributions introduced here are covered by this provenance—as distinct from the unmodified upstream QuantumComputation and QuantumComputationSpecs libraries and the 32 upstream-derived Google LLC files retaining verbatim Apache-2.0 headers plus one partial module (Track1THC/LCU.lean) attributing upstream lemmas in its docstring (33 staged files referencing Google LLC in total, documented in NOTICE). No new mathematical proof, circuit table, Lean module, verification script, or paragraph of prose was manually written by the human author, by whom full scholarly responsibility for the integrity, accuracy, and publication of all reported results is assumed. All technical execution and adversarial refereeing were delegated to AI agents operating under strict role separation and read-only upstream boundaries:

  • Coordinator and exploratory analyst (Antigravity / Gemini): environment isolation, initial bit-parallel Op102 simulation, symplectic hGadget decomposition, ancilla liveness profiling, HJB optimality analysis for GroverFindAny, dedicated same-kernel leanchecker replays, DisjointWitness.lean, surgical patch generation, manuscript assembly, and release packaging.

  • Synthesis and formalization agent (OpenAI Codex CLI v0.171.0, gpt-6.2-astra): GF(2) polar-matrix gadget synthesis, rank-one square compression, ExactPublic, the complete formal optimality proof FindAnyLowerBound, both GroverFindAll Lean implementations (sign-only and coherent weak-measurement Kraus filters), Arb enclosures, and local lower-bound computations.

  • Independent read-only adversarial refereeing and Appendix B authorship (Anthropic Claude Code CLI v2.1.331–332; OpenAI ChatGPT Web 6 Pro): initial read-only audits of Tracks 2 and 3, Track2Weak, and the release bundle (never auditing code authored by itself), independent exact-fraction and 70-digit numerical recomputations, and formalization of the 9 partial Track1THC modules (which therefore received no separate agent audit) under Claude Code’s sonnet alias (November 25, 2026), followed by multi-round read-only manuscript-vs-Lean cross-audits under claude-fable-5-2 at xhigh effort and independent PDF mathematical refereeing via ChatGPT Web 6 Pro (November 26, 2026).

For Tier (A) and Tier (B) claims, no unchecked LLM output is accepted as a formal proof: every formal statement is backed by the machine-checked Lean 4.35.0 proofs and archived Lean checker receipts. Tier (C) claims are supported independently by the explicitly identified external Arb and rational Taylor enclosures, finite Boolean Möbius, Pfaffian, and MILP computations, and restricted-model paper arguments. Human peer review has not yet been performed on this preprint. Full disclosure, excluded-file inventories (EXCLUDED.md), and detailed audit trails are provided in the supplementary file AI_DISCLOSURE_AND_PROVENANCE.md.

Artifact availability, reproduction, and open problems

All 279 staged .lean files, the surgical 5-file arcsin_366200.patch (verified via git apply --check against discoveries a88de8ff), final leanchecker logs, interface JSONs, archived Arb/Python audit-trail scripts and witnesses (including partitions.py, lib.py, rank_updates.py, followup.py, pfaffian_witness.json, and recon_input.py; see lean/track3_arcsin/scripts/README.md for remaining workspace path dependencies), .gitattributes (*-text for cross-platform byte-exact checksum preservation), and a complete SHA256SUMS.txt manifest are packaged in the companion release (version 1.0.0, reserved on Zenodo at https://doi.org/10.5281/zenodo.24545553 with all-versions DOI https://doi.org/10.5281/zenodo.24545552, activated upon public release of the Zenodo record; Apache-2.0 for all Lean sources, patches, and scripts, retaining original Google LLC copyright attributions across all 33 upstream-referencing files as itemized in NOTICE; CC BY 4.0 for manuscript and documentation).

Independent reproduction of ArcsinK25ConstCost is carried out by checking out google-deepmind/formal-quantum-computation at discoveries (a88de8ff), applying patches/arcsin_366200.patch, and running lake build, lake env leanchecker, the interface script CompareFrozen.lean (or upstream lake comparator), and the standalone checks for Exact Count, ExactPublic, and DisjointWitness. Three open problems remain directly accessible from this artifact: (i) lowering ArcsinK25 below 100 logical qubits via cross-stage rescheduling of the eight 50-ancilla peaks; (ii) extending weak-measurement filters across the remaining 120 GroverFindAll grid cells, lowering the n≥80,000n \ge80{,}000 engine cutoff, and proving an information-theoretic lower bound for GroverFindAll; and (iii) completing the circuit half of THCFactorization on top of Appendix § 8.

Exact parameters of the 24-segment GroverFindAll schedules

In both single-cell (1024, 512) schedules of § 5, 24 width-one (ℓs=1\ell_s = 1, ∣E∣=1024|E| = 1024) segments are executed on the collective Johnson walk. The dimensionless normalized walk time st=τt⋅10−9s_t = \tau_t \cdot10^{-9}—corresponding to the N\sqrt{N}-scaled continuous walk duration stN=τt⋅10−9Ns_t\sqrt{N} = \tau_t \cdot10^{-9}\sqrt{N}—is specified by each integer entry τt\tau_t (t=1,…,24t = 1, \ldots, 24). In the finite-NN Lean circuits, each segment tt with macro-substep count nSubₜ is converted into an exact integer number of discrete walk iterations by the floor rule altStepCount (FindAllJohnsonAltStep.lean):

Mt(N)=nSubt⌊τt⌈N⌉109nSubt⌋.M_t(N) = \mathrm{nSub}_t \left\lfloor\frac{\tau_t\lceil\sqrt{N}\rceil}{10^9\mathrm{nSub}_t} \right\rfloor.

Across the 24 segments, ∑t=124nSubt=432\sum_{t=1}^{24}\mathrm{nSub}_t = 432 macro-substeps are used in the Lean degree-28 Taylor certificate for the sign-only proof (Track2Grover.FindAll), and ∑t=124nSubt=163\sum_{t=1}^{24}\mathrm{nSub}_t = 163 macro-substeps are used in the weak-filter proof (WeakCertRun.lean, with nSub1,…,nSub24=62,67,2,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,2,3,4,5\mathrm{nSub}_1,\ldots,\mathrm{nSub}_{24} = 62, 67, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5).

After each segment, a 513-bit weight sign mask is applied: in the companion JSON files (masks_le_hex), each mask is stored as a 65-byte (130-hex-character) little-endian integer (int.from_bytes(bytes.fromhex(h), "little")), where occupancy bin β∈{0,…,512}\beta\in\{0,\ldots,512\} (byte ⌊β/8⌋\lfloor\beta/8\rfloor, bit β mod 8\beta\bmod8) is negated when bit β\beta is set, and the upper seven padding bits 513–519 of byte 64 are unused and zero (in both archived schedules, byte 64 is 0x00, so bit 512 is also unset throughout). In the weak-filter schedule, each sign mask is followed by a full-occupancy Kraus check whose archived no-click amplitude parameter is a~t=numt/109∈[0,1]\tilde{a}_t = \mathrm{num}_t/10^9 \in[0,1] (identity when numt=109\mathrm{num}_t = 10^9, i.e. segments 1–9 and 24; 14 active nontrivial filters at segments 10–23). Following the final identity weak filter (a~24=1\tilde{a}_{24} = 1) at segment 24, a separate terminal strong readout is executed, which is represented in the unified recurrence of § 5 and in WeakCertRun.lean (row23.atten = 0) by the effective parameter a24=0a_{24} = 0.

Schedules were discovered by iterative segment splitting and backward-adjoint retiming of the orbital walk objective, followed by greedy binary sign updates and gradient optimization of the survival-weighted measured cost-to-go. Independently of floating-point search, the limiting continuous-time walk quantities were enclosed via outward-rounded exact integer Taylor propagation (enclose.py, Taylor order 24, 915 substeps, scale 102610^{26}, Tier C) before formalization of the finite-NN degree-28 Lean 4.35.0 proofs (Tier A). All 24 durations and all 24 archived attenuation numerators 109a~t10^9\tilde{a}_t are listed in Table 8; the full 65-byte hex sign masks are archived verbatim in kicks24.json (SHA-256 ad0f3a1adba5eff9c5aefea6fef7f90cfd6b857a b46279e0f32247307e664f7e) and refine_placement0.json (SHA-256 8c99446f731408d667818747c6319f4aac2c2d2cbddffc2d8df2adaf8feaaf58).

Seg.Sign-only τt\tau_tWeak τt\tau_tWeak 109a~t10^{9}\tilde{a}_tSeg.Sign-only τt\tau_tWeak τt\tau_tWeak 109a~t10^{9}\tilde{a}_t
112,821,05812,720,7551,000,000,0001365,182127,379764,201,123
213,747,82913,875,1671,000,000,0001440,397129,011834,019,056
392,406373,5131,000,000,00015137,81546,142916,974,644
465,722170,4241,000,000,0001610056,478903,538,624
5129,303137,2051,000,000,0001730,74156,630915,327,669
6122,231188,2841,000,000,00018228,33737,059911,809,418
714,548169,4851,000,000,0001947255,214824,068,230
8129,661207,3251,000,000,00020209,872123,114608,644,063
916,328242,4041,000,000,00021291,357371,610464,745,164
10114,245205,999881,826,71022100417,762368,423,142
1131,76376,765842,867,47823369,114633,308331,827,239
1278,933134,879786,860,38324300,014897,0291,000,000,000*

Table 8. Exact integer time numerators τt\tau_t (defining dimensionless normalized times st=τt⋅10−9s_t = \tau_t \cdot10^{-9} and N\sqrt{N}-scaled durations stNs_t\sqrt{N}, width ℓs=1\ell_s = 1 throughout) and archived weak-filter no-click amplitude numerators 109a~t10^{9}\tilde{a}_t for the 24-segment sign-only (kicks24.json) and weak-filter (refine_placement0.json) schedules at (1024, 512). At segments 10–23, the 14 nontrivial Kraus attenuations at=a~t∈(0,1)a_t = \tilde{a}_t \in(0, 1) are applied. *At segment 24, the archived weak filter is the identity (a~24=1\tilde{a}_{24} = 1), immediately followed by a separate terminal strong readout modeled by a24=0a_{24} = 0 (row23.atten = 0 in WeakCertRun.lean).

Partial foundations for the open THCFactorization challenge

The THCFactorization specification in QuantumComputationSpecs (absent from discoveries) remains unsolved: 0/7 frozen candidate definition holes (thcBlockAncillas, thcScratchAncillas, thcCatalystQubits, thcCandidateAlpha, thcCandidateOffset, thcCandidateProgram, thcTCost) and 0/2 public theorems (thc_correctness, thc_t_cost) are filled, and no certified resource estimates for FeMoco are claimed.

To support future formalization, nine standalone Lean 4.35.0 foundation modules (Track1 THC, 1,956 lines total; Table 9) are archived in the companion release. Per-module lean checker.exe replay is passed by all nine modules (9/9 exit 0, standard axioms only). Because these modules were authored by Claude Code (with Parts 1–3 and 5 of JWAlgebra adapted from upstream JordanWignerOrbitalAlgebra.lean and upstream blockSplit* lemmas adapted in LCU), no separate adversarial audit by a second agent was conducted on them.

Module (Track1THC.*)LinesVerified mathematical or circuit-algebra content
Alias147Exact integer Walker–Vose alias decomposition (alias_exists).
JWAlgebra567Upstream-adapted orbital reflections (Parts 1–3, 5) + new Jordan–Wigner CAR {ai,aj†}=δijI\{a_i,a_j^\dagger\}=\delta_{ij}I (Part 6, absent upstream).
Centering203Centered THC decomposition matching frozen 1-norm lamRep.
LCUa33Existence of a unitary with prescribed real unit first column.
LCU255Abstract qubitized block-encoding existence (lcu_blockEncoding; adapts upstream blockSplit* lemmas).
Select101Involutive swapSelect for non-commuting reflection products.
CleanOps397Clean/catalytic composition, additive TOFF = 0/TT algebra, lifted Jones-AND.
CatalyticRot168Exact eigenvector kickback on frozen phaseGradientState.
CliffordGadgets85Clean single-qubit gates, zero-TT CZ, and clean Toffoli chains.

Table 9. Partial Lean 4.35.0 foundation modules for THCFactorization (1,956 lines total, 9/9 leanchecker exit 0, 0/7 frozen definition holes and 0/2 public theorems filled).

Fixed-interface bit-trace lower bounds and restricted checks (Tier C)

Self-contained fixed-interface proofs for s2a and s6c, together with the algebraic reduction and exact certificate specifications for the archived Pfaffian obstruction and bounded MILP screen cited in § 4, are provided below. All claims in this appendix are Tier (C) mathematical and computational bounds on fixed stage interfaces in the Op102 table language, not formal Lean proofs or global unrestricted quantum circuit lower bounds.

Fixed-interface Op102 bit-trace model. On the 23 raw magnitude bits remaining after endpoint relaying (with all stashed and external data fixed to constants), all 223=8,388,6082^{23}=8,388,608 words are partitioned by the 440 certified dyadic cubes. Deterministic updates on basis-state bits are induced by Op102 instructions as follows:

  • Zero-TT affine/phase operations: basis bits are updated affinely (or phase only is applied) at cost 0T0T by X, CX, Z, and CZ. A target wire is reset to 0 in the forward direction (an affine assignment) at cost 0T0T by the clean erasures unand and unquad.

  • Paid quadratic operations (≥4T\ge4T): a quadratic Boolean update at cost 4T4T is applied by both rccx variants and by the clean-target and4t gate. Into a clean target, the second-lowest bit of a signed sum of equal numbers of positive and negative affine parities—a quadratic Boolean polynomial—is written by a statically valid hGadget. With only one positive and one negative parity, both parities are forced to coincide by the static zero-low-bit invariant and the output vanishes identically; hence at least 2+22+2 steps (cost ≥4T\ge4T) are required for any nonlinear hGadget write.

Forward degree bound for s2a (≥68T\ge68T). When every wire state is expressed as a multilinear polynomial over F2\mathbb{F}_2 in the 23 input bits, algebraic degree is increased by at most 1 under backward substitution of a single quadratic assignment into an existing multilinear polynomial, whereas degree cannot be increased by an affine substitution [10]. Consequently, every output wire of a forward Op102 trace containing ν\nu paid nonlinear operations has degree at most 1+ν1+\nu. By exhaustive 23-bit Boolean Möbius transform (degree.py, receipt m3_degree_receipt.json), algebraic degree 18 is attained on wires 50 and 55 of the frozen table trS2a (with coefficient 1 on the degree-18 monomial in bits 5–22). Hence ν≥17\nu\ge17 is forced, requiring at least 17×4=68 T17 \times4 = 68\,T, which is attained tightly by s2aOps.

Reverse-direction affine-rank bound for s6c (≥20 T\ge20\,T). In the cleanup stage s6c, the 23 raw input bits together with 12 garbage wires entering from s6b are uncomputed back to clean zeros (plus the 23 raw bits). At step tt of a valid deterministic Op102 trace run backward on this domain, with current wire Boolean functions ft,1,…,ft,wf_{t,1}, \ldots, f_{t,w}, the affine-span dimension is defined explicitly by

dt=dim⁡F2span⁡{1,ft,1,…,ft,w},d_t = \dim_{\mathbb{F}_2}\operatorname{span}\{1, f_{t,1}, \ldots, f_{t,w}\},

where the constant 1 is included so that dtd_t is invariant under X and CX. Each instruction’s contribution to the required number of quadratic backward substitutions is bounded in terms of its rank change Δ=dt−dt−1\Delta= d_t - d_{t-1}:

  1. When unand or unquad is reversed, a quadratic word is written into a clean wire. If that word already lies in the current affine span, it is represented by an affine substitution (cost 0 quadratic substitutions, Δ=0\Delta= 0); otherwise 1 quadratic substitution is incurred and affine-span dimension is increased by Δ=+1\Delta= +1.

  1. When a clean paid write (and4t or nonlinear hGadget) is reversed, a wire is erased at cost 0 quadratic substitutions while affine-span dimension is decreased by at most 1 (Δ≥−1\Delta\ge-1). When rccx is reversed, one wire is replaced by itself XOR a product of two others: if Δ=−1\Delta= -1, its new value is affine in the remaining wires (cost 0), and otherwise at most 1 quadratic substitution is incurred with Δ≥0\Delta\ge0.

  1. Identically zero output bits are generated by zero- or two-TT hGadget steps, contributing neither quadratic substitutions nor rank change; basis bit traces are unaffected by phases.

Thus, at every backward step with affine-rank change Δ\Delta, the number of quadratic substitutions contributed is at most Δ+1paid≥4T\Delta+ 1_{\mathrm{paid}\geq4T}. Summing across the entire reverse trace, the total affine-rank increase dfinal−dinitiald_{\mathrm{final}} - d_{\mathrm{initial}} from the 23 raw bits to the 23 raw bits plus 12 garbage coordinates is at most 12; with ν\nu denoting the number of paid operations of cost ≥4T\geq4T, every incoming garbage function therefore has algebraic degree at most 1+12+ν1 + 12 + \nu. By the same exhaustive 23-bit Möbius transform (m3_degree_receipt.json), degree 18 is attained on wires 72 and 81 of trS6cIn (coefficient 1 on bits 5–22), forcing ν≥5\nu\geq5 and hence at least 5×4=20T5 \times4 = 20T, attained tightly by s6cOps.

Pfaffian obstruction reduction for s5_2CoreOps and bounded MILP screen specifications. For the reverse 9-bit square s5_2CoreOps (verify_pfaffians.py, followup.py, pfaffian_witness.json, receipt m2_reverse_obstruction_receipt.json), the 9 linear input bits are denoted by XX, the 9 frozen square output bits by YY, and the 21 baseline paid product functions by P0,…,P20P_0,\ldots,P_{20}. With the 17 products indexed by {0,2–10,12–18}\{0,2\text{–}10,12\text{–}18\} held fixed, the 35-dimensional fixed subspace F=span⁡(V)\mathcal{F} = \operatorname{span}(V) over F2\mathbb{F}_2 is spanned by the 35 linearly independent functions V=X∪Y∪{Pi:i∉{1,11,19,20}}V = X \cup Y \cup\{P_i : i \notin\{1,11,19,20\}\}, whereas the 39-dimensional total allowed intermediate space U=span⁡(V∪R)\mathcal{U} = \operatorname{span}(V \cup R) and the 4-dimensional quotient space Q=U/F≅F24\mathcal{Q} = \mathcal{U}/\mathcal{F} \cong\mathbb{F}_2^4 (with canonical projection π:U→Q\pi: \mathcal{U} \to\mathcal{Q}) are obtained when the four rewritten products R={P1,P11,P19,P20}R = \{P_1,P_{11},P_{19},P_{20}\} are adjoined. Any valid replacement of those four AND gates by at most three new AND gates whose products lie within U\mathcal{U} must generate intermediates whose images under π\pi lie in a proper subspace S⊊F24S \subsetneq\mathbb{F}_2^4 (dim⁡S≤3\dim S \le3, ∣S∣≤8|S| \le8), of which there are exactly 1+15+35+15=661 + 15 + 35 + 15 = 66 over F2\mathbb{F}_2. For each proper subspace SS, under reverse quadratic closure it is tested whether every function in the preimage π−1(S)⊂U\pi^{-1}(S) \subset\mathcal{U} can be uncomputed back to XX by sequential quadratic erasures (each step eliminating a function quadratic in the remaining wires). By exhaustive enumeration of all 66 proper subspaces, exactly one 3-dimensional hyperplane H0={0,3,5,6,9,10,12,15}⊂F24H_0 = \{0, 3, 5, 6, 9, 10, 12, 15\} \subset\mathbb{F}_2^4 (with ordered basis W=(P1⊕P11,P1⊕P19,P1⊕P20)W = (P_1 \oplus P_{11}, P_1 \oplus P_{19}, P_1 \oplus P_{20}) and 38-dimensional preimage π−1(H0)=span⁡(V∪W)\pi^{-1}(H_0) = \operatorname{span}(\mathcal{V} \cup W)) is retained.

To enter π−1(H0)\pi^{-1}(H_0) from F\mathcal{F} via new AND gates, at least one nonzero direction in H0∖{0}H_0 \setminus\{0\} must be realized modulo F\mathcal{F} as a single rank-1 product (a⊤V)(b⊤V)(a^\top\mathcal{V})(b^\top\mathcal{V}), equivalently by a skew-symmetric alternating matrix E=(eij)0≤i<j<35E = (e_{ij})_{0 \le i < j < 35} over F2\mathbb{F}_2 of rank at most 2. The seven nonzero directions of H0H_0 are subsequently indexed by their 3-bit coordinates t∈{1,…,7}t \in\{1,\ldots,7\} in the ordered basis WW (corresponding to the 4-bit masks 3, 5, 6, 9, 10, 12, 15 respectively). For each tt, the set of all alternating matrices EE whose evaluated quadratic form matches tt modulo F\mathcal{F} constitutes an affine space of dimension d=190d = 190 over F2\mathbb{F}_2. Every rank-≤2\le2 alternating matrix is annihilated by all (354)\binom{35}{4} four-index Pfaffians Pf⁡ijkl(E)=(eijekl)⊕(eikejl)⊕(eilejk)\operatorname{Pf}_{ijkl}(E) = (e_{ij}e_{kl}) \oplus(e_{ik}e_{jl}) \oplus(e_{il}e_{jk}). Because each Pf⁡ijkl(E)\operatorname{Pf}_{ijkl}(E) is a Boolean polynomial of degree at most 2 in the d=190d = 190 free affine parameters, an XOR sum of Pfaffians is identically equal to 1 across all 21902^{190} parameter assignments if and only if it evaluates to 1 on all 1+d+(d2)=18,1461 + d + \binom{d}{2} = 18,146 assignments of Hamming weight at most 2. For all seven nonzero targets t∈{1,…,7}t \in\{1,\ldots,7\}, explicit subsets of four-index Pfaffians (5,796, 5,838, 5,718, 4,652, 4,617, 4,752, and 4,554 Pfaffians respectively; archived in pfaffian_witness.json, SHA-256 194078da6ceb06b1...) are verified by verify_pfaffians.py to sum identically to 1 on all 18,146 weight-≤2\le2 assignments, proving that 21 ANDs are necessary within the restricted 39-dimensional intermediate span U\mathcal{U}.

For the late-adder carry recurrence (burst_milp.py, receipts track3_bonus_burst_milp.json and track3_bonus_burst_control.json), zero-return carry-save schedules over 28 columns are formulated as integer linear programs and solved via scipy.optimize.milp (HiGHS backend, mip_rel_gap = 0.0, single-threaded, 10 s time limit per instance). Across all 18 combinations of B∈{3,4,5,6}B \in\{3,4,5,6\} bursts and helper placement u∈{0,…,B−1}u \in\{0,\ldots,B - 1\} under capacity 39 scratch slots and ceiling 165 ANDs, infeasibility is reported (SciPy return status 2, HiGHS backend model status 8), whereas in a 200-slot positive control (B=1,u=0B = 1, u = 0) optimality is reached (SciPy return status 0, HiGHS model status 7) at 133 ANDs (independently checked against all column-sum and carry constraints). Because no independently re-verified proof log is emitted by HiGHS here, these 18 infeasibility results are reported strictly as solver-reported bounded screens rather than proof certificates.

References

  1. [1]S. Shirobokov, B. Jaderberg, K. Hristova, G. Tsoukalas, J. Bausch, E. Wieser, F. J. H. Heras, N. C. Rubin, G. H. Low, S. Racanière, N. Tomašev, L. M. Zhang, J. D. Watson, T. Khattar, A. Albarghouthi, S. Jain, H. Khan, L. Sarra, A. W. Senior, M. Broughton, H. Masoom, S. Boixo, R. Babbush, S. Chaudhuri, and P. Kohli, Discovering formally verified quantum programs with AI, arXiv:2611.09822v3 [quant-ph] (2026); repository https://github.com/google-deepmind/formal-quantum-computation.arxiv.org/abs/2611.09822
  2. [2]W. Fang and C. Heunen, Weakly measured loops for quantum amplitude amplification: oracle savings and adaptive search with unknown target probability, arXiv:2609.39621 [quant-ph] (2026).arxiv.org/abs/2609.39621
  3. [3]L. K. Grover, A fast quantum mechanical algorithm for database search, in Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing (STOC), pp. 212–219, 1996.arxiv.org/abs/quant-ph/9605043
  4. [4]M. Boyer, G. Brassard, P. Høyer, and A. Tapp, Tight bounds on quantum searching, Fortschritte der Physik 46 (1998), 493–505.
  5. [5]C. Zalka, Grover’s quantum searching algorithm is optimal, Physical Review A 60 (1999), 2746–2751.DOI
  6. [6]L. K. Grover and J. Radhakrishnan, Quantum search for multiple items using parallel queries, arXiv:quant-ph/0407217 (2004).DOI
  7. [7]A. Belovs and D. Yolcu, One-way ticket to Las Vegas and the quantum adversary, arXiv:2301.02003 [quant-ph] (2023).arxiv.org/abs/2301.02003
  8. [8]A. Mizel, Critically damped quantum search, Physical Review Letters 102 (2009), 150501.pubmed.ncbi.nlm.nih.gov/19518609
  9. [9]P. Andrés-Martínez and C. Heunen, Weakly measured while loops: peeking at quantum states, Quantum Science and Technology 7 (2022), 025007.
  10. [10]C. P. Schnorr, The multiplicative complexity of Boolean functions, in Applied Algebra, Algebraic Algorithms and Error-Correcting Codes (AAECC-6, 1988), LNCS 357, pp. 45–58, Springer, 1989.DOI
  11. [11]R. Mirwald and C. P. Schnorr, The multiplicative complexity of quadratic Boolean forms, Theoretical Computer Science 102 (1992), 307–328.DOI
  12. [12]Ç. Çalık, M. Sönmez Turan, and R. Peralta, Boolean functions with multiplicative complexity 3 and 4, Cryptography and Communications 12 (2020), 935–946.DOI
  13. [13]T. Häner, M. Roetteler, and K. M. Svore, Optimizing quantum circuits for arithmetic, arXiv:1805.12445 [quant-ph] (2018).arxiv.org/abs/1805.12445
  14. [14]C. Jones, Low-overhead constructions for the fault-tolerant Toffoli gate, Physical Review A 87 (2013), 022328.DOI
  15. [15]C. Gidney, Halving the cost of quantum addition, Quantum 2 (2018), 74.DOI
  16. [16]J. Lee, D. W. Berry, C. Gidney, W. J. Huggins, J. R. McClean, N. Wiebe, and R. Babbush, Even more efficient quantum computations of chemistry through tensor hypercontraction, PRX Quantum 2 (2021), 030305.DOI
  17. [17]Y. Feng and M. Ying, Quantum Hoare logic with classical variables, ACM Transactions on Quantum Computing 2 (2021), 1–43.DOI
  18. [18]L. de Moura and S. Ullrich, The Lean 4 theorem prover and programming language, in Automated Deduction — CADE 28, LNCS 12699, pp. 625–635, Springer, 2021.DOI
  19. [19]The mathlib Community, The Lean mathematical library, in Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP), pp. 367–381, 2020.DOI
  20. [20]The Physlib Community, Physlib: The Lean Physics Library, https://github.com/leanprover-community/physlib; 2024; incorporating A. Meiburg, Quantum Information in Lean, https://github.com/Timorett/Lean-QuantumInfo, 2024.
  21. [21]Lean FRO, comparator: Lean 4 formal challenge verification tool, https://github.com/leanprover/comparator, 2026.
  22. [22]F. Johansson, Arb: efficient arbitrary-precision midpoint-radius interval arithmetic, IEEE Transactions on Computers 66 (2017), 1281–1292.arxiv.org/abs/1611.02831

Paper details

vlnc:W_59gvzwvu
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Google Gemini Antigravity/Gemini, OpenAI Codex gpt-6.2-astra, OpenAI ChatGPT 6 Pro, Anthropic Claude Code sonnet, Anthropic Claude Fable claude-fable-5-2 xhigh

View statement
Looking for related papers…
Contents