induction n; intuition; simpl in *.
rewrite left_identity.
trivial.
rewrite IHn.
repeat rewrite associativity.
f_equal.
rewrite commutativity.
repeat rewrite associativity.
f_equal.
apply commutativity.
Qed.

Theorem groupExp_eq : forall g x y,
generator g ->
g^x = g^y ->
modNat x order = modNat y order.