Edge labelings #
This module defines labelings of the edges of a graph.
Main definitions #
SimpleGraph.EdgeLabeling: An assignment of a label from a given type to each edge of the graph.SimpleGraph.EdgeLabeling.labelGraph: the graph consisting of all edges with a given label.
An edge labeling of a simple graph G with labels in type K. Sometimes this is called an
edge-colouring, but we reserve that terminology for labelings where incident edges cannot share a
label.
Equations
- G.EdgeLabeling K = (↑G.edgeSet → K)
Instances For
Equations
An edge labeling of the complete graph on V with labels in type K.
Equations
Instances For
Convenience function to get the colour of the edge x ~ y in the colouring of the complete graph
on V.
Instances For
Compose an edge-labeling with a function on the colour set.
Instances For
Compose an edge-labeling with a graph embedding.
Equations
- C.pullback f = C ∘ f.mapEdgeSet
Instances For
Construct an edge labeling from a symmetric function on adjacent vertices.
Equations
Instances For
Given an edge labeling and a choice of label k, construct the graph corresponding to the edges
labeled k.
Equations
Instances For
Equations
- SimpleGraph.EdgeLabeling.instDecidableRelAdjLabelGraphOfDecidableEq k x✝¹ x✝ = decidable_of_iff' (∃ (H : G.Adj x✝¹ x✝), C ⟨s(x✝¹, x✝), H⟩ = k) ⋯
Compose an edge-labeling, by an injection into the vertex type. This must be an injection, else
we don't know how to colour x ~ y in the case f x = f y.
Equations
- C.pullback f = SimpleGraph.EdgeLabeling.pullback C { toFun := ⇑f, map_rel' := ⋯ }
Instances For
From a simple graph on V, construct the edge labeling on the complete graph of V given where
edges are labeled 1 and non-edges are labeled 0.
Equations
- G.toTopEdgeLabeling = SimpleGraph.EdgeLabeling.mk (fun (x y : V) (x_1 : ⊤.Adj x y) => if G.Adj x y then 1 else 0) ⋯