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 include "algebra/monoids.ma".
16 include "nat/le_arith.ma".
17 include "datatypes/bool.ma".
18 include "nat/compare.ma".
20 record PreGroup : Type ≝
21 { premonoid:> PreMonoid;
22 inv: premonoid -> premonoid
25 record isGroup (G:PreGroup) : Prop ≝
26 { is_monoid:> isMonoid G;
27 inv_is_left_inverse: is_left_inverse (mk_Monoid ? is_monoid) (inv G);
28 inv_is_right_inverse: is_right_inverse (mk_Monoid ? is_monoid) (inv G)
32 { pregroup:> PreGroup;
33 group_properties:> isGroup pregroup
36 interpretation "Group inverse" 'invert x = (inv _ x).
38 definition left_cancellable ≝
39 λT:Type. λop: T -> T -> T.
40 ∀x. injective ? ? (op x).
42 definition right_cancellable ≝
43 λT:Type. λop: T -> T -> T.
44 ∀x. injective ? ? (λz.op z x).
46 theorem eq_op_x_y_op_x_z_to_eq:
47 ∀G:Group. left_cancellable G (op G).
49 unfold left_cancellable;
52 rewrite < (e_is_left_unit ? G);
53 rewrite < (e_is_left_unit ? G z);
54 rewrite < (inv_is_left_inverse ? G x);
55 rewrite > (op_associative ? G);
56 rewrite > (op_associative ? G);
62 theorem eq_op_x_y_op_z_y_to_eq:
63 ∀G:Group. right_cancellable G (op G).
65 unfold right_cancellable;
67 simplify;fold simplify (op G);
69 rewrite < (e_is_right_unit ? G);
70 rewrite < (e_is_right_unit ? G z);
71 rewrite < (inv_is_right_inverse ? G x);
72 rewrite < (op_associative ? G);
73 rewrite < (op_associative ? G);
78 theorem eq_inv_inv_x_x: ∀G:Group. ∀x:G. x \sup -1 \sup -1 = x.
80 apply (eq_op_x_y_op_z_y_to_eq ? (x \sup -1));
81 rewrite > (inv_is_right_inverse ? G);
82 rewrite > (inv_is_left_inverse ? G);
86 theorem eq_opxy_e_to_eq_x_invy:
87 ∀G:Group. ∀x,y:G. x·y=ⅇ → x=y \sup -1.
89 apply (eq_op_x_y_op_z_y_to_eq ? y);
90 rewrite > (inv_is_left_inverse ? G);
94 theorem eq_opxy_e_to_eq_invx_y:
95 ∀G:Group. ∀x,y:G. x·y=ⅇ → x \sup -1=y.
97 apply (eq_op_x_y_op_x_z_to_eq ? x);
98 rewrite > (inv_is_right_inverse ? G);
103 theorem eq_opxy_z_to_eq_x_opzinvy:
104 ∀G:Group. ∀x,y,z:G. x·y=z → x = z·y \sup -1.
106 apply (eq_op_x_y_op_z_y_to_eq ? y);
107 rewrite > (op_associative ? G);
108 rewrite > (inv_is_left_inverse ? G);
109 rewrite > (e_is_right_unit ? G);
113 theorem eq_opxy_z_to_eq_y_opinvxz:
114 ∀G:Group. ∀x,y,z:G. x·y=z → y = x \sup -1·z.
116 apply (eq_op_x_y_op_x_z_to_eq ? x);
117 rewrite < (op_associative ? G);
118 rewrite > (inv_is_right_inverse ? G);
119 rewrite > (e_is_left_unit ? G);
123 theorem eq_inv_op_x_y_op_inv_y_inv_x:
124 ∀G:Group. ∀x,y:G. (x·y) \sup -1 = y \sup -1 · x \sup -1.
126 apply (eq_op_x_y_op_z_y_to_eq ? (x·y));
127 rewrite > (inv_is_left_inverse ? G);
128 rewrite < (op_associative ? G);
129 rewrite > (op_associative ? G (y \sup -1));
130 rewrite > (inv_is_left_inverse ? G);
131 rewrite > (e_is_right_unit ? G);
132 rewrite > (inv_is_left_inverse ? G);
138 record morphism (G,G':Group) : Type ≝
140 f_morph: ∀x,y:G.image(x·y) = image x · image y
143 theorem morphism_to_eq_f_1_1:
144 ∀G,G'.∀f:morphism G G'.f ⅇ = ⅇ.
146 apply (eq_op_x_y_op_z_y_to_eq ? (f ⅇ));
147 rewrite > (e_is_left_unit ? G');
149 rewrite > (e_is_left_unit ? G);
153 theorem eq_image_inv_inv_image:
154 ∀G,G'.∀f:morphism G G'.
155 ∀x.f (x \sup -1) = (f x) \sup -1.
157 apply (eq_op_x_y_op_z_y_to_eq ? (f x));
158 rewrite > (inv_is_left_inverse ? G');
160 rewrite > (inv_is_left_inverse ? G);
161 apply (morphism_to_eq_f_1_1 ? ? f).
164 record monomorphism (G,G':Group) : Type ≝
165 { morphism:> morphism G G';
166 injective: injective ? ? (image ? ? morphism)
171 record subgroup (G:Group) : Type ≝
173 embed:> monomorphism group G
176 notation "hvbox(x \sub H)" with precedence 79
177 for @{ 'subgroupimage $H $x }.
179 interpretation "Subgroup image" 'subgroupimage H x =
180 (cic:/matita/algebra/groups/image.con _ _
181 (cic:/matita/algebra/groups/morphism_OF_subgroup.con _ H) x).
183 definition member_of_subgroup ≝
184 λG.λH:subgroup G.λx:G.∃y.x=y \sub H.
186 notation "hvbox(x break \in H)" with precedence 79
187 for @{ 'member_of $x $H }.
189 notation "hvbox(x break \notin H)" with precedence 79
190 for @{ 'not_member_of $x $H }.
192 interpretation "Member of subgroup" 'member_of x H =
193 (cic:/matita/algebra/groups/member_of_subgroup.con _ H x).
195 interpretation "Not member of subgroup" 'not_member_of x H =
196 (cic:/matita/logic/connectives/Not.con
197 (cic:/matita/algebra/groups/member_of_subgroup.con _ H x)).
201 record left_coset (G:Group) : Type ≝
206 (* Here I would prefer 'magma_op, but this breaks something in the next definition *)
207 interpretation "Left_coset" 'times x C =
208 (cic:/matita/algebra/groups/left_coset.ind#xpointer(1/1/1) _ x C).
210 definition member_of_left_coset ≝
211 λG:Group.λC:left_coset G.λx:G.
212 ∃y.x=(element ? C)·y \sub (subgrp ? C).
214 interpretation "Member of left_coset" 'member_of x C =
215 (cic:/matita/algebra/groups/member_of_left_coset.con _ C x).
217 definition left_coset_eq ≝
218 λG.λC,C':left_coset G.
219 ∀x.((element ? C)·x \sub (subgrp ? C)) ∈ C'.
221 interpretation "Left cosets equality" 'eq C C' =
222 (cic:/matita/algebra/groups/left_coset_eq.con _ C C').
224 definition left_coset_disjoint ≝
225 λG.λC,C':left_coset G.
226 ∀x.¬(((element ? C)·x \sub (subgrp ? C)) ∈ C').
228 notation "hvbox(a break \par b)"
229 non associative with precedence 45
230 for @{ 'disjoint $a $b }.
232 interpretation "Left cosets disjoint" 'disjoint C C' =
233 (cic:/matita/algebra/groups/left_coset_disjoint.con _ C C').
235 (* The following should be a one-shot alias! *)
236 alias symbol "member_of" (instance 0) = "Member of subgroup".
237 theorem member_of_subgroup_op_inv_x_y_to_left_coset_eq:
238 ∀G.∀x,y.∀H:subgroup G. (x \sup -1 ·y) ∈ H → x*H = y*H.
242 unfold member_of_subgroup in H1;
246 [ apply (a\sup-1 · x1)
248 rewrite > eq_image_inv_inv_image;
250 rewrite > eq_inv_op_x_y_op_inv_y_inv_x;
251 rewrite > eq_inv_inv_x_x;
252 rewrite < (op_associative ? G);
253 rewrite < (op_associative ? G);
254 rewrite > (inv_is_right_inverse ? G);
255 rewrite > (e_is_left_unit ? G);
260 theorem Not_member_of_subgroup_to_left_coset_disjoint:
261 ∀G.∀x,y.∀H:subgroup G.(x \sup -1 ·y) ∉ H → x*H ∥ y*H.
267 unfold member_of_subgroup;
269 apply (ex_intro ? ? (x'·a \sup -1));
271 apply (eq_op_x_y_op_z_y_to_eq ? (a \sub H));
272 rewrite > (op_associative ? G);
274 rewrite > (op_associative ? G);
276 rewrite > (inv_is_left_inverse ? H);
277 rewrite < (op_associative ? G);
278 rewrite > (inv_is_left_inverse ? G);
279 rewrite > (e_is_left_unit ? G);
280 rewrite < (f_morph ? ? H);
281 rewrite > (e_is_right_unit ? H);
285 (*CSC: here the coercion Type_of_Group cannot be omitted. Why? *)
286 theorem in_x_mk_left_coset_x_H:
287 ∀G.∀x:Type_OF_Group G.∀H:subgroup G.x ∈ (x*H).
290 apply (ex_intro ? ? ⅇ);
291 rewrite > morphism_to_eq_f_1_1;
292 rewrite > (e_is_right_unit ? G);
296 (* Normal Subgroups *)
298 record normal_subgroup (G:Group) : Type ≝
299 { ns_subgroup:> subgroup G;
300 normal:> ∀x:G.∀y:ns_subgroup.(x·y \sub ns_subgroup·x \sup -1) ∈ ns_subgroup
303 (*CSC: I have not defined yet right cosets
305 ∀G.∀H:normal_subgroup G.∀x.x*H=H*x.
308 theorem member_of_left_coset_mk_left_coset_x_H_a_to_member_of_left_coset_mk_left_coset_y_H_b_to_member_of_left_coset_mk_left_coset_op_x_y_H_op_a_b:
309 ∀G.∀H:normal_subgroup G.∀x,y,a,b.
310 a ∈ (x*H) → b ∈ (y*H) → (a·b) ∈ ((x·y)*H).