src/HOL/Algebra/Coset.thy
changeset 70039 733e256ecdf3
parent 70027 94494b92d8d0
child 73932 fd21b4a93043
equal deleted inserted replaced
70038:3374d16efc61 70039:733e256ecdf3
  1059 lemma (in group_hom) normal_kernel: "(kernel G H h) \<lhd> G"
  1059 lemma (in group_hom) normal_kernel: "(kernel G H h) \<lhd> G"
  1060   apply (simp only: G.normal_inv_iff subgroup_kernel)
  1060   apply (simp only: G.normal_inv_iff subgroup_kernel)
  1061   apply (simp add: kernel_def)
  1061   apply (simp add: kernel_def)
  1062   done
  1062   done
  1063 
  1063 
       
  1064 lemma iso_kernel_image:
       
  1065   assumes "group G" "group H"
       
  1066   shows "f \<in> iso G H \<longleftrightarrow> f \<in> hom G H \<and> kernel G H f = {\<one>\<^bsub>G\<^esub>} \<and> f ` carrier G = carrier H"
       
  1067     (is "?lhs = ?rhs")
       
  1068 proof (intro iffI conjI)
       
  1069   assume f: ?lhs
       
  1070   show "f \<in> hom G H"
       
  1071     using Group.iso_iff f by blast
       
  1072   show "kernel G H f = {\<one>\<^bsub>G\<^esub>}"
       
  1073     using assms f Group.group_def hom_one
       
  1074     by (fastforce simp add: kernel_def iso_iff_mon_epi mon_iff_hom_one set_eq_iff)
       
  1075   show "f ` carrier G = carrier H"
       
  1076     by (meson Group.iso_iff f)
       
  1077 next
       
  1078   assume ?rhs
       
  1079   with assms show ?lhs
       
  1080     by (auto simp: kernel_def iso_def bij_betw_def inj_on_one_iff')
       
  1081 qed
       
  1082 
       
  1083 
  1064 lemma (in group_hom) FactGroup_nonempty:
  1084 lemma (in group_hom) FactGroup_nonempty:
  1065   assumes X: "X \<in> carrier (G Mod kernel G H h)"
  1085   assumes X: "X \<in> carrier (G Mod kernel G H h)"
  1066   shows "X \<noteq> {}"
  1086   shows "X \<noteq> {}"
  1067 proof -
  1087 proof -
  1068   from X
  1088   from X
  1081   have "h x = h y"
  1101   have "h x = h y"
  1082     if "x \<in> carrier G" "y \<in> carrier G" "r_coset G N x = r_coset G N y" for x y
  1102     if "x \<in> carrier G" "y \<in> carrier G" "r_coset G N x = r_coset G N y" for x y
  1083   proof -
  1103   proof -
  1084     have "x \<otimes>\<^bsub>G\<^esub> inv\<^bsub>G\<^esub> y \<in> N"
  1104     have "x \<otimes>\<^bsub>G\<^esub> inv\<^bsub>G\<^esub> y \<in> N"
  1085       using \<open>N \<lhd> G\<close> group.rcos_self normal.axioms(2) normal_imp_subgroup
  1105       using \<open>N \<lhd> G\<close> group.rcos_self normal.axioms(2) normal_imp_subgroup
  1086          subgroup.rcos_module_imp that by fastforce
  1106          subgroup.rcos_module_imp that by metis 
  1087     with h have xy: "x \<otimes>\<^bsub>G\<^esub> inv\<^bsub>G\<^esub> y \<in> kernel G H h"
  1107     with h have xy: "x \<otimes>\<^bsub>G\<^esub> inv\<^bsub>G\<^esub> y \<in> kernel G H h"
  1088       by blast
  1108       by blast
  1089     have "h x \<otimes>\<^bsub>H\<^esub> inv\<^bsub>H\<^esub>(h y) = h (x \<otimes>\<^bsub>G\<^esub> inv\<^bsub>G\<^esub> y)"
  1109     have "h x \<otimes>\<^bsub>H\<^esub> inv\<^bsub>H\<^esub>(h y) = h (x \<otimes>\<^bsub>G\<^esub> inv\<^bsub>G\<^esub> y)"
  1090       by (simp add: that)
  1110       by (simp add: that)
  1091     also have "\<dots> = \<one>\<^bsub>H\<^esub>"
  1111     also have "\<dots> = \<one>\<^bsub>H\<^esub>"
  1219     using A assms unfolding kernel_def by blast
  1239     using A assms unfolding kernel_def by blast
  1220   thus "g1 = g2"
  1240   thus "g1 = g2"
  1221     using A G.inv_equality G.inv_inv by blast
  1241     using A G.inv_equality G.inv_inv by blast
  1222 qed
  1242 qed
  1223 
  1243 
  1224 (* NEW ========================================================================== *)
       
  1225 lemma (in group_hom) inj_iff_trivial_ker:
  1244 lemma (in group_hom) inj_iff_trivial_ker:
  1226   shows "inj_on h (carrier G) \<longleftrightarrow> kernel G H h = { \<one> }"
  1245   shows "inj_on h (carrier G) \<longleftrightarrow> kernel G H h = { \<one> }"
  1227 proof
  1246 proof
  1228   assume inj: "inj_on h (carrier G)" show "kernel G H h = { \<one> }"
  1247   assume inj: "inj_on h (carrier G)" show "kernel G H h = { \<one> }"
  1229     unfolding kernel_def
  1248     unfolding kernel_def
  1234 next
  1253 next
  1235   show "kernel G H h = { \<one> } \<Longrightarrow> inj_on h (carrier G)"
  1254   show "kernel G H h = { \<one> } \<Longrightarrow> inj_on h (carrier G)"
  1236     using trivial_ker_imp_inj by simp
  1255     using trivial_ker_imp_inj by simp
  1237 qed
  1256 qed
  1238 
  1257 
  1239 (* NEW ========================================================================== *)
       
  1240 lemma (in group_hom) induced_group_hom':
  1258 lemma (in group_hom) induced_group_hom':
  1241   assumes "subgroup I G" shows "group_hom (G \<lparr> carrier := I \<rparr>) H h"
  1259   assumes "subgroup I G" shows "group_hom (G \<lparr> carrier := I \<rparr>) H h"
  1242 proof -
  1260 proof -
  1243   have "h \<in> hom (G \<lparr> carrier := I \<rparr>) H"
  1261   have "h \<in> hom (G \<lparr> carrier := I \<rparr>) H"
  1244     using homh subgroup.subset[OF assms] unfolding hom_def by (auto, meson hom_mult subsetCE)
  1262     using homh subgroup.subset[OF assms] unfolding hom_def by (auto, meson hom_mult subsetCE)
  1245   thus ?thesis
  1263   thus ?thesis
  1246     using subgroup.subgroup_is_group[OF assms G.group_axioms] group_axioms
  1264     using subgroup.subgroup_is_group[OF assms G.group_axioms] group_axioms
  1247     unfolding group_hom_def group_hom_axioms_def by auto
  1265     unfolding group_hom_def group_hom_axioms_def by auto
  1248 qed
  1266 qed
  1249 
  1267 
  1250 (* NEW ========================================================================== *)
       
  1251 lemma (in group_hom) inj_on_subgroup_iff_trivial_ker:
  1268 lemma (in group_hom) inj_on_subgroup_iff_trivial_ker:
  1252   assumes "subgroup I G"
  1269   assumes "subgroup I G"
  1253   shows "inj_on h I \<longleftrightarrow> kernel (G \<lparr> carrier := I \<rparr>) H h = { \<one> }"
  1270   shows "inj_on h I \<longleftrightarrow> kernel (G \<lparr> carrier := I \<rparr>) H h = { \<one> }"
  1254   using group_hom.inj_iff_trivial_ker[OF induced_group_hom'[OF assms]] by simp
  1271   using group_hom.inj_iff_trivial_ker[OF induced_group_hom'[OF assms]] by simp
  1255 
  1272 
  1256 (* NEW ========================================================================== *)
       
  1257 lemma set_mult_hom:
  1273 lemma set_mult_hom:
  1258   assumes "h \<in> hom G H" "I \<subseteq> carrier G" and "J \<subseteq> carrier G"
  1274   assumes "h \<in> hom G H" "I \<subseteq> carrier G" and "J \<subseteq> carrier G"
  1259   shows "h ` (I <#>\<^bsub>G\<^esub> J) = (h ` I) <#>\<^bsub>H\<^esub> (h ` J)"
  1275   shows "h ` (I <#>\<^bsub>G\<^esub> J) = (h ` I) <#>\<^bsub>H\<^esub> (h ` J)"
  1260 proof
  1276 proof
  1261   show "h ` (I <#>\<^bsub>G\<^esub> J) \<subseteq> (h ` I) <#>\<^bsub>H\<^esub> (h ` J)"
  1277   show "h ` (I <#>\<^bsub>G\<^esub> J) \<subseteq> (h ` I) <#>\<^bsub>H\<^esub> (h ` J)"
  1279     thus "a \<in> h ` (I <#>\<^bsub>G\<^esub> J)"
  1295     thus "a \<in> h ` (I <#>\<^bsub>G\<^esub> J)"
  1280       using i and j unfolding set_mult_def by auto
  1296       using i and j unfolding set_mult_def by auto
  1281   qed
  1297   qed
  1282 qed
  1298 qed
  1283 
  1299 
  1284 (* NEW ========================================================================== *)
       
  1285 corollary coset_hom:
  1300 corollary coset_hom:
  1286   assumes "h \<in> hom G H" "I \<subseteq> carrier G" "a \<in> carrier G"
  1301   assumes "h \<in> hom G H" "I \<subseteq> carrier G" "a \<in> carrier G"
  1287   shows "h ` (a <#\<^bsub>G\<^esub> I) = h a <#\<^bsub>H\<^esub> (h ` I)" and "h ` (I #>\<^bsub>G\<^esub> a) = (h ` I) #>\<^bsub>H\<^esub> h a"
  1302   shows "h ` (a <#\<^bsub>G\<^esub> I) = h a <#\<^bsub>H\<^esub> (h ` I)" and "h ` (I #>\<^bsub>G\<^esub> a) = (h ` I) #>\<^bsub>H\<^esub> h a"
  1288   unfolding l_coset_eq_set_mult r_coset_eq_set_mult using assms set_mult_hom[OF assms(1)] by auto
  1303   unfolding l_coset_eq_set_mult r_coset_eq_set_mult using assms set_mult_hom[OF assms(1)] by auto
  1289 
  1304 
  1290 (* NEW ========================================================================== *)
       
  1291 corollary (in group_hom) set_mult_ker_hom:
  1305 corollary (in group_hom) set_mult_ker_hom:
  1292   assumes "I \<subseteq> carrier G"
  1306   assumes "I \<subseteq> carrier G"
  1293   shows "h ` (I <#> (kernel G H h)) = h ` I" and "h ` ((kernel G H h) <#> I) = h ` I"
  1307   shows "h ` (I <#> (kernel G H h)) = h ` I" and "h ` ((kernel G H h) <#> I) = h ` I"
  1294 proof -
  1308 proof -
  1295   have ker_in_carrier: "kernel G H h \<subseteq> carrier G"
  1309   have ker_in_carrier: "kernel G H h \<subseteq> carrier G"
  1303     unfolding set_mult_def by force+
  1317     unfolding set_mult_def by force+
  1304   ultimately show "h ` (I <#> (kernel G H h)) = h ` I" and "h ` ((kernel G H h) <#> I) = h ` I"
  1318   ultimately show "h ` (I <#> (kernel G H h)) = h ` I" and "h ` ((kernel G H h) <#> I) = h ` I"
  1305     using set_mult_hom[OF homh assms ker_in_carrier] set_mult_hom[OF homh ker_in_carrier assms] by simp+
  1319     using set_mult_hom[OF homh assms ker_in_carrier] set_mult_hom[OF homh ker_in_carrier assms] by simp+
  1306 qed
  1320 qed
  1307 
  1321 
  1308 
  1322 subsubsection\<open>Trivial homomorphisms\<close>
  1309 subsection \<open>Theorems about Factor Groups and Direct product\<close>
  1323 
       
  1324 definition trivial_homomorphism where
       
  1325  "trivial_homomorphism G H f \<equiv> f \<in> hom G H \<and> (\<forall>x \<in> carrier G. f x = one H)"
       
  1326 
       
  1327 lemma trivial_homomorphism_kernel:
       
  1328    "trivial_homomorphism G H f \<longleftrightarrow> f \<in> hom G H \<and> kernel G H f = carrier G"
       
  1329   by (auto simp: trivial_homomorphism_def kernel_def)
       
  1330 
       
  1331 lemma (in group) trivial_homomorphism_image:
       
  1332    "trivial_homomorphism G H f \<longleftrightarrow> f \<in> hom G H \<and> f ` carrier G = {one H}"
       
  1333   by (auto simp: trivial_homomorphism_def) (metis one_closed rev_image_eqI)
       
  1334 
       
  1335 
       
  1336 subsection \<open>Image kernel theorems\<close>
       
  1337 
       
  1338 lemma group_Int_image_ker:
       
  1339   assumes f: "f \<in> hom G H" and g: "g \<in> hom H K" and "inj_on (g \<circ> f) (carrier G)" "group G" "group H" "group K"
       
  1340   shows "(f ` carrier G) \<inter> (kernel H K g) = {\<one>\<^bsub>H\<^esub>}"
       
  1341 proof -
       
  1342   have "(f ` carrier G) \<inter> (kernel H K g) \<subseteq> {\<one>\<^bsub>H\<^esub>}"
       
  1343     using assms
       
  1344     apply (clarsimp simp: kernel_def o_def)
       
  1345     by (metis group.is_monoid hom_one inj_on_eq_iff monoid.one_closed)
       
  1346   moreover have "one H \<in> f ` carrier G"
       
  1347     by (metis f \<open>group G\<close> \<open>group H\<close> group.is_monoid hom_one image_iff monoid.one_closed)
       
  1348   moreover have "one H \<in> kernel H K g"
       
  1349     apply (simp add: kernel_def)
       
  1350     using g group.is_monoid hom_one \<open>group H\<close> \<open>group K\<close> by blast
       
  1351   ultimately show ?thesis
       
  1352     by blast
       
  1353 qed
       
  1354 
       
  1355 
       
  1356 lemma group_sum_image_ker:
       
  1357   assumes f: "f \<in> hom G H" and g: "g \<in> hom H K" and eq: "(g \<circ> f) ` (carrier G) = carrier K"
       
  1358      and "group G" "group H" "group K"
       
  1359   shows "set_mult H (f ` carrier G) (kernel H K g) = carrier H" (is "?lhs = ?rhs")
       
  1360 proof
       
  1361   show "?lhs \<subseteq> ?rhs"
       
  1362     apply (auto simp: kernel_def set_mult_def)
       
  1363     by (meson Group.group_def assms(5) f hom_carrier image_eqI monoid.m_closed subset_iff)
       
  1364   have "\<exists>x\<in>carrier G. \<exists>z. z \<in> carrier H \<and> g z = \<one>\<^bsub>K\<^esub> \<and> y = f x \<otimes>\<^bsub>H\<^esub> z"
       
  1365     if y: "y \<in> carrier H" for y
       
  1366   proof -
       
  1367     have "g y \<in> carrier K"
       
  1368       using g hom_carrier that by blast
       
  1369     with assms obtain x where x: "x \<in> carrier G" "(g \<circ> f) x = g y"
       
  1370       by (metis image_iff)
       
  1371     with assms have "inv\<^bsub>H\<^esub> f x \<otimes>\<^bsub>H\<^esub> y \<in> carrier H"
       
  1372       by (metis group.subgroup_self hom_carrier image_subset_iff subgroup_def y)
       
  1373     moreover
       
  1374     have "g (inv\<^bsub>H\<^esub> f x \<otimes>\<^bsub>H\<^esub> y) = \<one>\<^bsub>K\<^esub>"
       
  1375     proof -
       
  1376       have "inv\<^bsub>H\<^esub> f x \<in> carrier H"
       
  1377         by (meson \<open>group H\<close> f group.inv_closed hom_carrier image_subset_iff x(1))
       
  1378       then have "g (inv\<^bsub>H\<^esub> f x \<otimes>\<^bsub>H\<^esub> y) = g (inv\<^bsub>H\<^esub> f x) \<otimes>\<^bsub>K\<^esub> g y"
       
  1379         by (simp add: hom_mult [OF g] y)
       
  1380       also have "\<dots> = inv\<^bsub>K\<^esub> (g (f x)) \<otimes>\<^bsub>K\<^esub> g y"
       
  1381         using assms x(1)
       
  1382         by (metis (mono_tags, lifting) group_hom.hom_inv group_hom.intro group_hom_axioms.intro hom_carrier image_subset_iff)
       
  1383       also have "\<dots> = \<one>\<^bsub>K\<^esub>"
       
  1384         using \<open>g y \<in> carrier K\<close> assms(6) group.l_inv x(2) by fastforce
       
  1385       finally show ?thesis .
       
  1386     qed
       
  1387     moreover
       
  1388     have "y = f x \<otimes>\<^bsub>H\<^esub> (inv\<^bsub>H\<^esub> f x \<otimes>\<^bsub>H\<^esub> y)"
       
  1389       using x y
       
  1390       by (metis (no_types, hide_lams) assms(5) f group.inv_solve_left group.subgroup_self hom_carrier image_subset_iff subgroup_def that)
       
  1391     ultimately
       
  1392     show ?thesis
       
  1393       using x y by force
       
  1394   qed
       
  1395   then show "?rhs \<subseteq> ?lhs"
       
  1396     by (auto simp: kernel_def set_mult_def)
       
  1397 qed
       
  1398 
       
  1399 
       
  1400 lemma group_sum_ker_image:
       
  1401   assumes f: "f \<in> hom G H" and g: "g \<in> hom H K" and eq: "(g \<circ> f) ` (carrier G) = carrier K"
       
  1402      and "group G" "group H" "group K"
       
  1403    shows "set_mult H (kernel H K g) (f ` carrier G) = carrier H" (is "?lhs = ?rhs")
       
  1404 proof
       
  1405   show "?lhs \<subseteq> ?rhs"
       
  1406     apply (auto simp: kernel_def set_mult_def)
       
  1407     by (meson Group.group_def \<open>group H\<close> f hom_carrier image_eqI monoid.m_closed subset_iff)
       
  1408   have "\<exists>w\<in>carrier H. \<exists>x \<in> carrier G. g w = \<one>\<^bsub>K\<^esub> \<and> y = w \<otimes>\<^bsub>H\<^esub> f x"
       
  1409     if y: "y \<in> carrier H" for y
       
  1410   proof -
       
  1411     have "g y \<in> carrier K"
       
  1412       using g hom_carrier that by blast
       
  1413     with assms obtain x where x: "x \<in> carrier G" "(g \<circ> f) x = g y"
       
  1414       by (metis image_iff)
       
  1415     with assms have carr: "(y \<otimes>\<^bsub>H\<^esub> inv\<^bsub>H\<^esub> f x) \<in> carrier H"
       
  1416       by (metis group.subgroup_self hom_carrier image_subset_iff subgroup_def y)
       
  1417     moreover
       
  1418     have "g (y \<otimes>\<^bsub>H\<^esub> inv\<^bsub>H\<^esub> f x) = \<one>\<^bsub>K\<^esub>"
       
  1419     proof -
       
  1420       have "inv\<^bsub>H\<^esub> f x \<in> carrier H"
       
  1421         by (meson \<open>group H\<close> f group.inv_closed hom_carrier image_subset_iff x(1))
       
  1422       then have "g (y \<otimes>\<^bsub>H\<^esub> inv\<^bsub>H\<^esub> f x) = g y \<otimes>\<^bsub>K\<^esub> g (inv\<^bsub>H\<^esub> f x)"
       
  1423         by (simp add: hom_mult [OF g] y)
       
  1424       also have "\<dots> = g y \<otimes>\<^bsub>K\<^esub> inv\<^bsub>K\<^esub> (g (f x))"
       
  1425         using assms x(1)
       
  1426         by (metis (mono_tags, lifting) group_hom.hom_inv group_hom.intro group_hom_axioms.intro hom_carrier image_subset_iff)
       
  1427       also have "\<dots> = \<one>\<^bsub>K\<^esub>"
       
  1428         using \<open>g y \<in> carrier K\<close> assms(6) group.l_inv x(2)
       
  1429         by (simp add: group.r_inv)
       
  1430       finally show ?thesis .
       
  1431     qed
       
  1432     moreover
       
  1433     have "y = (y \<otimes>\<^bsub>H\<^esub> inv\<^bsub>H\<^esub> f x) \<otimes>\<^bsub>H\<^esub> f x"
       
  1434       using x y by (meson \<open>group H\<close> carr f group.inv_solve_right hom_carrier image_subset_iff)
       
  1435     ultimately
       
  1436     show ?thesis
       
  1437       using x y by force
       
  1438   qed
       
  1439   then show "?rhs \<subseteq> ?lhs"
       
  1440     by (force simp: kernel_def set_mult_def)
       
  1441 qed
       
  1442 
       
  1443 lemma group_semidirect_sum_ker_image:
       
  1444   assumes "(g \<circ> f) \<in> iso G K" "f \<in> hom G H" "g \<in> hom H K" "group G" "group H" "group K"
       
  1445   shows "(kernel H K g) \<inter> (f ` carrier G) = {\<one>\<^bsub>H\<^esub>}"
       
  1446         "kernel H K g <#>\<^bsub>H\<^esub> (f ` carrier G) = carrier H"
       
  1447   using assms
       
  1448   by (simp_all add: iso_iff_mon_epi group_Int_image_ker group_sum_ker_image epi_def mon_def Int_commute [of "kernel H K g"])
       
  1449 
       
  1450 lemma group_semidirect_sum_image_ker:
       
  1451   assumes f: "f \<in> hom G H" and g: "g \<in> hom H K" and iso: "(g \<circ> f) \<in> iso G K"
       
  1452      and "group G" "group H" "group K"
       
  1453    shows "(f ` carrier G) \<inter> (kernel H K g) = {\<one>\<^bsub>H\<^esub>}"
       
  1454           "f ` carrier G <#>\<^bsub>H\<^esub> (kernel H K g) = carrier H"
       
  1455   using group_Int_image_ker [OF f g] group_sum_image_ker [OF f g] assms
       
  1456   by (simp_all add: iso_def bij_betw_def)
       
  1457 
       
  1458 
       
  1459 
       
  1460 subsection \<open>Factor Groups and Direct product\<close>
  1310 
  1461 
  1311 lemma (in group) DirProd_normal : \<^marker>\<open>contributor \<open>Martin Baillon\<close>\<close>
  1462 lemma (in group) DirProd_normal : \<^marker>\<open>contributor \<open>Martin Baillon\<close>\<close>
  1312   assumes "group K"
  1463   assumes "group K"
  1313     and "H \<lhd> G"
  1464     and "H \<lhd> G"
  1314     and "N \<lhd> K"
  1465     and "N \<lhd> K"