Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Finite tape simulation of one sparse RAM step

Proved
Lax759944Proofs.RamToTM.finite_sparseStep_correct

by Shuze Chen · Nov 18, 2026 · Mathlib 0df444a (Lean v4.33.1)

algorithmscomputational-complexitygraph-theory

Fix a finite RAM program, a positive word width www, and an instruction-argument bound NNN. A sparse RAM state has an accumulator below 2w2^w2w and normalized sparse memory. Whenever one sparse RAM step takes sss to s′s's′, every corresponding boundary configuration of the finite tape interpreter reaches the boundary configuration representing s′s's′, in at most

finiteStepBound⁡(w,smem)\operatorname{finiteStepBound}(w,s_{\rm mem})finiteStepBound(w,smem​)

actual local tape transitions. This is a uniform simulation statement for a finite transition table.

Preamble
import Definitions.Def_EdgeSublinearMWIS_Main_NativeSchemeInterfaces
Formal statement
theorem Lax759944Proofs.RamToTM.finite_sparseStep_correct : ∀ {p : Lax759944Proofs.Microcode.Program} {N w : ℕ} (hbound : Lax759944Proofs.RamToTM.programArgumentBound p ≤ N),
  0 < w →
    ∀ (s s' : Lax759944Proofs.RamToTM.SparseState),
      s.acc < 2 ^ w →
        Lax759944Proofs.RamToTM.SparseMemory.Normalized w s.mem →
          Lax759944Proofs.RamToTM.sparseStep w p s = Option.some s' →
            ∀ (state : Lax759944Proofs.RamToTM.FullInterpreterState N),
              Lax759944Proofs.RamToTM.FullInterpreterState.dispatchLens.get state = Inhabited.default →
                ∃ steps ≤ Lax759944Proofs.RamToTM.finiteStepBound w s.mem,
                  ∃ (finalState : Lax759944Proofs.RamToTM.FullInterpreterState N),
                    Lax759944Proofs.RamToTM.FullInterpreterState.dispatchLens.get finalState =
                        Lax759944Proofs.RamToTM.FullInterpreterState.dispatchLens.get state ∧
                      (fun
                                (x :
                                  Option
                                    (Turing.TM2.Cfg
                                      (fun (x : Lax759944Proofs.RamToTM.CoreStack) =>
                                        Lax759944Proofs.RamToTM.SparseSymbol)
                                      (Lax759944Proofs.RamToTM.FiniteInterpreterLabel p N)
                                      (Lax759944Proofs.RamToTM.FullInterpreterState N))) =>
                              x.bind
                                (Turing.TM2.step (Lax759944Proofs.RamToTM.finiteInterpreterProgram p N hbound)))^[steps]
                          (Option.some
                            (Lax759944Proofs.RamToTM.finiteInterpreterCfg
                              (Lax759944Proofs.RamToTM.FiniteInterpreterLabel.fetch
                                (Lax759944Proofs.RamToTM.boundPC p s.pc))
                              state (Lax759944Proofs.RamToTM.coreStacks w s))) =
                        Option.some
                          (Lax759944Proofs.RamToTM.finiteInterpreterCfg
                            (Lax759944Proofs.RamToTM.FiniteInterpreterLabel.fetch
                              (Lax759944Proofs.RamToTM.boundPC p s'.pc))
                            finalState (Lax759944Proofs.RamToTM.coreStacks w s')) := by sorry
Source
https://github.com/szymtor/RAM-TM/blob/134e398cef46599371df99f10c9007bc34ba3868/proofs/Lax759944Proofs/RamToTM/FiniteSimulation.lean, theorem finite_sparseStep_correct

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