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}$.
Corrected
One direction is just the tube lemma.
For the other direction, suppose that $X$ is not compact; we want to find a space $Y$ such that the projection $\pi:X\times Y\to Y$ is not closed. Let $\mathscr{U}$ be an open cover of $X$ that has no finite subcover.
- Show that we may without loss of generality assume that $\mathscr{U}$ is closed under finite unions, i.e., that if $\mathscr{U}_0$ is a finite subset of $\mathscr{U}$, then $\bigcup\mathscr{U}_0\in\mathscr{U}$.
Let $\mathscr{F}=\{X\setminus U:U\in\mathscr{U}\}$.
- Verify that $\mathscr{F}$ is a family of non-empty closed sets, that $\mathscr{F}$ is closed under finite intersections, and that $\bigcap\mathscr{F}=\varnothing$.
Let $p$ be a point not in $X$, and let $Y=\{p\}\cup X$. Let
$$\tau=\wp(X)\cup\big\{\{p\}\cup F\cup A:F\in\mathscr{F}\text{ and }A\subseteq X\big\}\;.$$
- Show that $\tau$ is a topology on $Y$, and that $X$ is an open subspace of $Y$ with this topology.
(As an aid to intuition, note that the open nbhds of $p$ in $Y$ are precisely the subsets of $Y$ that contain $p$ and some element of $\mathscr{F}$.)
Let $D=\{\langle x,x\rangle\in X\times Y:x\in X\}$, and let $C=\operatorname{cl}_{X\times Y}D$; clearly $C$ is closed in $X\times Y$. Suppose, to get a contradiction, that the projection $\pi:X\times Y\to Y$ is closed.
- Show that $p\in\pi[C]$, so that there must be some $x\in X$ such that $\langle x,p\rangle\in C$.
- Get a contradiction by finding an open nbhd $U$ of $\langle x,p\rangle$ in $X\times Y$ that is disjoint from $D$. (HINT: Use the fact that $\mathscr{U}$ covers $X$.)
Best Answer
$\pi$ is continuous. Thus its inverse image of an open set is open and a closed set closed. No, the inverse is not an open nor a closed map because it is not a map from X to X×Y.
It is a function from the power set of X to the power set of X×Y and those two power sets do not have a topology. Thus it is meaningless to ask if its open or closed.