Theorem
If
is 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
If
and
are not both closed or both open then
does not have to be continuous. For example, let
and![]()
and let
and
be the restrictions of
to
and
respectively.
is not continuous because
and this is not open.
Suppose that
and
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 of
so
is a closed subset of
and
is continuous.