Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Proof of Theorem 3.5, p. 9 — 1ⁿ has a unique preimage under a random A with probability ((2ⁿ−1)/2ⁿ)^{2ⁿ−1} ≥ 1/e

Proved
BBBV.RandomOracle.prob_uniqueInverse_ge

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

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

Let n≥0n \ge 0n≥0 and let AAA be chosen uniformly at random among all 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 exactly one preimage under AAA (that is, A∈BA \in \mathcal{B}A∈B) is

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

The class B\mathcal{B}B is where the proof of Theorem 3.5 locates the oracles on which the algorithm fails: an oracle of A\mathcal{A}A with one answer changed to 1n1^n1n lies in B\mathcal{B}B.

Formalization Note The probability is the fraction of functions with the property; the exponent 2n−12^n - 12n−1 is natural-number subtraction, which is exact since 2n≥12^n \ge 12n≥1. The statement holds for every nnn, including n=0n = 0n=0 (both sides equal 111).

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

open Classical in
theorem prob_uniqueInverse_ge {n : ℕ} :
    ((Finset.univ.filter fun A : Str n → Str n => UniqueInverse A).card : ℝ) /
        (Fintype.card (Str n → Str n) : ℝ) = (((2 : ℝ) ^ n - 1) / 2 ^ n) ^ (2 ^ n - 1) ∧
      Real.exp (-1) ≤ (((2 : ℝ) ^ n - 1) / 2 ^ n) ^ (2 ^ n - 1) := 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