Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 5, p. 12 — Algorithm 3 has additive error ε with probability at least 2/3

Proved
QuantumMC.MeanEst.theorem_5

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

mean-estimationmonte-carlop2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1quantum-algorithms

Let X=v(𝒜)X=v(𝒜)X=v(A) have variance at most σ2\sigma^2σ2, where σ>0\sigma>0σ>0, and let 0<ϵ<4σ0<\epsilon<4\sigma0<ϵ<4σ. Algorithm 3 samples mmm from the law of X/σX/\sigmaX/σ, applies Algorithm 2 to the negative and nonnegative parts of X/σ−mX/\sigma-mX/σ−m divided by four at accuracy ϵ/(32σ)\epsilon/(32\sigma)ϵ/(32σ), and combines the estimates. If each Algorithm 2 run fails with probability at most 1/91/91/9, its output μ^\widehat\muμ​ satisfies

Pr⁡(∣μ^−E[X]∣≤ϵ)≥23.\Pr\bigl(|\widehat\mu-\mathbb E[X]|\le\epsilon\bigr)\ge\frac23.Pr(∣μ​−E[X]∣≤ϵ)≥32​.

The constant DDD in Algorithm 2 may depend only on the universal Algorithm 1 constant CCC; it is chosen before the output law and accuracy. Formalization Note The theorem assumes X∈L2X\in L^2X∈L2 to state the variance faithfully. The quantum circuit and the asymptotic resource counts are outside this probability-space statement.

Preamble
import Mathlib
import Definitions.Def_QuantumMC_MeanEst_Setting
Formal statement
namespace QuantumMC.MeanEst

open MeasureTheory ProbabilityTheory

universe u v

/-- Theorem 5, p. 12: Algorithm 3 has additive error ϵ with probability at least 2/3. -/
theorem theorem_5 (C : ℝ) (hC : 0 < C) : ∃ D : ℝ, 0 < D ∧
  ∀ (Ω₀ : Type u) [MeasurableSpace Ω₀] (P₀ : Measure Ω₀) [IsProbabilityMeasure P₀]
    (X : Ω₀ → ℝ) (σ ε : ℝ), Measurable X → MemLp X 2 P₀ →
    variance X P₀ ≤ σ ^ 2 → 0 < σ → 0 < ε → ε < 4 * σ →
  ∀ (Ω : Type v) [MeasurableSpace Ω] (P : Measure Ω) [IsProbabilityMeasure P]
    (m : Ω → ℝ) (μneg μpos : Ω → ℕ → ℝ),
    Measurable m → P.map m = P₀.map (fun x => X x / σ) →
    P {ω | ¬ Alg2Succeeds C D (ε / (32 * σ)) P₀
      (alg3NegQuarter σ (m ω) X) (μneg ω)} ≤ (1 / 9 : ENNReal) →
    P {ω | ¬ Alg2Succeeds C D (ε / (32 * σ)) P₀
      (alg3PosQuarter σ (m ω) X) (μpos ω)} ≤ (1 / 9 : ENNReal) →
    (2 / 3 : ENNReal) ≤ P {ω |
      |alg3Output σ (m ω) (alg2K (ε / (32 * σ)))
        (μneg ω) (μpos ω) - ∫ x, X x ∂P₀| ≤ ε} := by sorry
end QuantumMC.MeanEst
Source
Montanaro, Quantum speedup of Monte Carlo methods, arXiv:1504.06987v3, Theorem 5 and Algorithm 3, p. 12
Human review
  • Endorsed by Shuze Chen · Oct 16, 2026

    Confirmed by the moderator at approval.

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