Hi, I'm trying to represent the dihedral group {1,r,r^2...s,sr^2...}
in mathematica so I can do for example:
s^3
and get s.
I tried this code:
Unprotect[Times, Power];
n = 4;
ClearAll[r, s, Times, Power];
SetAttributes[Times, {Flat}]
s^2 = 1;
r^n = 1;
Protect[Times, Power];
But this doesn't work for, for example, s^3. It is not able to
simplify it.
Thanks a lot!
Otto