Uniform fixed-weight bit strings #
Mapping a uniform fixed-cardinality subset of range n to its Boolean indicator gives the
uniform law on bit strings of the same fixed weight.
Main results #
Cslib.Probability.PMF.uniformOfFinset_map_indicatorVector: the exact distributional bridge from uniform supports to uniform fixed-weight bit strings.
theorem Cslib.Probability.PMF.uniformOfFinset_map_indicatorVector {n w : ℕ} (hw : w ≤ n) :
PMF.map (BitString.indicatorVector n) (uniformOfFinset (Finset.powersetCard w (Finset.range n)) ⋯) = uniformOfFinset (BitString.weightLayer n w) ⋯
A uniform w-element subset of range n, represented by its indicator, is a uniform
n-bit string of weight w.