If we take X=R and Y=Z and E=N i.e. {1,2,3,4,5.........} then since for this case E is open in Y (as Y is itself an entire metric space) however there does not exist any open set G in X for this particular set. then how E is open in Y.
Pl clarify
If we take X=R and Y=Z and E=N i.e. {1,2,3,4,5.........} then since for this case E is open in Y (as Y is itself an entire metric space) however there does not exist any open set G in X for this particular set. then how E is open in Y.
Pl clarify
Take $G = (0,\infty)$.
If you want to be fancy, let $U=\bigcup_{n\in\Bbb Z^+}\left(n-\frac12,n+\frac12\right)\;;$ then $U$ is an open subset of $\Bbb R$, and $U\cap\Bbb Z=\Bbb Z^+$. But there’s no need to go to so much trouble, as Sean’s answer shows. For that matter, you could observe that $\Bbb Z_{\le0}=\Bbb Z\setminus\Bbb Z^+$ is a closed set in $\Bbb R$, so $\Bbb R\setminus\Bbb Z_{\le0}$ is an open set in $\Bbb R$ whose intersection with $\Bbb Z$ is clearly $\Bbb Z^+$.