Does there exist a surjection from the integers to the naturals?

AI Thread Summary
A surjection from the integers to the naturals exists, with one example being defined piecewise for negative and non-negative integers. The discussion also touches on the surjection from the reals to the naturals, highlighting the need for clarity on how non-natural numbers are handled. The participants debate whether the naturals include zero, affecting the surjection definitions. Additionally, the conversation explores the implications of functions with undefined points, emphasizing that such functions cannot be considered proper over all of the reals. The thread concludes with a discussion on removable discontinuities in functions.
docnet
Messages
796
Reaction score
488
Homework Statement
a) Does there exist a surjection from the integers to the natural numbers?

b) Does there exist a surjection from the real numbers to the natural numbers?
Relevant Equations
##\mathbb{R},\quad \mathbb{N},\quad\mathbb{Z}##
a)
Yes.
One surjection from ##\mathbb{Z}## to ##\mathbb{N}## is the double cover of ##\mathbb{N}## induced by ##f:\mathbb{Z}\longmapsto\mathbb{N}## with
$$f(z)=\begin{cases}
-z & ,\forall z<0\\
z+1 & ,\forall 0\leq z
\end{cases}$$
b)
Yes.
One surjection from ##\mathbb{R}## to ##\mathbb{N}## is the the projection ##p:\mathbb{R}\longmapsto\mathbb{N}## with ##f(r)=r## for all ##r\in\mathbb{N}\subset\mathbb{R}##.
 
Last edited:
Physics news on Phys.org
Does ##\mathbb{N}## not include 0 for you?

(b) feels incomplete. What is the relationship between p and f, and what are you supposed to to with real numbers that are not natural numbers?
 
Office_Shredder said:
Does ##\mathbb{N}## not include 0 for you?
If ##\mathbb{N}## includes ##0##, a surjection from ##\mathbb{Z}## to ##\mathbb{N}## is given by
$$f(z)=\begin{cases}
-z & ,\forall z<0\\
z & ,\forall 0\leq z
\end{cases}$$
Office_Shredder said:
(b) feels incomplete. What is the relationship between p and f, and what are you supposed to to with real numbers that are not natural numbers?
I agree with you. They were all meant to be ##p##'s, but I hit ##f## by force of habit. The "complete" projection function is ##p:\mathbb{R}\longmapsto\mathbb{N}## with
$$p(r)=\begin{cases}r& ,\forall r\in\mathbb{N}\\
\text{undefined}& ,\forall r\notin\mathbb{N}
\end{cases}$$
 
p(r) can't be undefined, by definition a function is always defined. But notice it doesn't matter much what value you pick - you already covered the surjection part, so you could make it e.g.. always 0 for the rest of the space

docnet said:
If ##\mathbb{N}## includes ##0##, a surjection from ##\mathbb{Z}## to ##\mathbb{N}## is given by
$$f(z)=\begin{cases}
-z & ,\forall z<0\\
z & ,\forall 0\leq z
\end{cases}$$

I agree that works. But which one does your class/textbook use? I was just surprised because they usually include 0, but if it didn't then your first answer is fine.
 
  • Like
Likes docnet
Office_Shredder said:
p(r) can't be undefined, by definition a function is always defined. But notice it doesn't matter much what value you pick - you already covered the surjection part, so you could make it e.g.. always 0 for the rest of the space
Thank you. I understand, and I can't believe I missed that.
Then let's make it ##p:\mathbb{R}\longmapsto\mathbb{N}## with
$$p(r)=\begin{cases}r& ,\forall r\in\mathbb{N}\\
0 & ,\forall r\notin\mathbb{N}
\end{cases}$$
Office_Shredder said:
I agree that works. But which one does your class/textbook use? I was just surprised because they usually include 0, but if it didn't then your first answer is fine.
Those questions are taken from a midterm review sheet that I stumbled upon. The class is named "Introduction to higher maths" and it is a proof-based course I have not taken, so I don't know what the professor wants to do.
 
In general if ##A \subseteq B## are non-empty sets and ##a \in A##, then ##f:B \rightarrow A## defined by:
$$f(b)=\begin{cases}b& \ \ (b \in A)\\
a & \ \ (b \notin A)
\end{cases}$$ is a surjection.
 
  • Informative
Likes docnet
Office_Shredder said:
p(r) can't be undefined, by definition a function is always defined. But notice it doesn't matter much what value you pick - you already covered the surjection part, so you could make it e.g.. always 0 for the rest of the space
Question: Does this imply that any function that has an infinity, like ##f(x)=\frac{1}{x}## does at ##x=0##, and like ##f(x)=\tan(x)## does at ##x=\frac{\pi}{2}+\pi n## is not a proper function over all of ##\mathbb{R}##? (really, curious.)
 
docnet said:
Question: Does this imply that any function that has an infinity, like ##f(x)=\frac{1}{x}## does at ##x=0##, and like ##f(x)=\tan(x)## does at ##x=\frac{\pi}{2}+\pi n## is not a proper function over all of ##\mathbb{R}##? (really, curious.)
Yes. The domain of the function ##\frac 1 x## is ##\mathbb R - \{0\}##.

Note that technically this function is continuous at every point in its domain. That said, it's common to talk about a discontinuity at ##x = 0##. What that really means is that we cannot extend the function ##\frac 1 x## to be continuous on ##\mathbb R##.

We can compare this to the function ##\frac{\sin x}{x}##, which likewise is not defined at ##x = 0##, but which can be extended to a continuous function on ##\mathbb R## by defining the function to be ##1## at ##x = 0##. This is called a removable discontinuity. Although, again, it's not technically a discontinuity in the function, but a disconnectedness of the domain that is being removed.
 
  • Informative
Likes docnet
Back
Top