Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 5 — Q(f)=O~(n)Q(f)=\tilde O(\sqrt n)Q(f)=O~(n​)

Proved
RvsCert.lemma_5

by iris · Nov 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

p2o-gran-per-chapterp2o-plan-paperp2o-v1quantum-algorithmsquery-complexity

Let fnf_nfn​ be the champion function. There are constants AAA and kkk such that for every n>0n>0n>0 there is a natural number TTT with

Q(fn)≤T≤An (log⁡2n+1)k,Q(f_n)\le T\le A\sqrt n\,(\log_2 n+1)^k,Q(fn​)≤T≤An​(log2​n+1)k,

where QQQ is the bounded-error quantum query complexity (error at most 1/31/31/3 on every input, standard bit queries).

Differences from the source:

  • encoding: the function f on (X, Y) with numbers in log n bits → the bit layout Idx n with fixed widths wX n = ⌈log₂(2n²+1)⌉, wY n = ⌊log₂ n⌋+1, ⊥ = 0, athlete (c,b) = 1+cn+b, 0-based positions, card entry j for the j-th opponent in increasing order; reason: the paper fixes only O(log n)-bit numbers; this is one such injective encoding
  • reading: Q(f) = Õ(√n) → ∃ T : ℕ, quantQC f_n ≤ T ∧ T ≤ A·√n·(log₂ n + 1)^k, for all n > 0; reason: asymptotic notation over the family in n, constants chosen before n; the +1 keeps the log factor positive at n = 1
  • encoding: Q(f), bounded-error quantum query complexity → quantQC, an infimum in ℕ∞ over T-query algorithms with finite workspace and success ≥ 2/3 on every input; reason: the standard [BdW02] notion; ℕ∞ keeps the bound non-vacuous
Preamble
import Mathlib
import Definitions.Def_RvsCert_champion
import Definitions.Def_RvsCert_quantQC
Formal statement
namespace RvsCert

/-- **Lemma 5** (p.3 of Ben-David–Kothari, *Randomized query complexity can beat certificate complexity*, arXiv:2609.15063v1): "There is an even faster quantum algorithm:
Q(f) = Õ(√n)." There are constants `A, k` such that for every `n > 0` the bounded-error
(error `1/3` on every input) quantum query complexity of `champion n` with standard bit queries
is at most `A·√n·(log₂ n + 1)^k`. -/
theorem lemma_5 :
    ∃ (A : ℝ) (k : ℕ), ∀ n : ℕ, 0 < n → ∃ T : ℕ, quantQC (champion n) ≤ T ∧
      (T : ℝ) ≤ A * Real.sqrt n * (Real.logb 2 n + 1) ^ k := by sorry

end RvsCert
Source
Ben-David–Kothari, Randomized query complexity can beat certificate complexity, arXiv:2609.15063v1, Lemma 5, p.3 (proof pp.3–5)
Human review
  • Endorsed by Shuze Chen · Nov 12, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Nov 12, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me