§ Pasting lemma

Let f:XYf: X \rightarrow Y be a function. Let A,BA, B are closed subets of XX such that X=AVX = A \cup V. Then ff is continuous iff fAf|_A and fBf|_B are continous.

§ Forward: ff continuous implies restriction continuous

This is clear from how restrictions work. Pick i:AXi: A \rightarrow X to be the function that embeds AA with the subspace topology into XX. This is continuous by the definition of the subspace topology. Now define fA:AYfif|_A : A \rightarrow Y \equiv f \circ i. which is continous since it is the composition of continuous functions.

§ Backward: restrictions continuous implies ff continuous.

Let VYV \subseteq Y be closed. Then fA1(V)f_A^{-1}(V) is closed in AA by the continuity of fAf_A Now see that fA1(V)f_A^{-1}(V) is closed in the subspace topology of AA means that there is some closed PXP \subseteq X such that fA1(V)=APf|_A^{-1}(V) = A \cap P. Since both AA and PP are closed in XX, this means that f1(V)f^{-1}(V) is closed in XX (see that we have filted "closed in AA" to "closed in XX). Similarly, we will have that fB1(V)=BQf|_B^{-1}(V) = B \cap Q for some closed BB and QQ. Then we can write: \begin{aligned} &f^{-1}(V) \\ &= f|A^{-1}(V) \cup f|B^{-1}(B) \\ &= (A \cap P) \cup (B \cap Q) \\ &= \texttt{finite union of closed sets} \\ &= \texttt{closed} \\ \end{aligned}