Antisymmetry of the chord-crossing matrix on ℤ/2m
ProvedZMod.chordMatrix_transpose_eq_negLet be a nonzero natural number and let be two families of residues modulo , thought of as the two endpoints of chords of a -gon. The hypothesis hdist is that the map sending to and to is injective; equivalently, the residues are pairwise distinct. Define the integer matrix by
where denotes if the condition holds and otherwise and is the representative in : thus counts, with sign for the -end and for the -end, how many endpoints of the -th chord lie strictly inside the arc running from to in the direction of increasing residue. The conclusion is that the transpose of equals , i.e. for all .
This is the combinatorial antisymmetry of the crossing (signed linking) matrix of a chord diagram with distinct endpoints on a circle: two chords either nest, contributing , or interlock, contributing with the sign reversed when the roles of the two chords are exchanged. It is used as the combinatorial input to AlgebraicCurve.exists_loops_pathIntegral_reciprocity_raw, where the chords are the identified sides of a polygon model and the arcs are the corresponding loops.
import Mathlib set_option maxHeartbeats 4000000 set_option synthInstance.maxHeartbeats 400000 set_option backward.isDefEq.respectTransparency.types false
theorem ZMod.chordMatrix_transpose_eq_neg {m : ℕ} [NeZero m]
(a b : Fin m → ZMod (2 * m))
(hdist : Function.Injective (fun p : Fin m × Bool => bif p.2 then a p.1 else b p.1)) :
let P : Matrix (Fin m) (Fin m) ℤ := fun i j =>
(if a j ≠ a i ∧ (a j - a i).val < (b i - a i).val then (1 : ℤ) else 0) -
(if b j ≠ a i ∧ (b j - a i).val < (b i - a i).val then (1 : ℤ) else 0)
P.transpose = -P := by sorry