I know there are similar questions on the board, but they don't answer all of my questions: Let $I$ be a countable set, $(E_i,d_i)$ be a metric space for $i\in I$ and $E:=\prod_{i\in I}E_i$.
Can we define a metric on $E$ such that
- $E$ is complete, if each $E_i$ is complete?
- $E$ is compact, if each $E_i$ is compact?
- the induced topology is the product topology?
There are two candiates which come to my mind: $$d_1(x,y):=\sup_{i\in I}\rho_i(x_i,y_i)\;\;\;\text{for }x,y\in E$$ and $$d_2(x,y):=\sum_{i\in I}a_i\rho_i(x_i,y_i)\;\;\;\text{for }x,y\in E,$$ where $(a_i)_{i\in I}\subseteq(0,\infty)$ with $\sum_{i\in I}a_i<\infty$ and $\rho_i$ is a metric on $E_i$ bounded by $1$ and generating the same topology as $d_i$ (for example, $\rho_i:=\min(1,d_i)$ or $\rho_i:=d_i/(1+d_i)$; it shouldn't matter which one we pick) for all $i\in I$.
Which of 1. to 3. do $d_1$ and $d_2$ satisfy?
From the other questions I only know that $d_2$ satisfies 1. and 3.