Given this definition of two homeomorphic spaces, Deﬁnition 1.7.2. Two topological spaces X and Y are said to be homeomorphic if there are continuous map f : X → Y and g : Y → X such that f ° g = IY and g ° f = IX. Suppose I know f and g are both continuous. Would it be safe to assume then, that if f ° (g ° f) = f, X and Y are homeomorphic? Here's my reasoning: f ° (g ° f) = f implies g ° f = IX and due to the associativity of a composition, f ° (g ° f) = (f ° g) ° f = f or f ° g = IY.