Mapping space from a quotient space

The second question has negative answer: just consider the unit interval $[0,1]$ and let $\mathcal S$ be the family of all closed subsets with a unique non-isolated point in $[0,1]$. The family $\mathcal S$ is endowed with the discrete topology. Let $X=\{(x,S):x\in S\in\mathcal S\}\subset [0,1]\times\mathcal S$ be the topological sum of the family $\mathcal S$ and $q:X\to[0,1]$, $q:(x,S)\mapsto x$, be the natural projection. It is easy to see that the map $q$ is quotient but $q(K)\ne [0,1]$ for any compact subset $K\subset X$. So, the space $X$ is the topological sum of all convergent sequences in $[0,1]$. It is a locally compact locally countable space of density continuum.

It seems that the (metrizable locally compact locally countable) space $X$ and the equivalence relation $\sim=\{(x,y)\in X\times X:q(x)=q(y)\}$ yield also a counterexample to the first question for $Y=\mathbb R$.


@Victor has pointed out to my error in the pre-edited version--thank you, Victor. Now everything IS under control and FIXED.

Here, after @TarasBanakh, there is another example of a quotient map $\ q: X\rightarrow X/{\sim} $ such that $X$ is compact but there is no compact subset $Y\subseteq X$ such that $f(Y)=f(X)$.

Let $Q\subset\mathbb R$ be the set of all rational numbers. Let $\ J:=[0;1]:=\{x\in\mathbb R: 0\le x\le 1\},\ $ Define

$$ X\ :=\ \{(x\ y)\in J^2\,:\, |\{x\ y\}\cap Q| = 1\} $$

And let $\ p:X\rightarrow J\ $ be the projection $\ p(x\ y)\ := x.\ $ Then $p$ is onto, and for every $A\subseteq J$ we have:

  1. $p^{-1}(A)$ is open in $X$ when $A$ is open in $J$ because $p$ is induced by the Cartesian projection;
  2. $p^{-1}(A)$ is not open in $X$ when $A$ is not open in $J$ because $p^{-1}(x)$ is dense in $\ \{x\}\times J\ $ for every $\ x\in J.\ $

Thus, $\ p\ $ is topologically equivalent to the respective quotient map.

More than this, $p$ is an open map. Indeed, sets

$$ B_{abcd}\ :=\ ((a;b)\times(c;d))\,\cap\, X$$

form a topological base of $X$, and $\ p(B_{abcd}) = (a;b)\cap J.\ $ Thus $p$ is an open map.

 

Let $\ Y\subseteq X\ $ be a compact subset such that $\ p(Y)=[0;1]\ $ (a proof by contradiction). Then $\ Y\ $ is a countable union of its compact subsets $\ C_a:=(\{a\}\times\mathbb R)\cap Y\ $ and $\ D_a:=(\mathbb R\times\{a\})\cap Y,\ $ where $\ a\ $ runs over rational numbers. Then sets $\ p(C_a)\ $ and $\ p(D_a)\ $ are compact and they cover $\ [0;1].\ $ Thus, by Baire's theorem one of these projections must have a non-empty interior in $\ [0;1]\ $ -- a contradiction. Thus such $\ Y\ $ does not exist.