Definition of Topological Embedding

Definition. Let $X$ and $Y$ be topological spaces. Suppose $f:X\to Y$ is an injective continuous map. If the function $f':X\to\ f(X)$ obtained by restricting the range of $f$ is a homeomorphism, then the map $f:X\to Y$ is called a topological embedding.

In defining topological embeddings, is it necessary to first suppose $f:X\to Y$ is an injective and continuous? Is there such a function $f:X\to Y$ that is not injective or continuous, but the function $f':X\to f(X)$ is a homeomorphism?

The requirement $f:X\to Y$ be injective and continuous seems redundant to me, for if the function $f':X\to\ f(X)$ obtained by restricting the range of $f$ is a homeomorphism, then it automatically guarantees $f$ is continuous and injective. In short, why not define a topological embedding as follows?

Definition. A map $f:X\to Y$ between topological spaces is called a topological embedding if the function $f':X\to\ f(X)$ obtained by restricting the range of $f$ is a homeomorphism.

• Yes, that is ok. Notice how if requires f to injective and continuous. f is an open embedding when f(X) is open. Likewise closed. – William Elliot Sep 20 '18 at 3:14
• What do you mean by "notice how if requires $f$ to injective and continuous"? Do you mean how $f'$ being a homeomorphism requires $f$ to be injective and continuous? – gladimetcampbells Sep 20 '18 at 3:22
• Yes, there was a typo. – William Elliot Sep 20 '18 at 7:59
• @WilliamElliot Ok. Thank you. – gladimetcampbells Sep 20 '18 at 14:42

The last definition I think captures the essence of being an embedding. It indeed implies the original $f$ is continuous (provided we assume $f[X]$ has the subspace topology wrt $Y$, as we must) and injective.