The areas / V24. Category theory
Mathlib.Combinatorics.Quiver.Path
64 declarations. Mathlib docs · Source
theorem Quiver.Path.cons.inj E1 #
∀ {V : Type u} {inst : Quiver V} {a b c : V} {a_1 : Quiver.Path a b} {a_2 : b ⟶ c} {b_1 : V} {a_3 : Quiver.Path a b_1}
{a_4 : b_1 ⟶ c}, a_1.cons a_2 = a_3.cons a_4 → b = b_1 ∧ a_1 ≍ a_3 ∧ a_2 ≍ a_4
theorem Quiver.Path.length.match_1.congr_eq_2 E1 #
∀ {V : Type u_2} [inst : Quiver V] {a : V} (motive : (x : V) → Quiver.Path a x → Sort u_3) (x : V)
(x_1 : Quiver.Path a x) (h_1 : Unit → motive a Quiver.Path.nil)
(h_2 : (x b : V) → (p : Quiver.Path a b) → (a_1 : b ⟶ x) → motive x (p.cons a_1)) (x_2 b : V) (p : Quiver.Path a b)
(a_1 : b ⟶ x_2),
x = x_2 →
x_1 ≍ p.cons a_1 →
(match x, x_1 with
| .(a), Quiver.Path.nil => h_1 ()
| x, p.cons a => h_2 x b p a) ≍
h_2 x_2 b p a_1
def Quiver.Path.ctorIdx E1 #
{V : Type u} → {inst : Quiver V} → {a a_1 : V} → Quiver.Path a a_1 → ℕ
abbrev Quiver.Path.ctorElimType E1 #
{V : Type u} →
[inst : Quiver V] →
{a : V} →
{motive : (a_1 : V) → Quiver.Path a a_1 → Sort u_1} →
ℕ → Sort (max 1 u_1 (imax (u + 1) (u + 1) (max (u + 1) (v + 1)) (v + 1) u_1))
theorem Quiver.Path.cons.injEq E0 #
∀ {V : Type u} [inst : Quiver V] {a b c : V} (a_1 : Quiver.Path a b) (a_2 : b ⟶ c) (b_1 : V) (a_3 : Quiver.Path a b_1)
(a_4 : b_1 ⟶ c), (a_1.cons a_2 = a_3.cons a_4) = (b = b_1 ∧ a_1 ≍ a_3 ∧ a_2 ≍ a_4)
abbrev Quiver.Path.brecOn.go E1 #
{V : Type u} →
[inst : Quiver V] →
{a : V} →
{motive : (a_1 : V) → Quiver.Path a a_1 → Sort u_1} →
{a_1 : V} →
(t : Quiver.Path a a_1) →
((a_2 : V) → (t : Quiver.Path a a_2) → Quiver.Path.below t → motive a_2 t) →
motive a_1 t ×' Quiver.Path.below t
theorem Quiver.Path.brecOn.eq E1 #
∀ {V : Type u} [inst : Quiver V] {a : V} {motive : (a_1 : V) → Quiver.Path a a_1 → Sort u_1} {a_1 : V}
(t : Quiver.Path a a_1) (F_1 : (a_2 : V) → (t : Quiver.Path a a_2) → Quiver.Path.below t → motive a_2 t),
Quiver.Path.brecOn t F_1 = F_1 a_1 t (Quiver.Path.brecOn.go t F_1).2
theorem Quiver.Path.length.match_1.congr_eq_1 E1 #
∀ {V : Type u_2} [inst : Quiver V] {a : V} (motive : (x : V) → Quiver.Path a x → Sort u_3) (x : V)
(x_1 : Quiver.Path a x) (h_1 : Unit → motive a Quiver.Path.nil)
(h_2 : (x b : V) → (p : Quiver.Path a b) → (a_1 : b ⟶ x) → motive x (p.cons a_1)),
x = a →
x_1 ≍ Quiver.Path.nil →
(match x, x_1 with
| .(a), Quiver.Path.nil => h_1 ()
| x, p.cons a => h_2 x b p a) ≍
h_1 ()
inductive Quiver.Path E1 #
{V : Type u} → [Quiver V] → V → V → Type (max u v)
Path a b is the type of paths from a to b through the arrows of G.
ctor Quiver.Path.nil E0 #
{V : Type u} → [inst : Quiver V] → {a : V} → Quiver.Path a a
ctor Quiver.Path.cons E0 #
{V : Type u} → [inst : Quiver V] → {a b c : V} → Quiver.Path a b → (b ⟶ c) → Quiver.Path a c
def Quiver.Hom.toPath E1 #
{V : Type u_1} → [inst : Quiver V] → {a b : V} → (a ⟶ b) → Quiver.Path a b
An arrow viewed as a path of length one.
theorem Quiver.Path.nil_ne_cons E1 #
∀ {V : Type u} [inst : 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 E1 #
∀ {V : Type u} [inst : 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 E1 #
∀ {V : Type u} [inst : Quiver V] {a b c d : V} {p : Quiver.Path a b} {p' : Quiver.Path a c} {e : b ⟶ d} {e' : c ⟶ d},
p.cons e = p'.cons e' → b = c
theorem Quiver.Path.heq_of_cons_eq_cons E1 #
∀ {V : Type u} [inst : Quiver V] {a b c d : V} {p : Quiver.Path a b} {p' : Quiver.Path a c} {e : b ⟶ d} {e' : c ⟶ d},
p.cons e = p'.cons e' → p ≍ p'
theorem Quiver.Path.hom_heq_of_cons_eq_cons E1 #
∀ {V : Type u} [inst : Quiver V] {a b c d : V} {p : Quiver.Path a b} {p' : Quiver.Path a c} {e : b ⟶ d} {e' : c ⟶ d},
p.cons e = p'.cons e' → e ≍ e'
def Quiver.Path.length E1 #
{V : Type u} → [inst : Quiver V] → {a b : V} → Quiver.Path a b → ℕ
The length of a path is the number of arrows it uses.
instance Quiver.Path.instInhabited E0 #
{V : Type u} → [inst : Quiver V] → {a : V} → Inhabited (Quiver.Path a a)
theorem Quiver.Path.length_nil E0 #
∀ {V : Type u} [inst : Quiver V] {a : V}, Quiver.Path.nil.length = 0
theorem Quiver.Path.length_cons E0 #
∀ {V : Type u} [inst : Quiver V] (a b c : V) (p : Quiver.Path a b) (e : b ⟶ c), (p.cons e).length = p.length + 1
theorem Quiver.Path.length_toPath E0 #
∀ {V : Type u} [inst : Quiver V] {a b : V} (e : a ⟶ b), e.toPath.length = 1
def Quiver.Path.comp E1 #
{V : Type u} → [inst : Quiver V] → {a b c : V} → Quiver.Path a b → Quiver.Path b c → Quiver.Path a c
Composition of paths.
theorem Quiver.Path.comp_cons E0 #
∀ {V : Type u} [inst : Quiver V] {a b c 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
theorem Quiver.Path.comp_nil E0 #
∀ {V : Type u} [inst : Quiver V] {a b : V} (p : Quiver.Path a b), p.comp Quiver.Path.nil = p
theorem Quiver.Path.nil_comp E0 #
∀ {V : Type u} [inst : Quiver V] {a b : V} (p : Quiver.Path a b), Quiver.Path.nil.comp p = p
theorem Quiver.Path.comp_assoc E0 #
∀ {V : Type u} [inst : Quiver V] {a b c 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)
theorem Quiver.Path.length_comp E0 #
∀ {V : Type u} [inst : Quiver V] {a b : V} (p : Quiver.Path a b) {c : V} (q : Quiver.Path b c),
(p.comp q).length = p.length + q.length
theorem Quiver.Path.comp_inj E1 #
∀ {V : Type u} [inst : Quiver V] {a b c : V} {p₁ p₂ : Quiver.Path a b} {q₁ q₂ : Quiver.Path b c},
q₁.length = q₂.length → (p₁.comp q₁ = p₂.comp q₂ ↔ p₁ = p₂ ∧ q₁ = q₂)
theorem Quiver.Path.comp_inj' E1 #
∀ {V : Type u} [inst : Quiver V] {a b c : V} {p₁ p₂ : Quiver.Path a b} {q₁ q₂ : Quiver.Path b c},
p₁.length = p₂.length → (p₁.comp q₁ = p₂.comp q₂ ↔ p₁ = p₂ ∧ q₁ = q₂)
theorem Quiver.Path.comp_injective_left E1 #
∀ {V : Type u} [inst : Quiver V] {a b c : V} (q : Quiver.Path b c), Function.Injective fun p ↦ p.comp q
theorem Quiver.Path.comp_injective_right E1 #
∀ {V : Type u} [inst : Quiver V] {a b c : V} (p : Quiver.Path a b), Function.Injective p.comp
theorem Quiver.Path.comp_inj_left E0 #
∀ {V : Type u} [inst : Quiver V] {a b c : V} {p₁ p₂ : Quiver.Path a b} {q : Quiver.Path b c},
p₁.comp q = p₂.comp q ↔ p₁ = p₂
theorem Quiver.Path.comp_inj_right E0 #
∀ {V : Type u} [inst : Quiver V] {a b c : V} {p : Quiver.Path a b} {q₁ q₂ : Quiver.Path b c},
p.comp q₁ = p.comp q₂ ↔ q₁ = q₂
theorem Quiver.Path.length_ne_zero_iff_eq_comp E1 #
∀ {V : Type u_1} [inst : Quiver V] {a b : V} (p : Quiver.Path a b),
p.length ≠ 0 ↔ ∃ c e p', p = e.toPath.comp p' ∧ p.length = p'.length + 1
theorem Quiver.Path.length_ne_zero_iff_eq_cons E1 #
∀ {V : Type u_1} [inst : Quiver V] {a b : V} (p : Quiver.Path a b), p.length ≠ 0 ↔ ∃ c p' e, p = p'.cons e
Every non-empty path can be decomposed as an initial path plus a final edge.
theorem Quiver.Path.comp_toPath_eq_cons E0 #
∀ {V : Type u_1} [inst : Quiver V] {a b c : V} (p : Quiver.Path a b) (e : b ⟶ c), p.comp e.toPath = p.cons e
def Quiver.Path.toList E1 #
{V : Type u} → [inst : Quiver V] → {a b : V} → Quiver.Path a b → List V
Turn a path into a list. The list contains a at its head, but not b a priori.
theorem Quiver.Path.toList_comp E0 #
∀ {V : Type u} [inst : Quiver V] {a b : V} (p : Quiver.Path a b) {c : V} (q : Quiver.Path b c),
(p.comp q).toList = q.toList ++ p.toList
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.isChain_toList_nonempty E1 #
∀ {V : Type u} [inst : Quiver V] {a b : V} (p : Quiver.Path a b), List.IsChain (fun x y ↦ Nonempty (y ⟶ x)) p.toList
theorem Quiver.Path.isChain_cons_toList_nonempty E1 #
∀ {V : Type u} [inst : Quiver V] {a b : V} (p : Quiver.Path a b),
List.IsChain (fun x y ↦ Nonempty (y ⟶ x)) (b :: p.toList)
theorem Quiver.Path.toList_injective E1 #
∀ {V : Type u} [inst : Quiver V] [∀ (a b : V), Subsingleton (a ⟶ b)] (a b : V), Function.Injective Quiver.Path.toList
theorem Quiver.Path.toList_inj E0 #
∀ {V : Type u} [inst : Quiver V] {a b : V} [∀ (a b : V), Subsingleton (a ⟶ b)] {p q : Quiver.Path a b},
p.toList = q.toList ↔ p = q
def Quiver.Path.BoundedPaths E1 #
{V : Type u_1} → [Quiver V] → V → V → ℕ → Type (max 0 u_1 u_2)
A bounded path is a path with a uniform bound on its length.
instance Quiver.Path.instSubsingletonBddPaths E0 #
∀ {V : Type u_1} [inst : Quiver V] (v w : V), Subsingleton (Quiver.Path.BoundedPaths v w 0)
Bounded paths of length zero between two vertices form a subsingleton.
def Quiver.Path.decidableEqBddPathsZero E1 #
{V : Type u_1} → [inst : Quiver V] → (v w : V) → DecidableEq (Quiver.Path.BoundedPaths v w 0)
Bounded paths of length zero between two vertices have decidable equality.
def Quiver.Path.decidableEqBddPathsOfDecidableEq E1 #
{V : Type u_1} →
[inst : Quiver V] →
(n : ℕ) →
DecidableEq V →
((v w : V) → DecidableEq (v ⟶ w)) →
((v w : V) → DecidableEq (Quiver.Path.BoundedPaths v w n)) →
(v w : V) → DecidableEq (Quiver.Path.BoundedPaths v w (n + 1))
Given decidable equality on paths of length up to n, we can construct
decidable equality on paths of length up to n + 1.
instance Quiver.Path.decidableEqBoundedPaths E0 #
{V : Type u_1} →
[inst : Quiver V] →
[DecidableEq V] →
[(v w : V) → DecidableEq (v ⟶ w)] → (n : ℕ) → (v w : V) → DecidableEq (Quiver.Path.BoundedPaths v w n)
Equality is decidable on all uniformly bounded paths given decidable equality on the vertices and the arrows.
instance Quiver.Path.instDecidableEq E0 #
{V : Type u_1} →
[inst : Quiver V] → [DecidableEq V] → [(v w : V) → DecidableEq (v ⟶ w)] → (v w : V) → DecidableEq (Quiver.Path v w)
Equality is decidable on paths in a quiver given decidable equality on the vertices and arrows.
def Quiver.Reachable E1 #
{V : Type u} → [Quiver V] → V → V → Prop
Reachable a b holds when there is a directed path from a to b.
This is a preorder rather than an equivalence, since quiver paths are directed (compare the
symmetric SimpleGraph.Reachable).
theorem Quiver.Reachable.elim E1 #
∀ {V : Type u} [inst : Quiver V] {a b : V} {p : Prop}, Quiver.Reachable a b → (∀ (a : Quiver.Path a b), p) → p
theorem Quiver.Reachable.refl E1 #
∀ {V : Type u} [inst : Quiver V] (a : V), Quiver.Reachable a a
theorem Quiver.Reachable.rfl E0 #
∀ {V : Type u} [inst : Quiver V] {a : V}, Quiver.Reachable a a
theorem Quiver.Reachable.trans E1 #
∀ {V : Type u} [inst : Quiver V] {a b c : V}, Quiver.Reachable a b → Quiver.Reachable b c → Quiver.Reachable a c
instance Quiver.instIsPreorderReachable E0 #
∀ {V : Type u} [inst : Quiver V], IsPreorder V Quiver.Reachable
theorem Quiver.Path.reachable E1 #
∀ {V : Type u} [inst : Quiver V] {a b : V} (p : Quiver.Path a b), Quiver.Reachable a b
A path witnesses that its target is reachable from its source.
theorem Quiver.Hom.reachable E1 #
∀ {V : Type u} [inst : Quiver V] {a b : V} (e : a ⟶ b), Quiver.Reachable a b
An arrow witnesses that its target is reachable from its source.
def Prefunctor.mapPath E1 #
{V : Type u₁} →
[inst : Quiver V] →
{W : Type u₂} → [inst_1 : 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.
theorem Prefunctor.mapPath_nil E0 #
∀ {V : Type u₁} [inst : Quiver V] {W : Type u₂} [inst_1 : Quiver W] (F : V ⥤q W) (a : V),
F.mapPath Quiver.Path.nil = Quiver.Path.nil
theorem Prefunctor.mapPath_cons E0 #
∀ {V : Type u₁} [inst : Quiver V] {W : Type u₂} [inst_1 : 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)
theorem Prefunctor.mapPath_comp E0 #
∀ {V : Type u₁} [inst : Quiver V] {W : Type u₂} [inst_1 : 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)
theorem Prefunctor.mapPath_toPath E0 #
∀ {V : Type u₁} [inst : Quiver V] {W : Type u₂} [inst_1 : Quiver W] (F : V ⥤q W) {a b : V} (f : a ⟶ b),
F.mapPath f.toPath = (F.map f).toPath
theorem Prefunctor.mapPath_id E0 #
∀ {V : Type u₁} [inst : Quiver V] {a b : V} (p : Quiver.Path a b), (𝟭q V).mapPath p = p
theorem Prefunctor.mapPath_comp_apply E0 #
∀ {V : Type u₁} [inst : Quiver V] {W : Type u₂} [inst_1 : Quiver W] (F : V ⥤q W) {U : Type u₃} [inst_2 : Quiver U]
(G : W ⥤q U) {a b : V} (p : Quiver.Path a b), (F ⋙q G).mapPath p = G.mapPath (F.mapPath p)