Affine maps over 𝔽₂ #
Over 𝔽₂, a map between additive groups is affine when it preserves sums of three points:
g (x + y + z) = g x + g y + g z (Cslib.BitString.IsAffine). For maps between 𝔽₂-vector
spaces this is the usual notion, a translate of a linear map
(Cslib.BitString.isAffine_iff_exists_affineMap in
Complexity/Foundations/Data/BitString/AffineSubspace.lean).
An affine map from BitString d is determined by its values at 0 and at the unit vectors
(Cslib.BitString.IsAffine.ext_single), so there are at most 2 ^ (n (d + 1)) affine maps from
BitString d to BitString n (Cslib.BitString.card_isAffine_le).
Main definitions #
Cslib.BitString.IsAffine: affine maps over𝔽₂.
Main results #
Cslib.BitString.IsAffine.comp: affine maps compose.Cslib.BitString.isAffine_zeroExtend: extension by zeros is affine.Cslib.BitString.IsAffine.ext_single: an affine map fromBitString dis determined by its values at0and at the unit vectors.Cslib.BitString.card_isAffine_le: at most2 ^ (n (d + 1))maps fromBitString dtoBitString nare affine.Cslib.BitString.exists_affine_of_add_add: a Boolean function satisfyingg (u + w) = g u + g w + g 0and depending only on a finite setMisg u = g 0 + ∑ i ∈ T, u ifor someT ⊆ M.Cslib.BitString.eq_add_sum_of_step: prefix sums of a step recurrencez (j + 1) = z j + f jover𝔽₂.
References #
Extension by zeros is affine.
Counting affine maps #
Affinity of a map between finite types is decidable.
A function of bits that depends only on the coordinates in M and preserves sums of three
points is affine: a constant plus the sum of the coordinates in some T ⊆ M.