Pasting Lemma/Corollary 2

Theorem
Let $X$ and $Y$ be topological spaces. Let $\AA = \set {A_i: i \in I}$ be a set of sets that are open in $X$.

Let $\ds f: \bigcup \AA \to Y$ be a mapping such that:
 * $\forall i \in I : f \restriction A_i$ is continuous

Then $f$ is continuous on $\ds \bigcup \AA$.