Consider the functions $\text{add}:\mathbb{A}\to \mathbb{Z}$, such that $\mathbb{A}$ is a finite subset of $\mathbb{Z}$, and $f: \mathbb{Z} \times \mathbb{Z} \to \mathbb{Z}$
$$\text{add}(\{a,b,c,d,\ldots, n\}) = a+b+c+d+\ldots+n$$ $$f(m,n)=2m-n$$
Are those functions surjective? If so, how would you prove that? It is an exercise on algorithms for AI.
Thank you very much. I suspect that they are but I do not occur a formal proof to that. I need your help.