The sign product of a flip sequence #
The port signs of a sequence of chain flips, at the evolving
colours: the closed form is a per-label product of the initial
sign to the instance count times a triangular-number sign, so a
sequence in which every label occurs evenly contributes exactly
(−1)^length.
The accumulated port-sign product of a flip sequence, at the evolving colours.
Equations
- RS.flipSignProd f [] = 1
- RS.flipSignProd f (p :: L) = RS.oddPartnerSign ℓ (f p.1) * RS.oddPartnerSign ℓ (f p.2) * RS.flipSignProd (RS.flipColours f p) L
Instances For
The label instances of a flip sequence.
Equations
- RS.flipLabels L = List.flatMap (fun (p : α × α) => [p.1, p.2]) L
Instances For
One more flip lists its two labels first.
The labels with odd instance count.
Equations
- RS.oddCountLabels L = {a ∈ (RS.flipLabels L).toFinset | List.count a (RS.flipLabels L) % 2 = 1}
Instances For
A label counts as odd exactly when it occurs an odd number of times — the labels the fold has actually moved.