I'm not sure that I understand your question, but if S is a closed set then

and since for all , we conclude that . If is an open set you should find a sequence of numbers that converges to and use the continuity property to prove that (follow this link)