Runtime 36-Word CompParams Writer (writeCompParamsSubProg) #
Implements overflow-free packedWords evaluation (compPackedWordsProg), metadata word-count
computation (computeMetaWordsProg), and the 36-word mkCompParams U V w N block writer
(writeCompParamsSubProg) at [dstMetaBase + 27, dstMetaBase + 63).
Overflow-Free packedWords and computeMetaWordsProg #
Sub-Block Writers (SubA..SubE, writeCompScalesGmDProg, writeCompABProg) #
Combined 36-Word CompParams Writer (writeCompParamsSubProg) #
theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.ParamsComputeAux.writeCompParamsSubProg_props {w U V dstMetaBase N : ℕ} {s : Memory.State} (hw : 0 < w) (hN : 1 ≤ N) (hNU : N ≤ U) (hU : WordRAM.Fits w U) (hV : V ≤ 2 ^ w) (h63 : dstMetaBase + 63 ≤ s.frontier) (hfit_dst : WordRAM.Fits w (dstMetaBase + offCompItems U w N)) :
have d :=
((dstMetaBase, w, N), (FeistelQuotient.quotientBits U N, FeistelQuotient.valBits V), Nat.log 2 N, Dynamic.logLogFactor N, epochHashSpace U w N);
(Memory.spec w).ValidHistory s ((Memory.spec w).clientHistory s (writeCompParamsSubProg d)) ∧ (Memory.spec 0).clientResult s (writeCompParamsSubProg d) = offCompItems U w N ∧ ((Memory.spec 0).clientState s (writeCompParamsSubProg d)).frontier = s.frontier ∧ (∀ (i : Fin 36),
((Memory.spec 0).clientState s (writeCompParamsSubProg d)).mem (dstMetaBase + offCompParams + ↑i) = mkCompParams U V w N i) ∧ (∀ (a : ℕ),
¬(dstMetaBase + offCompParams ≤ a ∧ a < dstMetaBase + offScratch) →
((Memory.spec 0).clientState s (writeCompParamsSubProg d)).mem a = s.mem a) ∧ WordRAM.Realization.memoryCost (writeCompParamsSubProg d) s ≤ N + 40
Functional specification and ≤ N + 40 cost bound for writeCompParamsSubProg.
writeCompParamsSubProg compiles via RealizesBounded .exact.