Documentation

Mathlib.Combinatorics.SimpleGraph.EdgeLabeling

Edge labelings #

This module defines labelings of the edges of a graph.

Main definitions #

def SimpleGraph.EdgeLabeling {V : Type u_1} (G : SimpleGraph V) (K : Type u_5) :
Type (max u_1 u_5)

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
Instances For
    @[reducible, inline]
    abbrev SimpleGraph.TopEdgeLabeling (V : Type u_5) (K : Type u_6) :
    Type (max u_5 u_6)

    An edge labeling of the complete graph on V with labels in type K.

    Equations
    Instances For
      def SimpleGraph.EdgeLabeling.get {V : Type u_1} {G : SimpleGraph V} {K : Type u_3} (C : G.EdgeLabeling K) (x y : V) (h : G.Adj x y) :
      K

      Convenience function to get the colour of the edge x ~ y in the colouring of the complete graph on V.

      Equations
      Instances For
        theorem SimpleGraph.EdgeLabeling.get_eq {V : Type u_1} {G : SimpleGraph V} {K : Type u_3} (C : G.EdgeLabeling K) (x y : V) (h : G.Adj x y) :
        C.get x y h = C s(x, y), h
        theorem SimpleGraph.EdgeLabeling.get_comm {V : Type u_1} {G : SimpleGraph V} {K : Type u_3} {C : G.EdgeLabeling K} (x y : V) (h : G.Adj y x) :
        C.get y x h = C.get x y
        theorem SimpleGraph.EdgeLabeling.ext_get {V : Type u_1} {G : SimpleGraph V} {K : Type u_3} {C C' : G.EdgeLabeling K} (h : ∀ (x y : V) (h : G.Adj x y), C.get x y h = C'.get x y h) :
        C = C'
        theorem SimpleGraph.EdgeLabeling.ext_get_iff {V : Type u_1} {G : SimpleGraph V} {K : Type u_3} {C C' : G.EdgeLabeling K} :
        C = C' ∀ (x y : V) (h : G.Adj x y), C.get x y h = C'.get x y h
        def SimpleGraph.EdgeLabeling.compRight {V : Type u_1} {G : SimpleGraph V} {K : Type u_3} {K' : Type u_4} (C : G.EdgeLabeling K) (f : KK') :

        Compose an edge-labeling with a function on the colour set.

        Equations
        Instances For
          def SimpleGraph.EdgeLabeling.pullback {V : Type u_1} {V' : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph V'} {K : Type u_3} (C : G.EdgeLabeling K) (f : G' →g G) :

          Compose an edge-labeling with a graph embedding.

          Equations
          Instances For
            @[simp]
            theorem SimpleGraph.EdgeLabeling.pullback_apply {V : Type u_1} {V' : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph V'} {K : Type u_3} {C : G.EdgeLabeling K} {f : G' →g G} (e : G'.edgeSet) :
            C.pullback f e = C (f.mapEdgeSet e)
            @[simp]
            theorem SimpleGraph.EdgeLabeling.get_pullback {V : Type u_1} {V' : Type u_2} {G : SimpleGraph V} {G' : SimpleGraph V'} {K : Type u_3} {C : G.EdgeLabeling K} {f : G' ↪g G} (x y : V') (h : G'.Adj x y) :
            (C.pullback (RelEmbedding.toRelHom f)).get x y h = C.get (f x) (f y)
            @[simp]
            theorem SimpleGraph.EdgeLabeling.compRight_apply {V : Type u_1} {G : SimpleGraph V} {K : Type u_3} {K' : Type u_4} {C : G.EdgeLabeling K} (f : KK') (e : G.edgeSet) :
            C.compRight f e = f (C e)
            @[simp]
            theorem SimpleGraph.EdgeLabeling.compRight_get {V : Type u_1} {G : SimpleGraph V} {K : Type u_3} {K' : Type u_4} {C : G.EdgeLabeling K} (f : KK') (x y : V) (h : G.Adj x y) :
            (C.compRight f).get x y h = f (C.get x y h)
            def SimpleGraph.EdgeLabeling.mk {V : Type u_1} {G : SimpleGraph V} {K : Type u_3} (f : (x y : V) → G.Adj x yK) (f_symm : ∀ (x y : V) (H : G.Adj x y), f y x = f x y H) :

            Construct an edge labeling from a symmetric function on adjacent vertices.

            Equations
            Instances For
              theorem SimpleGraph.EdgeLabeling.get_mk {V : Type u_1} {G : SimpleGraph V} {K : Type u_3} (f : (x y : V) → G.Adj x yK) (f_symm : ∀ (x y : V) (H : G.Adj x y), f y x = f x y H) (x y : V) (h : G.Adj x y) :
              (mk f f_symm).get x y h = f x y h
              def SimpleGraph.EdgeLabeling.labelGraph {V : Type u_1} {G : SimpleGraph V} {K : Type u_3} (C : G.EdgeLabeling K) (k : K) :

              Given an edge labeling and a choice of label k, construct the graph corresponding to the edges labeled k.

              Equations
              Instances For
                theorem SimpleGraph.EdgeLabeling.labelGraph_adj {V : Type u_1} {G : SimpleGraph V} {K : Type u_3} {C : G.EdgeLabeling K} {k : K} (x y : V) :
                (C.labelGraph k).Adj x y ∃ (H : G.Adj x y), C s(x, y), H = k
                theorem SimpleGraph.EdgeLabeling.labelGraph_le {V : Type u_1} {G : SimpleGraph V} {K : Type u_3} (C : G.EdgeLabeling K) {k : K} :
                theorem SimpleGraph.EdgeLabeling.pairwise_disjoint_labelGraph {V : Type u_1} {G : SimpleGraph V} {K : Type u_3} {C : G.EdgeLabeling K} :
                Pairwise fun (k l : K) => Disjoint (C.labelGraph k) (C.labelGraph l)
                theorem SimpleGraph.EdgeLabeling.iSup_labelGraph {V : Type u_1} {G : SimpleGraph V} {K : Type u_3} (C : G.EdgeLabeling K) :
                ⨆ (k : K), C.labelGraph k = G
                @[reducible, inline]
                abbrev SimpleGraph.TopEdgeLabeling.pullback {V : Type u_1} {V' : Type u_2} {K : Type u_3} (C : TopEdgeLabeling V K) (f : V' V) :

                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
                Instances For
                  @[simp]
                  theorem SimpleGraph.TopEdgeLabeling.labelGraph_adj {V : Type u_1} {K : Type u_3} {C : TopEdgeLabeling V K} {k : K} (x y : V) :
                  (EdgeLabeling.labelGraph C k).Adj x y ∃ (H : x y), EdgeLabeling.get C x y H = k

                  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
                  Instances For
                    @[simp]
                    theorem SimpleGraph.toTopEdgeLabeling_get {V : Type u_1} {G : SimpleGraph V} [DecidableRel G.Adj] {x y : V} (H : x y) :