Streaming evaluation of Hoza's weights #
The weight accumulator reads the seed through indexed queries. It combines one seed bit and one table-free Justesen coordinate per iteration, in order from most to least significant. This module verifies the resulting weight. A native machine realization, including binary dimension processing and a seed input tape, is a separate obligation.
Main definitions #
Cslib.Reachability.Hoza.generatedWeightScan: weight evaluation by an indexed seed scan.
Main results #
Cslib.Reachability.Hoza.generatedWeightScan_eq: agreement with the isolation generator.Cslib.Reachability.Hoza.generatedWeightScan_prefix_lt: bound on the unscaled accumulator.
Append one masked Boolean digit at the low end of an accumulated base-six word.
Extend the high-to-low accumulation by its last supplied digit.
Scaling the accumulated masked digits by 6 ^ level recovers BaseSix.levelWeight.
A word of masked Boolean digits has value below the first power beyond its length.
Three binary bits per digit suffice for the unscaled base-six accumulator.
After scanning the first k masked digits the unscaled accumulator is less than 6 ^ k.
The binary logarithm of the prefix accumulator is bounded by three bits per digit. The additional bit in the bound is enough to represent zero at the empty prefix.
The scan uses the same seed and returns exactly the weight used by the isolation theorem.
A raw seed and a code-bit callback that agrees with the executable Justesen word give the existing streaming weight, including the zero weight in layer zero.