Words as sign vectors #
A word f : X → Bool over a finite set of positions is read as the vector of signs
signWord f = (signVal (f x))_x in EuclideanSpace ℝ X. The inner product of two such vectors is
the sign correlation ∑ x, signVal (f x) * signVal (g x) (BitString.inner_signWord), and each
has squared norm |X| (BitString.norm_signWord_sq). This lets inequalities for vectors in a
real inner product space, such as the Cauchy–Schwarz inequality, apply to Boolean words.
Main definitions #
Cslib.BitString.signWord: the sign vector of a word.
Main results #
Cslib.BitString.inner_signWord: inner products of sign vectors are sign correlations.Cslib.BitString.norm_signWord_sq: a sign vector has squared norm|X|.
The ±1 word of a Boolean function, as a vector of EuclideanSpace ℝ X.