1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 set "baseuri" "cic:/matita/algebra/groups/".
17 include "algebra/monoids.ma".
18 include "nat/le_arith.ma".
19 include "datatypes/bool.ma".
20 include "nat/compare.ma".
22 record PreGroup : Type ≝
23 { premonoid:> PreMonoid;
24 inv: premonoid -> premonoid
27 record isGroup (G:PreGroup) : Prop ≝
28 { is_monoid: isMonoid G;
29 inv_is_left_inverse: is_left_inverse (mk_Monoid ? is_monoid) (inv G);
30 inv_is_right_inverse: is_right_inverse (mk_Monoid ? is_monoid) (inv G)
34 { pregroup:> PreGroup;
35 group_properties:> isGroup pregroup
41 interpretation "Monoid coercion" 'monoid G =
42 (cic:/matita/algebra/groups/monoid.con G).*)
45 for @{ 'type_of_group $G }.
47 interpretation "Type_of_group coercion" 'type_of_group G =
48 (cic:/matita/algebra/groups/Type_of_Group.con G).
51 for @{ 'magma_of_group $G }.
53 interpretation "magma_of_group coercion" 'magma_of_group G =
54 (cic:/matita/algebra/groups/Magma_of_Group.con G).
56 notation "hvbox(x \sup (-1))" with precedence 89
59 interpretation "Group inverse" 'ginv x =
60 (cic:/matita/algebra/groups/inv.con _ x).
62 definition left_cancellable ≝
63 λT:Type. λop: T -> T -> T.
64 ∀x. injective ? ? (op x).
66 definition right_cancellable ≝
67 λT:Type. λop: T -> T -> T.
68 ∀x. injective ? ? (λz.op z x).
70 theorem eq_op_x_y_op_x_z_to_eq:
71 ∀G:Group. left_cancellable G (op G).
73 unfold left_cancellable;
76 rewrite < (e_is_left_unit ? (is_monoid ? G));
77 rewrite < (e_is_left_unit ? (is_monoid ? G) z);
78 rewrite < (inv_is_left_inverse ? G x);
79 rewrite > (associative ? (is_semi_group ? (is_monoid ? G)));
80 rewrite > (associative ? (is_semi_group ? (is_monoid ? G)));
86 theorem eq_op_x_y_op_z_y_to_eq:
87 ∀G:Group. right_cancellable G (op G).
89 unfold right_cancellable;
91 simplify;fold simplify (op G);
93 rewrite < (e_is_right_unit ? (is_monoid ? G));
94 rewrite < (e_is_right_unit ? (is_monoid ? G) z);
95 rewrite < (inv_is_right_inverse ? G x);
96 rewrite < (associative ? (is_semi_group ? (is_monoid ? G)));
97 rewrite < (associative ? (is_semi_group ? (is_monoid ? G)));
102 theorem inv_inv: ∀G:Group. ∀x:G. x \sup -1 \sup -1 = x.
104 apply (eq_op_x_y_op_z_y_to_eq ? (x \sup -1));
105 rewrite > (inv_is_right_inverse ? G);
106 rewrite > (inv_is_left_inverse ? G);
110 theorem eq_opxy_e_to_eq_x_invy:
111 ∀G:Group. ∀x,y:G. x·y=1 → x=y \sup -1.
113 apply (eq_op_x_y_op_z_y_to_eq ? y);
114 rewrite > (inv_is_left_inverse ? G);
118 theorem eq_opxy_e_to_eq_invx_y:
119 ∀G:Group. ∀x,y:G. x·y=1 → x \sup -1=y.
121 apply (eq_op_x_y_op_x_z_to_eq ? x);
122 rewrite > (inv_is_right_inverse ? G);
127 theorem eq_opxy_z_to_eq_x_opzinvy:
128 ∀G:Group. ∀x,y,z:G. x·y=z → x = z·y \sup -1.
130 apply (eq_op_x_y_op_z_y_to_eq ? y);
131 rewrite > (associative ? (is_semi_group ? (is_monoid ? G)));
132 rewrite > (inv_is_left_inverse ? G);
133 rewrite > (e_is_right_unit ? (is_monoid ? G));
137 theorem eq_opxy_z_to_eq_y_opinvxz:
138 ∀G:Group. ∀x,y,z:G. x·y=z → y = x \sup -1·z.
140 apply (eq_op_x_y_op_x_z_to_eq ? x);
141 rewrite < (associative ? (is_semi_group ? (is_monoid ? G)));
142 rewrite > (inv_is_right_inverse ? G);
143 rewrite > (e_is_left_unit ? (is_monoid ? G));