Complete writable-bank product normalization with global output return and retained original input
ProvedIntMul.BankedProduct.banked_productLet be finite binary words. Put , let be the base- operand block counts, put with the natural-number zero convention, and . Assume . A fixed eighteen-tape machine starts from the explicit physically prepared work-bank frame containing the padded product convolution coefficients, zero carry and retained descriptors. It halts in the exact returned global caller configuration within
actual transitions, with global output exactly the big-endian -bit representation of . The true original caller input tape and head and every cell-zero work-bank prefix are retained. Product arithmetic, descriptor preparation, width conversion, every native caller return, the physical child-output rewind, bit-by-bit global return and final halt are all charged. The coefficient input is a writable physical work bank; preparing the incoming coefficients, descriptors, local bank markers and cursors remains an explicit caller obligation.
import Definitions.Def_IntMul_BankedProduct import Mathlib.Tactic open IntMul IntMul.BankedProduct
theorem IntMul.BankedProduct.banked_product (base : machine.Cfg) (nativeBase : child.Cfg)
(pre x y z l d : List Bool)
(hl : val l+1=CarryProduct.coefficientWidth (CarryStep.blockSize z) x y)
(hd : FixedOutputWidth.width d=x.length+y.length) :
∃ t : ℕ,
t ≤ (DigitConvolution.blockCount (CarryStep.blockSize z) x+
DigitConvolution.blockCount (CarryStep.blockSize z) y)*
(41*CarryProduct.coefficientWidth (CarryStep.blockSize z) x y+32*CarryStep.blockSize z+
21*z.length+4*l.length+126)+12*FixedOutputWidth.width d+6*d.length+67 ∧
machine.step^[t] (initialFrame base nativeBase pre x y z l d)=finalFrame base nativeBase pre x y z l d ∧
(machine.step^[t] (initialFrame base nativeBase pre x y z l d)).state=machine.qHalt ∧
(machine.step^[t] (initialFrame base nativeBase pre x y z l d)).cells machine.outTape=
machine.tapeOf ((bin (x.length+y.length) (val x*val y)).map machine.bitSym) ∧
(machine.step^[t] (initialFrame base nativeBase pre x y z l d)).cells machine.inTape=base.cells machine.inTape ∧
(machine.step^[t] (initialFrame base nativeBase pre x y z l d)).head machine.inTape=base.head machine.inTape ∧
(∀ j, (machine.step^[t] (initialFrame base nativeBase pre x y z l d)).cells (BankedSimulation.workTape child j) 0=
base.cells (BankedSimulation.workTape child j) 0) := by sorry