[step:Apply Minkowski to prove the triangle inequality]
Fix $\eta>0$. Choose couplings $\pi_{12} \in \Pi(\mu,\nu)$ and $\pi_{23} \in \Pi(\nu,\rho)$ such that
\begin{align*}
\left(\int_{X \times X} d(x,y)^p\,d\pi_{12}(x,y)\right)^{1/p} \le W_p(\mu,\nu)+\eta
\end{align*}
and
\begin{align*}
\left(\int_{X \times X} d(y,z)^p\,d\pi_{23}(y,z)\right)^{1/p} \le W_p(\nu,\rho)+\eta.
\end{align*}
Let $\gamma$ be the glued probability measure on $X^3$ from the previous step. Define [measurable functions](/page/Measurable%20Functions) $a,b:X^3 \to [0,\infty)$ by
\begin{align*}
a(x,y,z):=d(x,y), \qquad b(x,y,z):=d(y,z).
\end{align*}
The pointwise triangle inequality gives $d(x,z) \le a(x,y,z)+b(x,y,z)$. Since the $(x,z)$-marginal of $\gamma$ is a coupling of $\mu$ and $\rho$, we have
\begin{align*}
W_p(\mu,\rho) \le \left(\int_{X^3} d(x,z)^p\,d\gamma(x,y,z)\right)^{1/p}.
\end{align*}
By monotonicity of the $L^p$ norm and Minkowski's inequality for $L^p$ spaces (citing a result not yet in the wiki: [Minkowski inequality](/theorems/517)),
\begin{align*}
\left(\int_{X^3} d(x,z)^p\,d\gamma(x,y,z)\right)^{1/p} \le \left(\int_{X^3} a(x,y,z)^p\,d\gamma(x,y,z)\right)^{1/p} + \left(\int_{X^3} b(x,y,z)^p\,d\gamma(x,y,z)\right)^{1/p}.
\end{align*}
Using the marginal identities for $\gamma$,
\begin{align*}
\int_{X^3} a(x,y,z)^p\,d\gamma(x,y,z) = \int_{X \times X} d(x,y)^p\,d\pi_{12}(x,y)
\end{align*}
and
\begin{align*}
\int_{X^3} b(x,y,z)^p\,d\gamma(x,y,z) = \int_{X \times X} d(y,z)^p\,d\pi_{23}(y,z).
\end{align*}
Therefore
\begin{align*}
W_p(\mu,\rho) \le W_p(\mu,\nu)+W_p(\nu,\rho)+2\eta.
\end{align*}
Letting $\eta \downarrow 0$ gives
\begin{align*}
W_p(\mu,\rho) \le W_p(\mu,\nu)+W_p(\nu,\rho).
\end{align*}
This proves the triangle inequality.
[/step]