I am reading a text on semigroups and encountered the following:
Consider the semigroup $S$ defined by the presentation $\langle a_1,a_2,...,a_n|a_i^2=a_i, a_ia_j = a_ja_i(1\leq i,j\leq n)\rangle$. By definition, every element $s \in S$ is a product of elements $a_1, a_2,... , a_n$. Using the relations $a_ia_j = a_ja_i$ we deduce that $s = a_1^{\varepsilon_1} a_2^{\varepsilon_2} \ldots a_n^{\varepsilon_n}$ where $\epsilon_1, \epsilon_2,...,\epsilon_n \geq 0$ and at least one $\epsilon_i \neq 0$.
I don't fully understand this form. My understanding is that the elements of S are congruence classes of the form $\frac{w}{(a_i^2=a_i, a_ia_j = a_ja_i(1\leq i,j\leq n))^\#}$ for $w\in\{a_1,...,a_n\}^+$, where ${(a_i^2=a_i, a_ia_j = a_ja_i(1\leq i,j\leq n))^\#}$ is the least congruence on $\{a_1,...,a_n\}^+$ containing ${(a_i^2=a_i, a_ia_j = a_ja_i(1\leq i,j\leq n))}$. In particular, each element of S is therefore a subset of elements of $\{a_1,...,a_n\}^+$. This does not seem to be how the text denotes the elements of S. Is this just a notational thing, in which these congruence classes are being denoted by representatives? Is this common practice with semigroups?
A representative of a congruence class is any member of the class. The point is that in this semigroup, every congruence class has a representative of the form $a_1^{\epsilon_1}...a_n^{\epsilon_n}$ where $\epsilon_i\ge 0$ and at least one $\epsilon_i>0$. This is because, in any word $w\in \{a_1,...,a_n\}^+$ one can reorder the letters, and obtain a new word congruent to the first which is in the desired form. You may see people specifying elements of a semigroup with presentation $\langle G|R\rangle$ by specifying an element of $G^+$. The word $w\in G^+$ represents the congruence class $\{v\in G^+|w\equiv v\}$ corresponding to $w$. Different words may be congruent, therefore represent the same class, i.e. represent the same element of $\langle G|R\rangle$.
In this case, we can say more: every congruence class has a unique representative of the form $a_1^{\epsilon_1}...a_n^{\epsilon_n}$ where $\epsilon_i\in \{0,1\}$. If $\epsilon>0$ then $a_i^\epsilon$ is congruent to $a_i$ as $a_i^2$ is congruent to $a_i$. Therefore, instead of thinking of elements of $\langle a_1,...,a_n|a_i^2=a_i,\,a_ia_j=a_ja_i, \, 1\le i,j\le n\rangle$ as congruence classes, it is easier to think of them as words in this special form.