[Math] The arbitrary product of completely regular spaces is completely regular.

general-topologyproof-verification

I am trying to prove the following proposition:

The topological product of completely regular spaces is completely regular.

I am aware of the question Product of two completely regular spaces is completely regular, and it turns out that my attempt ends up being analogous to what was done there (but for an arbitrary product). However, I have some questions about a few parts of my proof.

My proof:
Let $\{X_i\}_{i\in I}$ be a family of completely regular spaces; i.e. each $X_i$ is a $T_1$ space for which the following holds: given any point $x_i \in X_i$, and given any neighborhood $U_i$ of that point, there exists a continuous function
$$ f_i:X_i \rightarrow [0,1] \\ x_i \mapsto 0 \\ y \in U_i^c, y\mapsto1 $$
Let $x=(x_i)\in X$ and let $U$ be a neighborhood of $x$.
since $U$ is a neighborhood of $x$, there exists an open neighborhood $v$ of $x$ such that $v\subseteq U$. $v$ must be the union of elements of the basis of the product topology. So $v=\underset{\lambda}{\bigcup} \underset{i}{\prod}Q_i^\lambda$, where the $Q_i^\lambda$ are open sets of $X_i$ and only a finite number of them are different from $X_i$.
We can define a function
$$
f:X \rightarrow [0,1] \\ x \mapsto \underset{i}{\prod}f_i(x_i)
$$
where
$$ f_i:X_i \rightarrow [0,1] \\ x_i \mapsto 0 \\ y \in (Q_i^\lambda)^c, y\mapsto1 $$
which we can choose to be continuous by complete regularity of the $X_i$. Notice that we can have a different function $f_i$ for each set of $\lambda$s.
First, we note that $f(x)=\underset{i}{\prod}f_i(x_i)=0$.
We still have to check that $f$ is continuous and that $f(y)=1$ for any $y\in U^c$.
Let $V$ be an open set of $[0,1]$. We have
$$
f^{\dashv}(V)=\underset{i}{\prod} f_i^\dashv(V)
$$
and by continuity of the $f_i$ this is a product of open sets of the $X_i$ and hence is open in $X$.
[First Question: is this true? It doesn't seem to be: if an infinite number of open sets in the product are different from $X_i$, then the product is not an open set of $X$, I think…]
This establishes the continuity of $f$.
Now, let $y\in X-U$. We have
$$
X-U \subseteq X-v = X-\underset{\lambda}{\bigcup} \underset{i}{\prod}Q_i^\lambda = \underset{\lambda}{\bigcap} (X-\underset{i}{\prod}Q_i^\lambda)
$$
So $y$ belongs to all sets $X-\underset{i}{Q_i^\lambda}$ and so all the $y_i$ are in $(Q_i^\lambda)^c$ for some $\lambda$. Choosing those $\lambda$ in our definition of the functions $f_i$ we get $f(y)=\underset{i}{\prod}f_i(y)=1$. $\square$
[Second Question: is this last argument sound? It is not very clear to me].

Best Answer

A general answer in terms of initial topologies can be found in this answer by Stefan Hemcke.

Another slightly generalised answer: let $\mathcal{S}$ be a subbase for the a topological space $X$. Then $X$ is completely regular iff

$$\forall S \in \mathcal{S}: \forall x \in S: \exists f: X \rightarrow [0,1] \text{ continuous: } f(x) = 0 \land f[X\setminus S] = \{1\}$$

The necessity is obvious as subbase sets are open. For sufficiency: suppose $O$ is open and $p \in O$. Then there are subbasic elements $S_1, \ldots S_n \in \mathcal{S}$ such that $p \in \bigcap_{i=1}^n S_i \subset O$.

For each $i = 1,\ldots n$ find $f_i$ as promised for $p$ and $S_i$. Then $f: X \rightarrow [0,1]$ defined by $f(x) = 1 - \prod_{i=1}^n (1 - f_i(x)) $ is continuous (as addition and multiplication are continuous on the reals) and $f(p) = 0$ (all the product terms are $1$) and $f(x) = 1$ for $x \notin \bigcap_{i=1}^n S_i$ (then one of $f_i$ becomes $1$, so the product becomes $0$ and so $f$ becomes 1). So $f$ is as required for $O$ and $p$.

This directly applies to products, as there we have a subbase of the form $S= p_i^{-1}[O]$ for $O$ open in $X_i$, and $p_i$ the projection from the product onto its $i$-th coordinate. If then $p$ is in $S$, then $p_i(p) \in O$, and we have an $g_i$ there for $p_i(p)$ and $O$ as $X_i$ is completely regular, and then $g = f \circ p_i$ is as required for $S$ as well. This is slightly easier on the notation, I think.