I am having some confusion with the notion of interpreting the topological space $2^\mathbb{R}$ the set of all functions from $\mathbb{R} \rightarrow \{0,1\}$ as equivalent to the set of all subsets of $\mathbb{R}$.The book I am using says to interpret each function as associated with the subset of $\mathbb{R}$ containing the point $a \in \mathbb{R}$ if $f(a)=1$ and not containing $a$ if $f(a)=0$. For some reason I am then interpreting the space $2^ \mathbb{R}$ with the product topology to be equivalent with the discrete topology on $\mathbb{R}$. Is this correct?
For example I am looking at the following question:In the product space $2^\mathbb{R}$, what is the closure of the set $Z$ consisting of all elements of $2^\mathbb{R}$ that are $0$ on every rational coordinate but may be $0$ or $1$ on any irrational coordinate?Equivalently, thinking of $2^\mathbb{R}$ as subsets of $\mathbb{R}$ what is the closure of the set $Z$ consisting of all subsets of $\mathbb{R}$ that do not contain any rational?
An answer that I first came up with was that the closure of $Z$ should be $Z$ itself, because every subset of $\mathbb{R}$ in the discrete topology is closed and therefore equal to its closure. However, I know that the problem is not that trivial. Now that I think about this, is my interpretation the notion that the functions themselves are the elements of the product topology on $2^\mathbb{R}$, not the topological space? Instead should I think about the product topology?
For any point $x$ in $2^\mathbb{R}$ and open set containing $x$, I know that there is a basis element of $2^\mathbb{R}$ with all but finitely many factors equal to $\{0,1\}$ containing $x$.Then should this basis element intersect a point in $Z$, necessarily?
I would appreciate if someone could clear up my confusion on interpreting the set $\mathbb{R}$ as equivalent to $\mathbb{R}$ with the discrete topology, and lead me in the right direction in solving this problem.