Let $(X_i , d_i), i ∈ \Bbb N$, be a collection of metric spaces.
Define the metric \begin{align}d(x,y) = \sum_{i\in\mathbb{N}} a_i\frac{d_i(x_i,y_i)}{1+d_i(x_i,y_i)} \end{align} on the infinite product $\prod_{i \in \Bbb N} X_i.$ Note that $(a_i)_{i\in\mathbb{N}}$ is positive and satisfies $\sum_{i\in\mathbb{N}} a_i < +\infty$. For example $a_i = 2^{-i}$.
I am wondering how should I go about to prove that this metric satisfy the triangle inequality?