Let \(X=\prod_{n\in\ZZ}[0,1]=\{(x_n)_{n\in\ZZ}:x_n\in[0,1]\}\), with each \([0,1]\) having the usual Euclidean topology and \(X\) having the product topology, and let \[A=\{(x_n)\in X:\text{for some }N\text{ we have }x_n=0\text{ for all }n\ge N\}.\]
Show that \(A\) is a dense subset of \(X\), and is therefore not a closed subset of \(X\).
Show that, as a consequence, \(A\) is not a compact subset of \(X\).
Solution
1. \(A\) meets every nonempty basic open set \(B=\prod_{n\in\ZZ}U_n\) of \(X\), where each \(U_n\subseteq[0,1]\) is open and \(U_n=[0,1]\) for all but finitely many \(n\).
The set \(F=\{n:U_n\neq[0,1]\}\) is finite; choose an integer \(N\) larger than every element of \(F\). For \(n<N\) choose \(a_n\in U_n\), possible because \(B\) is nonempty, and for \(n\ge N\) set \(a_n=0\in[0,1]=U_n\). Then \(a=(a_n)\in A\cap B\).
2. \(A\) is dense and not closed in \(X\).
By step 1 every nonempty open set meets \(A\), so \(\overline A=X\). The constant sequence \((1)_{n\in\ZZ}\) is not in \(A\), so \(A\neq X=\overline A\) and \(A\) is not closed.
3. \(X\) is Hausdorff.
If two points differ in coordinate \(n\), disjoint open neighborhoods of those coordinates in \([0,1]\) pull back under the projection \(\pi_n\) to disjoint open neighborhoods in \(X\).
4. Q.E.D.
Step 2 proves (a). For (b), a compact subset of a Hausdorff space is closed, so by step 3 a compact \(A\) would be closed, contrary to step 2.