Question on the “empty function”

functions

Let's say that I have a function $f: A \to B$. I'd define a function, rigorously, as a set
$$
\{(x, f(x)) \mid \forall x \in A, \; \exists ! b \in B \; s.t. b = f(x)\}.
$$

If $A = \emptyset$, then $f \subset \emptyset \times A$, but $\emptyset \times A = \emptyset$, so that implies that $f = \emptyset$. That is, $f$ is the "empty function."

My question is: if I change $B$, is this the same "empty function"? I could have $B_1 = \emptyset$, $B_2 = \mathbb{R}$, $B_3 = \{1,2,3\}$, and so forth, and define $f_1: A \to B_1$, $f_2: A \to B_2$, and $f_3: A \to B_3$. Each of these produce the empty set and the empty function, but are they technically different functions since I defined the codomain differently? Is this a case where I would say for all $x \in A$,
$$
f_1 (x) = f_2 (x) = f_3 (x),
$$

i.e., the rules align, vacuously, but $f_1 \neq f_2 \neq f_3$?

Best Answer

The answer depends on whether your formalism defines a relation from $A$ to $B$ as

  • a subset $S$ of $A\times B$, or
  • an ordered triple $(A,B,S)$ where $S$ is a subset of $A\times B$.

(A function is a relation with an additional property, but that turns out to be irrelevant to this answer.) In the second case, changing the codomain obviously results in a different function. However, in the first case, there is legitimate ambiguity: the codomain can be changed any supserset of $B$, and indeed to any superset of the set-of-second-coordinates of $S$, without changing the function. This last statement implies, as a special case, that if $A=\emptyset$ then the function is the same function regardless of the choice of $B$.

Related Question