Let $(X_j)_{j\in J}$ a nonempty family ($J\neq\emptyset$) of nonempty topological spaces ($X_j\neq\emptyset$ for every $j\in J$). Then is every $X_k$ homeomorphic to a subspace of $X=\prod_{j\in J} X_j$ in the product topology.
I struggle to understand every details in the following proof. I numerate the details I am going to ask about. The main focus is on (4) and (5):
Let $k\in J$. For every $j\in J$ choose $p_j\in X_j$. (1)
Set $f_j: X_k\to X_j$, $f_j(q)=\begin{cases}{q\,\text{if $j=k$}\\ p_j\,\text{if $j\neq k$}}\end{cases}$
$f_j$ is continuos for every $j\in J$. (2)
Then $f: X_k\to X, f(q)=(q_j)_{j\in J}=\begin{cases} q\,\text{if $j=k$}\\ p_j\,\text{if $j\neq k$}\end{cases}$ is continuous. (3)
Since $\operatorname{pr}_k\circ f =\operatorname{id}_{X_k}$ we have that $f$ is injective.
Set $Z=f(X_k)$ then the corestriction $f^{|Z}: X_k\to Z$ is bijective.
Now ${\operatorname{pr}_{k}}_{|Z}:Z\to X_k$ is bijective and continuous. (4)
This implies the corestriction $f^{|Z}$ is a homeomorphism. (5)
Most of the questions I ask just to make sure, I am correct, while I struggle at some:
at (1):
This is an application of the axiom of choice.
at (2):
I want to verify that $f_j$ is indeed continuous: Let $U\subseteq X_j$ be open. I show that $f_j^{-1}(U)=\{q\in X_k| f_j(q)\in U\}\subseteq X_k$ is open for every $j\in J$.
If $j=k$, then $f_k^{-1}(U)=U\subseteq X_k$ open.
If $j\neq k$, then $f_j^{-1}(U)=X_j$ open.
at (3):
Holdy by the universal property of the product topology: Universal property of product topology, unique up to homeomorphism
at (4):
I do not know why, but somehow this projection gives me a headache even though the concept is really easy, so I do not understand my problem...
If I want to prove by hand that $\operatorname{pr}_{k|Z}$ is continuous, I take $U\subseteq X_k$ open.
Then $\operatorname{pr}_{k|Z}^{-1}(U)=\{(q_j)_{j\in J}\in f(X_k)| \operatorname{pr}_{k|Z}((q_j)_{j\in J}\in U\}=\underbrace{U\times \prod_{k\neq j} X_j}_{\text{open in $X$}}\cap f(X_k)$ which is open in $f(X_k)$.
Injective:
Let $q,r\in f(X_k)$ then:
$\operatorname{pr}_{k|Z}(q)=\operatorname{pr}_{k|Z}(r)\Leftrightarrow q=r$
by definition of $f(q)$ for $j=k$.
Surjective:
Let $q\in X_k$. Then is $f(q)\in f(X_k)$ a preimage.
at (5):
We know that $f^{|Z}$ is continuous and bijective. So we need that $(f^{|Z})^{-1}$ is continuous.
How is this implied here?
Thanks in advance.