Pasting Lemma/Finite Union of Closed Sets

Theorem
Let $T = \struct {X, \tau}$ and $S = \struct {Y, \sigma}$ be topological spaces.

Let $I$ be a finite indexing set.

Let $\family {C_i}_{i \mathop \in I}$ be a finite family of closed sets of $T$.

Let $f: X \to Y$ be a mapping such that the restriction $f \restriction_{C_i}$ is continuous for all $i \in I$.

Then $f$ is continuous on $C = \ds \bigcup_{i \in I} C_i$, that is, $f \restriction_C$ is continuous.

Proof
Let $V \subset S$ be a closed set.

By Continuity Defined from Closed Sets, we have that $U_i = \paren {f \restriction_{C_i} }^{-1} \sqbrk V$ is also closed.

From the definition of a restriction, we have that $U_i = C_i \cap f^{-1} \sqbrk V$.

Therefore, we can compute:

That is, $U = \paren {f \restriction_{C_i} }^{-1} \sqbrk V$ is the union of finitely many closed sets.

Therefore, $U$ is itself closed by definition of a topology.

It follows by Continuity Defined from Closed Sets that $f \restriction_C$ is also continuous.

Also known as
This theorem is sometimes referred to as the pasting lemma.

Also see

 * Continuous Mapping on Union of Open Sets for an analogous statement for open sets.