Paths in quivers #
Given a quiver V
, we define the type of paths from a : V
to b : V
as an inductive
family. We define composition of paths and the action of prefunctors on paths.
The length of a path is the number of arrows it uses.
Equations
- Quiver.Path.nil.length = 0
- (p.cons a_1).length = p.length + 1
Instances For
Equations
- Quiver.Path.instInhabited = { default := Quiver.Path.nil }
Composition of paths.
Equations
- x✝.comp Quiver.Path.nil = x✝
- x✝.comp (q.cons e) = (x✝.comp q).cons e
Instances For
theorem
Quiver.Path.comp_injective_left
{V : Type u}
[Quiver V]
{a b c : V}
(q : Path b c)
:
Function.Injective fun (p : Path a b) => p.comp q
theorem
Quiver.Path.comp_injective_right
{V : Type u}
[Quiver V]
{a b c : V}
(p : Path a b)
:
Function.Injective p.comp
Turn a path into a list. The list contains a
at its head, but not b
a priori.
Equations
- Quiver.Path.nil.toList = []
- (p.cons a_1).toList = b :: p.toList
Instances For
@[simp]
theorem
Quiver.Path.toList_comp
{V : Type u}
[Quiver V]
{a b : V}
(p : Path a b)
{c : V}
(q : Path b c)
:
Quiver.Path.toList
is a contravariant functor. The inversion comes from Quiver.Path
and
List
having different preferred directions for adding elements.
theorem
Quiver.Path.toList_chain_nonempty
{V : Type u}
[Quiver V]
{a b : V}
(p : Path a b)
:
List.Chain (fun (x y : V) => Nonempty (y ⟶ x)) b p.toList
theorem
Quiver.Path.toList_injective
{V : Type u}
[Quiver V]
[∀ (a b : V), Subsingleton (a ⟶ b)]
(a b : V)
:
@[simp]
theorem
Quiver.Path.toList_inj
{V : Type u}
[Quiver V]
{a b : V}
[∀ (a b : V), Subsingleton (a ⟶ b)]
{p q : Path a b}
:
def
Prefunctor.mapPath
{V : Type u₁}
[Quiver V]
{W : Type u₂}
[Quiver W]
(F : V ⥤q W)
{a b : V}
:
Quiver.Path a b → Quiver.Path (F.obj a) (F.obj b)
The image of a path under a prefunctor.
Equations
- F.mapPath Quiver.Path.nil = Quiver.Path.nil
- F.mapPath (p.cons a_1) = (F.mapPath p).cons (F.map a_1)
Instances For
@[simp]
theorem
Prefunctor.mapPath_nil
{V : Type u₁}
[Quiver V]
{W : Type u₂}
[Quiver W]
(F : V ⥤q W)
(a : V)
:
F.mapPath Quiver.Path.nil = Quiver.Path.nil
@[simp]
theorem
Prefunctor.mapPath_cons
{V : Type u₁}
[Quiver V]
{W : Type u₂}
[Quiver W]
(F : V ⥤q W)
{a b c : V}
(p : Quiver.Path a b)
(e : b ⟶ c)
:
F.mapPath (p.cons e) = (F.mapPath p).cons (F.map e)
@[simp]
theorem
Prefunctor.mapPath_comp
{V : Type u₁}
[Quiver V]
{W : Type u₂}
[Quiver W]
(F : V ⥤q W)
{a b : V}
(p : Quiver.Path a b)
{c : V}
(q : Quiver.Path b c)
:
F.mapPath (p.comp q) = (F.mapPath p).comp (F.mapPath q)