Completing a word to a prescribed parity #
The final bit uniquely completes a word to a chosen parity. These declarations are extracted unchanged from the XOR sampling application for reuse by parity-constrained distributions.
Main definitions #
Cslib.BitString.parityComplete: append the unique parity-completing bit.Cslib.BitString.parityCompleteEquiv: the bijection onto a prescribed parity fiber.
Main results #
Cslib.BitString.parity_parityComplete: the completed word has the chosen parity.
The completion of r to parity c has parity c.