Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Proof of Theorem 3.5, p. 9 — a uniformly random A : {0,1}ⁿ → {0,1}ⁿ misses 1ⁿ with probability ((2ⁿ−1)/2ⁿ)^{2ⁿ} ≥ 1/4

Proved
BBBV.RandomOracle.prob_noInverse_ge

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

countingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1probabilityrandom-function

Let n≥1n \ge 1n≥1 and let AAA be chosen uniformly at random among all (2n)2n(2^n)^{2^n}(2n)2n functions {0,1}n→{0,1}n\{0,1\}^n \to \{0,1\}^n{0,1}n→{0,1}n. The probability that 1n1^n1n has no preimage under AAA (that is, A∈AA \in \mathcal{A}A∈A) is

Pr⁡[A∈A]=(2n−12n)2n≥14.\Pr[A \in \mathcal{A}] = \left(\frac{2^n - 1}{2^n}\right)^{2^n} \ge \frac14 .Pr[A∈A]=(2n2n−1​)2n≥41​.

This is the mass of the class A\mathcal{A}A in the proof of Theorem 3.5: the final failure probability 1/81/81/8 is half of it.

Formalization Note The probability is the fraction of functions with the property. The paper writes "at least 1/41/41/4 (for nnn sufficiently large)"; the bound holds for every n≥1n \ge 1n≥1, with equality at n=1n = 1n=1, and is stated so.

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

open Classical in
theorem prob_noInverse_ge {n : ℕ} (hn : 1 ≤ n) :
    ((Finset.univ.filter fun A : Str n → Str n => NoInverse A).card : ℝ) /
        (Fintype.card (Str n → Str n) : ℝ) = (((2 : ℝ) ^ n - 1) / 2 ^ n) ^ (2 ^ n) ∧
      (1 / 4 : ℝ) ≤ (((2 : ℝ) ^ n - 1) / 2 ^ n) ^ (2 ^ n) := by sorry

end BBBV.RandomOracle
Source
Bennett, Bernstein, Brassard and Vazirani, Strengths and weaknesses of quantum computing, arXiv:quant-ph/9701001v1, p. 9, proof of Theorem 3.5, third paragraph (the class 𝒜)
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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me