54

Let $A$ to be a nonempty set and $B= \emptyset$; then $ A \times B$ is a set. And let $F$ be a function $A \to B$. Then $F \subseteq A \times B$. By the axiom of specification, $F$ must exists (if I didn't mess up something).

But the book I'm reading, Elements of Set Theory by Enderton, says that no function could have a nonempty domain and an empty range, and no more detail is given.

So my confusion arises. His statement against my proof. The only axiom as far as I know to prove such a set does not exist is the axiom of regularity. But I can't give such a proof. So I need help. I hope someone could clearly explain why such a function doesn't exist, and why this doesn't contradict the axiom of specification.


Let me explain my confusion in more detail:

First of all, I know that $A \times \emptyset$ is empty. But $ \emptyset \times A$ is also an empty set, yet there is no problem with functions with an empty domain.

The book I'm reading defines a function as:

"A function is a relation such that for each $x$ in $\operatorname{dom} F$ there is only one $y$ such that $x \mathop F y$."

and a relation as:

"A relation is a set of ordered pairs."

Now, let me define the function $F$ as: $$F = \{\langle x,y \rangle \mid x \in A \text{ and } y \in B \text{ and ... other conditions} \}$$ so it's equal to: $$F = \{ \langle x,y \rangle \in A \times B \mid \text{... other conditions} \}.$$

Doesn't that mean that $F$ meets the conditions of the axiom of specification, and therefore exists?


What I would specifically like to ask is:

  1. How do you define a function $F$ (as precisely as possible)?

  2. Why does the argument above not imply that a function $F: A \to B$ always exists?

  3. Does $F \subseteq A \times B$ still hold when $B = \emptyset$?

(The answer to #2 cannot simply be that $A \times B = \emptyset$, because $ B \times A = \emptyset$ as well, but a function $B \to A$ does exist.)

  • 3
    How precisely are you using the axiom of specification? The set $\mathcal C$ of functions from $A$ to $B$ certainly exists, and specification may be used to verify this. But the existence of $\mathcal C$ does not imply the existence of any functions $F:A\to B$. In fact, $\mathcal C=\emptyset$. – Andrés E. Caicedo May 10 '14 at 14:31
  • 1
    For every $a \in A$, there must exist a unique $b \in B$ so that $(a, b) \in F$. Can you see the problem with this restriction if $A$ is nonempty and $B$ is empty? – Dustan Levenstein May 10 '14 at 14:31
  • @AndresCaicedo The book define A function is a relation $F$ such that for each $x$ in dom $F$ there is only one y such that $xFy$. – Detective King May 10 '14 at 14:31
  • What is your definition of a function $F:A\to B$? A subset $F$ of $A\times B$ such that for any $a$ in $A$, there exists a unique $b$ in $B$ such that $(a,b)\in F$ (so $dom(F)=A$ by definition)? Or a subset $F$ of $A\times B$ such that for any $a$ in $A$, there exists at most one $b$ in $B$ such that $(a,b)\in F$ (so that $dom(F)$ may be different from $A$)?

    In the first case, the answer is clear. In the second, it seems to be an arbitrary choice to impose $dom(F)\neq\emptyset$.

    – Taladris May 10 '14 at 14:34
  • @DetectiveKing Is that comment supposed to be precisely how you used the axiom of specification? – Andrés E. Caicedo May 10 '14 at 14:35
  • @DetectiveKing - the problem is with the definition of relation; a relation $R \subseteq A \times B$ is a set of couples (a,b) such that $a \in A$ and $b \in B$. If $B=∅$, we have no $b$ ... – Mauro ALLEGRANZA May 10 '14 at 14:44
  • @AndresCaicedo I can see existence of $C$ does not imply the existence of any fucntions $F$ .But my proof is using $F$ as a subset of $A \times B$. – Detective King May 10 '14 at 14:50
  • 1
    @DetectiveKing Stop being vague and write down your proof. How is anybody going to help you if you keep your proof hidden. – Andrés E. Caicedo May 10 '14 at 14:52
  • @AndresCaicedo I've updated my post.I've tried my best to explain my issues. – Detective King May 10 '14 at 15:25
  • 1
    Your definition of $S$ makes no sense. Your definition of $F$ makes no sense either. Perhaps you meant $S={\langle x,y\rangle \mid x\in A,y\in B}$? Then $S$ is just $A\times B$, which in this case is indeed $\emptyset$. Saying $S={\langle x,y\rangle \mid \exists x\in A\dots}$ makes no sense. The $x$ on the left of the $\mid$ won't be the same as the one on the right, which is now quantified. You then "proceed" to write what $F$ is, but you don't. You wrote some ellipses, and have the incorrect $\exists x\in A$ and $\exists y\in B$ there as well. It is still not precise enough. – Andrés E. Caicedo May 10 '14 at 15:35
  • @AndresCaicedo yes.$S = A \times B$.I just give the demo about how I define a relation which I'm going to use to define a function $F$. I refer to the Wiki.And it doesn't give definition in formal language.I have an incorrect writing,but the main idea is here.Maybe an other way to ask the question: How do you define a function $F$? And why $F$ doesn't exists from your definition?Does $F \subseteq A \times B$ still hold? I don't mean to shift responsability but maybe the way I ask is more clear.Make it an answer if u don't mind. – Detective King May 10 '14 at 16:44
  • 1
    @DetectiveKing: I just edited your question to clarify it and eliminate some repetition. Feel free to fix anything that doesn't match what you intended to ask (and to simplify the question further, if there's anything unnecessary left). (Ps. For future reference, when improving your question based on comments, it's generally considered better style to edit your question "in place" to clarify it than to just append further questions at the end.) – Ilmari Karonen May 10 '14 at 21:40

7 Answers7

116

The standard set-theoretic way to define functions is that:

  1. The cartesian product of the sets $A$ and $B$, written as $A \times B$, is the set of all ordered pairs where the first element of the pair is in $A$ and the second in $B$: $$A \times B = \{(a,b): a \in A, b \in B\}.$$

    (Representing these ordered pairs as sets, and showing that the cartesian product of two sets is indeed a set under the axioms of set theory, are details that we may safely skip here.)

  2. A relation $R$ between the sets $A$ and $B$ is any subset of their cartesian product: $R \subset A \times B$.

    (Often, by convention, we write $a \mathop R b$ as a shorthand for $(a,b) \in R$; this is particularly common when the symbol chosen for the relation is not a letter like $R$, but something abstract like $\sim$ or $\odot$.)

  3. A function $f$ from $A$ to $B$ is a relation between $A$ and $B$ (i.e. a subset of their cartesian product) satisfying the following two extra conditions:

    • existence of images: for all $a \in A$, there is a $b \in B$ such that $(a,b) \in f$.

    • uniqueness of images: if $(a,b) \in f$ and $(a,b') \in f$, then $b = b'$.

    If the relation $f$ is a function, then, for each $a \in A$, there exists exactly one $b \in B$ satisfying $(a,b) \in f$. We call this $b$ the image of $a$ under $f$, written $f(a)$, so that: $$f(a) = b \iff (a,b) \in f.$$


So, what about when $B = \varnothing$? In that case, for any $A$, the cartesian product $A \times B = \varnothing$, since there exist no pairs $(a,b)$ such that $a \in A$ and $b \in B$. (The same, of course, is also true whenever $A = \varnothing$.)

Since the only subset of $\varnothing$ is $\varnothing$, the only relation between $A$ and $B$ is the empty relation $\varnothing$. The question, then, is: is the empty relation a function from $A$ to $B$?

  • If $A \ne \varnothing$, no, it is not, because there exists at least one $a \in A$, but there can be no $b$ such that $(a,b) \in \varnothing$.

  • If $A = \varnothing$, yes, it is. In this case, both the existence and uniqueness conditions are vacuously true, since there is no $a \in A$ for which they could fail.

Thus, there is a (single) function from the empty set to any set (including the empty set itself), but there is no function from a non-empty set to the empty set.

  • Thanks for the answer.It's comprehensive and helpful.I'll give you a bounty as long as I can. – Detective King May 10 '14 at 19:17
  • 3
    Nice answer. I was reading some book into homological algebra, and I found this answer useful to me. Thanks. –  Jun 15 '17 at 17:11
  • So the empty set behaves like the number zero, in a cartesian product. The cartesian product of any set (empty or nonempty) and the empty set is empty. – john Aug 17 '24 at 16:41
10

You messed up because $A\times\varnothing$ is the empty set. So only if $A$ is empty as well such function exists.

Asaf Karagila
  • 405,794
  • Hi,in my opnion it's not about whether $A \times B$ is empty or not.Thing comes difference when $B \times A = \varnothing$ .I've updated my post give more explain about the issue.Hope you could have a look. – Detective King May 10 '14 at 17:06
  • 2
    Detective King, $F\colon A\to B$ means that (1) $F$ is a function (a set of ordered pairs with a particular property); (2) the domain of $F$ is all of $A$. So if $F\subseteq\varnothing$ it is necessarily the case that the domain of $F$ is empty, so if $A$ is not empty, $F$ is not a function whose domain is $A$ itself; but if $A$ is empty (regardless to what $B$ is), then it is a function whose domain is $A$. So $\varnothing\subseteq\varnothing\times A$ is a function from $\varnothing$ to $A$; but $\varnothing\subseteq A\times\varnothing$ need not be a function from $A$ to $\varnothing$. – Asaf Karagila May 10 '14 at 17:10
  • @AsafKragila I think I get some idea in your comment.So if let $F$ to be a set with some property to describe a function about the set with condition given in the post.The set is exist and it's empty.But the set $F$ doesn't fit the property in the set $B^A$, is that right? – Detective King May 10 '14 at 17:30
  • After a careful re-reading of your question, it seems that you want to argue that by the axiom of specification $B^A$ exists, but you don't understand why it's not empty. But you wrote $F$ for both that set and its elements. Yes, specification implies that $B^A$ exists, but we can prove that no $F\subseteq A\times B$ satisfies the conditions required to be a member $B^A$, therefore that set is empty. – Asaf Karagila May 10 '14 at 17:33
  • @AsafKaragila No, that's not really what the attempt is. There is really not much of an attempt, of course, but the belief is that any function from any set to any other set can be defined by specification, simply saying that $F={(x,y)\mid\exists x\in A\exists y\in B\forall x\in A\exists!y\in B}$, which of course is utterly meaningless. – Andrés E. Caicedo May 10 '14 at 17:40
  • 1
    @AsafKragila Thanks for the explaination.I think I know what's going on here.And I'm quite shocked is that thing described its property in its own body can't describe its existence . – Detective King May 10 '14 at 17:55
  • @AndresCaicedo Maybe I know what's the problem now if I don't get thing wrong .It's like writing $1/0$ when dealing with real number.Well the book I'm reading it doesn't give stress on the issues after it gives definition about a function,maybe it suppose reader will deal the issue himself,but I couldn't.Still thanks for the comment. – Detective King May 10 '14 at 18:21
7

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

  1. for every $a\in A$, there exists $b\in B$ such that $(a,b)\in f$;

  2. for every $b,b'\in B$, if there exists $a\in A$ with $(a,b)\in f$ and $(a,b')\in f$, then $b=b'$.

The first condition expresses the fact that every element in $A$ has an image in $B$. The second condition expresses the fact that such image is uniquely determined by the element in the domain. Thus, if $a\in A$, we can write $f(a)$ to denote the unique element in $B$ such that $(a,f(a))\in f$.

Now, if $B=\emptyset$, we have $f\subset A\times\emptyset=\emptyset$, so $f$ is empty. Thus every element of $A$ fails to have an image in $B$ under $f$, and so a function $f\colon A\to\emptyset$ can exist only when also $A$ is empty.

On the contrary, if $A=\emptyset$, condition 1 cannot fail for any element of $\emptyset$, which has no elements; also condition 2 cannot fail, so there is indeed a function $f\colon \emptyset\to B$. It's unique, because $f\subseteq \emptyset\times B=\emptyset$, so $f=\emptyset$.

egreg
  • 244,946
4

I think you are overcomplicating things. Let $A$ be a non-empty set and let $f:A \rightarrow \emptyset$ be a function.

Now take $x \in A$, you get $f(x) \in \emptyset$, which just can't be.

But there is no such problem if the domain is empty

David
  • 3,144
3

Given sets $A$ and $B$, a function from $A$ to $B$ is a subset $f\subseteq A\times B$ such that $$\forall a\in A\ \exists ! b\in B\ ((a,b)\in f).$$

Thus, if $A\neq\emptyset$ and $B=\emptyset$, no function $f$ exists, since, given any $a\in A$ you can not find any $b\in B$ with $(a,b)\in A\times B$, as $A\times B$ is empty.

2

$ \newcommand{\calc}{\begin{align} \quad &} \newcommand{\calcop}[2]{\notag \\ #1 \quad & \quad \text{"#2"} \notag \\ \quad & } \newcommand{\endcalc}{\notag \end{align}} $In essence, Enderton is saying that $$ \tag{0} F\text{ is a function} \;\land\; \text{dom }F \not= \emptyset \;\land\; \text{ran }F = \emptyset $$ is false. And from what I read in the question, and from snippets on the interwebs (e.g., http://tedsider.org/teaching/st/st_notes.pdf, archive.org link), his definitions for domain and range are \begin{align} \text{dom }F & \;=\; \{x \mid \langle \exists y :: xFy \rangle \} \\ \text{ran }F & \;=\; \{y \mid \langle \exists x :: xFy \rangle \} \\ \end{align}

Now, what does it mean that $\;\text{dom }F \not= \emptyset\;$?

$$\calc \text{dom }F \not= \emptyset \calcop{\equiv}{basic property of $\;\emptyset\;$} \langle \exists x :: x \in \text{dom }F \rangle \calcop{\equiv}{the above definition of $\;\text{dom}\;$} \langle \exists x :: \langle \exists y :: xFy \rangle \rangle \endcalc$$

Similarly,

$$\calc \text{ran }F = \emptyset \calcop{\equiv}{basic property of $\;\emptyset\;$} \lnot\langle \exists y :: y \in \text{ran }F \rangle \calcop{\equiv}{the above definition of $\;\text{ran}\;$} \lnot\langle \exists y :: \langle \exists x :: xFy \rangle \rangle \rangle \endcalc$$

Therefore we have a contradiction:

$$\calc \text{dom }F \not= \emptyset \;\land\; \text{ran }F = \emptyset \calcop{\equiv}{the above calculations} \langle \exists x, y :: xFy \rangle \;\land\; \lnot \langle \exists x, y :: xFy \rangle \calcop{\equiv}{logic: contradiction} \text{false} \endcalc$$

and it directly follows that $(0)$ is false, regardless of the definition of 'function'.

So (using Enderton's definitions) there is not even a relation $\;F\;$ with a non-empty domain and an empty range, and therefore (since every function is a relation) there is also no function with a non-empty domain and an empty range.

Note how no fixed sets $\;A\;$ or $\;B\;$ have been mentioned so far.

Enderton then abbreviates $$ F : A \to B \;\equiv\; F\text{ is a function} \;\land\; \text{dom }F = A \;\land\; \text{ran }F \subseteq B $$ Note how this definition is asymmetrical w.r.t. domain and range: $\;F : A \to \emptyset\;$ is false for non-empty $\;A\;$ (as we've just proved above), but $\;F : \emptyset \to B\;$ is true iff $\;F = \emptyset\;$ (since $\;\emptyset\text{ is a function}\;$), regardless of the value of $\;B\;$. This is exactly the asymmetry noted in the question.

-1

In regards to your question as to Why your Argument above does not imply that $F:A\ \to\ B$ (i.e., a function $F$ from $A$ into $B$) always exists is as follows.

Because one has the cartesian product $A\ \times\ B$ and some set-theoretic formula and the Axiom of Specification at hand. This does not mean one has also a function from $A$ to $B$

You defined $F$ as a function (which is a special kind of relation) and furthermore you have a set identity given by $$F\ =\ \Bigl\{(x,\ y)\;|\;x\ \in\ A\ \mbox{and}\ y\ \in\ B\ \mbox{and} \dots\ \mbox{other conditions}\Bigr\}$$ or equivalently as $$F\ =\ \Bigl\{(x,\ y)\ \in \ A\ \times\ B\;|\; \dots\ \mbox{other conditions}\Bigr\}$$

Definition: A relation $R$ is functional if and only if each element of its Domain has exactly one $R$-relative. A functional relation is also called a function

I am assuming that by $\dots$ other conditions you mean some appropriate set-theoretic formula such as $x\ \neq\ x$ as an example. Now the Axiom of Specification guarantees that certain set-theoretic formulas give rise to sets provided that the elements of such an existing set were selected from some other set already in hand (like $A\ \times\ B$ in your case) and does not imply that a set existing under this axiom is a function.

Although you define $F$ as a function on the left-hand-side of your set identity, the right-hand-side is not necessarily a function but rather just a set of ordered pairs, i.e., a relation from $A$ to $B$. The so called $\dots$ other conditions needs to be the uniqueness of the second coordinates of the ordered pairs in $F$ in order for $F$ to be a function from $A$ to $B$.

Formally, using the following (functional) property of $x$ and $y$ $$P(x,\ y)\ :=\ (\forall z)((x,\ y)\ \in\ F\ \wedge\ (x,\ z)\ \in\ F\ \Rightarrow\ y\ =\ z)$$ so that $$F\ =\ \Bigl\{(x,y)\ \in\ A\ \times\ B\;|\;P(x,\ y)\ \mbox{is true}\Bigr\}$$ is a set by the Axiom of Specification and furthermore this set represents a function from $A$ to $B$.