If $f$ a homeomorphism on $U$ and $V$, is it a homeomorphism on $U \cup V$? Quick point set topology question.
Let $f:X \to Y$ be a local homeomorphism. Consider $f$ restricted to $X$. Let $U$ and $V$ be open sets in $X$ with nonempty intersection. If $f$ restricted to $U$ and $f$ restricted to $V$ are homeomorphism, is $f$ restricted to $U \cup V$ a homeomorphism?
I would think it's always true, but the book I'm using states this is only the case when $f(U)\cap f(V)$ is connected. 
 A: Let $X=\{0,1,2\}$ and $Y=\{a,b\}$ with discrete topologies. Consider $f:X\to Y$ defined as $f(0)=a,f(1)=b,f(2)=a$. $f$ is a local homeomorphism. Moreover, $f$ is a homeomorphism of $\{0,1\}$ onto $Y$ and a homeomorphism of $\{1,2\}$ onto $Y$, despite $X$ and $Y$ are not homeomorphic.
Notice that in this example $Y$ is disconnected.
A: Consider the line with two origins, $X = ( - \infty , 0 ) \cup \{ 0_\star , 0^\star \} \cup ( 0 , + \infty )$, and the function $f : X \to \mathbb{R}$ defined by $$f(x) = \begin{cases}
x, &\text{if }x \neq 0_\star, 0^\star \\
0, &\text{if }x = 0_\star\text{ or }x = 0^\star.
\end{cases}$$
The sets $U = ( - \infty , 0 ) \cup \{ 0_\star \} \cup ( 0 , + \infty )$ and $V = ( - \infty , 0 ) \cup \{ 0^\star \} \cup ( 0 , + \infty )$ are open subsets of $X$, and $f \restriction U$ and $f \restriction V$ are homeomorphisms.  But $f$ itself is clearly not a homeomorphism (or even a bijection).

As $f[U] \cap f[V] = \mathbb{R}$ is clearly connected, there must be some extra assumptions on your topological space that have been omitted from the statement of the theorem/fact.
A: I don't understand why the connectness implies the claim. My idea is the following. Let $X$ be the real line $\mathbb{R}$, $Y$ be the unit circle $\mathbb{T}=\{z\in\mathbb{C}:|z|=1\}$ and $f$ be the covering map, $f(x)=e^{2x\pi i}$ for each $x\in\mathbb{R}$. Let $W$ be a segment (not essentially, open or closed) of the length $l$. Then the restriction $f|W$ is a homeomorphism, provided $l<1$, and it is not an injection, provided $l>1$.
