Complete retained width and countdown initialization from original operand input with linear clock
ProvedIntMul.InputWidthPreparation.input_width_preparationLet be binary operand words with . A fixed sixteen-tape machine starts from the ordinary initial configuration on , with empty work tapes and all heads on their real start markers. It physically computes and retains a big-endian word satisfying
and writes both delimited countdown copies at their least-significant-bit cursors. It globally halts in its exact terminal configuration within
actual transitions. The original input is retained read-only, global output remains empty and all unused scratch banks remain empty. The retained descriptor is rewound to its actual start marker. No width or counter word is supplied in advance. This completes the input-derived physical width and countdown preparation required by exact padded multiplication output.
import Definitions.Def_IntMul_InputWidthPreparation import Mathlib.Tactic open IntMul IntMul.InputWidthPreparation
theorem IntMul.InputWidthPreparation.input_width_preparation (x y : List Bool) (hp : 0< x.length+y.length) :
∃ t : ℕ, t≤ 18*(x.length+y.length)+21 ∧
machine.step^[t] (initialFrame x y)=finalFrame x y ∧
(machine.step^[t] (initialFrame x y)).state=machine.qHalt ∧
(machine.step^[t] (initialFrame x y)).cells machine.inTape=(initialFrame x y).cells machine.inTape ∧
(machine.step^[t] (initialFrame x y)).cells machine.outTape=machine.tapeOf [] ∧
val (CanonicalWidthDescriptor.descriptorWord x y)+1=x.length+y.length := by sorry