src/HOL/Algebra/AbelCoset.thy
changeset 27717 21bbd410ba04
parent 27611 2c01c0bdb385
child 28823 dcbef866c9e2
equal deleted inserted replaced
27716:96699d8eb49e 27717:21bbd410ba04
     7 theory AbelCoset
     7 theory AbelCoset
     8 imports Coset Ring
     8 imports Coset Ring
     9 begin
     9 begin
    10 
    10 
    11 
    11 
    12 section {* More Lifting from Groups to Abelian Groups *}
    12 subsection {* More Lifting from Groups to Abelian Groups *}
    13 
    13 
    14 subsection {* Definitions *}
    14 subsubsection {* Definitions *}
    15 
    15 
    16 text {* Hiding @{text "<+>"} from @{theory Sum_Type} until I come
    16 text {* Hiding @{text "<+>"} from @{theory Sum_Type} until I come
    17   up with better syntax here *}
    17   up with better syntax here *}
    18 
    18 
    19 no_notation Plus (infixr "<+>" 65)
    19 no_notation Plus (infixr "<+>" 65)
   100   shows "a_set_inv H \<equiv> \<Union>h\<in>H. {\<ominus> h}"
   100   shows "a_set_inv H \<equiv> \<Union>h\<in>H. {\<ominus> h}"
   101 unfolding A_SET_INV_defs
   101 unfolding A_SET_INV_defs
   102 by (fold a_inv_def)
   102 by (fold a_inv_def)
   103 
   103 
   104 
   104 
   105 subsection {* Cosets *}
   105 subsubsection {* Cosets *}
   106 
   106 
   107 lemma (in abelian_group) a_coset_add_assoc:
   107 lemma (in abelian_group) a_coset_add_assoc:
   108      "[| M \<subseteq> carrier G; g \<in> carrier G; h \<in> carrier G |]
   108      "[| M \<subseteq> carrier G; g \<in> carrier G; h \<in> carrier G |]
   109       ==> (M +> g) +> h = M +> (g \<oplus> h)"
   109       ==> (M +> g) +> h = M +> (g \<oplus> h)"
   110 by (rule group.coset_mult_assoc [OF a_group,
   110 by (rule group.coset_mult_assoc [OF a_group,
   176 by (rule group.rcos_self [OF a_group,
   176 by (rule group.rcos_self [OF a_group,
   177     folded a_r_coset_def, simplified monoid_record_simps])
   177     folded a_r_coset_def, simplified monoid_record_simps])
   178 *)
   178 *)
   179 
   179 
   180 
   180 
   181 subsection {* Subgroups *}
   181 subsubsection {* Subgroups *}
   182 
   182 
   183 locale additive_subgroup = var H + struct G +
   183 locale additive_subgroup = var H + struct G +
   184   assumes a_subgroup: "subgroup H \<lparr>carrier = carrier G, mult = add G, one = zero G\<rparr>"
   184   assumes a_subgroup: "subgroup H \<lparr>carrier = carrier G, mult = add G, one = zero G\<rparr>"
   185 
   185 
   186 lemma (in additive_subgroup) is_additive_subgroup:
   186 lemma (in additive_subgroup) is_additive_subgroup:
   212      "x \<in> H \<Longrightarrow> \<ominus> x \<in> H"
   212      "x \<in> H \<Longrightarrow> \<ominus> x \<in> H"
   213 by (rule subgroup.m_inv_closed[OF a_subgroup,
   213 by (rule subgroup.m_inv_closed[OF a_subgroup,
   214     folded a_inv_def, simplified monoid_record_simps])
   214     folded a_inv_def, simplified monoid_record_simps])
   215 
   215 
   216 
   216 
   217 subsection {* Normal additive subgroups *}
   217 subsubsection {* Additive subgroups are normal *}
   218 
       
   219 subsubsection {* Definition of @{text "abelian_subgroup"} *}
       
   220 
   218 
   221 text {* Every subgroup of an @{text "abelian_group"} is normal *}
   219 text {* Every subgroup of an @{text "abelian_group"} is normal *}
   222 
   220 
   223 locale abelian_subgroup = additive_subgroup H G + abelian_group G +
   221 locale abelian_subgroup = additive_subgroup H G + abelian_group G +
   224   assumes a_normal: "normal H \<lparr>carrier = carrier G, mult = add G, one = zero G\<rparr>"
   222   assumes a_normal: "normal H \<lparr>carrier = carrier G, mult = add G, one = zero G\<rparr>"
   383   -- {* generalizes @{text subgroup_mult_id} *}
   381   -- {* generalizes @{text subgroup_mult_id} *}
   384 by (rule normal.rcosets_mult_eq [OF a_normal,
   382 by (rule normal.rcosets_mult_eq [OF a_normal,
   385     folded set_add_def A_RCOSETS_def, simplified monoid_record_simps])
   383     folded set_add_def A_RCOSETS_def, simplified monoid_record_simps])
   386 
   384 
   387 
   385 
   388 subsection {* Congruence Relation *}
   386 subsubsection {* Congruence Relation *}
   389 
   387 
   390 lemma (in abelian_subgroup) a_equiv_rcong:
   388 lemma (in abelian_subgroup) a_equiv_rcong:
   391    shows "equiv (carrier G) (racong H)"
   389    shows "equiv (carrier G) (racong H)"
   392 by (rule subgroup.equiv_rcong [OF a_subgroup a_group,
   390 by (rule subgroup.equiv_rcong [OF a_subgroup a_group,
   393     folded a_r_congruent_def, simplified monoid_record_simps])
   391     folded a_r_congruent_def, simplified monoid_record_simps])
   444 by (rule group.lagrange [OF a_group,
   442 by (rule group.lagrange [OF a_group,
   445     folded A_RCOSETS_def, simplified monoid_record_simps order_def, folded order_def])
   443     folded A_RCOSETS_def, simplified monoid_record_simps order_def, folded order_def])
   446     (fast intro!: additive_subgroup.a_subgroup)+
   444     (fast intro!: additive_subgroup.a_subgroup)+
   447 
   445 
   448 
   446 
   449 subsection {* Factorization *}
   447 subsubsection {* Factorization *}
   450 
   448 
   451 lemmas A_FactGroup_defs = A_FactGroup_def FactGroup_def
   449 lemmas A_FactGroup_defs = A_FactGroup_def FactGroup_def
   452 
   450 
   453 lemma A_FactGroup_def':
   451 lemma A_FactGroup_def':
   454   fixes G (structure)
   452   fixes G (structure)
   516     folded A_FactGroup_def a_r_coset_def, simplified monoid_record_simps])
   514     folded A_FactGroup_def a_r_coset_def, simplified monoid_record_simps])
   517 
   515 
   518 text {* The isomorphism theorems have been omitted from lifting, at
   516 text {* The isomorphism theorems have been omitted from lifting, at
   519   least for now *}
   517   least for now *}
   520 
   518 
   521 subsection{*The First Isomorphism Theorem*}
   519 subsubsection{*The First Isomorphism Theorem*}
   522 
   520 
   523 text{*The quotient by the kernel of a homomorphism is isomorphic to the 
   521 text{*The quotient by the kernel of a homomorphism is isomorphic to the 
   524   range of that homomorphism.*}
   522   range of that homomorphism.*}
   525 
   523 
   526 lemmas a_kernel_defs =
   524 lemmas a_kernel_defs =
   529 lemma a_kernel_def':
   527 lemma a_kernel_def':
   530   "a_kernel R S h \<equiv> {x \<in> carrier R. h x = \<zero>\<^bsub>S\<^esub>}"
   528   "a_kernel R S h \<equiv> {x \<in> carrier R. h x = \<zero>\<^bsub>S\<^esub>}"
   531 by (rule a_kernel_def[unfolded kernel_def, simplified ring_record_simps])
   529 by (rule a_kernel_def[unfolded kernel_def, simplified ring_record_simps])
   532 
   530 
   533 
   531 
   534 subsection {* Homomorphisms *}
   532 subsubsection {* Homomorphisms *}
   535 
   533 
   536 lemma abelian_group_homI:
   534 lemma abelian_group_homI:
   537   assumes "abelian_group G"
   535   assumes "abelian_group G"
   538   assumes "abelian_group H"
   536   assumes "abelian_group H"
   539   assumes a_group_hom: "group_hom (| carrier = carrier G, mult = add G, one = zero G |)
   537   assumes a_group_hom: "group_hom (| carrier = carrier G, mult = add G, one = zero G |)
   638    \<Longrightarrow> (\<lambda>X. contents (h`X)) \<in> (G A_Mod (a_kernel G H h)) \<cong>
   636    \<Longrightarrow> (\<lambda>X. contents (h`X)) \<in> (G A_Mod (a_kernel G H h)) \<cong>
   639           (| carrier = carrier H, mult = add H, one = zero H |)"
   637           (| carrier = carrier H, mult = add H, one = zero H |)"
   640 by (rule group_hom.FactGroup_iso[OF a_group_hom,
   638 by (rule group_hom.FactGroup_iso[OF a_group_hom,
   641     folded a_kernel_def A_FactGroup_def, simplified ring_record_simps])
   639     folded a_kernel_def A_FactGroup_def, simplified ring_record_simps])
   642 
   640 
   643 section {* Lemmas Lifted from CosetExt.thy *}
   641 subsubsection {* Cosets *}
   644 
   642 
   645 text {* Not eveything from \texttt{CosetExt.thy} is lifted here. *}
   643 text {* Not eveything from \texttt{CosetExt.thy} is lifted here. *}
   646 
       
   647 subsection {* General Lemmas from \texttt{AlgebraExt.thy} *}
       
   648 
   644 
   649 lemma (in additive_subgroup) a_Hcarr [simp]:
   645 lemma (in additive_subgroup) a_Hcarr [simp]:
   650   assumes hH: "h \<in> H"
   646   assumes hH: "h \<in> H"
   651   shows "h \<in> carrier G"
   647   shows "h \<in> carrier G"
   652 by (rule subgroup.mem_carrier [OF a_subgroup,
   648 by (rule subgroup.mem_carrier [OF a_subgroup,
   653     simplified monoid_record_simps]) (rule hH)
   649     simplified monoid_record_simps]) (rule hH)
   654 
   650 
   655 
       
   656 subsection {* Lemmas for Right Cosets *}
       
   657 
   651 
   658 lemma (in abelian_subgroup) a_elemrcos_carrier:
   652 lemma (in abelian_subgroup) a_elemrcos_carrier:
   659   assumes acarr: "a \<in> carrier G"
   653   assumes acarr: "a \<in> carrier G"
   660       and a': "a' \<in> H +> a"
   654       and a': "a' \<in> H +> a"
   661   shows "a' \<in> carrier G"
   655   shows "a' \<in> carrier G"
   720   shows "y \<in> H +> x"
   714   shows "y \<in> H +> x"
   721 by (rule group.repr_independenceD [OF a_group a_subgroup,
   715 by (rule group.repr_independenceD [OF a_group a_subgroup,
   722     folded a_r_coset_def, simplified monoid_record_simps]) (rule ycarr, rule repr)
   716     folded a_r_coset_def, simplified monoid_record_simps]) (rule ycarr, rule repr)
   723 
   717 
   724 
   718 
   725 subsection {* Lemmas for the Set of Right Cosets *}
       
   726 
       
   727 lemma (in abelian_subgroup) a_rcosets_carrier:
   719 lemma (in abelian_subgroup) a_rcosets_carrier:
   728   "X \<in> a_rcosets H \<Longrightarrow> X \<subseteq> carrier G"
   720   "X \<in> a_rcosets H \<Longrightarrow> X \<subseteq> carrier G"
   729 by (rule subgroup.rcosets_carrier [OF a_subgroup a_group,
   721 by (rule subgroup.rcosets_carrier [OF a_subgroup a_group,
   730     folded A_RCOSETS_def, simplified monoid_record_simps])
   722     folded A_RCOSETS_def, simplified monoid_record_simps])
   731 
   723 
   732 
   724 
   733 
   725 
   734 subsection {* Addition of Subgroups *}
   726 subsubsection {* Addition of Subgroups *}
   735 
   727 
   736 lemma (in abelian_monoid) set_add_closed:
   728 lemma (in abelian_monoid) set_add_closed:
   737   assumes Acarr: "A \<subseteq> carrier G"
   729   assumes Acarr: "A \<subseteq> carrier G"
   738       and Bcarr: "B \<subseteq> carrier G"
   730       and Bcarr: "B \<subseteq> carrier G"
   739   shows "A <+> B \<subseteq> carrier G"
   731   shows "A <+> B \<subseteq> carrier G"