Why does a regular surface contained in a sphere have to be open in the sphere? I'm reading the book Differential Geometry of Curves and Surfaces written by do Carmo. And there is one theorem I'm trying to prove. Here is the statement:
If $S$ be a compact, connected, regular surface with constant Gaussian curvature $K$, then $S$ is a sphere.


In the proof, do Carmo claims that $S$ is open in the sphere $\Sigma$. But I'm quite vague about his argument. Why is $S$ open in $\Sigma$ if $S$ is to be a regular surface? Thanks.


Let $p\in S$. Since $S$ is a regular surface, there exists an open subset $U\subseteq\mathbb R^2$ and a homeomorphism $\psi: U\to \psi(U)\subseteq S$ such that $\psi(U)$ is an open subset of $\mathbb R^3$ containing $p$. So $\Sigma\cap \psi(U)$ is an open subset of $\Sigma$ containing $p$.
