Exact logarithmic representation width of the physical growing binary counter
ProvedIntMul.GrowingCounter.counter_width_logarithmicalgorithmsfixed-tape-routinginteger-multiplicationturing-machines
Let be the little-endian word obtained by increments of the growing binary counter from its empty zero representation. Then
and is empty exactly when . The counter is the word transformation implemented by the physical growing-counter machine. Thus its actual generated representation has the least width needed for its value, including the empty representation of zero. For a width-minus-one descriptor computed from input of total length , this gives exact descriptor length . This supplies the logarithmic workspace bound needed when deriving block and coefficient parameters from original operand input.
Preamble
import Definitions.Def_IntMul_GrowingCounter import Mathlib.Data.Nat.Log import Mathlib.Tactic open IntMul IntMul.GrowingCounter
Formal statement
theorem IntMul.GrowingCounter.counter_width_logarithmic (n : ℕ) :
(iterateCounter n []).length=Nat.clog 2 (n+1) ∧
BinaryAdder.littleVal (iterateCounter n [])=n ∧
(iterateCounter n []=[] ↔ n=0) := by sorrySource
Original exact width proof for the accepted physical counter transformation. Owns canonical high-bit invariant and both power bounds. Written by Codex.