Notation for Range for a Function I was given a question where I was asked to determine if a function is one-to-one and/or onto. It was given like this:
$\mathbb{Z}^+\to\mathbb{Z}^+,f\left(x\right)=\left(\frac{x}{5}\right)-4$
In this case, what would the $\mathbb{Z}^+\to\mathbb{Z}^+$ mean? Does the first $\mathbb{Z}^+$ signal the range for $x$ and the second $\mathbb{Z}^+$ signal the range for $f\left(x\right)$?
 A: When we say a function is defined by $f : A \to B$, we mean it takes elements of $A$ as inputs, and maps them to some subset of $B$. Sometimes $B$ is precisely equal to the range of $f$, and sometimes $B$ is larger.
In your case, the notation $f : \Bbb Z^+ \to \Bbb Z^+$ means that $f$ takes in positive integers, and maps them to some subset of the positive integers. Though unless something significant is meant by the parentheses in your question, this is also problematic - $1 \in \Bbb Z^+$ but $f(1) < 0$ if we assume they're just normal parentheses, and thus $f(1) \not \in \Bbb Z^+$. Every output needs to be housed in $\Bbb Z^+$ or a subset thereof.
A: The question that you got is a bit open, and does not have a single canonical interpretation. I suggest you refresh the definitions of domain, range, codomain and partial functions. There are perfectly okay wikipeida pages on this, but I'll work through my interpretation of your question, so you can see how they play out.
A function is kind of black box. You put things into it, and it returns other things. From the outside, we dont really care how it does it, but only the relationship between the input and output values. The set of allowed input values is called the domain of the function. A common way to specify a function is by giving a domain and some algebraic formula for computing the output.
In your case, the domain is specificed to be $\mathbb{Z}_+$ (it is on the left side of the arrow in $\mathbb{Z}_+ \to \mathbb{Z}_+$) . The algebraic formula is $f(x) = (\frac{x}{5})-1$. Since $\mathbb{Z}_+ = \{1,2,3,\dots{}\}$, we can put in some example input values, and see what comes out.
$f(1) = -4/5$,
$f(2) = -3/5$,
$f(3) = -2/5$,
$f(4) = -1/5$,
$f(5) = 0$,
$f(10) = 5/5=1$,
$f(17) = 12/5$
By this little experiment, we see that the output values all belong to $\mathbb{Q}$. Thus, it would be natural to state that the codomain of the function is the rational numbers.
In your question, it is stated that the codomain is the positive integers (it is on the right hand side of the arrow in $\mathbb{Z}_+ \to \mathbb{Z}_+$), which contradicts my own conclusion. Thus, the output value $-1/5$ is not allowed, and consequently, the input value $4$ cannot be allowed. This is an example of a partial function. They are sometimes called non-total functions. The thing with partial functions is that they are not defined over its whole domain. There is some smaller set, called the domain of definition, where the function is defined. We can compute the domain of definition
$$\left\{z\in \mathbb{Z}_{+} \middle| f(z)\in\mathbb{Z}_+ \right\} = \{5k | k=2,3,\dots{} \} = \{10,15,20,\dots{}\}$$
Now that we know the allowed input values are (the domain of definition), we can see what the possible output values (the function image, also called the range) are.
$$\left\{ f(z) | z \in \{10,15,20,\dots{} \}\right\} = \{ f(5k) | k=2,3,4\dots\} = \{1,2,3\dots{}\} = \mathbb{Z}_+$$
We conclude that both range and the codomain is exactly the same, namely all positive integers. So the function $f$ is surjective. This is also called onto.
Since $f(5k) =f(5k')$ if and only if $k=k'$, it is injective as well. This is also called one-to-one.
The standard thing to ask next is whether the function is a bijection. Normally, one says a function is a bijection if and only if it is both a injection and surjection. However, this is only the case for total functions. Since we are working with a partial function, we can draw the conclusion that it is a bijection over its domain of definition only.
