Documentation

Mathlib.Combinatorics.Quiver.Basic

Quivers #

This module defines quivers. A quiver on a type V of vertices assigns to every pair a b : V of vertices a type a ⟶ b of arrows from a to b. This is a very permissive notion of directed graph.

Implementation notes #

Currently Quiver is defined with Hom : V → V → Sort v. This is different from the category theory setup, where we insist that morphisms live in some Type. There's some balance here: it's nice to allow Prop to ensure there are no multiple arrows, but it is also results in error-prone universe signatures when constraints require a Type.

class Quiver (V : Type u) :
Type (max u v)

A quiver G on a type V of vertices assigns to every pair a b : V of vertices a type a ⟶ b of arrows from a to b.

For graphs with no repeated edges, one can use Quiver.{0} V, which ensures a ⟶ b : Prop. For multigraphs, one can use Quiver.{v+1} V, which ensures a ⟶ b : Type v.

Because Category will later extend this class, we call the field Hom. Except when constructing instances, you should rarely see this, and use the notation instead.

  • Hom : VVSort v

    The type of edges/arrows/morphisms between a given source and target.

Instances

    Notation for the type of edges/arrows/morphisms between a given source and target in a quiver or category.

    Equations
      Instances For
        instance Quiver.opposite {V : Type u_1} [Quiver V] :

        Vᵒᵖ reverses the direction of all arrows of V.

        Equations
          def Quiver.Hom.op {V : Type u_1} [Quiver V] {X Y : V} (f : X Y) :

          The opposite of an arrow in V.

          Equations
            Instances For
              def Quiver.Hom.unop {V : Type u_1} [Quiver V] {X Y : Vᵒᵖ} (f : X Y) :

              Given an arrow in Vᵒᵖ, we can take the "unopposite" back in V.

              Equations
                Instances For
                  def Quiver.Hom.opEquiv {V : Type u_1} [Quiver V] {X Y : V} :

                  The bijection (X ⟶ Y) ≃ (op Y ⟶ op X).

                  Equations
                    Instances For
                      @[simp]
                      theorem Quiver.Hom.opEquiv_apply {V : Type u_1} [Quiver V] {X Y : V} (unop : X Y) :
                      def Quiver.Empty (V : Type u) :

                      A type synonym for a quiver with no arrows.

                      Equations
                        Instances For
                          instance Quiver.emptyQuiver (V : Type u) :
                          Equations
                            @[simp]
                            theorem Quiver.empty_arrow {V : Type u} (a b : Empty V) :
                            @[reducible, inline]
                            abbrev Quiver.IsThin (V : Type u) [Quiver V] :

                            A quiver is thin if it has no parallel arrows.

                            Equations
                              Instances For
                                def Quiver.homOfEq {V : Type u_1} [Quiver V] {X Y : V} (f : X Y) {X' Y' : V} (hX : X = X') (hY : Y = Y') :
                                X' Y'

                                An arrow in a quiver can be transported across equalities between the source and target objects.

                                Equations
                                  Instances For
                                    @[simp]
                                    theorem Quiver.homOfEq_trans {V : Type u_1} [Quiver V] {X Y : V} (f : X Y) {X' Y' : V} (hX : X = X') (hY : Y = Y') {X'' Y'' : V} (hX' : X' = X'') (hY' : Y' = Y'') :
                                    homOfEq (homOfEq f hX hY) hX' hY' = homOfEq f
                                    theorem Quiver.homOfEq_injective {V : Type u_1} [Quiver V] {X X' Y Y' : V} (hX : X = X') (hY : Y = Y') {f g : X Y} (h : homOfEq f hX hY = homOfEq g hX hY) :
                                    f = g
                                    @[simp]
                                    theorem Quiver.homOfEq_rfl {V : Type u_1} [Quiver V] {X Y : V} (f : X Y) :
                                    homOfEq f = f
                                    theorem Quiver.heq_of_homOfEq_ext {V : Type u_1} [Quiver V] {X Y X' Y' : V} (hX : X = X') (hY : Y = Y') {f : X Y} {f' : X' Y'} (e : homOfEq f hX hY = f') :
                                    f f'
                                    theorem Quiver.homOfEq_eq_iff {V : Type u_1} [Quiver V] {X X' Y Y' : V} (f : X Y) (g : X' Y') (hX : X = X') (hY : Y = Y') :
                                    homOfEq f hX hY = g f = homOfEq g
                                    theorem Quiver.eq_homOfEq_iff {V : Type u_1} [Quiver V] {X X' Y Y' : V} (f : X Y) (g : X' Y') (hX : X' = X) (hY : Y' = Y) :
                                    f = homOfEq g hX hY homOfEq f = g
                                    theorem Quiver.homOfEq_heq {V : Type u_1} [Quiver V] {X Y X' Y' : V} (hX : X = X') (hY : Y = Y') (f : X Y) :
                                    homOfEq f hX hY f
                                    theorem Quiver.homOfEq_heq_left_iff {V : Type u_1} [Quiver V] {X Y X' Y' : V} (f : X Y) (g : X' Y') (hX : X = X') (hY : Y = Y') :
                                    homOfEq f hX hY g f g
                                    theorem Quiver.homOfEq_heq_right_iff {V : Type u_1} [Quiver V] {X Y X' Y' : V} (f : X Y) (g : X' Y') (hX : X' = X) (hY : Y' = Y) :
                                    f homOfEq g hX hY f g