author | wenzelm |
Mon, 03 Feb 2025 20:22:51 +0100 | |
changeset 82073 | 879be333e939 |
parent 81438 | 95c9af7483b1 |
permissions | -rw-r--r-- |
41959 | 1 |
(* Title: HOL/Algebra/Ideal.thy |
35849 | 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 Ideal |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
6 |
imports Ring AbelCoset |
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>Ideals\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
10 |
|
61382 | 11 |
subsection \<open>Definitions\<close> |
27717
21bbd410ba04
Generalised polynomial lemmas from cring to ring.
ballarin
parents:
27714
diff
changeset
|
12 |
|
61382 | 13 |
subsubsection \<open>General definition\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
14 |
|
29240 | 15 |
locale ideal = additive_subgroup I R + ring R for I and R (structure) + |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
16 |
assumes I_l_closed: "\<lbrakk>a \<in> I; x \<in> carrier R\<rbrakk> \<Longrightarrow> x \<otimes> a \<in> I" |
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
|
17 |
and I_r_closed: "\<lbrakk>a \<in> I; x \<in> carrier R\<rbrakk> \<Longrightarrow> a \<otimes> x \<in> I" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
18 |
|
29237 | 19 |
sublocale ideal \<subseteq> abelian_subgroup I R |
68458 | 20 |
proof (intro abelian_subgroupI3 abelian_group.intro) |
21 |
show "additive_subgroup I R" |
|
22 |
by (simp add: is_additive_subgroup) |
|
23 |
show "abelian_monoid R" |
|
24 |
by (simp add: abelian_monoid_axioms) |
|
25 |
show "abelian_group_axioms R" |
|
26 |
using abelian_group_def is_abelian_group by blast |
|
27 |
qed |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
28 |
|
44677 | 29 |
lemma (in ideal) is_ideal: "ideal I R" |
30 |
by (rule ideal_axioms) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
31 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
32 |
lemma idealI: |
27611 | 33 |
fixes R (structure) |
34 |
assumes "ring R" |
|
68443
43055b016688
New material from Martin Baillon and Paulo Emílio de Vilhena
paulson <lp15@cam.ac.uk>
parents:
67443
diff
changeset
|
35 |
assumes a_subgroup: "subgroup I (add_monoid R)" |
44677 | 36 |
and I_l_closed: "\<And>a x. \<lbrakk>a \<in> I; x \<in> carrier R\<rbrakk> \<Longrightarrow> x \<otimes> a \<in> I" |
37 |
and I_r_closed: "\<And>a x. \<lbrakk>a \<in> I; x \<in> carrier R\<rbrakk> \<Longrightarrow> a \<otimes> x \<in> I" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
38 |
shows "ideal I R" |
27611 | 39 |
proof - |
29237 | 40 |
interpret ring R by fact |
68464 | 41 |
show ?thesis |
69122
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
42 |
by (auto simp: ideal.intro ideal_axioms.intro additive_subgroupI a_subgroup ring_axioms I_l_closed I_r_closed) |
27611 | 43 |
qed |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
44 |
|
35849 | 45 |
|
69597 | 46 |
subsubsection (in ring) \<open>Ideals Generated by a Subset of \<^term>\<open>carrier R\<close>\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
47 |
|
81142 | 48 |
definition genideal :: "_ \<Rightarrow> 'a set \<Rightarrow> 'a set" |
49 |
(\<open>(\<open>open_block notation=\<open>prefix Idl\<close>\<close>Idl\<index> _)\<close> [80] 79) |
|
50 |
where "Idl\<^bsub>R\<^esub> S = \<Inter>{I. ideal I R \<and> S \<subseteq> I}" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
51 |
|
61382 | 52 |
subsubsection \<open>Principal Ideals\<close> |
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 |
locale principalideal = ideal + |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
55 |
assumes generate: "\<exists>i \<in> carrier R. I = Idl {i}" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
56 |
|
44677 | 57 |
lemma (in principalideal) is_principalideal: "principalideal I R" |
58 |
by (rule principalideal_axioms) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
59 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
60 |
lemma principalidealI: |
27611 | 61 |
fixes R (structure) |
62 |
assumes "ideal I R" |
|
47409 | 63 |
and generate: "\<exists>i \<in> carrier R. I = Idl {i}" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
64 |
shows "principalideal I R" |
27611 | 65 |
proof - |
29237 | 66 |
interpret ideal I R by fact |
44677 | 67 |
show ?thesis |
68 |
by (intro principalideal.intro principalideal_axioms.intro) |
|
69 |
(rule is_ideal, rule generate) |
|
27611 | 70 |
qed |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
71 |
|
69122
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
72 |
(* NEW ====== *) |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
73 |
lemma (in ideal) rcos_const_imp_mem: |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
74 |
assumes "i \<in> carrier R" and "I +> i = I" shows "i \<in> I" |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
75 |
using additive_subgroup.zero_closed[OF ideal.axioms(1)[OF ideal_axioms]] assms |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
76 |
by (force simp add: a_r_coset_def') |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
77 |
(* ========== *) |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
78 |
|
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
79 |
(* NEW ====== *) |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
80 |
lemma (in ring) a_rcos_zero: |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
81 |
assumes "ideal I R" "i \<in> I" shows "I +> i = I" |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
82 |
using abelian_subgroupI3[OF ideal.axioms(1) is_abelian_group] |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
83 |
by (simp add: abelian_subgroup.a_rcos_const assms) |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
84 |
(* ========== *) |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
85 |
|
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
86 |
(* NEW ====== *) |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
87 |
lemma (in ring) ideal_is_normal: |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
88 |
assumes "ideal I R" shows "I \<lhd> (add_monoid R)" |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
89 |
using abelian_subgroup.a_normal[OF abelian_subgroupI3[OF ideal.axioms(1)]] |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
90 |
abelian_group_axioms assms |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
91 |
by auto |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
92 |
(* ========== *) |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
93 |
|
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
94 |
(* NEW ====== *) |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
95 |
lemma (in ideal) a_rcos_sum: |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
96 |
assumes "a \<in> carrier R" and "b \<in> carrier R" shows "(I +> a) <+> (I +> b) = I +> (a \<oplus> b)" |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
97 |
using normal.rcos_sum[OF ideal_is_normal[OF ideal_axioms]] assms |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
98 |
unfolding set_add_def a_r_coset_def by simp |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
99 |
(* ========== *) |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
100 |
|
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
101 |
(* NEW ====== *) |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
102 |
lemma (in ring) set_add_comm: |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
103 |
assumes "I \<subseteq> carrier R" "J \<subseteq> carrier R" shows "I <+> J = J <+> I" |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
104 |
proof - |
81438 | 105 |
have "I <+> J \<subseteq> J <+> I" if "I \<subseteq> carrier R" "J \<subseteq> carrier R" for I J |
106 |
using that a_comm unfolding set_add_def' by (auto, blast) |
|
69122
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
107 |
thus ?thesis |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
108 |
using assms by auto |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
109 |
qed |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
110 |
(* ========== *) |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
111 |
|
35849 | 112 |
|
61382 | 113 |
subsubsection \<open>Maximal Ideals\<close> |
20318
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 |
locale maximalideal = ideal + |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
116 |
assumes I_notcarr: "carrier R \<noteq> I" |
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
|
117 |
and I_maximal: "\<lbrakk>ideal J R; I \<subseteq> J; J \<subseteq> carrier R\<rbrakk> \<Longrightarrow> (J = I) \<or> (J = carrier R)" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
118 |
|
44677 | 119 |
lemma (in maximalideal) is_maximalideal: "maximalideal I R" |
120 |
by (rule maximalideal_axioms) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
121 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
122 |
lemma maximalidealI: |
27611 | 123 |
fixes R |
124 |
assumes "ideal I R" |
|
47409 | 125 |
and I_notcarr: "carrier R \<noteq> I" |
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
|
126 |
and I_maximal: "\<And>J. \<lbrakk>ideal J R; I \<subseteq> J; J \<subseteq> carrier R\<rbrakk> \<Longrightarrow> (J = I) \<or> (J = carrier R)" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
127 |
shows "maximalideal I R" |
27611 | 128 |
proof - |
29237 | 129 |
interpret ideal I R by fact |
44677 | 130 |
show ?thesis |
131 |
by (intro maximalideal.intro maximalideal_axioms.intro) |
|
132 |
(rule is_ideal, rule I_notcarr, rule I_maximal) |
|
27611 | 133 |
qed |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
134 |
|
35849 | 135 |
|
61382 | 136 |
subsubsection \<open>Prime Ideals\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
137 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
138 |
locale primeideal = ideal + cring + |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
139 |
assumes I_notcarr: "carrier R \<noteq> I" |
44677 | 140 |
and I_prime: "\<lbrakk>a \<in> carrier R; b \<in> carrier R; a \<otimes> b \<in> I\<rbrakk> \<Longrightarrow> a \<in> I \<or> b \<in> I" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
141 |
|
63633 | 142 |
lemma (in primeideal) primeideal: "primeideal I R" |
44677 | 143 |
by (rule primeideal_axioms) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
144 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
145 |
lemma primeidealI: |
27611 | 146 |
fixes R (structure) |
147 |
assumes "ideal I R" |
|
47409 | 148 |
and "cring R" |
149 |
and I_notcarr: "carrier R \<noteq> I" |
|
44677 | 150 |
and I_prime: "\<And>a b. \<lbrakk>a \<in> carrier R; b \<in> carrier R; a \<otimes> b \<in> I\<rbrakk> \<Longrightarrow> a \<in> I \<or> b \<in> I" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
151 |
shows "primeideal I R" |
27611 | 152 |
proof - |
29237 | 153 |
interpret ideal I R by fact |
154 |
interpret cring R by fact |
|
44677 | 155 |
show ?thesis |
156 |
by (intro primeideal.intro primeideal_axioms.intro) |
|
157 |
(rule is_ideal, rule is_cring, rule I_notcarr, rule I_prime) |
|
27611 | 158 |
qed |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
159 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
160 |
lemma primeidealI2: |
27611 | 161 |
fixes R (structure) |
162 |
assumes "additive_subgroup I R" |
|
47409 | 163 |
and "cring R" |
164 |
and I_l_closed: "\<And>a x. \<lbrakk>a \<in> I; x \<in> carrier R\<rbrakk> \<Longrightarrow> x \<otimes> a \<in> I" |
|
44677 | 165 |
and I_r_closed: "\<And>a x. \<lbrakk>a \<in> I; x \<in> carrier R\<rbrakk> \<Longrightarrow> a \<otimes> x \<in> I" |
166 |
and I_notcarr: "carrier R \<noteq> I" |
|
167 |
and I_prime: "\<And>a b. \<lbrakk>a \<in> carrier R; b \<in> carrier R; a \<otimes> b \<in> I\<rbrakk> \<Longrightarrow> a \<in> I \<or> b \<in> I" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
168 |
shows "primeideal I R" |
27611 | 169 |
proof - |
29240 | 170 |
interpret additive_subgroup I R by fact |
29237 | 171 |
interpret cring R by fact |
69122
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
172 |
show ?thesis apply intro_locales |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
173 |
apply (intro ideal_axioms.intro) |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
174 |
apply (erule (1) I_l_closed) |
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
175 |
apply (erule (1) I_r_closed) |
68464 | 176 |
by (simp add: I_notcarr I_prime primeideal_axioms.intro) |
27611 | 177 |
qed |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
178 |
|
35849 | 179 |
|
61382 | 180 |
subsection \<open>Special Ideals\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
181 |
|
44677 | 182 |
lemma (in ring) zeroideal: "ideal {\<zero>} R" |
69122
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
183 |
by (intro idealI subgroup.intro) (simp_all add: ring_axioms) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
184 |
|
44677 | 185 |
lemma (in ring) oneideal: "ideal (carrier R) R" |
69122
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
186 |
by (rule idealI) (auto intro: ring_axioms add.subgroupI) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
187 |
|
44677 | 188 |
lemma (in "domain") zeroprimeideal: "primeideal {\<zero>} R" |
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
|
189 |
proof - |
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
|
190 |
have "carrier R \<noteq> {\<zero>}" |
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
|
191 |
by (simp add: carrier_one_not_zero) |
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
|
192 |
then show ?thesis |
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
|
193 |
by (metis (no_types, lifting) domain_axioms domain_def integral primeidealI singleton_iff zeroideal) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
194 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
195 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
196 |
|
70215
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
197 |
subsection \<open>General Ideal Properties\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
198 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
199 |
lemma (in ideal) one_imp_carrier: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
200 |
assumes I_one_closed: "\<one> \<in> I" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
201 |
shows "I = carrier R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
202 |
proof |
68464 | 203 |
show "carrier R \<subseteq> I" |
204 |
using I_r_closed assms by fastforce |
|
205 |
show "I \<subseteq> carrier R" |
|
206 |
by (rule a_subset) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
207 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
208 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
209 |
lemma (in ideal) Icarr: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
210 |
assumes iI: "i \<in> I" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
211 |
shows "i \<in> carrier R" |
44677 | 212 |
using iI by (rule a_Hcarr) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
213 |
|
70215
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
214 |
lemma (in ring) quotient_eq_iff_same_a_r_cos: |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
215 |
assumes "ideal I R" and "a \<in> carrier R" and "b \<in> carrier R" |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
216 |
shows "a \<ominus> b \<in> I \<longleftrightarrow> I +> a = I +> b" |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
217 |
proof |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
218 |
assume "I +> a = I +> b" |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
219 |
then obtain i where "i \<in> I" and "\<zero> \<oplus> a = i \<oplus> b" |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
220 |
using additive_subgroup.zero_closed[OF ideal.axioms(1)[OF assms(1)]] assms(2) |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
221 |
unfolding a_r_coset_def' by blast |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
222 |
hence "a \<ominus> b = i" |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
223 |
using assms(2-3) by (metis a_minus_def add.inv_solve_right assms(1) ideal.Icarr l_zero) |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
224 |
with \<open>i \<in> I\<close> show "a \<ominus> b \<in> I" |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
225 |
by simp |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
226 |
next |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
227 |
assume "a \<ominus> b \<in> I" |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
228 |
then obtain i where "i \<in> I" and "a = i \<oplus> b" |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
229 |
using ideal.Icarr[OF assms(1)] assms(2-3) |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
230 |
by (metis a_minus_def add.inv_solve_right) |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
231 |
hence "I +> a = (I +> i) +> b" |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
232 |
using ideal.Icarr[OF assms(1)] assms(3) |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
233 |
by (simp add: a_coset_add_assoc subsetI) |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
234 |
with \<open>i \<in> I\<close> show "I +> a = I +> b" |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
235 |
using a_rcos_zero[OF assms(1)] by simp |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
236 |
qed |
8371a25ca177
Algebraic closure: moving more theorems into their rightful places
paulson <lp15@cam.ac.uk>
parents:
69895
diff
changeset
|
237 |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
238 |
|
61382 | 239 |
subsection \<open>Intersection of Ideals\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
240 |
|
61506 | 241 |
paragraph \<open>Intersection of two ideals\<close> |
69597 | 242 |
text \<open>The intersection of any two ideals is again an ideal in \<^term>\<open>R\<close>\<close> |
61506 | 243 |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
244 |
lemma (in ring) i_intersect: |
27611 | 245 |
assumes "ideal I R" |
246 |
assumes "ideal J R" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
247 |
shows "ideal (I \<inter> J) R" |
27611 | 248 |
proof - |
29237 | 249 |
interpret ideal I R by fact |
29240 | 250 |
interpret ideal J R by fact |
68464 | 251 |
have IJ: "I \<inter> J \<subseteq> carrier R" |
252 |
by (force simp: a_subset) |
|
27611 | 253 |
show ?thesis |
44677 | 254 |
apply (intro idealI subgroup.intro) |
69122
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
255 |
apply (simp_all add: IJ ring_axioms I_l_closed assms ideal.I_l_closed ideal.I_r_closed flip: a_inv_def) |
44677 | 256 |
done |
27611 | 257 |
qed |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
258 |
|
69597 | 259 |
text \<open>The intersection of any Number of Ideals is again an Ideal in \<^term>\<open>R\<close>\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
260 |
|
68464 | 261 |
lemma (in ring) i_Intersect: |
262 |
assumes Sideals: "\<And>I. I \<in> S \<Longrightarrow> ideal I R" and notempty: "S \<noteq> {}" |
|
263 |
shows "ideal (\<Inter>S) R" |
|
264 |
proof - |
|
81438 | 265 |
have "x \<oplus> y \<in> J" if "\<forall>I\<in>S. x \<in> I" "\<forall>I\<in>S. y \<in> I" and JS: "J \<in> S" for x y J |
266 |
proof - |
|
68464 | 267 |
interpret ideal J R by (rule Sideals[OF JS]) |
81438 | 268 |
show ?thesis by (simp add: JS \<open>\<forall>I\<in>S. x \<in> I\<close> \<open>\<forall>I\<in>S. y \<in> I\<close>) |
269 |
qed |
|
270 |
moreover have "\<zero> \<in> J" if "J \<in> S" for J |
|
271 |
by (simp add: that Sideals additive_subgroup.zero_closed ideal.axioms(1)) |
|
272 |
moreover have "\<ominus> x \<in> J" if "\<forall>I\<in>S. x \<in> I" and JS: "J \<in> S" for x J |
|
273 |
proof - |
|
68464 | 274 |
interpret ideal J R by (rule Sideals[OF JS]) |
81438 | 275 |
show ?thesis by (simp add: JS \<open>\<forall>I\<in>S. x \<in> I\<close>) |
276 |
qed |
|
277 |
moreover have "y \<otimes> x \<in> J" "x \<otimes> y \<in> J" |
|
278 |
if "\<forall>I\<in>S. x \<in> I" and ycarr: "y \<in> carrier R" and JS: "J \<in> S" for x y J |
|
279 |
proof - |
|
68464 | 280 |
interpret ideal J R by (rule Sideals[OF JS]) |
81438 | 281 |
show "y \<otimes> x \<in> J" "x \<otimes> y \<in> J" using I_l_closed I_r_closed JS \<open>\<forall>I\<in>S. x \<in> I\<close> ycarr by blast+ |
282 |
qed |
|
283 |
moreover have "x \<in> carrier R" if "\<forall>I\<in>S. x \<in> I" for x |
|
284 |
proof - |
|
68464 | 285 |
obtain I0 where I0S: "I0 \<in> S" |
286 |
using notempty by blast |
|
287 |
interpret ideal I0 R by (rule Sideals[OF I0S]) |
|
288 |
have "x \<in> I0" |
|
289 |
by (simp add: I0S \<open>\<forall>I\<in>S. x \<in> I\<close>) |
|
81438 | 290 |
with a_subset show ?thesis by fast |
291 |
qed |
|
68464 | 292 |
ultimately show ?thesis |
293 |
by unfold_locales (auto simp: Inter_eq simp flip: a_inv_def) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
294 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
295 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
296 |
|
61382 | 297 |
subsection \<open>Addition of Ideals\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
298 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
299 |
lemma (in ring) add_ideals: |
68464 | 300 |
assumes idealI: "ideal I R" and idealJ: "ideal J R" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
301 |
shows "ideal (I <+> J) R" |
68464 | 302 |
proof (rule ideal.intro) |
303 |
show "additive_subgroup (I <+> J) R" |
|
304 |
by (intro ideal.axioms[OF idealI] ideal.axioms[OF idealJ] add_additive_subgroups) |
|
305 |
show "ring R" |
|
69122
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
306 |
by (rule ring_axioms) |
68464 | 307 |
show "ideal_axioms (I <+> J) R" |
308 |
proof - |
|
81438 | 309 |
have "\<exists>h\<in>I. \<exists>k\<in>J. (i \<oplus> j) \<otimes> x = h \<oplus> k" |
310 |
if xcarr: "x \<in> carrier R" and iI: "i \<in> I" and jJ: "j \<in> J" for x i j |
|
311 |
using xcarr ideal.Icarr[OF idealI iI] ideal.Icarr[OF idealJ jJ] |
|
312 |
by (meson iI ideal.I_r_closed idealJ jJ l_distr local.idealI) |
|
313 |
moreover have "\<exists>h\<in>I. \<exists>k\<in>J. x \<otimes> (i \<oplus> j) = h \<oplus> k" |
|
314 |
if xcarr: "x \<in> carrier R" and iI: "i \<in> I" and jJ: "j \<in> J" for x i j |
|
315 |
using xcarr ideal.Icarr[OF idealI iI] ideal.Icarr[OF idealJ jJ] |
|
316 |
by (meson iI ideal.I_l_closed idealJ jJ local.idealI r_distr) |
|
68464 | 317 |
ultimately show "ideal_axioms (I <+> J) R" |
318 |
by (intro ideal_axioms.intro) (auto simp: set_add_defs) |
|
319 |
qed |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
320 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
321 |
|
69597 | 322 |
subsection (in ring) \<open>Ideals generated by a subset of \<^term>\<open>carrier R\<close>\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
323 |
|
69597 | 324 |
text \<open>\<^term>\<open>genideal\<close> generates an ideal\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
325 |
lemma (in ring) genideal_ideal: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
326 |
assumes Scarr: "S \<subseteq> carrier R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
327 |
shows "ideal (Idl S) R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
328 |
unfolding genideal_def |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
329 |
proof (rule i_Intersect, fast, simp) |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
330 |
from oneideal and Scarr |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
331 |
show "\<exists>I. ideal I R \<and> S \<le> I" by fast |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
332 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
333 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
334 |
lemma (in ring) genideal_self: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
335 |
assumes "S \<subseteq> carrier R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
336 |
shows "S \<subseteq> Idl S" |
44677 | 337 |
unfolding genideal_def by fast |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
338 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
339 |
lemma (in ring) genideal_self': |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
340 |
assumes carr: "i \<in> carrier R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
341 |
shows "i \<in> Idl {i}" |
68464 | 342 |
by (simp add: genideal_def) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
343 |
|
69597 | 344 |
text \<open>\<^term>\<open>genideal\<close> generates the minimal ideal\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
345 |
lemma (in ring) genideal_minimal: |
68464 | 346 |
assumes "ideal I R" "S \<subseteq> I" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
347 |
shows "Idl S \<subseteq> I" |
68464 | 348 |
unfolding genideal_def by rule (elim InterD, simp add: assms) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
349 |
|
61382 | 350 |
text \<open>Generated ideals and subsets\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
351 |
lemma (in ring) Idl_subset_ideal: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
352 |
assumes Iideal: "ideal I R" |
44677 | 353 |
and Hcarr: "H \<subseteq> carrier R" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
354 |
shows "(Idl H \<subseteq> I) = (H \<subseteq> I)" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
355 |
proof |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
356 |
assume a: "Idl H \<subseteq> I" |
23350 | 357 |
from Hcarr have "H \<subseteq> Idl H" by (rule genideal_self) |
44677 | 358 |
with a show "H \<subseteq> I" by simp |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
359 |
next |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
360 |
fix x |
47409 | 361 |
assume "H \<subseteq> I" |
362 |
with Iideal have "I \<in> {I. ideal I R \<and> H \<subseteq> I}" by fast |
|
44677 | 363 |
then show "Idl H \<subseteq> I" unfolding genideal_def by fast |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
364 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
365 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
366 |
lemma (in ring) subset_Idl_subset: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
367 |
assumes Icarr: "I \<subseteq> carrier R" |
44677 | 368 |
and HI: "H \<subseteq> I" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
369 |
shows "Idl H \<subseteq> Idl I" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
370 |
proof - |
44677 | 371 |
from Icarr have Iideal: "ideal (Idl I) R" |
372 |
by (rule genideal_ideal) |
|
373 |
from HI and Icarr have "H \<subseteq> carrier R" |
|
374 |
by fast |
|
375 |
with Iideal have "(H \<subseteq> Idl I) = (Idl H \<subseteq> Idl I)" |
|
376 |
by (rule Idl_subset_ideal[symmetric]) |
|
68464 | 377 |
then show "Idl H \<subseteq> Idl I" |
378 |
by (meson HI Icarr genideal_self order_trans) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
379 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
380 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
381 |
lemma (in ring) Idl_subset_ideal': |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
382 |
assumes acarr: "a \<in> carrier R" and bcarr: "b \<in> carrier R" |
68464 | 383 |
shows "Idl {a} \<subseteq> Idl {b} \<longleftrightarrow> a \<in> Idl {b}" |
384 |
proof - |
|
385 |
have "Idl {a} \<subseteq> Idl {b} \<longleftrightarrow> {a} \<subseteq> Idl {b}" |
|
386 |
by (simp add: Idl_subset_ideal acarr bcarr genideal_ideal) |
|
387 |
also have "\<dots> \<longleftrightarrow> a \<in> Idl {b}" |
|
388 |
by blast |
|
389 |
finally show ?thesis . |
|
390 |
qed |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
391 |
|
44677 | 392 |
lemma (in ring) genideal_zero: "Idl {\<zero>} = {\<zero>}" |
68464 | 393 |
proof |
394 |
show "Idl {\<zero>} \<subseteq> {\<zero>}" |
|
395 |
by (simp add: genideal_minimal zeroideal) |
|
396 |
show "{\<zero>} \<subseteq> Idl {\<zero>}" |
|
397 |
by (simp add: genideal_self') |
|
398 |
qed |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
399 |
|
44677 | 400 |
lemma (in ring) genideal_one: "Idl {\<one>} = carrier R" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
401 |
proof - |
44677 | 402 |
interpret ideal "Idl {\<one>}" "R" by (rule genideal_ideal) fast |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
403 |
show "Idl {\<one>} = carrier R" |
68464 | 404 |
using genideal_self' one_imp_carrier by blast |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
405 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
406 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
407 |
|
61382 | 408 |
text \<open>Generation of Principal Ideals in Commutative Rings\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
409 |
|
81142 | 410 |
definition cgenideal :: "_ \<Rightarrow> 'a \<Rightarrow> 'a set" |
411 |
(\<open>(\<open>open_block notation=\<open>prefix PIdl\<close>\<close>PIdl\<index> _)\<close> [80] 79) |
|
412 |
where "PIdl\<^bsub>R\<^esub> a = {x \<otimes>\<^bsub>R\<^esub> a | x. x \<in> carrier R}" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
413 |
|
61382 | 414 |
text \<open>genhideal (?) really generates an ideal\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
415 |
lemma (in cring) cgenideal_ideal: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
416 |
assumes acarr: "a \<in> carrier R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
417 |
shows "ideal (PIdl a) R" |
68464 | 418 |
unfolding cgenideal_def |
69122
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
419 |
proof (intro subgroup.intro idealI[OF ring_axioms], simp_all) |
68464 | 420 |
show "{x \<otimes> a |x. x \<in> carrier R} \<subseteq> carrier R" |
421 |
by (blast intro: acarr) |
|
422 |
show "\<And>x y. \<lbrakk>\<exists>u. x = u \<otimes> a \<and> u \<in> carrier R; \<exists>x. y = x \<otimes> a \<and> x \<in> carrier R\<rbrakk> |
|
423 |
\<Longrightarrow> \<exists>v. x \<oplus> y = v \<otimes> a \<and> v \<in> carrier R" |
|
424 |
by (metis assms cring.cring_simprules(1) is_cring l_distr) |
|
425 |
show "\<exists>x. \<zero> = x \<otimes> a \<and> x \<in> carrier R" |
|
426 |
by (metis assms l_null zero_closed) |
|
427 |
show "\<And>x. \<exists>u. x = u \<otimes> a \<and> u \<in> carrier R |
|
428 |
\<Longrightarrow> \<exists>v. inv\<^bsub>add_monoid R\<^esub> x = v \<otimes> a \<and> v \<in> carrier R" |
|
429 |
by (metis a_inv_def add.inv_closed assms l_minus) |
|
430 |
show "\<And>b x. \<lbrakk>\<exists>x. b = x \<otimes> a \<and> x \<in> carrier R; x \<in> carrier R\<rbrakk> |
|
431 |
\<Longrightarrow> \<exists>z. x \<otimes> b = z \<otimes> a \<and> z \<in> carrier R" |
|
432 |
by (metis assms m_assoc m_closed) |
|
433 |
show "\<And>b x. \<lbrakk>\<exists>x. b = x \<otimes> a \<and> x \<in> carrier R; x \<in> carrier R\<rbrakk> |
|
434 |
\<Longrightarrow> \<exists>z. b \<otimes> x = z \<otimes> a \<and> z \<in> carrier R" |
|
435 |
by (metis assms m_assoc m_comm m_closed) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
436 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
437 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
438 |
lemma (in ring) cgenideal_self: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
439 |
assumes icarr: "i \<in> carrier R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
440 |
shows "i \<in> PIdl i" |
44677 | 441 |
unfolding cgenideal_def |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
442 |
proof simp |
44677 | 443 |
from icarr have "i = \<one> \<otimes> i" |
444 |
by simp |
|
445 |
with icarr show "\<exists>x. i = x \<otimes> i \<and> x \<in> carrier R" |
|
446 |
by fast |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
447 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
448 |
|
69597 | 449 |
text \<open>\<^const>\<open>cgenideal\<close> is minimal\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
450 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
451 |
lemma (in ring) cgenideal_minimal: |
27611 | 452 |
assumes "ideal J R" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
453 |
assumes aJ: "a \<in> J" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
454 |
shows "PIdl a \<subseteq> J" |
27611 | 455 |
proof - |
29240 | 456 |
interpret ideal J R by fact |
44677 | 457 |
show ?thesis |
458 |
unfolding cgenideal_def |
|
68464 | 459 |
using I_l_closed aJ by blast |
27611 | 460 |
qed |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
461 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
462 |
lemma (in cring) cgenideal_eq_genideal: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
463 |
assumes icarr: "i \<in> carrier R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
464 |
shows "PIdl i = Idl {i}" |
68464 | 465 |
proof |
466 |
show "PIdl i \<subseteq> Idl {i}" |
|
467 |
by (simp add: cgenideal_minimal genideal_ideal genideal_self' icarr) |
|
468 |
show "Idl {i} \<subseteq> PIdl i" |
|
469 |
by (simp add: cgenideal_ideal cgenideal_self genideal_minimal icarr) |
|
470 |
qed |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
471 |
|
44677 | 472 |
lemma (in cring) cgenideal_eq_rcos: "PIdl i = carrier R #> i" |
473 |
unfolding cgenideal_def r_coset_def by fast |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
474 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
475 |
lemma (in cring) cgenideal_is_principalideal: |
68464 | 476 |
assumes "i \<in> carrier R" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
477 |
shows "principalideal (PIdl i) R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
478 |
proof - |
68464 | 479 |
have "\<exists>i'\<in>carrier R. PIdl i = Idl {i'}" |
480 |
using cgenideal_eq_genideal assms by auto |
|
481 |
then show ?thesis |
|
482 |
by (simp add: cgenideal_ideal assms principalidealI) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
483 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
484 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
485 |
|
61382 | 486 |
subsection \<open>Union of Ideals\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
487 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
488 |
lemma (in ring) union_genideal: |
68464 | 489 |
assumes idealI: "ideal I R" and idealJ: "ideal J R" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
490 |
shows "Idl (I \<union> J) = I <+> J" |
68464 | 491 |
proof |
492 |
show "Idl (I \<union> J) \<subseteq> I <+> J" |
|
69122
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
493 |
proof (rule ring.genideal_minimal [OF ring_axioms]) |
68464 | 494 |
show "ideal (I <+> J) R" |
495 |
by (rule add_ideals[OF idealI idealJ]) |
|
496 |
have "\<And>x. x \<in> I \<Longrightarrow> \<exists>xa\<in>I. \<exists>xb\<in>J. x = xa \<oplus> xb" |
|
497 |
by (metis additive_subgroup.zero_closed ideal.Icarr idealJ ideal_def local.idealI r_zero) |
|
498 |
moreover have "\<And>x. x \<in> J \<Longrightarrow> \<exists>xa\<in>I. \<exists>xb\<in>J. x = xa \<oplus> xb" |
|
499 |
by (metis additive_subgroup.zero_closed ideal.Icarr idealJ ideal_def l_zero local.idealI) |
|
500 |
ultimately show "I \<union> J \<subseteq> I <+> J" |
|
501 |
by (auto simp: set_add_defs) |
|
502 |
qed |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
503 |
next |
68464 | 504 |
show "I <+> J \<subseteq> Idl (I \<union> J)" |
69712 | 505 |
by (auto simp: set_add_defs genideal_def additive_subgroup.a_closed ideal_def subsetD) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
506 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
507 |
|
61382 | 508 |
subsection \<open>Properties of Principal Ideals\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
509 |
|
61382 | 510 |
text \<open>The zero ideal is a principal ideal\<close> |
44677 | 511 |
corollary (in ring) zeropideal: "principalideal {\<zero>} R" |
68464 | 512 |
using genideal_zero principalidealI zeroideal by blast |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
513 |
|
61382 | 514 |
text \<open>The unit ideal is a principal ideal\<close> |
44677 | 515 |
corollary (in ring) onepideal: "principalideal (carrier R) R" |
68464 | 516 |
using genideal_one oneideal principalidealI by blast |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
517 |
|
61382 | 518 |
text \<open>Every principal ideal is a right coset of the carrier\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
519 |
lemma (in principalideal) rcos_generate: |
27611 | 520 |
assumes "cring R" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
521 |
shows "\<exists>x\<in>I. I = carrier R #> x" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
522 |
proof - |
29237 | 523 |
interpret cring R by fact |
44677 | 524 |
from generate obtain i where icarr: "i \<in> carrier R" and I1: "I = Idl {i}" |
525 |
by fast+ |
|
68464 | 526 |
then have "I = PIdl i" |
44677 | 527 |
by (simp add: cgenideal_eq_genideal) |
68464 | 528 |
moreover have "i \<in> I" |
529 |
by (simp add: I1 genideal_self' icarr) |
|
530 |
moreover have "PIdl i = carrier R #> i" |
|
44677 | 531 |
unfolding cgenideal_def r_coset_def by fast |
68464 | 532 |
ultimately show "\<exists>x\<in>I. I = carrier R #> x" |
44677 | 533 |
by fast |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
534 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
535 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
536 |
|
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
|
537 |
text \<open>This next lemma would be trivial if placed in a theory that imports QuotRing, |
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
|
538 |
but it makes more sense to have it here (easier to find and coherent with the |
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
|
539 |
previous developments).\<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
|
540 |
|
69895
6b03a8cf092d
more formal contributors (with the help of the history);
wenzelm
parents:
69712
diff
changeset
|
541 |
lemma (in cring) cgenideal_prod: \<^marker>\<open>contributor \<open>Paulo Emílio de Vilhena\<close>\<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
|
542 |
assumes "a \<in> carrier R" "b \<in> carrier R" |
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
|
543 |
shows "(PIdl a) <#> (PIdl b) = PIdl (a \<otimes> b)" |
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
|
544 |
proof - |
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
|
545 |
have "(carrier R #> a) <#> (carrier R #> b) = carrier R #> (a \<otimes> b)" |
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
|
546 |
proof |
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
|
547 |
show "(carrier R #> a) <#> (carrier R #> b) \<subseteq> carrier R #> a \<otimes> b" |
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
|
548 |
proof |
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
|
549 |
fix x assume "x \<in> (carrier R #> a) <#> (carrier R #> b)" |
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
|
550 |
then obtain r1 r2 where r1: "r1 \<in> carrier R" and r2: "r2 \<in> carrier R" |
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
|
551 |
and "x = (r1 \<otimes> a) \<otimes> (r2 \<otimes> b)" |
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
|
552 |
unfolding set_mult_def r_coset_def 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
|
553 |
hence "x = (r1 \<otimes> r2) \<otimes> (a \<otimes> b)" |
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
|
554 |
by (simp add: assms local.ring_axioms m_lcomm ring.ring_simprules(11)) |
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
|
555 |
thus "x \<in> carrier R #> a \<otimes> b" |
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
|
556 |
unfolding r_coset_def using r1 r2 assms 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
|
557 |
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
|
558 |
next |
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
|
559 |
show "carrier R #> a \<otimes> b \<subseteq> (carrier R #> a) <#> (carrier R #> b)" |
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
|
560 |
proof |
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
|
561 |
fix x assume "x \<in> carrier R #> a \<otimes> b" |
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
|
562 |
then obtain r where r: "r \<in> carrier R" "x = r \<otimes> (a \<otimes> b)" |
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
|
563 |
unfolding r_coset_def 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
|
564 |
hence "x = (r \<otimes> a) \<otimes> (\<one> \<otimes> b)" |
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
|
565 |
using assms by (simp add: m_assoc) |
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
|
566 |
thus "x \<in> (carrier R #> a) <#> (carrier R #> b)" |
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
|
567 |
unfolding set_mult_def r_coset_def using assms r 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
|
568 |
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
|
569 |
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
|
570 |
thus ?thesis |
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
|
571 |
using cgenideal_eq_rcos[of a] cgenideal_eq_rcos[of b] cgenideal_eq_rcos[of "a \<otimes> b"] 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
|
572 |
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
|
573 |
|
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
|
574 |
|
61382 | 575 |
subsection \<open>Prime Ideals\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
576 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
577 |
lemma (in ideal) primeidealCD: |
27611 | 578 |
assumes "cring R" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
579 |
assumes notprime: "\<not> primeideal I R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
580 |
shows "carrier R = I \<or> (\<exists>a b. a \<in> carrier R \<and> b \<in> carrier R \<and> a \<otimes> b \<in> I \<and> a \<notin> I \<and> b \<notin> I)" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
581 |
proof (rule ccontr, clarsimp) |
29237 | 582 |
interpret cring R by fact |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
583 |
assume InR: "carrier R \<noteq> I" |
44677 | 584 |
and "\<forall>a. a \<in> carrier R \<longrightarrow> (\<forall>b. a \<otimes> b \<in> I \<longrightarrow> b \<in> carrier R \<longrightarrow> a \<in> I \<or> b \<in> I)" |
585 |
then have I_prime: "\<And> a b. \<lbrakk>a \<in> carrier R; b \<in> carrier R; a \<otimes> b \<in> I\<rbrakk> \<Longrightarrow> a \<in> I \<or> b \<in> I" |
|
586 |
by simp |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
587 |
have "primeideal I R" |
68464 | 588 |
by (simp add: I_prime InR is_cring is_ideal primeidealI) |
44677 | 589 |
with notprime show False by simp |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
590 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
591 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
592 |
lemma (in ideal) primeidealCE: |
27611 | 593 |
assumes "cring R" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
594 |
assumes notprime: "\<not> primeideal I R" |
23383 | 595 |
obtains "carrier R = I" |
596 |
| "\<exists>a b. a \<in> carrier R \<and> b \<in> carrier R \<and> a \<otimes> b \<in> I \<and> a \<notin> I \<and> b \<notin> I" |
|
27611 | 597 |
proof - |
30729
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
wenzelm
parents:
30363
diff
changeset
|
598 |
interpret R: cring R by fact |
27611 | 599 |
assume "carrier R = I ==> thesis" |
600 |
and "\<exists>a b. a \<in> carrier R \<and> b \<in> carrier R \<and> a \<otimes> b \<in> I \<and> a \<notin> I \<and> b \<notin> I \<Longrightarrow> thesis" |
|
601 |
then show thesis using primeidealCD [OF R.is_cring notprime] by blast |
|
602 |
qed |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
603 |
|
63167 | 604 |
text \<open>If \<open>{\<zero>}\<close> is a prime ideal of a commutative ring, the ring is a domain\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
605 |
lemma (in cring) zeroprimeideal_domainI: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
606 |
assumes pi: "primeideal {\<zero>} R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
607 |
shows "domain R" |
68464 | 608 |
proof (intro domain.intro is_cring domain_axioms.intro) |
609 |
show "\<one> \<noteq> \<zero>" |
|
610 |
using genideal_one genideal_zero pi primeideal.I_notcarr by force |
|
611 |
show "a = \<zero> \<or> b = \<zero>" if ab: "a \<otimes> b = \<zero>" and carr: "a \<in> carrier R" "b \<in> carrier R" for a b |
|
612 |
proof - |
|
613 |
interpret primeideal "{\<zero>}" "R" by (rule pi) |
|
614 |
show "a = \<zero> \<or> b = \<zero>" |
|
615 |
using I_prime ab carr by blast |
|
616 |
qed |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
617 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
618 |
|
44677 | 619 |
corollary (in cring) domain_eq_zeroprimeideal: "domain R = primeideal {\<zero>} R" |
68443
43055b016688
New material from Martin Baillon and Paulo Emílio de Vilhena
paulson <lp15@cam.ac.uk>
parents:
67443
diff
changeset
|
620 |
using domain.zeroprimeideal zeroprimeideal_domainI by blast |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
621 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
622 |
|
61382 | 623 |
subsection \<open>Maximal Ideals\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
624 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
625 |
lemma (in ideal) helper_I_closed: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
626 |
assumes carr: "a \<in> carrier R" "x \<in> carrier R" "y \<in> carrier R" |
44677 | 627 |
and axI: "a \<otimes> x \<in> I" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
628 |
shows "a \<otimes> (x \<otimes> y) \<in> I" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
629 |
proof - |
44677 | 630 |
from axI and carr have "(a \<otimes> x) \<otimes> y \<in> I" |
631 |
by (simp add: I_r_closed) |
|
632 |
also from carr have "(a \<otimes> x) \<otimes> y = a \<otimes> (x \<otimes> y)" |
|
633 |
by (simp add: m_assoc) |
|
634 |
finally show "a \<otimes> (x \<otimes> y) \<in> I" . |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
635 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
636 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
637 |
lemma (in ideal) helper_max_prime: |
27611 | 638 |
assumes "cring R" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
639 |
assumes acarr: "a \<in> carrier R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
640 |
shows "ideal {x\<in>carrier R. a \<otimes> x \<in> I} R" |
27611 | 641 |
proof - |
29237 | 642 |
interpret cring R by fact |
68464 | 643 |
show ?thesis |
644 |
proof (rule idealI, simp_all) |
|
645 |
show "ring R" |
|
646 |
by (simp add: local.ring_axioms) |
|
647 |
show "subgroup {x \<in> carrier R. a \<otimes> x \<in> I} (add_monoid R)" |
|
648 |
by (rule subgroup.intro) (auto simp: r_distr acarr r_minus simp flip: a_inv_def) |
|
649 |
show "\<And>b x. \<lbrakk>b \<in> carrier R \<and> a \<otimes> b \<in> I; x \<in> carrier R\<rbrakk> |
|
650 |
\<Longrightarrow> a \<otimes> (x \<otimes> b) \<in> I" |
|
651 |
using acarr helper_I_closed m_comm by auto |
|
652 |
show "\<And>b x. \<lbrakk>b \<in> carrier R \<and> a \<otimes> b \<in> I; x \<in> carrier R\<rbrakk> |
|
653 |
\<Longrightarrow> a \<otimes> (b \<otimes> x) \<in> I" |
|
654 |
by (simp add: acarr helper_I_closed) |
|
27611 | 655 |
qed |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
656 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
657 |
|
61382 | 658 |
text \<open>In a cring every maximal ideal is prime\<close> |
63633 | 659 |
lemma (in cring) maximalideal_prime: |
27611 | 660 |
assumes "maximalideal I R" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
661 |
shows "primeideal I R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
662 |
proof - |
29237 | 663 |
interpret maximalideal I R by fact |
68464 | 664 |
show ?thesis |
665 |
proof (rule ccontr) |
|
666 |
assume neg: "\<not> primeideal I R" |
|
667 |
then obtain a b where acarr: "a \<in> carrier R" and bcarr: "b \<in> carrier R" |
|
668 |
and abI: "a \<otimes> b \<in> I" and anI: "a \<notin> I" and bnI: "b \<notin> I" |
|
669 |
using primeidealCE [OF is_cring] |
|
670 |
by (metis I_notcarr) |
|
63040 | 671 |
define J where "J = {x\<in>carrier R. a \<otimes> x \<in> I}" |
44677 | 672 |
from is_cring and acarr have idealJ: "ideal J R" |
673 |
unfolding J_def by (rule helper_max_prime) |
|
27611 | 674 |
have IsubJ: "I \<subseteq> J" |
68464 | 675 |
using I_l_closed J_def a_Hcarr acarr by blast |
44677 | 676 |
from abI and acarr bcarr have "b \<in> J" |
677 |
unfolding J_def by fast |
|
678 |
with bnI have JnI: "J \<noteq> I" by fast |
|
68464 | 679 |
have "\<one> \<notin> J" |
680 |
unfolding J_def by (simp add: acarr anI) |
|
44677 | 681 |
then have Jncarr: "J \<noteq> carrier R" by fast |
68464 | 682 |
interpret ideal J R by (rule idealJ) |
27611 | 683 |
have "J = I \<or> J = carrier R" |
68464 | 684 |
by (simp add: I_maximal IsubJ a_subset is_ideal) |
44677 | 685 |
with JnI and Jncarr show False by simp |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
686 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
687 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
688 |
|
35849 | 689 |
|
61382 | 690 |
subsection \<open>Derived Theorems\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
691 |
|
68464 | 692 |
text \<open>A non-zero cring that has only the two trivial ideals is a field\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
693 |
lemma (in cring) trivialideals_fieldI: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
694 |
assumes carrnzero: "carrier R \<noteq> {\<zero>}" |
44677 | 695 |
and haveideals: "{I. ideal I R} = {{\<zero>}, carrier R}" |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
696 |
shows "field R" |
68464 | 697 |
proof (intro cring_fieldI equalityI) |
698 |
show "Units R \<subseteq> carrier R - {\<zero>}" |
|
699 |
by (metis Diff_empty Units_closed Units_r_inv_ex carrnzero l_null one_zeroD subsetI subset_Diff_insert) |
|
700 |
show "carrier R - {\<zero>} \<subseteq> Units R" |
|
701 |
proof |
|
702 |
fix x |
|
703 |
assume xcarr': "x \<in> carrier R - {\<zero>}" |
|
704 |
then have xcarr: "x \<in> carrier R" and xnZ: "x \<noteq> \<zero>" by auto |
|
705 |
from xcarr have xIdl: "ideal (PIdl x) R" |
|
706 |
by (intro cgenideal_ideal) fast |
|
707 |
have "PIdl x \<noteq> {\<zero>}" |
|
708 |
using xcarr xnZ cgenideal_self by blast |
|
709 |
with haveideals have "PIdl x = carrier R" |
|
710 |
by (blast intro!: xIdl) |
|
711 |
then have "\<one> \<in> PIdl x" by simp |
|
712 |
then have "\<exists>y. \<one> = y \<otimes> x \<and> y \<in> carrier R" |
|
713 |
unfolding cgenideal_def by blast |
|
714 |
then obtain y where ycarr: " y \<in> carrier R" and ylinv: "\<one> = y \<otimes> x" |
|
715 |
by fast |
|
716 |
have "\<exists>y \<in> carrier R. y \<otimes> x = \<one> \<and> x \<otimes> y = \<one>" |
|
717 |
using m_comm xcarr ycarr ylinv by auto |
|
718 |
with xcarr show "x \<in> Units R" |
|
719 |
unfolding Units_def by fast |
|
720 |
qed |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
721 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
722 |
|
44677 | 723 |
lemma (in field) all_ideals: "{I. ideal I R} = {{\<zero>}, carrier R}" |
68464 | 724 |
proof (intro equalityI subsetI) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
725 |
fix I |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
726 |
assume a: "I \<in> {I. ideal I R}" |
44677 | 727 |
then interpret ideal I R by simp |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
728 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
729 |
show "I \<in> {{\<zero>}, carrier R}" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
730 |
proof (cases "\<exists>a. a \<in> I - {\<zero>}") |
44677 | 731 |
case True |
732 |
then obtain a where aI: "a \<in> I" and anZ: "a \<noteq> \<zero>" |
|
733 |
by fast+ |
|
68464 | 734 |
have aUnit: "a \<in> Units R" |
735 |
by (simp add: aI anZ field_Units) |
|
44677 | 736 |
then have a: "a \<otimes> inv a = \<one>" by (rule Units_r_inv) |
737 |
from aI and aUnit have "a \<otimes> inv a \<in> I" |
|
738 |
by (simp add: I_r_closed del: Units_r_inv) |
|
739 |
then have oneI: "\<one> \<in> I" by (simp add: a[symmetric]) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
740 |
have "carrier R \<subseteq> I" |
68464 | 741 |
using oneI one_imp_carrier by auto |
44677 | 742 |
with a_subset have "I = carrier R" by fast |
743 |
then show "I \<in> {{\<zero>}, carrier R}" by fast |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
744 |
next |
44677 | 745 |
case False |
746 |
then have IZ: "\<And>a. a \<in> I \<Longrightarrow> a = \<zero>" by simp |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
747 |
have a: "I \<subseteq> {\<zero>}" |
68464 | 748 |
using False by auto |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
749 |
have "\<zero> \<in> I" by simp |
44677 | 750 |
with a have "I = {\<zero>}" by fast |
751 |
then show "I \<in> {{\<zero>}, carrier R}" by fast |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
752 |
qed |
68464 | 753 |
qed (auto simp: zeroideal oneideal) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
754 |
|
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
|
755 |
\<comment>\<open>"Jacobson Theorem 2.2"\<close> |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
756 |
lemma (in cring) trivialideals_eq_field: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
757 |
assumes carrnzero: "carrier R \<noteq> {\<zero>}" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
758 |
shows "({I. ideal I R} = {{\<zero>}, carrier R}) = field R" |
44677 | 759 |
by (fast intro!: trivialideals_fieldI[OF carrnzero] field.all_ideals) |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
760 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
761 |
|
61382 | 762 |
text \<open>Like zeroprimeideal for domains\<close> |
44677 | 763 |
lemma (in field) zeromaximalideal: "maximalideal {\<zero>} R" |
68464 | 764 |
proof (intro maximalidealI zeroideal) |
44677 | 765 |
from one_not_zero have "\<one> \<notin> {\<zero>}" by simp |
766 |
with one_closed show "carrier R \<noteq> {\<zero>}" by fast |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
767 |
next |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
768 |
fix J |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
769 |
assume Jideal: "ideal J R" |
44677 | 770 |
then have "J \<in> {I. ideal I R}" by fast |
771 |
with all_ideals show "J = {\<zero>} \<or> J = carrier R" |
|
772 |
by simp |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
773 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
774 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
775 |
lemma (in cring) zeromaximalideal_fieldI: |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
776 |
assumes zeromax: "maximalideal {\<zero>} R" |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
777 |
shows "field R" |
68464 | 778 |
proof (intro trivialideals_fieldI maximalideal.I_notcarr[OF zeromax]) |
779 |
have "J = carrier R" if Jn0: "J \<noteq> {\<zero>}" and idealJ: "ideal J R" for J |
|
780 |
proof - |
|
781 |
interpret ideal J R by (rule idealJ) |
|
782 |
have "{\<zero>} \<subseteq> J" |
|
783 |
by force |
|
784 |
from zeromax idealJ this a_subset |
|
785 |
have "J = {\<zero>} \<or> J = carrier R" |
|
786 |
by (rule maximalideal.I_maximal) |
|
787 |
with Jn0 show "J = carrier R" |
|
788 |
by simp |
|
789 |
qed |
|
790 |
then show "{I. ideal I R} = {{\<zero>}, carrier R}" |
|
791 |
by (auto simp: zeroideal oneideal) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
792 |
qed |
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
793 |
|
44677 | 794 |
lemma (in cring) zeromaximalideal_eq_field: "maximalideal {\<zero>} R = field R" |
68443
43055b016688
New material from Martin Baillon and Paulo Emílio de Vilhena
paulson <lp15@cam.ac.uk>
parents:
67443
diff
changeset
|
795 |
using field.zeromaximalideal zeromaximalideal_fieldI by blast |
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
796 |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
797 |
end |