301 lemma (in comm_group) mult_subgroups: |
301 lemma (in comm_group) mult_subgroups: |
302 assumes "subgroup H G" and "subgroup K G" |
302 assumes "subgroup H G" and "subgroup K G" |
303 shows "subgroup (H <#> K) G" |
303 shows "subgroup (H <#> K) G" |
304 proof (rule subgroup.intro) |
304 proof (rule subgroup.intro) |
305 show "H <#> K \<subseteq> carrier G" |
305 show "H <#> K \<subseteq> carrier G" |
306 by (simp add: setmult_subset_G assms subgroup_imp_subset) |
306 by (simp add: setmult_subset_G assms subgroup.subset) |
307 next |
307 next |
308 have "\<one> \<otimes> \<one> \<in> H <#> K" |
308 have "\<one> \<otimes> \<one> \<in> H <#> K" |
309 unfolding set_mult_def using assms subgroup.one_closed by blast |
309 unfolding set_mult_def using assms subgroup.one_closed by blast |
310 thus "\<one> \<in> H <#> K" by simp |
310 thus "\<one> \<in> H <#> K" by simp |
311 next |
311 next |
819 apply (simp (no_asm_simp) add: order_def rcosets_part_G [symmetric]) |
819 apply (simp (no_asm_simp) add: order_def rcosets_part_G [symmetric]) |
820 apply (subst mult.commute) |
820 apply (subst mult.commute) |
821 apply (rule card_partition) |
821 apply (rule card_partition) |
822 apply (simp add: rcosets_subset_PowG [THEN finite_subset]) |
822 apply (simp add: rcosets_subset_PowG [THEN finite_subset]) |
823 apply (simp add: rcosets_part_G) |
823 apply (simp add: rcosets_part_G) |
824 apply (simp add: card_rcosets_equal subgroup_imp_subset) |
824 apply (simp add: card_rcosets_equal subgroup.subset) |
825 apply (simp add: rcos_disjoint) |
825 apply (simp add: rcos_disjoint) |
826 done |
826 done |
827 |
827 |
828 theorem (in group) lagrange: |
828 theorem (in group) lagrange: |
829 assumes "subgroup H G" |
829 assumes "subgroup H G" |
841 proof (rule ccontr) |
841 proof (rule ccontr) |
842 assume "\<not> infinite (rcosets H)" |
842 assume "\<not> infinite (rcosets H)" |
843 hence finite_rcos: "finite (rcosets H)" by simp |
843 hence finite_rcos: "finite (rcosets H)" by simp |
844 hence "card (\<Union>(rcosets H)) = (\<Sum>R\<in>(rcosets H). card R)" |
844 hence "card (\<Union>(rcosets H)) = (\<Sum>R\<in>(rcosets H). card R)" |
845 using card_Union_disjoint[of "rcosets H"] finite_H rcos_disjoint[OF assms(1)] |
845 using card_Union_disjoint[of "rcosets H"] finite_H rcos_disjoint[OF assms(1)] |
846 rcosets_finite[where ?H = H] by (simp add: assms subgroup_imp_subset) |
846 rcosets_finite[where ?H = H] by (simp add: assms subgroup.subset) |
847 hence "order G = (\<Sum>R\<in>(rcosets H). card R)" |
847 hence "order G = (\<Sum>R\<in>(rcosets H). card R)" |
848 by (simp add: assms order_def rcosets_part_G) |
848 by (simp add: assms order_def rcosets_part_G) |
849 hence "order G = (\<Sum>R\<in>(rcosets H). card H)" |
849 hence "order G = (\<Sum>R\<in>(rcosets H). card H)" |
850 using card_rcosets_equal by (simp add: assms subgroup_imp_subset) |
850 using card_rcosets_equal by (simp add: assms subgroup.subset) |
851 hence "order G = (card H) * (card (rcosets H))" by simp |
851 hence "order G = (card H) * (card (rcosets H))" by simp |
852 hence "order G \<noteq> 0" using finite_rcos finite_H assms ex_in_conv |
852 hence "order G \<noteq> 0" using finite_rcos finite_H assms ex_in_conv |
853 rcosets_part_G subgroup.one_closed by fastforce |
853 rcosets_part_G subgroup.one_closed by fastforce |
854 thus False using inf_G order_gt_0_iff_finite by blast |
854 thus False using inf_G order_gt_0_iff_finite by blast |
855 qed |
855 qed |
1092 using DirProd_subgroups[OF group_axioms normal_imp_subgroup[OF assms(2)]assms(1) |
1092 using DirProd_subgroups[OF group_axioms normal_imp_subgroup[OF assms(2)]assms(1) |
1093 normal_imp_subgroup[OF assms(3)]]. |
1093 normal_imp_subgroup[OF assms(3)]]. |
1094 show "\<And>x h. x \<in> carrier (G\<times>\<times>K) \<Longrightarrow> h \<in> H\<times>N \<Longrightarrow> x \<otimes>\<^bsub>G\<times>\<times>K\<^esub> h \<otimes>\<^bsub>G\<times>\<times>K\<^esub> inv\<^bsub>G\<times>\<times>K\<^esub> x \<in> H\<times>N" |
1094 show "\<And>x h. x \<in> carrier (G\<times>\<times>K) \<Longrightarrow> h \<in> H\<times>N \<Longrightarrow> x \<otimes>\<^bsub>G\<times>\<times>K\<^esub> h \<otimes>\<^bsub>G\<times>\<times>K\<^esub> inv\<^bsub>G\<times>\<times>K\<^esub> x \<in> H\<times>N" |
1095 proof- |
1095 proof- |
1096 fix x h assume xGK : "x \<in> carrier (G \<times>\<times> K)" and hHN : " h \<in> H \<times> N" |
1096 fix x h assume xGK : "x \<in> carrier (G \<times>\<times> K)" and hHN : " h \<in> H \<times> N" |
1097 hence hGK : "h \<in> carrier (G \<times>\<times> K)" using subgroup_imp_subset[OF sub] by auto |
1097 hence hGK : "h \<in> carrier (G \<times>\<times> K)" using subgroup.subset[OF sub] by auto |
1098 from xGK obtain x1 x2 where x1x2 :"x1 \<in> carrier G" "x2 \<in> carrier K" "x = (x1,x2)" |
1098 from xGK obtain x1 x2 where x1x2 :"x1 \<in> carrier G" "x2 \<in> carrier K" "x = (x1,x2)" |
1099 unfolding DirProd_def by fastforce |
1099 unfolding DirProd_def by fastforce |
1100 from hHN obtain h1 h2 where h1h2 : "h1 \<in> H" "h2 \<in> N" "h = (h1,h2)" |
1100 from hHN obtain h1 h2 where h1h2 : "h1 \<in> H" "h2 \<in> N" "h = (h1,h2)" |
1101 unfolding DirProd_def by fastforce |
1101 unfolding DirProd_def by fastforce |
1102 hence h1h2GK : "h1 \<in> carrier G" "h2 \<in> carrier K" |
1102 hence h1h2GK : "h1 \<in> carrier G" "h2 \<in> carrier K" |
1103 using normal_imp_subgroup subgroup_imp_subset assms apply blast+. |
1103 using normal_imp_subgroup subgroup.subset assms apply blast+. |
1104 have "inv\<^bsub>G \<times>\<times> K\<^esub> x = (inv\<^bsub>G\<^esub> x1,inv\<^bsub>K\<^esub> x2)" |
1104 have "inv\<^bsub>G \<times>\<times> K\<^esub> x = (inv\<^bsub>G\<^esub> x1,inv\<^bsub>K\<^esub> x2)" |
1105 using inv_DirProd[OF group_axioms assms(1) x1x2(1)x1x2(2)] x1x2 by auto |
1105 using inv_DirProd[OF group_axioms assms(1) x1x2(1)x1x2(2)] x1x2 by auto |
1106 hence "x \<otimes>\<^bsub>G \<times>\<times> K\<^esub> h \<otimes>\<^bsub>G \<times>\<times> K\<^esub> inv\<^bsub>G \<times>\<times> K\<^esub> x = (x1 \<otimes> h1 \<otimes> inv x1,x2 \<otimes>\<^bsub>K\<^esub> h2 \<otimes>\<^bsub>K\<^esub> inv\<^bsub>K\<^esub> x2)" |
1106 hence "x \<otimes>\<^bsub>G \<times>\<times> K\<^esub> h \<otimes>\<^bsub>G \<times>\<times> K\<^esub> inv\<^bsub>G \<times>\<times> K\<^esub> x = (x1 \<otimes> h1 \<otimes> inv x1,x2 \<otimes>\<^bsub>K\<^esub> h2 \<otimes>\<^bsub>K\<^esub> inv\<^bsub>K\<^esub> x2)" |
1107 using h1h2 x1x2 h1h2GK by auto |
1107 using h1h2 x1x2 h1h2GK by auto |
1108 moreover have "x1 \<otimes> h1 \<otimes> inv x1 \<in> H" "x2 \<otimes>\<^bsub>K\<^esub> h2 \<otimes>\<^bsub>K\<^esub> inv\<^bsub>K\<^esub> x2 \<in> N" |
1108 moreover have "x1 \<otimes> h1 \<otimes> inv x1 \<in> H" "x2 \<otimes>\<^bsub>K\<^esub> h2 \<otimes>\<^bsub>K\<^esub> inv\<^bsub>K\<^esub> x2 \<in> N" |
1158 lemma (in group) set_mult_carrier_idem: |
1158 lemma (in group) set_mult_carrier_idem: |
1159 assumes "subgroup H G" |
1159 assumes "subgroup H G" |
1160 shows "(carrier G) <#> H = carrier G" |
1160 shows "(carrier G) <#> H = carrier G" |
1161 proof |
1161 proof |
1162 show "(carrier G)<#>H \<subseteq> carrier G" |
1162 show "(carrier G)<#>H \<subseteq> carrier G" |
1163 unfolding set_mult_def using subgroup_imp_subset assms by blast |
1163 unfolding set_mult_def using subgroup.subset assms by blast |
1164 next |
1164 next |
1165 have " (carrier G) #> \<one> = carrier G" unfolding set_mult_def r_coset_def group_axioms by simp |
1165 have " (carrier G) #> \<one> = carrier G" unfolding set_mult_def r_coset_def group_axioms by simp |
1166 moreover have "(carrier G) #> \<one> \<subseteq> (carrier G) <#> H" unfolding set_mult_def r_coset_def |
1166 moreover have "(carrier G) #> \<one> \<subseteq> (carrier G) <#> H" unfolding set_mult_def r_coset_def |
1167 using assms subgroup.one_closed[OF assms] by blast |
1167 using assms subgroup.one_closed[OF assms] by blast |
1168 ultimately show "carrier G \<subseteq> (carrier G) <#> H" by simp |
1168 ultimately show "carrier G \<subseteq> (carrier G) <#> H" by simp |
1171 (*Same lemma as above, but everything is included in a subgroup*) |
1171 (*Same lemma as above, but everything is included in a subgroup*) |
1172 lemma (in group) set_mult_subgroup_idem: |
1172 lemma (in group) set_mult_subgroup_idem: |
1173 assumes "subgroup H G" |
1173 assumes "subgroup H G" |
1174 and "subgroup N (G\<lparr>carrier:=H\<rparr>)" |
1174 and "subgroup N (G\<lparr>carrier:=H\<rparr>)" |
1175 shows "H<#>N = H" |
1175 shows "H<#>N = H" |
1176 using group.set_mult_carrier_idem[OF subgroup_imp_group] subgroup_imp_subset assms |
1176 using group.set_mult_carrier_idem[OF subgroup_imp_group] subgroup.subset assms |
1177 by (metis monoid.cases_scheme order_refl partial_object.simps(1) |
1177 by (metis monoid.cases_scheme order_refl partial_object.simps(1) |
1178 partial_object.update_convs(1) subgroup_set_mult_equality) |
1178 partial_object.update_convs(1) subgroup_set_mult_equality) |
1179 |
1179 |
1180 (*A normal subgroup is commutative with set_mult*) |
1180 (*A normal subgroup is commutative with set_mult*) |
1181 lemma (in group) commut_normal: |
1181 lemma (in group) commut_normal: |
1194 assumes "subgroup H G" |
1194 assumes "subgroup H G" |
1195 and "N\<lhd>(G\<lparr>carrier:=H\<rparr>)" |
1195 and "N\<lhd>(G\<lparr>carrier:=H\<rparr>)" |
1196 and "subgroup K (G\<lparr>carrier:=H\<rparr>)" |
1196 and "subgroup K (G\<lparr>carrier:=H\<rparr>)" |
1197 shows "K<#>N = N<#>K" |
1197 shows "K<#>N = N<#>K" |
1198 proof- |
1198 proof- |
1199 have "N \<subseteq> carrier (G\<lparr>carrier := H\<rparr>)" using assms normal_imp_subgroup subgroup_imp_subset by blast |
1199 have "N \<subseteq> carrier (G\<lparr>carrier := H\<rparr>)" using assms normal_imp_subgroup subgroup.subset by blast |
1200 hence NH : "N \<subseteq> H" by simp |
1200 hence NH : "N \<subseteq> H" by simp |
1201 have "K \<subseteq> carrier(G\<lparr>carrier := H\<rparr>)" using subgroup_imp_subset assms by blast |
1201 have "K \<subseteq> carrier(G\<lparr>carrier := H\<rparr>)" using subgroup.subset assms by blast |
1202 hence KH : "K \<subseteq> H" by simp |
1202 hence KH : "K \<subseteq> H" by simp |
1203 have Egal : "K <#>\<^bsub>G\<lparr>carrier := H\<rparr>\<^esub> N = N <#>\<^bsub>G\<lparr>carrier := H\<rparr>\<^esub> K" |
1203 have Egal : "K <#>\<^bsub>G\<lparr>carrier := H\<rparr>\<^esub> N = N <#>\<^bsub>G\<lparr>carrier := H\<rparr>\<^esub> K" |
1204 using group.commut_normal[where ?G = "G\<lparr>carrier :=H\<rparr>", of K N,OF subgroup_imp_group[OF assms(1)] |
1204 using group.commut_normal[where ?G = "G\<lparr>carrier :=H\<rparr>", of K N,OF subgroup_imp_group[OF assms(1)] |
1205 assms(3) assms(2)] by auto |
1205 assms(3) assms(2)] by auto |
1206 also have "... = N <#> K" using subgroup_set_mult_equality[of H N K, OF assms(1) NH KH] by auto |
1206 also have "... = N <#> K" using subgroup_set_mult_equality[of H N K, OF assms(1) NH KH] by auto |
1233 using assms normal_imp_subgroup subgroups_Inter_pair incl_subgroup H1K_def by blast |
1233 using assms normal_imp_subgroup subgroups_Inter_pair incl_subgroup H1K_def by blast |
1234 next |
1234 next |
1235 show "subgroup (H\<inter>K) G" using HK_def subgroups_Inter_pair assms by auto |
1235 show "subgroup (H\<inter>K) G" using HK_def subgroups_Inter_pair assms by auto |
1236 next |
1236 next |
1237 have "H1 \<subseteq> (carrier (G\<lparr>carrier:=H\<rparr>))" |
1237 have "H1 \<subseteq> (carrier (G\<lparr>carrier:=H\<rparr>))" |
1238 using assms(3) normal_imp_subgroup subgroup_imp_subset by blast |
1238 using assms(3) normal_imp_subgroup subgroup.subset by blast |
1239 also have "... \<subseteq> H" by simp |
1239 also have "... \<subseteq> H" by simp |
1240 thus "H1K \<subseteq>H\<inter>K" |
1240 thus "H1K \<subseteq>H\<inter>K" |
1241 using H1K_def calculation by auto |
1241 using H1K_def calculation by auto |
1242 qed |
1242 qed |
1243 thus "subgroup H1K GHK" using GHK_def by simp |
1243 thus "subgroup H1K GHK" using GHK_def by simp |
1254 using GHK_def HK_def by simp |
1254 using GHK_def HK_def by simp |
1255 hence xHK:"x\<in>HK" using p by auto |
1255 hence xHK:"x\<in>HK" using p by auto |
1256 hence invx:"inv\<^bsub>GHK\<^esub> x = inv\<^bsub>GH\<^esub> x" |
1256 hence invx:"inv\<^bsub>GHK\<^esub> x = inv\<^bsub>GH\<^esub> x" |
1257 using invHK assms GHK_def HK_def GH_def subgroup_inv_equality subgroups_Inter_pair by simp |
1257 using invHK assms GHK_def HK_def GH_def subgroup_inv_equality subgroups_Inter_pair by simp |
1258 have "H1\<subseteq>carrier(GH)" |
1258 have "H1\<subseteq>carrier(GH)" |
1259 using assms GH_def normal_imp_subgroup subgroup_imp_subset by blast |
1259 using assms GH_def normal_imp_subgroup subgroup.subset by blast |
1260 hence hHK:"h\<in>HK" |
1260 hence hHK:"h\<in>HK" |
1261 using p2 H1K_def HK_def GH_def by auto |
1261 using p2 H1K_def HK_def GH_def by auto |
1262 hence xhx_egal : "x \<otimes>\<^bsub>GHK\<^esub> h \<otimes>\<^bsub>GHK\<^esub> inv\<^bsub>GHK\<^esub>x = x \<otimes>\<^bsub>GH\<^esub> h \<otimes>\<^bsub>GH\<^esub> inv\<^bsub>GH\<^esub> x" |
1262 hence xhx_egal : "x \<otimes>\<^bsub>GHK\<^esub> h \<otimes>\<^bsub>GHK\<^esub> inv\<^bsub>GHK\<^esub>x = x \<otimes>\<^bsub>GH\<^esub> h \<otimes>\<^bsub>GH\<^esub> inv\<^bsub>GH\<^esub> x" |
1263 using invx invHK multHK GHK_def GH_def by auto |
1263 using invx invHK multHK GHK_def GH_def by auto |
1264 have xH:"x\<in>carrier(GH)" |
1264 have xH:"x\<in>carrier(GH)" |
1289 have "G\<lparr>carrier := K\<rparr> = G" using K_def by auto |
1289 have "G\<lparr>carrier := K\<rparr> = G" using K_def by auto |
1290 moreover have "subgroup K G" using K_def subgroup_self by blast |
1290 moreover have "subgroup K G" using K_def subgroup_self by blast |
1291 moreover have "normal N (G \<lparr>carrier :=K\<rparr>)" using assms K_def by simp |
1291 moreover have "normal N (G \<lparr>carrier :=K\<rparr>)" using assms K_def by simp |
1292 ultimately have "N \<inter> H \<lhd> G\<lparr>carrier := K \<inter> H\<rparr>" |
1292 ultimately have "N \<inter> H \<lhd> G\<lparr>carrier := K \<inter> H\<rparr>" |
1293 using normal_inter[of K H N] assms(1) by blast |
1293 using normal_inter[of K H N] assms(1) by blast |
1294 moreover have "K \<inter> H = H" using K_def assms subgroup_imp_subset by blast |
1294 moreover have "K \<inter> H = H" using K_def assms subgroup.subset by blast |
1295 ultimately show "normal (N\<inter>H) (G\<lparr>carrier := H\<rparr>)" by auto |
1295 ultimately show "normal (N\<inter>H) (G\<lparr>carrier := H\<rparr>)" by auto |
1296 qed |
1296 qed |
1297 |
1297 |
1298 |
1298 |
1299 end |
1299 end |