Actual interior coefficient read with preserved prefixes and reusable counter
ProvedIntMul.FramedBlockRead.read_blockLet 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
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.
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
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