Proof verification: Restriction of f to two closed subsets of X covering X continuous implies f on X is continuous Let $A,B \subseteq X$ be closed in $X$ with $A \cup B = X$.
Suppose there exists a function, $f: X \rightarrow Y$, with both
$f {\restriction_{A}}: A \rightarrow Y$ and $ f {\restriction_{B}}: B \rightarrow Y$ continuous.
Prove that $f$ is continuous.
Proposed proof:
It is sufficient to show that if $F \subseteq Y$ is closed in $Y$, then  $f^{-1}(F)$ is closed in $X$.
Let $F \subseteq Y$ be closed in $Y$.
 By continuity of $f{\restriction_{A}}$ and $f{\restriction_{B}}$, one has it that $f^{-1}{\restriction_{A}}(F)$ and $f^{-1}{\restriction_{B}}(F)$ are closed in their subspace topologies.
I.e. $f^{-1}{\restriction_{A}}(F) = A \backslash (\bigcup_\limits{{i \in I}}U_i \cap A) $ and similarly, $f^{-1}{\restriction_{B}}(F) = B \backslash (\bigcup_\limits{{j \in J}}U_j \cap B) $
Also being restrictions of $f$ we have that:
$$f^{-1}{\restriction_{A}}(F) = f^{-1}(F) \cap A$$
$$f^{-1}{\restriction_{B}}(F) = f^{-1}(F) \cap B$$
$\Rightarrow f^{-1}{\restriction_{A}}(F) \cup f^{-1}{\restriction_{B}}(F) = (f^{-1}(F) \cap B) \cup (f^{-1}(F) \cap A) = f^{-1}(F) \cap (A \cup B) = f^{-1}(F)$
Since $A \cup B = X$.
It now suffices to show that $f^{-1}{\restriction_{A}}(F) = A \backslash (\bigcup_\limits{{i \in I}}U_i \cap A) $ is closed in $X$ and similarly for $f^{-1}{\restriction_{B}}(F)$, as the union of two closed sets is closed.
$$X \backslash f^{-1}{\restriction_{A}}(F) = X \backslash (A \backslash (\bigcup_\limits{{i \in I}}U_i \cap A)) $$
$$= X \backslash ((A \backslash \bigcup_\limits{{i \in I}}U_i)   \cup (A   \backslash A)  $$
$$= (X \backslash A) \cup \bigcup_\limits{{i \in I}}U_i  $$
Which is just the union of open sets in X (since A is closed by assumption).
Hence $X \backslash f^{-1}{\restriction_{A}}(F)$ is open $\Rightarrow f^{-1}{\restriction_{A}}(F)$ is closed. 
One can show $f^{-1}{\restriction_{B}}(F)$ is closed similarly, thereby completing the proof.
 A: What is the meaning of the family $(U_i)_{i \in J}$ ??? 
And why so complicated ??
If $f^{-1}{\restriction_{A}}(F)$ is closed in the subspace topology of $A$, then there is a closed subset $Z$ of $X$ such that $f^{-1}{\restriction_{A}}(F)=A \cap Z$ .
Since $A$ is closed (in $X$), we have that $f^{-1}{\restriction_{A}}(F)=A \cap Z$ is closed in $X$.
A: If $R$ is a subset of (the closed set) $A$ that is closed in $A$ then also it will be closed in $X$.
This because $R$ is closed in $A$ iff it can be written as $A\cap S$ where $S$ is a closed subset of $X$.
So $R$ appears to be the intersection of two sets that are both closed in $X$, hence $R$ is closed in $X$.

This can be applied here. 
If $F$ is a closed subset of $Y$ then: $$f^{-1}(F)=(f{\restriction_{A}})^{-1}(F)\cup(f{\restriction_{B}})^{-1}(F)$$where $(f{\restriction_{A}})^{-1}(F)$ is closed in $A$ hence closed in $X$ and $(f{\restriction_{B}})^{-1}(F)$ is closed in $B$ hence closed in $X$.
Then as a union of two sets both closed in $X$ the preimage $f^{-1}(F)$ is closed in $X$.
