Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1 — a total fff on O~(n3)\tilde O(n^3)O~(n3) bits with C(f)=Ω(n2)C(f)=\Omega(n^2)C(f)=Ω(n2), R(f)=O~(n)R(f)=\tilde O(n)R(f)=O~(n), Q(f)=O~(n)Q(f)=\tilde O(\sqrt n)Q(f)=O~(n​)

Proved
RvsCert.theorem_1

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

boolean-functionsp2o-gran-per-chapterp2o-plan-paperp2o-v1quantum-algorithmsquery-complexity

There are constants AAA, c>0c>0c>0 and kkk such that for every n>0n>0n>0 there is a total Boolean function f:{0,1}N→{0,1}f:\{0,1\}^N\to\{0,1\}f:{0,1}N→{0,1} with

  1. N≤A n3(log⁡2n+1)kN\le A\,n^3(\log_2 n+1)^kN≤An3(log2​n+1)k,
  2. C(f)≥c n2C(f)\ge c\,n^2C(f)≥cn2,
  3. R(f)≤A n(log⁡2n+1)kR(f)\le A\,n(\log_2 n+1)^kR(f)≤An(log2​n+1)k, and
  4. Q(f)≤An (log⁡2n+1)kQ(f)\le A\sqrt n\,(\log_2 n+1)^kQ(f)≤An​(log2​n+1)k,

where CCC is the certificate complexity and RRR, QQQ are the bounded-error (error 1/31/31/3 on every input) randomized and quantum query complexities. In particular R(f)=O~(C(f))R(f)=\tilde O(\sqrt{C(f)})R(f)=O~(C(f)​) and Q(f)=O~(C(f)1/4)Q(f)=\tilde O(C(f)^{1/4})Q(f)=O~(C(f)1/4), answering the question whether a total function can have R(f)≪C(f)R(f)\ll C(f)R(f)≪C(f).

Formalization Note RRR and QQQ take values in N∪{∞}\mathbb N\cup\{\infty\}N∪{∞}; each upper bound is stated as the existence of a natural number TTT with R(f)≤TR(f)\le TR(f)≤T (resp. Q(f)≤TQ(f)\le TQ(f)≤T) satisfying the bound.

Differences from the source:

  • reading: N = Õ(n³), C(f) = Ω(n²), R(f) = Õ(n), Q(f) = Õ(√n) for all n > 0 → ∃ A, c > 0, k before n with N ≤ A·n³·(log₂ n+1)^k, c·n² ≤ C f, R, Q ≤ A·n·(log₂ n+1)^k, A·√n·(log₂ n+1)^k; reason: asymptotic notation over the family in n is uniform; the +1 keeps the polylog factor positive at n = 1; a common A and k for the three Õ bounds is equivalent (take the maximum)
  • encoding: f : {0,1}^N → {0,1}; R(f), Q(f) → f : (Fin N → Bool) → Bool; randQC, quantQC in ℕ∞ stated as ∃ T : ℕ, … ≤ T ∧ T ≤ …; reason: Lean convention; same instances
Preamble
import Mathlib
import Definitions.Def_RvsCert_C
import Definitions.Def_RvsCert_randQC
import Definitions.Def_RvsCert_quantQC
Formal statement
namespace RvsCert

/-- **Theorem 1** (p.1 of Ben-David–Kothari, *Randomized query complexity can beat certificate complexity*, arXiv:2609.15063v1): "For all n > 0, there is a total Boolean
function f : {0, 1}^N → {0, 1} with N = Õ(n³), such that C(f) = Ω(n²), R(f) = Õ(n), and
Q(f) = Õ(√n)." There are constants `A`, `c > 0` and `k` such that for every `n > 0` there are
`N` and a total `f : (Fin N → Bool) → Bool` with `N ≤ A·n³·(log₂ n + 1)^k`, `C(f) ≥ c·n²`,
`R(f) ≤ A·n·(log₂ n + 1)^k` and `Q(f) ≤ A·√n·(log₂ n + 1)^k`.

**Formalization Note.** `R` and `Q` are bounded-error (`1/3` on every input) worst-case query
complexities in `ℕ∞`, stated as `∃ T : ℕ, … ≤ T ∧ T ≤ …`; `Õ(g)` is read as
`≤ A·g·(log₂ n + 1)^k` with constants chosen before `n`. -/
theorem theorem_1 :
    ∃ (A c : ℝ) (k : ℕ), 0 < c ∧ ∀ n : ℕ, 0 < n →
      ∃ (N : ℕ) (f : (Fin N → Bool) → Bool),
        (N : ℝ) ≤ A * (n : ℝ) ^ 3 * (Real.logb 2 n + 1) ^ k ∧
        c * (n : ℝ) ^ 2 ≤ (C f : ℝ) ∧
        (∃ T : ℕ, randQC f ≤ T ∧ (T : ℝ) ≤ A * (n : ℝ) * (Real.logb 2 n + 1) ^ k) ∧
        (∃ T : ℕ, quantQC f ≤ 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, Theorem 1, p.1
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