Quadratic forms over 𝔽₂ on bit strings #
Reading the bits of x : ι → Bool as a vector v = toZModSpace ι x over 𝔽₂ = ZMod 2
(BitString.bitVal), a square matrix Q over 𝔽₂ defines the Boolean function
x ↦ bitEquiv (v ⬝ᵥ Q *ᵥ v) (BitString.quadForm), the quadratic form of Q as in
Matrix.toQuadraticForm'. Every quadratic form over 𝔽₂ in the variables x arises so. The inner
product function x ↦ ∑ᵢ xᵢ yᵢ is the quadratic form of the matrix with the identity in the block
of rows x and columns y; more generally, a matrix carrying R on a block of rows x and
columns y and vanishing elsewhere has the bilinear form xᵀ R y as its quadratic form
(BitString.quadForm_eq_of_submatrix).
Main definitions #
Cslib.BitString.quadForm Q: the quadratic form ofQover𝔽₂, as a Boolean function.
Main results #
Cslib.BitString.quadForm_eq_bitEquiv:quadForm Q x = bitEquiv (toZModSpace ι x ⬝ᵥ Q *ᵥ toZModSpace ι x).Cslib.BitString.neg_one_pow_val_eq: the sign(-1) ^ (v ⬝ᵥ Q *ᵥ v)of a quadratic form.Cslib.BitString.quadForm_eq_of_submatrix: bilinear forms are quadratic forms.
Bilinear forms are quadratic forms. If M carries R on the rows f and the columns
g, both injective, and vanishes elsewhere, its quadratic form is the bilinear form
(x ∘ f)ᵀ R (x ∘ g).