Documentation

CslibFrontier.Computability.Complexity.Problems.Graph.Dart

Indexed ends of a listed multigraph #

Darts retain edge positions and end tags. Both ends of a loop remain distinct.

@[reducible, inline]

A listed edge occurrence together with a choice of endpoint.

The endpoint of an indexed edge end; false selects the first endpoint.

The stored endpoints of a listed edge occurrence are its two indexed dart vertices. This retains occurrence and end tags, including loops and parallel edge records.

Reverse an edge while retaining its edge-list occurrence.

@[simp]

Reversing twice returns the same indexed end.

Even a loop has two distinct indexed ends.

Edge reversal as a permutation of all indexed ends.

There are two darts per listed edge, counting loops and parallel occurrences.

Distinct endpoints of a dart are adjacent in the simple graph of the edge list.

theorem Cslib.Complexity.Graph.exists_split_darts (G : Graph) (selected : G.Dart → Prop) [DecidablePred selected] (w : ℕ) :
∃ (H : Graph) (E : Fin G.edges.length ≃ Fin H.edges.length), H.vertices = w :: G.vertices ∧ ∀ (d : G.Dart), Dart.vertex (E d.1, d.2) = if selected d then w else d.vertex

Redirect the selected indexed ends to one new label, prepending the label to the vertex list and keeping all edge positions. This construction depends only on the choice of ends.