PMA, Rudin p.99 Exercise 6
Let $X,Y$ be metric spaces and $E$ be a compact subset of $X$.
Define $f:E\rightarrow Y$ and $G=\{(x,f(x))\in X\times Y:x\in E\}$.
Then prove that $f$ is continuous on $E$ iff $G$ is compact.
I'm not sure hypotheses Rudin made are sufficient to prove this. How do I know what kind of metric is in $X\times Y$? Is there a generally used metric of Cartesian product of two metric spaces, when metric of the product is not mentioned?
Next, say metric in $X\times Y$ is defined. Let $A,B$ be compact sets in $X,Y$ respectively. How do I prove that $A\times B$ is compact? I think this is inevitable in the proof for above theorem, but there was nothing about this in this book.. (I know generalization of this is Tychonoff's Theorem which needs choice)