The areas / V24. Category theory
Mathlib.Combinatorics.Quiver.Path.Weight
22 declarations. Mathlib docs · Source
theorem Quiver.Path.weight.match_1.congr_eq_2 E1 #
∀ {V : Type u_2} [inst : Quiver V] (motive : (x x_1 : V) → Quiver.Path x x_1 → Sort u_3) (x x_1 : V)
(x_2 : Quiver.Path x x_1) (h_1 : (a : V) → motive a a Quiver.Path.nil)
(h_2 : (a x b : V) → (p : Quiver.Path a b) → (e : b ⟶ x) → motive a x (p.cons e)) (a x_3 b : V) (p : Quiver.Path a b)
(e : b ⟶ x_3),
x = a →
x_1 = x_3 →
x_2 ≍ p.cons e →
(match x, x_1, x_2 with
| a, .(a), Quiver.Path.nil => h_1 a
| a, x, p.cons e => h_2 a x b p e) ≍
h_2 a x_3 b p e
theorem Quiver.Path.weight.match_1.congr_eq_1 E1 #
∀ {V : Type u_2} [inst : Quiver V] (motive : (x x_1 : V) → Quiver.Path x x_1 → Sort u_3) (x x_1 : V)
(x_2 : Quiver.Path x x_1) (h_1 : (a : V) → motive a a Quiver.Path.nil)
(h_2 : (a x b : V) → (p : Quiver.Path a b) → (e : b ⟶ x) → motive a x (p.cons e)) (a : V),
x = a →
x_1 = a →
x_2 ≍ Quiver.Path.nil →
(match x, x_1, x_2 with
| a, .(a), Quiver.Path.nil => h_1 a
| a, x, p.cons e => h_2 a x b p e) ≍
h_1 a
def Quiver.Path.weight E1 #
{V : Type u_1} →
[inst : Quiver V] → {R : Type u_2} → [Monoid R] → ({i j : V} → (i ⟶ j) → R) → {i j : V} → Quiver.Path i j → R
The weight of a path is the product of the weights of its edges.
def Quiver.Path.addWeight E1 #
{V : Type u_1} →
[inst : Quiver V] → {R : Type u_3} → [AddMonoid R] → ({i j : V} → (i ⟶ j) → R) → {i j : V} → Quiver.Path i j → R
The additive weight of a path is the sum of the weights of its edges.
def Quiver.Path.weightOfEPs E1 #
{V : Type u_1} → [inst : Quiver V] → {R : Type u_2} → [Monoid R] → (V → V → R) → {i j : V} → Quiver.Path i j → R
The weight of a path, where the weight of an edge is defined by a function on its endpoints.
def Quiver.Path.addWeightOfEPs E1 #
{V : Type u_1} → [inst : Quiver V] → {R : Type u_2} → [AddMonoid R] → (V → V → R) → {i j : V} → Quiver.Path i j → R
The additive weight of a path, where the weight of an edge is defined by a function on its endpoints.
theorem Quiver.Path.addWeight_nil E0 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : AddMonoid R] (w : {i j : V} → (i ⟶ j) → R) (a : V),
Quiver.Path.addWeight (fun {i j} ↦ w) Quiver.Path.nil = 0
theorem Quiver.Path.weight_nil E0 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : Monoid R] (w : {i j : V} → (i ⟶ j) → R) (a : V),
Quiver.Path.weight (fun {i j} ↦ w) Quiver.Path.nil = 1
theorem Quiver.Path.addWeight_cons E0 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : AddMonoid R] (w : {i j : V} → (i ⟶ j) → R) {a b c : V}
(p : Quiver.Path a b) (e : b ⟶ c),
Quiver.Path.addWeight (fun {i j} ↦ w) (p.cons e) = Quiver.Path.addWeight (fun {i j} ↦ w) p + w e
theorem Quiver.Path.weight_cons E0 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : Monoid R] (w : {i j : V} → (i ⟶ j) → R) {a b c : V}
(p : Quiver.Path a b) (e : b ⟶ c),
Quiver.Path.weight (fun {i j} ↦ w) (p.cons e) = Quiver.Path.weight (fun {i j} ↦ w) p * w e
theorem Quiver.Path.addWeightOfEPs_nil E1 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : AddMonoid R] (w : V → V → R) (a : V),
Quiver.Path.addWeightOfEPs w Quiver.Path.nil = 0
theorem Quiver.Path.weightOfEPs_nil E1 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : Monoid R] (w : V → V → R) (a : V),
Quiver.Path.weightOfEPs w Quiver.Path.nil = 1
theorem Quiver.Path.weightOfEPs_cons E1 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : Monoid R] (w : V → V → R) {a b c : V} (p : Quiver.Path a b)
(e : b ⟶ c), Quiver.Path.weightOfEPs w (p.cons e) = Quiver.Path.weightOfEPs w p * w b c
theorem Quiver.Path.addWeightOfEPs_cons E1 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : AddMonoid R] (w : V → V → R) {a b c : V}
(p : Quiver.Path a b) (e : b ⟶ c), Quiver.Path.addWeightOfEPs w (p.cons e) = Quiver.Path.addWeightOfEPs w p + w b c
theorem Quiver.Path.weight_comp E0 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : Monoid R] (w : {i j : V} → (i ⟶ j) → R) {a b c : V}
(p : Quiver.Path a b) (q : Quiver.Path b c),
Quiver.Path.weight (fun {i j} ↦ w) (p.comp q) =
Quiver.Path.weight (fun {i j} ↦ w) p * Quiver.Path.weight (fun {i j} ↦ w) q
theorem Quiver.Path.addWeight_comp E0 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : AddMonoid R] (w : {i j : V} → (i ⟶ j) → R) {a b c : V}
(p : Quiver.Path a b) (q : Quiver.Path b c),
Quiver.Path.addWeight (fun {i j} ↦ w) (p.comp q) =
Quiver.Path.addWeight (fun {i j} ↦ w) p + Quiver.Path.addWeight (fun {i j} ↦ w) q
theorem Quiver.Path.addWeightOfEPs_comp E1 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : AddMonoid R] (w : V → V → R) {a b c : V}
(p : Quiver.Path a b) (q : Quiver.Path b c),
Quiver.Path.addWeightOfEPs w (p.comp q) = Quiver.Path.addWeightOfEPs w p + Quiver.Path.addWeightOfEPs w q
theorem Quiver.Path.weightOfEPs_comp E1 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : Monoid R] (w : V → V → R) {a b c : V} (p : Quiver.Path a b)
(q : Quiver.Path b c),
Quiver.Path.weightOfEPs w (p.comp q) = Quiver.Path.weightOfEPs w p * Quiver.Path.weightOfEPs w q
theorem Quiver.Path.weight_pos E1 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : Semiring R] [inst_2 : LinearOrder R] [IsStrictOrderedRing R]
{w : {i j : V} → (i ⟶ j) → R},
(∀ {i j : V} (e : i ⟶ j), 0 < w e) → ∀ {i j : V} (p : Quiver.Path i j), 0 < Quiver.Path.weight (fun {i j} ↦ w) p
If all edge weights are positive, then the weight of any path is positive.
theorem Quiver.Path.weight_nonneg E1 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : Semiring R] [inst_2 : LinearOrder R] [IsStrictOrderedRing R]
{w : {i j : V} → (i ⟶ j) → R},
(∀ {i j : V} (e : i ⟶ j), 0 ≤ w e) → ∀ {i j : V} (p : Quiver.Path i j), 0 ≤ Quiver.Path.weight (fun {i j} ↦ w) p
If all edge weights are non-negative, then the weight of any path is non-negative.
theorem Quiver.Path.weightOfEPs_pos E1 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : Semiring R] [inst_2 : LinearOrder R] [IsStrictOrderedRing R]
{w : V → V → R}, (∀ (i j : V), 0 < w i j) → ∀ {i j : V} (p : Quiver.Path i j), 0 < Quiver.Path.weightOfEPs w p
If all edge weights (given by a function on vertices) are positive, so is the path weight.
theorem Quiver.Path.weightOfEPs_nonneg E1 #
∀ {V : Type u_1} [inst : Quiver V] {R : Type u_2} [inst_1 : Semiring R] [inst_2 : LinearOrder R] [IsStrictOrderedRing R]
{w : V → V → R}, (∀ (i j : V), 0 ≤ w i j) → ∀ {i j : V} (p : Quiver.Path i j), 0 ≤ Quiver.Path.weightOfEPs w p
If all edge weights (given by a function on vertices) are non-negative, so is the path weight.