My understanding of the fundamental group is that it's the set of all loops starting and ending at a point $x_0$ in a space $X$, along with the operation of composition. For it to be a group, composition of loops must be associative, loops must have inverses, and the identity must exist. In our case, the identity is the constant map at $x_0$, and composition is defined as follows:
$f(x) = \left\{ \begin{array}{ll} f_1(2x) & \text{if } x \in [0,\frac{1}{2}]\\ f_2(2x-1) & \text{if } x \in [\frac{1}{2},1]\\ \end{array} \right.$
I'm struggling to understand how we can prove this because the proofs I've seen (http://en.wikibooks.org/wiki/Topology/The_fundamental_group for example) will construct homotopies between things they wish to show are equal. Why is this allowed, instead of following the definition of loop composition? Let's say you have a loop $g$, and then $g^{-1}$ must just be $g$ run backwards. If you compose them, you go along $g$, and then you go back at the same speed. How can we use a homotopy to claim that this is the same as staying stationary at $x_0$?
The fundamental group is not a group of loops, but of equivalence classes of loops. In particular, two paths are equivalent if they are homotopic. So showing associativity, for example, requires showing that $$[f]([g] [h]) = ([f] [g]) [h],$$ where $[f]$ is the equivalence class containing $f$, that is, all loops homotopic to $f$.
The operation of the fundamental group is $[f][g] = [f \star g]$, where $\star$ is the composition of paths. Of course, one must prove that this operation is well-defined. Once you have shown that it is, to show associativity is to show that $$[f \star (g \star h)] =[(f \star g) \star h]$$ which is to show that $f \star (g \star h)$ is homotopic to $(f \star g) \star h$.