TITLE: Is the following a group for all topologies?
QUESTION [8 upvotes]: Let $\mathcal{T}$ be a topology on $X$ and let $S$ be the set of all self-homeomorphisms on $X$. Let $\sim$ be an equivalence relation defined on S as follows:
$a\sim b$ iff there exists $f:[0,1]\to S$ such that:
$f(0) = a, f(1) = b(f(r))(x)$ is a continuous function of $r$ from $[0,1]$ to $X$ for each $x\in X.$
What this should amount to is that two self-homeomorphisms are equivalent iff you can continuously deform one into the other. For example:

All strictly increasing continuous bijections from R to R are equivalent 
All strictly decreasing continuous bijections from R to R are equivalent 
No strictly increasing continuous bijection is equivalent to any strictly decreasing bijection.

Let P be the set of all equivalences classes on S resulting from the equivalence relation $~$. Let a binary operation $*$ be defined as follows:
$[a]*[b] = [a \circ b]$ for $a,b \in S$.
Let $G$ be the group on $P$ with binary operation $*$.
First, I would like to know if $*$ is well defined for all topologies $\mathcal T$. If so, then $G$ is a group for all topologies $\mathcal T$. (If you could provide a proof that $*$ is well defined or direct me to one that would be great as well)
Second, if $*$ is well defined, is there a name for this group resulting from a given topology?
Third, if $*$ is well defined then I would like to know the following:
Does there exist a homogeneous connected topology $\mathcal T$ that results in a group other than $\mathbb Z_2$ or $\mathbb Z_1$ ?
If so please give a specific example.
The essence of this question is that any euclidean space can be "turned inside out" in a sense. For example, $\mathbb R$ with the euclidean metric can be stretched in various ways but never continuously deformed so that it has been "flipped around". I'd like to generalize this idea to all topologies and capture this behaviour as a group. Or course if there is a name for this sort of thing I would like to know. Also the reason I specifically ask for group other than $\mathbb Z_2$ or $\mathbb Z_1$ for a homogeneous topology is because if you don't require homogeneity you can easily construct examples. For example the following topology results in the symmetric group on 4 elements:
$X$ is a subset of $\mathbb R^2$ such that $X = \{(0,a):a \in \mathbb R\} \cup \{(a,0):a \in \mathbb R\}$ and
$\mathcal T$ is the topology induced by the euclidean metric on $X$.
Great thanks to all of you, I do believe the mapping class group is what I am looking for.

REPLY [3 votes]: Disclaimer: I'm not an expert, but this is the story as I understand it.
You are defining the mapping class group, but for this to actually work you want to put a topology on $S$ (the compact-open topology) and require the maps $f: [0,1] \to S$ to be continuous with respect to this topology.
To see why you need this, note that the mapping class group is usually defined by taking the group of homeomorphisms $Aut(X)$ with the compact-open topology, then modding out by the equivalence relation given by homotopy: i.e. a continuous function $f: [0,1] \times X \to X$ connecting two homeomorphisms. There's a duality on the level of sets between continuous functions $f: [0,1] \times X \to X$ such that $f(t)$ is an embedding for each $t$, and certain functions $f': [0,1] \to S$, but when you impose continuity on $f$, you need some conditions on $f'$ to get a bijection. In this case, you not only need that $ev_x \circ f'$ is continuous for all $x \in X$, but you need something slightly stronger, which is that $f'$ is continuous with respect to the compact-open topology.
You can then find more information about mapping class groups on, for example, Wikipedia. As noted in the comments, the mapping class groups of tori are not necessarily $Z_1$ or $Z_2$.
Note that if you take your definition of the equivalence relation, then you're really taking continuous maps $f: [0,1] \to S$ with the topology on $S$ defined as being the coarsest (smallest) topology making the maps $ev_x: S \to X$ continuous for all $x \in X$, where $ev_x(f) = f(x)$. But this is too coarse: the compact-open topology gives you more opens.