I have the following problem that I wish to solve. Let $(X_i,d_i), i \in \mathbb{N}$ be a collection of metric spaces. We consider the infinite product $X=\Pi_{i \in \mathbb{N}} X_i$.
My goal is to define a metric on this space. What I did was take $d(x,y) = max_{i \in \mathbb{N}} (d_i(x_i,y_i))$ as my metric on the space $X$. This satisfies all the necessary properties of a metric, but is it well defined to take a max like this? There are some other metrics I could think of but they seem less clean than this one.
Any help appreciated.