X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Flibrary%2Falgebra%2Fgroups.ma;h=9ab695239665e8418d6279f8f1609334e7ddada1;hb=8ee0e6f729105eaf1907de0baef22e170b0d17b3;hp=ed1caebe3b9607a96c29dca00fcb630b757eeb84;hpb=3949b3222c3ca9be2279beda4cbcf7cd49400d73;p=helm.git diff --git a/matita/library/algebra/groups.ma b/matita/library/algebra/groups.ma index ed1caebe3..9ab695239 100644 --- a/matita/library/algebra/groups.ma +++ b/matita/library/algebra/groups.ma @@ -25,7 +25,7 @@ record PreGroup : Type ≝ }. record isGroup (G:PreGroup) : Prop ≝ - { is_monoid: isMonoid G; + { 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) }. @@ -35,24 +35,6 @@ record Group : Type ≝ group_properties:> isGroup pregroup }. -(*notation < "G" -for @{ 'monoid $G }. - -interpretation "Monoid coercion" 'monoid G = - (cic:/matita/algebra/groups/monoid.con G).*) - -notation < "G" -for @{ 'type_of_group $G }. - -interpretation "Type_of_group coercion" 'type_of_group G = - (cic:/matita/algebra/groups/Type_of_Group.con G). - -notation < "G" -for @{ 'magma_of_group $G }. - -interpretation "magma_of_group coercion" 'magma_of_group G = - (cic:/matita/algebra/groups/Magma_of_Group.con G). - notation "hvbox(x \sup (-1))" with precedence 89 for @{ 'ginv $x }. @@ -73,11 +55,11 @@ intros; unfold left_cancellable; unfold injective; intros (x y z); -rewrite < (e_is_left_unit ? (is_monoid ? G)); -rewrite < (e_is_left_unit ? (is_monoid ? G) z); +rewrite < (e_is_left_unit ? G); +rewrite < (e_is_left_unit ? G z); rewrite < (inv_is_left_inverse ? G x); -rewrite > (associative ? (is_semi_group ? (is_monoid ? G))); -rewrite > (associative ? (is_semi_group ? (is_monoid ? G))); +rewrite > (op_associative ? G); +rewrite > (op_associative ? G); apply eq_f; assumption. qed. @@ -90,16 +72,16 @@ unfold right_cancellable; unfold injective; simplify;fold simplify (op G); intros (x y z); -rewrite < (e_is_right_unit ? (is_monoid ? G)); -rewrite < (e_is_right_unit ? (is_monoid ? G) z); +rewrite < (e_is_right_unit ? G); +rewrite < (e_is_right_unit ? G z); rewrite < (inv_is_right_inverse ? G x); -rewrite < (associative ? (is_semi_group ? (is_monoid ? G))); -rewrite < (associative ? (is_semi_group ? (is_monoid ? G))); +rewrite < (op_associative ? G); +rewrite < (op_associative ? G); rewrite > H; reflexivity. qed. -theorem inv_inv: ∀G:Group. ∀x:G. x \sup -1 \sup -1 = x. +theorem eq_inv_inv_x_x: ∀G:Group. ∀x:G. x \sup -1 \sup -1 = x. intros; apply (eq_op_x_y_op_z_y_to_eq ? (x \sup -1)); rewrite > (inv_is_right_inverse ? G); @@ -128,9 +110,9 @@ 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 > (associative ? (is_semi_group ? (is_monoid ? G))); +rewrite > (op_associative ? G); rewrite > (inv_is_left_inverse ? G); -rewrite > (e_is_right_unit ? (is_monoid ? G)); +rewrite > (e_is_right_unit ? G); assumption. qed. @@ -138,12 +120,25 @@ 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 < (associative ? (is_semi_group ? (is_monoid ? G))); +rewrite < (op_associative ? G); rewrite > (inv_is_right_inverse ? G); -rewrite > (e_is_left_unit ? (is_monoid ? G)); +rewrite > (e_is_left_unit ? G); assumption. qed. +theorem eq_inv_op_x_y_op_inv_y_inv_x: + ∀G:Group. ∀x,y:G. (x·y) \sup -1 = y \sup -1 · x \sup -1. +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 > (inv_is_left_inverse ? G); +rewrite > (e_is_right_unit ? G); +rewrite > (inv_is_left_inverse ? G); +reflexivity. +qed. + (* Morphisms *) record morphism (G,G':Group) : Type ≝ @@ -160,10 +155,10 @@ interpretation "Morphism image" 'morimage f x = theorem morphism_to_eq_f_1_1: ∀G,G'.∀f:morphism G G'.f˜1 = 1. intros; -apply (eq_op_x_y_op_z_y_to_eq G' (f˜1)); -rewrite > (e_is_left_unit ? (is_monoid ? G') ?); -rewrite < (f_morph ? ? f); -rewrite > (e_is_left_unit ? (is_monoid ? G)); +apply (eq_op_x_y_op_z_y_to_eq ? (f˜1)); +rewrite > (e_is_left_unit ? G'); +rewrite < f_morph; +rewrite > (e_is_left_unit ? G); reflexivity. qed. @@ -171,42 +166,47 @@ theorem eq_image_inv_inv_image: ∀G,G'.∀f:morphism G G'. ∀x.f˜(x \sup -1) = (f˜x) \sup -1. intros; -apply (eq_op_x_y_op_z_y_to_eq G' (f˜x)); +apply (eq_op_x_y_op_z_y_to_eq ? (f˜x)); rewrite > (inv_is_left_inverse ? G'); -rewrite < (f_morph ? ? f); +rewrite < f_morph; rewrite > (inv_is_left_inverse ? G); apply (morphism_to_eq_f_1_1 ? ? f). qed. record monomorphism (G,G':Group) : Type ≝ - { morphism: morphism G G'; + { morphism:> morphism G G'; injective: injective ? ? (image ? ? morphism) }. (* Subgroups *) record subgroup (G:Group) : Type ≝ - { group: Group; - embed: monomorphism group G + { group:> Group; + embed:> monomorphism group G }. - + 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.con _ _ - (cic:/matita/algebra/groups/embed.con _ H)) - x). + (cic:/matita/algebra/groups/morphism_OF_subgroup.con _ H) x). -definition belongs_to_subgroup ≝ +definition member_of_subgroup ≝ λG.λH:subgroup G.λx:G.∃y.x=y \sub H. -notation "hvbox(x ∈ H)" with precedence 79 -for @{ 'belongs_to $x $H }. +notation "hvbox(x break ∈ H)" with precedence 79 +for @{ 'member_of $x $H }. + +notation "hvbox(x break ∉ H)" with precedence 79 +for @{ 'not_member_of $x $H }. -interpretation "Belongs to subgroup" 'belongs_to x H = - (cic:/matita/algebra/groups/belongs_to_subgroup.con _ H x). +interpretation "Member of subgroup" 'member_of x H = + (cic:/matita/algebra/groups/member_of_subgroup.con _ 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)). (* Left cosets *) @@ -219,12 +219,12 @@ record left_coset (G:Group) : Type ≝ interpretation "Left_coset" 'times x C = (cic:/matita/algebra/groups/left_coset.ind#xpointer(1/1/1) _ x C). -definition belongs_to_left_coset ≝ +definition member_of_left_coset ≝ λG:Group.λC:left_coset G.λx:G. ∃y.x=(element ? C)·y \sub (subgrp ? C). -interpretation "Belongs to left_coset" 'belongs_to x C = - (cic:/matita/algebra/groups/belongs_to_left_coset.con _ C x). +interpretation "Member of left_coset" 'member_of x C = + (cic:/matita/algebra/groups/member_of_left_coset.con _ C x). definition left_coset_eq ≝ λG.λC,C':left_coset G. @@ -245,63 +245,82 @@ interpretation "Left cosets disjoint" 'disjoint C C' = (cic:/matita/algebra/groups/left_coset_disjoint.con _ C C'). (* The following should be a one-shot alias! *) -alias symbol "belongs_to" (instance 0) = "Belongs to subgroup". -theorem foo: - ∀G.∀x,y:(Type_of_Group G).∀H:subgroup G. - (x \sup -1 ·y) ∈ H → (mk_left_coset ? x H) = (mk_left_coset ? y H). +alias symbol "member_of" (instance 0) = "Member of subgroup". +theorem member_of_subgroup_op_inv_x_y_to_left_coset_eq: + ∀G.∀x,y.∀H:subgroup G. (x \sup -1 ·y) ∈ H → x*H = y*H. intros; -unfold left_coset_eq; -simplify in ⊢ (? → ? ? ? (? ? ? (? ? ? (? ? ? (? ? %)) ?))); -simplify in ⊢ (? → ? ? ? (? ? % ?)); -simplify in ⊢ (? % → ?); -intros; -unfold belongs_to_left_coset; -simplify in ⊢ (? ? (λy:?.? ? ? (? ? ? (? ? ? (? ? ? (? ? %)) ?)))); -simplify in ⊢ (? ? (λy:? %.?)); -simplify in ⊢ (? ? (λy:?.? ? ? (? ? % ?))); -unfold belongs_to_subgroup in H1; +simplify; +intro; +unfold member_of_subgroup in H1; elim H1; clear H1; exists; -[ -| +[ apply (a\sup-1 · x1) +| rewrite > f_morph; + rewrite > eq_image_inv_inv_image; + 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 > (inv_is_right_inverse ? G); + rewrite > (e_is_left_unit ? G); + reflexivity ]. qed. -(*theorem foo: - \forall G:Group. \forall x1,x2:G. \forall H:subgroup G. - x1*x2^-1 \nin H \to x1*H does_not_overlap x2*H - -theorem foo: - \forall x:G. \forall H:subgroup G. x \in x*H - -definition disjoinct - (T: Type) (n:nat) (S: \forall x:nat. x < n -> {S:Type * (S -> T)}) -:= - \forall i,j:nat. i < n \to j < n \to ... +theorem Not_member_of_subgroup_to_left_coset_disjoint: + ∀G.∀x,y.∀H:subgroup G.(x \sup -1 ·y) ∉ H → x*H ∥ y*H. +intros; +simplify; +unfold Not; +intros (x'); +apply H1; +unfold member_of_subgroup; +elim H2; +apply (ex_intro ? ? (x'·a \sup -1)); +rewrite > f_morph; +apply (eq_op_x_y_op_z_y_to_eq ? (a \sub H)); +rewrite > (op_associative ? G); +rewrite < H3; +rewrite > (op_associative ? G); +rewrite < f_morph; +rewrite > (inv_is_left_inverse ? H); +rewrite < (op_associative ? G); +rewrite > (inv_is_left_inverse ? G); +rewrite > (e_is_left_unit ? G); +rewrite < (f_morph ? ? H); +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). +intros; +simplify; +apply (ex_intro ? ? 1); +rewrite > morphism_to_eq_f_1_1; +rewrite > (e_is_right_unit ? G); +reflexivity. +qed. -check - (λG.λH,H':left_coset G.λx:Type_of_Group (group ? (subgrp ? H)). (embed ? (subgrp ? H) x)). +(* Normal Subgroups *) -definition left_coset_eq ≝ - λG.λH,H':left_coset G. - ∀x:group ? (subgrp ? H). - ex (group ? (subgroup ? H')) (λy. - (element ? H)·(embed ? (subgrp ? H) x) = - (element ? H')·(embed ? (subgrp ? H') y)). - -(*record left_coset (G:Group) : Type ≝ - { subgroup: Group; - subgroup_is_subgroup: subgroup ≤ G; - element: G +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 }. -definition left_coset_eq ≝ - λG.λH,H':left_coset G. - ∀x:subgroup ? H. - ex (subgroup ? H') (λy. - (element ? H)·(embed ? ? (subgroup_is_subgroup ? H) ˜ x) = - (element ? H')·(embed ? ? (subgroup_is_subgroup ? H') ˜ y)). +(*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. *) -*) \ No newline at end of file