Inner products of bit strings as parities #
Over the two-element Boolean ring, the inner product x ⬝ᵥ w = Σᵢ xᵢ wᵢ of two bit strings is the
parity of x on the support of w (Cslib.BitString.dotProduct_eq_parityOn). Parities on nonempty
sets are balanced (Cslib.card_filter_parityOn_eq), so the inner product with a fixed nonzero
string takes each value on half of the strings (Cslib.BitString.card_dotProduct_eq_false).
Consequently a nonzero string lies in the kernel of exactly 2 ^ ((d - 1) c) of the 2 ^ (d c)
matrices with c rows (Cslib.BitString.card_kernel). Since v, w and v + w are all nonzero
for distinct nonzero v and w, inclusion–exclusion shows that a quarter of the strings are
orthogonal to both (Cslib.BitString.card_dotProduct_eq_false_and_eq_false), so both lie in the
kernel of a 4 ^ c-th of the matrices (Cslib.BitString.card_kernel_pair).
Main results #
Cslib.BitString.dotProduct_eq_parityOn: the inner product withwis the parity on the support ofw.Cslib.BitString.card_dotProduct_eq_false: half of the strings are orthogonal to a nonzerow.Cslib.BitString.card_kernel: the matrices whose kernel contains a nonzerow.Cslib.BitString.card_dotProduct_eq_false_and_eq_false,Cslib.BitString.card_kernel_pair: the same for two distinct nonzero strings.