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?