Projection map being a closed map Let $\pi: X \times Y \to X$ be the projection map where $Y$ is compact. Prove that $\pi$ is a closed map.


*

*First I would like to see a proof of this claim. 

*I want to know that here why compactness is necessary or do we have any other weaker condition other than compactness for the same result to hold.
 A: Suppose $Z \subset X \times Y$ is closed, and suppose $x_0 \in X \setminus \pi[Z]$.
For any $y \in Y, (x_0, y) \notin Z$, and as $Z$ is closed we find a basic open subset $U(y) \times V(y)$ of $X \times Y$ that contains $(x_0, y)$ and misses $Z$.
The $V(y)$ cover $Y$, so finitely many of them cover $Y$ by compactness, say $V(y_1),\ldots,V(y_n)$ do. Now define $U = \cap_{i=1}^{n} U(y_i)$, and note that $U$ is an open neighbourhood of $x_0$ that misses $\pi[Z]$: suppose that there is some $(x,y)\in Z$ with $\pi(x,y) = x \in U$. Then $y \in V(y_i)$ for some $i$, and as $x \in U \subseteq U(y_i)$ (as $U$ is the intersection of all $U(y_i)$) we get that $(x,y) \in (U(y_i) \times V(y_i)) \cap Z$ which contradicts how these sets were chosen to be disjoint from $Z$. So $U \cap \pi[Z]=\emptyset$ and $\pi[Z]$ is closed.
To see that the closed projection property implies compactness: suppose $X$ has the closed projection property along $X$, and let $\cal{F}$ be a filter on $X$. Define a space $Y$ that is as a set $X \cup \{\ast\}, \ast \notin X$, where $X$ has the discrete topology and a neighbourhood of $\ast$ is of the form $A \cup \{\ast\}$ with $A \in \cal{F}$. Then $D = \{(x,x): x \in X\}$ is a subset $X \times Y$ and closedness of the projection $p: X \times Y \rightarrow Y$ implies that some point $(x,\ast)$ is in its closure: $D$ cannot be closed in $X \times Y$, because $p[D] = X$ is not closed in $Y$, as $\ast \in \overline{p[D]} = p[\overline{D}]$, by closedness (and continuity) of $p$. This $x$ is an adherence point of the filter, because if $A \in \mathcal{F}$ and $x \in O$ where $O$ is open in $X$, then $O \times (A \cup \{\ast\})$ is basic open in $X \times Y$ and so intersects $D$ in some $(p,p)$, $p \in X$. This $p \in O \cap A \neq \emptyset$, showing that $x$ is an adherence point of $\mathcal{F}$. 
A: There is a standard example for why some hypothesis on $Y$ is necessary: let $X=Y=\mathbb R$, and consider the closed subset $F=\{(x,y)\in \mathbb R\times\mathbb R:xy=1\}\subseteq\mathbb{R}^2$. What is its projection to the first factor?
In fact, one can prove that a space $Y$ is compact iff for all spaces $X$ the projection $X\times Y\to X$ is closed. So while compactness is not necessary (I think...) for the closedness of the projection for one $X$, it is necessary if you want all such projections to be closed.
As for the proof you want in the first bullet point... this is a standard exercise in topology: what have you tried?
A: This proof is adapted from this lecture note. It is interesting to figure out that this statement is actually a reformulation of The Tube Lemma. 
Let $C$ be a closed subset of $X \times Y$, we want to show that $\pi_{1}(C) \subset X$ is closed. To this end, we take any point $x \notin \pi_1(C)$ and show that there exists a neighborhood of $x$ which is disjoint from $\pi_1(C)$.
Since $x \notin \pi_1(C)$, the slice $\{ x \} \times Y$ is disjoint from $C$. Because $Y$ is compact, by The Tube Lemma (replace open with closed and contain with disjoint, respectively), there is a neighborhood $W$ of $x$ such that the whole tube $W \times Y$ is disjoint from $C$. Therefore, $W$ is the neighborhood of $x$ which is disjoint from $\pi_1(C)$, as desired. 
A: I'll add a proof using nets. I think that nets are often useful, since we have good intuition about sequences in metric spaces and many things work very similarly for nets in general topological spaces. (For example, we know that a metric space is compact if and only if every sequence has a convergent subsequence. If we work with topological spaces, we have a similar characterization with nets: A topological space is compact if and only if every net has a convergent subnet.)
Proof. Let $C$ be a closed subset of $X\times Y$. We want to show that $\pi[C]$ is a closed subset of $X$.
Let $(x_d)_{d\in D}$ be a net in $X$ such that each $x_d$ belongs to $\pi[C]$ and $x=\lim_{d\in D} x_d$. We want to show that $x\in\pi[C]$.
Since $x_d\in\pi[C]$, we can choose (for each $d\in D$) a point $y_d\in Y$ such that $(x_d,y_d)\in C$. Now $(y_d)_{d\in D}$ has a convergent subnet $(y_e)_{e\in E}$. (This follows from compactness of $Y$.) This means that there is an $y\in Y$ such that $y=\lim_{e\in E} y_e$.
Now we have $\lim_{e\in E} x_e = x$ and $\lim_{e\in E} y_e = y$, which implies that $\lim_{e\in E} (x_e,y_e)=(x,y)$ and $(x,y)\in C$. Therefore $x\in\pi[C]$. $\hspace{2cm}\square$

Kuratowski's theorem says that this property in fact characterizes compact spaces. Proof can be found in Engelking's book (Theorem 3.1.16) or in Henno Brandsma's post. Eric Auld asked in his comment whether this can be shown using nets. It seems that a very similar idea as in the proof using filters works also for nets, see my proof below.
I should mention that I have previously posted here a longer proof which turned out to be incorrect. (You can find it by checking revision history, if you are interested.) Luckily, Eric Auld caught the mistake

If $p_Y \colon X\times Y\to Y$ is closed for every $Y$, then $X$ is compact.

Let $D$ be a directed set and $(x_d)_{d\in D}$ be a net in $X$.
We can topologize $Y=D\cup\{\infty\}$, where $\infty\notin D$, in a natural way: All points of $D$ will be isolated. Basic neighborhoods of $\infty$ are the sets of the form $\{\infty\}\cup\{d; d\ge d_0\}$ for $d_0\in D$. (The reason that this seems to be relatively natural choice is that $x_d$ converges to $x$ in $X$ if and only if $(x_d,d)$ converges to $(x,\infty)$ in $X\times Y$.)
We want to show that the net $(x_d)_{d\in D}$ has a cluster point. Let us denote $A=\{(x_d,d); d\in D\}$. Since the map $p_Y$ is closed, we have $p_Y[\overline A]=\overline{p_Y[A]}=\overline D$, so $\infty\in p_Y[\overline A]$. This means that there is an $x\in X$ such that $(x,\infty)\in\overline A$.
Notice that basic neighborhoods of the point $(x,\infty)$ are of the form
$$U\times \{d\in D; d\ge d_0\}$$
where $d_0\in D$ and $U$ is an neighborhood of $x$.
Since every set of this form has nonempty intersection with $A$ we get that for each neighborhood $U$ of $x$ and for each $d_0$ there exists $d\ge d_0$ such that $x_d\in U$. Hence $x$ is a cluster point of the net $(x_d)_{d\in D}$. $\hspace{2cm}\square$
