Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Thanks Ramiro, however, if one takes the identity map on $I(B)$, then also $P$ and $G$ are homeomorphic; in particular, if $B$ were zero dimensional then its identity map is such a case. But then $f$ is not constant, and neither does every open subset become closed.