Paths in quivers #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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.
- nil : Π {V : Type u} [_inst_1 : quiver V] {a : V}, quiver.path a a
- cons : Π {V : Type u} [_inst_1 : quiver V] {a b c : V}, quiver.path a b → (b ⟶ c) → quiver.path a c
G.path a b
is the type of paths from a
to b
through the arrows of G
.
Instances for quiver.path
- quiver.path.has_sizeof_inst
- quiver.path.inhabited
An arrow viewed as a path of length one.
Equations
- e.to_path = quiver.path.nil.cons e
theorem
quiver.path.nil_ne_cons
{V : Type u}
[quiver V]
{a 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 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 b c 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 b c 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') :
p == p'
theorem
quiver.path.hom_heq_of_cons_eq_cons
{V : Type u}
[quiver V]
{a b c 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') :
e == e'
The length of a path is the number of arrows it uses.
@[protected, instance]
Equations
@[simp]
theorem
quiver.path.eq_of_length_zero
{V : Type u}
[quiver V]
{a b : V}
(p : quiver.path a b)
(hzero : p.length = 0) :
a = b
def
quiver.path.comp
{V : Type u}
[quiver V]
{a b c : V} :
quiver.path a b → quiver.path b c → quiver.path a c
Composition of paths.
@[simp]
theorem
quiver.path.comp_cons
{V : Type u}
[quiver V]
{a b c d : V}
(p : quiver.path a b)
(q : quiver.path b c)
(e : c ⟶ d) :
@[simp]
theorem
quiver.path.comp_nil
{V : Type u}
[quiver V]
{a 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 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 b c d : V}
(p : quiver.path a b)
(q : quiver.path b c)
(r : quiver.path c d) :
@[simp]
theorem
quiver.path.length_comp
{V : Type u}
[quiver V]
{a b : V}
(p : quiver.path a b)
{c : V}
(q : quiver.path b c) :
theorem
quiver.path.comp_injective_left
{V : Type u}
[quiver V]
{a b c : V}
(q : quiver.path b c) :
function.injective (λ (p : quiver.path a b), p.comp q)
theorem
quiver.path.comp_injective_right
{V : Type u}
[quiver V]
{a b c : V}
(p : quiver.path a b) :
@[simp]
theorem
quiver.path.comp_inj_left
{V : Type u}
[quiver V]
{a b c : V}
{p₁ p₂ : quiver.path a b}
{q : quiver.path b c} :
@[simp]
theorem
quiver.path.comp_inj_right
{V : Type u}
[quiver V]
{a b c : V}
{p : quiver.path a b}
{q₁ q₂ : quiver.path b c} :
@[simp]
theorem
quiver.path.to_list_comp
{V : Type u}
[quiver V]
{a b : V}
(p : quiver.path a b)
{c : V}
(q : quiver.path b c) :
quiver.path.to_list
is a contravariant functor. The inversion comes from quiver.path
and
list
having different preferred directions for adding elements.
theorem
quiver.path.to_list_chain_nonempty
{V : Type u}
[quiver V]
{a b : V}
(p : quiver.path a b) :
list.chain (λ (x y : V), nonempty (y ⟶ x)) b p.to_list
theorem
quiver.path.to_list_injective
{V : Type u}
[quiver V]
[∀ (a b : V), subsingleton (a ⟶ b)]
(a b : V) :
@[simp]
theorem
quiver.path.to_list_inj
{V : Type u}
[quiver V]
{a b : V}
[∀ (a b : V), subsingleton (a ⟶ b)]
{p q : quiver.path a b} :
def
prefunctor.map_path
{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.map_path (p.cons e) = (F.map_path p).cons (F.map e)
- F.map_path quiver.path.nil = quiver.path.nil
@[simp]
theorem
prefunctor.map_path_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) :