3

Suppose $f:A\to Z$. In addition to this mapping, can I simultaneously define $f$ separately such that $f:B\to W$ where $A\cap B=\emptyset$ ? This polymorphism of function domains makes sense to me, but would this be accepted mathematically? So when I come to use $f$ later on, the function used depends entirely on the domain to which the argument belongs.

Mr. Chip
  • 5,009
pshmath0
  • 10,565
  • Mathematically those would be different, unrelated functions. But maybe you are asking about Piecewise functions. – dxiv Sep 19 '16 at 06:51
  • Being concrete: let $f: {1, 2} \to \mathbb{R}$ be the canonical inclusion. Can you give me an example of another definition of $f$ with a different domain? – Patrick Stevens Sep 19 '16 at 06:51
  • @dxiv But what about polynomials of matrices, are those unrelated to polynomials over $\mathbb{C}$? – Hetebrij Sep 19 '16 at 06:55
  • @Hetebrij Technically, yes. Functions with differrent domains are unrelated, unless a separate argument is made to relate them somehow. – dxiv Sep 19 '16 at 06:59

2 Answers2

3

You can define a function however you want, as long as for every input in the domain there is exactly one output. Depending on your audience and the situation, it might be confusing to re-use the function name $f$ in this way. Say $g: A \rightarrow Z$ and $h: B \rightarrow W$. Then you can define $f: A \cup B \rightarrow Z \cup W$ by $$f(x) = \begin{cases} \hfill g(x) \hfill & \text{ if $x \in A$} \\ \hfill h(x) \hfill & \text{ if $x \in B$.} \\ \end{cases} $$

Alternately, a function $f:X \rightarrow Y$ is defined to be a set of ordered pairs $f \subseteq X \times Y$ with the property that for each $x \in X$ there is a unique $y \in Y$ so $(x,y) \in f$. So viewed as sets, if there are functions $g: A \rightarrow Z$ and $h: B \rightarrow W$ then $g \cup h$ is a perfectly well-defined function from $A \cup B$ to $Z \cup W$ as long as $A \cap B = \emptyset$, or else $g(x) = h(x)$ for all $x \in A \cap B$.

I would not say, however, that the $f$ has 'multiple domains'. It just has one domain, which happens to be the union $A \cup B$.

Jair Taylor
  • 16,852
  • I think this is what I'm looking for. In my exposition I am constructing a function $f$ whose related but different and disjoint domains I introduce gradually, so I like the idea that I can glue the functions $f_i$ together at the end to form one function $f$. – pshmath0 Sep 19 '16 at 12:40
1

I think the construct you want is that of disjoint union, which connects a group of sets in a non-overlapping way.

If you have a function $f_1: A \to Z$ and a function $f_2: B \to W$, then they naturally induce a function $f: A \coprod B \to Z \coprod W$, where the $\coprod$ symbol denotes disjoint union of sets. Thus you have "glued" $f_1$ and $f_2$ to form a new function in the way you wanted.

This seems to capture your idea of allowing a function to have "multiple domains" (and codomains), though it technically is not the case: by definition a function can have only one domain and one codomain.

Mr. Chip
  • 5,009