Odd-parity forms on the cube #
For f : (ι → Bool) → ℝ, the odd-parity form oddForm f S = ∑_c f(c) [S · c odd] sums f
over the points whose parity on S is odd. Writing [S · c odd] = (1 - χ_S(c)) / 2 and summing
characters over all sets gives the identities
2 ∑_S L_f(S) = 2 ^ |ι| (∑ f - f 0) and
4 ∑_S L_f(S) L_h(S) = 2 ^ |ι| ((F - f 0)(H - h 0) + ∑_c f c h c - f 0 h 0).
The functions onSingles a, supported on the unit vectors recognized by BitString.IsSingle,
have
oddForm (onSingles a) S = ∑_{i ∈ S} a i.
These are used for the sharper score of Andreev's function
(WeightedThreshold.AndreevSharpScore).
Main definitions #
Cslib.BitString.oddForm: odd-parity forms.Cslib.BitString.onSingles: functions supported on unit vectors;Cslib.BitString.not_isSingle_zero.
Main results #
Cslib.BitString.four_mul_sum_toNat_parityOn_mul: four times the number of sets on which two points are both odd.Cslib.BitString.two_mul_sum_oddForm,Cslib.BitString.four_mul_sum_oddForm_mul_oddForm: sums of odd-parity forms and their products over all sets.Cslib.BitString.parityOn_single,Cslib.BitString.oddForm_onSingles: parities of unit vectors.
Odd-parity forms and their character sums #
Pair counts of odd sets. The number of sets S with both S · c and S · d odd,
times four, is 2 ^ |ι| * (1 - [c = 0] - [d = 0] + [c = d]).
The odd-parity form L_f(S) = ∑_c f(c) [S · c odd] of a function on the cube.
Bilinear character sum. For functions f, h on the cube,
4 ∑_S L_f(S) L_h(S) = 2 ^ |ι| ((F - f 0)(H - h 0) + ∑_c f c h c - f 0 h 0) with F = ∑ f and
H = ∑ h.
Unit vectors and functions supported on them #
The function that takes the value a i at the unit vector Pi.single i true and 0
elsewhere.
The zero vector is not a unit vector.
onSingles a vanishes at the zero vector.