Documentation

CslibFrontier.Foundations.Data.BitString.Neg

Negation and subtraction of bit strings #

Bit strings ι → Bool add coordinatewise by XOR, so every bit string is its own negative and subtraction is addition. These are the coordinatewise forms of BooleanRing.neg_eq and BooleanRing.sub_eq_add. The module is small, so clients can import it without the rest of the bit-string API.

Main results #

theorem Cslib.BitString.neg_eq_self {ι : Type u_1} (x : ι → Bool) :
-x = x

Every bit string is its own negative.

theorem Cslib.BitString.sub_eq_add {ι : Type u_1} (x y : ι → Bool) :
x - y = x + y

Subtracting a bit string is adding it.