Continuous Mapping on Finite Union of Closed Sets

Theorem
Let $T = \left({X, \tau}\right)$ and $S = \left({Y,\sigma}\right)$ be topological spaces.

For all $i \in \left\{{1, 2, \ldots, n}\right\}$, 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 = \displaystyle \bigcup_{i=1}^n C_i$, i.e., $f \restriction_{C}$ is continuous.

If $\left\{{C_i}\right\}$ 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 = \left({f \restriction_{C_i} }\right)^{-1} \left({V}\right)$ is also closed.

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

Therefore, we can compute:

That is, $U = \left({f \restriction_{C} }\right)^{-1} \left({V}\right)$ 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.