Uniformly random bits on a set of positions #
A uniformly random word ι → Bool agrees with a given word on a set S of positions, that is,
lies in a subcube of codimension |S|, with probability 2 ^ (-|S|)
(BitString.expect_ite_forall_mem_eq), by the count of functions agreeing on a set
(Fintype.card_filter_forall_mem_eq); this is the density half of
O'Donnell, Proposition 5.24. So some bit on S takes a given value with
probability 1 - 2 ^ (-|S|) (BitString.expect_ite_exists_mem_eq). Exactly m of
the bits on S are true with probability C(|S|, m) / 2 ^ |S|
(BitString.expect_ite_card_filter_eq).
Main results #
Cslib.BitString.expect_ite_forall_mem_eq: a subcube of codimensionkhas density2 ^ (-k).Cslib.BitString.expect_ite_exists_mem_eq: some ofkuniformly random bits takes a given value with probability1 - 2 ^ (-k).Cslib.BitString.expect_ite_card_filter_eq: exactlymofkuniformly random bits are true with probabilityC(k, m) / 2 ^ k.
References #
The density of a subcube O'Donnell, Proposition 5.24: a uniformly random
word agrees with b on a set S of positions with probability 2 ^ (-|S|), for every S,
including S = ∅, and for any decision procedure of the event.
Some bit of a set S of uniformly random bits equals b with probability 1 - 2 ^ (-|S|),
for any decision procedure of the event.
Exactly m of the bits of a set S of uniformly random bits are true with probability
C(|S|, m) / 2 ^ |S|.