3

I know that every function from the empty set to any other set is the empty function.

I also know that there is no function to the empty set from any other set.

Now, what if both the domain and codomain are empty? Would such a function exist?

2 Answers2

5

I know that every function from the empty set to any other set is the empty function.

I also know that there is no function to the empty set from any other set.

From your first statement follows that the function from the empty set to the empty set is the empty function. From your second statement follows the that there is not function from the empty set to the empty set. So I think at least owne of these statements you "know" is wrong.

A function $f$ from $A$ to $B$ is a subset of $A\times B$ such that

$$\forall x\in A \;\exists y \in B: (x,y)\in f\tag 1$$ and further $$\forall x\in A \; \forall y \in B\;\forall z \in B: (x,y)\in f \land (x,z) \in f \implies y=z \tag 2$$

The product $A\times B =\{(x,y)\mid x\in A \land y\in B\}$ is empty if $A$ or $B$ is empty. So $\emptyset \times \emptyset=\emptyset$ and the only subset of $\emptyset$ is $\emptyset$. And so the only possible candidate for a function $f:A\mapsto B$ is $\emptyset$. Becuase $(1)$ and $(2)$ is true for $\emptyset$ the set $\emptyset$ is a function from $\emptyset \mapsto \emptyset$ and is is the only one.

miracle173
  • 11,359
4

Two key things to know about the empty set are: Every statement that says

$$\forall x \in \emptyset $$

is (vacuously) true, and every statement that says

$$\exists x \in \emptyset $$

is (trivially) false.

So if you express the conditions for "$f$ is a function from $A$ to $B$" in the formal language of $\forall$ and $\exists$ you can answer your question.

(I think I also need to add that you "work from the outside in", i.e.

$$ \forall x \in \emptyset \;\;\exists y \in \emptyset \;\;\;P(x,y)$$

is true, no matter what statement $P(x,y)$ is.)

JonathanZ
  • 12,727
  • From wikipedia on vacuous truth: "One example of such a statement is "if London is in France, then the Eiffel Tower is in Bolivia". Such statements are considered vacuous truths, because the fact that the antecedent is false prevents using the statement to infer anything about the truth value of the consequent." So the answer is that it is vacuously true (because vacuous truth says "If X (which is true) is False then everything is True").. Am I correct? – Adam Rubinson Dec 09 '20 at 17:48
  • @JonathanZsupportsMonicaC I tried doing this. Since the formal statement for "f is a function from phi to phi" starts with "for all x in phi: ..." The statement is vacuously true. Am I correct? – Sameed_Naama Dec 09 '20 at 17:54
  • 1
    Sameed- Yes, that condition is true. But do note that there is more than one requirement for a something to be a function. @miracle173's excellent answer gives you all the details. – JonathanZ Dec 09 '20 at 21:53