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 ? G);
77 rewrite < (e_is_left_unit ? G z);
78 rewrite < (inv_is_left_inverse ? G x);
79 rewrite > (op_associative ? G);
80 rewrite > (op_associative ? 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 ? G);
94 rewrite < (e_is_right_unit ? G z);
95 rewrite < (inv_is_right_inverse ? G x);
96 rewrite < (op_associative ? G);
97 rewrite < (op_associative ? G);
102 theorem eq_inv_inv_x_x: ∀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 > (op_associative ? G);
132 rewrite > (inv_is_left_inverse ? G);
133 rewrite > (e_is_right_unit ? 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 < (op_associative ? G);
142 rewrite > (inv_is_right_inverse ? G);
143 rewrite > (e_is_left_unit ? G);
147 theorem eq_inv_op_x_y_op_inv_y_inv_x:
148 ∀G:Group. ∀x,y:G. (x·y) \sup -1 = y \sup -1 · x \sup -1.
150 apply (eq_op_x_y_op_z_y_to_eq ? (x·y));
151 rewrite > (inv_is_left_inverse ? G);
152 rewrite < (op_associative ? G);
153 rewrite > (op_associative ? G (y \sup -1));
154 rewrite > (inv_is_left_inverse ? G);
155 rewrite > (e_is_right_unit ? G);
156 rewrite > (inv_is_left_inverse ? G);
162 record morphism (G,G':Group) : Type ≝
164 f_morph: ∀x,y:G.image(x·y) = image x · image y
167 notation "hvbox(f˜ x)" with precedence 79
168 for @{ 'morimage $f $x }.
170 interpretation "Morphism image" 'morimage f x =
171 (cic:/matita/algebra/groups/image.con _ _ f x).
173 theorem morphism_to_eq_f_1_1:
174 ∀G,G'.∀f:morphism G G'.f˜1 = 1.
176 apply (eq_op_x_y_op_z_y_to_eq ? (f˜1));
177 rewrite > (e_is_left_unit ? G');
179 rewrite > (e_is_left_unit ? G);
183 theorem eq_image_inv_inv_image:
184 ∀G,G'.∀f:morphism G G'.
185 ∀x.f˜(x \sup -1) = (f˜x) \sup -1.
187 apply (eq_op_x_y_op_z_y_to_eq ? (f˜x));
188 rewrite > (inv_is_left_inverse ? G');
190 rewrite > (inv_is_left_inverse ? G);
191 apply (morphism_to_eq_f_1_1 ? ? f).
194 record monomorphism (G,G':Group) : Type ≝
195 { morphism:> morphism G G';
196 injective: injective ? ? (image ? ? morphism)
201 record subgroup (G:Group) : Type ≝
203 embed:> monomorphism group G
207 for @{ 'type_of_subgroup $G }.
209 interpretation "Type_of_subgroup coercion" 'type_of_subgroup G =
210 (cic:/matita/algebra/groups/Type_of_subgroup.con _ G).
212 notation "hvbox(x \sub H)" with precedence 79
213 for @{ 'subgroupimage $H $x }.
215 interpretation "Subgroup image" 'subgroupimage H x =
216 (cic:/matita/algebra/groups/image.con _ _
217 (cic:/matita/algebra/groups/morphism_of_subgroup.con _ H) x).
219 definition member_of_subgroup ≝
220 λG.λH:subgroup G.λx:G.∃y.x=y \sub H.
222 notation "hvbox(x break ∈ H)" with precedence 79
223 for @{ 'member_of $x $H }.
225 interpretation "Member of subgroup" 'member_of x H =
226 (cic:/matita/algebra/groups/member_of_subgroup.con _ H x).
230 record left_coset (G:Group) : Type ≝
235 (* Here I would prefer 'magma_op, but this breaks something in the next definition *)
236 interpretation "Left_coset" 'times x C =
237 (cic:/matita/algebra/groups/left_coset.ind#xpointer(1/1/1) _ x C).
239 definition member_of_left_coset ≝
240 λG:Group.λC:left_coset G.λx:G.
241 ∃y.x=(element ? C)·y \sub (subgrp ? C).
243 interpretation "Member of left_coset" 'member_of x C =
244 (cic:/matita/algebra/groups/member_of_left_coset.con _ C x).
246 definition left_coset_eq ≝
247 λG.λC,C':left_coset G.
248 ∀x.((element ? C)·x \sub (subgrp ? C)) ∈ C'.
250 interpretation "Left cosets equality" 'eq C C' =
251 (cic:/matita/algebra/groups/left_coset_eq.con _ C C').
253 definition left_coset_disjoint ≝
254 λG.λC,C':left_coset G.
255 ∀x.¬(((element ? C)·x \sub (subgrp ? C)) ∈ C').
257 notation "hvbox(a break ∥ b)"
258 non associative with precedence 45
259 for @{ 'disjoint $a $b }.
261 interpretation "Left cosets disjoint" 'disjoint C C' =
262 (cic:/matita/algebra/groups/left_coset_disjoint.con _ C C').
264 (* The following should be a one-shot alias! *)
265 alias symbol "member_of" (instance 0) = "Member of subgroup".
266 theorem member_of_subgroup_op_inv_x_y_to_left_coset_eq:
267 ∀G.∀x,y.∀H:subgroup G. (x \sup -1 ·y) ∈ H → x*H = y*H.
269 unfold left_coset_eq;
270 simplify in ⊢ (? → ? ? ? (? ? % ?));
271 simplify in ⊢ (? → ? ? ? (? ? ? (? ? ? (? ? %) ?)));
272 simplify in ⊢ (? ? % → ?);
274 unfold member_of_left_coset;
275 simplify in ⊢ (? ? (λy:?.? ? ? (? ? ? (? ? ? (? ? %) ?))));
276 simplify in ⊢ (? ? (λy:? ? %.?));
277 simplify in ⊢ (? ? (λy:?.? ? ? (? ? % ?)));
278 unfold member_of_subgroup in H1;
282 [ apply (a\sup-1 · x1)
284 rewrite > eq_image_inv_inv_image;
286 rewrite > eq_inv_op_x_y_op_inv_y_inv_x;
287 rewrite > eq_inv_inv_x_x;
288 rewrite < (op_associative ? G);
289 rewrite < (op_associative ? G);
290 rewrite > (inv_is_right_inverse ? G);
291 rewrite > (e_is_left_unit ? G);
297 \forall G:Group. \forall x1,x2:G. \forall H:subgroup G.
298 x1*x2^-1 \nin H \to x1*H does_not_overlap x2*H
301 \forall x:G. \forall H:subgroup G. x \in x*H
304 (T: Type) (n:nat) (S: \forall x:nat. x < n -> {S:Type * (S -> T)})
306 \forall i,j:nat. i < n \to j < n \to ...
310 (λG.λH,H':left_coset G.λx:Type_of_Group (group ? (subgrp ? H)). (embed ? (subgrp ? H) x)).
312 definition left_coset_eq ≝
313 λG.λH,H':left_coset G.
314 ∀x:group ? (subgrp ? H).
315 ex (group ? (subgroup ? H')) (λy.
316 (element ? H)·(embed ? (subgrp ? H) x) =
317 (element ? H')·(embed ? (subgrp ? H') y)).
319 (*record left_coset (G:Group) : Type ≝
321 subgroup_is_subgroup: subgroup ≤ G;
325 definition left_coset_eq ≝
326 λG.λH,H':left_coset G.
328 ex (subgroup ? H') (λy.
329 (element ? H)·(embed ? ? (subgroup_is_subgroup ? H) ˜ x) =
330 (element ? H')·(embed ? ? (subgroup_is_subgroup ? H') ˜ y)).