Cyclic differences of Boolean tuples #
The cyclic difference records the exclusive or of each coordinate and its successor, including the last-to-first edge. This is the tuple operation in [KKR18], Definition 14 (arXiv v6, printed p. 0:6). Coordinates remain ordered; no symmetry of a relation is assumed. The empty tuple is included, and every cyclic difference has even parity.
Main definitions #
Cslib.BitString.cyclicDifference: neighboring exclusive ors around the coordinate cycle.Cslib.BitString.cyclicIntegral: prefix-sum inverse on even-parity tuples.Cslib.BitString.IsSelfComplementary,Cslib.BitString.cyclicDifferenceRelation: relational API.
Main results #
Cslib.BitString.cyclicDifference_not: complementing a tuple preserves its differences.Cslib.BitString.cyclicDifference_add: cyclic differences are linear over the Boolean ring.Cslib.BitString.parityOn_cyclicDifference: every cyclic difference has even parity.Cslib.BitString.cyclicDifference_eq_iff: fibers consist of a tuple and its complement.Cslib.BitString.exists_cyclicDifference_eq_iff: image is exactly the even-parity tuples.Cslib.BitString.mem_cyclicDifferenceRelation_iff: recover a self-complementary relation.
Cyclic differences are the sum of a tuple and its one-step cyclic shift.
Constant tuples have zero cyclic difference, including at arity zero.
Complementary tuples have identical cyclic differences.
Taking cyclic differences is linear over the Boolean ring.
A cyclic difference has an even number of true coordinates.
The only ambiguity in recovering a tuple from its cyclic differences is complementation.
The prefix sum starts at zero.
Every even-parity tuple is the cyclic difference of its prefix-sum tuple.
The image of cyclic difference is exactly the even-parity tuples, including arity zero.
Cyclic differences preserve nonemptiness of relations.
Every tuple of a cyclic-difference relation has even parity.
A self-complementary relation is recovered exactly from its cyclic differences.
The preimage of any difference relation is self-complementary.