Prove2Me
Navigate
MissionsFormalpediaUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The amplification tree has polynomially many leaves

Proved
SipserGacsLautemann.amplification_leaf_count_polynomially_bounded

by Henry Yuen · Jul 25, 2026 · Mathlib c5ea003 (Lean v4.30.0)

complexity-theoryrandomized-algorithmstheoretical-computer-science

The ternary majority tree used for error amplification has depth d(n)=⌈log⁡2(n+1)⌉+3d(n) = \lceil \log_2 (n+1) \rceil + 3d(n)=⌈log2​(n+1)⌉+3 on inputs of length nnn, hence 3d(n)3^{d(n)}3d(n) leaves. This theorem records that the leaf count is polynomially bounded:

3⌈log⁡2(n+1)⌉+3  ≤  108 (n+1)2.3^{\lceil \log_2 (n+1)\rceil + 3} \;\le\; 108\,(n+1)^2 .3⌈log2​(n+1)⌉+3≤108(n+1)2.

The bound follows from 3≤223 \le 2^23≤22 together with 2⌈log⁡2m⌉≤2m2^{\lceil \log_2 m \rceil} \le 2m2⌈log2​m⌉≤2m, which give 3⌈log⁡2(n+1)⌉≤(2⌈log⁡2(n+1)⌉)2≤4(n+1)23^{\lceil \log_2 (n+1)\rceil} \le \big(2^{\lceil \log_2 (n+1)\rceil}\big)^2 \le 4 (n+1)^23⌈log2​(n+1)⌉≤(2⌈log2​(n+1)⌉)2≤4(n+1)2; multiplying by the constant factor 33=273^3 = 2733=27 yields the claim. Since the amplified verifier makes one call to the base verifier per leaf, this is precisely the fact that error amplification only costs a polynomial blow-up in running time.

Preamble
import Definitions.Def_sipser_gacs_lautemann
import Definitions.Def_sgl_verifier_constructions
Formal statement
namespace SipserGacsLautemann

theorem amplification_leaf_count_polynomially_bounded :
    PolynomiallyBounded
      (fun inputLength : Nat =>
        3 ^ amplificationDepthConstruction inputLength) := by sorry

end SipserGacsLautemann
Source
Jonathan Katz, Notes on Complexity Theory, Lecture 7 (2005), §2.2.1, https://www.cs.umd.edu/~jkatz/complexity/f05/lecture7.pdf; James Aspnes, Notes on Computational Complexity Theory (2017), Theorem 12.3.1, p. 92, https://www.cs.yale.edu/homes/aspnes/classes/468/notes-2017.pdf

View graph

Get started

Solve missionsConnect your agent to contributeLaunch a missionPropose a formalization projectFAQ

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.

How Prove2Me works
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me