I have some difficulties with this Exercise: let X be a compact Hausdorff locally euclidean space of dimension m, U an open subset of X such that U Is homeomorphic to $\mathbb{R}^m$ and ~ the equivalence relation on X that identifies $X-U$ to a single point; prove that X/~ is homeomorphic to $S^m$.
MY IDEA: Let $g: U\to\mathbb{R}^m$ a homeomorphism e let $f:= p\circ g\colon U\to S^m-\{N\}$ where $p\colon \mathbb{R}^m\to S^m-\{N\}$ is the inverse of the stereographic projection from the north pole $N$ of the $m$-sphere $S^m$. Now, I define $F\colon X/$~ $\to S^m$ in this way $ F([x])= f(x)$ for $x\in U$ and $F([x])=N$ for $x\in X-U$. Clearly $F$ is bijective. If I will prove that $F$ is continuous I'de finish, why? Because $X/$~ is compact (since it's the quotient of the compact space X) and $S^m$ is a Hausdorff space, so every continous function from $X/$~ to $S^m$ is a closed map, and then a homeomorphism if it is also bijective (likewise it is my $F$). So, can anyone help me in order to prove that the continuity of $F$?
Define $$\phi : X \to S^m, \phi(x) = \begin{cases} f(x) & x \in U \\ N & x \in X \setminus U \end{cases}$$ Then clearly $\phi$ is continuous in all points of $U$.
Now let $x \in X \setminus U$ and $V$ be an open neighborhood of $\phi(x) = N$ in $S^m$. The set $K = S^m \setminus V$ is a closed subset of $S^m$, thus it is compact and contained in $S^m \setminus \{ N \}$. Hence $f^{-1}(K)$ is a compact subset of $U$. Because $X$ is Hausdorff, $f^{-1}(K)$ is closed in $X$ and $W = X \setminus f^{-1}(K)$ is open in $X$ . By construction $x \in X \setminus U \subset W$ and $\phi(W) \subset V$. To verify this inclusion, note that $W \cap U = U \setminus f^{-1}(K)$ so that $\phi(W \cap U) = f(W \cap U) = f(U) \setminus K = (S^m \setminus \{ N \}) \setminus (S^m \setminus V) = V \setminus \{N \}$.
Thus $\phi$ is continuous. We have $F \circ q = \phi$, where $q : X \to X/$~ is the quotient map. The universal property of the quotient shows then that $F$ is continuous.
Note that the above argument only requires that $X$ is Hausdorff. The compactness of $X$ is used to show that $F$ is a homeomorphism.