Consider a function $f:\mathbb{N} \to \mathbb{N}$, $f(x)=x-5\lfloor x/5\rfloor.$ Is this a valid function? At $x=20$ its value is $0$ which is not in its codomain?
Asked
Active
Viewed 201 times
1
-
Here [X] means box of X – palash jain Apr 21 '17 at 16:24
-
Is this onto function – palash jain Apr 21 '17 at 16:31
-
The definition is not valid, assuming that your $\mathbb{N}$ excludes zero. Many authors do consider zero to be a natural number. – hardmath Apr 21 '17 at 16:36
1 Answers
1
Generally speaking, no. A function is only well-defined if each element of the domain maps to (exactly) one element in the codomain.
However I assume that this particular $f$ came from a textbook or notes where the author allows natural numbers to include zero. There is unfortunately not universal consensus about whether $\mathbb{N}$ includes zero or not, and the charitable interpretation here is that $f$ is intended to map to and from $\{0,1,2,\ldots\}$.

user7530
- 49,280