Glueing Lemma:

Let X = A ∪ B,  where A and B are closed in X.   Let f:  A → Y and g:  B → Y   be continuous.  If f(x) = g(x)  for every x ∈ A ∩ B, then  f  and  g  combine to give a continuous function h:  X → Y,  defined by setting h(x) = f(x)  if x ∈ A,  and h(x) = g(x)  if x ∈ B.