Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Sharp-tail bound for the actual all-tiles routine step count

Proved
ThreeSumSharpTail.retained_tiles_cost

by Yuxuan Xu · Oct 13, 2026 · Mathlib 0df444a (Lean v4.33.1)

3sumsharp-tailword-ram-costs

Bounds the published natural-number time function tAllTiles at L=cm and t=ceil(theta*m). The bound counts the lengths of the star-box lists actually traversed by the routine, uses their exact binomial enumeration formula, and applies the sharp normalized tail. The bound holds for every number of bands, with explicit constant 1600 and all loop overheads included. Tile-fit, encoding, compiler and reduction costs must still be composed before claiming the final word-RAM runtime.

Preamble
import Definitions.Def_ThreeSumSharpTail_Analysis
import Definitions.Def_APSPSource_RemainingDefinitions

set_option autoImplicit false
set_option relaxedAutoImplicit false
open scoped BigOperators
Formal statement
theorem ThreeSumSharpTail.retained_tiles_cost (c m nB : ℕ) (hc : 10 < c) (hm : 1 ≤ m)
    (θ : ℝ) (hθ0 : 0 < θ) (hθ9 : θ < 9 / 10) :
    (Light.Sec4.tAllTiles (c * m) m ⌈θ * (m : ℝ)⌉₊ nB : ℝ) ≤
      1600 * ((c : ℝ) * m + 1) *
        ((nB : ℝ) ^ 2 * (((m : ℝ) + 1) *
          ((ThreeSumSharpTail.boxCount c m 0 : ℝ) *
            (((c : ℝ) * m + 1) / (1 - 9 / ((c : ℝ) - 1)) *
              Real.rpow ((4 : ℝ) ^ m) (-ThreeSumSharpTail.sharpSaving c θ)) + 1)) +
          nB + 1) := by sorry
Source
Yuxuan Xu, same manuscript, Sections 2.1 and 4, equations unrelaxed and boxcost; actual tTile/tAllTiles time functions from anthropics/formal-math 3sum-apsp, commit e1a4e6508154ea59f030480661590a9fe3018011, ThreeSumApsp/Programs/Sec4/Theorem30/Contracts.lean and ThreeSumApsp/Spec/Sec4/Theorem30/StarBoxes.lean.

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