Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Sequencing rule for timed triples

Proved
WilliamsonShmoys.RAMSpec.seq

by もち · Nov 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

program-logicram-model

If {P} p {Q}≤t1\{P\}\,p\,\{Q\}_{\le t_1}{P}p{Q}≤t1​​ and {Q} p {R}≤t2\{Q\}\,p\,\{R\}_{\le t_2}{Q}p{R}≤t2​​, then

{P}  p  {R}≤t1+t2.\{P\}\;p\;\{R\}_{\le t_1+t_2}.{P}p{R}≤t1​+t2​​.

This is the composition rule for consecutive code fragments of one program; the costs add.

Formalization Note. runp(s,t)\mathrm{run}_p(s,t)runp​(s,t) is planarRAMRun p s t, the ttt-fold iterate of planarRAMStep p; triples are RAMSpec from Def_WilliamsonShmoys_RAMSpec.

Preamble
import Mathlib
import Definitions.Def_WilliamsonShmoys_RAMSpec

set_option autoImplicit false
open WilliamsonShmoys
Formal statement
theorem WilliamsonShmoys.RAMSpec.seq (program : List PlanarRAMInstruction) (P Q R : PlanarRAMState → Prop)
    (t₁ t₂ : ℕ) (h₁ : RAMSpec program P Q t₁) (h₂ : RAMSpec program Q R t₂) :
    RAMSpec program P R (t₁ + t₂) := by sorry
Source
Program-logic infrastructure for the RAM model of Williamson–Shmoys, The Design of Approximation Algorithms, Theorem 10.11 (mission formalization)

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