I am self studying basic topology and have trouble proving the following question.



> 
> If $A$ and $B$ are compact, and if $W$ is a neighborhood of $A \times B$ in $X \times Y$, find a neighborhood $U$ of $A$ in $X$ and a neighborhood $V$ of $B$ in $Y$ such that $U \times V \subseteq W$.
> 
> 
> 


Intuitively, in Euclidean space, I can see that such $U$ and $V$ must exist since one can trace around the "edge" of the compact space $A \times B$ and create an open product space that is only a little bit "larger" than $A \times B$ but smaller than $W$. Then the projection $U$ and $V$ would satisfy the requirement. But I could not think of a way to construct it formally. Any hint would be greatly appreciated!



Proving neighborhood of a compact product space contains a sub-neighborhood formed by taking product
Algernon's argument seems to need a special case of Tychonoff's theorem to get to the finiteness of the union. Here is an argument which avoids that.


Lemma: Let $A\subseteq X$ be compact and $B\subseteq Y$ arbitrary. Let $W\subseteq X\times Y$ be open such that for each $x\in A$ there are a neighborhoods $U\_x$ of $x$ and $V\_x$ of $B$ with $U\_x\times V\_x\subseteq W$, then there are neighborhoods $U$ of $A$ and $V$ of $B$ with $U\times V\subseteq W$.


For the proof of the lemma, one can restrict by the compactness to finitely many neighborhoods and apply Algermon's argument with $V$ being a finite intersection.


To see that the hypotheses of the lemma are satisfied if $B$ is compact with $A\times B\subseteq W$, the lemma itself can be applied (with exchanged roles of $X$ and $Y$, $A:=B$ and $B:=\{x\}$): The hypothesis of the lemma is then satisfied by the mere definition of the product topology.


