X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Flibrary%2Falgebra%2Fgroups.ma;h=fd08a95dacb504e2cee3bfdf1a06948175c993f7;hb=647b419e96770d90a82d7a9e5e8843566a9f93ee;hp=360e75c9f06d52c85e931e84f42eed4fa68bee76;hpb=5ce2b9b14c6b76021c780080e31b283a5e061d28;p=helm.git diff --git a/helm/software/matita/library/algebra/groups.ma b/helm/software/matita/library/algebra/groups.ma index 360e75c9f..fd08a95da 100644 --- a/helm/software/matita/library/algebra/groups.ma +++ b/helm/software/matita/library/algebra/groups.ma @@ -12,34 +12,33 @@ (* *) (**************************************************************************) -set "baseuri" "cic:/matita/algebra/groups/". - include "algebra/monoids.ma". include "nat/le_arith.ma". include "datatypes/bool.ma". include "nat/compare.ma". record PreGroup : Type ≝ - { premonoid:> PreMonoid; - inv: premonoid -> premonoid + { pre_monoid:> PreMonoid; + inv: pre_monoid -> pre_monoid }. +interpretation "Group inverse" 'invert x = (inv ? x). + record isGroup (G:PreGroup) : Prop ≝ - { is_monoid:> isMonoid G; - inv_is_left_inverse: is_left_inverse (mk_Monoid ? is_monoid) (inv G); - inv_is_right_inverse: is_right_inverse (mk_Monoid ? is_monoid) (inv G) + { is_monoid :> IsMonoid G; + inv_is_left_inverse : is_left_inverse G (inv G); + inv_is_right_inverse: is_right_inverse G (inv G) }. - + record Group : Type ≝ - { pregroup:> PreGroup; - group_properties:> isGroup pregroup + { pre_group:> PreGroup; + is_group:> isGroup pre_group }. -notation "hvbox(x \sup (-1))" with precedence 89 -for @{ 'ginv $x }. +definition Monoid_of_Group: Group → Monoid ≝ + λG. mk_Monoid ? (is_group G). -interpretation "Group inverse" 'ginv x = - (cic:/matita/algebra/groups/inv.con _ x). +coercion Monoid_of_Group nocomposites. definition left_cancellable ≝ λT:Type. λop: T -> T -> T. @@ -58,25 +57,23 @@ intros (x y z); rewrite < (e_is_left_unit ? G); rewrite < (e_is_left_unit ? G z); rewrite < (inv_is_left_inverse ? G x); -rewrite > (op_associative ? G); -rewrite > (op_associative ? G); +rewrite > (op_is_associative ? G); +rewrite > (op_is_associative ? G); apply eq_f; assumption. qed. - theorem eq_op_x_y_op_z_y_to_eq: ∀G:Group. right_cancellable G (op G). intros; unfold right_cancellable; unfold injective; -simplify;fold simplify (op G); intros (x y z); rewrite < (e_is_right_unit ? G); rewrite < (e_is_right_unit ? G z); rewrite < (inv_is_right_inverse ? G x); -rewrite < (op_associative ? G); -rewrite < (op_associative ? G); +rewrite < (op_is_associative ? G); +rewrite < (op_is_associative ? G); rewrite > H; reflexivity. qed. @@ -90,7 +87,7 @@ reflexivity. qed. theorem eq_opxy_e_to_eq_x_invy: - ∀G:Group. ∀x,y:G. x·y=1 → x=y \sup -1. + ∀G:Group. ∀x,y:G. x·y=ⅇ → x=y \sup -1. intros; apply (eq_op_x_y_op_z_y_to_eq ? y); rewrite > (inv_is_left_inverse ? G); @@ -98,7 +95,7 @@ assumption. qed. theorem eq_opxy_e_to_eq_invx_y: - ∀G:Group. ∀x,y:G. x·y=1 → x \sup -1=y. + ∀G:Group. ∀x,y:G. x·y=ⅇ → x \sup -1=y. intros; apply (eq_op_x_y_op_x_z_to_eq ? x); rewrite > (inv_is_right_inverse ? G); @@ -110,7 +107,7 @@ theorem eq_opxy_z_to_eq_x_opzinvy: ∀G:Group. ∀x,y,z:G. x·y=z → x = z·y \sup -1. intros; apply (eq_op_x_y_op_z_y_to_eq ? y); -rewrite > (op_associative ? G); +rewrite > (op_is_associative ? G); rewrite > (inv_is_left_inverse ? G); rewrite > (e_is_right_unit ? G); assumption. @@ -120,7 +117,7 @@ theorem eq_opxy_z_to_eq_y_opinvxz: ∀G:Group. ∀x,y,z:G. x·y=z → y = x \sup -1·z. intros; apply (eq_op_x_y_op_x_z_to_eq ? x); -rewrite < (op_associative ? G); +rewrite < (op_is_associative ? G); rewrite > (inv_is_right_inverse ? G); rewrite > (e_is_left_unit ? G); assumption. @@ -131,8 +128,8 @@ theorem eq_inv_op_x_y_op_inv_y_inv_x: intros; apply (eq_op_x_y_op_z_y_to_eq ? (x·y)); rewrite > (inv_is_left_inverse ? G); -rewrite < (op_associative ? G); -rewrite > (op_associative ? G (y \sup -1)); +rewrite < (op_is_associative ? G); +rewrite > (op_is_associative ? G (y \sup -1)); rewrite > (inv_is_left_inverse ? G); rewrite > (e_is_right_unit ? G); rewrite > (inv_is_left_inverse ? G); @@ -142,20 +139,14 @@ qed. (* Morphisms *) record morphism (G,G':Group) : Type ≝ - { image: G → G'; + { image:1> G → G'; f_morph: ∀x,y:G.image(x·y) = image x · image y }. -notation "hvbox(f˜ x)" with precedence 79 -for @{ 'morimage $f $x }. - -interpretation "Morphism image" 'morimage f x = - (cic:/matita/algebra/groups/image.con _ _ f x). - theorem morphism_to_eq_f_1_1: - ∀G,G'.∀f:morphism G G'.f˜1 = 1. + ∀G,G'.∀f:morphism G G'.f ⅇ = ⅇ. intros; -apply (eq_op_x_y_op_z_y_to_eq ? (f˜1)); +apply (eq_op_x_y_op_z_y_to_eq ? (f ⅇ)); rewrite > (e_is_left_unit ? G'); rewrite < f_morph; rewrite > (e_is_left_unit ? G); @@ -164,9 +155,9 @@ qed. theorem eq_image_inv_inv_image: ∀G,G'.∀f:morphism G G'. - ∀x.f˜(x \sup -1) = (f˜x) \sup -1. + ∀x.f (x \sup -1) = (f x) \sup -1. intros; -apply (eq_op_x_y_op_z_y_to_eq ? (f˜x)); +apply (eq_op_x_y_op_z_y_to_eq ? (f x)); rewrite > (inv_is_left_inverse ? G'); rewrite < f_morph; rewrite > (inv_is_left_inverse ? G); @@ -189,24 +180,22 @@ notation "hvbox(x \sub H)" with precedence 79 for @{ 'subgroupimage $H $x }. interpretation "Subgroup image" 'subgroupimage H x = - (cic:/matita/algebra/groups/image.con _ _ - (cic:/matita/algebra/groups/morphism_of_subgroup.con _ H) x). + (image ?? (morphism_OF_subgroup ? H) x). definition member_of_subgroup ≝ λG.λH:subgroup G.λx:G.∃y.x=y \sub H. -notation "hvbox(x break ∈ H)" with precedence 79 +notation "hvbox(x break \in H)" with precedence 79 for @{ 'member_of $x $H }. -notation "hvbox(x break ∉ H)" with precedence 79 +notation "hvbox(x break \notin H)" with precedence 79 for @{ 'not_member_of $x $H }. interpretation "Member of subgroup" 'member_of x H = - (cic:/matita/algebra/groups/member_of_subgroup.con _ H x). + (member_of_subgroup ? H x). interpretation "Not member of subgroup" 'not_member_of x H = - (cic:/matita/logic/connectives/Not.con - (cic:/matita/algebra/groups/member_of_subgroup.con _ H x)). + (Not (member_of_subgroup ? H x)). (* Left cosets *) @@ -217,32 +206,31 @@ record left_coset (G:Group) : Type ≝ (* Here I would prefer 'magma_op, but this breaks something in the next definition *) interpretation "Left_coset" 'times x C = - (cic:/matita/algebra/groups/left_coset.ind#xpointer(1/1/1) _ x C). + (mk_left_coset ? x C). definition member_of_left_coset ≝ λG:Group.λC:left_coset G.λx:G. ∃y.x=(element ? C)·y \sub (subgrp ? C). interpretation "Member of left_coset" 'member_of x C = - (cic:/matita/algebra/groups/member_of_left_coset.con _ C x). + (member_of_left_coset ? C x). definition left_coset_eq ≝ λG.λC,C':left_coset G. ∀x.((element ? C)·x \sub (subgrp ? C)) ∈ C'. -interpretation "Left cosets equality" 'eq C C' = - (cic:/matita/algebra/groups/left_coset_eq.con _ C C'). +interpretation "Left cosets equality" 'eq t C C' = (left_coset_eq t C C'). definition left_coset_disjoint ≝ λG.λC,C':left_coset G. ∀x.¬(((element ? C)·x \sub (subgrp ? C)) ∈ C'). -notation "hvbox(a break ∥ b)" +notation "hvbox(a break \par b)" non associative with precedence 45 for @{ 'disjoint $a $b }. interpretation "Left cosets disjoint" 'disjoint C C' = - (cic:/matita/algebra/groups/left_coset_disjoint.con _ C C'). + (left_coset_disjoint ? C C'). (* The following should be a one-shot alias! *) alias symbol "member_of" (instance 0) = "Member of subgroup". @@ -261,8 +249,8 @@ exists; rewrite < H2; rewrite > eq_inv_op_x_y_op_inv_y_inv_x; rewrite > eq_inv_inv_x_x; - rewrite < (op_associative ? G); - rewrite < (op_associative ? G); + rewrite < (op_is_associative ? G); + rewrite < (op_is_associative ? G); rewrite > (inv_is_right_inverse ? G); rewrite > (e_is_left_unit ? G); reflexivity @@ -279,14 +267,14 @@ apply H1; unfold member_of_subgroup; elim H2; apply (ex_intro ? ? (x'·a \sup -1)); -rewrite > f_morph; +rewrite > f_morph; apply (eq_op_x_y_op_z_y_to_eq ? (a \sub H)); -rewrite > (op_associative ? G); +rewrite > (op_is_associative ? G); rewrite < H3; -rewrite > (op_associative ? G); +rewrite > (op_is_associative ? G); rewrite < f_morph; rewrite > (inv_is_left_inverse ? H); -rewrite < (op_associative ? G); +rewrite < (op_is_associative ? G); rewrite > (inv_is_left_inverse ? G); rewrite > (e_is_left_unit ? G); rewrite < (f_morph ? ? H); @@ -294,12 +282,33 @@ rewrite > (e_is_right_unit ? H); reflexivity. qed. +(*CSC: here the coercion Type_of_Group cannot be omitted. Why? *) theorem in_x_mk_left_coset_x_H: - ∀G.∀x:Type_of_Group G.∀H:subgroup G.x ∈ (x*H). + ∀G.∀x:Type_OF_Group G.∀H:subgroup G.x ∈ (x*H). intros; simplify; -apply (ex_intro ? ? 1); +apply (ex_intro ? ? ⅇ); rewrite > morphism_to_eq_f_1_1; rewrite > (e_is_right_unit ? G); reflexivity. -qed. \ No newline at end of file +qed. + +(* Normal Subgroups *) + +record normal_subgroup (G:Group) : Type ≝ + { ns_subgroup:> subgroup G; + normal:> ∀x:G.∀y:ns_subgroup.(x·y \sub ns_subgroup·x \sup -1) ∈ ns_subgroup + }. + +(*CSC: I have not defined yet right cosets +theorem foo: + ∀G.∀H:normal_subgroup G.∀x.x*H=H*x. +*) +(* +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: + ∀G.∀H:normal_subgroup G.∀x,y,a,b. + a ∈ (x*H) → b ∈ (y*H) → (a·b) ∈ ((x·y)*H). +intros; +simplify; +qed. +*)