If $Y\subset Z$, is a function from $X$ to $Y$ also a function from $X$ to $Z$?
I think both possible answers are plausible:
- One the one hand, a function $f$ from $X$ to $Y$ is often called an assignment of elements in $Y$ to elements in $X$. By this definition, the answer to my question is clearly YES.
- If we say that each function has a domain and codomain associated to it (i.e. they are part of the data), then the answer is clearly NO.
I guess this is a question about definitions and conventions and I would like to hear your thoughts. I have the impression that I am considering two different concepts, one of them being functions. What is the other one?
Yes, sometimes we do this. It depends on the setting. Certainly do it only if it it not confusing to the reader.
To be pedantic, we may say that the function $X \to Z$ is an "astriction" of the function $X \to Y$. It has the same graph, but larger codomain. This is a counterpart notion to the more common "restriction", where we change the domain (and therefore also change the graph).