Let (X,dX),(Y,dY ) be metric spaces and f: X → Y be a continuous
bijection. Prove that if (X, dX ) is compact, then f is a
homeomorphism. (Hint: it might be convenient to use that a function
is continuous if and only if the inverse image of every open set is
open, if and only if the inverse image of every closed set is
closed).