English
dotProductᵣ is the dot product on Fin-indexed functions, i.e., it is the Fin-vector dot product with the FinVec encoding.
Русский
dotProductᵣ есть скалярное произведение по индексациям Fin, т.е. скалярное произведение вектора FinVec.
LaTeX
$$$\\text{dotProduct}ᵣ = \\text{FinVec}.sum(\\text{FinVec}.seq(\\cdot \\cdot, \\cdot))$$$
Lean4
/-- `dotProduct` with better defeq for `Fin` -/
def dotProductᵣ [Mul α] [Add α] [Zero α] {m} (a b : Fin m → α) : α :=
FinVec.sum <| FinVec.seq (FinVec.map (· * ·) a) b