src/HOL/Algebra/Group.thy
changeset 13944 9b34607cd83e
parent 13943 83d842ccd4aa
child 13949 0ce528cd6f19
equal deleted inserted replaced
13943:83d842ccd4aa 13944:9b34607cd83e
   346 
   346 
   347 lemma (in group) inv_comm:
   347 lemma (in group) inv_comm:
   348   "[| x \<otimes> y = \<one>; x \<in> carrier G; y \<in> carrier G |] ==> y \<otimes> x = \<one>"
   348   "[| x \<otimes> y = \<one>; x \<in> carrier G; y \<in> carrier G |] ==> y \<otimes> x = \<one>"
   349   by (rule Units_inv_comm) auto                          
   349   by (rule Units_inv_comm) auto                          
   350 
   350 
   351 lemma (in group) m_inv_equality:
   351 lemma (in group) inv_equality:
   352      "[|y \<otimes> x = \<one>; x \<in> carrier G; y \<in> carrier G|] ==> inv x = y"
   352      "[|y \<otimes> x = \<one>; x \<in> carrier G; y \<in> carrier G|] ==> inv x = y"
   353 apply (simp add: m_inv_def)
   353 apply (simp add: m_inv_def)
   354 apply (rule the_equality)
   354 apply (rule the_equality)
   355  apply (simp add: inv_comm [of y x]) 
   355  apply (simp add: inv_comm [of y x]) 
   356 apply (rule r_cancel [THEN iffD1], auto) 
   356 apply (rule r_cancel [THEN iffD1], auto) 
   565   shows "group (G \<times>\<^sub>g H)"
   565   shows "group (G \<times>\<^sub>g H)"
   566   by (rule groupI)
   566   by (rule groupI)
   567     (auto intro: G.m_assoc H.m_assoc G.l_inv H.l_inv
   567     (auto intro: G.m_assoc H.m_assoc G.l_inv H.l_inv
   568       simp add: DirProdGroup_def DirProdSemigroup_def)
   568       simp add: DirProdGroup_def DirProdSemigroup_def)
   569 
   569 
       
   570 lemma carrier_DirProdGroup [simp]:
       
   571      "carrier (G \<times>\<^sub>g H) = carrier G \<times> carrier H"
       
   572   by (simp add: DirProdGroup_def DirProdSemigroup_def)
       
   573 
       
   574 lemma one_DirProdGroup [simp]:
       
   575      "one (G \<times>\<^sub>g H) = (one G, one H)"
       
   576   by (simp add: DirProdGroup_def DirProdSemigroup_def);
       
   577 
       
   578 lemma mult_DirProdGroup [simp]:
       
   579      "mult (G \<times>\<^sub>g H) (g, h) (g', h') = (mult G g g', mult H h h')"
       
   580   by (simp add: DirProdGroup_def DirProdSemigroup_def)
       
   581 
       
   582 lemma inv_DirProdGroup [simp]:
       
   583   includes group G + group H
       
   584   assumes g: "g \<in> carrier G"
       
   585       and h: "h \<in> carrier H"
       
   586   shows "m_inv (G \<times>\<^sub>g H) (g, h) = (m_inv G g, m_inv H h)"
       
   587   apply (rule group.inv_equality [OF DirProdGroup_group])
       
   588   apply (simp_all add: prems group_def group.l_inv)
       
   589   done
       
   590 
   570 subsection {* Homomorphisms *}
   591 subsection {* Homomorphisms *}
   571 
   592 
   572 constdefs
   593 constdefs
   573   hom :: "[('a, 'c) semigroup_scheme, ('b, 'd) semigroup_scheme]
   594   hom :: "[('a, 'c) semigroup_scheme, ('b, 'd) semigroup_scheme]
   574     => ('a => 'b)set"
   595     => ('a => 'b)set"