Section Lemmas.
Variable G : GROUP.
intros n g; try assumption.
apply Trans with (Ap (sgroup_map (monoid_sgroup_hom (Z_to_group_nat g))) n);
auto with algebra.
apply Sym.
apply Z_to_group_fun_eq.
Qed.
Hint Resolve Z_to_group_nat_eq_pos: algebra.
simple induction n.
intros H'; try assumption.
inversion H'.
intros p H'; try assumption.
replace 0%Z with (- (0))%Z.
apply Z.lt_gt; auto with algebra.
auto with algebra.
intros p H'; try assumption.
replace 0%Z with (- (0))%Z.
apply Z.lt_gt; auto with algebra.
auto with algebra.
Qed.
Hint Resolve Zopp1: algebra.
simple induction n.
intros H'; try assumption.
inversion H'.
intros p H'; try assumption.
replace 0%Z with (- (0))%Z.
apply Z.gt_lt; auto with algebra.
auto with algebra.
intros p H'; try assumption.
replace 0%Z with (- (0))%Z.
apply Z.gt_lt; auto with algebra.
auto with algebra.
Qed.
Hint Resolve Zopp2: algebra.
intros x; try assumption.
elim x.
intros p p'; try assumption.
red in p'.
inversion p.
intros p p0 p'; simpl in |- *.
auto with algebra.
intros p p0 p'; try assumption.
red in p'.
simpl in p'.
inversion p'.
Qed.
Hint Resolve Zl2 Zl1 Zl3 nat_to_group_inverse: algebra.
simple induction n; simpl in |- *; auto with algebra.
Qed.
Hint Resolve nat_to_group_comp: algebra.
intros r r' n H'; try assumption.
elim n.
apply Trans with (monoid_unit G); auto with algebra.
intros p; try assumption.
apply Trans with (nat_to_group r (nat_of_P (pos_abs (ax3 p))));
auto with algebra.
apply Trans with (nat_to_group r' (nat_of_P (pos_abs (ax3 p))));
auto with algebra.
intros p; try assumption.
apply
Trans with (group_inverse G (nat_to_group r (nat_of_P (pos_abs (ax3 p)))));
auto with algebra.
apply
Trans with (group_inverse G (nat_to_group r' (nat_of_P (pos_abs (ax3 p)))));
auto with algebra.
Qed.
Hint Resolve Z_to_group_nat_fun_comp: algebra.
intros p r; try assumption.
apply
Trans with (group_inverse G (nat_to_group r (nat_of_P (pos_abs (ax3 p)))));
auto with algebra.
apply
Trans with (nat_to_group (group_inverse G r) (nat_of_P (pos_abs (ax3 p))));
auto with algebra.
Qed.
Hint Resolve Z_to_group_nat_neg: algebra.
simple induction n; simpl in |- *.
intros r; try assumption.
apply Trans with (monoid_unit G); auto with algebra.
auto with algebra.
intros p r; try assumption.
apply
Trans
with (Z_to_group_nat_fun (group_inverse G (group_inverse G r)) (Zpos p));
auto with algebra.
Qed.
Hint Resolve Z_to_group_nat_inv: algebra.
simple induction m; simpl in |- *.
rewrite mult_comm; simpl in |- *; auto with algebra.
intros n0 H'; try assumption.
rewrite mult_comm; simpl in |- *; auto with algebra.
simpl in |- *.
apply Trans with (sgroup_law G (nat_to_group r n) (nat_to_group r (n0 * n)));
auto with algebra.
apply Trans with (sgroup_law G (nat_to_group r (n0 * n)) (nat_to_group r n));
auto with algebra.
apply SGROUP_comp; auto with algebra.
rewrite mult_comm; simpl in |- *; auto with algebra.
Qed.
Hint Resolve nat_to_group_mult: algebra.
simple induction n; simpl in |- *; auto with algebra.
intros n0 H'; try assumption.
apply Trans with (sgroup_law G (monoid_unit G) (monoid_unit G));
auto with algebra.
Qed.
Hint Resolve nat_to_group_unit: algebra.
simple induction n; simpl in |- *; auto with algebra.
intros p; try assumption.
apply Trans with (nat_to_group (monoid_unit G) (nat_of_P (pos_abs (ax3 p))));
auto with algebra.
intros p; try assumption.
apply
Trans
with
(group_inverse G
(nat_to_group (monoid_unit G) (nat_of_P (pos_abs (ax3 p)))));
auto with algebra.
apply Trans with (group_inverse G (monoid_unit G)); auto with algebra.
Qed.
Hint Resolve Z_to_group_nat_unit: algebra.
unfold group_power in |- *; auto with algebra.
Qed.
Hint Resolve group_power_plus: algebra.
unfold group_power in |- *.
simpl in |- *.
intros g n; try assumption.
apply
Trans
with (sgroup_law G (Z_to_group_fun g n) (Z_to_group_fun g (ring_unit Zr)));
auto with algebra.
Qed.
Hint Resolve group_power_S: algebra.
unfold group_power in |- *.
simpl in |- *.
intros g; try assumption.
apply Trans with (Z_to_group_nat_fun g 0%Z); auto with algebra.
Qed.
Hint Resolve group_power_0: algebra.
intros g; try assumption.
apply
Trans with (group_power G g (sgroup_law ZZ (monoid_unit ZZ) (ring_unit ZZ)));
auto with algebra.
Qed.
Hint Resolve group_power_1: algebra.
unfold group_power in |- *.
intros g n; try assumption.
simpl in |- *.
apply Trans with (Z_to_group_nat_fun g (group_inverse ZZ n));
auto with algebra.
apply Trans with (Z_to_group_nat_fun (group_inverse G g) n);
auto with algebra.
Qed.
Hint Resolve group_power_inv: algebra.
simpl in |- *.
intros p q g; try assumption.
apply
Trans
with
(nat_to_group g
(nat_of_P
(pos_abs
(ax3
((fun (x : positive) (_ : positive -> positive)
(y : positive) => (x * y)%positive) p
(fun y : positive => y) q)))));
auto with algebra.
apply
Trans
with
(nat_to_group (Z_to_group_nat_fun g (Zpos p))
(nat_of_P (pos_abs (ax3 q)))); auto with algebra.
simpl in |- *.
rewrite
(fun (x y : positive) (_ : positive -> positive) =>
nat_of_P_mult_morphism x y).
apply Trans with (nat_to_group (nat_to_group g (nat_of_P p)) (nat_of_P q));
auto with algebra.
Qed.
Hint Resolve Z_group_nat_fun_mult_pos: algebra.

Lemma group_power_mult :
forall (g : G) (n m : ZZ),
Equal (group_power G g (ring_mult n m))
(group_power G (group_power G g n) m).