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 (image ?? (morphism_OF_subgroup ? H) x).
182 definition member_of_subgroup ≝
183 λG.λH:subgroup G.λx:G.∃y.x=y \sub H.
185 notation "hvbox(x break \in H)" with precedence 79
186 for @{ 'member_of $x $H }.
188 notation "hvbox(x break \notin H)" with precedence 79
189 for @{ 'not_member_of $x $H }.
191 interpretation "Member of subgroup" 'member_of x H =
192 (member_of_subgroup ? H x).
194 interpretation "Not member of subgroup" 'not_member_of x H =
195 (Not (member_of_subgroup ? H x)).
199 record left_coset (G:Group) : Type ≝
204 (* Here I would prefer 'magma_op, but this breaks something in the next definition *)
205 interpretation "Left_coset" 'times x C =
206 (mk_left_coset ? x C).
208 definition member_of_left_coset ≝
209 λG:Group.λC:left_coset G.λx:G.
210 ∃y.x=(element ? C)·y \sub (subgrp ? C).
212 interpretation "Member of left_coset" 'member_of x C =
213 (member_of_left_coset ? C x).
215 definition left_coset_eq ≝
216 λG.λC,C':left_coset G.
217 ∀x.((element ? C)·x \sub (subgrp ? C)) ∈ C'.
219 interpretation "Left cosets equality" 'eq t C C' = (left_coset_eq t C C').
221 definition left_coset_disjoint ≝
222 λG.λC,C':left_coset G.
223 ∀x.¬(((element ? C)·x \sub (subgrp ? C)) ∈ C').
225 notation "hvbox(a break \par b)"
226 non associative with precedence 45
227 for @{ 'disjoint $a $b }.
229 interpretation "Left cosets disjoint" 'disjoint C C' =
230 (left_coset_disjoint ? C C').
232 (* The following should be a one-shot alias! *)
233 alias symbol "member_of" (instance 0) = "Member of subgroup".
234 theorem member_of_subgroup_op_inv_x_y_to_left_coset_eq:
235 ∀G.∀x,y.∀H:subgroup G. (x \sup -1 ·y) ∈ H → x*H = y*H.
239 unfold member_of_subgroup in H1;
243 [ apply (a\sup-1 · x1)
245 rewrite > eq_image_inv_inv_image;
247 rewrite > eq_inv_op_x_y_op_inv_y_inv_x;
248 rewrite > eq_inv_inv_x_x;
249 rewrite < (op_associative ? G);
250 rewrite < (op_associative ? G);
251 rewrite > (inv_is_right_inverse ? G);
252 rewrite > (e_is_left_unit ? G);
257 theorem Not_member_of_subgroup_to_left_coset_disjoint:
258 ∀G.∀x,y.∀H:subgroup G.(x \sup -1 ·y) ∉ H → x*H ∥ y*H.
264 unfold member_of_subgroup;
266 apply (ex_intro ? ? (x'·a \sup -1));
268 apply (eq_op_x_y_op_z_y_to_eq ? (a \sub H));
269 rewrite > (op_associative ? G);
271 rewrite > (op_associative ? G);
273 rewrite > (inv_is_left_inverse ? H);
274 rewrite < (op_associative ? G);
275 rewrite > (inv_is_left_inverse ? G);
276 rewrite > (e_is_left_unit ? G);
277 rewrite < (f_morph ? ? H);
278 rewrite > (e_is_right_unit ? H);
282 (*CSC: here the coercion Type_of_Group cannot be omitted. Why? *)
283 theorem in_x_mk_left_coset_x_H:
284 ∀G.∀x:Type_OF_Group G.∀H:subgroup G.x ∈ (x*H).
287 apply (ex_intro ? ? ⅇ);
288 rewrite > morphism_to_eq_f_1_1;
289 rewrite > (e_is_right_unit ? G);
293 (* Normal Subgroups *)
295 record normal_subgroup (G:Group) : Type ≝
296 { ns_subgroup:> subgroup G;
297 normal:> ∀x:G.∀y:ns_subgroup.(x·y \sub ns_subgroup·x \sup -1) ∈ ns_subgroup
300 (*CSC: I have not defined yet right cosets
302 ∀G.∀H:normal_subgroup G.∀x.x*H=H*x.
305 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:
306 ∀G.∀H:normal_subgroup G.∀x,y,a,b.
307 a ∈ (x*H) → b ∈ (y*H) → (a·b) ∈ ((x·y)*H).