Continuous map on a dense subset which is not closed

120 Views Asked by At

I'm trying to prove that if $p:X\to Y$ is continuous, $D$ is a dense proper subset of $X$ and $p^{-1}(y)\cap D$ is compact for every $y\in Y$, then the restriction $\left.p\right|_D$ is not closed.

I guess that the idea is to assume that $\left.p\right|_D$ is closed and arrive to a contradiction, but all my attempts ends with no success and in the very most I never found where to use the compactness condition.

I'll appreciate any help.

EDIT: This is exercise 9 page 254 of Dugundji's Topology, concerning compactness and perfect maps.