Inverse Limit of Dense Subsets is Dense

In general $\varprojlim_j U_j$ is not dense in $\varprojlim_j X_j$. Here is an example.

Consider the inverse system $(X_n,\pi_n)$ indexed by $\mathbb{N}$ in which all $X_n = \mathbb{R}$ and all $\pi_n : X_{n+1} \to X_n$ are identities. Then $\varprojlim_n X_n = \mathbb{R}$.

Let $\phi : \mathbb{N} \to \mathbb{Q}$ be a bijection. Define $A_n = \{ \phi(1), \dots, \phi(n) \}$ and $U_n = \mathbb{Q} \setminus A_n$. The $U_n $ are dense in $X_n = \mathbb{R}$ and we have $\pi_n(U_{n+1}) = U_{n+1} \subset U_n$.

But $\varprojlim_n U_n = \bigcap_{n=1}^\infty U_n = \emptyset$.

Edited:

Let $A \subset \mathbb R$ be any subset which is not dense in $\mathbb R$.

$U = \mathbb Q \cup A$ is a dense subset of $\mathbb R$. The set $Q = \mathbb Q \setminus A$ must be infinite, otherwise $A$ would be dense in $\mathbb R$. Hence there exists a bijection $\phi : \mathbb{N} \to Q$. Define $Q_n = \{ \phi(1), \dots, \phi(n) \} \subset Q \subset U$ and $U_n = U \setminus Q_n$. The $U_n $ are dense in $X_n = \mathbb{R}$ and we have $\pi_n(U_{n+1}) = U_{n+1} \subset U_n$.

But $\varprojlim_n U_n = \bigcap_{n=1}^\infty U_n = \bigcap_{n=1}^\infty (U \setminus Q_n) = U \setminus \bigcup_{n=1}^\infty Q_n = U \setminus Q = A$.

Edited:

Let us prove the following theorem:

Let $X$ be a space having a countable subset $D$ such that $D \setminus F$ is dense in $X$ for any finite $F \subset D$ (an example is $X = \mathbb R$ with $D = \mathbb Q$). Then each $A \subset X$ is the intersection of a decreasing sequence of dense subsets $D_n \subset X$.

Case 1: $A$ is dense. Then we may take $D_n = A$.

Case 2: $A$ is not dense.

Then $D' = D \setminus A$ must be infinite (if it were finite, then $D \cap A = D \setminus D'$ would be dense and so would be $A$). Hence there exists a bijection $\phi : \mathbb{N} \to D'$. Define $D'_n = \{ \phi(1), \dots, \phi(n) \} \subset D' \subset D$ and $D_n = (D \cup A) \setminus D'_n$. The $D_n$ are dense in $X$ because they contain $D \setminus D'_n$ and we have $D_{n+1} \subset D_n$.

But $\bigcap_{n=1}^\infty D_n = \bigcap_{n=1}^\infty ((D \cup A) \setminus D'_n) = (D \cup A) \setminus \bigcup_{n=1}^\infty D'_n = (D \cup A) \setminus D' = A$.


You need to additionally assume that for all $i \le j$ (in the directed index set $I$ over which we are taking the inverse limit) we have that

$$\pi^j_i[U_j]\subseteq U_i$$ where $\pi^j_i: X_j \to X_i$ is the required projection of the inverse system. This is to ensure that the restrictions to $U_i$ indeed form an inverse system again.

Denoting by $\pi_i: \varprojlim_j X_j \to X_i$ the canonical projection, it is well-known that $\{\pi_i^{-1}[O]: O \subseteq X_i \text{ open }\}$ is a base for the topology of $\varprojlim_j X_j$ and maybe you can show each such set must intersect $\varprojlim_j U_j$, though I don't quite see that myself yet. In the special case you linked to (infinite products) this automatically followed, in general you'd need an argument why a thread inside the dense sets must be inside such a basic open set.