The carry from โค/4 to ๐ฝโ #
A residue x modulo four has canonical representative x.val โ {0, 1, 2, 3}, whose binary digits
are x mod 2 and the carry โx.val / 2โ. Reducing the carry modulo two gives the function
ZMod.carryFour : โค/4 โ ๐ฝโ. Its failure to be additive is measured by the product of the
residues modulo two: โ(u + v)/2โ = โu/2โ + โv/2โ + (u mod 2)(v mod 2). This is the identity behind
the vanishing of the cup square of a class of Hยน(G, ๐ฝโ) that lifts to a character to โค/4.
Main results #
ZMod.carryFour: the carryโx.val / 2โ : โค/4 โ ๐ฝโ.ZMod.carryFour_add: the carry identityโ(u + v)/2โ = โu/2โ + โv/2โ + (u mod 2)(v mod 2).ZMod.carryFour_zero: the carry of0is0.ZMod.cast_add_two_mul_cast_sub_mul: the lift(u, s) โฆ u + 2sof a pair of residues modulo two toโค/4is additive up to the carryu vin the second coordinate.ZMod.cast_cast_add_two_mul_cast: that lift reduces to its first coordinate modulo2.
The lift (u, s) โฆ u + 2s of two residues modulo two to โค/4 is additive up to the
carry: (u + v) + 2 (s + t - u v) = (u + 2 s) + (v + 2 t) in โค/4, where the residues are
lifted through ZMod.cast. This is the identity that turns a character G โ ๐ฝโ with vanishing
cup square into a character G โ โค/4.