Theorem
Ifis a function and the restriction of
to topological subspaces
and
of
are both continuous and A and B are either both open or both closed, then f is continuous.
Proof
Ifand
are not both closed or both open then
does not have to be continuous. For example, let
and
and letand
be the restrictions of
to
and
respectively.
is not continuous because
and this is not open.
Suppose thatand
are both closed. Let
be a closed subset of
is closed in
and
is closed in
since both
and
are continuous.
so
The last expression is a union of closed subsets ofso
is a closed subset of
and
is continuous.