author | paulson <lp15@cam.ac.uk> |
Sun, 22 Jul 2018 13:29:24 +0200 | |
changeset 68673 | 22d10f94811e |
parent 68664 | bd0df72c16d5 |
child 68687 | 2976a4a3b126 |
permissions | -rw-r--r-- |
35849 | 1 |
(* Title: HOL/Algebra/RingHom.thy |
2 |
Author: Stephan Hohe, TU Muenchen |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
3 |
*) |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
4 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
5 |
theory RingHom |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
6 |
imports Ideal |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
7 |
begin |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
8 |
|
61382 | 9 |
section \<open>Homomorphisms of Non-Commutative Rings\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
10 |
|
63167 | 11 |
text \<open>Lifting existing lemmas in a \<open>ring_hom_ring\<close> locale\<close> |
61565
352c73a689da
Qualifiers in locale expressions default to mandatory regardless of the command.
ballarin
parents:
61382
diff
changeset
|
12 |
locale ring_hom_ring = R?: ring R + S?: ring S |
29240 | 13 |
for R (structure) and S (structure) + |
29237 | 14 |
fixes h |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
15 |
assumes homh: "h \<in> ring_hom R S" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
16 |
notes hom_mult [simp] = ring_hom_mult [OF homh] |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
17 |
and hom_one [simp] = ring_hom_one [OF homh] |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
18 |
|
29246 | 19 |
sublocale ring_hom_cring \<subseteq> ring: ring_hom_ring |
61169 | 20 |
by standard (rule homh) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
21 |
|
61565
352c73a689da
Qualifiers in locale expressions default to mandatory regardless of the command.
ballarin
parents:
61382
diff
changeset
|
22 |
sublocale ring_hom_ring \<subseteq> abelian_group?: abelian_group_hom R S |
68664
bd0df72c16d5
updated material concerning Algebra
paulson <lp15@cam.ac.uk>
parents:
68551
diff
changeset
|
23 |
apply (intro abelian_group_homI R.is_abelian_group S.is_abelian_group) |
bd0df72c16d5
updated material concerning Algebra
paulson <lp15@cam.ac.uk>
parents:
68551
diff
changeset
|
24 |
apply (intro group_hom.intro group_hom_axioms.intro R.a_group S.a_group) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
25 |
apply (insert homh, unfold hom_def ring_hom_def) |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
26 |
apply simp |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
27 |
done |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
28 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
29 |
lemma (in ring_hom_ring) is_ring_hom_ring: |
27611 | 30 |
"ring_hom_ring R S h" |
31 |
by (rule ring_hom_ring_axioms) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
32 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
33 |
lemma ring_hom_ringI: |
27611 | 34 |
fixes R (structure) and S (structure) |
35 |
assumes "ring R" "ring S" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
36 |
assumes (* morphism: "h \<in> carrier R \<rightarrow> carrier S" *) |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
37 |
hom_closed: "!!x. x \<in> carrier R ==> h x \<in> carrier S" |
67613 | 38 |
and compatible_mult: "\<And>x y. [| x \<in> carrier R; y \<in> carrier R |] ==> h (x \<otimes> y) = h x \<otimes>\<^bsub>S\<^esub> h y" |
39 |
and compatible_add: "\<And>x y. [| x \<in> carrier R; y \<in> carrier R |] ==> h (x \<oplus> y) = h x \<oplus>\<^bsub>S\<^esub> h y" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
40 |
and compatible_one: "h \<one> = \<one>\<^bsub>S\<^esub>" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
41 |
shows "ring_hom_ring R S h" |
27611 | 42 |
proof - |
29237 | 43 |
interpret ring R by fact |
44 |
interpret ring S by fact |
|
27611 | 45 |
show ?thesis apply unfold_locales |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
46 |
apply (unfold ring_hom_def, safe) |
23463 | 47 |
apply (simp add: hom_closed Pi_def) |
48 |
apply (erule (1) compatible_mult) |
|
49 |
apply (erule (1) compatible_add) |
|
50 |
apply (rule compatible_one) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
51 |
done |
27611 | 52 |
qed |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
53 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
54 |
lemma ring_hom_ringI2: |
27611 | 55 |
assumes "ring R" "ring S" |
23350 | 56 |
assumes h: "h \<in> ring_hom R S" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
57 |
shows "ring_hom_ring R S h" |
27611 | 58 |
proof - |
30729
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
wenzelm
parents:
29246
diff
changeset
|
59 |
interpret R: ring R by fact |
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
wenzelm
parents:
29246
diff
changeset
|
60 |
interpret S: ring S by fact |
27611 | 61 |
show ?thesis apply (intro ring_hom_ring.intro ring_hom_ring_axioms.intro) |
62 |
apply (rule R.is_ring) |
|
63 |
apply (rule S.is_ring) |
|
64 |
apply (rule h) |
|
65 |
done |
|
66 |
qed |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
67 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
68 |
lemma ring_hom_ringI3: |
27611 | 69 |
fixes R (structure) and S (structure) |
70 |
assumes "abelian_group_hom R S h" "ring R" "ring S" |
|
67613 | 71 |
assumes compatible_mult: "\<And>x y. [| x \<in> carrier R; y \<in> carrier R |] ==> h (x \<otimes> y) = h x \<otimes>\<^bsub>S\<^esub> h y" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
72 |
and compatible_one: "h \<one> = \<one>\<^bsub>S\<^esub>" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
73 |
shows "ring_hom_ring R S h" |
27611 | 74 |
proof - |
29237 | 75 |
interpret abelian_group_hom R S h by fact |
30729
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
wenzelm
parents:
29246
diff
changeset
|
76 |
interpret R: ring R by fact |
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
wenzelm
parents:
29246
diff
changeset
|
77 |
interpret S: ring S by fact |
27611 | 78 |
show ?thesis apply (intro ring_hom_ring.intro ring_hom_ring_axioms.intro, rule R.is_ring, rule S.is_ring) |
79 |
apply (insert group_hom.homh[OF a_group_hom]) |
|
80 |
apply (unfold hom_def ring_hom_def, simp) |
|
81 |
apply safe |
|
82 |
apply (erule (1) compatible_mult) |
|
83 |
apply (rule compatible_one) |
|
84 |
done |
|
85 |
qed |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
86 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
87 |
lemma ring_hom_cringI: |
27611 | 88 |
assumes "ring_hom_ring R S h" "cring R" "cring S" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
89 |
shows "ring_hom_cring R S h" |
27611 | 90 |
proof - |
29237 | 91 |
interpret ring_hom_ring R S h by fact |
30729
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
wenzelm
parents:
29246
diff
changeset
|
92 |
interpret R: cring R by fact |
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
wenzelm
parents:
29246
diff
changeset
|
93 |
interpret S: cring S by fact |
27611 | 94 |
show ?thesis by (intro ring_hom_cring.intro ring_hom_cring_axioms.intro) |
23463 | 95 |
(rule R.is_cring, rule S.is_cring, rule homh) |
27611 | 96 |
qed |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
97 |
|
35849 | 98 |
|
61382 | 99 |
subsection \<open>The Kernel of a Ring Homomorphism\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
100 |
|
67443
3abf6a722518
standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents:
63167
diff
changeset
|
101 |
\<comment> \<open>the kernel of a ring homomorphism is an ideal\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
102 |
lemma (in ring_hom_ring) kernel_is_ideal: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
103 |
shows "ideal (a_kernel R S h) R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
104 |
apply (rule idealI) |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
105 |
apply (rule R.is_ring) |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
106 |
apply (rule additive_subgroup.a_subgroup[OF additive_subgroup_a_kernel]) |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
107 |
apply (unfold a_kernel_def', simp+) |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
108 |
done |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
109 |
|
61382 | 110 |
text \<open>Elements of the kernel are mapped to zero\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
111 |
lemma (in abelian_group_hom) kernel_zero [simp]: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
112 |
"i \<in> a_kernel R S h \<Longrightarrow> h i = \<zero>\<^bsub>S\<^esub>" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
113 |
by (simp add: a_kernel_defs) |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
114 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
115 |
|
61382 | 116 |
subsection \<open>Cosets\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
117 |
|
61382 | 118 |
text \<open>Cosets of the kernel correspond to the elements of the image of the homomorphism\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
119 |
lemma (in ring_hom_ring) rcos_imp_homeq: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
120 |
assumes acarr: "a \<in> carrier R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
121 |
and xrcos: "x \<in> a_kernel R S h +> a" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
122 |
shows "h x = h a" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
123 |
proof - |
29237 | 124 |
interpret ideal "a_kernel R S h" "R" by (rule kernel_is_ideal) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
125 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
126 |
from xrcos |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
127 |
have "\<exists>i \<in> a_kernel R S h. x = i \<oplus> a" by (simp add: a_r_coset_defs) |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
128 |
from this obtain i |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
129 |
where iker: "i \<in> a_kernel R S h" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
130 |
and x: "x = i \<oplus> a" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
131 |
by fast+ |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
132 |
note carr = acarr iker[THEN a_Hcarr] |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
133 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
134 |
from x |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
135 |
have "h x = h (i \<oplus> a)" by simp |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
136 |
also from carr |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
137 |
have "\<dots> = h i \<oplus>\<^bsub>S\<^esub> h a" by simp |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
138 |
also from iker |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
139 |
have "\<dots> = \<zero>\<^bsub>S\<^esub> \<oplus>\<^bsub>S\<^esub> h a" by simp |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
140 |
also from carr |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
141 |
have "\<dots> = h a" by simp |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
142 |
finally |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
143 |
show "h x = h a" . |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
144 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
145 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
146 |
lemma (in ring_hom_ring) homeq_imp_rcos: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
147 |
assumes acarr: "a \<in> carrier R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
148 |
and xcarr: "x \<in> carrier R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
149 |
and hx: "h x = h a" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
150 |
shows "x \<in> a_kernel R S h +> a" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
151 |
proof - |
29237 | 152 |
interpret ideal "a_kernel R S h" "R" by (rule kernel_is_ideal) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
153 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
154 |
note carr = acarr xcarr |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
155 |
note hcarr = acarr[THEN hom_closed] xcarr[THEN hom_closed] |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
156 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
157 |
from hx and hcarr |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
158 |
have a: "h x \<oplus>\<^bsub>S\<^esub> \<ominus>\<^bsub>S\<^esub>h a = \<zero>\<^bsub>S\<^esub>" by algebra |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
159 |
from carr |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
160 |
have "h x \<oplus>\<^bsub>S\<^esub> \<ominus>\<^bsub>S\<^esub>h a = h (x \<oplus> \<ominus>a)" by simp |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
161 |
from a and this |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
162 |
have b: "h (x \<oplus> \<ominus>a) = \<zero>\<^bsub>S\<^esub>" by simp |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
163 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
164 |
from carr have "x \<oplus> \<ominus>a \<in> carrier R" by simp |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
165 |
from this and b |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
166 |
have "x \<oplus> \<ominus>a \<in> a_kernel R S h" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
167 |
unfolding a_kernel_def' |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
168 |
by fast |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
169 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
170 |
from this and carr |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
171 |
show "x \<in> a_kernel R S h +> a" by (simp add: a_rcos_module_rev) |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
172 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
173 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
174 |
corollary (in ring_hom_ring) rcos_eq_homeq: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
175 |
assumes acarr: "a \<in> carrier R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
176 |
shows "(a_kernel R S h) +> a = {x \<in> carrier R. h x = h a}" |
68664
bd0df72c16d5
updated material concerning Algebra
paulson <lp15@cam.ac.uk>
parents:
68551
diff
changeset
|
177 |
apply rule defer 1 |
bd0df72c16d5
updated material concerning Algebra
paulson <lp15@cam.ac.uk>
parents:
68551
diff
changeset
|
178 |
apply clarsimp defer 1 |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
179 |
proof |
29237 | 180 |
interpret ideal "a_kernel R S h" "R" by (rule kernel_is_ideal) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
181 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
182 |
fix x |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
183 |
assume xrcos: "x \<in> a_kernel R S h +> a" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
184 |
from acarr and this |
68664
bd0df72c16d5
updated material concerning Algebra
paulson <lp15@cam.ac.uk>
parents:
68551
diff
changeset
|
185 |
have xcarr: "x \<in> carrier R" |
bd0df72c16d5
updated material concerning Algebra
paulson <lp15@cam.ac.uk>
parents:
68551
diff
changeset
|
186 |
by (rule a_elemrcos_carrier) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
187 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
188 |
from xrcos |
68664
bd0df72c16d5
updated material concerning Algebra
paulson <lp15@cam.ac.uk>
parents:
68551
diff
changeset
|
189 |
have "h x = h a" by (rule rcos_imp_homeq[OF acarr]) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
190 |
from xcarr and this |
68664
bd0df72c16d5
updated material concerning Algebra
paulson <lp15@cam.ac.uk>
parents:
68551
diff
changeset
|
191 |
show "x \<in> {x \<in> carrier R. h x = h a}" by fast |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
192 |
next |
29237 | 193 |
interpret ideal "a_kernel R S h" "R" by (rule kernel_is_ideal) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
194 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
195 |
fix x |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
196 |
assume xcarr: "x \<in> carrier R" |
68664
bd0df72c16d5
updated material concerning Algebra
paulson <lp15@cam.ac.uk>
parents:
68551
diff
changeset
|
197 |
and hx: "h x = h a" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
198 |
from acarr xcarr hx |
68664
bd0df72c16d5
updated material concerning Algebra
paulson <lp15@cam.ac.uk>
parents:
68551
diff
changeset
|
199 |
show "x \<in> a_kernel R S h +> a" by (rule homeq_imp_rcos) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
200 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
201 |
|
68664
bd0df72c16d5
updated material concerning Algebra
paulson <lp15@cam.ac.uk>
parents:
68551
diff
changeset
|
202 |
lemma (in ring_hom_ring) nat_pow_hom: |
bd0df72c16d5
updated material concerning Algebra
paulson <lp15@cam.ac.uk>
parents:
68551
diff
changeset
|
203 |
"x \<in> carrier R \<Longrightarrow> h (x [^] (n :: nat)) = (h x) [^]\<^bsub>S\<^esub> n" |
bd0df72c16d5
updated material concerning Algebra
paulson <lp15@cam.ac.uk>
parents:
68551
diff
changeset
|
204 |
by (induct n) (auto) |
bd0df72c16d5
updated material concerning Algebra
paulson <lp15@cam.ac.uk>
parents:
68551
diff
changeset
|
205 |
|
bd0df72c16d5
updated material concerning Algebra
paulson <lp15@cam.ac.uk>
parents:
68551
diff
changeset
|
206 |
|
68551
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
207 |
(*contributed by Paulo EmÃlio de Vilhena*) |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
208 |
lemma (in ring_hom_ring) inj_on_domain: |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
209 |
assumes "inj_on h (carrier R)" |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
210 |
shows "domain S \<Longrightarrow> domain R" |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
211 |
proof - |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
212 |
assume A: "domain S" show "domain R" |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
213 |
proof |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
214 |
have "h \<one> = \<one>\<^bsub>S\<^esub> \<and> h \<zero> = \<zero>\<^bsub>S\<^esub>" by simp |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
215 |
hence "h \<one> \<noteq> h \<zero>" |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
216 |
using domain.one_not_zero[OF A] by simp |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
217 |
thus "\<one> \<noteq> \<zero>" |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
218 |
using assms unfolding inj_on_def by fastforce |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
219 |
next |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
220 |
fix a b |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
221 |
assume a: "a \<in> carrier R" |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
222 |
and b: "b \<in> carrier R" |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
223 |
have "h (a \<otimes> b) = (h a) \<otimes>\<^bsub>S\<^esub> (h b)" by (simp add: a b) |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
224 |
also have " ... = (h b) \<otimes>\<^bsub>S\<^esub> (h a)" using a b A cringE(1)[of S] |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
225 |
by (simp add: cring.cring_simprules(14) domain_def) |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
226 |
also have " ... = h (b \<otimes> a)" by (simp add: a b) |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
227 |
finally have "h (a \<otimes> b) = h (b \<otimes> a)" . |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
228 |
thus "a \<otimes> b = b \<otimes> a" |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
229 |
using assms a b unfolding inj_on_def by simp |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
230 |
|
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
231 |
assume ab: "a \<otimes> b = \<zero>" |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
232 |
hence "h (a \<otimes> b) = \<zero>\<^bsub>S\<^esub>" by simp |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
233 |
hence "(h a) \<otimes>\<^bsub>S\<^esub> (h b) = \<zero>\<^bsub>S\<^esub>" using a b by simp |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
234 |
hence "h a = \<zero>\<^bsub>S\<^esub> \<or> h b = \<zero>\<^bsub>S\<^esub>" using a b domain.integral[OF A] by simp |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
235 |
thus "a = \<zero> \<or> b = \<zero>" |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
236 |
using a b assms unfolding inj_on_def by force |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
237 |
qed |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
238 |
qed |
b680e74eb6f2
More on Algebra by Paulo and Martin
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
239 |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
240 |
end |