How can a countably infinite product space be discrete? Let $(X_i,T_i), i \in \Bbb N$, be a countably infinite family of topological spaces.  Prove that $\prod^{\infty}_{i=1} (X_i,T_i)$ is a discrete space iff each $(X_i, T_1)$ is discrete and all but a finite number of the $X_i, i \in \Bbb N$ are singleton sets.
What I don't understand is:  How can $\prod^{\infty}_{i=1} (X_i,T_i)$ ever be a discrete space? 
A space is a discrete space iff every subset of the space is open.  
So for this countably infinite product space that would mean $\prod^{\infty}_{i=1}\{a_i\}$ is open in $\prod^{\infty}_{i=1} (X_i,T_i)$, but an open set in a countably infinite product space is defined as $U = \{\prod ^{\infty}_{i=1}O_i : O_i \in T_i$ and $O_i = X_i$ for all but a finite number of $i \}$. 
As an example the book gives: $U = O_1 \times O_2 \times ... \times O_n \times X_{n+1} \times X_{n+2} \times ...$.
Could someone explain to me what I am not understanding?
 A: You have almost done. You write that a bases of the topology is made of the sets
$$
U = O_1 \times O_2 \times ... \times O_n \times X_{n+1} \times X_{n+2} \times ...
$$
Now you have to remember your hypothesis:
and all but a finite number of the $X_i, i \in \Bbb N$ are singleton sets.
So, there exists $N$ such that, for $i\geq N$, $X_i=\{a_i\}$. Therefore, a basis of the product topology is given by the sets 
$$
U = O_1 \times O_2 \times ... \times O_{N-1} \times \{a_{N}\} \times \{a_{N+1}\} \times ...
$$
where $O_1,\ldots, O_{N-1}$ are arbitrary subsets of $X_1,\ldots, X_{N-1}$.  Making unions of these elements you obtain arbitrary subsets of: $\;\prod^{\infty}_{i=1} X_i=\left(\prod^{N-1}_{i=1}X_i\right)\times \left(\prod^{\infty}_{i=N}\{a_i\}\right)$.
A: Well, for instance, if each $X_i$ has only one point, then $\prod X_i$ has only one point (there is only one way to choose one point from each of them).  There is only one topology on a one-point set, so $\prod X_i$ is discrete.  The point is that it is perfectly possible for $\prod O_i$ to be a singleton set: namely, if each $O_i$ is a singleton set.
Incidentally, the statement of the result is not correct: it needs the additional hypothesis that each $X_i$ is nonempty.  Otherwise, if a single $X_i$ is empty, then the entire product is empty, so it doesn't matter what the other spaces are.
A: Let $X$ denote the product and let $x\in X$ be an element of the product. 
If $\pi_i:X\to X_i$ denotes the projection then a set of the form $\bigcap_{i=1}^{\infty}\pi_i^{-1}(U_i)$ is open if $U_i$ is an open subset of $X_i$ for each $i$. If for $i>n$ every $X_i$ is a singleton set then we can take $U_i=\{\pi_i(x)\}$ (wich is a singleton in the discrete $X_i$, hence is open) for $i\leq n$ and $U_i=X_i$ (wich is open) for $i>n$. 
This results in $$\{x\}=\bigcap_{i=1}^{\infty}\pi_i^{-1}(U_i)$$ and we conclude that singletons are open in the product $X$. That means exactly that $X$ has discrete topology.
