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.
Path a b
is the type of paths from a
to b
through the arrows of G
.
- nil: {V : Type u} → [inst : Quiver V] → {a : V} → Quiver.Path a a
- cons: {V : Type u} → [inst : Quiver V] → {a b c : V} → Quiver.Path a b → (b ⟶ c) → Quiver.Path a c
Instances For
theorem
Quiver.Path.nil_ne_cons
{V : Type u}
[Quiver V]
{a : V}
{b : V}
(p : Quiver.Path a b)
(e : b ⟶ a)
:
Quiver.Path.nil ≠ p.cons e
theorem
Quiver.Path.cons_ne_nil
{V : Type u}
[Quiver V]
{a : V}
{b : V}
(p : Quiver.Path a b)
(e : b ⟶ a)
:
p.cons e ≠ Quiver.Path.nil
theorem
Quiver.Path.obj_eq_of_cons_eq_cons
{V : Type u}
[Quiver V]
{a : V}
{b : V}
{c : V}
{d : V}
{p : Quiver.Path a b}
{p' : Quiver.Path a c}
{e : b ⟶ d}
{e' : c ⟶ d}
(h : p.cons e = p'.cons e')
:
b = c
theorem
Quiver.Path.heq_of_cons_eq_cons
{V : Type u}
[Quiver V]
{a : V}
{b : V}
{c : V}
{d : V}
{p : Quiver.Path a b}
{p' : Quiver.Path a c}
{e : b ⟶ d}
{e' : c ⟶ d}
(h : p.cons e = p'.cons e')
:
HEq p p'
theorem
Quiver.Path.hom_heq_of_cons_eq_cons
{V : Type u}
[Quiver V]
{a : V}
{b : V}
{c : V}
{d : V}
{p : Quiver.Path a b}
{p' : Quiver.Path a c}
{e : b ⟶ d}
{e' : c ⟶ d}
(h : p.cons e = p'.cons e')
:
HEq e e'
The length of a path is the number of arrows it uses.
Instances For
Equations
- Quiver.Path.instInhabited = { default := Quiver.Path.nil }
@[simp]
@[simp]
theorem
Quiver.Path.length_cons
{V : Type u}
[Quiver V]
(a : V)
(b : V)
(c : V)
(p : Quiver.Path a b)
(e : b ⟶ c)
:
theorem
Quiver.Path.eq_of_length_zero
{V : Type u}
[Quiver V]
{a : V}
{b : V}
(p : Quiver.Path a b)
(hzero : p.length = 0)
:
a = b
def
Quiver.Path.comp
{V : Type u}
[Quiver V]
{a : V}
{b : V}
{c : V}
:
Quiver.Path a b → Quiver.Path b c → Quiver.Path a c
Composition of paths.
Instances For
@[simp]
theorem
Quiver.Path.comp_cons
{V : Type u}
[Quiver V]
{a : V}
{b : V}
{c : V}
{d : V}
(p : Quiver.Path a b)
(q : Quiver.Path b c)
(e : c ⟶ d)
:
p.comp (q.cons e) = (p.comp q).cons e
@[simp]
theorem
Quiver.Path.comp_nil
{V : Type u}
[Quiver V]
{a : V}
{b : V}
(p : Quiver.Path a b)
:
p.comp Quiver.Path.nil = p
@[simp]
theorem
Quiver.Path.nil_comp
{V : Type u}
[Quiver V]
{a : V}
{b : V}
(p : Quiver.Path a b)
:
Quiver.Path.nil.comp p = p
@[simp]
theorem
Quiver.Path.comp_assoc
{V : Type u}
[Quiver V]
{a : V}
{b : V}
{c : V}
{d : V}
(p : Quiver.Path a b)
(q : Quiver.Path b c)
(r : Quiver.Path c d)
:
(p.comp q).comp r = p.comp (q.comp r)
@[simp]
theorem
Quiver.Path.length_comp
{V : Type u}
[Quiver V]
{a : V}
{b : V}
(p : Quiver.Path a b)
{c : V}
(q : Quiver.Path b c)
:
theorem
Quiver.Path.comp_inj
{V : Type u}
[Quiver V]
{a : V}
{b : V}
{c : V}
{p₁ : Quiver.Path a b}
{p₂ : Quiver.Path a b}
{q₁ : Quiver.Path b c}
{q₂ : Quiver.Path b c}
(hq : q₁.length = q₂.length)
:
theorem
Quiver.Path.comp_inj'
{V : Type u}
[Quiver V]
{a : V}
{b : V}
{c : V}
{p₁ : Quiver.Path a b}
{p₂ : Quiver.Path a b}
{q₁ : Quiver.Path b c}
{q₂ : Quiver.Path b c}
(h : p₁.length = p₂.length)
:
theorem
Quiver.Path.comp_injective_left
{V : Type u}
[Quiver V]
{a : V}
{b : V}
{c : V}
(q : Quiver.Path b c)
:
Function.Injective fun (p : Quiver.Path a b) => p.comp q
theorem
Quiver.Path.comp_injective_right
{V : Type u}
[Quiver V]
{a : V}
{b : V}
{c : V}
(p : Quiver.Path a b)
:
Function.Injective p.comp
@[simp]
theorem
Quiver.Path.comp_inj_left
{V : Type u}
[Quiver V]
{a : V}
{b : V}
{c : V}
{p₁ : Quiver.Path a b}
{p₂ : Quiver.Path a b}
{q : Quiver.Path b c}
:
@[simp]
theorem
Quiver.Path.comp_inj_right
{V : Type u}
[Quiver V]
{a : V}
{b : V}
{c : V}
{p : Quiver.Path a b}
{q₁ : Quiver.Path b c}
{q₂ : Quiver.Path b c}
:
Turn a path into a list. The list contains a
at its head, but not b
a priori.
Instances For
@[simp]
theorem
Quiver.Path.toList_comp
{V : Type u}
[Quiver V]
{a : V}
{b : V}
(p : Quiver.Path a b)
{c : V}
(q : Quiver.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 : V}
{b : V}
(p : Quiver.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 : V)
(b : V)
:
Function.Injective Quiver.Path.toList
@[simp]
theorem
Quiver.Path.toList_inj
{V : Type u}
[Quiver V]
{a : V}
{b : V}
[∀ (a b : V), Subsingleton (a ⟶ b)]
{p : Quiver.Path a b}
{q : Quiver.Path a b}
:
def
Prefunctor.mapPath
{V : Type u₁}
[Quiver V]
{W : Type u₂}
[Quiver W]
(F : V ⥤q W)
{a : V}
{b : V}
:
Quiver.Path a b → Quiver.Path (F.obj a) (F.obj b)
The image of a path under a prefunctor.
Equations
Instances For
@[simp]
theorem
Prefunctor.mapPath_cons
{V : Type u₁}
[Quiver V]
{W : Type u₂}
[Quiver W]
(F : V ⥤q W)
{a : V}
{b : V}
{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 : V}
{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)