Continuity implies uniform continuity What shown below is a reference from "Analysis on manifolds" by James R. Munkres

First of all I desire  discuss the compactness of $\Delta$: infact strangerly I proved the compactness of $\Delta$ in the following way. So we remember that if $Y$ is compact and if $Z\subseteq Y$is closed then $Z$ is compact; moreover if $Z$ is hausdorff separable then $\Delta Z:=\{(z,z):z\in Z\}$ is closed in $Z\times Z$; and finally if $Z\subseteq Y$ is compact and if $S\subseteq Z$ is compact in $Z$ then it is compact too in $Y$. So we observe that the compact $X$ is hausdorff separable, since $\Bbb{R}^m$ is hausdorff separable and since the hausdorff separability is hereditary; moreover $X\times X$ is compact and hausdorff separable, since the compactness and the hausdorff separability are multiplicative properties. So for what previously we observed, we can claim that $\Delta$ is compact in $\Bbb{R}^{2m}$. So is what I observed correct?
Now I desire to discuss the continuity of $g$. First of all we remember that $\Bbb{R}^n$ is a topological vector space thus the vector sum $s$ is continuous. So we define the function $\phi:X\times X\rightarrow\Bbb{R}^n\times\Bbb{R}^n$ through the condiction
$$
\phi(x,y):=\big(f(x),-f(y)\big)
$$
for any $x,y\in X$ and so we observe that $g\equiv ||\cdot||\circ s\circ\phi$. So we remember that the norm $||\cdot||$ is continuous (here the proof) thus if we prove that $\phi$ is too continuous then $g$ will be continuous, since the composition of continuous functions is too continuous. So let's start to prove the continuity of $\phi$. Clearly for the associativity of product topology $\Bbb{R}^n\times\Bbb{R}^n$ is homeomorphic to $\Bbb{R}^{2n}$ and so for $i=1,...,2n$ we can define $\pi_i\circ\phi$. So we observe that
$$
\pi_i\circ\phi=\begin{cases}f_i,\text{ if }i\le n\\ -f_i,\text{ otherwise}\end{cases}
$$
and so for the universal mapping theorem for products we can claim that $\phi$ is continuous and so the statement holds. So is what here I observed correct?
Could someone help me, please?
 A: What you’ve done is correct, but it’s unnecessarily complicated. For instance, to show that $\Delta$ is compact you could argue in the same style but more simply that $X\times X$ is compact, because it’s the Cartesian product of two compact spaces, and $\Delta$ is a closed subset of $X\times X$ (and therefore compact) because $X$ is Hausdorff.
To show that $g$ is continuous, you need only note that $d(x,y)=\|x-y\|$ is a metric1 on $\Bbb R^n\times\Bbb R^n$, so it is continuous, and that the map 
$$X\times X\to\Bbb R^n\times\Bbb R^n:\langle x,y\rangle\mapsto\langle f(x),f(y)\rangle$$
is continuous because it is continuous in each factor. (I don’t know whether you’ve already proved this result, but it’s standard and very easy. This map is the diagonal product of the map $f$ with itself, sometimes denoted by $f\Delta f$. See, for instance, Definition $13$ in this PDF.) Then $g$ is simply the composition of these two continuous maps: $g=d\circ(f\Delta f)$.
1 Specifically, the Euclidean metric, but that doesn’t matter.
A: There are several ways to see that $\Delta$ is compact, Munkres chooses the easiest way: it's a continuous image of $X$, which is also the simplest, I think. 
In any topological space $X$, $\Delta \simeq X$ where $\Delta \subseteq X \times X$ in the product topology. The map $\delta: X \to X \times X$ defined by $\delta(x)=(x,x)$ is continuous, as $\pi_1 \circ \delta = \pi_2 \circ \delta = \textrm{id}_X$, so the universal property of continuity of product spaces implies $\delta$ is continuous (as $\textrm{id}_X$ is); its image is $\Delta$ and a continuous inverse is the projection $\pi_1 \restriction_\Delta$, so we have a homeomorphism indeed. As $X$ is compact, so is $\Delta$.
There is no need to go into Heine-Borel or product theorems, that overcomplicates stuff. It is true that $\Delta$ is closed (by Hausdorffness) in $X \times X$, which is compact (Heine-Borel or Tychonoff for finite products). But that's "heavier" than using simple facts about product topologies and projections.
The continuity of $g$ is clear too from generalities: Indeed $\textrm{diff}:\Bbb R^n \times \Bbb R^n \to \Bbb R^n$, defined by $\textrm{diff}(x,y) = x-y$ is continuous on the TVS $\Bbb R^n$ and on any Banach space the map $X \to \Bbb R$ defined by $x \to \|x\|$ is also continuous. So $g$ is just a composition of 
$(x,y) \to (f(x), f(y))$ (continuous as $f$ is by the universal property again), followed by $\textrm{diff}$, followed by $x \to \|x\|$. Quite simple. Simpler than what you're suggesting I think.
But don't get fixated on one argument. 
A: I have not read the book you are looking at but I have a pretty good idea of what is going on.
Munkres is introducing the idea of a Uniform Space through $\Delta$. The concept of uniform continuity in a metric space, for example, is not obviously translated into a topological concept, so there are a variety of ideas from real or functional analysis or order theory that need to be generalized to introduce them into a more topological mode of analysis.  Uniform spaces can be made into topological spaces, and then you have a rich environment in which to analyze functions. The set $\Delta$ plays a surprisingly central role, and that is what Munkres wants to show you.
If $X$ is a compact subset of $\mathbb{R}^N$, then $X \times X$ is compact in the product topology by Tychonoff's Theorem.  $\Delta$ is a closed subset of a compact set, so it is compact.  You could even just use the Heine-Borel theorem, or the sequential definition of compactness since it's a finite dimensional vector space (take a sequence in $\Delta$, subdivide the space an infinite number of times as in the proof of Heine-Borel and extract a convergent subsequence).
Munkres' point is not to go off into separability and Hausdorff properties of the space (this is $\mathbb{R}^n$, anyway, he is using this space so you don't have to invoke more advanced theorems and everything could be proved in an elementary way), his point is to introduce you to this diagonal set $\Delta$ that he wants you to understand since it plays a crucial role in generalizing uniform continuity when he moves to spaces that don't necessarily have a metric or norm.
As for uniform continuity on a compact set in $\mathbb{R}^N$, that is in every intro real analysis textbook. Apply the standard theorem to each $f_i(x)$ to get a uniform $\delta_i$, then take the minimum over all the $\delta_i$'s to get a uniform bound on $||x-y||$ to ensure all the $f_i$ are within a sufficiently small $\varepsilon$ ball for any $x$ and $y$ for $f$ as a whole.  That part is straightforward as well: it is not why Munkres is proving things this way. You could even prove the continuity of $g$ ``by hand'' from the definitions of the Euclidean or sup norm because $f$ is assumed to be continuous.
Look at what Munkres is doing here.  He wants to prove something about $f: \mathbb{R}^n \rightarrow \mathbb{R}^m$, but introduces $\Delta$ and $g(x,y)$ rather than using a standard $\varepsilon$/$\delta$ mode of analysis.  The function $g(x,y)$ eliminates the $f$ from the analysis by allowing you to focus on the $\Delta$ and $U$ and essentially an open cover of $\Delta$. That is the part that deserves attention, and it is pretty "elementary" on some level: using a bunch of auxiliary ideas he doesn't reference is going to obscure what he wants you to see.
An analogy is to the topological definition of continuity: a function is continuous iff the inverse image of every open set in the range is open in the domain. That converted the $\varepsilon$/$\delta$ definition into one in terms of open sets. This is the analogous proof for uniform continuity: converting the norm/metric concepts into ones that concern sets instead. The appearance of the $\Delta$ set is very important, and that's the point of what he is doing here:
https://en.wikipedia.org/wiki/Uniform_space
