Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 3.3, pp. 7–8 (corrected) — changing oracle answers on pairs of total query magnitude ≤ ε²/T moves the final state by ≤ 2ε

Proved
BBBV.RandomOracle.theorem_3_3

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

hybrid-argumentlower-boundp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1quantum-query-complexity

Let MMM be a TTT-query algorithm with workspace WWW, query strings XXX and answers RRR, and let A:X→RA : X \to RA:X→R be an oracle. Write φi\varphi_iφi​ for the state of MMM at time iii when every query is answered by AAA, and qy(φi)q_y(\varphi_i)qy​(φi​) for the query magnitude of yyy in φi\varphi_iφi​ (Definition 3.2). Let ε>0\varepsilon > 0ε>0 and let F⊆{0,…,T−1}×XF \subseteq \{0, \dots, T-1\} \times XF⊆{0,…,T−1}×X be a set of time–string pairs with

∑(i,y)∈Fqy(φi)≤ε2T.\sum_{(i,y) \in F} q_y(\varphi_i) \le \frac{\varepsilon^2}{T}.(i,y)∈F∑​qy​(φi​)≤Tε2​.

Modify the answer to each query (i,y)∈F(i, y) \in F(i,y)∈F to an arbitrary fixed value ai,y∈Ra_{i,y} \in Rai,y​∈R, and keep the answer A(y)A(y)A(y) for (i,y)∉F(i, y) \notin F(i,y)∈/F; the modified answers need not come from a single oracle. If φT′\varphi'_TφT′​ is the final state of MMM under the modified answers, then

∥φT−φT′∥≤2ε.\|\varphi_T - \varphi'_T\| \le 2\varepsilon .∥φT​−φT′​∥≤2ε.

This is the hybrid argument: an algorithm cannot notice a change of the oracle on queries it makes with small total amplitude. Corollary 3.4 and the lower bound of Theorem 3.5 rest on it.

Formalization Note The paper prints the conclusion ≤ε\le \varepsilon≤ε, which is false. Counterexample: one query string yyy, answers in Z/2\mathbb{Z}/2Z/2, trivial workspace, T=1T = 1T=1, U0=idU_0 = \mathrm{id}U0​=id, initial state ∣y⟩⊗(∣0⟩−∣1⟩)/2|y\rangle \otimes (|0\rangle - |1\rangle)/\sqrt 2∣y⟩⊗(∣0⟩−∣1⟩)/2​, A(y)=0A(y) = 0A(y)=0, a0,y=1a_{0,y} = 1a0,y​=1, F={(0,y)}F = \{(0, y)\}F={(0,y)}, ε=1\varepsilon = 1ε=1: then ∑Fq=1=ε2/T\sum_F q = 1 = \varepsilon^2/T∑F​q=1=ε2/T, but the two final states are ±\pm± the initial state, at distance 222. The proof's step "the sum of squared magnitudes of all of the EiE_iEi​ is equal to ∑(i,y)∈Fqy(∣φi⟩)\sum_{(i,y)\in F} q_y(|\varphi_i\rangle)∑(i,y)∈F​qy​(∣φi​⟩)" omits a factor 444 (the error of one step is (Oa−OA)(O_{a} - O_A)(Oa​−OA​) applied to the querying part, of norm up to twice that part); with it the same argument gives 2ε2\varepsilon2ε, which the counterexample shows is sharp. The modified answers are a time-dependent family ai:X→Ra_i : X \to Rai​:X→R equal to AAA off FFF. At T=0T = 0T=0 the bound ε2/T\varepsilon^2/Tε2/T is 000 in Lean and FFF is empty, so the statement holds trivially there as it does on the page.

Preamble
import Mathlib
import Definitions.Def_BBBV_RandomOracle_QueryModel
Formal statement
namespace BBBV.RandomOracle

theorem theorem_3_3 {X R W : Type} [Fintype X] [DecidableEq X] [Fintype R] [DecidableEq R]
    [AddCommGroup R] [Fintype W] [DecidableEq W] {T : ℕ} (M : QueryAlg X R W T)
    (A : X → R) (F : Finset (Fin T × X)) (a : Fin T → X → R)
    (ha : ∀ i y, (i, y) ∉ F → a i y = A y) (ε : ℝ) (hε : 0 < ε)
    (hF : ∑ p ∈ F, queryMag p.2 (state M (fun _ => A) p.1) ≤ ε ^ 2 / (T : ℝ)) :
    ‖final M (fun _ => A) - final M a‖ ≤ 2 * ε := by sorry

end BBBV.RandomOracle
Source
Bennett, Bernstein, Brassard and Vazirani, Strengths and weaknesses of quantum computing, arXiv:quant-ph/9701001v1, pp. 7–8, Theorem 3.3 (proof p. 8); conclusion corrected from ε to 2ε
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 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