Pasting Lemma
Thm 1
Let $X$ be a topological space and $Y$ be subspace of $X$.
Let $U_{\alpha}$ be open set in $X$ for $\alpha \in \Lambda$ such that
$X = \displaystyle \bigcup_{\alpha \in \Lambda} U_{\alpha}$
Let $f_{\alpha} : U_{\alpha} \to Y$ be continuous such that
$x \in U_{\alpha} \cap U_{\beta}$ $\Rightarrow$ $f_{\alpha}(x) = f_{\beta}(x)$
( Consider $U_{\alpha}$ as the subspace of $X$ )
Define $f : X \to Y$ by
$f(x) = f_{\alpha}(x)$
Then
$f$ is continuous
Let $U$ be an open set in $Y$
By definition of $f$,
$f^{-1}(U) = \displaystyle \bigcup_{\alpha \in \Lambda} f_{\alpha}^{-1}(U)$
Since $f_{\alpha}$ is continuous,
$f_{\alpha}^{-1}(U)$ is open set in $U_{\alpha}$
Since $U_{\alpha}$ is open set in $X$, by Thm 2 - 2
$f_{\alpha}^{-1}(U)$ is open set in $X$
$\therefore$ $f^{-1}(U)$ is open set in $X$
$\therefore$ $f$ is continuous
Thm 2 Pasting Lemma
$X$ : topological space, $Y \subseteq X$
Let $A$ and $B$ be closed set in $X$ such that
$X = A \cup B$
Let $f : A \to Y$, $g : B \to Y$ be continuous such that
$x \in A \cap B$ $\Rightarrow$ $f(x) = g(x)$
( Consider $A$, $B$ as the subspace of $X$ )
Define $h : X \to Y$ by
$h(x) = \begin{cases}
f(x) & x \in A \\
g(x) & x \in B
\end{cases}$
Then
$h$ is continuous
Let $C$ be a closed set in $Y$
By definition of $h$,
$h^{-1}(C) = f^{-1}(C) \cup g^{-1}(C)$
Since $f$ is continuous,
$f^{-1}(C)$ is closed in $A$
Since $A$ is closed, by Thm 2 - 2
$f^{-1}(C)$ is closed in $X$
Similarly we can show
$g^{-1}(C)$ is closed in $X$
$\therefore$ $h^{-1}(C)$ is closed in $X$
By Thm 2 -5,
$h$ is continuous