[Math] Correct notation for functions with multiple inputs

functionsnotation

This question is related to What is the correct notation for a multivariable function?

Consider a function $f(x, y)$ with codomain $C$, such that both $x$ and $y$ belong to ${D}_{1}$. In this case we can denote $f: {D}_{1}^{2} \rightarrow C$. Now, if $x$ belongs to ${D}_{1}$ and $y$ belongs to ${D}_{2}$, we no longer can define the function that way, because the domain is actually a set of heterogeneous tuples. In functional programming languages, such as Haskell, one can define such a function as either $f: ({D}_{1}, {D}_{2}) \rightarrow C$ or a curried function $f: {D}_{1} \rightarrow {D}_{2} \rightarrow C$. At the same time in mathematical notation a function is usually depicted as a mapping between two sets, which raises concern over the acceptability of Haskell'ish notation in mathematical texts?

Best Answer

Formally, $f:A \times B \to C$ is a function with two "inputs" from the sets $A$ and $B$ respectively, where the cartesian product $A \times B$ is the set of all pairs: $A \times B = \{ (x,y) \mid x \in A \text { and } y \in B \}$.

This is not in contrast with "currying": we can think at $f$ as a single-input function $f$ from $A$ to the collection of fucntions from $B$ to $C$. In this way, the output of $f$ for input $a \in A$ will be $f(a)=f_a$, i.e. a new single-input function: $f_a : B \to C$.

Related Question