Section FiniteCyclicGroupProperties.
Context`{FCG : FiniteCyclicGroup}.
induction c1; intuition; simpl in *.
rewrite <- plus_assoc.
rewrite (groupExp_plus order).
rewrite groupOrder; trivial.
rewrite groupIdent; trivial.
rewrite left_identity.
rewrite IHc1;
trivial.
Qed.
intuition.
destruct (modNat_correct x order).
destruct (modNat_correct y order).
rewrite H1.
rewrite H2.
rewrite H0.
repeat rewrite groupExp_eq_h; eauto using modNat_lt.
Qed.
intuition.
rewrite <- (group_cyclic g x).
rewrite <- (group_cyclic g y).
repeat rewrite <- groupExp_plus.
f_equal.
omega.
apply g_generator.
apply g_generator.
Qed.
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.