Documentation

CslibFrontier.Foundations.Data.BitString.List.Dot

The Boolean inner product of bit lists #

Cslib.BitString.listDot x r is the parity of the positions where both lists have a true bit, the inner product ⟨x, r⟩ over 𝔽₂ computed by Goldreich–Levin, Boolean Gaussian elimination and small-bias checks. Bits beyond the shorter list are ignored. On n-bit strings it agrees with the dot product x ⬝ᵥ r.

Main definitions #

Main results #

The inner product over 𝔽₂ of two bit lists: the parity of the positions where both are true. Bits beyond the shorter list are ignored.

@[simp]

The inner product with an empty list is false.

@[simp]

The inner product with an empty list is false.

@[simp]
theorem Cslib.BitString.listDot_ofFn {n : ℕ} (left right : BitString n) :
listDot (List.ofFn left) (List.ofFn right) = left ⬝ᵥ right

On n-bit strings, the list inner product is the dot product.