Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Complete live interior block-reader frames

Definition
IntMul_FramedBlockRead

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

algorithmsfixed-tape-routinginteger-multiplicationturing-machines

The actual counted-stream machine is reused without changing its finite table. Its complete live frames describe an interior read-only input cursor following a retained prefix, a writable output cursor following an arbitrary retained output prefix, a current binary countdown and its saved descriptor. All four physical tapes have their actual start markers and all heads are explicit. These are incoming caller frames, not the global initialization. Correctness and clock bounds are separate obligations.

Definition code
import Definitions.Def_IntMul_CountedStreamFrames

namespace IntMul.FramedBlockRead

open TapeCopy (Sym)
abbrev machine := CountedStream.machine

/-- Complete live frame for a block at an interior read-only input cursor.
The descriptor templates and output prefix have already been physically prepared.
They are preserved or extended by actual transitions, with no free cursor change. -/
def frame (pre x tail a z bits : List Bool) (j : ℕ) (q : CountedStream.State) : machine.Cfg where
  state := q
  cells := fun i =>
    if i=0 then machine.tapeOf ((pre++x++tail).map machine.bitSym++Sym.sep::z.map machine.bitSym)
    else if i=1 then machine.tapeOf ((a++x.take j).map machine.bitSym)
    else if i=2 then machine.tapeOf (Sym.sep::(bits.reverse.map machine.bitSym++[Sym.sep]))
    else machine.tapeOf (Sym.sep::(z.map machine.bitSym++[Sym.sep]))
  head := fun i => if i=0 then pre.length+j+1 else if i=1 then a.length+j+1
    else z.length+1

def ready (pre x tail a z : List Bool) (j : ℕ) (q : CountedStream.State) : machine.Cfg :=
  frame pre x tail a z z.reverse j q

end IntMul.FramedBlockRead
Source
Original complete interior coefficient-reader frames in the integer multiplication multitape model. 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