Documentation

Mathlib.Data.Vector.Zip

The zipWith operation on vectors. #

def Vector.zipWith {α : Type u_1} {β : Type u_2} {γ : Type u_3} {n : } (f : αβγ) :
Vector α nVector β nVector γ n

Apply the function f : α → β → γ to each corresponding pair of elements from two vectors.

Equations
Instances For
    @[simp]
    theorem Vector.zipWith_toList {α : Type u_1} {β : Type u_2} {γ : Type u_3} {n : } (f : αβγ) (x : Vector α n) (y : Vector β n) :
    @[simp]
    theorem Vector.zipWith_get {α : Type u_1} {β : Type u_2} {γ : Type u_3} {n : } (f : αβγ) (x : Vector α n) (y : Vector β n) (i : Fin n) :
    @[simp]
    theorem Vector.zipWith_tail {α : Type u_1} {β : Type u_2} {γ : Type u_3} {n : } (f : αβγ) (x : Vector α n) (y : Vector β n) :
    theorem Vector.sum_add_sum_eq_sum_zipWith {α : Type u_1} {n : } [AddCommMonoid α] (x : Vector α n) (y : Vector α n) :
    theorem Vector.prod_mul_prod_eq_prod_zipWith {α : Type u_1} {n : } [CommMonoid α] (x : Vector α n) (y : Vector α n) :