I have just started learning topology and I'm trying to prove that $\mathbb{R}$ is contractible. Since I have just started learning topology and homotopy these concepts are really abstract to me.
I have seen this and this, however, I need it more detailed and here is my try:
We have to show that there exists continuous maps $ f : \mathbb{R} \to \{\star\}$ and $g: \{\star\} \to \mathbb{R}$ such that $g \circ f$ and $f \circ g$ are homotopic to the identity maps on $\mathbb{R}$ and $\{\star\}$ respectively.
Let $f : \mathbb{R} \to \{\star\}$ given by $f(x) = \star$, $\forall x \in \mathbb{R}$
and $g : \{\star\} \to \mathbb{R}$ given by $g(\star) = 0$
Also $f, g$ are constant maps. Lets define now the homotopy $F: \mathbb{R} \times [0, 1] \to \mathbb{R}$ given as $F(x, t)= (1-t)x + t \cdot 0.$
At $t=0, F(x, 0) = (1-0)x + 0 \cdot 0 = x$ so F is the identity map on $\mathbb{R}$.
At $t=1, F(x, 1) = (1-1)x + 1\cdot 0 = 0$, so F maps all points to 0.
F is continuous.
So we have:
$g\circ f : \mathbb{R} \to \mathbb{R}$ given by $g(f(x)) = g(\star) = 0$ and this is homotopic to the identity map on $\mathbb{R}$ through the homotopy $F$.
$f \circ g : \{\star\} \to \{\star\}$ given by $f(g(\star)) = f(0) = \star$, and this is homotopic to the identity map on $\{\star\}$.
Therefore, $\mathbb{R}$ is contractible.
Is my reasoning okay? I would appreciate suggestions or further explanation :)
nit: You're using the letter $H$ without introducing it, and you're overusing the letter $F$ to mean multiple things here:
It would be clearer to write:
That way, you're not relying on the phrase "at $t=0$" to modify the meaning of the symbols in the rest of the sentence; it merely becomes a conversational guide to introduce what the sentence will be about.