Native layer scaling for Hoza's weights #
Once a caller has accumulated the masked seed digits, each factor of two in the layer contributes one factor of six to the weight. A counted halving loop certifies the exact scaling function in space linear in the binary layer and accumulator. The complete live state fits this bound at every iteration.
theorem Cslib.Reachability.Hoza.scaleAccumulatedWeight_inSpace :
Turing.MultiTapeTM.ComputableInSpace (fun (p : ℕ × ℕ) => scaleAccumulatedWeight p.1 p.2)
(Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encNat Turing.MultiTapeTM.encNat) Turing.MultiTapeTM.encNat
fun (p : ℕ × ℕ) => ((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encNat Turing.MultiTapeTM.encNat) p).length
Compute the exact layer scaling in space linear in the binary layer and accumulator.