simple induction n; simpl in |- *; auto with *.
intros m; try assumption.
apply Trans with (sgroup_law G (nat_to_group m) (monoid_unit G)); auto with *.
apply Trans with (nat_to_group m); auto with *.
apply Trans with (sgroup_law G (monoid_unit G) (nat_to_group m)); auto with *.
intros n0 H' m; try assumption.
apply
Trans
with
(sgroup_law G (nat_to_group m)
(sgroup_law G (group_inverse G r) (group_inverse G (nat_to_group n0))));
auto with *.
apply
Trans
with
(sgroup_law G (sgroup_law G (nat_to_group m) (group_inverse G r))
(group_inverse G (nat_to_group n0))); auto with *.
apply
Trans
with
(sgroup_law G (sgroup_law G (group_inverse G r) (nat_to_group m))
(group_inverse G (nat_to_group n0))); auto with *.
apply
Trans
with
(sgroup_law G (group_inverse G r)
(sgroup_law G (nat_to_group m) (group_inverse G (nat_to_group n0))));
auto with *.
apply
Trans
with
(sgroup_law G (group_inverse G r)
(sgroup_law G (group_inverse G (nat_to_group n0)) (nat_to_group m)));
auto with *.
apply
Trans
with
(sgroup_law G
(sgroup_law G (group_inverse G r) (group_inverse G (nat_to_group n0)))
(nat_to_group m)); auto with *.
Qed.
Hint Resolve nat_to_group_com4: algebra.
Comments "The group  morphism from the integers to an arbitrary group.".
Definition Z_to_group_nat : Hom (ZZ:GROUP) G.
apply (BUILD_HOM_GROUP (G:=ZZ:GROUP) (G':=G) (ff:=Z_to_group_nat_fun)).
simpl in |- *.
intros x y H'; try assumption.
rewrite H'; auto with *.
simple induction x; simple induction y; simpl in |- *.
unfold sgroup_law at 1 in |- *; simpl in |- *.
apply Trans with (sgroup_law G (Z_to_group_nat_fun 0%Z) (monoid_unit G));
auto with *.
intros p; try assumption.
rewrite Zplus_0_l.
apply Trans with (sgroup_law G (monoid_unit G) (Z_to_group_nat_fun (Zpos p)));
auto with *.
intros p; try assumption.
rewrite Zplus_0_l.
apply Trans with (sgroup_law G (monoid_unit G) (Z_to_group_nat_fun (Zneg p)));
auto with *.
rewrite Zplus_0_r.
apply Trans with (sgroup_law G (Z_to_group_nat_fun (Zpos p)) (monoid_unit G));
auto with *.
unfold sgroup_law at 1 in |- *; simpl in |- *.
intros p0; try assumption.
apply Trans with (nat_to_group (nat_of_P (pos_abs (ax3 (p + p0)))));
auto with *.
apply
Trans
with
(sgroup_law G (nat_to_group (nat_of_P (pos_abs (ax3 p))))
(nat_to_group (nat_of_P (pos_abs (ax3 p0)))));
auto with *.
simpl in |- *.
rewrite nat_of_P_plus_morphism.
auto with *.
intros p0; try assumption.
apply
Trans
with
(sgroup_law G (nat_to_group (nat_of_P (pos_abs (ax3 p))))
(group_inverse G (nat_to_group (nat_of_P (pos_abs (ax3 p0))))));
auto with *.
apply Trans with (sgroup_law G (Z_to_group_nat_fun (Zneg p)) (monoid_unit G));
auto with *.
intros p0; try assumption.
rewrite Zplus_comm.
apply
Trans
with
(sgroup_law G
(group_inverse G (nat_to_group (nat_of_P (pos_abs (ax3 p)))))
(nat_to_group (nat_of_P (pos_abs (ax3 p0)))));
auto with *.
apply
Trans
with
(sgroup_law G (nat_to_group (nat_of_P (pos_abs (ax3 p0))))
(group_inverse G (nat_to_group (nat_of_P (pos_abs (ax3 p))))));
auto with *.
unfold sgroup_law at 1 in |- *; simpl in |- *.
simpl in |- *; auto with *.
intros p0; try assumption.
apply
Trans
with (group_inverse G (nat_to_group (nat_of_P (pos_abs (ax3 (p + p0))))));
auto with *.
apply
Trans
with
(sgroup_law G
(group_inverse G (nat_to_group (nat_of_P (pos_abs (ax3 p)))))
(group_inverse G (nat_to_group (nat_of_P (pos_abs (ax3 p0))))));
auto with *.
simpl in |- *.
rewrite nat_of_P_plus_morphism.
apply
Trans
with
(group_inverse G
(sgroup_law G (nat_to_group (nat_of_P p)) (nat_to_group (nat_of_P p0))));
auto with *.
apply
Trans
with
(group_inverse G
(sgroup_law G (nat_to_group (nat_of_P p0)) (nat_to_group (nat_of_P p))));
auto with *.
auto with *.
Defined.
End Zup1.
Hint Resolve nat_to_group_com nat_to_group_add nat_to_group_com2
nat_to_group_minus nat_to_group_com3 nat_to_group_com4: algebra.
Section Zup2.
Variable G : GROUP.
Section pos_def.
Variable r : G.
Fixpoint pos_to_group (p : positive) : G :=
match p with
| xH => r
| xO p' => group_square G (pos_to_group p')
| xI p' => sgroup_law G (group_square G (pos_to_group p')) r
end.

Lemma pos_nat_group :
forall p : positive, Equal (pos_to_group p) (nat_to_group r (nat_of_P p)).