| author | huffman | 
| Wed, 06 Jun 2007 18:32:05 +0200 | |
| changeset 23278 | 375335bf619f | 
| parent 21404 | eb85850d3eb7 | 
| child 23350 | 50c5b0912a0c | 
| permissions | -rw-r--r-- | 
| 14706 | 1 | (* Title: HOL/Algebra/Coset.thy | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 2 | ID: $Id$ | 
| 20318 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 3 | Author: Florian Kammueller, with new proofs by L C Paulson, and | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 4 | Stephan Hohe | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 5 | *) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 6 | |
| 20318 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 7 | theory Coset imports Group Exponent begin | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 8 | |
| 20318 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 9 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 10 | section {*Cosets and Quotient Groups*}
 | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 11 | |
| 14651 | 12 | constdefs (structure G) | 
| 14963 | 13 | r_coset :: "[_, 'a set, 'a] \<Rightarrow> 'a set" (infixl "#>\<index>" 60) | 
| 14 |   "H #> a \<equiv> \<Union>h\<in>H. {h \<otimes> a}"
 | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 15 | |
| 14963 | 16 | l_coset :: "[_, 'a, 'a set] \<Rightarrow> 'a set" (infixl "<#\<index>" 60) | 
| 17 |   "a <# H \<equiv> \<Union>h\<in>H. {a \<otimes> h}"
 | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 18 | |
| 14963 | 19 |   RCOSETS  :: "[_, 'a set] \<Rightarrow> ('a set)set"   ("rcosets\<index> _" [81] 80)
 | 
| 20 |   "rcosets H \<equiv> \<Union>a\<in>carrier G. {H #> a}"
 | |
| 21 | ||
| 22 | set_mult :: "[_, 'a set ,'a set] \<Rightarrow> 'a set" (infixl "<#>\<index>" 60) | |
| 23 |   "H <#> K \<equiv> \<Union>h\<in>H. \<Union>k\<in>K. {h \<otimes> k}"
 | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 24 | |
| 14963 | 25 |   SET_INV :: "[_,'a set] \<Rightarrow> 'a set"  ("set'_inv\<index> _" [81] 80)
 | 
| 26 |   "set_inv H \<equiv> \<Union>h\<in>H. {inv h}"
 | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 27 | |
| 14963 | 28 | |
| 29 | locale normal = subgroup + group + | |
| 30 | assumes coset_eq: "(\<forall>x \<in> carrier G. H #> x = x <# H)" | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 31 | |
| 19380 | 32 | abbreviation | 
| 21404 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 wenzelm parents: 
20318diff
changeset | 33 |   normal_rel :: "['a set, ('a, 'b) monoid_scheme] \<Rightarrow> bool"  (infixl "\<lhd>" 60) where
 | 
| 19380 | 34 | "H \<lhd> G \<equiv> normal H G" | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 35 | |
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 36 | |
| 14803 | 37 | subsection {*Basic Properties of Cosets*}
 | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 38 | |
| 14747 | 39 | lemma (in group) coset_mult_assoc: | 
| 40 | "[| M \<subseteq> carrier G; g \<in> carrier G; h \<in> carrier G |] | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 41 | ==> (M #> g) #> h = M #> (g \<otimes> h)" | 
| 14747 | 42 | by (force simp add: r_coset_def m_assoc) | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 43 | |
| 14747 | 44 | lemma (in group) coset_mult_one [simp]: "M \<subseteq> carrier G ==> M #> \<one> = M" | 
| 45 | by (force simp add: r_coset_def) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 46 | |
| 14747 | 47 | lemma (in group) coset_mult_inv1: | 
| 14666 | 48 | "[| M #> (x \<otimes> (inv y)) = M; x \<in> carrier G ; y \<in> carrier G; | 
| 14747 | 49 | M \<subseteq> carrier G |] ==> M #> x = M #> y" | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 50 | apply (erule subst [of concl: "%z. M #> x = z #> y"]) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 51 | apply (simp add: coset_mult_assoc m_assoc) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 52 | done | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 53 | |
| 14747 | 54 | lemma (in group) coset_mult_inv2: | 
| 55 | "[| M #> x = M #> y; x \<in> carrier G; y \<in> carrier G; M \<subseteq> carrier G |] | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 56 | ==> M #> (x \<otimes> (inv y)) = M " | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 57 | apply (simp add: coset_mult_assoc [symmetric]) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 58 | apply (simp add: coset_mult_assoc) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 59 | done | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 60 | |
| 14747 | 61 | lemma (in group) coset_join1: | 
| 62 | "[| H #> x = H; x \<in> carrier G; subgroup H G |] ==> x \<in> H" | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 63 | apply (erule subst) | 
| 14963 | 64 | apply (simp add: r_coset_def) | 
| 65 | apply (blast intro: l_one subgroup.one_closed sym) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 66 | done | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 67 | |
| 14747 | 68 | lemma (in group) solve_equation: | 
| 14963 | 69 | "\<lbrakk>subgroup H G; x \<in> H; y \<in> H\<rbrakk> \<Longrightarrow> \<exists>h\<in>H. y = h \<otimes> x" | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 70 | apply (rule bexI [of _ "y \<otimes> (inv x)"]) | 
| 14666 | 71 | apply (auto simp add: subgroup.m_closed subgroup.m_inv_closed m_assoc | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 72 | subgroup.subset [THEN subsetD]) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 73 | done | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 74 | |
| 14963 | 75 | lemma (in group) repr_independence: | 
| 76 | "\<lbrakk>y \<in> H #> x; x \<in> carrier G; subgroup H G\<rbrakk> \<Longrightarrow> H #> x = H #> y" | |
| 77 | by (auto simp add: r_coset_def m_assoc [symmetric] | |
| 78 | subgroup.subset [THEN subsetD] | |
| 79 | subgroup.m_closed solve_equation) | |
| 80 | ||
| 14747 | 81 | lemma (in group) coset_join2: | 
| 14963 | 82 | "\<lbrakk>x \<in> carrier G; subgroup H G; x\<in>H\<rbrakk> \<Longrightarrow> H #> x = H" | 
| 83 |   --{*Alternative proof is to put @{term "x=\<one>"} in @{text repr_independence}.*}
 | |
| 84 | by (force simp add: subgroup.m_closed r_coset_def solve_equation) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 85 | |
| 20318 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 86 | lemma (in monoid) r_coset_subset_G: | 
| 14747 | 87 | "[| H \<subseteq> carrier G; x \<in> carrier G |] ==> H #> x \<subseteq> carrier G" | 
| 88 | by (auto simp add: r_coset_def) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 89 | |
| 14747 | 90 | lemma (in group) rcosI: | 
| 91 | "[| h \<in> H; H \<subseteq> carrier G; x \<in> carrier G|] ==> h \<otimes> x \<in> H #> x" | |
| 92 | by (auto simp add: r_coset_def) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 93 | |
| 14963 | 94 | lemma (in group) rcosetsI: | 
| 95 | "\<lbrakk>H \<subseteq> carrier G; x \<in> carrier G\<rbrakk> \<Longrightarrow> H #> x \<in> rcosets H" | |
| 96 | by (auto simp add: RCOSETS_def) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 97 | |
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 98 | text{*Really needed?*}
 | 
| 14747 | 99 | lemma (in group) transpose_inv: | 
| 14666 | 100 | "[| x \<otimes> y = z; x \<in> carrier G; y \<in> carrier G; z \<in> carrier G |] | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 101 | ==> (inv x) \<otimes> z = y" | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 102 | by (force simp add: m_assoc [symmetric]) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 103 | |
| 14747 | 104 | lemma (in group) rcos_self: "[| x \<in> carrier G; subgroup H G |] ==> x \<in> H #> x" | 
| 14963 | 105 | apply (simp add: r_coset_def) | 
| 106 | apply (blast intro: sym l_one subgroup.subset [THEN subsetD] | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 107 | subgroup.one_closed) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 108 | done | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 109 | |
| 20318 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 110 | text {* Opposite of @{thm [locale=group,source] "repr_independence"} *}
 | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 111 | lemma (in group) repr_independenceD: | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 112 | includes subgroup H G | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 113 | assumes ycarr: "y \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 114 | and repr: "H #> x = H #> y" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 115 | shows "y \<in> H #> x" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 116 | by (subst repr, intro rcos_self) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 117 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 118 | text {* Elements of a right coset are in the carrier *}
 | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 119 | lemma (in subgroup) elemrcos_carrier: | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 120 | includes group | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 121 | assumes acarr: "a \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 122 | and a': "a' \<in> H #> a" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 123 | shows "a' \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 124 | proof - | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 125 | from subset and acarr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 126 | have "H #> a \<subseteq> carrier G" by (rule r_coset_subset_G) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 127 | from this and a' | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 128 | show "a' \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 129 | by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 130 | qed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 131 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 132 | lemma (in subgroup) rcos_const: | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 133 | includes group | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 134 | assumes hH: "h \<in> H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 135 | shows "H #> h = H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 136 | apply (unfold r_coset_def) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 137 | apply rule apply rule | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 138 | apply clarsimp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 139 | apply (intro subgroup.m_closed) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 140 | apply assumption+ | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 141 | apply rule | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 142 | apply simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 143 | proof - | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 144 | fix h' | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 145 | assume h'H: "h' \<in> H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 146 | note carr = hH[THEN mem_carrier] h'H[THEN mem_carrier] | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 147 | from carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 148 | have a: "h' = (h' \<otimes> inv h) \<otimes> h" by (simp add: m_assoc) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 149 | from h'H hH | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 150 | have "h' \<otimes> inv h \<in> H" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 151 | from this and a | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 152 | show "\<exists>x\<in>H. h' = x \<otimes> h" by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 153 | qed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 154 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 155 | text {* Step one for lemma @{text "rcos_module"} *}
 | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 156 | lemma (in subgroup) rcos_module_imp: | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 157 | includes group | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 158 | assumes xcarr: "x \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 159 | and x'cos: "x' \<in> H #> x" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 160 | shows "(x' \<otimes> inv x) \<in> H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 161 | proof - | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 162 | from xcarr x'cos | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 163 | have x'carr: "x' \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 164 | by (rule elemrcos_carrier[OF is_group]) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 165 | from xcarr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 166 | have ixcarr: "inv x \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 167 | by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 168 | from x'cos | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 169 | have "\<exists>h\<in>H. x' = h \<otimes> x" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 170 | unfolding r_coset_def | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 171 | by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 172 | from this | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 173 | obtain h | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 174 | where hH: "h \<in> H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 175 | and x': "x' = h \<otimes> x" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 176 | by auto | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 177 | from hH and subset | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 178 | have hcarr: "h \<in> carrier G" by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 179 | note carr = xcarr x'carr hcarr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 180 | from x' and carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 181 | have "x' \<otimes> (inv x) = (h \<otimes> x) \<otimes> (inv x)" by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 182 | also from carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 183 | have "\<dots> = h \<otimes> (x \<otimes> inv x)" by (simp add: m_assoc) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 184 | also from carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 185 | have "\<dots> = h \<otimes> \<one>" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 186 | also from carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 187 | have "\<dots> = h" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 188 | finally | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 189 | have "x' \<otimes> (inv x) = h" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 190 | from hH this | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 191 | show "x' \<otimes> (inv x) \<in> H" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 192 | qed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 193 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 194 | text {* Step two for lemma @{text "rcos_module"} *}
 | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 195 | lemma (in subgroup) rcos_module_rev: | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 196 | includes group | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 197 | assumes carr: "x \<in> carrier G" "x' \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 198 | and xixH: "(x' \<otimes> inv x) \<in> H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 199 | shows "x' \<in> H #> x" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 200 | proof - | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 201 | from xixH | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 202 | have "\<exists>h\<in>H. x' \<otimes> (inv x) = h" by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 203 | from this | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 204 | obtain h | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 205 | where hH: "h \<in> H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 206 | and hsym: "x' \<otimes> (inv x) = h" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 207 | by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 208 | from hH subset have hcarr: "h \<in> carrier G" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 209 | note carr = carr hcarr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 210 | from hsym[symmetric] have "h \<otimes> x = x' \<otimes> (inv x) \<otimes> x" by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 211 | also from carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 212 | have "\<dots> = x' \<otimes> ((inv x) \<otimes> x)" by (simp add: m_assoc) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 213 | also from carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 214 | have "\<dots> = x' \<otimes> \<one>" by (simp add: l_inv) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 215 | also from carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 216 | have "\<dots> = x'" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 217 | finally | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 218 | have "h \<otimes> x = x'" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 219 | from this[symmetric] and hH | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 220 | show "x' \<in> H #> x" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 221 | unfolding r_coset_def | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 222 | by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 223 | qed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 224 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 225 | text {* Module property of right cosets *}
 | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 226 | lemma (in subgroup) rcos_module: | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 227 | includes group | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 228 | assumes carr: "x \<in> carrier G" "x' \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 229 | shows "(x' \<in> H #> x) = (x' \<otimes> inv x \<in> H)" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 230 | proof | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 231 | assume "x' \<in> H #> x" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 232 | from this and carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 233 | show "x' \<otimes> inv x \<in> H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 234 | by (intro rcos_module_imp[OF is_group]) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 235 | next | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 236 | assume "x' \<otimes> inv x \<in> H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 237 | from this and carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 238 | show "x' \<in> H #> x" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 239 | by (intro rcos_module_rev[OF is_group]) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 240 | qed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 241 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 242 | text {* Right cosets are subsets of the carrier. *} 
 | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 243 | lemma (in subgroup) rcosets_carrier: | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 244 | includes group | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 245 | assumes XH: "X \<in> rcosets H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 246 | shows "X \<subseteq> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 247 | proof - | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 248 | from XH have "\<exists>x\<in> carrier G. X = H #> x" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 249 | unfolding RCOSETS_def | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 250 | by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 251 | from this | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 252 | obtain x | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 253 | where xcarr: "x\<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 254 | and X: "X = H #> x" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 255 | by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 256 | from subset and xcarr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 257 | show "X \<subseteq> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 258 | unfolding X | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 259 | by (rule r_coset_subset_G) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 260 | qed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 261 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 262 | text {* Multiplication of general subsets *}
 | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 263 | lemma (in monoid) set_mult_closed: | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 264 | assumes Acarr: "A \<subseteq> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 265 | and Bcarr: "B \<subseteq> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 266 | shows "A <#> B \<subseteq> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 267 | apply rule apply (simp add: set_mult_def, clarsimp) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 268 | proof - | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 269 | fix a b | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 270 | assume "a \<in> A" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 271 | from this and Acarr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 272 | have acarr: "a \<in> carrier G" by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 273 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 274 | assume "b \<in> B" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 275 | from this and Bcarr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 276 | have bcarr: "b \<in> carrier G" by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 277 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 278 | from acarr bcarr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 279 | show "a \<otimes> b \<in> carrier G" by (rule m_closed) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 280 | qed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 281 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 282 | lemma (in comm_group) mult_subgroups: | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 283 | assumes subH: "subgroup H G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 284 | and subK: "subgroup K G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 285 | shows "subgroup (H <#> K) G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 286 | apply (rule subgroup.intro) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 287 | apply (intro set_mult_closed subgroup.subset[OF subH] subgroup.subset[OF subK]) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 288 | apply (simp add: set_mult_def) apply clarsimp defer 1 | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 289 | apply (simp add: set_mult_def) defer 1 | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 290 | apply (simp add: set_mult_def, clarsimp) defer 1 | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 291 | proof - | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 292 | fix ha hb ka kb | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 293 | assume haH: "ha \<in> H" and hbH: "hb \<in> H" and kaK: "ka \<in> K" and kbK: "kb \<in> K" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 294 | note carr = haH[THEN subgroup.mem_carrier[OF subH]] hbH[THEN subgroup.mem_carrier[OF subH]] | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 295 | kaK[THEN subgroup.mem_carrier[OF subK]] kbK[THEN subgroup.mem_carrier[OF subK]] | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 296 | from carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 297 | have "(ha \<otimes> ka) \<otimes> (hb \<otimes> kb) = ha \<otimes> (ka \<otimes> hb) \<otimes> kb" by (simp add: m_assoc) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 298 | also from carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 299 | have "\<dots> = ha \<otimes> (hb \<otimes> ka) \<otimes> kb" by (simp add: m_comm) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 300 | also from carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 301 | have "\<dots> = (ha \<otimes> hb) \<otimes> (ka \<otimes> kb)" by (simp add: m_assoc) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 302 | finally | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 303 | have eq: "(ha \<otimes> ka) \<otimes> (hb \<otimes> kb) = (ha \<otimes> hb) \<otimes> (ka \<otimes> kb)" . | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 304 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 305 | from haH hbH have hH: "ha \<otimes> hb \<in> H" by (simp add: subgroup.m_closed[OF subH]) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 306 | from kaK kbK have kK: "ka \<otimes> kb \<in> K" by (simp add: subgroup.m_closed[OF subK]) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 307 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 308 | from hH and kK and eq | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 309 | show "\<exists>h'\<in>H. \<exists>k'\<in>K. (ha \<otimes> ka) \<otimes> (hb \<otimes> kb) = h' \<otimes> k'" by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 310 | next | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 311 | have "\<one> = \<one> \<otimes> \<one>" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 312 | from subgroup.one_closed[OF subH] subgroup.one_closed[OF subK] this | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 313 | show "\<exists>h\<in>H. \<exists>k\<in>K. \<one> = h \<otimes> k" by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 314 | next | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 315 | fix h k | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 316 | assume hH: "h \<in> H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 317 | and kK: "k \<in> K" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 318 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 319 | from hH[THEN subgroup.mem_carrier[OF subH]] kK[THEN subgroup.mem_carrier[OF subK]] | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 320 | have "inv (h \<otimes> k) = inv h \<otimes> inv k" by (simp add: inv_mult_group m_comm) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 321 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 322 | from subgroup.m_inv_closed[OF subH hH] and subgroup.m_inv_closed[OF subK kK] and this | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 323 | show "\<exists>ha\<in>H. \<exists>ka\<in>K. inv (h \<otimes> k) = ha \<otimes> ka" by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 324 | qed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 325 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 326 | lemma (in subgroup) lcos_module_rev: | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 327 | includes group | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 328 | assumes carr: "x \<in> carrier G" "x' \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 329 | and xixH: "(inv x \<otimes> x') \<in> H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 330 | shows "x' \<in> x <# H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 331 | proof - | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 332 | from xixH | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 333 | have "\<exists>h\<in>H. (inv x) \<otimes> x' = h" by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 334 | from this | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 335 | obtain h | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 336 | where hH: "h \<in> H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 337 | and hsym: "(inv x) \<otimes> x' = h" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 338 | by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 339 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 340 | from hH subset have hcarr: "h \<in> carrier G" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 341 | note carr = carr hcarr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 342 | from hsym[symmetric] have "x \<otimes> h = x \<otimes> ((inv x) \<otimes> x')" by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 343 | also from carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 344 | have "\<dots> = (x \<otimes> (inv x)) \<otimes> x'" by (simp add: m_assoc[symmetric]) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 345 | also from carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 346 | have "\<dots> = \<one> \<otimes> x'" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 347 | also from carr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 348 | have "\<dots> = x'" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 349 | finally | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 350 | have "x \<otimes> h = x'" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 351 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 352 | from this[symmetric] and hH | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 353 | show "x' \<in> x <# H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 354 | unfolding l_coset_def | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 355 | by fast | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 356 | qed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 357 | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 358 | |
| 14666 | 359 | subsection {* Normal subgroups *}
 | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 360 | |
| 14963 | 361 | lemma normal_imp_subgroup: "H \<lhd> G \<Longrightarrow> subgroup H G" | 
| 362 | by (simp add: normal_def subgroup_def) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 363 | |
| 14963 | 364 | lemma (in group) normalI: | 
| 365 | "subgroup H G \<Longrightarrow> (\<forall>x \<in> carrier G. H #> x = x <# H) \<Longrightarrow> H \<lhd> G"; | |
| 366 | by (simp add: normal_def normal_axioms_def prems) | |
| 367 | ||
| 368 | lemma (in normal) inv_op_closed1: | |
| 369 | "\<lbrakk>x \<in> carrier G; h \<in> H\<rbrakk> \<Longrightarrow> (inv x) \<otimes> h \<otimes> x \<in> H" | |
| 370 | apply (insert coset_eq) | |
| 371 | apply (auto simp add: l_coset_def r_coset_def) | |
| 14666 | 372 | apply (drule bspec, assumption) | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 373 | apply (drule equalityD1 [THEN subsetD], blast, clarify) | 
| 14963 | 374 | apply (simp add: m_assoc) | 
| 375 | apply (simp add: m_assoc [symmetric]) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 376 | done | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 377 | |
| 14963 | 378 | lemma (in normal) inv_op_closed2: | 
| 379 | "\<lbrakk>x \<in> carrier G; h \<in> H\<rbrakk> \<Longrightarrow> x \<otimes> h \<otimes> (inv x) \<in> H" | |
| 380 | apply (subgoal_tac "inv (inv x) \<otimes> h \<otimes> (inv x) \<in> H") | |
| 381 | apply (simp add: ); | |
| 382 | apply (blast intro: inv_op_closed1) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 383 | done | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 384 | |
| 14747 | 385 | text{*Alternative characterization of normal subgroups*}
 | 
| 386 | lemma (in group) normal_inv_iff: | |
| 387 | "(N \<lhd> G) = | |
| 388 | (subgroup N G & (\<forall>x \<in> carrier G. \<forall>h \<in> N. x \<otimes> h \<otimes> (inv x) \<in> N))" | |
| 389 | (is "_ = ?rhs") | |
| 390 | proof | |
| 391 | assume N: "N \<lhd> G" | |
| 392 | show ?rhs | |
| 14963 | 393 | by (blast intro: N normal.inv_op_closed2 normal_imp_subgroup) | 
| 14747 | 394 | next | 
| 395 | assume ?rhs | |
| 396 | hence sg: "subgroup N G" | |
| 14963 | 397 | and closed: "\<And>x. x\<in>carrier G \<Longrightarrow> \<forall>h\<in>N. x \<otimes> h \<otimes> inv x \<in> N" by auto | 
| 14747 | 398 | hence sb: "N \<subseteq> carrier G" by (simp add: subgroup.subset) | 
| 399 | show "N \<lhd> G" | |
| 14963 | 400 | proof (intro normalI [OF sg], simp add: l_coset_def r_coset_def, clarify) | 
| 14747 | 401 | fix x | 
| 402 | assume x: "x \<in> carrier G" | |
| 15120 | 403 |     show "(\<Union>h\<in>N. {h \<otimes> x}) = (\<Union>h\<in>N. {x \<otimes> h})"
 | 
| 14747 | 404 | proof | 
| 15120 | 405 |       show "(\<Union>h\<in>N. {h \<otimes> x}) \<subseteq> (\<Union>h\<in>N. {x \<otimes> h})"
 | 
| 14747 | 406 | proof clarify | 
| 407 | fix n | |
| 408 | assume n: "n \<in> N" | |
| 15120 | 409 |         show "n \<otimes> x \<in> (\<Union>h\<in>N. {x \<otimes> h})"
 | 
| 14747 | 410 | proof | 
| 14963 | 411 | from closed [of "inv x"] | 
| 412 | show "inv x \<otimes> n \<otimes> x \<in> N" by (simp add: x n) | |
| 413 |           show "n \<otimes> x \<in> {x \<otimes> (inv x \<otimes> n \<otimes> x)}"
 | |
| 14747 | 414 | by (simp add: x n m_assoc [symmetric] sb [THEN subsetD]) | 
| 415 | qed | |
| 416 | qed | |
| 417 | next | |
| 15120 | 418 |       show "(\<Union>h\<in>N. {x \<otimes> h}) \<subseteq> (\<Union>h\<in>N. {h \<otimes> x})"
 | 
| 14747 | 419 | proof clarify | 
| 420 | fix n | |
| 421 | assume n: "n \<in> N" | |
| 15120 | 422 |         show "x \<otimes> n \<in> (\<Union>h\<in>N. {h \<otimes> x})"
 | 
| 14747 | 423 | proof | 
| 14963 | 424 | show "x \<otimes> n \<otimes> inv x \<in> N" by (simp add: x n closed) | 
| 425 |           show "x \<otimes> n \<in> {x \<otimes> n \<otimes> inv x \<otimes> x}"
 | |
| 14747 | 426 | by (simp add: x n m_assoc sb [THEN subsetD]) | 
| 427 | qed | |
| 428 | qed | |
| 429 | qed | |
| 430 | qed | |
| 431 | qed | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 432 | |
| 14963 | 433 | |
| 14803 | 434 | subsection{*More Properties of Cosets*}
 | 
| 435 | ||
| 14747 | 436 | lemma (in group) lcos_m_assoc: | 
| 437 | "[| M \<subseteq> carrier G; g \<in> carrier G; h \<in> carrier G |] | |
| 438 | ==> g <# (h <# M) = (g \<otimes> h) <# M" | |
| 439 | by (force simp add: l_coset_def m_assoc) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 440 | |
| 14747 | 441 | lemma (in group) lcos_mult_one: "M \<subseteq> carrier G ==> \<one> <# M = M" | 
| 442 | by (force simp add: l_coset_def) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 443 | |
| 14747 | 444 | lemma (in group) l_coset_subset_G: | 
| 445 | "[| H \<subseteq> carrier G; x \<in> carrier G |] ==> x <# H \<subseteq> carrier G" | |
| 446 | by (auto simp add: l_coset_def subsetD) | |
| 447 | ||
| 448 | lemma (in group) l_coset_swap: | |
| 14963 | 449 | "\<lbrakk>y \<in> x <# H; x \<in> carrier G; subgroup H G\<rbrakk> \<Longrightarrow> x \<in> y <# H" | 
| 450 | proof (simp add: l_coset_def) | |
| 451 | assume "\<exists>h\<in>H. y = x \<otimes> h" | |
| 14666 | 452 | and x: "x \<in> carrier G" | 
| 14530 | 453 | and sb: "subgroup H G" | 
| 454 | then obtain h' where h': "h' \<in> H & x \<otimes> h' = y" by blast | |
| 14963 | 455 | show "\<exists>h\<in>H. x = y \<otimes> h" | 
| 14530 | 456 | proof | 
| 14963 | 457 | show "x = y \<otimes> inv h'" using h' x sb | 
| 14530 | 458 | by (auto simp add: m_assoc subgroup.subset [THEN subsetD]) | 
| 459 | show "inv h' \<in> H" using h' sb | |
| 460 | by (auto simp add: subgroup.subset [THEN subsetD] subgroup.m_inv_closed) | |
| 461 | qed | |
| 462 | qed | |
| 463 | ||
| 14747 | 464 | lemma (in group) l_coset_carrier: | 
| 14530 | 465 | "[| y \<in> x <# H; x \<in> carrier G; subgroup H G |] ==> y \<in> carrier G" | 
| 14747 | 466 | by (auto simp add: l_coset_def m_assoc | 
| 14530 | 467 | subgroup.subset [THEN subsetD] subgroup.m_closed) | 
| 468 | ||
| 14747 | 469 | lemma (in group) l_repr_imp_subset: | 
| 14666 | 470 | assumes y: "y \<in> x <# H" and x: "x \<in> carrier G" and sb: "subgroup H G" | 
| 14530 | 471 | shows "y <# H \<subseteq> x <# H" | 
| 472 | proof - | |
| 473 | from y | |
| 14747 | 474 | obtain h' where "h' \<in> H" "x \<otimes> h' = y" by (auto simp add: l_coset_def) | 
| 14530 | 475 | thus ?thesis using x sb | 
| 14747 | 476 | by (auto simp add: l_coset_def m_assoc | 
| 14530 | 477 | subgroup.subset [THEN subsetD] subgroup.m_closed) | 
| 478 | qed | |
| 479 | ||
| 14747 | 480 | lemma (in group) l_repr_independence: | 
| 14666 | 481 | assumes y: "y \<in> x <# H" and x: "x \<in> carrier G" and sb: "subgroup H G" | 
| 14530 | 482 | shows "x <# H = y <# H" | 
| 14666 | 483 | proof | 
| 14530 | 484 | show "x <# H \<subseteq> y <# H" | 
| 14666 | 485 | by (rule l_repr_imp_subset, | 
| 14530 | 486 | (blast intro: l_coset_swap l_coset_carrier y x sb)+) | 
| 14666 | 487 | show "y <# H \<subseteq> x <# H" by (rule l_repr_imp_subset [OF y x sb]) | 
| 14530 | 488 | qed | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 489 | |
| 14747 | 490 | lemma (in group) setmult_subset_G: | 
| 14963 | 491 | "\<lbrakk>H \<subseteq> carrier G; K \<subseteq> carrier G\<rbrakk> \<Longrightarrow> H <#> K \<subseteq> carrier G" | 
| 492 | by (auto simp add: set_mult_def subsetD) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 493 | |
| 14963 | 494 | lemma (in group) subgroup_mult_id: "subgroup H G \<Longrightarrow> H <#> H = H" | 
| 495 | apply (auto simp add: subgroup.m_closed set_mult_def Sigma_def image_def) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 496 | apply (rule_tac x = x in bexI) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 497 | apply (rule bexI [of _ "\<one>"]) | 
| 14666 | 498 | apply (auto simp add: subgroup.m_closed subgroup.one_closed | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 499 | r_one subgroup.subset [THEN subsetD]) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 500 | done | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 501 | |
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 502 | |
| 20318 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 503 | subsubsection {* Set of Inverses of an @{text r_coset}. *}
 | 
| 14666 | 504 | |
| 14963 | 505 | lemma (in normal) rcos_inv: | 
| 506 | assumes x: "x \<in> carrier G" | |
| 507 | shows "set_inv (H #> x) = H #> (inv x)" | |
| 508 | proof (simp add: r_coset_def SET_INV_def x inv_mult_group, safe) | |
| 509 | fix h | |
| 510 | assume "h \<in> H" | |
| 15120 | 511 |   show "inv x \<otimes> inv h \<in> (\<Union>j\<in>H. {j \<otimes> inv x})"
 | 
| 14963 | 512 | proof | 
| 513 | show "inv x \<otimes> inv h \<otimes> x \<in> H" | |
| 514 | by (simp add: inv_op_closed1 prems) | |
| 515 |     show "inv x \<otimes> inv h \<in> {inv x \<otimes> inv h \<otimes> x \<otimes> inv x}"
 | |
| 516 | by (simp add: prems m_assoc) | |
| 517 | qed | |
| 518 | next | |
| 519 | fix h | |
| 520 | assume "h \<in> H" | |
| 15120 | 521 |   show "h \<otimes> inv x \<in> (\<Union>j\<in>H. {inv x \<otimes> inv j})"
 | 
| 14963 | 522 | proof | 
| 523 | show "x \<otimes> inv h \<otimes> inv x \<in> H" | |
| 524 | by (simp add: inv_op_closed2 prems) | |
| 525 |     show "h \<otimes> inv x \<in> {inv x \<otimes> inv (x \<otimes> inv h \<otimes> inv x)}"
 | |
| 526 | by (simp add: prems m_assoc [symmetric] inv_mult_group) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 527 | qed | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 528 | qed | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 529 | |
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 530 | |
| 14803 | 531 | subsubsection {*Theorems for @{text "<#>"} with @{text "#>"} or @{text "<#"}.*}
 | 
| 14666 | 532 | |
| 14747 | 533 | lemma (in group) setmult_rcos_assoc: | 
| 14963 | 534 | "\<lbrakk>H \<subseteq> carrier G; K \<subseteq> carrier G; x \<in> carrier G\<rbrakk> | 
| 535 | \<Longrightarrow> H <#> (K #> x) = (H <#> K) #> x" | |
| 536 | by (force simp add: r_coset_def set_mult_def m_assoc) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 537 | |
| 14747 | 538 | lemma (in group) rcos_assoc_lcos: | 
| 14963 | 539 | "\<lbrakk>H \<subseteq> carrier G; K \<subseteq> carrier G; x \<in> carrier G\<rbrakk> | 
| 540 | \<Longrightarrow> (H #> x) <#> K = H <#> (x <# K)" | |
| 541 | by (force simp add: r_coset_def l_coset_def set_mult_def m_assoc) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 542 | |
| 14963 | 543 | lemma (in normal) rcos_mult_step1: | 
| 544 | "\<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> | |
| 545 | \<Longrightarrow> (H #> x) <#> (H #> y) = (H <#> (x <# H)) #> y" | |
| 546 | by (simp add: setmult_rcos_assoc subset | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 547 | r_coset_subset_G l_coset_subset_G rcos_assoc_lcos) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 548 | |
| 14963 | 549 | lemma (in normal) rcos_mult_step2: | 
| 550 | "\<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> | |
| 551 | \<Longrightarrow> (H <#> (x <# H)) #> y = (H <#> (H #> x)) #> y" | |
| 552 | by (insert coset_eq, simp add: normal_def) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 553 | |
| 14963 | 554 | lemma (in normal) rcos_mult_step3: | 
| 555 | "\<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> | |
| 556 | \<Longrightarrow> (H <#> (H #> x)) #> y = H #> (x \<otimes> y)" | |
| 557 | by (simp add: setmult_rcos_assoc coset_mult_assoc | |
| 19931 
fb32b43e7f80
Restructured locales with predicates: import is now an interpretation.
 ballarin parents: 
19380diff
changeset | 558 | subgroup_mult_id normal.axioms subset prems) | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 559 | |
| 14963 | 560 | lemma (in normal) rcos_sum: | 
| 561 | "\<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> | |
| 562 | \<Longrightarrow> (H #> x) <#> (H #> y) = H #> (x \<otimes> y)" | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 563 | by (simp add: rcos_mult_step1 rcos_mult_step2 rcos_mult_step3) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 564 | |
| 14963 | 565 | lemma (in normal) rcosets_mult_eq: "M \<in> rcosets H \<Longrightarrow> H <#> M = M" | 
| 14666 | 566 |   -- {* generalizes @{text subgroup_mult_id} *}
 | 
| 14963 | 567 | by (auto simp add: RCOSETS_def subset | 
| 19931 
fb32b43e7f80
Restructured locales with predicates: import is now an interpretation.
 ballarin parents: 
19380diff
changeset | 568 | setmult_rcos_assoc subgroup_mult_id normal.axioms prems) | 
| 14963 | 569 | |
| 570 | ||
| 571 | subsubsection{*An Equivalence Relation*}
 | |
| 572 | ||
| 573 | constdefs (structure G) | |
| 574 |   r_congruent :: "[('a,'b)monoid_scheme, 'a set] \<Rightarrow> ('a*'a)set"
 | |
| 575 |                   ("rcong\<index> _")
 | |
| 576 |    "rcong H \<equiv> {(x,y). x \<in> carrier G & y \<in> carrier G & inv x \<otimes> y \<in> H}"
 | |
| 577 | ||
| 578 | ||
| 579 | lemma (in subgroup) equiv_rcong: | |
| 580 | includes group G | |
| 581 | shows "equiv (carrier G) (rcong H)" | |
| 582 | proof (intro equiv.intro) | |
| 583 | show "refl (carrier G) (rcong H)" | |
| 584 | by (auto simp add: r_congruent_def refl_def) | |
| 585 | next | |
| 586 | show "sym (rcong H)" | |
| 587 | proof (simp add: r_congruent_def sym_def, clarify) | |
| 588 | fix x y | |
| 589 | assume [simp]: "x \<in> carrier G" "y \<in> carrier G" | |
| 590 | and "inv x \<otimes> y \<in> H" | |
| 591 | hence "inv (inv x \<otimes> y) \<in> H" by (simp add: m_inv_closed) | |
| 592 | thus "inv y \<otimes> x \<in> H" by (simp add: inv_mult_group) | |
| 593 | qed | |
| 594 | next | |
| 595 | show "trans (rcong H)" | |
| 596 | proof (simp add: r_congruent_def trans_def, clarify) | |
| 597 | fix x y z | |
| 598 | assume [simp]: "x \<in> carrier G" "y \<in> carrier G" "z \<in> carrier G" | |
| 599 | and "inv x \<otimes> y \<in> H" and "inv y \<otimes> z \<in> H" | |
| 600 | hence "(inv x \<otimes> y) \<otimes> (inv y \<otimes> z) \<in> H" by simp | |
| 601 | hence "inv x \<otimes> (y \<otimes> inv y) \<otimes> z \<in> H" by (simp add: m_assoc del: r_inv) | |
| 602 | thus "inv x \<otimes> z \<in> H" by simp | |
| 603 | qed | |
| 604 | qed | |
| 605 | ||
| 606 | text{*Equivalence classes of @{text rcong} correspond to left cosets.
 | |
| 607 | Was there a mistake in the definitions? I'd have expected them to | |
| 608 | correspond to right cosets.*} | |
| 609 | ||
| 610 | (* CB: This is correct, but subtle. | |
| 611 | We call H #> a the right coset of a relative to H. According to | |
| 612 | Jacobson, this is what the majority of group theory literature does. | |
| 613 | He then defines the notion of congruence relation ~ over monoids as | |
| 614 | equivalence relation with a ~ a' & b ~ b' \<Longrightarrow> a*b ~ a'*b'. | |
| 615 | Our notion of right congruence induced by K: rcong K appears only in | |
| 616 | the context where K is a normal subgroup. Jacobson doesn't name it. | |
| 617 | But in this context left and right cosets are identical. | |
| 618 | *) | |
| 619 | ||
| 620 | lemma (in subgroup) l_coset_eq_rcong: | |
| 621 | includes group G | |
| 622 | assumes a: "a \<in> carrier G" | |
| 623 |   shows "a <# H = rcong H `` {a}"
 | |
| 624 | by (force simp add: r_congruent_def l_coset_def m_assoc [symmetric] a ) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 625 | |
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 626 | |
| 20318 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 627 | subsubsection{*Two Distinct Right Cosets are Disjoint*}
 | 
| 14803 | 628 | |
| 629 | lemma (in group) rcos_equation: | |
| 14963 | 630 | includes subgroup H G | 
| 631 | shows | |
| 632 | "\<lbrakk>ha \<otimes> a = h \<otimes> b; a \<in> carrier G; b \<in> carrier G; | |
| 633 | h \<in> H; ha \<in> H; hb \<in> H\<rbrakk> | |
| 634 |       \<Longrightarrow> hb \<otimes> a \<in> (\<Union>h\<in>H. {h \<otimes> b})"
 | |
| 635 | apply (rule UN_I [of "hb \<otimes> ((inv ha) \<otimes> h)"]) | |
| 636 | apply (simp add: ); | |
| 637 | apply (simp add: m_assoc transpose_inv) | |
| 14803 | 638 | done | 
| 639 | ||
| 640 | lemma (in group) rcos_disjoint: | |
| 14963 | 641 | includes subgroup H G | 
| 642 |   shows "\<lbrakk>a \<in> rcosets H; b \<in> rcosets H; a\<noteq>b\<rbrakk> \<Longrightarrow> a \<inter> b = {}"
 | |
| 643 | apply (simp add: RCOSETS_def r_coset_def) | |
| 644 | apply (blast intro: rcos_equation prems sym) | |
| 14803 | 645 | done | 
| 646 | ||
| 20318 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 647 | subsection {* Further lemmas for @{text "r_congruent"} *}
 | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 648 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 649 | text {* The relation is a congruence *}
 | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 650 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 651 | lemma (in normal) congruent_rcong: | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 652 | shows "congruent2 (rcong H) (rcong H) (\<lambda>a b. a \<otimes> b <# H)" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 653 | proof (intro congruent2I[of "carrier G" _ "carrier G" _] equiv_rcong is_group) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 654 | fix a b c | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 655 | assume abrcong: "(a, b) \<in> rcong H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 656 | and ccarr: "c \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 657 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 658 | from abrcong | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 659 | have acarr: "a \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 660 | and bcarr: "b \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 661 | and abH: "inv a \<otimes> b \<in> H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 662 | unfolding r_congruent_def | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 663 | by fast+ | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 664 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 665 | note carr = acarr bcarr ccarr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 666 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 667 | from ccarr and abH | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 668 | have "inv c \<otimes> (inv a \<otimes> b) \<otimes> c \<in> H" by (rule inv_op_closed1) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 669 | moreover | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 670 | from carr and inv_closed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 671 | have "inv c \<otimes> (inv a \<otimes> b) \<otimes> c = (inv c \<otimes> inv a) \<otimes> (b \<otimes> c)" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 672 | by (force cong: m_assoc) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 673 | moreover | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 674 | from carr and inv_closed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 675 | have "\<dots> = (inv (a \<otimes> c)) \<otimes> (b \<otimes> c)" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 676 | by (simp add: inv_mult_group) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 677 | ultimately | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 678 | have "(inv (a \<otimes> c)) \<otimes> (b \<otimes> c) \<in> H" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 679 | from carr and this | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 680 | have "(b \<otimes> c) \<in> (a \<otimes> c) <# H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 681 | by (simp add: lcos_module_rev[OF is_group]) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 682 | from carr and this and is_subgroup | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 683 | show "(a \<otimes> c) <# H = (b \<otimes> c) <# H" by (intro l_repr_independence, simp+) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 684 | next | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 685 | fix a b c | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 686 | assume abrcong: "(a, b) \<in> rcong H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 687 | and ccarr: "c \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 688 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 689 | from ccarr have "c \<in> Units G" by (simp add: Units_eq) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 690 | hence cinvc_one: "inv c \<otimes> c = \<one>" by (rule Units_l_inv) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 691 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 692 | from abrcong | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 693 | have acarr: "a \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 694 | and bcarr: "b \<in> carrier G" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 695 | and abH: "inv a \<otimes> b \<in> H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 696 | by (unfold r_congruent_def, fast+) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 697 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 698 | note carr = acarr bcarr ccarr | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 699 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 700 | from carr and inv_closed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 701 | have "inv a \<otimes> b = inv a \<otimes> (\<one> \<otimes> b)" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 702 | also from carr and inv_closed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 703 | have "\<dots> = inv a \<otimes> (inv c \<otimes> c) \<otimes> b" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 704 | also from carr and inv_closed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 705 | have "\<dots> = (inv a \<otimes> inv c) \<otimes> (c \<otimes> b)" by (force cong: m_assoc) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 706 | also from carr and inv_closed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 707 | have "\<dots> = inv (c \<otimes> a) \<otimes> (c \<otimes> b)" by (simp add: inv_mult_group) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 708 | finally | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 709 | have "inv a \<otimes> b = inv (c \<otimes> a) \<otimes> (c \<otimes> b)" . | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 710 | from abH and this | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 711 | have "inv (c \<otimes> a) \<otimes> (c \<otimes> b) \<in> H" by simp | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 712 | |
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 713 | from carr and this | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 714 | have "(c \<otimes> b) \<in> (c \<otimes> a) <# H" | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 715 | by (simp add: lcos_module_rev[OF is_group]) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 716 | from carr and this and is_subgroup | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 717 | show "(c \<otimes> a) <# H = (c \<otimes> b) <# H" by (intro l_repr_independence, simp+) | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 718 | qed | 
| 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 ballarin parents: 
19931diff
changeset | 719 | |
| 14803 | 720 | |
| 721 | subsection {*Order of a Group and Lagrange's Theorem*}
 | |
| 722 | ||
| 723 | constdefs | |
| 14963 | 724 |   order :: "('a, 'b) monoid_scheme \<Rightarrow> nat"
 | 
| 725 | "order S \<equiv> card (carrier S)" | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 726 | |
| 14963 | 727 | lemma (in group) rcos_self: | 
| 728 | includes subgroup | |
| 729 | shows "x \<in> carrier G \<Longrightarrow> x \<in> H #> x" | |
| 730 | apply (simp add: r_coset_def) | |
| 731 | apply (rule_tac x="\<one>" in bexI) | |
| 732 | apply (auto simp add: ); | |
| 733 | done | |
| 734 | ||
| 735 | lemma (in group) rcosets_part_G: | |
| 736 | includes subgroup | |
| 737 | shows "\<Union>(rcosets H) = carrier G" | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 738 | apply (rule equalityI) | 
| 14963 | 739 | apply (force simp add: RCOSETS_def r_coset_def) | 
| 740 | apply (auto simp add: RCOSETS_def intro: rcos_self prems) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 741 | done | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 742 | |
| 14747 | 743 | lemma (in group) cosets_finite: | 
| 14963 | 744 | "\<lbrakk>c \<in> rcosets H; H \<subseteq> carrier G; finite (carrier G)\<rbrakk> \<Longrightarrow> finite c" | 
| 745 | apply (auto simp add: RCOSETS_def) | |
| 746 | apply (simp add: r_coset_subset_G [THEN finite_subset]) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 747 | done | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 748 | |
| 14747 | 749 | text{*The next two lemmas support the proof of @{text card_cosets_equal}.*}
 | 
| 750 | lemma (in group) inj_on_f: | |
| 14963 | 751 | "\<lbrakk>H \<subseteq> carrier G; a \<in> carrier G\<rbrakk> \<Longrightarrow> inj_on (\<lambda>y. y \<otimes> inv a) (H #> a)" | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 752 | apply (rule inj_onI) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 753 | apply (subgoal_tac "x \<in> carrier G & y \<in> carrier G") | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 754 | prefer 2 apply (blast intro: r_coset_subset_G [THEN subsetD]) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 755 | apply (simp add: subsetD) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 756 | done | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 757 | |
| 14747 | 758 | lemma (in group) inj_on_g: | 
| 14963 | 759 | "\<lbrakk>H \<subseteq> carrier G; a \<in> carrier G\<rbrakk> \<Longrightarrow> inj_on (\<lambda>y. y \<otimes> a) H" | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 760 | by (force simp add: inj_on_def subsetD) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 761 | |
| 14747 | 762 | lemma (in group) card_cosets_equal: | 
| 14963 | 763 | "\<lbrakk>c \<in> rcosets H; H \<subseteq> carrier G; finite(carrier G)\<rbrakk> | 
| 764 | \<Longrightarrow> card c = card H" | |
| 765 | apply (auto simp add: RCOSETS_def) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 766 | apply (rule card_bij_eq) | 
| 14666 | 767 | apply (rule inj_on_f, assumption+) | 
| 14747 | 768 | apply (force simp add: m_assoc subsetD r_coset_def) | 
| 14666 | 769 | apply (rule inj_on_g, assumption+) | 
| 14747 | 770 | apply (force simp add: m_assoc subsetD r_coset_def) | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 771 |  txt{*The sets @{term "H #> a"} and @{term "H"} are finite.*}
 | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 772 | apply (simp add: r_coset_subset_G [THEN finite_subset]) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 773 | apply (blast intro: finite_subset) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 774 | done | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 775 | |
| 14963 | 776 | lemma (in group) rcosets_subset_PowG: | 
| 777 | "subgroup H G \<Longrightarrow> rcosets H \<subseteq> Pow(carrier G)" | |
| 778 | apply (simp add: RCOSETS_def) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 779 | apply (blast dest: r_coset_subset_G subgroup.subset) | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 780 | done | 
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 781 | |
| 14803 | 782 | |
| 783 | theorem (in group) lagrange: | |
| 14963 | 784 | "\<lbrakk>finite(carrier G); subgroup H G\<rbrakk> | 
| 785 | \<Longrightarrow> card(rcosets H) * card(H) = order(G)" | |
| 786 | apply (simp (no_asm_simp) add: order_def rcosets_part_G [symmetric]) | |
| 14803 | 787 | apply (subst mult_commute) | 
| 788 | apply (rule card_partition) | |
| 14963 | 789 | apply (simp add: rcosets_subset_PowG [THEN finite_subset]) | 
| 790 | apply (simp add: rcosets_part_G) | |
| 14803 | 791 | apply (simp add: card_cosets_equal subgroup.subset) | 
| 792 | apply (simp add: rcos_disjoint) | |
| 793 | done | |
| 794 | ||
| 795 | ||
| 14747 | 796 | subsection {*Quotient Groups: Factorization of a Group*}
 | 
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 797 | |
| 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 798 | constdefs | 
| 14963 | 799 |   FactGroup :: "[('a,'b) monoid_scheme, 'a set] \<Rightarrow> ('a set) monoid"
 | 
| 14803 | 800 | (infixl "Mod" 65) | 
| 14747 | 801 |     --{*Actually defined for groups rather than monoids*}
 | 
| 14963 | 802 | "FactGroup G H \<equiv> | 
| 803 | \<lparr>carrier = rcosets\<^bsub>G\<^esub> H, mult = set_mult G, one = H\<rparr>" | |
| 14747 | 804 | |
| 14963 | 805 | lemma (in normal) setmult_closed: | 
| 806 | "\<lbrakk>K1 \<in> rcosets H; K2 \<in> rcosets H\<rbrakk> \<Longrightarrow> K1 <#> K2 \<in> rcosets H" | |
| 807 | by (auto simp add: rcos_sum RCOSETS_def) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 808 | |
| 14963 | 809 | lemma (in normal) setinv_closed: | 
| 810 | "K \<in> rcosets H \<Longrightarrow> set_inv K \<in> rcosets H" | |
| 811 | by (auto simp add: rcos_inv RCOSETS_def) | |
| 13889 
6676ac2527fa
Fixed Coset.thy (proved theorem factorgroup_is_group).
 ballarin parents: 
13870diff
changeset | 812 | |
| 14963 | 813 | lemma (in normal) rcosets_assoc: | 
| 814 | "\<lbrakk>M1 \<in> rcosets H; M2 \<in> rcosets H; M3 \<in> rcosets H\<rbrakk> | |
| 815 | \<Longrightarrow> M1 <#> M2 <#> M3 = M1 <#> (M2 <#> M3)" | |
| 816 | by (auto simp add: RCOSETS_def rcos_sum m_assoc) | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 817 | |
| 14963 | 818 | lemma (in subgroup) subgroup_in_rcosets: | 
| 819 | includes group G | |
| 820 | shows "H \<in> rcosets H" | |
| 13889 
6676ac2527fa
Fixed Coset.thy (proved theorem factorgroup_is_group).
 ballarin parents: 
13870diff
changeset | 821 | proof - | 
| 14963 | 822 | have "H #> \<one> = H" | 
| 823 | by (rule coset_join2, auto) | |
| 13889 
6676ac2527fa
Fixed Coset.thy (proved theorem factorgroup_is_group).
 ballarin parents: 
13870diff
changeset | 824 | then show ?thesis | 
| 14963 | 825 | by (auto simp add: RCOSETS_def) | 
| 13889 
6676ac2527fa
Fixed Coset.thy (proved theorem factorgroup_is_group).
 ballarin parents: 
13870diff
changeset | 826 | qed | 
| 
6676ac2527fa
Fixed Coset.thy (proved theorem factorgroup_is_group).
 ballarin parents: 
13870diff
changeset | 827 | |
| 14963 | 828 | lemma (in normal) rcosets_inv_mult_group_eq: | 
| 829 | "M \<in> rcosets H \<Longrightarrow> set_inv M <#> M = H" | |
| 19931 
fb32b43e7f80
Restructured locales with predicates: import is now an interpretation.
 ballarin parents: 
19380diff
changeset | 830 | by (auto simp add: RCOSETS_def rcos_inv rcos_sum subgroup.subset normal.axioms prems) | 
| 13889 
6676ac2527fa
Fixed Coset.thy (proved theorem factorgroup_is_group).
 ballarin parents: 
13870diff
changeset | 831 | |
| 14963 | 832 | theorem (in normal) factorgroup_is_group: | 
| 833 | "group (G Mod H)" | |
| 14666 | 834 | apply (simp add: FactGroup_def) | 
| 13936 | 835 | apply (rule groupI) | 
| 14747 | 836 | apply (simp add: setmult_closed) | 
| 14963 | 837 | apply (simp add: normal_imp_subgroup subgroup_in_rcosets [OF is_group]) | 
| 838 | apply (simp add: restrictI setmult_closed rcosets_assoc) | |
| 13889 
6676ac2527fa
Fixed Coset.thy (proved theorem factorgroup_is_group).
 ballarin parents: 
13870diff
changeset | 839 | apply (simp add: normal_imp_subgroup | 
| 14963 | 840 | subgroup_in_rcosets rcosets_mult_eq) | 
| 841 | apply (auto dest: rcosets_inv_mult_group_eq simp add: setinv_closed) | |
| 13889 
6676ac2527fa
Fixed Coset.thy (proved theorem factorgroup_is_group).
 ballarin parents: 
13870diff
changeset | 842 | done | 
| 
6676ac2527fa
Fixed Coset.thy (proved theorem factorgroup_is_group).
 ballarin parents: 
13870diff
changeset | 843 | |
| 14803 | 844 | lemma mult_FactGroup [simp]: "X \<otimes>\<^bsub>(G Mod H)\<^esub> X' = X <#>\<^bsub>G\<^esub> X'" | 
| 845 | by (simp add: FactGroup_def) | |
| 846 | ||
| 14963 | 847 | lemma (in normal) inv_FactGroup: | 
| 848 | "X \<in> carrier (G Mod H) \<Longrightarrow> inv\<^bsub>G Mod H\<^esub> X = set_inv X" | |
| 14747 | 849 | apply (rule group.inv_equality [OF factorgroup_is_group]) | 
| 14963 | 850 | apply (simp_all add: FactGroup_def setinv_closed rcosets_inv_mult_group_eq) | 
| 14747 | 851 | done | 
| 852 | ||
| 853 | text{*The coset map is a homomorphism from @{term G} to the quotient group
 | |
| 14963 | 854 |   @{term "G Mod H"}*}
 | 
| 855 | lemma (in normal) r_coset_hom_Mod: | |
| 856 | "(\<lambda>a. H #> a) \<in> hom G (G Mod H)" | |
| 857 | by (auto simp add: FactGroup_def RCOSETS_def Pi_def hom_def rcos_sum) | |
| 14747 | 858 | |
| 14963 | 859 | |
| 860 | subsection{*The First Isomorphism Theorem*}
 | |
| 14803 | 861 | |
| 14963 | 862 | text{*The quotient by the kernel of a homomorphism is isomorphic to the 
 | 
| 863 | range of that homomorphism.*} | |
| 14803 | 864 | |
| 865 | constdefs | |
| 14963 | 866 |   kernel :: "('a, 'm) monoid_scheme \<Rightarrow> ('b, 'n) monoid_scheme \<Rightarrow> 
 | 
| 867 |              ('a \<Rightarrow> 'b) \<Rightarrow> 'a set" 
 | |
| 14803 | 868 |     --{*the kernel of a homomorphism*}
 | 
| 14963 | 869 |   "kernel G H h \<equiv> {x. x \<in> carrier G & h x = \<one>\<^bsub>H\<^esub>}";
 | 
| 14803 | 870 | |
| 871 | lemma (in group_hom) subgroup_kernel: "subgroup (kernel G H h) G" | |
| 14963 | 872 | apply (rule subgroup.intro) | 
| 14803 | 873 | apply (auto simp add: kernel_def group.intro prems) | 
| 874 | done | |
| 875 | ||
| 876 | text{*The kernel of a homomorphism is a normal subgroup*}
 | |
| 14963 | 877 | lemma (in group_hom) normal_kernel: "(kernel G H h) \<lhd> G" | 
| 19931 
fb32b43e7f80
Restructured locales with predicates: import is now an interpretation.
 ballarin parents: 
19380diff
changeset | 878 | apply (simp add: G.normal_inv_iff subgroup_kernel) | 
| 
fb32b43e7f80
Restructured locales with predicates: import is now an interpretation.
 ballarin parents: 
19380diff
changeset | 879 | apply (simp add: kernel_def) | 
| 14803 | 880 | done | 
| 881 | ||
| 882 | lemma (in group_hom) FactGroup_nonempty: | |
| 883 | assumes X: "X \<in> carrier (G Mod kernel G H h)" | |
| 884 |   shows "X \<noteq> {}"
 | |
| 885 | proof - | |
| 886 | from X | |
| 887 | obtain g where "g \<in> carrier G" | |
| 888 | and "X = kernel G H h #> g" | |
| 14963 | 889 | by (auto simp add: FactGroup_def RCOSETS_def) | 
| 14803 | 890 | thus ?thesis | 
| 14963 | 891 | by (auto simp add: kernel_def r_coset_def image_def intro: hom_one) | 
| 14803 | 892 | qed | 
| 893 | ||
| 894 | ||
| 895 | lemma (in group_hom) FactGroup_contents_mem: | |
| 896 | assumes X: "X \<in> carrier (G Mod (kernel G H h))" | |
| 897 | shows "contents (h`X) \<in> carrier H" | |
| 898 | proof - | |
| 899 | from X | |
| 900 | obtain g where g: "g \<in> carrier G" | |
| 901 | and "X = kernel G H h #> g" | |
| 14963 | 902 | by (auto simp add: FactGroup_def RCOSETS_def) | 
| 903 |   hence "h ` X = {h g}" by (auto simp add: kernel_def r_coset_def image_def g)
 | |
| 14803 | 904 | thus ?thesis by (auto simp add: g) | 
| 905 | qed | |
| 906 | ||
| 907 | lemma (in group_hom) FactGroup_hom: | |
| 14963 | 908 | "(\<lambda>X. contents (h`X)) \<in> hom (G Mod (kernel G H h)) H" | 
| 909 | apply (simp add: hom_def FactGroup_contents_mem normal.factorgroup_is_group [OF normal_kernel] group.axioms monoid.m_closed) | |
| 14803 | 910 | proof (simp add: hom_def funcsetI FactGroup_contents_mem, intro ballI) | 
| 911 | fix X and X' | |
| 912 | assume X: "X \<in> carrier (G Mod kernel G H h)" | |
| 913 | and X': "X' \<in> carrier (G Mod kernel G H h)" | |
| 914 | then | |
| 915 | obtain g and g' | |
| 916 | where "g \<in> carrier G" and "g' \<in> carrier G" | |
| 917 | and "X = kernel G H h #> g" and "X' = kernel G H h #> g'" | |
| 14963 | 918 | by (auto simp add: FactGroup_def RCOSETS_def) | 
| 14803 | 919 | hence all: "\<forall>x\<in>X. h x = h g" "\<forall>x\<in>X'. h x = h g'" | 
| 920 | and Xsub: "X \<subseteq> carrier G" and X'sub: "X' \<subseteq> carrier G" | |
| 921 | by (force simp add: kernel_def r_coset_def image_def)+ | |
| 922 |   hence "h ` (X <#> X') = {h g \<otimes>\<^bsub>H\<^esub> h g'}" using X X'
 | |
| 923 | by (auto dest!: FactGroup_nonempty | |
| 924 | simp add: set_mult_def image_eq_UN | |
| 925 | subsetD [OF Xsub] subsetD [OF X'sub]) | |
| 926 | thus "contents (h ` (X <#> X')) = contents (h ` X) \<otimes>\<^bsub>H\<^esub> contents (h ` X')" | |
| 927 | by (simp add: all image_eq_UN FactGroup_nonempty X X') | |
| 928 | qed | |
| 929 | ||
| 14963 | 930 | |
| 14803 | 931 | text{*Lemma for the following injectivity result*}
 | 
| 932 | lemma (in group_hom) FactGroup_subset: | |
| 14963 | 933 | "\<lbrakk>g \<in> carrier G; g' \<in> carrier G; h g = h g'\<rbrakk> | 
| 934 | \<Longrightarrow> kernel G H h #> g \<subseteq> kernel G H h #> g'" | |
| 14803 | 935 | apply (clarsimp simp add: kernel_def r_coset_def image_def); | 
| 936 | apply (rename_tac y) | |
| 937 | apply (rule_tac x="y \<otimes> g \<otimes> inv g'" in exI) | |
| 938 | apply (simp add: G.m_assoc); | |
| 939 | done | |
| 940 | ||
| 941 | lemma (in group_hom) FactGroup_inj_on: | |
| 942 | "inj_on (\<lambda>X. contents (h ` X)) (carrier (G Mod kernel G H h))" | |
| 943 | proof (simp add: inj_on_def, clarify) | |
| 944 | fix X and X' | |
| 945 | assume X: "X \<in> carrier (G Mod kernel G H h)" | |
| 946 | and X': "X' \<in> carrier (G Mod kernel G H h)" | |
| 947 | then | |
| 948 | obtain g and g' | |
| 949 | where gX: "g \<in> carrier G" "g' \<in> carrier G" | |
| 950 | "X = kernel G H h #> g" "X' = kernel G H h #> g'" | |
| 14963 | 951 | by (auto simp add: FactGroup_def RCOSETS_def) | 
| 14803 | 952 | hence all: "\<forall>x\<in>X. h x = h g" "\<forall>x\<in>X'. h x = h g'" | 
| 953 | by (force simp add: kernel_def r_coset_def image_def)+ | |
| 954 | assume "contents (h ` X) = contents (h ` X')" | |
| 955 | hence h: "h g = h g'" | |
| 956 | by (simp add: image_eq_UN all FactGroup_nonempty X X') | |
| 957 | show "X=X'" by (rule equalityI) (simp_all add: FactGroup_subset h gX) | |
| 958 | qed | |
| 959 | ||
| 960 | text{*If the homomorphism @{term h} is onto @{term H}, then so is the
 | |
| 961 | homomorphism from the quotient group*} | |
| 962 | lemma (in group_hom) FactGroup_onto: | |
| 963 | assumes h: "h ` carrier G = carrier H" | |
| 964 | shows "(\<lambda>X. contents (h ` X)) ` carrier (G Mod kernel G H h) = carrier H" | |
| 965 | proof | |
| 966 | show "(\<lambda>X. contents (h ` X)) ` carrier (G Mod kernel G H h) \<subseteq> carrier H" | |
| 967 | by (auto simp add: FactGroup_contents_mem) | |
| 968 | show "carrier H \<subseteq> (\<lambda>X. contents (h ` X)) ` carrier (G Mod kernel G H h)" | |
| 969 | proof | |
| 970 | fix y | |
| 971 | assume y: "y \<in> carrier H" | |
| 972 | with h obtain g where g: "g \<in> carrier G" "h g = y" | |
| 973 | by (blast elim: equalityE); | |
| 15120 | 974 |     hence "(\<Union>x\<in>kernel G H h #> g. {h x}) = {y}" 
 | 
| 14803 | 975 | by (auto simp add: y kernel_def r_coset_def) | 
| 976 | with g show "y \<in> (\<lambda>X. contents (h ` X)) ` carrier (G Mod kernel G H h)" | |
| 14963 | 977 | by (auto intro!: bexI simp add: FactGroup_def RCOSETS_def image_eq_UN) | 
| 14803 | 978 | qed | 
| 979 | qed | |
| 980 | ||
| 981 | ||
| 982 | text{*If @{term h} is a homomorphism from @{term G} onto @{term H}, then the
 | |
| 983 |  quotient group @{term "G Mod (kernel G H h)"} is isomorphic to @{term H}.*}
 | |
| 984 | theorem (in group_hom) FactGroup_iso: | |
| 985 | "h ` carrier G = carrier H | |
| 14963 | 986 | \<Longrightarrow> (\<lambda>X. contents (h`X)) \<in> (G Mod (kernel G H h)) \<cong> H" | 
| 14803 | 987 | by (simp add: iso_def FactGroup_hom FactGroup_inj_on bij_betw_def | 
| 988 | FactGroup_onto) | |
| 989 | ||
| 14963 | 990 | |
| 13870 
cf947d1ec5ff
moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
 paulson parents: diff
changeset | 991 | end |