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.
intuition.
erewrite <- groupLog_correct; eauto.
erewrite <- (groupLog_correct _ y); eauto.
f_equal.
f_equal.
trivial.
Qed.

Theorem ident_l_unique : forall x y,
x * y = y ->
x = ident.