English
If p1.length = p2.length, then p1.comp q1 = p2.comp q2 iff p1 = p2 and q1 = q2.
Русский
Если длины p1 и p2 совпадают, то p1.comp q1 = p2.comp q2 эквивалентно p1 = p2 и q1 = q2.
LaTeX
$$$p_1.length = p_2.length \Rightarrow (p_1.comp\ q_1 = p_2.comp\ q_2) \;\Leftrightarrow\; (p_1 = p_2) \land (q_1 = q_2)$$$
Lean4
/-- The weight of a path, where the weight of an edge is defined by a function on its endpoints. -/
@[to_additive addWeightOfEPs /-- The additive weight of a path, where the weight of an edge is
defined by a function on its endpoints. -/
]
def weightOfEPs (w : V → V → R) : ∀ {i j : V}, Path i j → R :=
weight (fun {i j} (_ : i ⟶ j) => w i j)