| author | Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> | 
| Tue, 22 Jan 2019 22:57:16 +0000 | |
| changeset 69722 | b5163b2132c5 | 
| parent 69700 | 7a92cbec7030 | 
| child 69749 | 10e48c47a549 | 
| permissions | -rw-r--r-- | 
| 35849 | 1  | 
(* Title: HOL/Algebra/Group.thy  | 
2  | 
Author: Clemens Ballarin, started 4 February 2003  | 
|
| 13813 | 3  | 
|
4  | 
Based on work by Florian Kammueller, L C Paulson and Markus Wenzel.  | 
|
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
5  | 
With additional contributions from Martin Baillon and Paulo EmÃlio de Vilhena.  | 
| 13813 | 6  | 
*)  | 
7  | 
||
| 28823 | 8  | 
theory Group  | 
| 
68188
 
2af1f142f855
move FuncSet back to HOL-Library (amending 493b818e8e10)
 
immler 
parents: 
68072 
diff
changeset
 | 
9  | 
imports Complete_Lattice "HOL-Library.FuncSet"  | 
| 28823 | 10  | 
begin  | 
| 13813 | 11  | 
|
| 61382 | 12  | 
section \<open>Monoids and Groups\<close>  | 
| 13936 | 13  | 
|
| 61382 | 14  | 
subsection \<open>Definitions\<close>  | 
| 
20318
 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 
ballarin 
parents: 
19984 
diff
changeset
 | 
15  | 
|
| 61382 | 16  | 
text \<open>  | 
| 58622 | 17  | 
  Definitions follow @{cite "Jacobson:1985"}.
 | 
| 61382 | 18  | 
\<close>  | 
| 13813 | 19  | 
|
| 14963 | 20  | 
record 'a monoid = "'a partial_object" +  | 
21  | 
mult :: "['a, 'a] \<Rightarrow> 'a" (infixl "\<otimes>\<index>" 70)  | 
|
22  | 
  one     :: 'a ("\<one>\<index>")
 | 
|
| 13817 | 23  | 
|
| 35847 | 24  | 
definition  | 
| 14852 | 25  | 
  m_inv :: "('a, 'b) monoid_scheme => 'a => 'a" ("inv\<index> _" [81] 80)
 | 
| 67091 | 26  | 
where "inv\<^bsub>G\<^esub> x = (THE y. y \<in> carrier G \<and> x \<otimes>\<^bsub>G\<^esub> y = \<one>\<^bsub>G\<^esub> \<and> y \<otimes>\<^bsub>G\<^esub> x = \<one>\<^bsub>G\<^esub>)"  | 
| 13936 | 27  | 
|
| 35847 | 28  | 
definition  | 
| 14651 | 29  | 
Units :: "_ => 'a set"  | 
| 
67443
 
3abf6a722518
standardized towards new-style formal comments: isabelle update_comments;
 
wenzelm 
parents: 
67399 
diff
changeset
 | 
30  | 
\<comment> \<open>The set of invertible elements\<close>  | 
| 67091 | 31  | 
  where "Units G = {y. y \<in> carrier G \<and> (\<exists>x \<in> carrier G. x \<otimes>\<^bsub>G\<^esub> y = \<one>\<^bsub>G\<^esub> \<and> y \<otimes>\<^bsub>G\<^esub> x = \<one>\<^bsub>G\<^esub>)}"
 | 
| 13936 | 32  | 
|
33  | 
consts  | 
|
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
34  | 
  pow :: "[('a, 'm) monoid_scheme, 'a, 'b::semiring_1] => 'a"  (infixr "[^]\<index>" 75)
 | 
| 35850 | 35  | 
|
36  | 
overloading nat_pow == "pow :: [_, 'a, nat] => 'a"  | 
|
37  | 
begin  | 
|
| 55415 | 38  | 
definition "nat_pow G a n = rec_nat \<one>\<^bsub>G\<^esub> (%u b. b \<otimes>\<^bsub>G\<^esub> a) n"  | 
| 35850 | 39  | 
end  | 
| 13936 | 40  | 
|
| 35850 | 41  | 
overloading int_pow == "pow :: [_, 'a, int] => 'a"  | 
42  | 
begin  | 
|
43  | 
definition "int_pow G a z =  | 
|
| 55415 | 44  | 
(let p = rec_nat \<one>\<^bsub>G\<^esub> (%u b. b \<otimes>\<^bsub>G\<^esub> a)  | 
| 46559 | 45  | 
in if z < 0 then inv\<^bsub>G\<^esub> (p (nat (-z))) else p (nat z))"  | 
| 35850 | 46  | 
end  | 
| 13813 | 47  | 
|
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
48  | 
lemma int_pow_int: "x [^]\<^bsub>G\<^esub> (int n) = x [^]\<^bsub>G\<^esub> n"  | 
| 61628 | 49  | 
by(simp add: int_pow_def nat_pow_def)  | 
50  | 
||
| 19783 | 51  | 
locale monoid =  | 
52  | 
fixes G (structure)  | 
|
| 13813 | 53  | 
assumes m_closed [intro, simp]:  | 
| 14963 | 54  | 
"\<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> x \<otimes> y \<in> carrier G"  | 
55  | 
and m_assoc:  | 
|
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
56  | 
"\<lbrakk>x \<in> carrier G; y \<in> carrier G; z \<in> carrier G\<rbrakk>  | 
| 14963 | 57  | 
\<Longrightarrow> (x \<otimes> y) \<otimes> z = x \<otimes> (y \<otimes> z)"  | 
58  | 
and one_closed [intro, simp]: "\<one> \<in> carrier G"  | 
|
59  | 
and l_one [simp]: "x \<in> carrier G \<Longrightarrow> \<one> \<otimes> x = x"  | 
|
60  | 
and r_one [simp]: "x \<in> carrier G \<Longrightarrow> x \<otimes> \<one> = x"  | 
|
| 13817 | 61  | 
|
| 13936 | 62  | 
lemma monoidI:  | 
| 19783 | 63  | 
fixes G (structure)  | 
| 13936 | 64  | 
assumes m_closed:  | 
| 14693 | 65  | 
"!!x y. [| x \<in> carrier G; y \<in> carrier G |] ==> x \<otimes> y \<in> carrier G"  | 
66  | 
and one_closed: "\<one> \<in> carrier G"  | 
|
| 13936 | 67  | 
and m_assoc:  | 
68  | 
"!!x y z. [| x \<in> carrier G; y \<in> carrier G; z \<in> carrier G |] ==>  | 
|
| 14693 | 69  | 
(x \<otimes> y) \<otimes> z = x \<otimes> (y \<otimes> z)"  | 
70  | 
and l_one: "!!x. x \<in> carrier G ==> \<one> \<otimes> x = x"  | 
|
71  | 
and r_one: "!!x. x \<in> carrier G ==> x \<otimes> \<one> = x"  | 
|
| 13936 | 72  | 
shows "monoid G"  | 
| 
27714
 
27b4d7c01f8b
Tuned (for the sake of a meaningless log entry).
 
ballarin 
parents: 
27713 
diff
changeset
 | 
73  | 
by (fast intro!: monoid.intro intro: assms)  | 
| 13936 | 74  | 
|
75  | 
lemma (in monoid) Units_closed [dest]:  | 
|
76  | 
"x \<in> Units G ==> x \<in> carrier G"  | 
|
77  | 
by (unfold Units_def) fast  | 
|
78  | 
||
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
79  | 
lemma (in monoid) one_unique:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
80  | 
assumes "u \<in> carrier G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
81  | 
and "\<And>x. x \<in> carrier G \<Longrightarrow> u \<otimes> x = x"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
82  | 
shows "u = \<one>"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
83  | 
using assms(2)[OF one_closed] r_one[OF assms(1)] by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
84  | 
|
| 13936 | 85  | 
lemma (in monoid) inv_unique:  | 
| 14693 | 86  | 
assumes eq: "y \<otimes> x = \<one>" "x \<otimes> y' = \<one>"  | 
87  | 
and G: "x \<in> carrier G" "y \<in> carrier G" "y' \<in> carrier G"  | 
|
| 13936 | 88  | 
shows "y = y'"  | 
89  | 
proof -  | 
|
90  | 
from G eq have "y = y \<otimes> (x \<otimes> y')" by simp  | 
|
91  | 
also from G have "... = (y \<otimes> x) \<otimes> y'" by (simp add: m_assoc)  | 
|
92  | 
also from G eq have "... = y'" by simp  | 
|
93  | 
finally show ?thesis .  | 
|
94  | 
qed  | 
|
95  | 
||
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
96  | 
lemma (in monoid) Units_m_closed [simp, intro]:  | 
| 27698 | 97  | 
assumes x: "x \<in> Units G" and y: "y \<in> Units G"  | 
98  | 
shows "x \<otimes> y \<in> Units G"  | 
|
99  | 
proof -  | 
|
100  | 
from x obtain x' where x: "x \<in> carrier G" "x' \<in> carrier G" and xinv: "x \<otimes> x' = \<one>" "x' \<otimes> x = \<one>"  | 
|
101  | 
unfolding Units_def by fast  | 
|
102  | 
from y obtain y' where y: "y \<in> carrier G" "y' \<in> carrier G" and yinv: "y \<otimes> y' = \<one>" "y' \<otimes> y = \<one>"  | 
|
103  | 
unfolding Units_def by fast  | 
|
104  | 
from x y xinv yinv have "y' \<otimes> (x' \<otimes> x) \<otimes> y = \<one>" by simp  | 
|
105  | 
moreover from x y xinv yinv have "x \<otimes> (y \<otimes> y') \<otimes> x' = \<one>" by simp  | 
|
106  | 
moreover note x y  | 
|
107  | 
ultimately show ?thesis unfolding Units_def  | 
|
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
108  | 
by simp (metis m_assoc m_closed)  | 
| 27698 | 109  | 
qed  | 
110  | 
||
| 13940 | 111  | 
lemma (in monoid) Units_one_closed [intro, simp]:  | 
112  | 
"\<one> \<in> Units G"  | 
|
113  | 
by (unfold Units_def) auto  | 
|
114  | 
||
| 13936 | 115  | 
lemma (in monoid) Units_inv_closed [intro, simp]:  | 
116  | 
"x \<in> Units G ==> inv x \<in> carrier G"  | 
|
| 68662 | 117  | 
apply (simp add: Units_def m_inv_def)  | 
118  | 
by (metis (mono_tags, lifting) inv_unique the_equality)  | 
|
| 13936 | 119  | 
|
| 19981 | 120  | 
lemma (in monoid) Units_l_inv_ex:  | 
121  | 
"x \<in> Units G ==> \<exists>y \<in> carrier G. y \<otimes> x = \<one>"  | 
|
122  | 
by (unfold Units_def) auto  | 
|
123  | 
||
124  | 
lemma (in monoid) Units_r_inv_ex:  | 
|
125  | 
"x \<in> Units G ==> \<exists>y \<in> carrier G. x \<otimes> y = \<one>"  | 
|
126  | 
by (unfold Units_def) auto  | 
|
127  | 
||
| 27698 | 128  | 
lemma (in monoid) Units_l_inv [simp]:  | 
| 13936 | 129  | 
"x \<in> Units G ==> inv x \<otimes> x = \<one>"  | 
| 68662 | 130  | 
apply (unfold Units_def m_inv_def, simp)  | 
131  | 
by (metis (mono_tags, lifting) inv_unique the_equality)  | 
|
| 13936 | 132  | 
|
| 27698 | 133  | 
lemma (in monoid) Units_r_inv [simp]:  | 
| 13936 | 134  | 
"x \<in> Units G ==> x \<otimes> inv x = \<one>"  | 
| 68458 | 135  | 
by (metis (full_types) Units_closed Units_inv_closed Units_l_inv Units_r_inv_ex inv_unique)  | 
| 13936 | 136  | 
|
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
137  | 
lemma (in monoid) inv_one [simp]:  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
138  | 
"inv \<one> = \<one>"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
139  | 
by (metis Units_one_closed Units_r_inv l_one monoid.Units_inv_closed monoid_axioms)  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
140  | 
|
| 13936 | 141  | 
lemma (in monoid) Units_inv_Units [intro, simp]:  | 
142  | 
"x \<in> Units G ==> inv x \<in> Units G"  | 
|
143  | 
proof -  | 
|
144  | 
assume x: "x \<in> Units G"  | 
|
145  | 
show "inv x \<in> Units G"  | 
|
146  | 
by (auto simp add: Units_def  | 
|
147  | 
intro: Units_l_inv Units_r_inv x Units_closed [OF x])  | 
|
148  | 
qed  | 
|
149  | 
||
150  | 
lemma (in monoid) Units_l_cancel [simp]:  | 
|
151  | 
"[| x \<in> Units G; y \<in> carrier G; z \<in> carrier G |] ==>  | 
|
152  | 
(x \<otimes> y = x \<otimes> z) = (y = z)"  | 
|
153  | 
proof  | 
|
154  | 
assume eq: "x \<otimes> y = x \<otimes> z"  | 
|
| 14693 | 155  | 
and G: "x \<in> Units G" "y \<in> carrier G" "z \<in> carrier G"  | 
| 13936 | 156  | 
then have "(inv x \<otimes> x) \<otimes> y = (inv x \<otimes> x) \<otimes> z"  | 
| 27698 | 157  | 
by (simp add: m_assoc Units_closed del: Units_l_inv)  | 
| 44472 | 158  | 
with G show "y = z" by simp  | 
| 13936 | 159  | 
next  | 
160  | 
assume eq: "y = z"  | 
|
| 14693 | 161  | 
and G: "x \<in> Units G" "y \<in> carrier G" "z \<in> carrier G"  | 
| 13936 | 162  | 
then show "x \<otimes> y = x \<otimes> z" by simp  | 
163  | 
qed  | 
|
164  | 
||
165  | 
lemma (in monoid) Units_inv_inv [simp]:  | 
|
166  | 
"x \<in> Units G ==> inv (inv x) = x"  | 
|
167  | 
proof -  | 
|
168  | 
assume x: "x \<in> Units G"  | 
|
| 27698 | 169  | 
then have "inv x \<otimes> inv (inv x) = inv x \<otimes> x" by simp  | 
170  | 
with x show ?thesis by (simp add: Units_closed del: Units_l_inv Units_r_inv)  | 
|
| 13936 | 171  | 
qed  | 
172  | 
||
173  | 
lemma (in monoid) inv_inj_on_Units:  | 
|
174  | 
"inj_on (m_inv G) (Units G)"  | 
|
175  | 
proof (rule inj_onI)  | 
|
176  | 
fix x y  | 
|
| 14693 | 177  | 
assume G: "x \<in> Units G" "y \<in> Units G" and eq: "inv x = inv y"  | 
| 13936 | 178  | 
then have "inv (inv x) = inv (inv y)" by simp  | 
179  | 
with G show "x = y" by simp  | 
|
180  | 
qed  | 
|
181  | 
||
| 13940 | 182  | 
lemma (in monoid) Units_inv_comm:  | 
183  | 
assumes inv: "x \<otimes> y = \<one>"  | 
|
| 14693 | 184  | 
and G: "x \<in> Units G" "y \<in> Units G"  | 
| 13940 | 185  | 
shows "y \<otimes> x = \<one>"  | 
186  | 
proof -  | 
|
187  | 
from G have "x \<otimes> y \<otimes> x = x \<otimes> \<one>" by (auto simp add: inv Units_closed)  | 
|
188  | 
with G show ?thesis by (simp del: r_one add: m_assoc Units_closed)  | 
|
189  | 
qed  | 
|
190  | 
||
| 61628 | 191  | 
lemma (in monoid) carrier_not_empty: "carrier G \<noteq> {}"
 | 
192  | 
by auto  | 
|
193  | 
||
| 61382 | 194  | 
text \<open>Power\<close>  | 
| 13936 | 195  | 
|
196  | 
lemma (in monoid) nat_pow_closed [intro, simp]:  | 
|
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
197  | 
"x \<in> carrier G ==> x [^] (n::nat) \<in> carrier G"  | 
| 13936 | 198  | 
by (induct n) (simp_all add: nat_pow_def)  | 
199  | 
||
200  | 
lemma (in monoid) nat_pow_0 [simp]:  | 
|
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
201  | 
"x [^] (0::nat) = \<one>"  | 
| 13936 | 202  | 
by (simp add: nat_pow_def)  | 
203  | 
||
204  | 
lemma (in monoid) nat_pow_Suc [simp]:  | 
|
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
205  | 
"x [^] (Suc n) = x [^] n \<otimes> x"  | 
| 13936 | 206  | 
by (simp add: nat_pow_def)  | 
207  | 
||
208  | 
lemma (in monoid) nat_pow_one [simp]:  | 
|
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
209  | 
"\<one> [^] (n::nat) = \<one>"  | 
| 13936 | 210  | 
by (induct n) simp_all  | 
211  | 
||
212  | 
lemma (in monoid) nat_pow_mult:  | 
|
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
213  | 
"x \<in> carrier G ==> x [^] (n::nat) \<otimes> x [^] m = x [^] (n + m)"  | 
| 13936 | 214  | 
by (induct m) (simp_all add: m_assoc [THEN sym])  | 
215  | 
||
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
216  | 
lemma (in monoid) nat_pow_comm:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
217  | 
"x \<in> carrier G \<Longrightarrow> (x [^] (n::nat)) \<otimes> (x [^] (m :: nat)) = (x [^] m) \<otimes> (x [^] n)"  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
218  | 
using nat_pow_mult[of x n m] nat_pow_mult[of x m n] by (simp add: add.commute)  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
219  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
220  | 
lemma (in monoid) nat_pow_Suc2:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
221  | 
"x \<in> carrier G \<Longrightarrow> x [^] (Suc n) = x \<otimes> (x [^] n)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
222  | 
using nat_pow_mult[of x 1 n] Suc_eq_plus1[of n]  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
223  | 
by (metis One_nat_def Suc_eq_plus1_left l_one nat.rec(1) nat_pow_Suc nat_pow_def)  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
224  | 
|
| 13936 | 225  | 
lemma (in monoid) nat_pow_pow:  | 
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
226  | 
"x \<in> carrier G ==> (x [^] n) [^] m = x [^] (n * m::nat)"  | 
| 
57512
 
cc97b347b301
reduced name variants for assoc and commute on plus and mult
 
haftmann 
parents: 
57271 
diff
changeset
 | 
227  | 
by (induct m) (simp, simp add: nat_pow_mult add.commute)  | 
| 13936 | 228  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
229  | 
lemma (in monoid) nat_pow_consistent:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
230  | 
"x [^] (n :: nat) = x [^]\<^bsub>(G \<lparr> carrier := H \<rparr>)\<^esub> n"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
231  | 
unfolding nat_pow_def by simp  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
232  | 
|
| 27698 | 233  | 
|
234  | 
(* Jacobson defines submonoid here. *)  | 
|
235  | 
(* Jacobson defines the order of a monoid here. *)  | 
|
236  | 
||
237  | 
||
| 61382 | 238  | 
subsection \<open>Groups\<close>  | 
| 27698 | 239  | 
|
| 61382 | 240  | 
text \<open>  | 
| 13936 | 241  | 
A group is a monoid all of whose elements are invertible.  | 
| 61382 | 242  | 
\<close>  | 
| 13936 | 243  | 
|
244  | 
locale group = monoid +  | 
|
245  | 
assumes Units: "carrier G <= Units G"  | 
|
246  | 
||
| 26199 | 247  | 
lemma (in group) is_group: "group G" by (rule group_axioms)  | 
| 14761 | 248  | 
|
| 13936 | 249  | 
theorem groupI:  | 
| 19783 | 250  | 
fixes G (structure)  | 
| 13936 | 251  | 
assumes m_closed [simp]:  | 
| 14693 | 252  | 
"!!x y. [| x \<in> carrier G; y \<in> carrier G |] ==> x \<otimes> y \<in> carrier G"  | 
253  | 
and one_closed [simp]: "\<one> \<in> carrier G"  | 
|
| 13936 | 254  | 
and m_assoc:  | 
255  | 
"!!x y z. [| x \<in> carrier G; y \<in> carrier G; z \<in> carrier G |] ==>  | 
|
| 14693 | 256  | 
(x \<otimes> y) \<otimes> z = x \<otimes> (y \<otimes> z)"  | 
257  | 
and l_one [simp]: "!!x. x \<in> carrier G ==> \<one> \<otimes> x = x"  | 
|
| 14963 | 258  | 
and l_inv_ex: "!!x. x \<in> carrier G ==> \<exists>y \<in> carrier G. y \<otimes> x = \<one>"  | 
| 13936 | 259  | 
shows "group G"  | 
260  | 
proof -  | 
|
261  | 
have l_cancel [simp]:  | 
|
262  | 
"!!x y z. [| x \<in> carrier G; y \<in> carrier G; z \<in> carrier G |] ==>  | 
|
| 14693 | 263  | 
(x \<otimes> y = x \<otimes> z) = (y = z)"  | 
| 13936 | 264  | 
proof  | 
265  | 
fix x y z  | 
|
| 14693 | 266  | 
assume eq: "x \<otimes> y = x \<otimes> z"  | 
267  | 
and G: "x \<in> carrier G" "y \<in> carrier G" "z \<in> carrier G"  | 
|
| 13936 | 268  | 
with l_inv_ex obtain x_inv where xG: "x_inv \<in> carrier G"  | 
| 14693 | 269  | 
and l_inv: "x_inv \<otimes> x = \<one>" by fast  | 
270  | 
from G eq xG have "(x_inv \<otimes> x) \<otimes> y = (x_inv \<otimes> x) \<otimes> z"  | 
|
| 13936 | 271  | 
by (simp add: m_assoc)  | 
272  | 
with G show "y = z" by (simp add: l_inv)  | 
|
273  | 
next  | 
|
274  | 
fix x y z  | 
|
275  | 
assume eq: "y = z"  | 
|
| 14693 | 276  | 
and G: "x \<in> carrier G" "y \<in> carrier G" "z \<in> carrier G"  | 
277  | 
then show "x \<otimes> y = x \<otimes> z" by simp  | 
|
| 13936 | 278  | 
qed  | 
279  | 
have r_one:  | 
|
| 14693 | 280  | 
"!!x. x \<in> carrier G ==> x \<otimes> \<one> = x"  | 
| 13936 | 281  | 
proof -  | 
282  | 
fix x  | 
|
283  | 
assume x: "x \<in> carrier G"  | 
|
284  | 
with l_inv_ex obtain x_inv where xG: "x_inv \<in> carrier G"  | 
|
| 14693 | 285  | 
and l_inv: "x_inv \<otimes> x = \<one>" by fast  | 
286  | 
from x xG have "x_inv \<otimes> (x \<otimes> \<one>) = x_inv \<otimes> x"  | 
|
| 13936 | 287  | 
by (simp add: m_assoc [symmetric] l_inv)  | 
| 14693 | 288  | 
with x xG show "x \<otimes> \<one> = x" by simp  | 
| 13936 | 289  | 
qed  | 
290  | 
have inv_ex:  | 
|
| 67091 | 291  | 
"\<And>x. x \<in> carrier G \<Longrightarrow> \<exists>y \<in> carrier G. y \<otimes> x = \<one> \<and> x \<otimes> y = \<one>"  | 
| 13936 | 292  | 
proof -  | 
293  | 
fix x  | 
|
294  | 
assume x: "x \<in> carrier G"  | 
|
295  | 
with l_inv_ex obtain y where y: "y \<in> carrier G"  | 
|
| 14693 | 296  | 
and l_inv: "y \<otimes> x = \<one>" by fast  | 
297  | 
from x y have "y \<otimes> (x \<otimes> y) = y \<otimes> \<one>"  | 
|
| 13936 | 298  | 
by (simp add: m_assoc [symmetric] l_inv r_one)  | 
| 14693 | 299  | 
with x y have r_inv: "x \<otimes> y = \<one>"  | 
| 13936 | 300  | 
by simp  | 
| 67091 | 301  | 
from x y show "\<exists>y \<in> carrier G. y \<otimes> x = \<one> \<and> x \<otimes> y = \<one>"  | 
| 13936 | 302  | 
by (fast intro: l_inv r_inv)  | 
303  | 
qed  | 
|
| 67091 | 304  | 
then have carrier_subset_Units: "carrier G \<subseteq> Units G"  | 
| 13936 | 305  | 
by (unfold Units_def) fast  | 
| 61169 | 306  | 
show ?thesis  | 
307  | 
by standard (auto simp: r_one m_assoc carrier_subset_Units)  | 
|
| 13936 | 308  | 
qed  | 
309  | 
||
| 27698 | 310  | 
lemma (in monoid) group_l_invI:  | 
| 13936 | 311  | 
assumes l_inv_ex:  | 
| 14963 | 312  | 
"!!x. x \<in> carrier G ==> \<exists>y \<in> carrier G. y \<otimes> x = \<one>"  | 
| 13936 | 313  | 
shows "group G"  | 
314  | 
by (rule groupI) (auto intro: m_assoc l_inv_ex)  | 
|
315  | 
||
316  | 
lemma (in group) Units_eq [simp]:  | 
|
317  | 
"Units G = carrier G"  | 
|
318  | 
proof  | 
|
| 67091 | 319  | 
show "Units G \<subseteq> carrier G" by fast  | 
| 13936 | 320  | 
next  | 
| 67091 | 321  | 
show "carrier G \<subseteq> Units G" by (rule Units)  | 
| 13936 | 322  | 
qed  | 
323  | 
||
324  | 
lemma (in group) inv_closed [intro, simp]:  | 
|
325  | 
"x \<in> carrier G ==> inv x \<in> carrier G"  | 
|
326  | 
using Units_inv_closed by simp  | 
|
327  | 
||
| 19981 | 328  | 
lemma (in group) l_inv_ex [simp]:  | 
329  | 
"x \<in> carrier G ==> \<exists>y \<in> carrier G. y \<otimes> x = \<one>"  | 
|
330  | 
using Units_l_inv_ex by simp  | 
|
331  | 
||
332  | 
lemma (in group) r_inv_ex [simp]:  | 
|
333  | 
"x \<in> carrier G ==> \<exists>y \<in> carrier G. x \<otimes> y = \<one>"  | 
|
334  | 
using Units_r_inv_ex by simp  | 
|
335  | 
||
| 14963 | 336  | 
lemma (in group) l_inv [simp]:  | 
| 13936 | 337  | 
"x \<in> carrier G ==> inv x \<otimes> x = \<one>"  | 
| 
68399
 
0b71d08528f0
resolution of name clashes in Algebra
 
paulson <lp15@cam.ac.uk> 
parents: 
68188 
diff
changeset
 | 
338  | 
by simp  | 
| 13813 | 339  | 
|
| 
20318
 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 
ballarin 
parents: 
19984 
diff
changeset
 | 
340  | 
|
| 61382 | 341  | 
subsection \<open>Cancellation Laws and Basic Properties\<close>  | 
| 13813 | 342  | 
|
| 14963 | 343  | 
lemma (in group) r_inv [simp]:  | 
| 13813 | 344  | 
"x \<in> carrier G ==> x \<otimes> inv x = \<one>"  | 
| 
68399
 
0b71d08528f0
resolution of name clashes in Algebra
 
paulson <lp15@cam.ac.uk> 
parents: 
68188 
diff
changeset
 | 
345  | 
by simp  | 
| 13813 | 346  | 
|
| 
68399
 
0b71d08528f0
resolution of name clashes in Algebra
 
paulson <lp15@cam.ac.uk> 
parents: 
68188 
diff
changeset
 | 
347  | 
lemma (in group) right_cancel [simp]:  | 
| 13813 | 348  | 
"[| x \<in> carrier G; y \<in> carrier G; z \<in> carrier G |] ==>  | 
349  | 
(y \<otimes> x = z \<otimes> x) = (y = z)"  | 
|
| 
68399
 
0b71d08528f0
resolution of name clashes in Algebra
 
paulson <lp15@cam.ac.uk> 
parents: 
68188 
diff
changeset
 | 
350  | 
by (metis inv_closed m_assoc r_inv r_one)  | 
| 13813 | 351  | 
|
352  | 
lemma (in group) inv_inv [simp]:  | 
|
353  | 
"x \<in> carrier G ==> inv (inv x) = x"  | 
|
| 13936 | 354  | 
using Units_inv_inv by simp  | 
355  | 
||
356  | 
lemma (in group) inv_inj:  | 
|
357  | 
"inj_on (m_inv G) (carrier G)"  | 
|
358  | 
using inv_inj_on_Units by simp  | 
|
| 13813 | 359  | 
|
| 
13854
 
91c9ab25fece
First distributed version of Group and Ring theory.
 
ballarin 
parents: 
13835 
diff
changeset
 | 
360  | 
lemma (in group) inv_mult_group:  | 
| 13813 | 361  | 
"[| x \<in> carrier G; y \<in> carrier G |] ==> inv (x \<otimes> y) = inv y \<otimes> inv x"  | 
362  | 
proof -  | 
|
| 14693 | 363  | 
assume G: "x \<in> carrier G" "y \<in> carrier G"  | 
| 13813 | 364  | 
then have "inv (x \<otimes> y) \<otimes> (x \<otimes> y) = (inv y \<otimes> inv x) \<otimes> (x \<otimes> y)"  | 
| 44472 | 365  | 
by (simp add: m_assoc) (simp add: m_assoc [symmetric])  | 
| 27698 | 366  | 
with G show ?thesis by (simp del: l_inv Units_l_inv)  | 
| 13813 | 367  | 
qed  | 
368  | 
||
| 13940 | 369  | 
lemma (in group) inv_comm:  | 
370  | 
"[| x \<otimes> y = \<one>; x \<in> carrier G; y \<in> carrier G |] ==> y \<otimes> x = \<one>"  | 
|
| 14693 | 371  | 
by (rule Units_inv_comm) auto  | 
| 13940 | 372  | 
|
| 13944 | 373  | 
lemma (in group) inv_equality:  | 
| 13943 | 374  | 
"[|y \<otimes> x = \<one>; x \<in> carrier G; y \<in> carrier G|] ==> inv x = y"  | 
| 
68399
 
0b71d08528f0
resolution of name clashes in Algebra
 
paulson <lp15@cam.ac.uk> 
parents: 
68188 
diff
changeset
 | 
375  | 
using inv_unique r_inv by blast  | 
| 13943 | 376  | 
|
| 57271 | 377  | 
(* Contributed by Joachim Breitner *)  | 
378  | 
lemma (in group) inv_solve_left:  | 
|
379  | 
"\<lbrakk> a \<in> carrier G; b \<in> carrier G; c \<in> carrier G \<rbrakk> \<Longrightarrow> a = inv b \<otimes> c \<longleftrightarrow> c = b \<otimes> a"  | 
|
380  | 
by (metis inv_equality l_inv_ex l_one m_assoc r_inv)  | 
|
381  | 
lemma (in group) inv_solve_right:  | 
|
382  | 
"\<lbrakk> a \<in> carrier G; b \<in> carrier G; c \<in> carrier G \<rbrakk> \<Longrightarrow> a = b \<otimes> inv c \<longleftrightarrow> b = a \<otimes> c"  | 
|
383  | 
by (metis inv_equality l_inv_ex l_one m_assoc r_inv)  | 
|
384  | 
||
| 61382 | 385  | 
text \<open>Power\<close>  | 
| 13936 | 386  | 
|
387  | 
lemma (in group) int_pow_def2:  | 
|
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
388  | 
"a [^] (z::int) = (if z < 0 then inv (a [^] (nat (-z))) else a [^] (nat z))"  | 
| 13936 | 389  | 
by (simp add: int_pow_def nat_pow_def Let_def)  | 
390  | 
||
391  | 
lemma (in group) int_pow_0 [simp]:  | 
|
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
392  | 
"x [^] (0::int) = \<one>"  | 
| 13936 | 393  | 
by (simp add: int_pow_def2)  | 
394  | 
||
395  | 
lemma (in group) int_pow_one [simp]:  | 
|
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
396  | 
"\<one> [^] (z::int) = \<one>"  | 
| 13936 | 397  | 
by (simp add: int_pow_def2)  | 
398  | 
||
| 57271 | 399  | 
(* The following are contributed by Joachim Breitner *)  | 
| 
20318
 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 
ballarin 
parents: 
19984 
diff
changeset
 | 
400  | 
|
| 57271 | 401  | 
lemma (in group) int_pow_closed [intro, simp]:  | 
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
402  | 
"x \<in> carrier G ==> x [^] (i::int) \<in> carrier G"  | 
| 57271 | 403  | 
by (simp add: int_pow_def2)  | 
404  | 
||
405  | 
lemma (in group) int_pow_1 [simp]:  | 
|
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
406  | 
"x \<in> carrier G \<Longrightarrow> x [^] (1::int) = x"  | 
| 57271 | 407  | 
by (simp add: int_pow_def2)  | 
408  | 
||
409  | 
lemma (in group) int_pow_neg:  | 
|
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
410  | 
"x \<in> carrier G \<Longrightarrow> x [^] (-i::int) = inv (x [^] i)"  | 
| 57271 | 411  | 
by (simp add: int_pow_def2)  | 
412  | 
||
413  | 
lemma (in group) int_pow_mult:  | 
|
| 68662 | 414  | 
assumes "x \<in> carrier G" shows "x [^] (i + j::int) = x [^] i \<otimes> x [^] j"  | 
| 57271 | 415  | 
proof -  | 
416  | 
have [simp]: "-i - j = -j - i" by simp  | 
|
417  | 
show ?thesis  | 
|
| 68662 | 418  | 
by (auto simp add: assms int_pow_def2 inv_solve_left inv_solve_right nat_add_distrib [symmetric] nat_pow_mult )  | 
| 57271 | 419  | 
qed  | 
420  | 
||
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
421  | 
lemma (in group) nat_pow_inv:  | 
| 68662 | 422  | 
assumes "x \<in> carrier G" shows "(inv x) [^] (i :: nat) = inv (x [^] i)"  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
423  | 
proof (induction i)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
424  | 
case 0 thus ?case by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
425  | 
next  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
426  | 
case (Suc i)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
427  | 
have "(inv x) [^] Suc i = ((inv x) [^] i) \<otimes> inv x"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
428  | 
by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
429  | 
also have " ... = (inv (x [^] i)) \<otimes> inv x"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
430  | 
by (simp add: Suc.IH Suc.prems)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
431  | 
also have " ... = inv (x \<otimes> (x [^] i))"  | 
| 68662 | 432  | 
by (simp add: assms inv_mult_group)  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
433  | 
also have " ... = inv (x [^] (Suc i))"  | 
| 68662 | 434  | 
using assms nat_pow_Suc2 by auto  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
435  | 
finally show ?case .  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
436  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
437  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
438  | 
lemma (in group) int_pow_inv:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
439  | 
"x \<in> carrier G \<Longrightarrow> (inv x) [^] (i :: int) = inv (x [^] i)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
440  | 
by (simp add: nat_pow_inv int_pow_def2)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
441  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
442  | 
lemma (in group) int_pow_pow:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
443  | 
assumes "x \<in> carrier G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
444  | 
shows "(x [^] (n :: int)) [^] (m :: int) = x [^] (n * m :: int)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
445  | 
proof (cases)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
446  | 
assume n_ge: "n \<ge> 0" thus ?thesis  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
447  | 
proof (cases)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
448  | 
assume m_ge: "m \<ge> 0" thus ?thesis  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
449  | 
using n_ge nat_pow_pow[OF assms, of "nat n" "nat m"] int_pow_def2  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
450  | 
by (simp add: mult_less_0_iff nat_mult_distrib)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
451  | 
next  | 
| 68605 | 452  | 
assume m_lt: "\<not> m \<ge> 0"  | 
453  | 
with n_ge show ?thesis  | 
|
454  | 
apply (simp add: int_pow_def2 mult_less_0_iff)  | 
|
455  | 
by (metis assms mult_minus_right n_ge nat_mult_distrib nat_pow_pow)  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
456  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
457  | 
next  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
458  | 
assume n_lt: "\<not> n \<ge> 0" thus ?thesis  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
459  | 
proof (cases)  | 
| 68605 | 460  | 
assume m_ge: "m \<ge> 0"  | 
461  | 
have "inv x [^] (nat m * nat (- n)) = inv x [^] nat (- (m * n))"  | 
|
462  | 
by (metis (full_types) m_ge mult_minus_right nat_mult_distrib)  | 
|
463  | 
with m_ge n_lt show ?thesis  | 
|
464  | 
by (simp add: int_pow_def2 mult_less_0_iff assms mult.commute nat_pow_inv nat_pow_pow)  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
465  | 
next  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
466  | 
assume m_lt: "\<not> m \<ge> 0" thus ?thesis  | 
| 68605 | 467  | 
using n_lt by (auto simp: int_pow_def2 mult_less_0_iff assms nat_mult_distrib_neg nat_pow_inv nat_pow_pow)  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
468  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
469  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
470  | 
|
| 61628 | 471  | 
lemma (in group) int_pow_diff:  | 
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
472  | 
"x \<in> carrier G \<Longrightarrow> x [^] (n - m :: int) = x [^] n \<otimes> inv (x [^] m)"  | 
| 68662 | 473  | 
by(simp only: diff_conv_add_uminus int_pow_mult int_pow_neg)  | 
| 61628 | 474  | 
|
475  | 
lemma (in group) inj_on_multc: "c \<in> carrier G \<Longrightarrow> inj_on (\<lambda>x. x \<otimes> c) (carrier G)"  | 
|
| 68662 | 476  | 
by(simp add: inj_on_def)  | 
| 61628 | 477  | 
|
478  | 
lemma (in group) inj_on_cmult: "c \<in> carrier G \<Longrightarrow> inj_on (\<lambda>x. c \<otimes> x) (carrier G)"  | 
|
| 68662 | 479  | 
by(simp add: inj_on_def)  | 
| 61628 | 480  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
481  | 
(*Following subsection contributed by Martin Baillon*)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
482  | 
subsection \<open>Submonoids\<close>  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
483  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
484  | 
locale submonoid =  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
485  | 
fixes H and G (structure)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
486  | 
assumes subset: "H \<subseteq> carrier G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
487  | 
and m_closed [intro, simp]: "\<lbrakk>x \<in> H; y \<in> H\<rbrakk> \<Longrightarrow> x \<otimes> y \<in> H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
488  | 
and one_closed [simp]: "\<one> \<in> H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
489  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
490  | 
lemma (in submonoid) is_submonoid:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
491  | 
"submonoid H G" by (rule submonoid_axioms)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
492  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
493  | 
lemma (in submonoid) mem_carrier [simp]:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
494  | 
"x \<in> H \<Longrightarrow> x \<in> carrier G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
495  | 
using subset by blast  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
496  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
497  | 
lemma (in submonoid) submonoid_is_monoid [intro]:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
498  | 
assumes "monoid G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
499  | 
shows "monoid (G\<lparr>carrier := H\<rparr>)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
500  | 
proof -  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
501  | 
interpret monoid G by fact  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
502  | 
show ?thesis  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
503  | 
by (simp add: monoid_def m_assoc)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
504  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
505  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
506  | 
lemma submonoid_nonempty:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
507  | 
  "~ submonoid {} G"
 | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
508  | 
by (blast dest: submonoid.one_closed)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
509  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
510  | 
lemma (in submonoid) finite_monoid_imp_card_positive:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
511  | 
"finite (carrier G) ==> 0 < card H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
512  | 
proof (rule classical)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
513  | 
assume "finite (carrier G)" and a: "~ 0 < card H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
514  | 
then have "finite H" by (blast intro: finite_subset [OF subset])  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
515  | 
  with is_submonoid a have "submonoid {} G" by simp
 | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
516  | 
with submonoid_nonempty show ?thesis by contradiction  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
517  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
518  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
519  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
520  | 
lemma (in monoid) monoid_incl_imp_submonoid :  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
521  | 
assumes "H \<subseteq> carrier G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
522  | 
and "monoid (G\<lparr>carrier := H\<rparr>)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
523  | 
shows "submonoid H G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
524  | 
proof (intro submonoid.intro[OF assms(1)])  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
525  | 
have ab_eq : "\<And> a b. a \<in> H \<Longrightarrow> b \<in> H \<Longrightarrow> a \<otimes>\<^bsub>G\<lparr>carrier := H\<rparr>\<^esub> b = a \<otimes> b" using assms by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
526  | 
have "\<And>a b. a \<in> H \<Longrightarrow> b \<in> H \<Longrightarrow> a \<otimes> b \<in> carrier (G\<lparr>carrier := H\<rparr>) "  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
527  | 
using assms ab_eq unfolding group_def using monoid.m_closed by fastforce  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
528  | 
thus "\<And>a b. a \<in> H \<Longrightarrow> b \<in> H \<Longrightarrow> a \<otimes> b \<in> H" by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
529  | 
show "\<one> \<in> H " using monoid.one_closed[OF assms(2)] assms by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
530  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
531  | 
|
| 68517 | 532  | 
lemma (in monoid) inv_unique':  | 
533  | 
assumes "x \<in> carrier G" "y \<in> carrier G"  | 
|
534  | 
shows "\<lbrakk> x \<otimes> y = \<one>; y \<otimes> x = \<one> \<rbrakk> \<Longrightarrow> y = inv x"  | 
|
535  | 
proof -  | 
|
536  | 
assume "x \<otimes> y = \<one>" and l_inv: "y \<otimes> x = \<one>"  | 
|
537  | 
hence unit: "x \<in> Units G"  | 
|
538  | 
using assms unfolding Units_def by auto  | 
|
539  | 
show "y = inv x"  | 
|
540  | 
using inv_unique[OF l_inv Units_r_inv[OF unit] assms Units_inv_closed[OF unit]] .  | 
|
541  | 
qed  | 
|
542  | 
||
543  | 
lemma (in monoid) m_inv_monoid_consistent: (* contributed by Paulo *)  | 
|
544  | 
assumes "x \<in> Units (G \<lparr> carrier := H \<rparr>)" and "submonoid H G"  | 
|
545  | 
shows "inv\<^bsub>(G \<lparr> carrier := H \<rparr>)\<^esub> x = inv x"  | 
|
546  | 
proof -  | 
|
547  | 
have monoid: "monoid (G \<lparr> carrier := H \<rparr>)"  | 
|
548  | 
using submonoid.submonoid_is_monoid[OF assms(2) monoid_axioms] .  | 
|
549  | 
obtain y where y: "y \<in> H" "x \<otimes> y = \<one>" "y \<otimes> x = \<one>"  | 
|
550  | 
using assms(1) unfolding Units_def by auto  | 
|
551  | 
have x: "x \<in> H" and in_carrier: "x \<in> carrier G" "y \<in> carrier G"  | 
|
552  | 
using y(1) submonoid.subset[OF assms(2)] assms(1) unfolding Units_def by auto  | 
|
553  | 
show ?thesis  | 
|
554  | 
using monoid.inv_unique'[OF monoid, of x y] x y  | 
|
555  | 
using inv_unique'[OF in_carrier y(2-3)] by auto  | 
|
556  | 
qed  | 
|
557  | 
||
| 61382 | 558  | 
subsection \<open>Subgroups\<close>  | 
| 13813 | 559  | 
|
| 19783 | 560  | 
locale subgroup =  | 
561  | 
fixes H and G (structure)  | 
|
| 14963 | 562  | 
assumes subset: "H \<subseteq> carrier G"  | 
563  | 
and m_closed [intro, simp]: "\<lbrakk>x \<in> H; y \<in> H\<rbrakk> \<Longrightarrow> x \<otimes> y \<in> H"  | 
|
| 
20318
 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 
ballarin 
parents: 
19984 
diff
changeset
 | 
564  | 
and one_closed [simp]: "\<one> \<in> H"  | 
| 14963 | 565  | 
and m_inv_closed [intro,simp]: "x \<in> H \<Longrightarrow> inv x \<in> H"  | 
| 13813 | 566  | 
|
| 
20318
 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 
ballarin 
parents: 
19984 
diff
changeset
 | 
567  | 
lemma (in subgroup) is_subgroup:  | 
| 26199 | 568  | 
"subgroup H G" by (rule subgroup_axioms)  | 
| 
20318
 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 
ballarin 
parents: 
19984 
diff
changeset
 | 
569  | 
|
| 13813 | 570  | 
declare (in subgroup) group.intro [intro]  | 
| 
13949
 
0ce528cd6f19
HOL-Algebra complete for release Isabelle2003 (modulo section headers).
 
ballarin 
parents: 
13944 
diff
changeset
 | 
571  | 
|
| 14963 | 572  | 
lemma (in subgroup) mem_carrier [simp]:  | 
573  | 
"x \<in> H \<Longrightarrow> x \<in> carrier G"  | 
|
574  | 
using subset by blast  | 
|
| 13813 | 575  | 
|
| 14963 | 576  | 
lemma (in subgroup) subgroup_is_group [intro]:  | 
| 27611 | 577  | 
assumes "group G"  | 
578  | 
shows "group (G\<lparr>carrier := H\<rparr>)"  | 
|
579  | 
proof -  | 
|
| 29237 | 580  | 
interpret group G by fact  | 
| 68458 | 581  | 
have "Group.monoid (G\<lparr>carrier := H\<rparr>)"  | 
582  | 
by (simp add: monoid_axioms submonoid.intro submonoid.submonoid_is_monoid subset)  | 
|
583  | 
then show ?thesis  | 
|
584  | 
by (rule monoid.group_l_invI) (auto intro: l_inv mem_carrier)  | 
|
| 27611 | 585  | 
qed  | 
| 13813 | 586  | 
|
| 
68555
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
587  | 
lemma subgroup_is_submonoid:  | 
| 
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
588  | 
assumes "subgroup H G" shows "submonoid H G"  | 
| 
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
589  | 
using assms by (auto intro: submonoid.intro simp add: subgroup_def)  | 
| 
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
590  | 
|
| 
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
591  | 
lemma (in group) subgroup_Units:  | 
| 
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
592  | 
assumes "subgroup H G" shows "H \<subseteq> Units (G \<lparr> carrier := H \<rparr>)"  | 
| 
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
593  | 
using group.Units[OF subgroup.subgroup_is_group[OF assms group_axioms]] by simp  | 
| 
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
594  | 
|
| 
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
595  | 
lemma (in group) m_inv_consistent:  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
596  | 
assumes "subgroup H G" "x \<in> H"  | 
| 
68555
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
597  | 
shows "inv\<^bsub>(G \<lparr> carrier := H \<rparr>)\<^esub> x = inv x"  | 
| 
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
598  | 
using assms m_inv_monoid_consistent[OF _ subgroup_is_submonoid] subgroup_Units[of H] by auto  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
599  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
600  | 
lemma (in group) int_pow_consistent: (* by Paulo *)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
601  | 
assumes "subgroup H G" "x \<in> H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
602  | 
shows "x [^] (n :: int) = x [^]\<^bsub>(G \<lparr> carrier := H \<rparr>)\<^esub> n"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
603  | 
proof (cases)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
604  | 
assume ge: "n \<ge> 0"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
605  | 
hence "x [^] n = x [^] (nat n)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
606  | 
using int_pow_def2 by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
607  | 
also have " ... = x [^]\<^bsub>(G \<lparr> carrier := H \<rparr>)\<^esub> (nat n)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
608  | 
using nat_pow_consistent by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
609  | 
also have " ... = x [^]\<^bsub>(G \<lparr> carrier := H \<rparr>)\<^esub> n"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
610  | 
using group.int_pow_def2[OF subgroup.subgroup_is_group[OF assms(1) is_group]] ge by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
611  | 
finally show ?thesis .  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
612  | 
next  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
613  | 
assume "\<not> n \<ge> 0" hence lt: "n < 0" by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
614  | 
hence "x [^] n = inv (x [^] (nat (- n)))"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
615  | 
using int_pow_def2 by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
616  | 
also have " ... = (inv x) [^] (nat (- n))"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
617  | 
by (metis assms nat_pow_inv subgroup.mem_carrier)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
618  | 
also have " ... = (inv\<^bsub>(G \<lparr> carrier := H \<rparr>)\<^esub> x) [^]\<^bsub>(G \<lparr> carrier := H \<rparr>)\<^esub> (nat (- n))"  | 
| 
68555
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
619  | 
using m_inv_consistent[OF assms] nat_pow_consistent by auto  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
620  | 
also have " ... = inv\<^bsub>(G \<lparr> carrier := H \<rparr>)\<^esub> (x [^]\<^bsub>(G \<lparr> carrier := H \<rparr>)\<^esub> (nat (- n)))"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
621  | 
using group.nat_pow_inv[OF subgroup.subgroup_is_group[OF assms(1) is_group]] assms(2) by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
622  | 
also have " ... = x [^]\<^bsub>(G \<lparr> carrier := H \<rparr>)\<^esub> n"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
623  | 
using group.int_pow_def2[OF subgroup.subgroup_is_group[OF assms(1) is_group]] lt by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
624  | 
finally show ?thesis .  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
625  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
626  | 
|
| 61382 | 627  | 
text \<open>  | 
| 69597 | 628  | 
Since \<^term>\<open>H\<close> is nonempty, it contains some element \<^term>\<open>x\<close>. Since  | 
| 63167 | 629  | 
it is closed under inverse, it contains \<open>inv x\<close>. Since  | 
630  | 
it is closed under product, it contains \<open>x \<otimes> inv x = \<one>\<close>.  | 
|
| 61382 | 631  | 
\<close>  | 
| 13813 | 632  | 
|
633  | 
lemma (in group) one_in_subset:  | 
|
634  | 
  "[| H \<subseteq> carrier G; H \<noteq> {}; \<forall>a \<in> H. inv a \<in> H; \<forall>a\<in>H. \<forall>b\<in>H. a \<otimes> b \<in> H |]
 | 
|
635  | 
==> \<one> \<in> H"  | 
|
| 44472 | 636  | 
by force  | 
| 13813 | 637  | 
|
| 61382 | 638  | 
text \<open>A characterization of subgroups: closed, non-empty subset.\<close>  | 
| 13813 | 639  | 
|
640  | 
lemma (in group) subgroupI:  | 
|
641  | 
  assumes subset: "H \<subseteq> carrier G" and non_empty: "H \<noteq> {}"
 | 
|
| 14963 | 642  | 
and inv: "!!a. a \<in> H \<Longrightarrow> inv a \<in> H"  | 
643  | 
and mult: "!!a b. \<lbrakk>a \<in> H; b \<in> H\<rbrakk> \<Longrightarrow> a \<otimes> b \<in> H"  | 
|
| 13813 | 644  | 
shows "subgroup H G"  | 
| 
27714
 
27b4d7c01f8b
Tuned (for the sake of a meaningless log entry).
 
ballarin 
parents: 
27713 
diff
changeset
 | 
645  | 
proof (simp add: subgroup_def assms)  | 
| 
 
27b4d7c01f8b
Tuned (for the sake of a meaningless log entry).
 
ballarin 
parents: 
27713 
diff
changeset
 | 
646  | 
show "\<one> \<in> H" by (rule one_in_subset) (auto simp only: assms)  | 
| 13813 | 647  | 
qed  | 
648  | 
||
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
649  | 
lemma (in group) subgroupE:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
650  | 
assumes "subgroup H G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
651  | 
shows "H \<subseteq> carrier G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
652  | 
    and "H \<noteq> {}"
 | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
653  | 
and "\<And>a. a \<in> H \<Longrightarrow> inv a \<in> H"  | 
| 68517 | 654  | 
and "\<And>a b. \<lbrakk> a \<in> H; b \<in> H \<rbrakk> \<Longrightarrow> a \<otimes> b \<in> H"  | 
655  | 
using assms unfolding subgroup_def[of H G] by auto  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
656  | 
|
| 13936 | 657  | 
declare monoid.one_closed [iff] group.inv_closed [simp]  | 
658  | 
monoid.l_one [simp] monoid.r_one [simp] group.inv_inv [simp]  | 
|
| 13813 | 659  | 
|
660  | 
lemma subgroup_nonempty:  | 
|
| 67091 | 661  | 
  "\<not> subgroup {} G"
 | 
| 13813 | 662  | 
by (blast dest: subgroup.one_closed)  | 
663  | 
||
| 68517 | 664  | 
lemma (in subgroup) finite_imp_card_positive: "finite (carrier G) \<Longrightarrow> 0 < card H"  | 
665  | 
using subset one_closed card_gt_0_iff finite_subset by blast  | 
|
| 13813 | 666  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
667  | 
(*Following 3 lemmas contributed by Martin Baillon*)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
668  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
669  | 
lemma (in subgroup) subgroup_is_submonoid :  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
670  | 
"submonoid H G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
671  | 
by (simp add: submonoid.intro subset)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
672  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
673  | 
lemma (in group) submonoid_subgroupI :  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
674  | 
assumes "submonoid H G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
675  | 
and "\<And>a. a \<in> H \<Longrightarrow> inv a \<in> H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
676  | 
shows "subgroup H G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
677  | 
by (metis assms subgroup_def submonoid_def)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
678  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
679  | 
lemma (in group) group_incl_imp_subgroup:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
680  | 
assumes "H \<subseteq> carrier G"  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
681  | 
and "group (G\<lparr>carrier := H\<rparr>)"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
682  | 
shows "subgroup H G"  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
683  | 
proof (intro submonoid_subgroupI[OF monoid_incl_imp_submonoid[OF assms(1)]])  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
684  | 
show "monoid (G\<lparr>carrier := H\<rparr>)" using group_def assms by blast  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
685  | 
have ab_eq : "\<And> a b. a \<in> H \<Longrightarrow> b \<in> H \<Longrightarrow> a \<otimes>\<^bsub>G\<lparr>carrier := H\<rparr>\<^esub> b = a \<otimes> b" using assms by simp  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
686  | 
fix a assume aH : "a \<in> H"  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
687  | 
have " inv\<^bsub>G\<lparr>carrier := H\<rparr>\<^esub> a \<in> carrier G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
688  | 
using assms aH group.inv_closed[OF assms(2)] by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
689  | 
moreover have "\<one>\<^bsub>G\<lparr>carrier := H\<rparr>\<^esub> = \<one>" using assms monoid.one_closed ab_eq one_def by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
690  | 
hence "a \<otimes>\<^bsub>G\<lparr>carrier := H\<rparr>\<^esub> inv\<^bsub>G\<lparr>carrier := H\<rparr>\<^esub> a= \<one>"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
691  | 
using assms ab_eq aH group.r_inv[OF assms(2)] by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
692  | 
hence "a \<otimes> inv\<^bsub>G\<lparr>carrier := H\<rparr>\<^esub> a= \<one>"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
693  | 
using aH assms group.inv_closed[OF assms(2)] ab_eq by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
694  | 
ultimately have "inv\<^bsub>G\<lparr>carrier := H\<rparr>\<^esub> a = inv a"  | 
| 68605 | 695  | 
by (metis aH assms(1) contra_subsetD group.inv_inv is_group local.inv_equality)  | 
696  | 
moreover have "inv\<^bsub>G\<lparr>carrier := H\<rparr>\<^esub> a \<in> H"  | 
|
697  | 
using aH group.inv_closed[OF assms(2)] by auto  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
698  | 
ultimately show "inv a \<in> H" by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
699  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
700  | 
|
| 13936 | 701  | 
|
| 61382 | 702  | 
subsection \<open>Direct Products\<close>  | 
| 13813 | 703  | 
|
| 
35848
 
5443079512ea
slightly more uniform definitions -- eliminated old-style meta-equality;
 
wenzelm 
parents: 
35847 
diff
changeset
 | 
704  | 
definition  | 
| 
 
5443079512ea
slightly more uniform definitions -- eliminated old-style meta-equality;
 
wenzelm 
parents: 
35847 
diff
changeset
 | 
705  | 
  DirProd :: "_ \<Rightarrow> _ \<Rightarrow> ('a \<times> 'b) monoid" (infixr "\<times>\<times>" 80) where
 | 
| 
 
5443079512ea
slightly more uniform definitions -- eliminated old-style meta-equality;
 
wenzelm 
parents: 
35847 
diff
changeset
 | 
706  | 
"G \<times>\<times> H =  | 
| 
 
5443079512ea
slightly more uniform definitions -- eliminated old-style meta-equality;
 
wenzelm 
parents: 
35847 
diff
changeset
 | 
707  | 
\<lparr>carrier = carrier G \<times> carrier H,  | 
| 
 
5443079512ea
slightly more uniform definitions -- eliminated old-style meta-equality;
 
wenzelm 
parents: 
35847 
diff
changeset
 | 
708  | 
mult = (\<lambda>(g, h) (g', h'). (g \<otimes>\<^bsub>G\<^esub> g', h \<otimes>\<^bsub>H\<^esub> h')),  | 
| 
 
5443079512ea
slightly more uniform definitions -- eliminated old-style meta-equality;
 
wenzelm 
parents: 
35847 
diff
changeset
 | 
709  | 
one = (\<one>\<^bsub>G\<^esub>, \<one>\<^bsub>H\<^esub>)\<rparr>"  | 
| 13813 | 710  | 
|
| 14963 | 711  | 
lemma DirProd_monoid:  | 
| 27611 | 712  | 
assumes "monoid G" and "monoid H"  | 
| 14963 | 713  | 
shows "monoid (G \<times>\<times> H)"  | 
714  | 
proof -  | 
|
| 
30729
 
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
 
wenzelm 
parents: 
29240 
diff
changeset
 | 
715  | 
interpret G: monoid G by fact  | 
| 
 
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
 
wenzelm 
parents: 
29240 
diff
changeset
 | 
716  | 
interpret H: monoid H by fact  | 
| 
27714
 
27b4d7c01f8b
Tuned (for the sake of a meaningless log entry).
 
ballarin 
parents: 
27713 
diff
changeset
 | 
717  | 
from assms  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
718  | 
show ?thesis by (unfold monoid_def DirProd_def, auto)  | 
| 14963 | 719  | 
qed  | 
| 13813 | 720  | 
|
721  | 
||
| 61382 | 722  | 
text\<open>Does not use the previous result because it's easier just to use auto.\<close>  | 
| 14963 | 723  | 
lemma DirProd_group:  | 
| 27611 | 724  | 
assumes "group G" and "group H"  | 
| 14963 | 725  | 
shows "group (G \<times>\<times> H)"  | 
| 27611 | 726  | 
proof -  | 
| 
30729
 
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
 
wenzelm 
parents: 
29240 
diff
changeset
 | 
727  | 
interpret G: group G by fact  | 
| 
 
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
 
wenzelm 
parents: 
29240 
diff
changeset
 | 
728  | 
interpret H: group H by fact  | 
| 27611 | 729  | 
show ?thesis by (rule groupI)  | 
| 14963 | 730  | 
(auto intro: G.m_assoc H.m_assoc G.l_inv H.l_inv  | 
731  | 
simp add: DirProd_def)  | 
|
| 27611 | 732  | 
qed  | 
| 13813 | 733  | 
|
| 68662 | 734  | 
lemma carrier_DirProd [simp]: "carrier (G \<times>\<times> H) = carrier G \<times> carrier H"  | 
| 14963 | 735  | 
by (simp add: DirProd_def)  | 
| 13944 | 736  | 
|
| 68662 | 737  | 
lemma one_DirProd [simp]: "\<one>\<^bsub>G \<times>\<times> H\<^esub> = (\<one>\<^bsub>G\<^esub>, \<one>\<^bsub>H\<^esub>)"  | 
| 14963 | 738  | 
by (simp add: DirProd_def)  | 
| 13944 | 739  | 
|
| 68662 | 740  | 
lemma mult_DirProd [simp]: "(g, h) \<otimes>\<^bsub>(G \<times>\<times> H)\<^esub> (g', h') = (g \<otimes>\<^bsub>G\<^esub> g', h \<otimes>\<^bsub>H\<^esub> h')"  | 
| 14963 | 741  | 
by (simp add: DirProd_def)  | 
| 13944 | 742  | 
|
| 68662 | 743  | 
lemma DirProd_assoc: "(G \<times>\<times> H \<times>\<times> I) = (G \<times>\<times> (H \<times>\<times> I))"  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
744  | 
by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
745  | 
|
| 14963 | 746  | 
lemma inv_DirProd [simp]:  | 
| 27611 | 747  | 
assumes "group G" and "group H"  | 
| 13944 | 748  | 
assumes g: "g \<in> carrier G"  | 
749  | 
and h: "h \<in> carrier H"  | 
|
| 14963 | 750  | 
shows "m_inv (G \<times>\<times> H) (g, h) = (inv\<^bsub>G\<^esub> g, inv\<^bsub>H\<^esub> h)"  | 
| 27611 | 751  | 
proof -  | 
| 
30729
 
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
 
wenzelm 
parents: 
29240 
diff
changeset
 | 
752  | 
interpret G: group G by fact  | 
| 
 
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
 
wenzelm 
parents: 
29240 
diff
changeset
 | 
753  | 
interpret H: group H by fact  | 
| 
 
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
 
wenzelm 
parents: 
29240 
diff
changeset
 | 
754  | 
interpret Prod: group "G \<times>\<times> H"  | 
| 
27714
 
27b4d7c01f8b
Tuned (for the sake of a meaningless log entry).
 
ballarin 
parents: 
27713 
diff
changeset
 | 
755  | 
by (auto intro: DirProd_group group.intro group.axioms assms)  | 
| 14963 | 756  | 
show ?thesis by (simp add: Prod.inv_equality g h)  | 
757  | 
qed  | 
|
| 27698 | 758  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
759  | 
lemma DirProd_subgroups :  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
760  | 
assumes "group G"  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
761  | 
and "subgroup H G"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
762  | 
and "group K"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
763  | 
and "subgroup I K"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
764  | 
shows "subgroup (H \<times> I) (G \<times>\<times> K)"  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
765  | 
proof (intro group.group_incl_imp_subgroup[OF DirProd_group[OF assms(1)assms(3)]])  | 
| 68687 | 766  | 
have "H \<subseteq> carrier G" "I \<subseteq> carrier K" using subgroup.subset assms by blast+  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
767  | 
thus "(H \<times> I) \<subseteq> carrier (G \<times>\<times> K)" unfolding DirProd_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
768  | 
have "Group.group ((G\<lparr>carrier := H\<rparr>) \<times>\<times> (K\<lparr>carrier := I\<rparr>))"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
769  | 
using DirProd_group[OF subgroup.subgroup_is_group[OF assms(2)assms(1)]  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
770  | 
subgroup.subgroup_is_group[OF assms(4)assms(3)]].  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
771  | 
moreover have "((G\<lparr>carrier := H\<rparr>) \<times>\<times> (K\<lparr>carrier := I\<rparr>)) = ((G \<times>\<times> K)\<lparr>carrier := H \<times> I\<rparr>)"  | 
| 68687 | 772  | 
unfolding DirProd_def using assms by simp  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
773  | 
ultimately show "Group.group ((G \<times>\<times> K)\<lparr>carrier := H \<times> I\<rparr>)" by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
774  | 
qed  | 
| 14963 | 775  | 
|
| 61382 | 776  | 
subsection \<open>Homomorphisms and Isomorphisms\<close>  | 
| 13813 | 777  | 
|
| 35847 | 778  | 
definition  | 
779  | 
  hom :: "_ => _ => ('a => 'b) set" where
 | 
|
| 
35848
 
5443079512ea
slightly more uniform definitions -- eliminated old-style meta-equality;
 
wenzelm 
parents: 
35847 
diff
changeset
 | 
780  | 
"hom G H =  | 
| 67091 | 781  | 
    {h. h \<in> carrier G \<rightarrow> carrier H \<and>
 | 
| 14693 | 782  | 
(\<forall>x \<in> carrier G. \<forall>y \<in> carrier G. h (x \<otimes>\<^bsub>G\<^esub> y) = h x \<otimes>\<^bsub>H\<^esub> h y)}"  | 
| 13813 | 783  | 
|
| 
69700
 
7a92cbec7030
new material about summations and powers, along with some tweaks
 
paulson <lp15@cam.ac.uk> 
parents: 
69597 
diff
changeset
 | 
784  | 
lemma hom_compose:  | 
| 
69122
 
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68687 
diff
changeset
 | 
785  | 
"\<lbrakk> f \<in> hom G H; g \<in> hom H I \<rbrakk> \<Longrightarrow> g \<circ> f \<in> hom G I"  | 
| 
 
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68687 
diff
changeset
 | 
786  | 
unfolding hom_def by (auto simp add: Pi_iff)  | 
| 
 
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68687 
diff
changeset
 | 
787  | 
|
| 
 
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68687 
diff
changeset
 | 
788  | 
lemma (in group) hom_restrict:  | 
| 
 
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68687 
diff
changeset
 | 
789  | 
assumes "h \<in> hom G H" and "\<And>g. g \<in> carrier G \<Longrightarrow> h g = t g" shows "t \<in> hom G H"  | 
| 
 
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68687 
diff
changeset
 | 
790  | 
using assms unfolding hom_def by (auto simp add: Pi_iff)  | 
| 
 
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68687 
diff
changeset
 | 
791  | 
|
| 14761 | 792  | 
lemma (in group) hom_compose:  | 
| 31754 | 793  | 
"[|h \<in> hom G H; i \<in> hom H I|] ==> compose (carrier G) i h \<in> hom G I"  | 
| 
44890
 
22f665a2e91c
new fastforce replacing fastsimp - less confusing name
 
nipkow 
parents: 
44655 
diff
changeset
 | 
794  | 
by (fastforce simp add: hom_def compose_def)  | 
| 13943 | 795  | 
|
| 
35848
 
5443079512ea
slightly more uniform definitions -- eliminated old-style meta-equality;
 
wenzelm 
parents: 
35847 
diff
changeset
 | 
796  | 
definition  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
797  | 
  iso :: "_ => _ => ('a => 'b) set"
 | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
798  | 
  where "iso G H = {h. h \<in> hom G H \<and> bij_betw h (carrier G) (carrier H)}"
 | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
799  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
800  | 
definition  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
801  | 
is_iso :: "_ \<Rightarrow> _ \<Rightarrow> bool" (infixr "\<cong>" 60)  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
802  | 
  where "G \<cong> H = (iso G H  \<noteq> {})"
 | 
| 14761 | 803  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
804  | 
lemma iso_set_refl: "(\<lambda>x. x) \<in> iso G G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
805  | 
by (simp add: iso_def hom_def inj_on_def bij_betw_def Pi_def)  | 
| 14761 | 806  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
807  | 
corollary iso_refl : "G \<cong> G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
808  | 
using iso_set_refl unfolding is_iso_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
809  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
810  | 
lemma (in group) iso_set_sym:  | 
| 68458 | 811  | 
assumes "h \<in> iso G H"  | 
812  | 
shows "inv_into (carrier G) h \<in> iso H G"  | 
|
813  | 
proof -  | 
|
814  | 
have h: "h \<in> hom G H" "bij_betw h (carrier G) (carrier H)"  | 
|
815  | 
using assms by (auto simp add: iso_def bij_betw_inv_into)  | 
|
816  | 
then have HG: "bij_betw (inv_into (carrier G) h) (carrier H) (carrier G)"  | 
|
817  | 
by (simp add: bij_betw_inv_into)  | 
|
818  | 
have "inv_into (carrier G) h \<in> hom H G"  | 
|
819  | 
unfolding hom_def  | 
|
820  | 
proof safe  | 
|
821  | 
show *: "\<And>x. x \<in> carrier H \<Longrightarrow> inv_into (carrier G) h x \<in> carrier G"  | 
|
822  | 
by (meson HG bij_betwE)  | 
|
823  | 
show "inv_into (carrier G) h (x \<otimes>\<^bsub>H\<^esub> y) = inv_into (carrier G) h x \<otimes> inv_into (carrier G) h y"  | 
|
824  | 
if "x \<in> carrier H" "y \<in> carrier H" for x y  | 
|
825  | 
proof (rule inv_into_f_eq)  | 
|
826  | 
show "inj_on h (carrier G)"  | 
|
827  | 
using bij_betw_def h(2) by blast  | 
|
828  | 
show "inv_into (carrier G) h x \<otimes> inv_into (carrier G) h y \<in> carrier G"  | 
|
829  | 
by (simp add: * that)  | 
|
830  | 
show "h (inv_into (carrier G) h x \<otimes> inv_into (carrier G) h y) = x \<otimes>\<^bsub>H\<^esub> y"  | 
|
831  | 
using h bij_betw_inv_into_right [of h] unfolding hom_def by (simp add: "*" that)  | 
|
832  | 
qed  | 
|
833  | 
qed  | 
|
834  | 
then show ?thesis  | 
|
835  | 
by (simp add: Group.iso_def bij_betw_inv_into h)  | 
|
836  | 
qed  | 
|
| 14761 | 837  | 
|
| 68458 | 838  | 
|
839  | 
corollary (in group) iso_sym: "G \<cong> H \<Longrightarrow> H \<cong> G"  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
840  | 
using iso_set_sym unfolding is_iso_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
841  | 
|
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
842  | 
lemma (in group) iso_set_trans:  | 
| 68662 | 843  | 
"[|h \<in> iso G H; i \<in> iso H I|] ==> (compose (carrier G) i h) \<in> iso G I"  | 
844  | 
by (auto simp add: iso_def hom_compose bij_betw_compose)  | 
|
| 14761 | 845  | 
|
| 68458 | 846  | 
corollary (in group) iso_trans: "\<lbrakk>G \<cong> H ; H \<cong> I\<rbrakk> \<Longrightarrow> G \<cong> I"  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
847  | 
using iso_set_trans unfolding is_iso_def by blast  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
848  | 
|
| 
69122
 
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68687 
diff
changeset
 | 
849  | 
(* NEW ====================================================================== *)  | 
| 
 
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68687 
diff
changeset
 | 
850  | 
lemma iso_same_card: "G \<cong> H \<Longrightarrow> card (carrier G) = card (carrier H)"  | 
| 
 
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68687 
diff
changeset
 | 
851  | 
using bij_betw_same_card unfolding is_iso_def iso_def by auto  | 
| 
 
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68687 
diff
changeset
 | 
852  | 
(* ========================================================================== *)  | 
| 
 
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68687 
diff
changeset
 | 
853  | 
|
| 
 
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68687 
diff
changeset
 | 
854  | 
|
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
855  | 
(* Next four lemmas contributed by Paulo. *)  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
856  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
857  | 
lemma (in monoid) hom_imp_img_monoid:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
858  | 
assumes "h \<in> hom G H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
859  | 
shows "monoid (H \<lparr> carrier := h ` (carrier G), one := h \<one>\<^bsub>G\<^esub> \<rparr>)" (is "monoid ?h_img")  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
860  | 
proof (rule monoidI)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
861  | 
show "\<one>\<^bsub>?h_img\<^esub> \<in> carrier ?h_img"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
862  | 
by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
863  | 
next  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
864  | 
fix x y z assume "x \<in> carrier ?h_img" "y \<in> carrier ?h_img" "z \<in> carrier ?h_img"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
865  | 
then obtain g1 g2 g3  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
866  | 
where g1: "g1 \<in> carrier G" "x = h g1"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
867  | 
and g2: "g2 \<in> carrier G" "y = h g2"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
868  | 
and g3: "g3 \<in> carrier G" "z = h g3"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
869  | 
using image_iff[where ?f = h and ?A = "carrier G"] by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
870  | 
have aux_lemma:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
871  | 
"\<And>a b. \<lbrakk> a \<in> carrier G; b \<in> carrier G \<rbrakk> \<Longrightarrow> h a \<otimes>\<^bsub>(?h_img)\<^esub> h b = h (a \<otimes> b)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
872  | 
using assms unfolding hom_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
873  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
874  | 
show "x \<otimes>\<^bsub>(?h_img)\<^esub> \<one>\<^bsub>(?h_img)\<^esub> = x"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
875  | 
using aux_lemma[OF g1(1) one_closed] g1(2) r_one[OF g1(1)] by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
876  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
877  | 
show "\<one>\<^bsub>(?h_img)\<^esub> \<otimes>\<^bsub>(?h_img)\<^esub> x = x"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
878  | 
using aux_lemma[OF one_closed g1(1)] g1(2) l_one[OF g1(1)] by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
879  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
880  | 
have "x \<otimes>\<^bsub>(?h_img)\<^esub> y = h (g1 \<otimes> g2)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
881  | 
using aux_lemma g1 g2 by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
882  | 
thus "x \<otimes>\<^bsub>(?h_img)\<^esub> y \<in> carrier ?h_img"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
883  | 
using g1(1) g2(1) by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
884  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
885  | 
have "(x \<otimes>\<^bsub>(?h_img)\<^esub> y) \<otimes>\<^bsub>(?h_img)\<^esub> z = h ((g1 \<otimes> g2) \<otimes> g3)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
886  | 
using aux_lemma g1 g2 g3 by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
887  | 
also have " ... = h (g1 \<otimes> (g2 \<otimes> g3))"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
888  | 
using m_assoc[OF g1(1) g2(1) g3(1)] by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
889  | 
also have " ... = x \<otimes>\<^bsub>(?h_img)\<^esub> (y \<otimes>\<^bsub>(?h_img)\<^esub> z)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
890  | 
using aux_lemma g1 g2 g3 by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
891  | 
finally show "(x \<otimes>\<^bsub>(?h_img)\<^esub> y) \<otimes>\<^bsub>(?h_img)\<^esub> z = x \<otimes>\<^bsub>(?h_img)\<^esub> (y \<otimes>\<^bsub>(?h_img)\<^esub> z)" .  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
892  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
893  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
894  | 
lemma (in group) hom_imp_img_group:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
895  | 
assumes "h \<in> hom G H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
896  | 
shows "group (H \<lparr> carrier := h ` (carrier G), one := h \<one>\<^bsub>G\<^esub> \<rparr>)" (is "group ?h_img")  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
897  | 
proof -  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
898  | 
interpret monoid ?h_img  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
899  | 
using hom_imp_img_monoid[OF assms] .  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
900  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
901  | 
show ?thesis  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
902  | 
proof (unfold_locales)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
903  | 
show "carrier ?h_img \<subseteq> Units ?h_img"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
904  | 
proof (auto simp add: Units_def)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
905  | 
have aux_lemma:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
906  | 
"\<And>g1 g2. \<lbrakk> g1 \<in> carrier G; g2 \<in> carrier G \<rbrakk> \<Longrightarrow> h g1 \<otimes>\<^bsub>H\<^esub> h g2 = h (g1 \<otimes> g2)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
907  | 
using assms unfolding hom_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
908  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
909  | 
fix g1 assume g1: "g1 \<in> carrier G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
910  | 
thus "\<exists>g2 \<in> carrier G. (h g2) \<otimes>\<^bsub>H\<^esub> (h g1) = h \<one> \<and> (h g1) \<otimes>\<^bsub>H\<^esub> (h g2) = h \<one>"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
911  | 
using aux_lemma[OF g1 inv_closed[OF g1]]  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
912  | 
aux_lemma[OF inv_closed[OF g1] g1]  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
913  | 
inv_closed by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
914  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
915  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
916  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
917  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
918  | 
lemma (in group) iso_imp_group:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
919  | 
assumes "G \<cong> H" and "monoid H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
920  | 
shows "group H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
921  | 
proof -  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
922  | 
obtain \<phi> where phi: "\<phi> \<in> iso G H" "inv_into (carrier G) \<phi> \<in> iso H G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
923  | 
using iso_set_sym assms unfolding is_iso_def by blast  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
924  | 
define \<psi> where psi_def: "\<psi> = inv_into (carrier G) \<phi>"  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
925  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
926  | 
have surj: "\<phi> ` (carrier G) = (carrier H)" "\<psi> ` (carrier H) = (carrier G)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
927  | 
and inj: "inj_on \<phi> (carrier G)" "inj_on \<psi> (carrier H)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
928  | 
and phi_hom: "\<And>g1 g2. \<lbrakk> g1 \<in> carrier G; g2 \<in> carrier G \<rbrakk> \<Longrightarrow> \<phi> (g1 \<otimes> g2) = (\<phi> g1) \<otimes>\<^bsub>H\<^esub> (\<phi> g2)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
929  | 
and psi_hom: "\<And>h1 h2. \<lbrakk> h1 \<in> carrier H; h2 \<in> carrier H \<rbrakk> \<Longrightarrow> \<psi> (h1 \<otimes>\<^bsub>H\<^esub> h2) = (\<psi> h1) \<otimes> (\<psi> h2)"  | 
| 68662 | 930  | 
using phi psi_def unfolding iso_def bij_betw_def hom_def by auto  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
931  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
932  | 
have phi_one: "\<phi> \<one> = \<one>\<^bsub>H\<^esub>"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
933  | 
proof -  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
934  | 
have "(\<phi> \<one>) \<otimes>\<^bsub>H\<^esub> \<one>\<^bsub>H\<^esub> = (\<phi> \<one>) \<otimes>\<^bsub>H\<^esub> (\<phi> \<one>)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
935  | 
by (metis assms(2) image_eqI monoid.r_one one_closed phi_hom r_one surj(1))  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
936  | 
thus ?thesis  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
937  | 
by (metis (no_types, hide_lams) Units_eq Units_one_closed assms(2) f_inv_into_f imageI  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
938  | 
monoid.l_one monoid.one_closed phi_hom psi_def r_one surj)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
939  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
940  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
941  | 
have "carrier H \<subseteq> Units H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
942  | 
proof  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
943  | 
fix h assume h: "h \<in> carrier H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
944  | 
let ?inv_h = "\<phi> (inv (\<psi> h))"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
945  | 
have "h \<otimes>\<^bsub>H\<^esub> ?inv_h = \<phi> (\<psi> h) \<otimes>\<^bsub>H\<^esub> ?inv_h"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
946  | 
by (simp add: f_inv_into_f h psi_def surj(1))  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
947  | 
also have " ... = \<phi> ((\<psi> h) \<otimes> inv (\<psi> h))"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
948  | 
by (metis h imageI inv_closed phi_hom surj(2))  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
949  | 
also have " ... = \<phi> \<one>"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
950  | 
by (simp add: h inv_into_into psi_def surj(1))  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
951  | 
finally have 1: "h \<otimes>\<^bsub>H\<^esub> ?inv_h = \<one>\<^bsub>H\<^esub>"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
952  | 
using phi_one by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
953  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
954  | 
have "?inv_h \<otimes>\<^bsub>H\<^esub> h = ?inv_h \<otimes>\<^bsub>H\<^esub> \<phi> (\<psi> h)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
955  | 
by (simp add: f_inv_into_f h psi_def surj(1))  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
956  | 
also have " ... = \<phi> (inv (\<psi> h) \<otimes> (\<psi> h))"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
957  | 
by (metis h imageI inv_closed phi_hom surj(2))  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
958  | 
also have " ... = \<phi> \<one>"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
959  | 
by (simp add: h inv_into_into psi_def surj(1))  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
960  | 
finally have 2: "?inv_h \<otimes>\<^bsub>H\<^esub> h = \<one>\<^bsub>H\<^esub>"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
961  | 
using phi_one by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
962  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
963  | 
thus "h \<in> Units H" unfolding Units_def using 1 2 h surj by fastforce  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
964  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
965  | 
thus ?thesis unfolding group_def group_axioms_def using assms(2) by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
966  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
967  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
968  | 
corollary (in group) iso_imp_img_group:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
969  | 
assumes "h \<in> iso G H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
970  | 
shows "group (H \<lparr> one := h \<one> \<rparr>)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
971  | 
proof -  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
972  | 
let ?h_img = "H \<lparr> carrier := h ` (carrier G), one := h \<one> \<rparr>"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
973  | 
have "h \<in> iso G ?h_img"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
974  | 
using assms unfolding iso_def hom_def bij_betw_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
975  | 
hence "G \<cong> ?h_img"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
976  | 
unfolding is_iso_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
977  | 
hence "group ?h_img"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
978  | 
using iso_imp_group[of ?h_img] hom_imp_img_monoid[of h H] assms unfolding iso_def by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
979  | 
moreover have "carrier H = carrier ?h_img"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
980  | 
using assms unfolding iso_def bij_betw_def by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
981  | 
hence "H \<lparr> one := h \<one> \<rparr> = ?h_img"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
982  | 
by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
983  | 
ultimately show ?thesis by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
984  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
985  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
986  | 
lemma DirProd_commute_iso_set:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
987  | 
shows "(\<lambda>(x,y). (y,x)) \<in> iso (G \<times>\<times> H) (H \<times>\<times> G)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
988  | 
by (auto simp add: iso_def hom_def inj_on_def bij_betw_def)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
989  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
990  | 
corollary DirProd_commute_iso :  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
991  | 
"(G \<times>\<times> H) \<cong> (H \<times>\<times> G)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
992  | 
using DirProd_commute_iso_set unfolding is_iso_def by blast  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
993  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
994  | 
lemma DirProd_assoc_iso_set:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
995  | 
shows "(\<lambda>(x,y,z). (x,(y,z))) \<in> iso (G \<times>\<times> H \<times>\<times> I) (G \<times>\<times> (H \<times>\<times> I))"  | 
| 31754 | 996  | 
by (auto simp add: iso_def hom_def inj_on_def bij_betw_def)  | 
| 14761 | 997  | 
|
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
998  | 
lemma (in group) DirProd_iso_set_trans:  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
999  | 
assumes "g \<in> iso G G2"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1000  | 
and "h \<in> iso H I"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1001  | 
shows "(\<lambda>(x,y). (g x, h y)) \<in> iso (G \<times>\<times> H) (G2 \<times>\<times> I)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1002  | 
proof-  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1003  | 
have "(\<lambda>(x,y). (g x, h y)) \<in> hom (G \<times>\<times> H) (G2 \<times>\<times> I)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1004  | 
using assms unfolding iso_def hom_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1005  | 
moreover have " inj_on (\<lambda>(x,y). (g x, h y)) (carrier (G \<times>\<times> H))"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1006  | 
using assms unfolding iso_def DirProd_def bij_betw_def inj_on_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1007  | 
moreover have "(\<lambda>(x, y). (g x, h y)) ` carrier (G \<times>\<times> H) = carrier (G2 \<times>\<times> I)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1008  | 
using assms unfolding iso_def bij_betw_def image_def DirProd_def by fastforce  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1009  | 
ultimately show "(\<lambda>(x,y). (g x, h y)) \<in> iso (G \<times>\<times> H) (G2 \<times>\<times> I)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1010  | 
unfolding iso_def bij_betw_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1011  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1012  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1013  | 
corollary (in group) DirProd_iso_trans :  | 
| 68662 | 1014  | 
assumes "G \<cong> G2" and "H \<cong> I"  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1015  | 
shows "G \<times>\<times> H \<cong> G2 \<times>\<times> I"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1016  | 
using DirProd_iso_set_trans assms unfolding is_iso_def by blast  | 
| 14761 | 1017  | 
|
1018  | 
||
| 69597 | 1019  | 
text\<open>Basis for homomorphism proofs: we assume two groups \<^term>\<open>G\<close> and  | 
1020  | 
\<^term>\<open>H\<close>, with a homomorphism \<^term>\<open>h\<close> between them\<close>  | 
|
| 
61565
 
352c73a689da
Qualifiers in locale expressions default to mandatory regardless of the command.
 
ballarin 
parents: 
61384 
diff
changeset
 | 
1021  | 
locale group_hom = G?: group G + H?: group H for G (structure) and H (structure) +  | 
| 29237 | 1022  | 
fixes h  | 
| 13813 | 1023  | 
assumes homh: "h \<in> hom G H"  | 
| 29240 | 1024  | 
|
1025  | 
lemma (in group_hom) hom_mult [simp]:  | 
|
1026  | 
"[| x \<in> carrier G; y \<in> carrier G |] ==> h (x \<otimes>\<^bsub>G\<^esub> y) = h x \<otimes>\<^bsub>H\<^esub> h y"  | 
|
1027  | 
proof -  | 
|
1028  | 
assume "x \<in> carrier G" "y \<in> carrier G"  | 
|
1029  | 
with homh [unfolded hom_def] show ?thesis by simp  | 
|
1030  | 
qed  | 
|
1031  | 
||
1032  | 
lemma (in group_hom) hom_closed [simp]:  | 
|
1033  | 
"x \<in> carrier G ==> h x \<in> carrier H"  | 
|
1034  | 
proof -  | 
|
1035  | 
assume "x \<in> carrier G"  | 
|
| 31754 | 1036  | 
with homh [unfolded hom_def] show ?thesis by auto  | 
| 29240 | 1037  | 
qed  | 
| 13813 | 1038  | 
|
| 68662 | 1039  | 
lemma (in group_hom) one_closed [simp]: "h \<one> \<in> carrier H"  | 
| 13813 | 1040  | 
by simp  | 
1041  | 
||
| 68662 | 1042  | 
lemma (in group_hom) hom_one [simp]: "h \<one> = \<one>\<^bsub>H\<^esub>"  | 
| 13813 | 1043  | 
proof -  | 
| 
15076
 
4b3d280ef06a
New prover for transitive and reflexive-transitive closure of relations.
 
ballarin 
parents: 
14963 
diff
changeset
 | 
1044  | 
have "h \<one> \<otimes>\<^bsub>H\<^esub> \<one>\<^bsub>H\<^esub> = h \<one> \<otimes>\<^bsub>H\<^esub> h \<one>"  | 
| 13813 | 1045  | 
by (simp add: hom_mult [symmetric] del: hom_mult)  | 
1046  | 
then show ?thesis by (simp del: r_one)  | 
|
1047  | 
qed  | 
|
1048  | 
||
1049  | 
lemma (in group_hom) inv_closed [simp]:  | 
|
1050  | 
"x \<in> carrier G ==> h (inv x) \<in> carrier H"  | 
|
1051  | 
by simp  | 
|
1052  | 
||
1053  | 
lemma (in group_hom) hom_inv [simp]:  | 
|
| 68662 | 1054  | 
assumes "x \<in> carrier G" shows "h (inv x) = inv\<^bsub>H\<^esub> (h x)"  | 
| 13813 | 1055  | 
proof -  | 
| 68662 | 1056  | 
have "h x \<otimes>\<^bsub>H\<^esub> h (inv x) = h x \<otimes>\<^bsub>H\<^esub> inv\<^bsub>H\<^esub> (h x)"  | 
1057  | 
using assms by (simp flip: hom_mult)  | 
|
1058  | 
with assms show ?thesis by (simp del: H.r_inv H.Units_r_inv)  | 
|
| 13813 | 1059  | 
qed  | 
1060  | 
||
| 57271 | 1061  | 
(* Contributed by Joachim Breitner *)  | 
1062  | 
lemma (in group) int_pow_is_hom:  | 
|
| 67399 | 1063  | 
"x \<in> carrier G \<Longrightarrow> (([^]) x) \<in> hom \<lparr> carrier = UNIV, mult = (+), one = 0::int \<rparr> G "  | 
| 57271 | 1064  | 
unfolding hom_def by (simp add: int_pow_mult)  | 
1065  | 
||
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1066  | 
(* Next six lemmas contributed by Paulo. *)  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1067  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1068  | 
lemma (in group_hom) img_is_subgroup: "subgroup (h ` (carrier G)) H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1069  | 
apply (rule subgroupI)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1070  | 
apply (auto simp add: image_subsetI)  | 
| 68687 | 1071  | 
apply (metis G.inv_closed hom_inv image_iff)  | 
| 68605 | 1072  | 
by (metis G.monoid_axioms hom_mult image_eqI monoid.m_closed)  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1073  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1074  | 
lemma (in group_hom) subgroup_img_is_subgroup:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1075  | 
assumes "subgroup I G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1076  | 
shows "subgroup (h ` I) H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1077  | 
proof -  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1078  | 
have "h \<in> hom (G \<lparr> carrier := I \<rparr>) H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1079  | 
using G.subgroupE[OF assms] subgroup.mem_carrier[OF assms] homh  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1080  | 
unfolding hom_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1081  | 
hence "group_hom (G \<lparr> carrier := I \<rparr>) H h"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1082  | 
using subgroup.subgroup_is_group[OF assms G.is_group] is_group  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1083  | 
unfolding group_hom_def group_hom_axioms_def by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1084  | 
thus ?thesis  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1085  | 
using group_hom.img_is_subgroup[of "G \<lparr> carrier := I \<rparr>" H h] by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1086  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1087  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1088  | 
lemma (in group_hom) induced_group_hom:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1089  | 
assumes "subgroup I G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1090  | 
shows "group_hom (G \<lparr> carrier := I \<rparr>) (H \<lparr> carrier := h ` I \<rparr>) h"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1091  | 
proof -  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1092  | 
have "h \<in> hom (G \<lparr> carrier := I \<rparr>) (H \<lparr> carrier := h ` I \<rparr>)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1093  | 
using homh subgroup.mem_carrier[OF assms] unfolding hom_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1094  | 
thus ?thesis  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1095  | 
unfolding group_hom_def group_hom_axioms_def  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1096  | 
using subgroup.subgroup_is_group[OF assms G.is_group]  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1097  | 
subgroup.subgroup_is_group[OF subgroup_img_is_subgroup[OF assms] is_group] by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1098  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1099  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1100  | 
lemma (in group) canonical_inj_is_hom:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1101  | 
assumes "subgroup H G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1102  | 
shows "group_hom (G \<lparr> carrier := H \<rparr>) G id"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1103  | 
unfolding group_hom_def group_hom_axioms_def hom_def  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1104  | 
using subgroup.subgroup_is_group[OF assms is_group]  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1105  | 
is_group subgroup.subset[OF assms] by auto  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1106  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1107  | 
lemma (in group_hom) nat_pow_hom:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1108  | 
"x \<in> carrier G \<Longrightarrow> h (x [^] (n :: nat)) = (h x) [^]\<^bsub>H\<^esub> n"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1109  | 
by (induction n) auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1110  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1111  | 
lemma (in group_hom) int_pow_hom:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1112  | 
"x \<in> carrier G \<Longrightarrow> h (x [^] (n :: int)) = (h x) [^]\<^bsub>H\<^esub> n"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1113  | 
using int_pow_def2 nat_pow_hom by (simp add: G.int_pow_def2)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1114  | 
|
| 
20318
 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 
ballarin 
parents: 
19984 
diff
changeset
 | 
1115  | 
|
| 61382 | 1116  | 
subsection \<open>Commutative Structures\<close>  | 
| 13936 | 1117  | 
|
| 61382 | 1118  | 
text \<open>  | 
| 13936 | 1119  | 
Naming convention: multiplicative structures that are commutative  | 
1120  | 
  are called \emph{commutative}, additive structures are called
 | 
|
1121  | 
  \emph{Abelian}.
 | 
|
| 61382 | 1122  | 
\<close>  | 
| 13813 | 1123  | 
|
| 14963 | 1124  | 
locale comm_monoid = monoid +  | 
1125  | 
assumes m_comm: "\<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> x \<otimes> y = y \<otimes> x"  | 
|
| 13813 | 1126  | 
|
| 14963 | 1127  | 
lemma (in comm_monoid) m_lcomm:  | 
1128  | 
"\<lbrakk>x \<in> carrier G; y \<in> carrier G; z \<in> carrier G\<rbrakk> \<Longrightarrow>  | 
|
| 13813 | 1129  | 
x \<otimes> (y \<otimes> z) = y \<otimes> (x \<otimes> z)"  | 
1130  | 
proof -  | 
|
| 14693 | 1131  | 
assume xyz: "x \<in> carrier G" "y \<in> carrier G" "z \<in> carrier G"  | 
| 13813 | 1132  | 
from xyz have "x \<otimes> (y \<otimes> z) = (x \<otimes> y) \<otimes> z" by (simp add: m_assoc)  | 
1133  | 
also from xyz have "... = (y \<otimes> x) \<otimes> z" by (simp add: m_comm)  | 
|
1134  | 
also from xyz have "... = y \<otimes> (x \<otimes> z)" by (simp add: m_assoc)  | 
|
1135  | 
finally show ?thesis .  | 
|
1136  | 
qed  | 
|
1137  | 
||
| 14963 | 1138  | 
lemmas (in comm_monoid) m_ac = m_assoc m_comm m_lcomm  | 
| 13813 | 1139  | 
|
| 13936 | 1140  | 
lemma comm_monoidI:  | 
| 19783 | 1141  | 
fixes G (structure)  | 
| 13936 | 1142  | 
assumes m_closed:  | 
| 14693 | 1143  | 
"!!x y. [| x \<in> carrier G; y \<in> carrier G |] ==> x \<otimes> y \<in> carrier G"  | 
1144  | 
and one_closed: "\<one> \<in> carrier G"  | 
|
| 13936 | 1145  | 
and m_assoc:  | 
1146  | 
"!!x y z. [| x \<in> carrier G; y \<in> carrier G; z \<in> carrier G |] ==>  | 
|
| 14693 | 1147  | 
(x \<otimes> y) \<otimes> z = x \<otimes> (y \<otimes> z)"  | 
1148  | 
and l_one: "!!x. x \<in> carrier G ==> \<one> \<otimes> x = x"  | 
|
| 13936 | 1149  | 
and m_comm:  | 
| 14693 | 1150  | 
"!!x y. [| x \<in> carrier G; y \<in> carrier G |] ==> x \<otimes> y = y \<otimes> x"  | 
| 13936 | 1151  | 
shows "comm_monoid G"  | 
1152  | 
using l_one  | 
|
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1153  | 
by (auto intro!: comm_monoid.intro comm_monoid_axioms.intro monoid.intro  | 
| 
27714
 
27b4d7c01f8b
Tuned (for the sake of a meaningless log entry).
 
ballarin 
parents: 
27713 
diff
changeset
 | 
1154  | 
intro: assms simp: m_closed one_closed m_comm)  | 
| 13817 | 1155  | 
|
| 13936 | 1156  | 
lemma (in monoid) monoid_comm_monoidI:  | 
1157  | 
assumes m_comm:  | 
|
| 14693 | 1158  | 
"!!x y. [| x \<in> carrier G; y \<in> carrier G |] ==> x \<otimes> y = y \<otimes> x"  | 
| 13936 | 1159  | 
shows "comm_monoid G"  | 
1160  | 
by (rule comm_monoidI) (auto intro: m_assoc m_comm)  | 
|
| 14963 | 1161  | 
|
| 13936 | 1162  | 
lemma (in comm_monoid) nat_pow_distr:  | 
1163  | 
"[| x \<in> carrier G; y \<in> carrier G |] ==>  | 
|
| 
67341
 
df79ef3b3a41
Renamed (^) to [^] in preparation of the move from "op X" to (X)
 
nipkow 
parents: 
67091 
diff
changeset
 | 
1164  | 
(x \<otimes> y) [^] (n::nat) = x [^] n \<otimes> y [^] n"  | 
| 13936 | 1165  | 
by (induct n) (simp, simp add: m_ac)  | 
1166  | 
||
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1167  | 
lemma (in comm_monoid) submonoid_is_comm_monoid :  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1168  | 
assumes "submonoid H G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1169  | 
shows "comm_monoid (G\<lparr>carrier := H\<rparr>)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1170  | 
proof (intro monoid.monoid_comm_monoidI)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1171  | 
show "monoid (G\<lparr>carrier := H\<rparr>)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1172  | 
using submonoid.submonoid_is_monoid assms comm_monoid_axioms comm_monoid_def by blast  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1173  | 
show "\<And>x y. x \<in> carrier (G\<lparr>carrier := H\<rparr>) \<Longrightarrow> y \<in> carrier (G\<lparr>carrier := H\<rparr>)  | 
| 68687 | 1174  | 
\<Longrightarrow> x \<otimes>\<^bsub>G\<lparr>carrier := H\<rparr>\<^esub> y = y \<otimes>\<^bsub>G\<lparr>carrier := H\<rparr>\<^esub> x"  | 
1175  | 
by simp (meson assms m_comm submonoid.mem_carrier)  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1176  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1177  | 
|
| 13936 | 1178  | 
locale comm_group = comm_monoid + group  | 
1179  | 
||
1180  | 
lemma (in group) group_comm_groupI:  | 
|
| 68662 | 1181  | 
assumes m_comm: "!!x y. [| x \<in> carrier G; y \<in> carrier G |] ==> x \<otimes> y = y \<otimes> x"  | 
| 13936 | 1182  | 
shows "comm_group G"  | 
| 61169 | 1183  | 
by standard (simp_all add: m_comm)  | 
| 13817 | 1184  | 
|
| 13936 | 1185  | 
lemma comm_groupI:  | 
| 19783 | 1186  | 
fixes G (structure)  | 
| 13936 | 1187  | 
assumes m_closed:  | 
| 14693 | 1188  | 
"!!x y. [| x \<in> carrier G; y \<in> carrier G |] ==> x \<otimes> y \<in> carrier G"  | 
1189  | 
and one_closed: "\<one> \<in> carrier G"  | 
|
| 13936 | 1190  | 
and m_assoc:  | 
1191  | 
"!!x y z. [| x \<in> carrier G; y \<in> carrier G; z \<in> carrier G |] ==>  | 
|
| 14693 | 1192  | 
(x \<otimes> y) \<otimes> z = x \<otimes> (y \<otimes> z)"  | 
| 13936 | 1193  | 
and m_comm:  | 
| 14693 | 1194  | 
"!!x y. [| x \<in> carrier G; y \<in> carrier G |] ==> x \<otimes> y = y \<otimes> x"  | 
1195  | 
and l_one: "!!x. x \<in> carrier G ==> \<one> \<otimes> x = x"  | 
|
| 14963 | 1196  | 
and l_inv_ex: "!!x. x \<in> carrier G ==> \<exists>y \<in> carrier G. y \<otimes> x = \<one>"  | 
| 13936 | 1197  | 
shows "comm_group G"  | 
| 
27714
 
27b4d7c01f8b
Tuned (for the sake of a meaningless log entry).
 
ballarin 
parents: 
27713 
diff
changeset
 | 
1198  | 
by (fast intro: group.group_comm_groupI groupI assms)  | 
| 13936 | 1199  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1200  | 
lemma comm_groupE:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1201  | 
fixes G (structure)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1202  | 
assumes "comm_group G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1203  | 
shows "\<And>x y. \<lbrakk> x \<in> carrier G; y \<in> carrier G \<rbrakk> \<Longrightarrow> x \<otimes> y \<in> carrier G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1204  | 
and "\<one> \<in> carrier G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1205  | 
and "\<And>x y z. \<lbrakk> x \<in> carrier G; y \<in> carrier G; z \<in> carrier G \<rbrakk> \<Longrightarrow> (x \<otimes> y) \<otimes> z = x \<otimes> (y \<otimes> z)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1206  | 
and "\<And>x y. \<lbrakk> x \<in> carrier G; y \<in> carrier G \<rbrakk> \<Longrightarrow> x \<otimes> y = y \<otimes> x"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1207  | 
and "\<And>x. x \<in> carrier G \<Longrightarrow> \<one> \<otimes> x = x"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1208  | 
and "\<And>x. x \<in> carrier G \<Longrightarrow> \<exists>y \<in> carrier G. y \<otimes> x = \<one>"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1209  | 
apply (simp_all add: group.axioms assms comm_group.axioms comm_monoid.m_comm comm_monoid.m_ac(1))  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1210  | 
by (simp_all add: Group.group.axioms(1) assms comm_group.axioms(2) monoid.m_closed group.r_inv_ex)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1211  | 
|
| 13936 | 1212  | 
lemma (in comm_group) inv_mult:  | 
| 
13854
 
91c9ab25fece
First distributed version of Group and Ring theory.
 
ballarin 
parents: 
13835 
diff
changeset
 | 
1213  | 
"[| x \<in> carrier G; y \<in> carrier G |] ==> inv (x \<otimes> y) = inv x \<otimes> inv y"  | 
| 13936 | 1214  | 
by (simp add: m_ac inv_mult_group)  | 
| 
13854
 
91c9ab25fece
First distributed version of Group and Ring theory.
 
ballarin 
parents: 
13835 
diff
changeset
 | 
1215  | 
|
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1216  | 
(* Next three lemmas contributed by Paulo. *)  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1217  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1218  | 
lemma (in comm_monoid) hom_imp_img_comm_monoid:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1219  | 
assumes "h \<in> hom G H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1220  | 
shows "comm_monoid (H \<lparr> carrier := h ` (carrier G), one := h \<one>\<^bsub>G\<^esub> \<rparr>)" (is "comm_monoid ?h_img")  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1221  | 
proof (rule monoid.monoid_comm_monoidI)  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1222  | 
show "monoid ?h_img"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1223  | 
using hom_imp_img_monoid[OF assms] .  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1224  | 
next  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1225  | 
fix x y assume "x \<in> carrier ?h_img" "y \<in> carrier ?h_img"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1226  | 
then obtain g1 g2  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1227  | 
where g1: "g1 \<in> carrier G" "x = h g1"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1228  | 
and g2: "g2 \<in> carrier G" "y = h g2"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1229  | 
by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1230  | 
have "x \<otimes>\<^bsub>(?h_img)\<^esub> y = h (g1 \<otimes> g2)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1231  | 
using g1 g2 assms unfolding hom_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1232  | 
also have " ... = h (g2 \<otimes> g1)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1233  | 
using m_comm[OF g1(1) g2(1)] by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1234  | 
also have " ... = y \<otimes>\<^bsub>(?h_img)\<^esub> x"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1235  | 
using g1 g2 assms unfolding hom_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1236  | 
finally show "x \<otimes>\<^bsub>(?h_img)\<^esub> y = y \<otimes>\<^bsub>(?h_img)\<^esub> x" .  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1237  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1238  | 
|
| 68517 | 1239  | 
lemma (in comm_group) hom_imp_img_comm_group:  | 
1240  | 
assumes "h \<in> hom G H"  | 
|
1241  | 
shows "comm_group (H \<lparr> carrier := h ` (carrier G), one := h \<one>\<^bsub>G\<^esub> \<rparr>)"  | 
|
1242  | 
unfolding comm_group_def  | 
|
1243  | 
using hom_imp_img_group[OF assms] hom_imp_img_comm_monoid[OF assms] by simp  | 
|
1244  | 
||
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1245  | 
lemma (in comm_group) iso_imp_img_comm_group:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1246  | 
assumes "h \<in> iso G H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1247  | 
shows "comm_group (H \<lparr> one := h \<one>\<^bsub>G\<^esub> \<rparr>)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1248  | 
proof -  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1249  | 
let ?h_img = "H \<lparr> carrier := h ` (carrier G), one := h \<one> \<rparr>"  | 
| 68517 | 1250  | 
have "comm_group ?h_img"  | 
1251  | 
using hom_imp_img_comm_group[of h H] assms unfolding iso_def by auto  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1252  | 
moreover have "carrier H = carrier ?h_img"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1253  | 
using assms unfolding iso_def bij_betw_def by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1254  | 
hence "H \<lparr> one := h \<one> \<rparr> = ?h_img"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1255  | 
by simp  | 
| 68517 | 1256  | 
ultimately show ?thesis by simp  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1257  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1258  | 
|
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1259  | 
lemma (in comm_group) iso_imp_comm_group:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1260  | 
assumes "G \<cong> H" "monoid H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1261  | 
shows "comm_group H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1262  | 
proof -  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1263  | 
obtain h where h: "h \<in> iso G H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1264  | 
using assms(1) unfolding is_iso_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1265  | 
hence comm_gr: "comm_group (H \<lparr> one := h \<one> \<rparr>)"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1266  | 
using iso_imp_img_comm_group[of h H] by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1267  | 
hence "\<And>x. x \<in> carrier H \<Longrightarrow> h \<one> \<otimes>\<^bsub>H\<^esub> x = x"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1268  | 
using monoid.l_one[of "H \<lparr> one := h \<one> \<rparr>"] unfolding comm_group_def comm_monoid_def by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1269  | 
moreover have "h \<one> \<in> carrier H"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1270  | 
using h one_closed unfolding iso_def hom_def by auto  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1271  | 
ultimately have "h \<one> = \<one>\<^bsub>H\<^esub>"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1272  | 
using monoid.one_unique[OF assms(2), of "h \<one>"] by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1273  | 
hence "H = H \<lparr> one := h \<one> \<rparr>"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1274  | 
by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1275  | 
thus ?thesis  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1276  | 
using comm_gr by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1277  | 
qed  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1278  | 
|
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1279  | 
(*A subgroup of a subgroup is a subgroup of the group*)  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1280  | 
lemma (in group) incl_subgroup:  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1281  | 
assumes "subgroup J G"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1282  | 
and "subgroup I (G\<lparr>carrier:=J\<rparr>)"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1283  | 
shows "subgroup I G" unfolding subgroup_def  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1284  | 
proof  | 
| 
68452
 
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
 
paulson <lp15@cam.ac.uk> 
parents: 
68445 
diff
changeset
 | 
1285  | 
have H1: "I \<subseteq> carrier (G\<lparr>carrier:=J\<rparr>)" using assms(2) subgroup.subset by blast  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1286  | 
also have H2: "...\<subseteq>J" by simp  | 
| 
68452
 
c027dfbfad30
more on infinite products. Also subgroup_imp_subset -> subgroup.subset
 
paulson <lp15@cam.ac.uk> 
parents: 
68445 
diff
changeset
 | 
1287  | 
also have "...\<subseteq>(carrier G)" by (simp add: assms(1) subgroup.subset)  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1288  | 
finally have H: "I \<subseteq> carrier G" by simp  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1289  | 
have "(\<And>x y. \<lbrakk>x \<in> I ; y \<in> I\<rbrakk> \<Longrightarrow> x \<otimes> y \<in> I)" using assms(2) by (auto simp add: subgroup_def)  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1290  | 
thus "I \<subseteq> carrier G \<and> (\<forall>x y. x \<in> I \<longrightarrow> y \<in> I \<longrightarrow> x \<otimes> y \<in> I)" using H by blast  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1291  | 
have K: "\<one> \<in> I" using assms(2) by (auto simp add: subgroup_def)  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1292  | 
have "(\<And>x. x \<in> I \<Longrightarrow> inv x \<in> I)" using assms subgroup.m_inv_closed H  | 
| 
68555
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
1293  | 
by (metis H1 H2 m_inv_consistent subsetCE)  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1294  | 
thus "\<one> \<in> I \<and> (\<forall>x. x \<in> I \<longrightarrow> inv x \<in> I)" using K by blast  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1295  | 
qed  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1296  | 
|
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1297  | 
(*A subgroup included in another subgroup is a subgroup of the subgroup*)  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1298  | 
lemma (in group) subgroup_incl:  | 
| 
68555
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
1299  | 
assumes "subgroup I G" and "subgroup J G" and "I \<subseteq> J"  | 
| 
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
1300  | 
shows "subgroup I (G \<lparr> carrier := J \<rparr>)"  | 
| 
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
1301  | 
using group.group_incl_imp_subgroup[of "G \<lparr> carrier := J \<rparr>" I]  | 
| 
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
1302  | 
assms(1-2)[THEN subgroup.subgroup_is_group[OF _ group_axioms]] assms(3) by auto  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1303  | 
|
| 
20318
 
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
 
ballarin 
parents: 
19984 
diff
changeset
 | 
1304  | 
|
| 61382 | 1305  | 
subsection \<open>The Lattice of Subgroups of a Group\<close>  | 
| 
14751
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1306  | 
|
| 61382 | 1307  | 
text_raw \<open>\label{sec:subgroup-lattice}\<close>
 | 
| 
14751
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1308  | 
|
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1309  | 
theorem (in group) subgroups_partial_order:  | 
| 67399 | 1310  | 
  "partial_order \<lparr>carrier = {H. subgroup H G}, eq = (=), le = (\<subseteq>)\<rparr>"
 | 
| 61169 | 1311  | 
by standard simp_all  | 
| 
14751
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1312  | 
|
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1313  | 
lemma (in group) subgroup_self:  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1314  | 
"subgroup (carrier G) G"  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1315  | 
by (rule subgroupI) auto  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1316  | 
|
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1317  | 
lemma (in group) subgroup_imp_group:  | 
| 55926 | 1318  | 
"subgroup H G ==> group (G\<lparr>carrier := H\<rparr>)"  | 
| 26199 | 1319  | 
by (erule subgroup.subgroup_is_group) (rule group_axioms)  | 
| 
14751
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1320  | 
|
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1321  | 
lemma (in group) is_monoid [intro, simp]:  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1322  | 
"monoid G"  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1323  | 
by (auto intro: monoid.intro m_assoc)  | 
| 
14751
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1324  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1325  | 
lemma (in group) subgroup_mult_equality:  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1326  | 
"\<lbrakk> subgroup H G; h1 \<in> H; h2 \<in> H \<rbrakk> \<Longrightarrow> h1 \<otimes>\<^bsub>G \<lparr> carrier := H \<rparr>\<^esub> h2 = h1 \<otimes> h2"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1327  | 
unfolding subgroup_def by simp  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1328  | 
|
| 
14751
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1329  | 
theorem (in group) subgroups_Inter:  | 
| 67091 | 1330  | 
assumes subgr: "(\<And>H. H \<in> A \<Longrightarrow> subgroup H G)"  | 
1331  | 
    and not_empty: "A \<noteq> {}"
 | 
|
| 
14751
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1332  | 
shows "subgroup (\<Inter>A) G"  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1333  | 
proof (rule subgroupI)  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1334  | 
from subgr [THEN subgroup.subset] and not_empty  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1335  | 
show "\<Inter>A \<subseteq> carrier G" by blast  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1336  | 
next  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1337  | 
from subgr [THEN subgroup.one_closed]  | 
| 67091 | 1338  | 
  show "\<Inter>A \<noteq> {}" by blast
 | 
| 
14751
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1339  | 
next  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1340  | 
fix x assume "x \<in> \<Inter>A"  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1341  | 
with subgr [THEN subgroup.m_inv_closed]  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1342  | 
show "inv x \<in> \<Inter>A" by blast  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1343  | 
next  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1344  | 
fix x y assume "x \<in> \<Inter>A" "y \<in> \<Inter>A"  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1345  | 
with subgr [THEN subgroup.m_closed]  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1346  | 
show "x \<otimes> y \<in> \<Inter>A" by blast  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1347  | 
qed  | 
| 
 
0d7850e27fed
Change of theory hierarchy: Group is now based in Lattice.
 
ballarin 
parents: 
14706 
diff
changeset
 | 
1348  | 
|
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1349  | 
lemma (in group) subgroups_Inter_pair :  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1350  | 
assumes "subgroup I G"  | 
| 
68443
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1351  | 
and "subgroup J G"  | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1352  | 
  shows "subgroup (I\<inter>J) G" using subgroups_Inter[ where ?A = "{I,J}"] assms by auto
 | 
| 
 
43055b016688
New material from Martin Baillon and Paulo EmÃlio de Vilhena
 
paulson <lp15@cam.ac.uk> 
parents: 
68399 
diff
changeset
 | 
1353  | 
|
| 66579 | 1354  | 
theorem (in group) subgroups_complete_lattice:  | 
| 67399 | 1355  | 
  "complete_lattice \<lparr>carrier = {H. subgroup H G}, eq = (=), le = (\<subseteq>)\<rparr>"
 | 
| 66579 | 1356  | 
(is "complete_lattice ?L")  | 
1357  | 
proof (rule partial_order.complete_lattice_criterion1)  | 
|
1358  | 
show "partial_order ?L" by (rule subgroups_partial_order)  | 
|
1359  | 
next  | 
|
1360  | 
have "greatest ?L (carrier G) (carrier ?L)"  | 
|
1361  | 
by (unfold greatest_def) (simp add: subgroup.subset subgroup_self)  | 
|
1362  | 
then show "\<exists>G. greatest ?L G (carrier ?L)" ..  | 
|
1363  | 
next  | 
|
1364  | 
fix A  | 
|
| 67091 | 1365  | 
  assume L: "A \<subseteq> carrier ?L" and non_empty: "A \<noteq> {}"
 | 
| 66579 | 1366  | 
then have Int_subgroup: "subgroup (\<Inter>A) G"  | 
1367  | 
by (fastforce intro: subgroups_Inter)  | 
|
1368  | 
have "greatest ?L (\<Inter>A) (Lower ?L A)" (is "greatest _ ?Int _")  | 
|
1369  | 
proof (rule greatest_LowerI)  | 
|
1370  | 
fix H  | 
|
1371  | 
assume H: "H \<in> A"  | 
|
1372  | 
with L have subgroupH: "subgroup H G" by auto  | 
|
1373  | 
from subgroupH have groupH: "group (G \<lparr>carrier := H\<rparr>)" (is "group ?H")  | 
|
1374  | 
by (rule subgroup_imp_group)  | 
|
1375  | 
from groupH have monoidH: "monoid ?H"  | 
|
1376  | 
by (rule group.is_monoid)  | 
|
1377  | 
from H have Int_subset: "?Int \<subseteq> H" by fastforce  | 
|
1378  | 
then show "le ?L ?Int H" by simp  | 
|
1379  | 
next  | 
|
1380  | 
fix H  | 
|
1381  | 
assume H: "H \<in> Lower ?L A"  | 
|
1382  | 
with L Int_subgroup show "le ?L H ?Int"  | 
|
1383  | 
by (fastforce simp: Lower_def intro: Inter_greatest)  | 
|
1384  | 
next  | 
|
1385  | 
show "A \<subseteq> carrier ?L" by (rule L)  | 
|
1386  | 
next  | 
|
1387  | 
show "?Int \<in> carrier ?L" by simp (rule Int_subgroup)  | 
|
1388  | 
qed  | 
|
1389  | 
then show "\<exists>I. greatest ?L I (Lower ?L A)" ..  | 
|
1390  | 
qed  | 
|
1391  | 
||
| 69272 | 1392  | 
subsection\<open>Jeremy Avigad's \<open>More_Group\<close> material\<close>  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1393  | 
|
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1394  | 
text \<open>  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1395  | 
Show that the units in any monoid give rise to a group.  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1396  | 
|
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1397  | 
The file Residues.thy provides some infrastructure to use  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1398  | 
facts about the unit group within the ring locale.  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1399  | 
\<close>  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1400  | 
|
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1401  | 
definition units_of :: "('a, 'b) monoid_scheme \<Rightarrow> 'a monoid"
 | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1402  | 
where "units_of G =  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1403  | 
\<lparr>carrier = Units G, Group.monoid.mult = Group.monoid.mult G, one = one G\<rparr>"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1404  | 
|
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1405  | 
lemma (in monoid) units_group: "group (units_of G)"  | 
| 68458 | 1406  | 
proof -  | 
1407  | 
have "\<And>x y z. \<lbrakk>x \<in> Units G; y \<in> Units G; z \<in> Units G\<rbrakk> \<Longrightarrow> x \<otimes> y \<otimes> z = x \<otimes> (y \<otimes> z)"  | 
|
1408  | 
by (simp add: Units_closed m_assoc)  | 
|
1409  | 
moreover have "\<And>x. x \<in> Units G \<Longrightarrow> \<exists>y\<in>Units G. y \<otimes> x = \<one>"  | 
|
1410  | 
using Units_l_inv by blast  | 
|
1411  | 
ultimately show ?thesis  | 
|
1412  | 
unfolding units_of_def  | 
|
1413  | 
by (force intro!: groupI)  | 
|
1414  | 
qed  | 
|
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1415  | 
|
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1416  | 
lemma (in comm_monoid) units_comm_group: "comm_group (units_of G)"  | 
| 68458 | 1417  | 
proof -  | 
1418  | 
have "\<And>x y. \<lbrakk>x \<in> carrier (units_of G); y \<in> carrier (units_of G)\<rbrakk>  | 
|
1419  | 
\<Longrightarrow> x \<otimes>\<^bsub>units_of G\<^esub> y = y \<otimes>\<^bsub>units_of G\<^esub> x"  | 
|
1420  | 
by (simp add: Units_closed m_comm units_of_def)  | 
|
1421  | 
then show ?thesis  | 
|
1422  | 
by (rule group.group_comm_groupI [OF units_group]) auto  | 
|
1423  | 
qed  | 
|
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1424  | 
|
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1425  | 
lemma units_of_carrier: "carrier (units_of G) = Units G"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1426  | 
by (auto simp: units_of_def)  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1427  | 
|
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1428  | 
lemma units_of_mult: "mult (units_of G) = mult G"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1429  | 
by (auto simp: units_of_def)  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1430  | 
|
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1431  | 
lemma units_of_one: "one (units_of G) = one G"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1432  | 
by (auto simp: units_of_def)  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1433  | 
|
| 
68555
 
22d51874f37d
a few more lemmas from Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68551 
diff
changeset
 | 
1434  | 
lemma (in monoid) units_of_inv:  | 
| 68458 | 1435  | 
assumes "x \<in> Units G"  | 
1436  | 
shows "m_inv (units_of G) x = m_inv G x"  | 
|
1437  | 
by (simp add: assms group.inv_equality units_group units_of_carrier units_of_mult units_of_one)  | 
|
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1438  | 
|
| 
68551
 
b680e74eb6f2
More on Algebra by Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68517 
diff
changeset
 | 
1439  | 
lemma units_of_units [simp] : "Units (units_of G) = Units G"  | 
| 
 
b680e74eb6f2
More on Algebra by Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68517 
diff
changeset
 | 
1440  | 
unfolding units_of_def Units_def by force  | 
| 
 
b680e74eb6f2
More on Algebra by Paulo and Martin
 
paulson <lp15@cam.ac.uk> 
parents: 
68517 
diff
changeset
 | 
1441  | 
|
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1442  | 
lemma (in group) surj_const_mult: "a \<in> carrier G \<Longrightarrow> (\<lambda>x. a \<otimes> x) ` carrier G = carrier G"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1443  | 
apply (auto simp add: image_def)  | 
| 68458 | 1444  | 
by (metis inv_closed inv_solve_left m_closed)  | 
| 
68445
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1445  | 
|
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1446  | 
lemma (in group) l_cancel_one [simp]: "x \<in> carrier G \<Longrightarrow> a \<in> carrier G \<Longrightarrow> x \<otimes> a = x \<longleftrightarrow> a = one G"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1447  | 
by (metis Units_eq Units_l_cancel monoid.r_one monoid_axioms one_closed)  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1448  | 
|
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1449  | 
lemma (in group) r_cancel_one [simp]: "x \<in> carrier G \<Longrightarrow> a \<in> carrier G \<Longrightarrow> a \<otimes> x = x \<longleftrightarrow> a = one G"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1450  | 
by (metis monoid.l_one monoid_axioms one_closed right_cancel)  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1451  | 
|
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1452  | 
lemma (in group) l_cancel_one' [simp]: "x \<in> carrier G \<Longrightarrow> a \<in> carrier G \<Longrightarrow> x = x \<otimes> a \<longleftrightarrow> a = one G"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1453  | 
using l_cancel_one by fastforce  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1454  | 
|
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1455  | 
lemma (in group) r_cancel_one' [simp]: "x \<in> carrier G \<Longrightarrow> a \<in> carrier G \<Longrightarrow> x = a \<otimes> x \<longleftrightarrow> a = one G"  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1456  | 
using r_cancel_one by fastforce  | 
| 
 
c183a6a69f2d
reorganisation of Algebra: new material from Baillon and Vilhena, removal of duplicate names, elimination of "More_" theories
 
paulson <lp15@cam.ac.uk> 
parents: 
68443 
diff
changeset
 | 
1457  | 
|
| 13813 | 1458  | 
end  |