Documentation

CslibFrontier.Computability.Complexity.Problems.Graph.RotationSystem.FaceDartColors

Clockwise dart colors for actual face boundaries #

A face coloring gives the color at the clockwise corner following a dart by reading the face of its reverse. With the existing faceNext = rotate⁻¹ ∘ reverse, these colors satisfy P (rotate d) = P d.reverse. The reversal is essential: reading the face of d directly would give the opposite recurrence. Conversely this recurrence descends to actual face colors. The existing cycle-space converse then gives a numerical genus criterion in these coordinates. color_ends_eq_of_dart_path sums route transport along consecutive darts, and color_sum_eq_true_iff_inverse_rotate_of_three_darts reads the order at a degree-three vertex. inverse_rotate_iff_not_inverse_rotate_of_three_paths compares the two orders of three arms.

The actual face color at the clockwise corner following an indexed dart.

Positive vertex rotation moves to the clockwise color at the reverse dart.

The colors at the two indexed ends recover the original face-boundary edge bit.

theorem Cslib.Complexity.Graph.RotationSystem.exists_faceColors_of_dartColors {G : Graph} (r : G.RotationSystem) (x : Fin G.edges.length → Bool) (P : G.Dart → Bool) (hP : ∀ (d : G.Dart), P (r.rotate d) = P d.reverse) (hx : ∀ (d : G.Dart), (P d ^^ P d.reverse) = x d.1) :
∃ (q : r.Face → Bool), r.faceBoundary q = x

Clockwise dart colors satisfying the actual rotation recurrence descend to face colors, with exactly the same edge boundary. No genus, connectedness or degree premise is needed.

theorem Cslib.Complexity.Graph.RotationSystem.exists_faceColors_iff_exists_dartColors {G : Graph} (r : G.RotationSystem) (x : Fin G.edges.length → Bool) :
(∃ (q : r.Face → Bool), r.faceBoundary q = x) ↔ ∃ (P : G.Dart → Bool), (∀ (d : G.Dart), P (r.rotate d) = P d.reverse) ∧ ∀ (d : G.Dart), (P d ^^ P d.reverse) = x d.1

Face boundaries are exactly the edge labels obtained from compatible clockwise dart colors. This equivalence requires neither genus zero nor any endpoint declaration premise.

theorem Cslib.Complexity.Graph.RotationSystem.numericalGenusZero_of_vertexEven_dartColors {G : Graph} (r : G.RotationSystem) (hG : ∀ v ∈ G.incidenceVertices, v ∈ G.vertices) (hcolor : ∀ (x : Fin G.edges.length → Bool), G.VertexEven x → ∃ (P : G.Dart → Bool), (∀ (d : G.Dart), P (r.rotate d) = P d.reverse) ∧ ∀ (d : G.Dart), (P d ^^ P d.reverse) = x d.1) :

The existing componentwise numerical genus criterion in explicit clockwise coordinates. Applications must construct the colors from each actual vertex-even edge labeling.

theorem Cslib.Complexity.Graph.RotationSystem.color_ends_eq_of_dart_path {G : Graph} (r : G.RotationSystem) {n : ℕ} (path : Fin (n + 1) → G.Dart) (color : G.Dart → Bool) (label crossing : Fin G.edges.length → Bool) (hstep : ∀ (i : Fin n), (Equiv.symm r.rotate) (path i.castSucc).reverse = path i.succ) (hedge : ∀ (d : G.Dart), color d + color d.reverse = label d.1 + crossing d.1) (hsector : ∀ (d : G.Dart), color d + color ((Equiv.symm r.rotate) d) = label d.1) :
color (path 0) + color (path (Fin.last n)).reverse = label (path (Fin.last n)).1 + ∑ i : Fin (n + 1), crossing (path i).1

Along a nonempty path of consecutive darts, the sum of its endpoint colors is the last edge label plus the sum of all route contributions. Each internal turn follows the inverse vertex rotation, as it does at the internal vertices of a degree-two path.

theorem Cslib.Complexity.Graph.RotationSystem.color_sum_eq_true_iff_inverse_rotate_of_three_darts {G : Graph} (r : G.RotationSystem) (color : G.Dart → Bool) (label : Fin G.edges.length → Bool) (hsector : ∀ (d : G.Dart), color d + color ((Equiv.symm r.rotate) d) = label d.1) (a b c : G.Dart) (hab : a.vertex = b.vertex) (hac : a.vertex = c.vertex) (hab' : a ≠ b) (hac' : a ≠ c) (hbc : b ≠ c) (hall : ∀ (d : G.Dart), d.vertex = a.vertex → d = a ∨ d = b ∨ d = c) (ha : label a.1 = true) (hc : label c.1 = false) :
color a + color c = true ↔ (Equiv.symm r.rotate) a = c

At a vertex with exactly the given three darts, a selected dart followed by an unselected dart in counterclockwise order is detected by their clockwise-side colors. The two other positions are distinguished using the actual vertex permutation.

theorem Cslib.Complexity.Graph.RotationSystem.inverse_rotate_iff_not_inverse_rotate_of_three_paths {G : Graph} (r : G.RotationSystem) {u v : ℕ} {length : Fin 3 → ℕ} (path : (k : Fin 3) → Fin (length k + 1) → G.Dart) (start : Fin 3 ≃ { d : G.Dart // d.vertex = u }) (finish : Fin 3 ≃ { d : G.Dart // d.vertex = v }) (hstart : ∀ (k : Fin 3), ↑(start k) = path k 0) (hfinish : ∀ (k : Fin 3), ↑(finish k) = (path k (Fin.last (length k))).reverse) (hstep : ∀ (k : Fin 3) (i : Fin (length k)), (Equiv.symm r.rotate) (path k i.castSucc).reverse = path k i.succ) (hfirst : Function.Injective fun (i : Fin (length 0 + 1)) => (path 0 i).1) (color : G.Dart → Bool) (label : Fin G.edges.length → Bool) (hlabel : ∀ (e : Fin G.edges.length), label e = true ↔ ∃ (k : Fin 3), k ≠ 2 ∧ ∃ (i : Fin (length k + 1)), (path k i).1 = e) (hlast : ∀ (i : Fin (length 2 + 1)), label (path 2 i).1 = false) (crosses : Fin G.edges.length → Fin G.edges.length → Bool) (hsymm : ∀ (e f : Fin G.edges.length), crosses e f = crosses f e) (hdiag : ∀ (e : Fin G.edges.length), crosses e e = 0) (hcross : ∀ (a b : Fin 3), a ≠ b → ∀ (i : Fin (length a + 1)) (j : Fin (length b + 1)), crosses (path a i).1 (path b j).1 = 0) (hedge : ∀ (d : G.Dart), color d + color d.reverse = label d.1 + ∑ f : Fin G.edges.length, label f * crosses f d.1) (hsector : ∀ (d : G.Dart), color d + color ((Equiv.symm r.rotate) d) = label d.1) :
(Equiv.symm r.rotate) ↑(start 0) = ↑(start 2) ↔ (Equiv.symm r.rotate) ↑(finish 0) ≠ ↑(finish 2)

The order comparison for three nonempty dart paths following the inverse rotation at their internal joints. The two port equivalences enumerate the paths in the same order. The first two arms are selected, so the crossing contributions within the first arm cancel in pairs. Even crossings between distinct arms make the third arm's total zero. This is the dart-color step for the opposite-orders assertion of Claim B in [FKP17], §3. Its hypotheses are algebraic, with dart colors supplied.