The question I have may not be completely well-defined. I'm in the process of proving that the square metric on $\mathbb{R}^n$ is in fact a metric, the final statement of which is $$ \max\limits |p_i - q_i| \leq \max\limits |p_i - r_i| + \max |r_i - q_i| \qquad (\star). $$ The first line is $$ |p_i - q_i| \leq |p_i - r_i| + |r_i - q_i|. $$ In the next line, I want to say something to the effect of "taking the maximum over $i$, because the max function is increasing, we get ($\star$)." I'm not completely sure that I can do this, because the maximum isn't necessarily a "function" (or is it?). I can treat it, in some sense, as a function of the inputs $|p_i - q_i|$, for example, or even as a function of $i$, though the latter wouldn't necessarily be increasing (e.g., $|p_1 - q_i|$ could be maximal.)
Is there a different way to phrase this justification, or is it just wrong?