Let $X$ be the Sierpinski space, $X=\{x,y\}$ with the topology $\tau_X=\{X,\varnothing,\{x\}\}.$ Prove that $X$ is contractible.
I found the proof in this link A question about the contractibility of the Sierpinski space
Define $H:X\times [0,1]\to X$ so that $H(z,0)=z$ for all $z\in X$, and $H(z,t)=x$ for all $z\in X$ and $t\in]0,1]$. Now $H^{-1}(\{x\})=\{(x,0)\}\cup X\times (0,1]$, which is an open subset of $X\times [0,1]$, as a complement of a closed set if you wish. This shows that $H$ is continuous. Also, since $H(z,0)=\mathrm{id}_{X}(z)$ and $H(z,1)=e_{x}(z)$ for all $z\in X$, then this shows that $H:\mathrm{id}_{X}\cong e_{x}$.
I am confused with the definition of $H$.
Why to equal to $x$ here $H(z,t)=x$ ? for all $z\in X$ and $t\in]0,1]$
We had equal to $x$ here too $H(z,0)=z$ for all $z\in X$.
Also why is $H^{-1}$ an open subset of $X\times [0,1]$, as a complement of a closed set ?
If you could explain please, thank you.
We want a homotopy between the identity map and the constant map $X\to X,\ z\mapsto x$.
We're in that lucky situation that this exchange is 'continuous', i.e. with any $0\le t_0<1$, the map $H(z,t)=z$ while $t\le t_0$ and $H(z,t)=x$ for $t>t_0$ is continuous.
In this solution, $t_0=0$ is chosen.
The complement of $H^{-1}(\{x\})=\{(x,0)\}\cup X\times (0,1]$ is $\{(y, 0)\}=\{y\}\times\{0\}$, as only $H(y, 0)=y$, all other values of $H$ (for $t_0=0$) are $x$. $\{y\} \times\{0\}$ is clearly closed.
Observe that the preimage of the empty set and the full codomain, w.r.t any function, are always the empty set and the full domain, respectively, so that we proved that each of the 3 open sets of $X$ has open preimage along $H$, thus it is continuous.