[proofplan]
The proof proceeds in three stages. First, for each point $(x_0, y)$ in the slice $\{x_0\} \times Y$, we extract a basic open neighbourhood $U_y \times V_y$ contained in $N$. Second, since $Y$ is [compact](/page/Compact%20Space) and $\{V_y : y \in Y\}$ covers $Y$, we extract a finite subcover $V_{y_1}, \ldots, V_{y_m}$. Third, we define $W = U_{y_1} \cap \cdots \cap U_{y_m}$, which is a finite intersection of [open sets](/page/Open%20Set) containing $x_0$, and verify that $W \times Y \subset N$.
[/proofplan]
[step:Cover each point of the slice $\{x_0\} \times Y$ by a basic open rectangle in $N$]
Let $(x_0, y)$ be an arbitrary point of the slice $\{x_0\} \times Y$. Since $\{x_0\} \times Y \subset N$ and $N$ is open in $X \times Y$, the point $(x_0, y) \in N$. By definition of the [product topology](/page/Product%20Topology), there exist [open sets](/page/Open%20Set) $U_y \subset X$ and $V_y \subset Y$ with
\begin{align*}
(x_0, y) \in U_y \times V_y \subset N.
\end{align*}
In particular, $x_0 \in U_y$ and $y \in V_y$.
[guided]
We begin by exploiting the local structure of the product [topology](/page/Topology) around each point of the slice.
Let $(x_0, y)$ be an arbitrary point of $\{x_0\} \times Y$. Since $\{x_0\} \times Y \subset N$ by hypothesis, $(x_0, y) \in N$. The set $N$ is open in the product topology on $X \times Y$, so $N$ contains a basic open neighbourhood of $(x_0, y)$. A basis for the product topology on $X \times Y$ consists of sets of the form $U \times V$ where $U \subset X$ and $V \subset Y$ are open. (For a product of two factors, every basic open set is a single rectangle $U \times V$, not a finite intersection of subbasis elements.) Therefore there exist open sets $U_y \subset X$ and $V_y \subset Y$ with
\begin{align*}
(x_0, y) \in U_y \times V_y \subset N.
\end{align*}
Membership $(x_0, y) \in U_y \times V_y$ gives $x_0 \in U_y$ and $y \in V_y$.
We have indexed the sets $U_y$ and $V_y$ by $y$ because different points on the slice may require different rectangles. The goal of the remaining argument is to "synchronise" the $X$-component across all these rectangles.
[/guided]
[/step]
[step:Use compactness of $Y$ to extract a finite subcover]
The collection $\{V_y : y \in Y\}$ is an open cover of $Y$: for each $y \in Y$, we have $y \in V_y$. Since $Y$ is [compact](/page/Compact%20Space), there exist finitely many points $y_1, \ldots, y_m \in Y$ such that
\begin{align*}
Y = V_{y_1} \cup V_{y_2} \cup \cdots \cup V_{y_m}.
\end{align*}
[guided]
The collection $\{V_y\}_{y \in Y}$ is an open cover of $Y$: each $V_y$ is open in $Y$ and contains $y$, so every point of $Y$ is covered.
This is the step where compactness of $Y$ is consumed. Without compactness, we would have only an arbitrary (possibly infinite) open cover of $Y$, and the intersection in the next step could be infinite — producing a set that need not be open in a general [topological](/page/Topology) space.
Since $Y$ is compact, there exist finitely many points $y_1, \ldots, y_m \in Y$ such that
\begin{align*}
Y = V_{y_1} \cup V_{y_2} \cup \cdots \cup V_{y_m}.
\end{align*}
The corresponding $X$-components of these rectangles are the [open sets](/page/Open%20Set) $U_{y_1}, \ldots, U_{y_m}$, each containing $x_0$.
[/guided]
[/step]
[step:Define $W$ as the finite intersection of the $X$-components and verify $W \times Y \subset N$]
Define
\begin{align*}
W := U_{y_1} \cap U_{y_2} \cap \cdots \cap U_{y_m}.
\end{align*}
This is a finite intersection of open subsets of $X$, so $W$ is open in $X$. Since $x_0 \in U_{y_j}$ for each $j = 1, \ldots, m$, we have $x_0 \in W$.
We verify $W \times Y \subset N$. Let $(w, y) \in W \times Y$. Since $Y = \bigcup_{j=1}^{m} V_{y_j}$, there exists $j_0 \in \{1, \ldots, m\}$ with $y \in V_{y_{j_0}}$. Since $w \in W \subset U_{y_{j_0}}$, we have $(w, y) \in U_{y_{j_0}} \times V_{y_{j_0}} \subset N$. Since $(w, y)$ was arbitrary, $W \times Y \subset N$.
[guided]
Define
\begin{align*}
W := U_{y_1} \cap U_{y_2} \cap \cdots \cap U_{y_m} = \bigcap_{j=1}^{m} U_{y_j}.
\end{align*}
**$W$ is open and contains $x_0$.** Each $U_{y_j}$ is open in $X$ and contains $x_0$ (established in the first step). A finite intersection of [open sets](/page/Open%20Set) is open, so $W$ is open. The point $x_0$ lies in every $U_{y_j}$, so $x_0 \in W$.
**$W \times Y \subset N$.** Let $(w, y) \in W \times Y$ be arbitrary. We must show $(w, y) \in N$.
Since $\{V_{y_1}, \ldots, V_{y_m}\}$ covers $Y$ and $y \in Y$, there exists some $j_0 \in \{1, \ldots, m\}$ with $y \in V_{y_{j_0}}$. Since $w \in W$ and $W \subset U_{y_{j_0}}$ (because $W$ is the intersection of all $U_{y_j}$), we have $w \in U_{y_{j_0}}$. Therefore
\begin{align*}
(w, y) \in U_{y_{j_0}} \times V_{y_{j_0}} \subset N,
\end{align*}
where the inclusion $U_{y_{j_0}} \times V_{y_{j_0}} \subset N$ was established in the first step.
Since $(w, y)$ was an arbitrary element of $W \times Y$, we conclude $W \times Y \subset N$. The set $W$ is open in $X$ and contains $x_0$, which is the desired "tube" around the slice $\{x_0\} \times Y$.
The geometric picture is as follows: each rectangle $U_{y_j} \times V_{y_j}$ is a "tile" that covers a horizontal strip of the slice. The $V_{y_j}$ pieces tile $Y$ (by [compactness](/page/Compact%20Space)), but the $U_{y_j}$ pieces may have different widths in $X$. Taking the intersection $W = \bigcap U_{y_j}$ narrows the tube to the thinnest tile, ensuring the entire tube $W \times Y$ is covered. Without compactness, we might need infinitely many tiles, and the intersection of infinitely many open sets need not be open.
[/guided]
[/step]