Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Complete protected cleanup prefix in the actual fixed-tape recursive scheduler

Proved
IntMul.EndParkRecursiveScheduler.cleanup_protected_prefix

by raresbuhai · Oct 10, 2026 · Mathlib 0df444a (Lean v4.33.1)

algorithmsfixed-tape-routinginteger-multiplicationturing-machines

Let a tracked cleanup invocation have bank offsets oj≥1o_j\ge1oj​≥1, tracked extents EjE_jEj​, initial relative head positions pjp_jpj​, unique local markers and blank tails. Suppose its retained caller buffer and padded continuation-stack heads are positive. The actual optimized recursive scheduler reaches the exact padded cleaned frame at a physical time ttt satisfying

t≤max⁡jpj+2max⁡jEj+3.t\le \max_j p_j+2\max_j E_j+3.t≤jmax​pj​+2jmax​Ej​+3.

Every noninput head is at least one at every intermediate physical time s≤ts\le ts≤t, including the cleanup service exit. The theorem combines exact endpoint correctness and the complete protected trajectory within one depth-independent fixed-tape transition table. The subsequent scheduler stack-inspection dispatch lies outside this prefix.

Preamble
import Definitions.Def_IntMul_EndParkRecursiveExecution
import Theorems.Thm_IntMul_TrackedBankCleanup_cleanup_correct
import Theorems.Thm_IntMul_TrackedBankCleanup_cleanup_window_safe
import Theorems.Thm_IntMul_TrackedBankCleanup_cleanup_nonwork_fixed
import Theorems.Thm_IntMul_FixedTapeExtension_simulate_run
import Mathlib.Tactic

open IntMul IntMul.EndParkRecursiveScheduler

Formal statement
theorem IntMul.EndParkRecursiveScheduler.cleanup_protected_prefix (M : MultitapeTM) (n : ℕ)
    (request : M.K → Option (Fin n)) (resume : Fin n → M.K)
    (padBase : (cleanupMachine M).Cfg) (callerBase : (TrackedBankCleanup.machine M).Cfg)
    (offset extent : Fin M.k → ℕ) (c : M.Cfg) (pos : Fin M.k → ℕ)
    (positive : ∀ j, 1 ≤ offset j)
    (bufferPositive : 1 ≤ callerBase.head (TrackedBankCleanup.machine M).outTape)
    (stackPositive : 1 ≤ padBase.head (FixedTapeExtension.extraTape (TrackedBankCleanup.machine M)))
    (unique : ∀ j p, c.cells j p=M.startSym ↔ p=0)
    (tail : ∀ j p, extent j < p → c.cells j p=M.blank) :
    ∃ t, t ≤ TrackedBankCleanup.span M pos+2*TrackedBankCleanup.span M extent+3 ∧
      (machine M n request resume).step^[t]
        (liftCleanup M n request resume (FixedTapeExtension.embed (TrackedBankCleanup.machine M)
          padBase (TrackedBankCleanup.rewindFrame M callerBase offset extent c pos)))=
        liftCleanup M n request resume (FixedTapeExtension.embed (TrackedBankCleanup.machine M)
          padBase (TrackedBankCleanup.finalFrame M callerBase offset)) ∧
      ∀ s, s ≤ t → ∀ i, i ≠ (machine M n request resume).inTape →
        1 ≤ ((machine M n request resume).step^[s]
          (liftCleanup M n request resume (FixedTapeExtension.embed (TrackedBankCleanup.machine M)
            padBase (TrackedBankCleanup.rewindFrame M callerBase offset extent c pos)))).head i := by sorry
Source
Original integration of full cleanup trajectory invariants into the actual recursive scheduler. Written by Codex.

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