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 { pre_monoid:> PreMonoid;
22 inv: pre_monoid -> pre_monoid
25 interpretation "Group inverse" 'invert x = (inv ? x).
27 record isGroup (G:PreGroup) : Prop ≝
28 { is_monoid :> IsMonoid G;
29 inv_is_left_inverse : is_left_inverse G (inv G);
30 inv_is_right_inverse: is_right_inverse G (inv G)
34 { pre_group:> PreGroup;
35 is_group:> isGroup pre_group
38 definition Monoid_of_Group: Group → Monoid ≝
39 λG. mk_Monoid ? (is_group G).
41 coercion Monoid_of_Group nocomposites.
43 definition left_cancellable ≝
44 λT:Type. λop: T -> T -> T.
45 ∀x. injective ? ? (op x).
47 definition right_cancellable ≝
48 λT:Type. λop: T -> T -> T.
49 ∀x. injective ? ? (λz.op z x).
51 theorem eq_op_x_y_op_x_z_to_eq:
52 ∀G:Group. left_cancellable G (op G).
54 unfold left_cancellable;
57 rewrite < (e_is_left_unit ? G);
58 rewrite < (e_is_left_unit ? G z);
59 rewrite < (inv_is_left_inverse ? G x);
60 rewrite > (op_is_associative ? G);
61 rewrite > (op_is_associative ? G);
66 theorem eq_op_x_y_op_z_y_to_eq:
67 ∀G:Group. right_cancellable G (op G).
69 unfold right_cancellable;
72 rewrite < (e_is_right_unit ? G);
73 rewrite < (e_is_right_unit ? G z);
74 rewrite < (inv_is_right_inverse ? G x);
75 rewrite < (op_is_associative ? G);
76 rewrite < (op_is_associative ? G);
81 theorem eq_inv_inv_x_x: ∀G:Group. ∀x:G. x \sup -1 \sup -1 = x.
83 apply (eq_op_x_y_op_z_y_to_eq ? (x \sup -1));
84 rewrite > (inv_is_right_inverse ? G);
85 rewrite > (inv_is_left_inverse ? G);
89 theorem eq_opxy_e_to_eq_x_invy:
90 ∀G:Group. ∀x,y:G. x·y=ⅇ → x=y \sup -1.
92 apply (eq_op_x_y_op_z_y_to_eq ? y);
93 rewrite > (inv_is_left_inverse ? G);
97 theorem eq_opxy_e_to_eq_invx_y:
98 ∀G:Group. ∀x,y:G. x·y=ⅇ → x \sup -1=y.
100 apply (eq_op_x_y_op_x_z_to_eq ? x);
101 rewrite > (inv_is_right_inverse ? G);
106 theorem eq_opxy_z_to_eq_x_opzinvy:
107 ∀G:Group. ∀x,y,z:G. x·y=z → x = z·y \sup -1.
109 apply (eq_op_x_y_op_z_y_to_eq ? y);
110 rewrite > (op_is_associative ? G);
111 rewrite > (inv_is_left_inverse ? G);
112 rewrite > (e_is_right_unit ? G);
116 theorem eq_opxy_z_to_eq_y_opinvxz:
117 ∀G:Group. ∀x,y,z:G. x·y=z → y = x \sup -1·z.
119 apply (eq_op_x_y_op_x_z_to_eq ? x);
120 rewrite < (op_is_associative ? G);
121 rewrite > (inv_is_right_inverse ? G);
122 rewrite > (e_is_left_unit ? G);
126 theorem eq_inv_op_x_y_op_inv_y_inv_x:
127 ∀G:Group. ∀x,y:G. (x·y) \sup -1 = y \sup -1 · x \sup -1.
129 apply (eq_op_x_y_op_z_y_to_eq ? (x·y));
130 rewrite > (inv_is_left_inverse ? G);
131 rewrite < (op_is_associative ? G);
132 rewrite > (op_is_associative ? G (y \sup -1));
133 rewrite > (inv_is_left_inverse ? G);
134 rewrite > (e_is_right_unit ? G);
135 rewrite > (inv_is_left_inverse ? G);
141 record morphism (G,G':Group) : Type ≝
143 f_morph: ∀x,y:G.image(x·y) = image x · image y
146 theorem morphism_to_eq_f_1_1:
147 ∀G,G'.∀f:morphism G G'.f ⅇ = ⅇ.
149 apply (eq_op_x_y_op_z_y_to_eq ? (f ⅇ));
150 rewrite > (e_is_left_unit ? G');
152 rewrite > (e_is_left_unit ? G);
156 theorem eq_image_inv_inv_image:
157 ∀G,G'.∀f:morphism G G'.
158 ∀x.f (x \sup -1) = (f x) \sup -1.
160 apply (eq_op_x_y_op_z_y_to_eq ? (f x));
161 rewrite > (inv_is_left_inverse ? G');
163 rewrite > (inv_is_left_inverse ? G);
164 apply (morphism_to_eq_f_1_1 ? ? f).
167 record monomorphism (G,G':Group) : Type ≝
168 { morphism:> morphism G G';
169 injective: injective ? ? (image ? ? morphism)
174 record subgroup (G:Group) : Type ≝
176 embed:> monomorphism group G
179 notation "hvbox(x \sub H)" with precedence 79
180 for @{ 'subgroupimage $H $x }.
182 interpretation "Subgroup image" 'subgroupimage H x =
183 (image ?? (morphism_OF_subgroup ? H) x).
185 definition member_of_subgroup ≝
186 λG.λH:subgroup G.λx:G.∃y.x=y \sub H.
188 notation "hvbox(x break \in H)" with precedence 79
189 for @{ 'member_of $x $H }.
191 notation "hvbox(x break \notin H)" with precedence 79
192 for @{ 'not_member_of $x $H }.
194 interpretation "Member of subgroup" 'member_of x H =
195 (member_of_subgroup ? H x).
197 interpretation "Not member of subgroup" 'not_member_of x H =
198 (Not (member_of_subgroup ? H x)).
202 record left_coset (G:Group) : Type ≝
207 (* Here I would prefer 'magma_op, but this breaks something in the next definition *)
208 interpretation "Left_coset" 'times x C =
209 (mk_left_coset ? x C).
211 definition member_of_left_coset ≝
212 λG:Group.λC:left_coset G.λx:G.
213 ∃y.x=(element ? C)·y \sub (subgrp ? C).
215 interpretation "Member of left_coset" 'member_of x C =
216 (member_of_left_coset ? C x).
218 definition left_coset_eq ≝
219 λG.λC,C':left_coset G.
220 ∀x.((element ? C)·x \sub (subgrp ? C)) ∈ C'.
222 interpretation "Left cosets equality" 'eq t C C' = (left_coset_eq t 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 (left_coset_disjoint ? 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_is_associative ? G);
253 rewrite < (op_is_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_is_associative ? G);
274 rewrite > (op_is_associative ? G);
276 rewrite > (inv_is_left_inverse ? H);
277 rewrite < (op_is_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).