Documentation

TauCeti.Combinatorics.Graph.Serre.Basic

Graphs with edge reversal #

A Serre graph has directed edges paired by a fixed-point-free reversal. In particular, a loop still has two distinct directions, and parallel edges remain distinct. The quiver associated to a Serre graph keeps those directed edge identities, so its paths can be used for reduced paths, graph groups, and labelled-graph arguments.

The geometric edges of a Serre graph are the reversal pairs {e, rev e}; data attached to an unoriented edge, such as the edge groups of a graph of groups, is indexed by them.

For a reversal-closed set S of darts, the subgraph Γ.restrict S hS keeps every vertex of Γ and the darts in S.

The simple-graph construction takes its edge set from Mathlib's darts. It provides the familiar loopless example while retaining the reversal structure used for general graphs.

References #

structure TauCeti.SerreGraph :
Type (max (u + 1) (v + 1))

A graph in Serre's sense: every directed edge has a distinct reverse edge. Loops and parallel edges are permitted.

  • V : Type u

    Vertices.

  • E : Type v

    Directed edges, or darts.

  • src : self.E → self.V

    Initial vertex of a dart.

  • rev : self.E → self.E

    Reverse dart.

  • rev_rev (e : self.E) : self.rev (self.rev e) = e

    Reversing twice does nothing.

  • rev_ne (e : self.E) : self.rev e ≠ e

    A dart differs from its reverse, even when it is a loop.

Instances For
    def TauCeti.SerreGraph.tgt (Γ : SerreGraph) (e : Γ.E) :
    Γ.V

    Terminal vertex of a dart. The body is exposed so that families indexed by vertices, such as the vertex groups of a graph of groups, can be evaluated at Γ.tgt e without a cast.

    Instances For
      theorem TauCeti.SerreGraph.tgt_def (Γ : SerreGraph) (e : Γ.E) :
      Γ.tgt e = Γ.src (Γ.rev e)

      A dart ends where its reverse starts.

      @[simp]
      theorem TauCeti.SerreGraph.src_rev (Γ : SerreGraph) (e : Γ.E) :
      Γ.src (Γ.rev e) = Γ.tgt e
      @[simp]
      theorem TauCeti.SerreGraph.tgt_rev (Γ : SerreGraph) (e : Γ.E) :
      Γ.tgt (Γ.rev e) = Γ.src e

      The geometric edges of a Serre graph: the pairs {e, rev e} of mutually reverse darts.

      Instances For

        The geometric edge underlying a dart.

        Instances For
          @[simp]
          theorem TauCeti.SerreGraph.toGeomEdge_rev (Γ : SerreGraph) (e : Γ.E) :
          Γ.toGeomEdge (Γ.rev e) = Γ.toGeomEdge e

          A dart and its reverse have the same underlying geometric edge.

          Two darts have the same geometric edge exactly when they are equal or mutually reverse.

          def TauCeti.SerreGraph.GeomEdge.lift (Γ : SerreGraph) {β : Sort u_1} (f : Γ.E → β) (hf : ∀ (e : Γ.E), f (Γ.rev e) = f e) :
          Γ.GeomEdge → β

          A function on darts taking the same value on mutually reverse darts descends to geometric edges.

          Instances For
            @[simp]
            theorem TauCeti.SerreGraph.GeomEdge.lift_toGeomEdge (Γ : SerreGraph) {β : Sort u_1} (f : Γ.E → β) (hf : ∀ (e : Γ.E), f (Γ.rev e) = f e) (e : Γ.E) :
            lift Γ f hf (Γ.toGeomEdge e) = f e

            An orientation chooses one dart from each reverse pair.

            Instances For
              theorem TauCeti.SerreGraph.isOrientation_iff (Γ : SerreGraph) (O : Set Γ.E) :
              Γ.IsOrientation O ↔ ∀ (e : Γ.E), e ∈ O ↔ Γ.rev e ∉ O
              theorem TauCeti.SerreGraph.IsOrientation.mem_rev_iff (Γ : SerreGraph) {O : Set Γ.E} (hO : Γ.IsOrientation O) (e : Γ.E) :
              Γ.rev e ∈ O ↔ e ∉ O
              theorem TauCeti.SerreGraph.IsOrientation.rev_notMem_of_mem (Γ : SerreGraph) {O : Set Γ.E} (hO : Γ.IsOrientation O) (e : Γ.E) (he : e ∈ O) :
              Γ.rev e ∉ O
              @[instance_reducible]

              The quiver whose arrows are the actual darts from their source to their target.

              @[instance_reducible]

              Reversal on the quiver associated to a Serre graph.

              @[simp]
              theorem TauCeti.SerreGraph.reverse_val (Γ : SerreGraph) {a b : Γ.V} (f : a ⟶ b) :
              ↑(Quiver.reverse f) = Γ.rev ↑f
              def TauCeti.SerreGraph.dart (Γ : SerreGraph) (e : Γ.E) :
              Γ.src e ⟶ Γ.tgt e

              A dart as an arrow of the associated quiver.

              Instances For
                @[simp]
                theorem TauCeti.SerreGraph.dart_val (Γ : SerreGraph) (e : Γ.E) :
                ↑(Γ.dart e) = e
                @[reducible, inline]
                abbrev TauCeti.SerreGraph.Path (Γ : SerreGraph) (a b : Γ.V) :
                Type (max u v)

                An indexed path in a Serre graph is a path of its associated quiver.

                Instances For

                  A Serre graph is preconnected when any two vertices are joined by a path.

                  Instances For
                    theorem TauCeti.SerreGraph.preconnected_iff (Γ : SerreGraph) :
                    Γ.Preconnected ↔ ∀ (a b : Γ.V), Nonempty (Γ.Path a b)

                    Preconnectivity is pairwise Serre path reachability.

                    theorem TauCeti.SerreGraph.preconnected_of_forall_nonempty_path (Γ : SerreGraph) (a : Γ.V) (h : ∀ (b : Γ.V), Nonempty (Γ.Path a b)) :

                    A Serre graph is preconnected as soon as one vertex is joined by a path to every vertex: paths can be reversed.

                    theorem TauCeti.SerreGraph.eq_of_path_of_forall_src_eq_tgt (Γ : SerreGraph) (h : ∀ (e : Γ.E), Γ.src e = Γ.tgt e) {a b : Γ.V} (p : Γ.Path a b) :
                    a = b

                    In a Serre graph all of whose darts are loops, a path never leaves its starting vertex.

                    A Serre graph is connected when it is nonempty and path-connected.

                    Instances For

                      Connectedness requires a vertex as well as preconnectivity.

                      structure TauCeti.SerreGraph.Hom (Γ : SerreGraph) (Δ : SerreGraph) :
                      Type (max (max (max u v) w) x)

                      A morphism of Serre graphs maps vertices and darts and preserves incidence and reversal.

                      • mapV : Γ.V → Δ.V

                        Vertex map.

                      • mapE : Γ.E → Δ.E

                        Dart map.

                      • map_src (e : Γ.E) : Δ.src (self.mapE e) = self.mapV (Γ.src e)

                        Sources are preserved.

                      • map_rev (e : Γ.E) : self.mapE (Γ.rev e) = Δ.rev (self.mapE e)

                        Reversal is preserved.

                      Instances For
                        theorem TauCeti.SerreGraph.Hom.ext (Γ : SerreGraph) {Δ : SerreGraph} {f g : Γ.Hom Δ} (hV : f.mapV = g.mapV) (hE : f.mapE = g.mapE) :
                        f = g
                        theorem TauCeti.SerreGraph.Hom.ext_iff {Γ : SerreGraph} {Δ : SerreGraph} {f g : Γ.Hom Δ} :
                        f = g ↔ f.mapV = g.mapV ∧ f.mapE = g.mapE
                        @[simp]
                        theorem TauCeti.SerreGraph.Hom.map_tgt (Γ : SerreGraph) {Δ : SerreGraph} (f : Γ.Hom Δ) (e : Γ.E) :
                        Δ.tgt (f.mapE e) = f.mapV (Γ.tgt e)
                        def TauCeti.SerreGraph.Hom.toPrefunctor {Γ : SerreGraph} {Δ : SerreGraph} (f : Γ.Hom Δ) :
                        Γ.V ⥤q Δ.V

                        The quiver prefunctor underlying a Serre-graph morphism.

                        Instances For
                          @[simp]
                          theorem TauCeti.SerreGraph.Hom.toPrefunctor_obj {Γ : SerreGraph} {Δ : SerreGraph} (f : Γ.Hom Δ) (a : Γ.V) :
                          @[simp]
                          theorem TauCeti.SerreGraph.Hom.toPrefunctor_map_val {Γ : SerreGraph} {Δ : SerreGraph} (f : Γ.Hom Δ) {a b : Γ.V} (e : a ⟶ b) :
                          ↑(f.toPrefunctor.map e) = f.mapE ↑e

                          A vertex-surjective graph morphism carries preconnectedness to its target.

                          A vertex-surjective graph morphism carries connectedness to its target.

                          Identity morphism of a Serre graph.

                          Instances For
                            def TauCeti.SerreGraph.Hom.comp {Γ : SerreGraph} {Δ : SerreGraph} {Θ : SerreGraph} (g : Δ.Hom Θ) (f : Γ.Hom Δ) :
                            Γ.Hom Θ

                            Compose Serre-graph morphisms.

                            Instances For
                              @[simp]
                              theorem TauCeti.SerreGraph.Hom.comp_mapV (Γ : SerreGraph) {Δ : SerreGraph} {Θ : SerreGraph} (g : Δ.Hom Θ) (f : Γ.Hom Δ) :
                              (g.comp f).mapV = g.mapV ∘ f.mapV
                              @[simp]
                              theorem TauCeti.SerreGraph.Hom.comp_mapE (Γ : SerreGraph) {Δ : SerreGraph} {Θ : SerreGraph} (g : Δ.Hom Θ) (f : Γ.Hom Δ) :
                              (g.comp f).mapE = g.mapE ∘ f.mapE
                              @[simp]
                              theorem TauCeti.SerreGraph.Hom.id_comp (Γ : SerreGraph) {Δ : SerreGraph} (f : Γ.Hom Δ) :
                              (id Δ).comp f = f
                              @[simp]
                              theorem TauCeti.SerreGraph.Hom.comp_id (Γ : SerreGraph) {Δ : SerreGraph} (f : Γ.Hom Δ) :
                              f.comp (id Γ) = f
                              theorem TauCeti.SerreGraph.Hom.comp_assoc (Γ : SerreGraph) {Δ : SerreGraph} {Θ : SerreGraph} {Ξ : SerreGraph} (f : Γ.Hom Δ) (g : Δ.Hom Θ) (h : Θ.Hom Ξ) :
                              h.comp (g.comp f) = (h.comp g).comp f
                              @[reducible, inline]
                              abbrev TauCeti.SerreGraph.restrict (Γ : SerreGraph) (S : Set Γ.E) (hS : ∀ e ∈ S, Γ.rev e ∈ S) :

                              The subgraph of Γ with all vertices of Γ and the darts of a reversal-closed set S. The vertex type reduces to that of Γ, so vertices of Γ are vertices of the subgraph.

                              Instances For
                                @[simp]
                                theorem TauCeti.SerreGraph.restrict_src (Γ : SerreGraph) (S : Set Γ.E) (hS : ∀ e ∈ S, Γ.rev e ∈ S) (e : (Γ.restrict S hS).E) :
                                (Γ.restrict S hS).src e = Γ.src ↑e
                                @[simp]
                                theorem TauCeti.SerreGraph.restrict_rev_val (Γ : SerreGraph) (S : Set Γ.E) (hS : ∀ e ∈ S, Γ.rev e ∈ S) (e : (Γ.restrict S hS).E) :
                                ↑((Γ.restrict S hS).rev e) = Γ.rev ↑e
                                @[simp]
                                theorem TauCeti.SerreGraph.restrict_tgt (Γ : SerreGraph) (S : Set Γ.E) (hS : ∀ e ∈ S, Γ.rev e ∈ S) (e : (Γ.restrict S hS).E) :
                                (Γ.restrict S hS).tgt e = Γ.tgt ↑e
                                def TauCeti.SerreGraph.restrictInclusion (Γ : SerreGraph) (S : Set Γ.E) (hS : ∀ e ∈ S, Γ.rev e ∈ S) :
                                (Γ.restrict S hS).Hom Γ

                                The inclusion of a restriction into the ambient graph.

                                Instances For
                                  @[simp]
                                  theorem TauCeti.SerreGraph.restrictInclusion_mapV (Γ : SerreGraph) (S : Set Γ.E) (hS : ∀ e ∈ S, Γ.rev e ∈ S) (a : (Γ.restrict S hS).V) :
                                  (Γ.restrictInclusion S hS).mapV a = a
                                  @[simp]
                                  theorem TauCeti.SerreGraph.restrictInclusion_mapE (Γ : SerreGraph) (S : Set Γ.E) (hS : ∀ e ∈ S, Γ.rev e ∈ S) (e : (Γ.restrict S hS).E) :
                                  (Γ.restrictInclusion S hS).mapE e = ↑e

                                  The rose on a type of petals. Each petal is a loop with two distinct darts.

                                  Instances For
                                    @[simp]
                                    theorem TauCeti.SerreGraph.rose_src (α : Type w) (e : α × Bool) :
                                    @[simp]
                                    theorem TauCeti.SerreGraph.rose_rev (α : Type w) (e : α × Bool) :
                                    (rose α).rev e = (e.1, !e.2)
                                    @[simp]
                                    theorem TauCeti.SerreGraph.rose_tgt (α : Type w) (e : α × Bool) :

                                    Each dart of a rose is a loop.

                                    @[reducible, inline]

                                    The Serre graph with one vertex and no edges.

                                    Instances For
                                      @[instance_reducible]

                                      A rose has a single vertex.

                                      @[instance_reducible]

                                      The darts of a rose, being pairs of a petal and a direction, have decidable equality when the petals do.

                                      The geometric edges of a rose are its petals.

                                      Instances For

                                        Every rose is connected, including the rose without petals.

                                        Positive darts form an orientation of a rose.

                                        The segment: two vertices joined by a single pair of darts. The dart b runs from the vertex b to the vertex !b.

                                        Instances For

                                          The vertices of the segment are the Booleans.

                                          Instances For
                                            @[instance_reducible]

                                            The darts of the segment, being Booleans, have decidable equality.

                                            @[instance_reducible]

                                            The segment has a single geometric edge.

                                            The Serre graph of a simple graph has its darts as directed edges.

                                            Instances For
                                              @[simp]
                                              theorem SimpleGraph.toSerreGraph_src {V : Type u} (G : SimpleGraph V) (e : G.Dart) :
                                              @[simp]
                                              theorem SimpleGraph.toSerreGraph_rev {V : Type u} (G : SimpleGraph V) (e : G.Dart) :
                                              @[simp]
                                              theorem SimpleGraph.toSerreGraph_tgt {V : Type u} (G : SimpleGraph V) (e : G.Dart) :