Continuity from Union of Restrictions

Theorem
Let $T_1$ and $T_2$ be topological spaces.

Then $f: T_1 \to T_2$ is continuous if either:


 * $\ds T_1 = \bigcup_{i \mathop = 1}^n V_i$ where:
 * each $V_i$ is closed in $T_1$
 * the restriction $f \restriction_{V_i}$ is continuous for each $V_i$

or:


 * $\ds T_1 = \bigcup_{i \mathop \in I} U_i$ where:
 * $I$ is any (possibly infinite) indexing set
 * each $U_i$ is open in $T_1$
 * the restriction $f \restriction_{U_i}$ is continuous for each $U_i$.

First assertion
Let $\ds T_1 = \bigcup_{i \mathop = 1}^n V_i$, with the $V_i$ closed in $T_1$.

Assume that for each $i$, the restriction $f \restriction_{V_i}$ is continuous.

Then $f$ satisfies the hypotheses of Continuous Mapping on Finite Union of Closed Sets.

Hence $f$ is continuous.

Second assertion
Let $\ds T_1 = \bigcup_{i \mathop \in I} U_i$, with the $U_i$ open in $T_1$.

Assume that for each $i \in I$, the restriction $f \restriction_{U_i}$ is continuous.

Then $f$ satisfies the hypotheses of Continuous Mapping on Union of Open Sets.

Hence $f$ is continuous.