I am working on this problem:
If $Z$ is a topological space, we call $Y \subset Z$ a retract of $Z$ if there is a continuous map $r:Z \rightarrow Y$ such that $r(y)=y$ for all $y \in Y$. Show that if $Z$ is Hausdorff and $Y$ a retract of $Z$, then $Y$ is closed in $Z$?
Referring to the link, it seems that most the solutions rely on the fact that if a point $z \in Z$ satisfies $r(z)=z$, then $z \in Y$. But, if I am not mistaken, this isn't, strictly speaking, stipulated in the problem statement. In the problem statement, it says that $r(y)=y$ for each $y \in Y$, which I take to mean the following: if $y \in Y$, then $r(y)=y$. This, obviously, does not imply (is not equivalent to, does not mean, etc.) that if a point $z \in Z$ satisfies $r(z)=z$, then $z \in Y$. Am I right in thinking that the solution relies on this other conditional, and therefore the problem is stated poorly? I noticed this happens a lot in mathematical texts. E.g., definitions will often be of the form "... if ..." or "If..., then..." But really there should be "if and only if', since the purpose of a definition is to establish an equivalence.
In the definition, $r$ is function $Z \to Y$, so for any point $z \in Z$, $r(z) \in Y$ -- otherwise, it wouldn't be a function $Z \to Y$.