English
Let f: α → β. The map on vectors applies f to every coordinate, leaving the length unchanged: map f (⟨l, h⟩) = ⟨List.map f l, by proof of length⟩.
Русский
Пусть f: α → β. Отображение на векторах применяет f ко всем координатам, не меняя длину: map f (⟨l, h⟩) = ⟨List.map f l, доказательство сохранения длины⟩.
LaTeX
$$$\\forall f:\\alpha\\to\\beta,\\ \\forall v=\\langle l,h\\rangle,\\ map(f)(v)=\\langle\\text{List.map } f\\, l,\\ \\text{proof that }\\text{length}({\\text{List.map } f\\, l})=\\text{length }l\\rangle$$$
Lean4
/-- Map a vector under a function. -/
def map (f : α → β) : Vector α n → Vector β n
| ⟨l, h⟩ => ⟨List.map f l, by simp [*]⟩