Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eqs. (7)–(12) — at round k₀ + 10 the bias is ≥ 0.96 and step 1 fails to exit with probability ≤ δ/5

Proved
QApproxCount.Counting.eqs_7_12

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

approximate-countinggroverhoeffdingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let 0<θ≤0.0010<\theta\le0.0010<θ≤0.001, let k0∈Nk_0\in\mathbb Nk0​∈N be the largest integer with θ⋅1.05k0≤0.9\theta\cdot1.05^{k_0}\le0.9θ⋅1.05k0​≤0.9, let δ>0\delta>0δ>0, and let m≥5000ln⁡(5/δ)m\ge5000\ln(5/\delta)m≥5000ln(5/δ). Let rkr_{k}rk​ be the largest odd integer at most 1.05k1.05^{k}1.05k. Then

sin⁡2(rk0+10 θ) ≥ 0.96,\sin^2(r_{k_0+10}\,\theta)\ \ge\ 0.96,sin2(rk0​+10​θ) ≥ 0.96,

and if H∼Bin(m,sin⁡2(rk0+10θ))H\sim\mathrm{Bin}\big(m,\sin^2(r_{k_0+10}\theta)\big)H∼Bin(m,sin2(rk0​+10​θ)) counts the marked outcomes of round k0+10k_0+10k0​+10, then

Pr⁡[H<0.95 m] ≤ δ/5.\Pr[H<0.95\,m]\ \le\ \delta/5 .Pr[H<0.95m] ≤ δ/5.

This is the "no late termination" half of the correctness of step 1: if step 1 reaches round k0+10k_0+10k0​+10 it exits there with probability at least 1−δ/51-\delta/51−δ/5.

Formalization Note The failure event is H<0.95mH<0.95mH<0.95m, the negation of the exit test H≥0.95mH\ge0.95mH≥0.95m of step 1(b). The paper writes "≤95%\le 95\%≤95%" in (10). The printed chain (8) has the slip 0.9⋅1.0510≥1.3960.9\cdot1.05^{10}\ge1.3960.9⋅1.0510≥1.396 at its lower end; the correct value is 0.9⋅1.059≈1.39620.9\cdot1.05^{9}\approx1.39620.9⋅1.059≈1.3962. The conclusion is unchanged.

Preamble
import Mathlib
import Definitions.Def_QApproxCount_Counting_Algorithm
Formal statement
namespace QApproxCount.Counting

/-- Eqs. (7)–(12), p. 5 (no late termination): let `0 < θ ≤ 0.001`, let `k₀` be the largest
integer with `θ · 1.05^{k₀} ≤ 0.9`, `δ > 0`, and `m ≥ 5000 ln(5/δ)` tosses. Then the coin of
round `k₀ + 10` has bias `sin²(r_{k₀+10} θ) ≥ 0.96`, and the probability that fewer than 95% of
`m` tosses of that coin are heads (step 1 fails to exit at `k₀ + 10`) is at most `δ/5`. -/
theorem eqs_7_12 (θ δ : ℝ) (hθ : 0 < θ) (hθ1 : θ ≤ 0.001) (k₀ : ℕ)
    (hk₀ : θ * (1.05 : ℝ) ^ k₀ ≤ 0.9) (hk₀max : 0.9 < θ * (1.05 : ℝ) ^ (k₀ + 1))
    (hδ : 0 < δ) (m : ℕ) (hm : 5000 * Real.log (5 / δ) ≤ (m : ℝ)) :
    0.96 ≤ Real.sin ((oddFloor (k₀ + 10) : ℝ) * θ) ^ 2 ∧
      (coin (Real.sin ((oddFloor (k₀ + 10) : ℝ) * θ) ^ 2) m).toOuterMeasure
          {h : ℕ | (h : ℝ) < 0.95 * (m : ℝ)} ≤ ENNReal.ofReal (δ / 5) := by sorry

end QApproxCount.Counting
Source
Aaronson & Rall, Quantum Approximate Counting, Simplified, arXiv:1908.10846v6, p. 5, eqs. (7)–(12)
Human review
  • Endorsed by Shuze Chen · Oct 19, 2026

    Confirmed by the moderator at approval.

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