# Confused by an argument which is used in most triangle inequality proofs in metric spaces

I'm confused by the a proof of the triangle inequality. I was supposed to prove that a function is a metric, I proved everything else except the triangle inequality.

Define $B(\mathbb{R})$ as the set of all bounded functions. For each $f,g \in B(\mathbb{R})$ define $\mu(f,g)=sup_{x \in \mathbb{R}}${$|f(x)-g(x)|$} .

To show that $sup_{x \in \mathbb{R}}${$|f(x)-g(x)|$} $\leq sup_{x \in \mathbb{R}}${$|f(x)-k(x)|$}$+sup_{x \in \mathbb{R}}${$|k(x)-g(x)|$} where $k(x) \in B(\mathbb{R})$. Why is it sufficient to show that $\forall x \in \mathbb{R}, |f(x)-g(x)| \leq sup_{x \in \mathbb{R}}${$|f(x)-k(x)|$}$+sup_{x \in \mathbb{R}}${$|k(x)-g(x)|$}?

I've witnessed a similar argument here

-

Your question is, essentially, whether $f(y) \leq c$ implies $\sup_y f(y) \leq c$. This follows immediately from the definition of $\sup$: since $c$ is an upper bound of the image of $f$, it is greater than or equal to the image's least upper bound.
If $f(x)\le a$ for all $x\in\mathbb R$, then $\sup_{x\in\mathbb R}f(x)\le a$, for if $r:=\sup_{x\in\mathbb R}f(x)\gt a$, then $(r+a)/2$ would be an upper bound for $f(x)$ that's less than $r$, contrary to the definition of the supremum.