File: Mathlib/Combinatorics/Quiver/Basic.lean

full_name: Quiver
code: /-- 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.
-/
class Quiver (V : Type u) where
  /-- The type of edges/arrows/morphisms between a given source and target. -/
  Hom : V → V → Sort v
goal: Type (max u v)

full_name: Quiver.Hom
code: /-- 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.
-/
class Quiver (V : Type u) where
  /-- The type of edges/arrows/morphisms between a given source and target. -/
  Hom : V → V → Sort v
goal: V → V → Sort v

full_name: _aux_Mathlib_Combinatorics_Quiver_Basic___unexpand_Quiver_Hom_1
code: /--
Notation for the type of edges/arrows/morphisms between a given source and target
in a quiver or category.
-/
infixr:10 " ⟶ " => Quiver.Hom
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_Mathlib_Combinatorics_Quiver_Basic___macroRules_term_⟶__1»
code: /--
Notation for the type of edges/arrows/morphisms between a given source and target
in a quiver or category.
-/
infixr:10 " ⟶ " => Quiver.Hom
goal: Lean.Macro

full_name: Prefunctor.map
code: /-- A morphism of quivers. As we will later have categorical functors extend this structure,
we call it a `Prefunctor`. -/
structure Prefunctor (V : Type u₁) [Quiver.{v₁} V] (W : Type u₂) [Quiver.{v₂} W] where
  /-- The action of a (pre)functor on vertices/objects. -/
  obj : V → W
  /-- The action of a (pre)functor on edges/arrows/morphisms. -/
  map : ∀ {X Y : V}, (X ⟶ Y) → (obj X ⟶ obj Y)
goal: (X ⟶ Y) → (self.obj X ⟶ self.obj Y)

full_name: Prefunctor.obj
code: /-- A morphism of quivers. As we will later have categorical functors extend this structure,
we call it a `Prefunctor`. -/
structure Prefunctor (V : Type u₁) [Quiver.{v₁} V] (W : Type u₂) [Quiver.{v₂} W] where
  /-- The action of a (pre)functor on vertices/objects. -/
  obj : V → W
  /-- The action of a (pre)functor on edges/arrows/morphisms. -/
  map : ∀ {X Y : V}, (X ⟶ Y) → (obj X ⟶ obj Y)
goal: V → W

full_name: Prefunctor
code: /-- A morphism of quivers. As we will later have categorical functors extend this structure,
we call it a `Prefunctor`. -/
structure Prefunctor (V : Type u₁) [Quiver.{v₁} V] (W : Type u₂) [Quiver.{v₂} W] where
  /-- The action of a (pre)functor on vertices/objects. -/
  obj : V → W
  /-- The action of a (pre)functor on edges/arrows/morphisms. -/
  map : ∀ {X Y : V}, (X ⟶ Y) → (obj X ⟶ obj Y)
goal: Sort (max (max (max (u₁ + 1) (u₂ + 1)) v₁) v₂)

full_name: Prefunctor.mk_obj
code: lemma mk_obj {V W : Type*} [Quiver V] [Quiver W] {obj : V → W} {map} {X : V} :
    (Prefunctor.mk obj map).obj X = obj X 
goal: { obj := obj, map := map }.obj X = obj X

full_name: Prefunctor.mk_map
code: lemma mk_map {V W : Type*} [Quiver V] [Quiver W] {obj : V → W} {map} {X Y : V} {f : X ⟶ Y} :
    (Prefunctor.mk obj map).map f = map f 
goal: { obj := obj, map := map }.map f = map f

full_name: Prefunctor.ext
code: @[ext]
theorem ext {V : Type u} [Quiver.{v₁} V] {W : Type u₂} [Quiver.{v₂} W] {F G : Prefunctor V W}
    (h_obj : ∀ X, F.obj X = G.obj X)
    (h_map : ∀ (X Y : V) (f : X ⟶ Y),
      F.map f = Eq.recOn (h_obj Y).symm (Eq.recOn (h_obj X).symm (G.map f))) : F = G 
goal: F = G

full_name: Prefunctor.id_obj
code: /-- The identity morphism between quivers. -/
@[simps]
def id (V : Type*) [Quiver V] : Prefunctor V V 
goal: (𝟭q V).obj X = X

full_name: Prefunctor.id
code: /-- The identity morphism between quivers. -/
@[simps]
def id (V : Type*) [Quiver V] : Prefunctor V V 
goal: V ⥤q V

full_name: Prefunctor.id_map
code: /-- The identity morphism between quivers. -/
@[simps]
def id (V : Type*) [Quiver V] : Prefunctor V V 
goal: ∀ {X Y : V} (f : X ⟶ Y), (𝟭q V).map f = f

full_name: Prefunctor.instInhabited
code: instance (V : Type*) [Quiver V] : Inhabited (Prefunctor V V) 
goal: Inhabited (V ⥤q V)

full_name: Prefunctor.comp_map
code: /-- Composition of morphisms between quivers. -/
@[simps]
def comp {U : Type*} [Quiver U] {V : Type*} [Quiver V] {W : Type*} [Quiver W]
    (F : Prefunctor U V) (G : Prefunctor V W) : Prefunctor U W 
goal: ∀ {X Y : U} (f : X ⟶ Y), (F ⋙q G).map f = G.map (F.map f)

full_name: Prefunctor.comp
code: /-- Composition of morphisms between quivers. -/
@[simps]
def comp {U : Type*} [Quiver U] {V : Type*} [Quiver V] {W : Type*} [Quiver W]
    (F : Prefunctor U V) (G : Prefunctor V W) : Prefunctor U W 
goal: U ⥤q W

full_name: Prefunctor.comp_obj
code: /-- Composition of morphisms between quivers. -/
@[simps]
def comp {U : Type*} [Quiver U] {V : Type*} [Quiver V] {W : Type*} [Quiver W]
    (F : Prefunctor U V) (G : Prefunctor V W) : Prefunctor U W 
goal: (F ⋙q G).obj X = G.obj (F.obj X)

full_name: Prefunctor.comp_id
code: @[simp]
theorem comp_id {U V : Type*} [Quiver U] [Quiver V] (F : Prefunctor U V) :
    F.comp (id _) = F 
goal: F ⋙q 𝟭q V = F

full_name: Prefunctor.id_comp
code: @[simp]
theorem id_comp {U V : Type*} [Quiver U] [Quiver V] (F : Prefunctor U V) :
    (id _).comp F = F 
goal: 𝟭q U ⋙q F = F

full_name: Prefunctor.comp_assoc
code: @[simp]
theorem comp_assoc {U V W Z : Type*} [Quiver U] [Quiver V] [Quiver W] [Quiver Z]
    (F : Prefunctor U V) (G : Prefunctor V W) (H : Prefunctor W Z) :
    (F.comp G).comp H = F.comp (G.comp H) 
goal: F ⋙q G ⋙q H = F ⋙q (G ⋙q H)

full_name: Prefunctor._aux_Mathlib_Combinatorics_Quiver_Basic___unexpand_Prefunctor_1
code: /-- Notation for a prefunctor between quivers. -/
infixl:50 " ⥤q " => Prefunctor
goal: Lean.PrettyPrinter.Unexpander

full_name: Prefunctor.«_aux_Mathlib_Combinatorics_Quiver_Basic___macroRules_Prefunctor_term_⥤q__1»
code: /-- Notation for a prefunctor between quivers. -/
infixl:50 " ⥤q " => Prefunctor
goal: Lean.Macro

full_name: Prefunctor.«_aux_Mathlib_Combinatorics_Quiver_Basic___macroRules_Prefunctor_term_⋙q__1»
code: /-- Notation for composition of prefunctors. -/
infixl:60 " ⋙q " => Prefunctor.comp
goal: Lean.Macro

full_name: Prefunctor._aux_Mathlib_Combinatorics_Quiver_Basic___unexpand_Prefunctor_comp_1
code: /-- Notation for composition of prefunctors. -/
infixl:60 " ⋙q " => Prefunctor.comp
goal: Lean.PrettyPrinter.Unexpander

full_name: Prefunctor._aux_Mathlib_Combinatorics_Quiver_Basic___unexpand_Prefunctor_id_1
code: /-- Notation for the identity prefunctor on a quiver. -/
notation "𝟭q" => id
goal: Lean.PrettyPrinter.Unexpander

full_name: Prefunctor.«_aux_Mathlib_Combinatorics_Quiver_Basic___macroRules_Prefunctor_term𝟭q_1»
code: /-- Notation for the identity prefunctor on a quiver. -/
notation "𝟭q" => id
goal: Lean.Macro

full_name: Prefunctor.congr_map
code: theorem congr_map {U V : Type*} [Quiver U] [Quiver V] (F : U ⥤q V) {X Y : U} {f g : X ⟶ Y}
    (h : f = g) : F.map f = F.map g 
goal: F.map f = F.map g

full_name: Quiver.opposite
code: /-- `Vᵒᵖ` reverses the direction of all arrows of `V`. -/
instance opposite {V} [Quiver V] : Quiver Vᵒᵖ 
goal: Quiver Vᵒᵖ

full_name: Quiver.Hom.op
code: /-- The opposite of an arrow in `V`. -/
def Hom.op {V} [Quiver V] {X Y : V} (f : X ⟶ Y) : op Y ⟶ op X 
goal: Opposite.op Y ⟶ Opposite.op X

full_name: Quiver.Hom.unop
code: /-- Given an arrow in `Vᵒᵖ`, we can take the "unopposite" back in `V`. -/
def Hom.unop {V} [Quiver V] {X Y : Vᵒᵖ} (f : X ⟶ Y) : unop Y ⟶ unop X 
goal: Opposite.unop Y ⟶ Opposite.unop X

full_name: Quiver.Empty
code: /-- A type synonym for a quiver with no arrows. -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
def Empty (V : Type u) : Type u 
goal: Type u

full_name: Quiver.emptyQuiver
code: instance emptyQuiver (V : Type u) : Quiver.{u} (Empty V) 
goal: Quiver (Quiver.Empty V)

full_name: Quiver.empty_arrow
code: @[simp]
theorem empty_arrow {V : Type u} (a b : Empty V) : (a ⟶ b) = PEmpty 
goal: (a ⟶ b) = PEmpty.{u}

full_name: Quiver.IsThin
code: /-- A quiver is thin if it has no parallel arrows. -/
abbrev IsThin (V : Type u) [Quiver V] : Prop 
goal: Prop