Lemmas about Array.zip, Array.zipWith, Array.zipWithAll, and Array.unzip. #
Zippers #
zipWith #
theorem Array.getElem?_zipWith {α : Type u_1} {β : Type u_2} {γ : Type u_3} {as : Array α} {bs : Array β} {f : α → β → γ} {i : Nat} :
See also getElem?_zipWith' for a variant
using Option.map and Option.bind rather than a match.
theorem Array.getElem?_zipWith' {α : Type u_1} {β : Type u_2} {γ : Type u_3} {l₁ : Array α} {l₂ : Array β} {f : α → β → γ} {i : Nat} :
Variant of getElem?_zipWith using Option.map and Option.bind rather than a match.
zip #
zipWithAll #
theorem Array.zipWithAll_map {γ : Type u_1} {δ : Type u_2} {α : Type u_1} {β : Type u_2} {μ : Type u_3} {f : Option γ → Option δ → μ} {g : α → γ} {h : β → δ} {as : Array α} {bs : Array β} :
zipWithAll f (map g as) (map h bs) = zipWithAll (fun (a : Option α) (b : Option β) => f (g <$> a) (h <$> b)) as bs