Documentation

Mathlib.Combinatorics.SimpleGraph.Dart

Darts in graphs #

A Dart or half-edge or bond in a graph is an ordered pair of adjacent vertices, regarded as an oriented edge. This file defines darts and proves some of their basic properties.

structure SimpleGraph.Dart {V : Type u_1} (G : SimpleGraph V) extends V ร— V :
Type u_1

A Dart is an oriented edge, implemented as an ordered pair of adjacent vertices. This terminology comes from combinatorial maps, and they are also known as "half-edges" or "bonds."

Instances For
    @[implicit_reducible]
    instance SimpleGraph.instDecidableEqDart {Vโœ : Type u_2} {Gโœ : SimpleGraph Vโœ} [DecidableEq Vโœ] :
    DecidableEq Gโœ.Dart
    def SimpleGraph.instDecidableEqDart.decEq {Vโœ : Type u_2} {Gโœ : SimpleGraph Vโœ} [DecidableEq Vโœ] (xโœ xโœยน : Gโœ.Dart) :
    Decidable (xโœ = xโœยน)
    Instances For
      theorem SimpleGraph.Dart.ext_iff {V : Type u_1} {G : SimpleGraph V} (dโ‚ dโ‚‚ : G.Dart) :
      dโ‚ = dโ‚‚ โ†” dโ‚.toProd = dโ‚‚.toProd
      theorem SimpleGraph.Dart.ext {V : Type u_1} {G : SimpleGraph V} (dโ‚ dโ‚‚ : G.Dart) (h : dโ‚.toProd = dโ‚‚.toProd) :
      dโ‚ = dโ‚‚
      @[simp]
      theorem SimpleGraph.Dart.fst_ne_snd {V : Type u_1} {G : SimpleGraph V} (d : G.Dart) :
      d.toProd.1 โ‰  d.toProd.2
      @[simp]
      theorem SimpleGraph.Dart.snd_ne_fst {V : Type u_1} {G : SimpleGraph V} (d : G.Dart) :
      d.toProd.2 โ‰  d.toProd.1
      @[implicit_reducible]
      instance SimpleGraph.Dart.fintype {V : Type u_1} {G : SimpleGraph V} [Fintype V] [DecidableRel G.Adj] :
      def SimpleGraph.Dart.edge {V : Type u_1} {G : SimpleGraph V} (d : G.Dart) :

      The edge associated to the dart.

      Instances For
        @[simp]
        theorem SimpleGraph.Dart.edge_mk {V : Type u_1} {G : SimpleGraph V} {p : V ร— V} (h : G.Adj p.1 p.2) :
        { toProd := p, adj := h }.edge = s(p.1, p.2)
        @[simp]
        theorem SimpleGraph.Dart.edge_mem {V : Type u_1} {G : SimpleGraph V} (d : G.Dart) :
        d.edge โˆˆ G.edgeSet
        def SimpleGraph.Dart.symm {V : Type u_1} {G : SimpleGraph V} (d : G.Dart) :

        The dart with reversed orientation from a given dart.

        Instances For
          @[simp]
          theorem SimpleGraph.Dart.symm_toProd {V : Type u_1} {G : SimpleGraph V} (d : G.Dart) :
          d.symm.toProd = d.swap
          @[simp]
          theorem SimpleGraph.Dart.symm_mk {V : Type u_1} {G : SimpleGraph V} {p : V ร— V} (h : G.Adj p.1 p.2) :
          { toProd := p, adj := h }.symm = { toProd := p.swap, adj := โ‹ฏ }
          @[simp]
          theorem SimpleGraph.Dart.edge_symm {V : Type u_1} {G : SimpleGraph V} (d : G.Dart) :
          d.symm.edge = d.edge
          @[simp]
          theorem SimpleGraph.Dart.symm_symm {V : Type u_1} {G : SimpleGraph V} (d : G.Dart) :
          d.symm.symm = d
          theorem SimpleGraph.Dart.symm_ne {V : Type u_1} {G : SimpleGraph V} (d : G.Dart) :
          d.symm โ‰  d
          theorem SimpleGraph.dart_edge_eq_iff {V : Type u_1} {G : SimpleGraph V} (dโ‚ dโ‚‚ : G.Dart) :
          dโ‚.edge = dโ‚‚.edge โ†” dโ‚ = dโ‚‚ โˆจ dโ‚ = dโ‚‚.symm
          theorem SimpleGraph.dart_edge_eq_mk'_iff {V : Type u_1} {G : SimpleGraph V} {d : G.Dart} {u v : V} :
          d.edge = s(u, v) โ†” d.toProd = (u, v) โˆจ d.toProd = (v, u)
          theorem SimpleGraph.dart_edge_eq_mk'_iff' {V : Type u_1} {G : SimpleGraph V} {d : G.Dart} {u v : V} :
          d.edge = s(u, v) โ†” d.toProd.1 = u โˆง d.toProd.2 = v โˆจ d.toProd.1 = v โˆง d.toProd.2 = u
          def SimpleGraph.DartAdj {V : Type u_1} (G : SimpleGraph V) (d d' : G.Dart) :

          Two darts are said to be adjacent if they could be consecutive darts in a walk -- that is, the first dart's second vertex is equal to the second dart's first vertex.

          Instances For
            def SimpleGraph.dartOfNeighborSet {V : Type u_1} (G : SimpleGraph V) (v : V) (w : โ†‘(G.neighborSet v)) :

            For a given vertex v, this is the bijective map from the neighbor set at v to the darts d with d.fst = v.

            Instances For
              @[simp]
              theorem SimpleGraph.dartOfNeighborSet_toProd {V : Type u_1} (G : SimpleGraph V) (v : V) (w : โ†‘(G.neighborSet v)) :
              (G.dartOfNeighborSet v w).toProd = (v, โ†‘w)
              theorem SimpleGraph.dartOfNeighborSet_injective {V : Type u_1} (G : SimpleGraph V) (v : V) :
              Function.Injective (G.dartOfNeighborSet v)