The Gluing Lemma

# The Gluing Lemma

 Lemma 1: Let $X$ and $Y$ be topological spaces and let $A, B \subset X$ be closed subsets of $X$ such that $X = A \cup B$. Furthermore, let $f : A \to Y$ and $g : B \to Y$ be continuous maps such that $f(x) = g(x)$ for all $x \in A \cap B$. Then the function $h : X \to Y$ given by $\left\{\begin{matrix} f(x) & \mathrm{if} \: x \in A \\ g(x) & \mathrm{if} \: x \in B \end{matrix}\right.$ is continuous.

We require that $f(x) = g(x)$ for all $x \in A \cap B$ so that $h$ is well defined! • Proof: To show that $h$ is continuous we will show that for every closed set $V \subseteq Y$ we have that $h^{-1}(V)$ is closed in $X$.
• Let $V \subseteq Y$ be a closed set. Since $f$ is a continuous map we have that $f^{-1}(V)$ is closed in $A$. But $A$ has the subspace topology (from $X$), and so there exists a closed set $F \subseteq X = A \cup B$ such that:
(1)
\begin{align} \quad f^{-1}(V) = A \cap F \end{align}
• We're given that $A$ is closed though, and so the intersection $f^{-1}(V) = A \cap F$ is closed in $X$.
• Similarly, since $g$ is a continuous map we have that $g^{-1}(V)$ is closed in $B$. But $B$ has the subspace topology (from $X$), and so there exists a closed set $G \subseteq X = A \cup B$ such that:
(2)
\begin{align} \quad g^{-1}(V) = B \cap G \end{align}
• We're given that $B$ is closed though, and so the intersection $g^{-1}(V) = B \cap G$ is closed in $Y$.
• We last observe that for any set $V \subseteq Y$ that:
(3)
\begin{align} \quad h^{-1}(V) = f^{-1}(V) \cup g^{-1}(V) \end{align}
• Since $f^{-1}(V)$ and $g^{-1}(V)$ are both closed in $X$ we conclude that $f^{-1}(V)$ is also closed in $X$. $\blacksquare$