Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Actual interior coefficient read with preserved prefixes and reusable counter

Proved
IntMul.FramedBlockRead.read_block

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

algorithmsfixed-tape-routinginteger-multiplicationturing-machines

Let pre, x, tail, a and y be arbitrary binary words. Put L=val(y)+1 and assume L≤|x|. From its specified live incoming frame, the actual fixed four-tape counted-stream machine reads exactly L bits at the interior input cursor immediately following pre. It appends those bits to the existing output a, retains the entire read-only input pre++x++tail#y, and restores both prepared counter templates and heads. It halts at the exact complete frame after some number t of actual transitions with

t≤6L+4∣y∣+2.t\le6L+4|y|+2.t≤6L+4∣y∣+2.

The input head advances from |pre|+1 to |pre|+L+1 and the output head from |a|+1 to |a|+L+1. The bound is independent of the earlier input prefix and existing output length: those data are retained rather than rescanned. Preparing the live incoming cursor and templates is an explicit caller responsibility.

Preamble
import Definitions.Def_IntMul_BinaryAdder
import Definitions.Def_IntMul_MultitapeModel
import Mathlib.Tactic
import Mathlib.Data.Nat.Bits
import Definitions.Def_IntMul_CountedStream
import Mathlib.Data.List.GetD
import Definitions.Def_IntMul_FramedBlockRead

open IntMul IntMul.FramedBlockRead

Formal statement
theorem IntMul.FramedBlockRead.read_block (pre x tail a y : List Bool)
    (hx : IntMul.val y+1 ≤ x.length) :
    ∃ t : ℕ, t ≤ 6 * (IntMul.val y + 1) + 4 * y.length + 2 ∧
      machine.step^[t] (ready pre x tail a y 0 .emit) =
        ready pre x tail a y (IntMul.val y+1) .halt := by sorry
Source
Original interior full-frame generalization of the counted-stream routine. Privately owns arithmetic, physical decrement, reset and all live block traces. Countdown analysis derives from the pinned Apache-2.0 integer-mult-bounds material attributed in the counted-stream development. 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