# Prove that $d(x,y) = \sum_{i\in\mathbb{N}} a_i\frac{d_i(x_i,y_i)}{1+d_i(x_i,y_i)}$ satisfies the triangle inequality

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?

It suffices to show that $$\frac{d_i(x_i,z_i)}{1 + d_i(x_i,z_i)} \le \frac{d_i(x_i,y_i)}{1 + d_i(x_i,y_i)} + \frac{d_i(y_i,z_i)}{1 + d_i(y_i,z_i)}$$ for each $i$. Use the fact that $f(x) = \dfrac{x}{1+x}$ is increasing for $x \ge 0$ (use the first derivative test, say). Since each $d_i$ is a metric you have $$d_i(x_i,z_i) \le d_i(x_i,y_i) + d_i(y_i,z_i)$$ and thus $$\frac{d_i(x_i,z_i)}{1 + d_i(x_i,z_i)} \le \frac{d_i(x_i,y_i) + d_i(y_i,z_i)}{1 + d_i(x_i,y_i) + d_i(y_i,z_i)} = \frac{d_i(x_i,y_i)}{1 + d_i(x_i,y_i) + d_i(y_i,z_i)} + \frac{d_i(y_i,z_i)}{1 + d_i(x_i,y_i) + d_i(y_i,z_i)}$$ which is trivially less than or equal to $$\frac{d_i(x_i,y_i)}{1 + d_i(x_i,y_i)} + \frac{d_i(y_i,z_i)}{1 + d_i(y_i,z_i)}.$$
• We can also show that $f(x)+f(y)\geq f(x+y)$ for non-negative $x,y$ by brute force by eliminating the denominators..................+1 – DanielWainfleet Aug 29 '18 at 17:03
Let $\rho_k(x_k,y_k) = \frac{d_k(x_k,y_k)}{1+d_k(x_k,y_k)}$ and note that each $\rho_k$ are a metric, so for all $k$ $$\rho_k(x_k,y_k)\le \rho_k(x_k,z_k) + \rho_k(z_k,y_k).$$ Then multiplying by $a_k$ and summing from $k=1$ up to $k=n$ we have $$\sum_{k=1}^na_k\rho_k(x_k,y_k)\le \sum_{k=1}^na_k\rho_k(x_k,z_k) + \sum_{k=1}^na_k\rho_k(z_k,y_k)$$
Once both sums on the right side converge, we can make $n\to\infty$ and the limit on the right side will give $d(x,z)+d(z,y)$ as we wanted.