Continuous Mapping on Union of Open Sets

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

Let $I$ be an indexing set.

For all $i \in I$, let $C_i$ be open in $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 = \displaystyle \bigcup_{i \mathop \in I} C_i$, i.e., $f \restriction_C$ is continuous.

Proof
Let $V \subset S$ be an open set.

By assumption, we have that, for all $i \in I$, $U_i = \left({f \restriction_{C_i} }\right)^{-1} \left({V}\right)$ is also open.

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 a union of open sets.

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

It follows that $f \restriction_C$ is also continuous by the definition of continuity.

Also see

 * Continuous Mapping on Finite Union of Closed Sets for an analogous statement for closed sets.