Let $(X_k,d_k)_{k\in\mathbb{N}}$ be a family of metric spaces. Let $X=\prod_{k=1}^\infty X_k$ be equipped with the metric $$d(u,v)=\sum_{k=1}^\infty 2^{-k}\overline{d_k}(u_k,v_k),$$ where $\overline{d_k}=\min\{1,d_k\}$
Show that a function $f:Y\to X$ from a metric space $(Y,d_Y)$ is continuous if and only if for every $k\in\mathbb{N}$ the composition $f_k=\operatorname{pr}_k\circ f: Y\to X_k$ is continuous, where $\operatorname{pr}_k\colon X\to X_k$ is the canonical projection.
During the lecture, a similar statement was proven for finite products.
However, the proof was not correct, and I tried to prove the statement above similarly to the answer of Theo Bendit to the question universal property of product metric, proof explanation.
But I don't think this works here. My argument is as follows:
I have already proven that $\operatorname{pr}_k$ (the projection on the $k$-th coordinate) is continuous, so one implication is trivial.
For the other implication, I argued as follows: Suppose that $f_k$ is continuous for every $k\in\mathbb{N}$. Let $W\subseteq X$ be open. We want to show that $f^{-1}(W)$ is open.
Since $W\subseteq X$ is open, we have for every $w:=(w_1,w_2,\ldots)\in W$ an $\varepsilon > 0$ such that $B_\varepsilon^d(w)\subseteq W$.
Now let $V:=\prod_{k\in\mathbb{N}} B_\varepsilon^{d_k}(w_k)$. We want to show that $V\subseteq B_\varepsilon^d(w)$.
So let $v\in V$. Let us show that $v\in B_\varepsilon^d(w)$.
We have $$d(v,w)=\sum_{k=1}^\infty 2^{-k}\overline{d_k}(v_k,w_k)\stackrel{!}{\leq} \sum_{k=1}^\infty 2^{-k}d_k(v_k,w_k)<\sum_{k=1}^\infty 2^{-k}\cdot \varepsilon=\varepsilon.$$
Hence $v\in B_\varepsilon^d(w)$.
Now the problem: I would like to show that $$\bigcap_{k\in\mathbb{N}} f_k^{-1}(B_\varepsilon^{d_k}(w_k))\subseteq f^{-1}(W),$$ but the intersection of infinitely many open sets is not necessarly open. So this should not work.
How can this be fixed?
Thanks in advance.
The main thing you're missing is that the "tail" of the series defining $d$ goes to zero: all $\overline{d_k}$ are $\leq 1$, so for all $N$, $$\sum_{k=N+1}^\infty 2^{-k}\overline{d_k}(u_k,v_k)\leq\sum_{k=N+1}^\infty 2^{-k}=2^{-N}$$ so given $\epsilon>0$, you just need to take $N$ very large (depending on $\epsilon$) so that $2^{-N}<\epsilon/2$. If $y'$ is very close to $y$, then $f_k(y')$ will be very close to $f_k(y)$.
In fact, we can even make $d_k(f_k(y'),f_k(y))<\epsilon/(2N)$, as long as $d(y',y)<\delta_k$ for some $\delta_k$ depending only on $y$, on $k$, on $N$ and on $\epsilon$. So as long as $d(y',y)<\delta:=\min\left\{\delta_1,\ldots,\delta_N\right\}$ (this $\delta$ depends only on $\epsilon$ and $N$), we will have $\sum_{k=1}^N2^{-k}\overline{d_k}(f_k(y'),f_k(y))<\epsilon/2$.
Putting the two inequalities above together, we conclude $d(f(y'),f(y))<\epsilon$, whenever $d(y',y)<\delta$, and $\delta$ deends only on $y$ and on $\epsilon$ (and some choice of $N$ which depends only on $\epsilon$, so it does not matter).
An easier solution uses sequential continuity:
Let $(x_n)_{n=1}^\infty$ be a sequence in $X$. Each element $x_n$ is itself a sequence, so let us write its terms with superscripts just to avoid confusion: $x_n=(x_n^k)_{k=1}^\infty$. Consider another element $x=(x^k)_{k=1}^\infty$ of $X$.
Exercise: Prove that $x_n$ converges to $x$ in $X$ if and only if for every $k$, $x_n^k$ converges to $x^k$ in $X_k$.
Hint: For any two elements $a=(a^k)_k$ and $b=(b^k)_k$ of $X$ and any $N$, we have $$d(a,b)\leq \sum_{k=1}^N d(a^k,b^k)+\sum_{k=N+1}^\infty 2^{-k}=\sum_{k=1}^N d(a^k,b^k)+2^{-N}$$
To answer your question: If all $f_k$ are continuous, suppose $y_n\to y$ in $Y$. Then for each $k$, $f_k(y_n)\to f_k(y)$ in $X_k$, so $f(y_n)\to f(y)$ in $X$ by the exercise above.