2

For some function $f: Z \rightarrow Z^{+}$

Is $f(x) = x^2$ a function that maps all integers to all positive integers?

According to my textbook, it is, but I am unsure because for $x=0$, $f(0) = 0$ which is not in the target $Z^{+}$. So does that mean it is not a function of $f: Z \rightarrow Z^{+}$?

Textbook:

Find a function whose domain is the set of all integers and whose target is the set of all positive integers that satisfies each set of properties.

(a) Neither one-to-one, nor onto.

Solution: $f(n) = n^2$

mathguy
  • 927

1 Answers1

2

[Edit: Please also read the discussion in the comments. It depends on the country and on the general understanding in the textbook.]

You are absolutely right. We could fix it with $f(n) = n^2+1$.

You can sometimes encounter "positive" meaning "non-negative". But that should be clearly stated in the context. Similarly, some authors take $\mathbb N$ to be $\mathbb Z_{\ge0}$. This may be a case of that consensus, but then it should be like that throughout the textbook at least.

Milten
  • 7,031
  • Acrually, this depends on what you denote $\mathbf Z^+$. If it is the same as $\mathbf N$, it is OK. – Bernard Nov 01 '19 at 20:39
  • @Bernard I agree, but writing "positive integers" in words would be a bit misleading, don't you think? – Milten Nov 01 '19 at 20:42
  • Here we would say `strictly positive’ to make the difference, and their set would be denoted $\mathbf Z^{*+}$. – Bernard Nov 01 '19 at 20:43
  • I suppose it just depends on the context. I personally prefer non-negative. If I just read “the positive [something]s” without context, then I’m going to assume $0$ is excluded. – Milten Nov 01 '19 at 20:50
  • Perhaps due to the influence of Bourbaki, in France $0$ is generally considered to be "positive". – Robert Israel Nov 01 '19 at 21:50
  • I thought there might be cultural differences. Are you French, Bernard? I am Danish, and here "positive" and "greater than" are strict by default (we may add "strictly" for emphasis), and we say "weakly positive" and "weakly greater than" for the non-strict cases. – Milten Nov 01 '19 at 22:02