Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Charged execution of an indexed bounded loop

Proved
StableMSR.Recovery.Compiler.BoundedSum.bounded_while_execution

by lreyzin · Nov 20, 2026 · Mathlib 0df444a (Lean v4.33.1)

algorithmsclusteringderandomization

An indexed invariant with a uniform charged body bound yields a finite execution through index N. The result charges the two control instructions per iteration and the two exit instructions.

Preamble
import Definitions.Def_StableMSR_BoundedSumRAM
open StableMSR.Recovery StableMSR.Recovery.Compiler StableMSR.Recovery.Compiler.BoundedSum
open Polynomial
Formal statement
theorem StableMSR.Recovery.Compiler.BoundedSum.bounded_while_execution {n : ℕ} (d : Point n→Point n→ℝ) (c : Cmd) (guard : Cond) (A : ℕ→Store→Prop)
    (N B : ℕ) (h : LoopBound d c guard A N B) (i : ℕ) (hi : i≤N) (s : Store) (hs : A i s) :
    ∃t z, Executes d (.whileDo guard c) s t z ∧ z≤(N-i)*(B+2)+2 ∧ A N t := by
  sorry
Source
Shyam Ravichandran and Lev Reyzin, Exact Sum-of-Radii Clustering under Any Constant Stability, arXiv:2611.03547, Appendix B, Theorem B.2. Charged deterministic RAM implementation.

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