The cyclic-word four-colouring lemma #
This file is the combinatorial core of the compatibility proof. A letter at a position records
the transition between the preceding and the current gap. If every letter occurs at least twice,
the local patterns from LocalPattern and the odd balancing theorem produce colours on the gaps
such that adjacent gaps have different colours and every colour occurs evenly at each letter.
Equations
- W.instFintypeOccurrence v = Subtype.fintype fun (i : W.Pos) => W.letter i = v
The desired output of the cyclic-word construction.
The colour assigned to each gap of the cyclic word.
Consecutive gaps receive different colours.
- color_even (v : V) (z : Color) : Even (Fintype.card { os : W.Occurrence v × Fin 2 // W.incidentColor self.color os.1 os.2 = z })
Each colour occurs an even number of times among the incidences at every letter.
Instances For
The quadratic contribution of a finite ordered difference pattern.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The recursively extended local patterns retain the quadratic cancellation of the pair and triple base cases.
An arbitrary enumeration of the occurrences of each letter, used only to transport the explicit local patterns.
Equations
- W.occurrenceOrderIsoFin hmin v = (Fintype.orderIsoFinOfCardEq (W.Occurrence v) ⋯).symm
Instances For
The difference at an occurrence for one of the three local choices.
Equations
- W.frameDifference hmin v c o = Sabidussi.localDifference (Fintype.card (W.Occurrence v) - 2) c ((W.occurrenceOrderIsoFin hmin v) o)
Instances For
The ordered interaction between the local patterns at two letters. The diagonal is set to zero because the balancing theorem is phrased on all ordered pairs of letters.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The odd balancing theorem chooses one local frame at every letter so that every external interaction obstruction vanishes.
Differences on all positions induced by choices of the local frames.
Equations
- W.chosenDifference hmin choice i = W.frameDifference hmin (W.letter i) (choice (W.letter i)) ⟨i, ⋯⟩
Instances For
Prefix integration of differences, with the cut placed immediately before position zero.
Equations
- W.prefixColor y i = ∑ j ∈ Finset.Iic i, y j
Instances For
Contribution of all earlier occurrences of u to occurrences of v.
Equations
- W.orderedLetterInteraction y v u = ∑ i : W.Occurrence v, ∑ j : W.Occurrence u, if ↑j < ↑i then Sabidussi.bracket (y ↑i) (y ↑j) else 0
Instances For
Partitioning earlier word positions according to their letter.
The balanced interaction equations are exactly the missing quadratic moment at each letter.
Every nonempty cyclic word in which each letter occurs at least twice has the required four-colouring of its gaps.