Pasting together two continuous functions Let $X, Y$ be topological spaces and $U, V$ two subsets of $X$ (not necessarily open or closed) with empty intersection. I have two continuous functions from $U$ and $V$ to $Y$. I want to paste them together and create a new continuous function from the union to $Y$. In which points I have to check for the continuity of the new function? For example, in $R$, given $U = (0, 1)$ and $V = [1, 2)$, I have to check continuity only at $x = 1$. Is there a general criterion for any topological space? (I know about the pasting lemma, but it's not what I am looking for)
Thanks in advance
 A: You just need to check at the points in the closure $\overline U $that are cointained in $V$ (Namely  $\overline U \cap V$) and similarly in the set obtained by replacing the roles of $U $ and $V$ (Namely $\overline V \cap U$).
A: Actually the pasting lemma is what you are looking for. At least partially. First of all we can assume that $X=U\cup Y$. You don't seem to care about other points anyway.
Let
$$f:U\to Y$$
$$g:V\to Y$$
Assume that $f,g$ can be extended to closures, i.e. we have 
$$F:\overline{U}\to Y$$
$$G:\overline{V}\to Y$$
such that $F_{|U}=f$ and $G_{|V}=g$. Then by the pasting lemma $F$ and $G$ can be glued if and only if they agree on $\overline{U}\cap\overline{V}$.
So when can we extend a function to the closure of its domain? Generally this is a tricky question. Let $x\in\overline{U}$ and $(x_\alpha)\subseteq U$ a net convergent to $x$ (such net always exists). Now if $f(x_\alpha)$ is a net convergent to $y\in Y$ then $F(x)=y$ will give you an extension. Note that even when $f(x_\alpha)$ is convergent then the resulting function need not be continuous. However if there exists a continuous extension then it has to be given as above. Also note that in Hausdorff case this extension is unique and the definition can be simplified to
$$F(x):=\lim_{\alpha} f(x_\alpha)$$
If $f$ cannot be extended to $\overline{U}$ then the glueing with $g$ won't be continuous, no matter what $g$ is.
Practical note: in order to check continuity of $F$ you only need to check continuity at $x\in\overline{U}\backslash U$ because $F$ (as an extension of $f$) is definitely continuous over $U$.
All in all: First you have to ensure that both functions can be (in Hausdorff case uniquely) extended to closures $\overline{U}, \overline{V}$. Then you check if extensions agree on the intersection $\overline{U}\cap\overline{V}$ in order to apply the pasting lemma.
Example: Let $f:(0,1)\to\mathbb{R}$, $f(t)=t$ and $g:[1,2)\to\mathbb{R}$, $g(t)=2t-1$. Here $X=(0,2)$. Now $[1,2)$ is closed in $X$ and the closure of $(0,1)$ is $(0,1]$. So we need to extend $f$ to $(0,1]$, we do that by defining $F(1)$. This can be done via
$$F(1)=\lim_n f(1-1/n)=\lim_n (1-1/n)=1$$
You then check that newly constructed $F$ is continuous. Since we know that $f$ is continuous then it is enough to check continuity at $1$. It is. Now since $(0,1]\cap[1,2)=\{1\}$ and $F(1)=g(1)$ then $F$ (and thus $f$) and $g$ can be glued together to obtain a continuous function on $X$.
