Continuous Mapping on Finite Union of Closed Sets

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

For all $i \in \set {1, 2, \ldots, n}$, let $C_i$ be closed in $T$.

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

Then $f$ is continuous on $C = \ds \bigcup_{i \mathop = 1}^n C_i$, that is, $f \restriction_C$ is continuous.

If $\family {C_i}$ is infinite, the result does not necessarily hold.

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 intersection 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.