Solution (source code)

= Solution

For $y\in Y$, every neighborhood of $y$ in the subspace is of the form $V\cap Y$ with $V$ an ambient <open neighborhood>. Since $A\subseteq Y$, this meets $A$ exactly when $V$ meets $A$. Thus
$$
\boxed{\overline A^{\,Y}=Y\cap\overline A^{\,X}.}
$$

A <Hausdorff compactification> is a <topological embedding> $h:X\to K$ with <dense> image in a <compact Hausdorff space> $K$. Define the domination preorder by
$$
\boxed{(h,K)\leq(h',K')\ \Longleftrightarrow\ \exists q:K'\to K\text{ continuous with }q\circ h'=h.}
$$
It is reflexive by the identity map and transitive by composition. Any comparison map is onto: its image is <compact> and hence closed in $K$, and contains the <dense> set $h(X)$. Two compactifications are equivalent if a <homeomorphism> $u:K\to K'$ satisfies $u\circ h=h'$.

Such a <homeomorphism> and its inverse give domination both ways. Conversely, if comparison maps exist in both directions, each composite agrees with the identity on the <dense> embedded copy of $X$. Two <continuous maps> to a <Hausdorff> space agreeing on a <dense> set agree everywhere. The comparison maps are therefore inverse <homeomorphisms>. Thus equivalence is exactly mutual domination.

The <Stone-Čech extension property> says that every <continuous map> from $X$ into any <compact Hausdorff space> extends continuously to the compactification. The extension is unique by density. For two compactifications with this property, extend each embedding through the other compactification. This gives comparison maps both ways, hence equivalence by the preceding argument.

For the <perfect-map characterization by Stone-Čech remainders>, the universal property first gives a unique continuous $F:\beta X\to\beta Y$ extending the composite $X\xrightarrow fY\hookrightarrow\beta Y$. The required remainder condition is equivalent to
$$
\boxed{F^{-1}(Y)=X.}
$$
One inclusion is already forced by the extension property; the other forbids any point of the remainder mapping into $Y$.

Suppose first that $f$ is a <perfect map>. Fix $y\in Y$ and let $K=f^{-1}(y)$, a <compact subset> of $X$ and hence a <closed subset> of $\beta X$. If $p\in F^{-1}(y)\setminus K$, normality of $\beta X$ supplies an open $U$ with $K\subseteq U$ and $p\notin\overline U$. Because $f$ is closed,
$$
V=Y\setminus f(X\setminus U)
$$
is an <open neighborhood> of $y$ and $f^{-1}(V)\subseteq U\cap X$. Choose an open $V'$ of $\beta Y$ with $V'\cap Y=V$. The <open set> $F^{-1}(V')$ contains $p$, and its <intersection> with the <dense> subset $X$ lies in $U$. Every point of that <open set> is consequently in $\overline U$, contradicting the choice of $p$. Therefore $F^{-1}(y)=K\subseteq X$ for every $y\in Y$, proving the remainder condition. This argument also handles an empty <fiber>.

Conversely suppose the remainder condition holds. Every <fiber> $f^{-1}(y)=F^{-1}(y)$ is a <closed subset> of $\beta X$, hence <compact>, and lies in $X$. To show that $f$ is closed, let $A$ be closed in $X$ and set $D=\overline A^{\,\beta X}$. The initial <closure> identity gives $D\cap X=A$. <Compactness> makes $F(D)$ closed in $\beta Y$, and the remainder condition gives
$$
f(A)=F(D)\cap Y.
$$
Indeed any preimage in $D$ of a point of $Y$ must belong to $X$ and hence to $A$. Thus $f(A)$ is closed in $Y$. Together with <compact> <fibers> this proves
$$
\boxed{f\text{ perfect}\ \Longleftrightarrow\ F(\beta X\setminus X)\subseteq\beta Y\setminus Y.}
$$