Consider a function introduced by $f \colon X \rightarrow Y$. While $X$ is the domain of the function, my understanding is that $Y$ is the codomain -- and not the image! However, there are many possible codomains which one can specify. Is the convention to specify the smallest codomain which can be written in a 'simple' way?
To take a concrete example, consider the function $f(x) = x + 1$ defined on the domain $X = [0, 1]$. If I understand correctly, one can introduce this function as $f \colon [0, 1] \rightarrow \mathbb{R}$, or $f \colon [0, 1] \rightarrow \mathbb{R^+}$, or $f \colon [0, 1] \rightarrow [0, 5]$. But wouldn't it be clearest to write $f \colon [0, 1] \rightarrow [1, 2]$?