Quick proof clarification: Show 1 dimensional manifold is homeomorphic to $\mathbb{R}$ or a circle I am trying to see it in the case where we just have to open sets $U,V$ that cover the connected manifold $M$, each of which is homeomorphic to the real line.
I know that the answer depends on the number of connected components of the intersection. I just really need an aclaration with a proof for the case where we have two (in which case is homemorphic to a circle) connected components. I am following this nice proof.
And the part I am stucked with is specifically in proposition 2, part c. How could we prove the map is an homeomorphisms? And why again is the union of $U$ and $V$ compact? Thanks a lot.
Edit: I am thinking about how just because $h_1=f \circ \phi$ and $h_2=g \circ \psi$ are homeomorphisms in their respective images, that they dont intersect and cover the whole square, then doesn't follow that the function $\eta$ is an homeomorphism by the pasting lemma ?
 A: 
I am thinking about how just because $h_1 = f \circ \phi$ and $h_2 = g \circ  \psi$ are homeomorphisms in their respective images, that they dont intersect and cover the whole square, then doesn't follow that the function $\eta$ is an homeomorphism by the pasting lemma?

Yes, $\eta$ is constructed by pasting, so you can appeal to the pasting lemma. But as you noted, we have some open sets and some closed sets, which doesn't satisfy the lemma. Notice the proof outline defines $f$ on $[0,1]$, even though the image of $\phi$ is just $(0,1)$. Define $\tilde \phi : \bar U \to [0,1]$ as a continuous extension of $\phi$ as follows. For $x \in U$, $\tilde \phi(x) = \phi(x)$. For any point $x$ on the boundary of $U$, we have an infinite sequence in $U$ which converges to $x$. $\phi$ maps this sequence to an infinite sequence in $(0,1)$, which must converge to either $0$ or $1$. So define $\tilde \phi(x) = \psi^{-1}(b)$ if the mapped sequence converges to $0$, or $\tilde \phi(x) = \psi^{-1}(b')$ if the mapped sequence converges to $1$; this is independent of the original sequence converging to $x$. Now $\eta$ agrees with $f \circ \tilde \phi$ on $\bar U$, and $f \circ \tilde \phi$ and its inverse are continuous, so the pasting lemma does apply using the two closed sets $\bar U$ and $V - U$.
So $\eta$ is a homeomorphism between $U \cup V$ and the unit square.

And why again is the union of $U$ and $V$ compact?

If we've shown that $\eta$ is a bijection between $U \cup V$ and the unit square, and that $\eta^{-1}$ is continuous, then for any open set $S \subseteq U \cup V$, $\eta(S)$ is open in the unit square's topology. The unit square is compact. So if $\mathcal{O}$ is any open cover of $U \cup V$...
The big catch is that although $\eta$ has been defined for points in $U \cup V$, we're asked to show its domain is actually all of the manifold $X$. We can show $U \cup V = X$ using connectedness of $X$.
Take any $p \in X$, and let $\sigma: [0,1] \to X$ be a continuous path with $\sigma(0) = p$, $\sigma(1) \in U \cup V$. Then the set $\sigma^{-1}(U \cup V)$ is not empty, is open in $[0,1]$ since $\sigma$ is continuous, and is compact, therefore closed. But the only subsets of $[0,1]$ which are both open and closed are the empty set and the entire $[0,1]$, so $\sigma^{-1}(U \cup V)$ must be $[0,1]$, meaning $\sigma(0) = p \in U \cup V$, so every point of $X$ is in $U \cup V$ and $U \cup V = X$.
Can you finish from those hints?
