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

Primarily AI-generated textHuman understanding: some partsquant-ph — Quantum Physicscs.LO — Logic in Computer Science

Contributed by Robert Kadlec

Version 2 / Nov 26, 2026 / CC BY 4.0

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, and prose were produced purely by AI systems under human supervision; all four challenge constructions were accepted by the official Linux lake comparator (bwrap sandbox) using standard axioms only, and the flagship FindAny theorems were also accepted by two third-party kernels (nanoda, con-ron).

Author comments: 29 pages. v2 (corresponding to companion artifact release v1.0.1, Zenodo DOI 10.5281/zenodo.24584791, Concept DOI 10.5281/zenodo.24545552, GitHub https://github.com/Ikaro2023/quantum-lean-deepmind-benchmarks): adds official 64-bit Linux lake comparator (bwrap 0.11.1 sandbox) PASS receipts across all four challenge constructions plus upstream lake test PASS, incorporates the one-keyword FindAllWeak.lean line 30 abbrev fix (restoring ReducibilityHints.regular(37)) with post-fix leanchecker replays, corrects nanoda citation authorship (C. Bailey), and tightens exposition.

Provenance statement

Purely AI-generated research directed, scoped, and supervised by Robert Kadlec (Masaryk University, Brno, Czech Republic; ORCID 0009-0003-9245-8130), by whom full scholarly responsibility for the work is assumed. This paper is part of a broader research project in which the respective competencies of humans and large language models are investigated. No new mathematical proof, circuit table, Lean 4 module, verification script, or paragraph of prose was manually written by the human author. All technical execution and adversarial refereeing were delegated to AI systems operating with strict role separation: Antigravity/Gemini, OpenAI Codex (gpt-6.2-astra), Anthropic Claude Code (sonnet and claude-fable-5-2 xhigh), and OpenAI ChatGPT Web (6 Pro). Every Tier (A)/(B) formal statement is machine-checked in Lean 4.35.0 against byte-identical frozen upstream specifications from google-deepmind/formal-quantum-computation (commit 489edc70) with 0 sorry, 0 native_decide, and standard Lean axioms [propext, Classical.choice, Quot.sound] only; all four challenge constructions pass the official Linux lake comparator (bwrap 0.11.1 sandbox) plus upstream lake test, and the flagship FindAny theorems are independently accepted by two third-party kernels (nanoda and con-ron). Full provenance and companion artifact release v1.0.1 are archived at https://doi.org/10.5281/zenodo.24584791 (Concept DOI https://doi.org/10.5281/zenodo.24545552; GitHub https://github.com/Ikaro2023/quantum-lean-deepmind-benchmarks).

Tools used

Google
GeminiVersion Antigravity/Gemini
Lean
LeanVersion 4.35.0
OpenAI
CodexVersion gpt-6.2-astra
OpenAI
ChatGPTVersion 6 Pro
Anthropic
Claude CodeVersion sonnet
Anthropic
Claude FableVersion claude-fable-5-2 xhigh

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
  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
  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.
  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.
  6. L. K. Grover and J. Radhakrishnan, Quantum search for multiple items using parallel queries , arXiv:quant-ph/0407217 (2004).arXiv
  7. A. Belovs and D. Yolcu, One-way ticket to Las Vegas and the quantum adversary , arXiv:2301.02003 [quant-ph] (2023).arXiv
  8. A. Mizel, Critically damped quantum search , Physical Review Letters 102 (2009), 150501.
  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.
Show all 24 referencesShow fewer references
  1. R. Mirwald and C. P. Schnorr, The multiplicative complexity of quadratic Boolean forms , Theoretical Computer Science 102 (1992), 307--328.
  2. Ç. Çal k, M. Sönmez Turan, and R. Peralta, Boolean functions with multiplicative complexity 3 and 4 , Cryptography and Communications 12 (2020), 935--946.
  3. T. Häner, M. Roetteler, and K. M. Svore, Optimizing quantum circuits for arithmetic , arXiv:1805.12445 [quant-ph] (2018).arXiv
  4. C. Jones, Low-overhead constructions for the fault-tolerant Toffoli gate , Physical Review A 87 (2013), 022328.
  5. C. Gidney, Halving the cost of quantum addition , Quantum 2 (2018), 74.
  6. 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.
  7. Y. Feng and M. Ying, Quantum Hoare logic with classical variables , ACM Transactions on Quantum Computing 2 (2021), 1--43.
  8. 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.
  9. 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.
  10. 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/Timeroot/Lean-QuantumInfo, 2024.link
  11. Lean FRO, comparator: Lean 4 formal challenge verification tool , https://github.com/leanprover/comparator, 2026.link
  12. C. Bailey, nanoda_lib / nanoda_bin (v0.4.19): independent Rust type checker for Lean 4 , https://github.com/ammkrn/nanoda_lib, bundled with Lean 4.35.0 ( eb6cafb7 ), 2026.link
  13. Lean 4.35.0 Toolchain, con-ron ( --verified ): formally verified Rust arena type checker for lean4export 3.1.0 streams , https://github.com/leanprover/con-ron, bundled with Lean 4.35.0 ( eb6cafb7 , binary SHA-256 4e351dd1 332d40 ), 2026.link
  14. F. Johansson, Arb: efficient arbitrary-precision midpoint-radius interval arithmetic , IEEE Transactions on Computers 66 (2017), 1281--1292.

Version history

  1. v1 · 26 pagesSubmitted by Robert KadlecInitial depositSupersededNov 26, 2026
  2. v2 · 29 pagesSubmitted by Robert Kadlec29 pages. v2 (corresponding to companion artifact release v1.0.1, Zenodo DOI 10.5281/zenodo.24584791, Concept DOI 10.5281/zenodo.24545552, GitHub https://github.com/Ikaro2023/quantum-lean-deepmind-benchmarks): adds official 64-bit Linux lake comparator (bwrap 0.11.1 sandbox) PASS receipts across all four challenge constructions plus upstream lake test PASS, incorporates the one-keyword FindAllWeak.lean line 30 abbrev fix (restoring ReducibilityHints.regular(37)) with post-fix leanchecker replays, corrects nanoda citation authorship (C. Bailey), and tightens exposition.CurrentNov 27, 2026