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