src/HOL/Algebra/Coset.thy
changeset 39910 10097e0a9dbd
parent 35849 b5522b51cb1e
child 40815 6e2d17cc0d1d
equal deleted inserted replaced
39818:ff9e9d5ac171 39910:10097e0a9dbd
   922   thus ?thesis 
   922   thus ?thesis 
   923    by (auto simp add: kernel_def r_coset_def image_def intro: hom_one)
   923    by (auto simp add: kernel_def r_coset_def image_def intro: hom_one)
   924 qed
   924 qed
   925 
   925 
   926 
   926 
   927 lemma (in group_hom) FactGroup_contents_mem:
   927 lemma (in group_hom) FactGroup_the_elem_mem:
   928   assumes X: "X \<in> carrier (G Mod (kernel G H h))"
   928   assumes X: "X \<in> carrier (G Mod (kernel G H h))"
   929   shows "contents (h`X) \<in> carrier H"
   929   shows "the_elem (h`X) \<in> carrier H"
   930 proof -
   930 proof -
   931   from X
   931   from X
   932   obtain g where g: "g \<in> carrier G" 
   932   obtain g where g: "g \<in> carrier G" 
   933              and "X = kernel G H h #> g"
   933              and "X = kernel G H h #> g"
   934     by (auto simp add: FactGroup_def RCOSETS_def)
   934     by (auto simp add: FactGroup_def RCOSETS_def)
   935   hence "h ` X = {h g}" by (auto simp add: kernel_def r_coset_def image_def g)
   935   hence "h ` X = {h g}" by (auto simp add: kernel_def r_coset_def image_def g)
   936   thus ?thesis by (auto simp add: g)
   936   thus ?thesis by (auto simp add: g)
   937 qed
   937 qed
   938 
   938 
   939 lemma (in group_hom) FactGroup_hom:
   939 lemma (in group_hom) FactGroup_hom:
   940      "(\<lambda>X. contents (h`X)) \<in> hom (G Mod (kernel G H h)) H"
   940      "(\<lambda>X. the_elem (h`X)) \<in> hom (G Mod (kernel G H h)) H"
   941 apply (simp add: hom_def FactGroup_contents_mem  normal.factorgroup_is_group [OF normal_kernel] group.axioms monoid.m_closed)
   941 apply (simp add: hom_def FactGroup_the_elem_mem normal.factorgroup_is_group [OF normal_kernel] group.axioms monoid.m_closed)
   942 proof (intro ballI)
   942 proof (intro ballI)
   943   fix X and X'
   943   fix X and X'
   944   assume X:  "X  \<in> carrier (G Mod kernel G H h)"
   944   assume X:  "X  \<in> carrier (G Mod kernel G H h)"
   945      and X': "X' \<in> carrier (G Mod kernel G H h)"
   945      and X': "X' \<in> carrier (G Mod kernel G H h)"
   946   then
   946   then
   953     by (force simp add: kernel_def r_coset_def image_def)+
   953     by (force simp add: kernel_def r_coset_def image_def)+
   954   hence "h ` (X <#> X') = {h g \<otimes>\<^bsub>H\<^esub> h g'}" using X X'
   954   hence "h ` (X <#> X') = {h g \<otimes>\<^bsub>H\<^esub> h g'}" using X X'
   955     by (auto dest!: FactGroup_nonempty
   955     by (auto dest!: FactGroup_nonempty
   956              simp add: set_mult_def image_eq_UN 
   956              simp add: set_mult_def image_eq_UN 
   957                        subsetD [OF Xsub] subsetD [OF X'sub]) 
   957                        subsetD [OF Xsub] subsetD [OF X'sub]) 
   958   thus "contents (h ` (X <#> X')) = contents (h ` X) \<otimes>\<^bsub>H\<^esub> contents (h ` X')"
   958   thus "the_elem (h ` (X <#> X')) = the_elem (h ` X) \<otimes>\<^bsub>H\<^esub> the_elem (h ` X')"
   959     by (simp add: all image_eq_UN FactGroup_nonempty X X')
   959     by (simp add: all image_eq_UN FactGroup_nonempty X X')
   960 qed
   960 qed
   961 
   961 
   962 
   962 
   963 text{*Lemma for the following injectivity result*}
   963 text{*Lemma for the following injectivity result*}
   969 apply (rule_tac x="y \<otimes> g \<otimes> inv g'" in exI) 
   969 apply (rule_tac x="y \<otimes> g \<otimes> inv g'" in exI) 
   970 apply (simp add: G.m_assoc) 
   970 apply (simp add: G.m_assoc) 
   971 done
   971 done
   972 
   972 
   973 lemma (in group_hom) FactGroup_inj_on:
   973 lemma (in group_hom) FactGroup_inj_on:
   974      "inj_on (\<lambda>X. contents (h ` X)) (carrier (G Mod kernel G H h))"
   974      "inj_on (\<lambda>X. the_elem (h ` X)) (carrier (G Mod kernel G H h))"
   975 proof (simp add: inj_on_def, clarify) 
   975 proof (simp add: inj_on_def, clarify) 
   976   fix X and X'
   976   fix X and X'
   977   assume X:  "X  \<in> carrier (G Mod kernel G H h)"
   977   assume X:  "X  \<in> carrier (G Mod kernel G H h)"
   978      and X': "X' \<in> carrier (G Mod kernel G H h)"
   978      and X': "X' \<in> carrier (G Mod kernel G H h)"
   979   then
   979   then
   981            where gX: "g \<in> carrier G"  "g' \<in> carrier G" 
   981            where gX: "g \<in> carrier G"  "g' \<in> carrier G" 
   982               "X = kernel G H h #> g" "X' = kernel G H h #> g'"
   982               "X = kernel G H h #> g" "X' = kernel G H h #> g'"
   983     by (auto simp add: FactGroup_def RCOSETS_def)
   983     by (auto simp add: FactGroup_def RCOSETS_def)
   984   hence all: "\<forall>x\<in>X. h x = h g" "\<forall>x\<in>X'. h x = h g'" 
   984   hence all: "\<forall>x\<in>X. h x = h g" "\<forall>x\<in>X'. h x = h g'" 
   985     by (force simp add: kernel_def r_coset_def image_def)+
   985     by (force simp add: kernel_def r_coset_def image_def)+
   986   assume "contents (h ` X) = contents (h ` X')"
   986   assume "the_elem (h ` X) = the_elem (h ` X')"
   987   hence h: "h g = h g'"
   987   hence h: "h g = h g'"
   988     by (simp add: image_eq_UN all FactGroup_nonempty X X') 
   988     by (simp add: image_eq_UN all FactGroup_nonempty X X') 
   989   show "X=X'" by (rule equalityI) (simp_all add: FactGroup_subset h gX) 
   989   show "X=X'" by (rule equalityI) (simp_all add: FactGroup_subset h gX) 
   990 qed
   990 qed
   991 
   991 
   992 text{*If the homomorphism @{term h} is onto @{term H}, then so is the
   992 text{*If the homomorphism @{term h} is onto @{term H}, then so is the
   993 homomorphism from the quotient group*}
   993 homomorphism from the quotient group*}
   994 lemma (in group_hom) FactGroup_onto:
   994 lemma (in group_hom) FactGroup_onto:
   995   assumes h: "h ` carrier G = carrier H"
   995   assumes h: "h ` carrier G = carrier H"
   996   shows "(\<lambda>X. contents (h ` X)) ` carrier (G Mod kernel G H h) = carrier H"
   996   shows "(\<lambda>X. the_elem (h ` X)) ` carrier (G Mod kernel G H h) = carrier H"
   997 proof
   997 proof
   998   show "(\<lambda>X. contents (h ` X)) ` carrier (G Mod kernel G H h) \<subseteq> carrier H"
   998   show "(\<lambda>X. the_elem (h ` X)) ` carrier (G Mod kernel G H h) \<subseteq> carrier H"
   999     by (auto simp add: FactGroup_contents_mem)
   999     by (auto simp add: FactGroup_the_elem_mem)
  1000   show "carrier H \<subseteq> (\<lambda>X. contents (h ` X)) ` carrier (G Mod kernel G H h)"
  1000   show "carrier H \<subseteq> (\<lambda>X. the_elem (h ` X)) ` carrier (G Mod kernel G H h)"
  1001   proof
  1001   proof
  1002     fix y
  1002     fix y
  1003     assume y: "y \<in> carrier H"
  1003     assume y: "y \<in> carrier H"
  1004     with h obtain g where g: "g \<in> carrier G" "h g = y"
  1004     with h obtain g where g: "g \<in> carrier G" "h g = y"
  1005       by (blast elim: equalityE) 
  1005       by (blast elim: equalityE) 
  1006     hence "(\<Union>x\<in>kernel G H h #> g. {h x}) = {y}" 
  1006     hence "(\<Union>x\<in>kernel G H h #> g. {h x}) = {y}" 
  1007       by (auto simp add: y kernel_def r_coset_def) 
  1007       by (auto simp add: y kernel_def r_coset_def) 
  1008     with g show "y \<in> (\<lambda>X. contents (h ` X)) ` carrier (G Mod kernel G H h)" 
  1008     with g show "y \<in> (\<lambda>X. the_elem (h ` X)) ` carrier (G Mod kernel G H h)" 
  1009       by (auto intro!: bexI simp add: FactGroup_def RCOSETS_def image_eq_UN)
  1009       by (auto intro!: bexI simp add: FactGroup_def RCOSETS_def image_eq_UN)
  1010   qed
  1010   qed
  1011 qed
  1011 qed
  1012 
  1012 
  1013 
  1013 
  1014 text{*If @{term h} is a homomorphism from @{term G} onto @{term H}, then the
  1014 text{*If @{term h} is a homomorphism from @{term G} onto @{term H}, then the
  1015  quotient group @{term "G Mod (kernel G H h)"} is isomorphic to @{term H}.*}
  1015  quotient group @{term "G Mod (kernel G H h)"} is isomorphic to @{term H}.*}
  1016 theorem (in group_hom) FactGroup_iso:
  1016 theorem (in group_hom) FactGroup_iso:
  1017   "h ` carrier G = carrier H
  1017   "h ` carrier G = carrier H
  1018    \<Longrightarrow> (\<lambda>X. contents (h`X)) \<in> (G Mod (kernel G H h)) \<cong> H"
  1018    \<Longrightarrow> (\<lambda>X. the_elem (h`X)) \<in> (G Mod (kernel G H h)) \<cong> H"
  1019 by (simp add: iso_def FactGroup_hom FactGroup_inj_on bij_betw_def 
  1019 by (simp add: iso_def FactGroup_hom FactGroup_inj_on bij_betw_def 
  1020               FactGroup_onto) 
  1020               FactGroup_onto) 
  1021 
  1021 
  1022 
  1022 
  1023 end
  1023 end