Please bear with me. Undergraduate student. Regarding the question and answer here.
If $S$ is a semi-group and for each $a \in S$, in the first part of the proof by contradiction: If $n>m$ and $a^n=a^m$ for any positive integers $n$ and $m$, how does this imply that $a^{n-(m-1)}\cdot a^{m-1} = a\cdot a^{m-1}$. I'm struggling to understand how one gets to this equation from $a^n=a^m$? Do you first multiply on the left and right with something?
Thank you for the help.
$a^k=\underbrace{a·a·\ldots·a}_\text{$k$ times}$ so
$a^{n-(m-1)}a^{m-1}=\big(\underbrace{a·\ldots·a}_\text{$n-(m-1)$ times}\big)\big(\underbrace{a·\ldots·a}_\text{$m-1$ times}\big)=\underbrace{a·\ldots·a}_\text{$n-(m-1)$ times}·\underbrace{a·\ldots·a}_\text{$m-1$ times}=\underbrace{a·\ldots·a}_\text{$n-(m-1)+(m-1)$ times}=\underbrace{a·\ldots·a}_\text{$n-(m-1)+(m-1)$ times}=\underbrace{a·\ldots·a}_\text{$n$ times}=a^n$
by associativity.
On the other hand, $a·a^{m-1}=a·\big(\underbrace{a·\ldots·a}_\text{$m-1$ times}\big)=a·\underbrace{a·\ldots·a}_\text{$m-1$ times}=\underbrace{a·\ldots·a}_\text{$m$ times}=a^m$
by associativity too.
Since $a^n=a^m$, we have the result.