Classification of Compact One-Manifolds

Theorem
Every compact one-dimensional manifold is diffeomorphic to either a circle or a closed interval.

Corollary
Any compact one-manifold has an even number of points in its boundary.

Lemma 1
Let $f$ be a function on $[a,b]$ that is smooth and has a positive derivative everywhere except one interior point, $c$. Then there exists a globally smooth function $g$ that agrees with $f$ near $a$ and $b$ and has a positive derivative everywhere.

Proof of Lemma 1
Let $r$ be a smooth nonnegative function that vanishes outside a compact subset of $(a,b)$, which equals $1$ near $c$, and which satisfies $\int_{a}^{b} r = 1$.

Define $g(x) = f(a) + \int_{a}^{x} (k r(s)+f'(s)(1-r(s)))ds$ where the constant $k=f(b)-f(a)-\int_{a}^{b} f'(s)(1-r(s))ds$.

Now, let $f$ be a Morse function on a one-manifold $X$, and let $S$ be the union of the critical points of $f$ and $\partial X$. Since $S$ is finite, $X-S$ consists of a finite number of one-manifolds, $L_1,L_2,\cdots,L_n$.

Lemma 2
$f$ maps each $L_i$ diffeomorphically onto an open interval in $\R$

Proof of Lemma 2
Let $L$ be any of the $L_i$. Because $f$ is a local diffeomorphism and $L$ is connected, $f(L)$ is open and connected in $\R$. We also have $f(L) \in f(X)$, the latter of which is compact, so there are numbers $c$ and $d$ such that $f(L) = (c,d)$.

It suffices to show $f$ is one to one on $L$, because then $f^{-1}:(c,d) \to L$ is defined and locally smooth. Let $p$ be any point of $L$ and set $q=f(p)$.

It suffices to show that every other point $z \in L$ can be joined to $p$ by a curve $\gamma : [q,y] \to L$, such that $f \circ \gamma$ is the identity and $\gamma (y) = z$.

Since $f(z) = y \neq q = f(p)$, this result shows $f$ is one to one. So let $Q$ be the set of points $x$ that can be so joined. Since $f$ is a local diffeomorphism, $Q$ is both open and closed and hence $Q=L$.

Lemma 3
Let $L$ be a subset of $X$ diffeomorphic to an open interval in $\R$, where $\dim X = 1$. Then the closure $Cl(L)$ contains at most two points not in $L$.

Proof of Lemma 3
Let $g$ be a diffeomorphism $g:(a,b) \to L$ and let $p \in Cl(L)-L$. Let $J$ be a closed subset of $X$ diffeomorphic to $[0,1]$ such that $1$ corresponds to $p$ and $0$ corresponds to some $g(t)$ in $L$.

Consider the set $\left\{{ s \in (a,t) | g(s) \in J }\right\}$. This set is both open and closed in $(a,b)$, hence $J$ contains either $g((a,t))$ or $g((t,b))$.

Proof of Corollary
Follows trivially