the cone is contractible
This is an "elementary" exercise, that I've found in lots of lists of problems in a first year of General Topology and in fact shouldn't be asked at that time.
May I ask you how are you going to prove that the map $H$ is continuous?
Chances are that you're not able to do so -but it's not your fault, if this is the first time you're studying Topology.
The reason is that you need some extra resources that, usually, are not taught at this level and are the following:
- In order to define your map $H$, you are actually first considering a map
$$ H' : (X \times I) \times I \longrightarrow X \times I \ , \qquad H'((x,t),s) = (x, t(1-s)) $$
which is a honest, continuous map, just because of the universal property of the product of spaces. (BTW, you shouldn't "hide" the $I$.)
- Then you're composing it with the identification map
$$ \pi : X\times I \longrightarrow CX \ , \qquad \pi (x,t) = [x,t] \ , $$
which is fair, since this is also continuous by definition of the quotient topology on $CX$.
- Next, you can say that this composition $\pi H'$ passes to the "quotient" $CX \times I$ (and here you're entering the risky zone), because it sends all the points you're identifying $(x,0), x \in X$, to the same point, the tip of your cone $[x,0]$:
$$ \pi H' ((x,0),s) = [x,0] \ , \quad \text{for all}\quad x \ . $$
So it induces a well-defined map: your $H$. Right. But: why is this map $H$ continuous?
The reason is that because the natural map $\pi \times \mathrm{id} : (X\times I) \times I \longrightarrow CX \times I$ is an identification; that is, $CX\times I$ has the quotient topology induced by this $\pi \times \mathrm{id}$ and hence, by the universal property of the quotient topology, $H$ is continuous. (Otherwise said: the product topology of $CX \times I$ agrees with the quotient topology induced by $\pi\times\mathrm{id}$.)
But it's not generally true that if you have and identification $\pi : X \longrightarrow Y$, then $\pi \times \mathrm{id} : X\times K \longrightarrow Y\times K$ is necessarily an identification too. This is true when $K$ is a locally compact Hausdorff space, which our $K = I$ fortunately happens to be. So, despite what it looks like, $CX \times I$ is an honest quotient too and everything works. (You can find this result in Bredon's "Topology and Geometry", Springer GTM, proposition 13.19.)
You have to modify your homotopy a bit to make this work:
Define $H : CX \times I \to CX$ by $H([x,t],s) = [x,(1-s)(t) + t]$ and that should work. Actually on second thoughts your homotopy above should work but your notation is confusing: Define
$$H : CX \times I \to CX$$
by $H([x,t],s) = [x,t(1-s)]$ and that should work, at $s = 0$ you get the identity map on $CX$ and at $s = 1$ you get the constant map at the tip of the cone which for you is $[x,0]$ (my cone tip is $[x,1]$ ) which is different from yours but it does not matter.
First define the auxiliary function $f:I\times I\longrightarrow I$ given by $$f(s, t)=(1-s)t+s.$$ Define $H:C(X)\times I\longrightarrow C(X)$ setting $$H([x, t], s)=[x, f(s, t)].$$ It is easy to check $H$ is homotopy from $I_{C(X)}$ to a constant.
Obs: You must take care with the function $f$ to be chosen. You must assure $f$ assumes its values on $I$. For instance, $f(s, t)=2t-s$ wouldn't work because, for example, $f(0, 1)=2$ and there is no such $[(x, 2)]$ on $C(X)$.