# How can I represent the (haskell, python etc.) zip function in math notation?

It is similar to cartesian product of sets $$\{a,b\} \times \{c,d\} = \{(a,c), (a,d), (b,c), (b,d)\}$$, but applied to (ordered) tuples and without the permutations that don't match, i.e. $$\langle a,b\rangle zip \langle c,d\rangle = \langle(a,c), (b,d)\rangle$$.

• If $(c, d)=(a, b)$ this is called the diagonal of $(a, b)\times (a, b)$ and is often denoted by $\Delta$ or $\Delta_{(a, b)}$ (or similar things involving $\Delta$). If you specify what you mean by "$\mathrm{zip}$", you can use $(a, b)\,\mathrm{zip}\,(c, d)$, too. It's a perfectly fine piece of notation. Aug 28, 2019 at 22:05

Given two families $$(a_i\in A\mid i\in I)$$ and $$(b_i\in B\mid i\in I)$$ with the same index set, the zip is a family $$\left ((a_i,b_i)\in A\times B \mid i\in I\right)$$
A $$n$$-tuple is a function with $$n$$ (a canonical set of $$n$$ elements, typically $$\{0,1,\ldots,n-1\}$$) as its domain.
So if we have two $$n$$-tuples $$f,g$$, we can take the so-called diagonal product $$f \nabla g$$ defined on $$n$$ by $$(f \nabla g)(n) = (f(n), g(n))$$. This comes close to your zip function. If we have different domains $$n$$ and $$m$$ we can only define it on $$\min(n,m)$$ etc.