Let $X$ be a topology space and let $S_1,...,S_n\subseteq X$ close sets in $X$ such that $S_1\cup...\cup S_n=X$
Let $Y$ be a topology space and let $f:X\to Y$ a function such that $f:S_{|S_k}\to Y$ continuous for all $1\leq k \leq n$
Prove: $f$ is continuous
I tried to show $f$ sends a close set to a close set, to do so I tried to look at the pre-image of each $f(S_k)$ and shoe it is closed but how can I do it?
Let $C$ be closed in $Y$. Then $f|_{S_k} ^{-1} (C)=S_k \cap f^{-1} (C) $ is closed for each $k$. From this we see that $ f^{-1}(C)\equiv \cup_{k=1}^{n} (S_k \cap f^{-1}(C))$ is closed. Since inverse image of every clased set is closed it follows that $f$ is continuous.