I want to prove that a topological space $(X,T)$ is a category. Here $X$ is a the underlying set and $T$ a topology on $X$.
1) Let the objects be the elements of $X$.
2) For each $x,y \in X$ the morphisms from $x$ to $y$ consists of all homotopy equivalence classes of paths with starting point $x$ and end point $y$.
3) For each $x \in X$ we define $\text{Id}_x$ to be the equivalence class of the constant path.
4) Let $x,y,z \in X$ and let $[f] : x \rightarrow y$ and $[g]: \rightarrow z$. We define the compostion of $[f]$ and $[g]$ by $[f] \circ [g] = [f * g]$. Where $(f * g)(t) = \begin{cases} f(2t) \quad 0 \le t \le 1/2\\ g(2t-1) \quad 1/2 \le t \le 1\\ \end{cases}$ And the $[ \cdot ]$ denotes taking the homotopy equivalence class.
C1) That the composition is associative. We have $((f*g)*h)(t) = \begin{cases} f(4t) \quad 0 \le t \le 1/4 \\ g(4t - 1) \quad 1/4 \le t \le 1/2\\ h(2t - 1) \quad 1/2 \le t \le 1 \end{cases}$ and $ (f*(g*h))(t) = \begin{cases} f(2t) \quad 0 \le t \le 1/2\\ g(4t - 2) \quad 1/2 \le t \le 3/4\\ h(4t - 3) \quad 3/4 \le t \le 1 \end{cases} $.
And the homotopy is given by H(t,s) = \begin{cases} f(4t/(s+1)) \quad 0 \le t \le (s+1)/4\\ g(4t - 1 -s) \quad (s+1)/4 \le t \le (s + 2)/4\\ h((4t -2 -s)/(2 -s)) \quad (s+2)/4 \le t \le 1. \end{cases} From this we deduce that the composition is associative.
C2) $\text{Id}_x \circ [f] = [f]$. Let $x,y \in X$ and $[f]:x\rightarrow y$. We define the following homotopy $K(t,s) = \begin{cases} x \quad 0 \le t \le (1-s)/2\\ f((2t+s-1)/(s+1))\quad (1-s)/2 \le t \le 1. \end{cases}$
The map $K$ is continuous since $f$ and it is a composition of continuous functions. The homotopy gives us that $\text{Id}_x \circ [f] = [f]$. Similarly we can show that $[f] \circ \text{Id}_x = [f]$.
Furthermore we can show that each morphism has an inverse. $f^{-1}(t) = f(1-t)$. Were we use the homotopy $ L(t,s) = \begin{cases} f(2ts) \quad 0 \le t \le 1/2\\ f(2s - 2ts) \quad 1/2 \le t \le 1. \end{cases} $
The result that all the homotopy equivalence classes of loops from a fixed point form a group is now an instance of the result in category that states that: for any object $x$ we have that $\text{Aut}(x)$ is a group.
Is my prove correct?