Documentation

CslibFrontier.Algorithms.Reachability.MinIsolation.Generator.Streaming

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 #

Main results #

Append one masked Boolean digit at the low end of an accumulated base-six word.

Interpret the masked digits in high-to-low order, accumulating from zero.

Extend the high-to-low accumulation by its last supplied digit.

theorem Cslib.Reachability.Hoza.six_pow_mul_accumulateWeightDigits_eq_levelWeight {ℓ : ℕ} (level : ℕ) (word seed : Fin ℓ → Bool) :
(6 ^ level * accumulateWeightDigits fun (j : Fin ℓ) => word j && seed j) = MinIsolation.BaseSix.levelWeight level word seed

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.

Scan the seed through a read-only bit accessor. For a positive layer, evaluate code bits individually and accumulate the masked digits in base six.

The scan uses the same seed and returns exactly the weight used by the isolation theorem.

The base-six value of the first t masked seed bits. Missing bits default to zero.

theorem Cslib.Reachability.Hoza.SeedDigits.maskedPrefix_ofFn {n : ℕ} (code : ℕ → Bool) (seed : Fin n → Bool) :
maskedPrefix code (List.ofFn seed) n = accumulateWeightDigits fun (j : Fin n) => code ↑j && seed j

A raw seed written in increasing index order supplies exactly the finite seed function used by the streaming weight formula.

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.