For an arbitrary discrete space X, construct a compact topological space Y and a topological embedding Y.
I am think about construct $X={0,1}$ equipped with the discrete topology. Topology on Y={∅,{0,1},{1}} which is the Sierpinski space. Thus Y is immediately compact. I try to define the map as $f(∅)=∅, f(X)=X, f({0})=f({1})={1}$. Then the $ab:X->f(X)$ is homeomorphism. Would anyone help me to check if my idea is correct?