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 ( 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) andQuantumComputationSpecs(15 files: 7.leansources, 7 challenge JSONs, andChallengeJsons/README.md) from commit 489edc7039aa4cdded53724b39ea90e33d2c88b4, with zerosorry, zeronative_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 bothleanandleanchecker; additionally, the flagshipFindAnyLowerBoundandTighterFindAnytheorems were exported vialeanexportand 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 asymptoticGroverFindAllspeedup 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 / Problem | Prior baseline [2, 1] | Present work | Contribution | Tier |
| GroverFindAny (general adaptive model; 121 grid cells) | Constant and restricted-family infimum [2]; parallel upper bound [1] | over all OracleDynamicCircuit + finite- bound | General adaptive optimality | (A) |
ArcsinK25ConstCost (Q2.23, 100 ) | 369,800 (3,698 , TOFF = 0) | 366,200 (3,662 , TOFF = 0) + exact compiled count & witness | −3,600 spacetime (−36 , −0.9735%); 5/16 modules edited | (A) |
| GroverFindAll (1024, 512) sign-only | 27,024,465,988/ (≥ 2.574566× vs ext. GR0) | 27,014,193,664/ (≥ 2.57554525548× vs ext. GR0) | −0.038011% upper bound (eventual; engine) | (A)/(C)† |
| GroverFindAll (1024, 512) weak filters | Pinned discovery (≥ 2.574566× vs ext. GR0) | 26,768,771,052/ (≥ 2.599158481606× vs ext. GR0) | −0.946% vs pinned (−0.908% vs sign-only); 14 Kraus filters (all ) | (A)/(C)† |
THCFactorization (Appendix B) | Unsolved (absent from discoveries) | 9 helper modules (1,956 lines), 0/7 def. holes + 0/2 thms | Partial 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 .
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 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 -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 -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 is not new. An exact weak-measurement-conditioned loop for known target probability using iterations—from which, upon specialization to and division by the standard scale, precisely 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 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 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 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 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 using intermediate measurements to a deferred-measurement algorithm satisfying , 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 and a single bit oracle, the corresponding coherent Las Vegas adversary optimization is solved by : the bit-oracle feasibility condition is satisfied by primal weights on the target index and elsewhere, while the dual witness (where denotes the all-ones matrix and denotes the binary difference mask for index ) has star-graph norm (so for the full bit-oracle difference block) and top eigenvalue . Thus an asymptotic leading constant of (relative coefficient $2/\pi \approx 0.6366) is produced by the coherent adversary, rather than the sharp operational constant (relative coefficient ). 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 marked items using 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 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 () and polar-matrix canonicalization of quadratic Boolean forms over 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
on every cell of the 121-cell dyadic grid. The lower bound itself is proved parametrically for all positive integers ; 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 , , and are adopted throughout this section, and is denoted by . A single source circuit , fixed before is drawn uniformly from , is given by the type
Within this type, arbitrary finite workspace (possibly depending on ) may be allocated, arbitrary oracle-independent unitaries may be applied, legal embeddings of the -slot parallel oracle (each slot holding an -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
Under the frozen cost model , 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 (Lower.Correct):
The certificate predicate is abbreviated as , under which per-set nonnegative real certificates are required to satisfy the frozen CostBound for all with uniform average at most . Values in (ENNReal) are taken by the underlying operational cost expectedCost.
Theorem 3.1 (Finite certificate and actual expectation). Suppose are given with , , and , and is a circuit of the type above. With
where Lean’s total real inverse sine (equal to on arguments ) is denoted by arcsin:
(finite) Under , the inequality is satisfied by every for which holds.
(actual_expected_rounds) Under , for every store ,
where is paired with the pure quantum state by (Track2Grover.Path.seed). Infinite expected cost is included in the extended-real comparison, and no external certificate is required.
For fixed positive and , the predicate Feasible is defined to hold whenever there exist and a family such that
Theorem 3.2 (Asymptotic boundary and exact infimum). In namespace Track2Grover.FindAnyLowerBound:
(asymptotic_real) For all and , if Feasible holds then .
(no_smaller_rational) For all and with , the predicate Feasible is false.
(exact_infimum) For every (where ), the predicate IsGLB is satisfied at for ; equivalently,
Explicit scope boundaries. Theorems 3.1 and 3.2 are restricted specifically to (i) expected parallel oracle rounds, (ii) uniform averaging over -element marked sets of known size , (iii) termination and marked output with probability one, (iv) circuits in the frozen OracleDynamic Circuit model with arbitrary finite workspace , and (v) fixed positive as . Attainment at equality by a single real witness is not asserted by the infimum; because is irrational, equality with 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 are coupled into a direct-sum Hilbert space , and the subspace of vectors constant across the hidden label is denoted by , with orthogonal projection . For any nonzero branch vector , its squared norm is denoted by and its angle to is defined by (with zero contribution assigned to zero branches). With , the progress potential is defined by
In terms of the projected-mass fraction , the per-unit-mass profile is given by
At the junction (), equal value () and equal first derivative ( at ) are shared by both pieces. On ,
hence is continuous and convex on , and continuously differentiable on (indeed on ), with matching one-sided derivatives equal to at (whereas as , and the endpoint is handled directly below). In the angle variable , the derivative is bounded by , by which a uniform unit Lipschitz bound in across the junction is established.
One-round oracle displacement. Each physical marking oracle is an involution in every density regime (Physical.act_involution in CoupledOracle.lean), so the coupled oracle is a self-adjoint unitary involution (, ). A label-constant vector is written in terms of its shared single-instance component as , so that . Each of the query addresses is contained in a uniform -subset with probability ; 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 slots is required), the unconditional compression inequality is obtained:
for every legal slot embedding , even on entangled inputs (where realness of the inner product follows from self-adjointness of , and the inequality is trivial when ). Whenever , the angle bound is defined, so that . For any unit vector , , so the angle between and is at most . For an arbitrary unit branch vector (possibly already correlated with ), whenever the normalized projection is chosen. By unitarity of , the spherical angle between and is equal to , while the angle between and is at most ; by the spherical triangle inequality and the characterization of as the minimal angle from to (QueryAngle.one_query),
(If , then , so is satisfied directly.) When the same inequality is applied to and is invoked, is obtained, hence . By the unit Lipschitz bound in , the potential is reduced by at most 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 . The measurement instrument is therefore represented on the coupled space by block-diagonal Kraus operators with , each commuting with the label-averaging projection . Consequently, when a branch is split into children with and , both total mass () and projected mass are preserved:
An affine supporting minorant at is obtained from the convexity of (the tangent line for , the identity for , and direct equality when forces on every positive-mass child), whereby split_potential (CoupledHistory.lean) is proved:
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 , nonzero amplitude is supported only on hidden sets (a fraction of ), so its projected mass fraction is bounded by via Cauchy–Schwarz. By convexity of on with and ,
whereby the terminal potential of every halted branch is bounded above by (and in fact by whenever ; see Remark 3.3). For a finite execution tree started from an unnormalized label-constant vector of squared norm , the expected oracle rounds executed on target set are denoted by , the summed expected query count across by , and the unnormalized unfinished timeout mass by . When the branch inequalities are summed under zero wrong-output mass , the scaled tree bound (and its equivalent per-instance average form after division by ) is obtained:
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):
Uniform finite unrolling of nested loops (
Fuel.cap). Every loop in a program (regardless of nesting depth) is truncated simultaneously by a single natural-number fuel parameter via the recursive mapqWhile g Punroll g (cap i P) i, whereunroll g P′ 0 = abortandunroll g P′ (d+1) = qIf g (qSeq P′ (unroll g P′ d)) skip. Because structural truncation commutes with oracle compilation (compile_cutinLowerPath.lean),cap i (C.compile qAssign O_S)is represented exactly by a finite execution tree with explicit timeout leaves.
Monotonicity and cost domination (
Fuel.cap_cost). The operational ordersBelow P₁ P₂(satisfied whenobs(P₁,δ,θ) ≤ obs(P₂,δ,θ)for all ) andStateBelow δ η(satisfied whenmass(δ,θ) ≤ mass(η,θ)for all ) are introduced on programs and states. By structural induction over sequential composition, conditionals, and loop unrollings,Below (cap i P) Pis proved together with
for every cost model and state . Combined with score_calls_le_cost (LowerScoreBridge.lean), the per-instance expected query count of the truncated tree is bounded by
Cofinal convergence and vanishing unfinished mass (
Fuel.cofinal). By structural induction on , is established for every initial state and bounded effect in the public cofinality theoremFuel.cofinal(Approaches (fun t => cap t P) P, with fieldsmono,upper, andlimit). Under Hoare total correctness , unit trace and zero mass on incorrect stores are proved for the full output state on every (correct_output_massinLowerAccounts.lean). Wrong-output mass on every truncation is therefore forced by monotonicity to vanish identically (bad(T_i,S)=0), while with the limit is obtained, so the unnormalized unfinished mass converges to (and ).
Input-independence of the initial state (
seed_reset). Because every compiled benchmark program begins withqset ; ; C.compile qAssign O_S, the quantum register is reset to independently of . For any fixed initial classical store , is invariant underqset(seed_resetinLowerSeed.lean), so the unnormalized coupled initial vector is placed identically inside the label-constant subspace with squared norm .
Passing to the limit and handling infinite expected cost (
Actual.mean_lower_bound). For any finite real bound with , the summed query count is bounded by for all ; when is substituted into the normalized right-hand form of (1), is obtained, and in the limit the finite bound (finite) is proved. For the direct extended-real expectation inactual_expected_rounds, if , then division by yields and the inequality is discharged trivially byle_top. Otherwise every summand is finite, so finite pointwise seed costs are extracted for that fixed initial state (distinct from an all-statesAvgOracleCostBoundcertificate), with uniform average equal to the real part of the mean. The proof across all regimes simultaneously is completed by applyingCoupledLimit.of_seed_semanticsdirectly to these seed costs with clipped density (where under Lean’s total arcsin, and the trivial compression bound when 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 , a case split on 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 is at most , whereby at least first queries are forced, dominating throughout (including , where the numerator is zero).
Upon division of by ,
is obtained for any fixed positive , , by which asymptotic_real and no_smaller_rational are proved. On every cell , every real 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- sharpenings; Tier C). Two direct Tier (C) strengthenings of the finite- bound on expected parallel oracle rounds are obtained from the same framework without altering the asymptotic limit . First, because is non-decreasing on , is satisfied on every halted branch; for , summing branch inequalities gives , and hence . In particular, whenever and (with ), gives
exceeding the numerator of Theorem 3.1 by . Second, for , producing any output with positive probability prior to the first oracle call is ruled out by probability-one correctness across all (since every fixed address is excluded by some ), so is also satisfied unconditionally. These finite- 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
a decrease of lying above . 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 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 gates while the computed lookup table, phase coherence, clean-ancilla return, and 100-qubit width are preserved, whereby the frozen spacetime metric is lowered by 3,600 units (, ) to 366,200.
Specification, exact compiled gate counts, and non-vacuity
In the frozen specification (QuantumComputationSpecs.Primitives.Arcsin), both the register bit-width and the maximum absolute error tolerance are bundled in the record . Under the frozen precision hypotheses $3 \le p.k$ and , each -bit word is encoded in signed two’s-complement Q2. format via signed, with valid inputs satisfying . By the general parameterized theorem arcsin_correctness, it is certified that for every 3 \le p.k$ and , there exists an output table obeying on all valid inputs such that the coherent lookup-addition unitary
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 () an exact half-ULP rounded fallback table is selected, whereas at the benchmark instance (, , Q2.23 format, 16,777,217 valid inputs, ) 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 (, , Q2.23, 50 data qubits and 50 clean ancillas):
(
arcsin_correctness.k25) In the proof term of the existential theoremarcsin_correctnessinstantiated at , the output table is witnessed by the concrete table , for which on all 16,777,217 valid inputs is independently proved byz25_satisfies_abs_error, and the coherent lookup-addition unitary is proved to be realized byarcsinProgram.k25with clean ancilla return on every disjoint register placement (RealizesCleanSubroutine).
(
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 forarcsinProgram.k25.
(
ExactAudit.exactPublicK25) On every disjoint wire placement satisfyingDisjointWires, the compiled logical gate counts and spacetime cost ofarcsinProgram.k25are proved to be exact:
(
ExactAudit.exactPublicK25_nonvacuous) The predicateDisjointWiresand 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 gates are priced by these counts in the frozen Clifford++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% -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 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 472 , −24 ). 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 is defined with the disjointness relations
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 as on twelve live-wire parities , where is affine in the live wires and the 28 class indicators, each component of lies in the surviving linear subspace of class-indicator sums spanned by the live wires, and the alternating polar matrix defined by (with ) is of full rank 12. With , the shift identity
is satisfied identically over . Crucially, because is one-hot on reachable states ( for , ), every quadratic function of linear combinations of the class indicators—in particular —is reduced on reachable states to a linear combination of ; 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, is decomposed into six parity products up to an affine correction; because 1 is charged for each positive or negative parity step in an hGadget, 24 are saved when each of the twelve Hadamard gadgets is reduced from 8+8 steps (16 ) to 7+7 steps (14 ). 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--weight schedule of 22 and 178 gates (200 corrections).
Forward 9-bit square s4_2Ops (172 160 , ). In the frozen truncated 9-bit square lookup, full-adder carries are given over by . 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 gates (down from 43) and 31 quadratic erasures, while the 21-AND reverse square s5_2CoreOps (84 ) 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 module | Change relative to pinned discoveries (a88de8ff) |
| Arcsin | Public numeral 369,800 366,200 and final multiplication bound. |
| StageTablesA | Forward square table s4_2Ops (43 40 paid ANDs). |
| StageTablesB | Six sequences implementing the s3aOps gadget and phase rewrite. |
| StageCircuitB | Updated local and aggregate AND/ count certificates. |
| StageProofB | Aggregate AND count 776 773 and compiled -bound 3,698 3,662. |
Table 2. The five modified arcsine modules; the remaining 11 of 16 arcsine modules are byte-identical to upstream.
| Stage | Ref. | New | Ancillas | Stage | Ref. | New | Ancillas |
| s1B | 0 | 0 | 0/0/0 | s4_3 | 392 | 392 | 34/50/42 |
| s1Y | 92 | 92 | 0/23/0 | s4_4 | 200 | 200 | 42/49/42 |
| s1Add | 96 | 96 | 0/24/0 | s5_1 | 360 | 360 | 42/50/34 |
| hop_0 | 0 | 0 | 0/1/1 | s5_2Core | 84 | 84 | 34/50/25 |
| s2a | 68 | 68 | 1/18/13 | hop_4 | 0 | 0 | 25/26/25 |
| s2b | 188 | 188 | 13/14/13 | s5_2Post | 64 | 64 | 25/42/12 |
| s2c | 0 | 0 | 13/13/3 | hop_5 | 0 | 0 | 12/12/12 |
| s3a | 496 | 472 | 3/50/28 | s5_3 | 664 | 664 | 12/50/18 |
| s3bAdd | 104 | 104 | 28/50/28 | hop_6 | 0 | 0 | 18/18/18 |
| s3bPost | 294 | 294 | 28/50/27 | s5_4 | 76 | 76 | 18/40/14 |
| hop_1 | 0 | 0 | 27/28/27 | s6a | 0 | 0 | 14/21/13 |
| s4_1 | 48 | 48 | 27/34/28 | s6b | 188 | 188 | 13/14/13 |
| hop_2 | 0 | 0 | 28/28/28 | s6c | 20 | 20 | 13/18/1 |
| s4_1Post | 0 | 0 | 28/28/25 | hop_7 | 0 | 0 | 1/1/0 |
| hop_3 | 0 | 0 | 25/26/25 | s7Y | 92 | 92 | 0/23/0 |
| s4_2 | 172 | 160 | 25/50/34 | s1B | 0 | 0 | 0/0/0 |
Table 3. Stage-by-stage -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 (output integer 4,092,728) is identified with error 1.0485006779846463 ULP against the 1.048576 ULP limit (margin 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 is deduced for s2a and, via the reverse-direction affine-rank bound over the 12 added garbage coordinates, a lower bound of 20 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 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- 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 -element marked set must be encoded in the output with probability one for every admissible , , and . Exactly one cell, , is claimed by both constructions below, for which an eventual-in- uniform-average cost upper bound
is proved, where . Machine-checked asymptotic upper bounds are compared through the certified rationals 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 of cardinality (where “width-one” denotes block multiplicity , i.e. a single -slot register block per walk step, matching Rkm128kSeg.lS = 1), grouped into the 513 symmetric orbits indexed by occupancy . On this 513-dimensional orbital subspace, one discrete reflection-diffusion step (where is the marked-set phase reflection and is the symmetric Johnson diffusion) is represented by the orthogonal orbital matrix (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 as is defined by superdiagonal entries and subdiagonal entries , where
(In the independent limiting script enclose.py, the opposite sign convention is used, conjugated by ; because every diagonal sign mask and Kraus operator is invariant under conjugation by and is fixed by , all surviving branch norms, click probabilities, and expected costs are identical under either convention.) For segment with dimensionless normalized duration and Lean macro-substep count nSubt, exactly discrete walk steps are executed (altStepCount; Appendix A), so that the finite- orbital propagator converges to as .
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
is proved, whereby the pinned discovery’s bound 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 , 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 is denoted by (tabulated in Appendix § 7: for and , with 14 nontrivial filters at –). When the separate terminal strong readout after segment 24 is incorporated into a unified recurrence, the effective stage attenuation parameter is defined by
satisfying for all . Physically, at each active probe, the 1024 marker bits are computed by one parallel oracle call, the flag is rotated by an -independent unitary conditioned on the number of distinct marked addresses equaling 512 while the diagonal sign mask is applied, the flag is measured, and the marker bits are uncomputed by a second oracle call. Upon a click (), the state is projected strictly onto and immediate full readout is triggered; upon a no-click (), coherence across all bins is preserved with only the amplitude attenuated.
In the actual finite- circuit, the uniform superposition of -element subsets is represented in the orbital basis by (uOrbVecGen (2^n) 1024 512) with entries , obeying for all (vecNorm_uOrbVecGen_sub_e0_le, initialError). The unnormalized continuing-branch orbital state in the finite- circuit is propagated according to
whereas in the limiting model, and are replaced by and . In both models, segment ’s walk cost is weighted by the surviving branch mass , and total single-attempt success probability is given by the sum of all click probabilities (including the terminal strong read at ). Crucially, because the collective Johnson-walk orbit is permutation-symmetric in the hidden set , the same finite- orbital vector recurrence and uniform per-set bounds are satisfied identically for every (BatchBound.perSet); thus no invalid interchange of ratio and expectation is introduced when is averaged over .
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 (restart_cost) is proved from per-attempt expected cost and success probability . 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 oracle rounds. In Lean, the deviation , the finite- operator discretization error between and , and the degree-28 Taylor truncation and rounding errors are all bounded cumulatively across 163 macro-substeps at scale (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 quantity | Exact value / interval | Source |
| Uniform single-attempt success | Cert.success12 (A) | |
| Uniform attempt walk cost | <br> | Cert.weightedCost21 (A) |
| Fixed per-attempt probe/read overhead | oracle rounds | WeakAssemblyStages (A) |
| Final orbital error pad (seg. 24) | row23.walkPad (A) | |
| Restart ratio bound () | Cert.retryUpper15 (A) | |
| Restart gap and -scale slack | ;<br> | FiniteFromCutoff (A) |
| Limiting retry cost (enclose.py, ord. 24) | 915 substeps (C) | |
| Limiting archived-cont. cost (enclose.py) | 915 substeps (C) |
Table 4. Exact numerical certificate for Track2Weak.FindAllWeak at , where . All Tier (A) bounds hold uniformly across every 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 (enclose.py, refine_placement0_enclosure.json; full 42-digit endpoints archived).
by which the pinned discovery’s certified upper bound is reduced by 0.946% (and by 0.908%).
Finite cutoff and asymptotic regime ( inherited engine threshold). The activation threshold (altN0 := 80000) is inherited directly from the finite- Johnson-walk error lemmas of the upstream-derived engine (FindAllJohnsonAltStep.lean and Rk128kEngine.lean), so 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 constructed in WeakAssemblyCell.lean (normalized_batch_cost and routedBatch_rel_cost), absorbing the fixed overhead 24,673 inside the restart rounding margin requires only , for which suffices (FiniteFromCutoff.finite_normalized). Consequently, the claimed ratio is established uniformly for every by the companion theorem:
Proposition 5.1 (Uniform weak-filter bound for all ; Tier A). By the companion theorem QuantumComputation.Specs.groverFindAll_cost_from_80000 (FiniteFromCutoff.lean, verified inside the 111-module leanchecker replay), for every satisfying
is proved, where denotes groverFindAllProgram 1024 512 applied to groverParallelMarkingOracle 1024 and .
Because corresponds to a search space of items and 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 via the exact Stage1 fallback below 80,000; (ii) the uniform finite- relative-cost theorem relative to for every (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 , , and , in an external 256-bit Arb evaluation of the GR0 cap model its asymptotic relative coefficient is enclosed in (Tier C; the reference schedule was not independently re-derived from [1], Appendix E). When the lower endpoint is divided by the positive Lean upper bounds, conservative asymptotic coefficient ratios of at least (sign-only) and (weak filters, +0.955% over the reference via ) are obtained; no finite- lower bound on the actual cost of GR0 is claimed. Outward-rounded upper bounds on 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 evidence | Asymptotic ext. GR0 factor | |
| Pinned discovery [1], Lean upper bound () | 27,024,465,988 | |
| Sign-only walk, Lean upper bound () | 27,014,193,664 | |
| Weak filters + restart, Lean upper bound (all ) | 26,768,771,052 | |
Weak filters + restart, enclose.py upper bound (Tier C)‡ | 26,768,766,547 | |
Weak filters + archived cont., enclose.py upper bound (Tier C)‡ | 26,768,742,839 |
Table 5. Single-cell (1024, 512) relative-cost upper bounds and externally derived asymptotic GR0 coefficient ratios (). Finite-circuit Lean 4.35.0 proofs are carried only by the rows above the rule (all three share the engine cutoff). ‡Outward-rounded upper bounds on (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 suite | Modules | leanchecker | Interface, staged files & notes |
| Track 2B/C: FindAny LowerBound + Tighter FindAny | 31 | 31/31 exit 0 | Direct import of frozen spec + 16/16 match (9 types, 7 bodies); 31 staged |
| Track 3: Arcsin (16) + audit + exact + witness | 20 | 20/20 exit 0 | 25/25 frozen decls matched; 11/16 upstream identical; 9 proof + 2 helper scripts staged |
| Track 2A: FindAll (sign-only) | 117 | 117/117 exit 0 | 18/18 interface match; 117 staged |
| Track 2W: Track2Weak (weak filters) | 111 | 111/111 exit 0 | 18/18 literal types, 11/11 norm. bodies; 109 closure + 2 companion modules; 111 staged |
| Track 1: Track1THC (App. B, partial) | 9 | 9/9 exit 0 | 0/7 def. holes + 0/2 thms; no separate agent audit; 9 staged |
| Total | 288 | 288/288 exit 0 | 279 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 claim | Declaration (with namespace prefix)2 | Entry file | Archived receipt (receipts/) |
| Thm. 3.1 (finite & actual rounds) | FA.finite, FA.actual_expected_rounds | FindAny LowerBound.lean | track2_grover/findany_replay_manifest.json |
| Thm. 3.2 (infimum ) | FA.asymptotic_real, FA.no_smaller_rational, FA.exact_infimum | FindAny LowerBound.lean | track2_grover/Track2Grover.FindAny LowerBound_checker.log |
| Thm. 4.1(1)–(2) (correctness, 366,200) | QCS.arcsin_correctness, QCS.arcsin_k25_const_cost | Primitives/Arcsin.lean | track3_arcsin/track3_leanchecker_final.json |
| Thm. 4.1(3)–(4) (exact count, witness) | QCS.ArcsinImpl.ExactAudit.exactPublicK25, exactPublicK25_nonvacuous | ExactPublic.lean, Disjoint Witness.lean | track3_arcsin/track3_exact_public_leanchecker.json, track3_disjoint_witness_leanchecker.json |
| §5 sign-only (27,014,193,664/) | QCS.groverFindAll_rel_cost (Track2Grover pkg.) | Track2Grover/FindAll.lean | track2_grover/findall_replay_manifest.json |
| §5 & Prop. 5.1 (weak, ) | QCS.groverFindAll_rel_cost, QCS.groverFindAll_cost_from_80000 (Track2Weak pkg.) | FindAllWeak.lean, Finite FromCutoff.lean | track2_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
Op102simulation, symplectichGadgetdecomposition, ancilla liveness profiling, HJB optimality analysis forGroverFindAny, dedicated same-kernelleancheckerreplays,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 proofFindAnyLowerBound, bothGroverFindAllLean 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 partialTrack1THCmodules (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 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 (, ) segments are executed on the collective Johnson walk. The dimensionless normalized walk time —corresponding to the -scaled continuous walk duration —is specified by each integer entry (). In the finite- Lean circuits, each segment with macro-substep count nSubₜ is converted into an exact integer number of discrete walk iterations by the floor rule altStepCount (FindAllJohnsonAltStep.lean):
Across the 24 segments, macro-substeps are used in the Lean degree-28 Taylor certificate for the sign-only proof (Track2Grover.FindAll), and macro-substeps are used in the weak-filter proof (WeakCertRun.lean, with ).
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 (byte , bit ) is negated when bit 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 (identity when , i.e. segments 1–9 and 24; 14 active nontrivial filters at segments 10–23). Following the final identity weak filter () 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 .
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 , Tier C) before formalization of the finite- degree-28 Lean 4.35.0 proofs (Tier A). All 24 durations and all 24 archived attenuation numerators 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 | Weak | Weak | Seg. | Sign-only | Weak | Weak |
| 1 | 12,821,058 | 12,720,755 | 1,000,000,000 | 13 | 65,182 | 127,379 | 764,201,123 |
| 2 | 13,747,829 | 13,875,167 | 1,000,000,000 | 14 | 40,397 | 129,011 | 834,019,056 |
| 3 | 92,406 | 373,513 | 1,000,000,000 | 15 | 137,815 | 46,142 | 916,974,644 |
| 4 | 65,722 | 170,424 | 1,000,000,000 | 16 | 100 | 56,478 | 903,538,624 |
| 5 | 129,303 | 137,205 | 1,000,000,000 | 17 | 30,741 | 56,630 | 915,327,669 |
| 6 | 122,231 | 188,284 | 1,000,000,000 | 18 | 228,337 | 37,059 | 911,809,418 |
| 7 | 14,548 | 169,485 | 1,000,000,000 | 19 | 472 | 55,214 | 824,068,230 |
| 8 | 129,661 | 207,325 | 1,000,000,000 | 20 | 209,872 | 123,114 | 608,644,063 |
| 9 | 16,328 | 242,404 | 1,000,000,000 | 21 | 291,357 | 371,610 | 464,745,164 |
| 10 | 114,245 | 205,999 | 881,826,710 | 22 | 100 | 417,762 | 368,423,142 |
| 11 | 31,763 | 76,765 | 842,867,478 | 23 | 369,114 | 633,308 | 331,827,239 |
| 12 | 78,933 | 134,879 | 786,860,383 | 24 | 300,014 | 897,029 | 1,000,000,000* |
Table 8. Exact integer time numerators (defining dimensionless normalized times and -scaled durations , width throughout) and archived weak-filter no-click amplitude numerators 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 are applied. *At segment 24, the archived weak filter is the identity (), immediately followed by a separate terminal strong readout modeled by (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.*) | Lines | Verified mathematical or circuit-algebra content |
| Alias | 147 | Exact integer Walker–Vose alias decomposition (alias_exists). |
| JWAlgebra | 567 | Upstream-adapted orbital reflections (Parts 1–3, 5) + new Jordan–Wigner CAR (Part 6, absent upstream). |
| Centering | 203 | Centered THC decomposition matching frozen 1-norm lamRep. |
| LCUa | 33 | Existence of a unitary with prescribed real unit first column. |
| LCU | 255 | Abstract qubitized block-encoding existence (lcu_blockEncoding; adapts upstream blockSplit* lemmas). |
| Select | 101 | Involutive swapSelect for non-commuting reflection products. |
| CleanOps | 397 | Clean/catalytic composition, additive TOFF = 0/ algebra, lifted Jones-AND. |
| CatalyticRot | 168 | Exact eigenvector kickback on frozen phaseGradientState. |
| CliffordGadgets | 85 | Clean single-qubit gates, zero- 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 words are partitioned by the 440 certified dyadic cubes. Deterministic updates on basis-state bits are induced by Op102 instructions as follows:
Zero- affine/phase operations: basis bits are updated affinely (or phase only is applied) at cost by X, CX, Z, and CZ. A target wire is reset to 0 in the forward direction (an affine assignment) at cost by the clean erasures
unandandunquad.Paid quadratic operations (): a quadratic Boolean update at cost is applied by both
rccxvariants and by the clean-targetand4tgate. 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 validhGadget. 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 steps (cost ) are required for any nonlinearhGadgetwrite.
Forward degree bound for s2a (). When every wire state is expressed as a multilinear polynomial over 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 paid nonlinear operations has degree at most . 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 is forced, requiring at least , which is attained tightly by s2aOps.
Reverse-direction affine-rank bound for s6c (). 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 of a valid deterministic Op102 trace run backward on this domain, with current wire Boolean functions , the affine-span dimension is defined explicitly by
where the constant 1 is included so that 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 :
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, ); otherwise 1 quadratic substitution is incurred and affine-span dimension is increased by .
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 (). When rccx is reversed, one wire is replaced by itself XOR a product of two others: if , its new value is affine in the remaining wires (cost 0), and otherwise at most 1 quadratic substitution is incurred with .
Identically zero output bits are generated by zero- or two- 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 , the number of quadratic substitutions contributed is at most . Summing across the entire reverse trace, the total affine-rank increase from the 23 raw bits to the 23 raw bits plus 12 garbage coordinates is at most 12; with denoting the number of paid operations of cost , every incoming garbage function therefore has algebraic degree at most . 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 and hence at least , 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 , the 9 frozen square output bits by , and the 21 baseline paid product functions by . With the 17 products indexed by held fixed, the 35-dimensional fixed subspace over is spanned by the 35 linearly independent functions , whereas the 39-dimensional total allowed intermediate space and the 4-dimensional quotient space (with canonical projection ) are obtained when the four rewritten products are adjoined. Any valid replacement of those four AND gates by at most three new AND gates whose products lie within must generate intermediates whose images under lie in a proper subspace (, ), of which there are exactly over . For each proper subspace , under reverse quadratic closure it is tested whether every function in the preimage can be uncomputed back to 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 (with ordered basis and 38-dimensional preimage ) is retained.
To enter from via new AND gates, at least one nonzero direction in must be realized modulo as a single rank-1 product , equivalently by a skew-symmetric alternating matrix over of rank at most 2. The seven nonzero directions of are subsequently indexed by their 3-bit coordinates in the ordered basis (corresponding to the 4-bit masks 3, 5, 6, 9, 10, 12, 15 respectively). For each , the set of all alternating matrices whose evaluated quadratic form matches modulo constitutes an affine space of dimension over . Every rank- alternating matrix is annihilated by all four-index Pfaffians . Because each is a Boolean polynomial of degree at most 2 in the free affine parameters, an XOR sum of Pfaffians is identically equal to 1 across all parameter assignments if and only if it evaluates to 1 on all assignments of Hamming weight at most 2. For all seven nonzero targets , 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- assignments, proving that 21 ANDs are necessary within the restricted 39-dimensional intermediate span .
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 bursts and helper placement 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 () 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]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]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]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]M. Boyer, G. Brassard, P. Høyer, and A. Tapp, Tight bounds on quantum searching, Fortschritte der Physik 46 (1998), 493–505.
- [5]C. Zalka, Grover’s quantum searching algorithm is optimal, Physical Review A 60 (1999), 2746–2751.DOI
- [6]L. K. Grover and J. Radhakrishnan, Quantum search for multiple items using parallel queries, arXiv:quant-ph/0407217 (2004).DOI
- [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]A. Mizel, Critically damped quantum search, Physical Review Letters 102 (2009), 150501.pubmed.ncbi.nlm.nih.gov/19518609
- [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]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]R. Mirwald and C. P. Schnorr, The multiplicative complexity of quadratic Boolean forms, Theoretical Computer Science 102 (1992), 307–328.DOI
- [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]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]C. Jones, Low-overhead constructions for the fault-tolerant Toffoli gate, Physical Review A 87 (2013), 022328.DOI
- [15]C. Gidney, Halving the cost of quantum addition, Quantum 2 (2018), 74.DOI
- [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]Y. Feng and M. Ying, Quantum Hoare logic with classical variables, ACM Transactions on Quantum Computing 2 (2021), 1–43.DOI
- [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]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]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]Lean FRO, comparator: Lean 4 formal challenge verification tool, https://github.com/leanprover/comparator, 2026.
- [22]F. Johansson, Arb: efficient arbitrary-precision midpoint-radius interval arithmetic, IEEE Transactions on Computers 66 (2017), 1281–1292.arxiv.org/abs/1611.02831