| author | wenzelm |
| Sun, 27 Oct 2024 11:46:04 +0100 | |
| changeset 81271 | fb391ad09b3c |
| parent 81142 | 6ad2c917dd2e |
| child 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 - |
|
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
105 |
{ fix I J assume "I \<subseteq> carrier R" "J \<subseteq> carrier R" hence "I <+> J \<subseteq> J <+> I"
|
|
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
106 |
using a_comm unfolding set_add_def' by (auto, blast) } |
|
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 - |
|
265 |
{ fix x y J
|
|
266 |
assume "\<forall>I\<in>S. x \<in> I" "\<forall>I\<in>S. y \<in> I" and JS: "J \<in> S" |
|
267 |
interpret ideal J R by (rule Sideals[OF JS]) |
|
268 |
have "x \<oplus> y \<in> J" |
|
269 |
by (simp add: JS \<open>\<forall>I\<in>S. x \<in> I\<close> \<open>\<forall>I\<in>S. y \<in> I\<close>) } |
|
270 |
moreover |
|
271 |
have "\<zero> \<in> J" if "J \<in> S" for J |
|
272 |
by (simp add: that Sideals additive_subgroup.zero_closed ideal.axioms(1)) |
|
273 |
moreover |
|
274 |
{ fix x J
|
|
275 |
assume "\<forall>I\<in>S. x \<in> I" and JS: "J \<in> S" |
|
276 |
interpret ideal J R by (rule Sideals[OF JS]) |
|
277 |
have "\<ominus> x \<in> J" |
|
278 |
by (simp add: JS \<open>\<forall>I\<in>S. x \<in> I\<close>) } |
|
279 |
moreover |
|
280 |
{ fix x y J
|
|
281 |
assume "\<forall>I\<in>S. x \<in> I" and ycarr: "y \<in> carrier R" and JS: "J \<in> S" |
|
282 |
interpret ideal J R by (rule Sideals[OF JS]) |
|
283 |
have "y \<otimes> x \<in> J" "x \<otimes> y \<in> J" |
|
284 |
using I_l_closed I_r_closed JS \<open>\<forall>I\<in>S. x \<in> I\<close> ycarr by blast+ } |
|
285 |
moreover |
|
286 |
{ fix x
|
|
287 |
assume "\<forall>I\<in>S. x \<in> I" |
|
288 |
obtain I0 where I0S: "I0 \<in> S" |
|
289 |
using notempty by blast |
|
290 |
interpret ideal I0 R by (rule Sideals[OF I0S]) |
|
291 |
have "x \<in> I0" |
|
292 |
by (simp add: I0S \<open>\<forall>I\<in>S. x \<in> I\<close>) |
|
293 |
with a_subset have "x \<in> carrier R" by fast } |
|
294 |
ultimately show ?thesis |
|
295 |
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
|
296 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
297 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
298 |
|
| 61382 | 299 |
subsection \<open>Addition of Ideals\<close> |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
300 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
301 |
lemma (in ring) add_ideals: |
| 68464 | 302 |
assumes idealI: "ideal I R" and idealJ: "ideal J R" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
303 |
shows "ideal (I <+> J) R" |
| 68464 | 304 |
proof (rule ideal.intro) |
305 |
show "additive_subgroup (I <+> J) R" |
|
306 |
by (intro ideal.axioms[OF idealI] ideal.axioms[OF idealJ] add_additive_subgroups) |
|
307 |
show "ring R" |
|
|
69122
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
308 |
by (rule ring_axioms) |
| 68464 | 309 |
show "ideal_axioms (I <+> J) R" |
310 |
proof - |
|
311 |
{ fix x i j
|
|
312 |
assume xcarr: "x \<in> carrier R" and iI: "i \<in> I" and jJ: "j \<in> J" |
|
313 |
from xcarr ideal.Icarr[OF idealI iI] ideal.Icarr[OF idealJ jJ] |
|
314 |
have "\<exists>h\<in>I. \<exists>k\<in>J. (i \<oplus> j) \<otimes> x = h \<oplus> k" |
|
315 |
by (meson iI ideal.I_r_closed idealJ jJ l_distr local.idealI) } |
|
316 |
moreover |
|
317 |
{ fix x i j
|
|
318 |
assume xcarr: "x \<in> carrier R" and iI: "i \<in> I" and jJ: "j \<in> J" |
|
319 |
from xcarr ideal.Icarr[OF idealI iI] ideal.Icarr[OF idealJ jJ] |
|
320 |
have "\<exists>h\<in>I. \<exists>k\<in>J. x \<otimes> (i \<oplus> j) = h \<oplus> k" |
|
321 |
by (meson iI ideal.I_l_closed idealJ jJ local.idealI r_distr) } |
|
322 |
ultimately show "ideal_axioms (I <+> J) R" |
|
323 |
by (intro ideal_axioms.intro) (auto simp: set_add_defs) |
|
324 |
qed |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
325 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
326 |
|
| 69597 | 327 |
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
|
328 |
|
| 69597 | 329 |
text \<open>\<^term>\<open>genideal\<close> generates an ideal\<close> |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
330 |
lemma (in ring) genideal_ideal: |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
331 |
assumes Scarr: "S \<subseteq> carrier R" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
332 |
shows "ideal (Idl S) R" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
333 |
unfolding genideal_def |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
334 |
proof (rule i_Intersect, fast, simp) |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
335 |
from oneideal and Scarr |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
336 |
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
|
337 |
qed |
|
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 "S \<subseteq> carrier R" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
341 |
shows "S \<subseteq> Idl S" |
| 44677 | 342 |
unfolding genideal_def by fast |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
343 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
344 |
lemma (in ring) genideal_self': |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
345 |
assumes carr: "i \<in> carrier R" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
346 |
shows "i \<in> Idl {i}"
|
| 68464 | 347 |
by (simp add: genideal_def) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
348 |
|
| 69597 | 349 |
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
|
350 |
lemma (in ring) genideal_minimal: |
| 68464 | 351 |
assumes "ideal I R" "S \<subseteq> I" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
352 |
shows "Idl S \<subseteq> I" |
| 68464 | 353 |
unfolding genideal_def by rule (elim InterD, simp add: assms) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
354 |
|
| 61382 | 355 |
text \<open>Generated ideals and subsets\<close> |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
356 |
lemma (in ring) Idl_subset_ideal: |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
357 |
assumes Iideal: "ideal I R" |
| 44677 | 358 |
and Hcarr: "H \<subseteq> carrier R" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
359 |
shows "(Idl H \<subseteq> I) = (H \<subseteq> I)" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
360 |
proof |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
361 |
assume a: "Idl H \<subseteq> I" |
| 23350 | 362 |
from Hcarr have "H \<subseteq> Idl H" by (rule genideal_self) |
| 44677 | 363 |
with a show "H \<subseteq> I" by simp |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
364 |
next |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
365 |
fix x |
| 47409 | 366 |
assume "H \<subseteq> I" |
367 |
with Iideal have "I \<in> {I. ideal I R \<and> H \<subseteq> I}" by fast
|
|
| 44677 | 368 |
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
|
369 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
370 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
371 |
lemma (in ring) subset_Idl_subset: |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
372 |
assumes Icarr: "I \<subseteq> carrier R" |
| 44677 | 373 |
and HI: "H \<subseteq> I" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
374 |
shows "Idl H \<subseteq> Idl I" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
375 |
proof - |
| 44677 | 376 |
from Icarr have Iideal: "ideal (Idl I) R" |
377 |
by (rule genideal_ideal) |
|
378 |
from HI and Icarr have "H \<subseteq> carrier R" |
|
379 |
by fast |
|
380 |
with Iideal have "(H \<subseteq> Idl I) = (Idl H \<subseteq> Idl I)" |
|
381 |
by (rule Idl_subset_ideal[symmetric]) |
|
| 68464 | 382 |
then show "Idl H \<subseteq> Idl I" |
383 |
by (meson HI Icarr genideal_self order_trans) |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
384 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
385 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
386 |
lemma (in ring) Idl_subset_ideal': |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
387 |
assumes acarr: "a \<in> carrier R" and bcarr: "b \<in> carrier R" |
| 68464 | 388 |
shows "Idl {a} \<subseteq> Idl {b} \<longleftrightarrow> a \<in> Idl {b}"
|
389 |
proof - |
|
390 |
have "Idl {a} \<subseteq> Idl {b} \<longleftrightarrow> {a} \<subseteq> Idl {b}"
|
|
391 |
by (simp add: Idl_subset_ideal acarr bcarr genideal_ideal) |
|
392 |
also have "\<dots> \<longleftrightarrow> a \<in> Idl {b}"
|
|
393 |
by blast |
|
394 |
finally show ?thesis . |
|
395 |
qed |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
396 |
|
| 44677 | 397 |
lemma (in ring) genideal_zero: "Idl {\<zero>} = {\<zero>}"
|
| 68464 | 398 |
proof |
399 |
show "Idl {\<zero>} \<subseteq> {\<zero>}"
|
|
400 |
by (simp add: genideal_minimal zeroideal) |
|
401 |
show "{\<zero>} \<subseteq> Idl {\<zero>}"
|
|
402 |
by (simp add: genideal_self') |
|
403 |
qed |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
404 |
|
| 44677 | 405 |
lemma (in ring) genideal_one: "Idl {\<one>} = carrier R"
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
406 |
proof - |
| 44677 | 407 |
interpret ideal "Idl {\<one>}" "R" by (rule genideal_ideal) fast
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
408 |
show "Idl {\<one>} = carrier R"
|
| 68464 | 409 |
using genideal_self' one_imp_carrier by blast |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
410 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
411 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
412 |
|
| 61382 | 413 |
text \<open>Generation of Principal Ideals in Commutative Rings\<close> |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
414 |
|
| 81142 | 415 |
definition cgenideal :: "_ \<Rightarrow> 'a \<Rightarrow> 'a set" |
416 |
(\<open>(\<open>open_block notation=\<open>prefix PIdl\<close>\<close>PIdl\<index> _)\<close> [80] 79) |
|
417 |
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
|
418 |
|
| 61382 | 419 |
text \<open>genhideal (?) really generates an ideal\<close> |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
420 |
lemma (in cring) cgenideal_ideal: |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
421 |
assumes acarr: "a \<in> carrier R" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
422 |
shows "ideal (PIdl a) R" |
| 68464 | 423 |
unfolding cgenideal_def |
|
69122
1b5178abaf97
updates to Algebra from Baillon and de Vilhena
paulson <lp15@cam.ac.uk>
parents:
68687
diff
changeset
|
424 |
proof (intro subgroup.intro idealI[OF ring_axioms], simp_all) |
| 68464 | 425 |
show "{x \<otimes> a |x. x \<in> carrier R} \<subseteq> carrier R"
|
426 |
by (blast intro: acarr) |
|
427 |
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> |
|
428 |
\<Longrightarrow> \<exists>v. x \<oplus> y = v \<otimes> a \<and> v \<in> carrier R" |
|
429 |
by (metis assms cring.cring_simprules(1) is_cring l_distr) |
|
430 |
show "\<exists>x. \<zero> = x \<otimes> a \<and> x \<in> carrier R" |
|
431 |
by (metis assms l_null zero_closed) |
|
432 |
show "\<And>x. \<exists>u. x = u \<otimes> a \<and> u \<in> carrier R |
|
433 |
\<Longrightarrow> \<exists>v. inv\<^bsub>add_monoid R\<^esub> x = v \<otimes> a \<and> v \<in> carrier R" |
|
434 |
by (metis a_inv_def add.inv_closed assms l_minus) |
|
435 |
show "\<And>b x. \<lbrakk>\<exists>x. b = x \<otimes> a \<and> x \<in> carrier R; x \<in> carrier R\<rbrakk> |
|
436 |
\<Longrightarrow> \<exists>z. x \<otimes> b = z \<otimes> a \<and> z \<in> carrier R" |
|
437 |
by (metis assms m_assoc m_closed) |
|
438 |
show "\<And>b x. \<lbrakk>\<exists>x. b = x \<otimes> a \<and> x \<in> carrier R; x \<in> carrier R\<rbrakk> |
|
439 |
\<Longrightarrow> \<exists>z. b \<otimes> x = z \<otimes> a \<and> z \<in> carrier R" |
|
440 |
by (metis assms m_assoc m_comm m_closed) |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
441 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
442 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
443 |
lemma (in ring) cgenideal_self: |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
444 |
assumes icarr: "i \<in> carrier R" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
445 |
shows "i \<in> PIdl i" |
| 44677 | 446 |
unfolding cgenideal_def |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
447 |
proof simp |
| 44677 | 448 |
from icarr have "i = \<one> \<otimes> i" |
449 |
by simp |
|
450 |
with icarr show "\<exists>x. i = x \<otimes> i \<and> x \<in> carrier R" |
|
451 |
by fast |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
452 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
453 |
|
| 69597 | 454 |
text \<open>\<^const>\<open>cgenideal\<close> is minimal\<close> |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
455 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
456 |
lemma (in ring) cgenideal_minimal: |
| 27611 | 457 |
assumes "ideal J R" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
458 |
assumes aJ: "a \<in> J" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
459 |
shows "PIdl a \<subseteq> J" |
| 27611 | 460 |
proof - |
| 29240 | 461 |
interpret ideal J R by fact |
| 44677 | 462 |
show ?thesis |
463 |
unfolding cgenideal_def |
|
| 68464 | 464 |
using I_l_closed aJ by blast |
| 27611 | 465 |
qed |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
466 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
467 |
lemma (in cring) cgenideal_eq_genideal: |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
468 |
assumes icarr: "i \<in> carrier R" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
469 |
shows "PIdl i = Idl {i}"
|
| 68464 | 470 |
proof |
471 |
show "PIdl i \<subseteq> Idl {i}"
|
|
472 |
by (simp add: cgenideal_minimal genideal_ideal genideal_self' icarr) |
|
473 |
show "Idl {i} \<subseteq> PIdl i"
|
|
474 |
by (simp add: cgenideal_ideal cgenideal_self genideal_minimal icarr) |
|
475 |
qed |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
476 |
|
| 44677 | 477 |
lemma (in cring) cgenideal_eq_rcos: "PIdl i = carrier R #> i" |
478 |
unfolding cgenideal_def r_coset_def by fast |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
479 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
480 |
lemma (in cring) cgenideal_is_principalideal: |
| 68464 | 481 |
assumes "i \<in> carrier R" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
482 |
shows "principalideal (PIdl i) R" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
483 |
proof - |
| 68464 | 484 |
have "\<exists>i'\<in>carrier R. PIdl i = Idl {i'}"
|
485 |
using cgenideal_eq_genideal assms by auto |
|
486 |
then show ?thesis |
|
487 |
by (simp add: cgenideal_ideal assms principalidealI) |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
488 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
489 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
490 |
|
| 61382 | 491 |
subsection \<open>Union of Ideals\<close> |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
492 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
493 |
lemma (in ring) union_genideal: |
| 68464 | 494 |
assumes idealI: "ideal I R" and idealJ: "ideal J R" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
495 |
shows "Idl (I \<union> J) = I <+> J" |
| 68464 | 496 |
proof |
497 |
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
|
498 |
proof (rule ring.genideal_minimal [OF ring_axioms]) |
| 68464 | 499 |
show "ideal (I <+> J) R" |
500 |
by (rule add_ideals[OF idealI idealJ]) |
|
501 |
have "\<And>x. x \<in> I \<Longrightarrow> \<exists>xa\<in>I. \<exists>xb\<in>J. x = xa \<oplus> xb" |
|
502 |
by (metis additive_subgroup.zero_closed ideal.Icarr idealJ ideal_def local.idealI r_zero) |
|
503 |
moreover have "\<And>x. x \<in> J \<Longrightarrow> \<exists>xa\<in>I. \<exists>xb\<in>J. x = xa \<oplus> xb" |
|
504 |
by (metis additive_subgroup.zero_closed ideal.Icarr idealJ ideal_def l_zero local.idealI) |
|
505 |
ultimately show "I \<union> J \<subseteq> I <+> J" |
|
506 |
by (auto simp: set_add_defs) |
|
507 |
qed |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
508 |
next |
| 68464 | 509 |
show "I <+> J \<subseteq> Idl (I \<union> J)" |
| 69712 | 510 |
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
|
511 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
512 |
|
| 61382 | 513 |
subsection \<open>Properties of Principal Ideals\<close> |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
514 |
|
| 61382 | 515 |
text \<open>The zero ideal is a principal ideal\<close> |
| 44677 | 516 |
corollary (in ring) zeropideal: "principalideal {\<zero>} R"
|
| 68464 | 517 |
using genideal_zero principalidealI zeroideal by blast |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
518 |
|
| 61382 | 519 |
text \<open>The unit ideal is a principal ideal\<close> |
| 44677 | 520 |
corollary (in ring) onepideal: "principalideal (carrier R) R" |
| 68464 | 521 |
using genideal_one oneideal principalidealI by blast |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
522 |
|
| 61382 | 523 |
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
|
524 |
lemma (in principalideal) rcos_generate: |
| 27611 | 525 |
assumes "cring R" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
526 |
shows "\<exists>x\<in>I. I = carrier R #> x" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
527 |
proof - |
| 29237 | 528 |
interpret cring R by fact |
| 44677 | 529 |
from generate obtain i where icarr: "i \<in> carrier R" and I1: "I = Idl {i}"
|
530 |
by fast+ |
|
| 68464 | 531 |
then have "I = PIdl i" |
| 44677 | 532 |
by (simp add: cgenideal_eq_genideal) |
| 68464 | 533 |
moreover have "i \<in> I" |
534 |
by (simp add: I1 genideal_self' icarr) |
|
535 |
moreover have "PIdl i = carrier R #> i" |
|
| 44677 | 536 |
unfolding cgenideal_def r_coset_def by fast |
| 68464 | 537 |
ultimately show "\<exists>x\<in>I. I = carrier R #> x" |
| 44677 | 538 |
by fast |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
539 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
540 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
541 |
|
|
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 |
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
|
543 |
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
|
544 |
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
|
545 |
|
|
69895
6b03a8cf092d
more formal contributors (with the help of the history);
wenzelm
parents:
69712
diff
changeset
|
546 |
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
|
547 |
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
|
548 |
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
|
549 |
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
|
550 |
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
|
551 |
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
|
552 |
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
|
553 |
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
|
554 |
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
|
555 |
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
|
556 |
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
|
557 |
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
|
558 |
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
|
559 |
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
|
560 |
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
|
561 |
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
|
562 |
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
|
563 |
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
|
564 |
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
|
565 |
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
|
566 |
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
|
567 |
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
|
568 |
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
|
569 |
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
|
570 |
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
|
571 |
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
|
572 |
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
|
573 |
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
|
574 |
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
|
575 |
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
|
576 |
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
|
577 |
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
|
578 |
|
|
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
|
579 |
|
| 61382 | 580 |
subsection \<open>Prime Ideals\<close> |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
581 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
582 |
lemma (in ideal) primeidealCD: |
| 27611 | 583 |
assumes "cring R" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
584 |
assumes notprime: "\<not> primeideal I R" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
585 |
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
|
586 |
proof (rule ccontr, clarsimp) |
| 29237 | 587 |
interpret cring R by fact |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
588 |
assume InR: "carrier R \<noteq> I" |
| 44677 | 589 |
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)" |
590 |
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" |
|
591 |
by simp |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
592 |
have "primeideal I R" |
| 68464 | 593 |
by (simp add: I_prime InR is_cring is_ideal primeidealI) |
| 44677 | 594 |
with notprime show False by simp |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
595 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
596 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
597 |
lemma (in ideal) primeidealCE: |
| 27611 | 598 |
assumes "cring R" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
599 |
assumes notprime: "\<not> primeideal I R" |
| 23383 | 600 |
obtains "carrier R = I" |
601 |
| "\<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 | 602 |
proof - |
|
30729
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
wenzelm
parents:
30363
diff
changeset
|
603 |
interpret R: cring R by fact |
| 27611 | 604 |
assume "carrier R = I ==> thesis" |
605 |
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" |
|
606 |
then show thesis using primeidealCD [OF R.is_cring notprime] by blast |
|
607 |
qed |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
608 |
|
| 63167 | 609 |
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
|
610 |
lemma (in cring) zeroprimeideal_domainI: |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
611 |
assumes pi: "primeideal {\<zero>} R"
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
612 |
shows "domain R" |
| 68464 | 613 |
proof (intro domain.intro is_cring domain_axioms.intro) |
614 |
show "\<one> \<noteq> \<zero>" |
|
615 |
using genideal_one genideal_zero pi primeideal.I_notcarr by force |
|
616 |
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 |
|
617 |
proof - |
|
618 |
interpret primeideal "{\<zero>}" "R" by (rule pi)
|
|
619 |
show "a = \<zero> \<or> b = \<zero>" |
|
620 |
using I_prime ab carr by blast |
|
621 |
qed |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
622 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
623 |
|
| 44677 | 624 |
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
|
625 |
using domain.zeroprimeideal zeroprimeideal_domainI by blast |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
626 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
627 |
|
| 61382 | 628 |
subsection \<open>Maximal Ideals\<close> |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
629 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
630 |
lemma (in ideal) helper_I_closed: |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
631 |
assumes carr: "a \<in> carrier R" "x \<in> carrier R" "y \<in> carrier R" |
| 44677 | 632 |
and axI: "a \<otimes> x \<in> I" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
633 |
shows "a \<otimes> (x \<otimes> y) \<in> I" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
634 |
proof - |
| 44677 | 635 |
from axI and carr have "(a \<otimes> x) \<otimes> y \<in> I" |
636 |
by (simp add: I_r_closed) |
|
637 |
also from carr have "(a \<otimes> x) \<otimes> y = a \<otimes> (x \<otimes> y)" |
|
638 |
by (simp add: m_assoc) |
|
639 |
finally show "a \<otimes> (x \<otimes> y) \<in> I" . |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
640 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
641 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
642 |
lemma (in ideal) helper_max_prime: |
| 27611 | 643 |
assumes "cring R" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
644 |
assumes acarr: "a \<in> carrier R" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
645 |
shows "ideal {x\<in>carrier R. a \<otimes> x \<in> I} R"
|
| 27611 | 646 |
proof - |
| 29237 | 647 |
interpret cring R by fact |
| 68464 | 648 |
show ?thesis |
649 |
proof (rule idealI, simp_all) |
|
650 |
show "ring R" |
|
651 |
by (simp add: local.ring_axioms) |
|
652 |
show "subgroup {x \<in> carrier R. a \<otimes> x \<in> I} (add_monoid R)"
|
|
653 |
by (rule subgroup.intro) (auto simp: r_distr acarr r_minus simp flip: a_inv_def) |
|
654 |
show "\<And>b x. \<lbrakk>b \<in> carrier R \<and> a \<otimes> b \<in> I; x \<in> carrier R\<rbrakk> |
|
655 |
\<Longrightarrow> a \<otimes> (x \<otimes> b) \<in> I" |
|
656 |
using acarr helper_I_closed m_comm by auto |
|
657 |
show "\<And>b x. \<lbrakk>b \<in> carrier R \<and> a \<otimes> b \<in> I; x \<in> carrier R\<rbrakk> |
|
658 |
\<Longrightarrow> a \<otimes> (b \<otimes> x) \<in> I" |
|
659 |
by (simp add: acarr helper_I_closed) |
|
| 27611 | 660 |
qed |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
661 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
662 |
|
| 61382 | 663 |
text \<open>In a cring every maximal ideal is prime\<close> |
| 63633 | 664 |
lemma (in cring) maximalideal_prime: |
| 27611 | 665 |
assumes "maximalideal I R" |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
666 |
shows "primeideal I R" |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
667 |
proof - |
| 29237 | 668 |
interpret maximalideal I R by fact |
| 68464 | 669 |
show ?thesis |
670 |
proof (rule ccontr) |
|
671 |
assume neg: "\<not> primeideal I R" |
|
672 |
then obtain a b where acarr: "a \<in> carrier R" and bcarr: "b \<in> carrier R" |
|
673 |
and abI: "a \<otimes> b \<in> I" and anI: "a \<notin> I" and bnI: "b \<notin> I" |
|
674 |
using primeidealCE [OF is_cring] |
|
675 |
by (metis I_notcarr) |
|
| 63040 | 676 |
define J where "J = {x\<in>carrier R. a \<otimes> x \<in> I}"
|
| 44677 | 677 |
from is_cring and acarr have idealJ: "ideal J R" |
678 |
unfolding J_def by (rule helper_max_prime) |
|
| 27611 | 679 |
have IsubJ: "I \<subseteq> J" |
| 68464 | 680 |
using I_l_closed J_def a_Hcarr acarr by blast |
| 44677 | 681 |
from abI and acarr bcarr have "b \<in> J" |
682 |
unfolding J_def by fast |
|
683 |
with bnI have JnI: "J \<noteq> I" by fast |
|
| 68464 | 684 |
have "\<one> \<notin> J" |
685 |
unfolding J_def by (simp add: acarr anI) |
|
| 44677 | 686 |
then have Jncarr: "J \<noteq> carrier R" by fast |
| 68464 | 687 |
interpret ideal J R by (rule idealJ) |
| 27611 | 688 |
have "J = I \<or> J = carrier R" |
| 68464 | 689 |
by (simp add: I_maximal IsubJ a_subset is_ideal) |
| 44677 | 690 |
with JnI and Jncarr show False by simp |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
691 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
692 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
693 |
|
| 35849 | 694 |
|
| 61382 | 695 |
subsection \<open>Derived Theorems\<close> |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
696 |
|
| 68464 | 697 |
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
|
698 |
lemma (in cring) trivialideals_fieldI: |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
699 |
assumes carrnzero: "carrier R \<noteq> {\<zero>}"
|
| 44677 | 700 |
and haveideals: "{I. ideal I R} = {{\<zero>}, carrier R}"
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
701 |
shows "field R" |
| 68464 | 702 |
proof (intro cring_fieldI equalityI) |
703 |
show "Units R \<subseteq> carrier R - {\<zero>}"
|
|
704 |
by (metis Diff_empty Units_closed Units_r_inv_ex carrnzero l_null one_zeroD subsetI subset_Diff_insert) |
|
705 |
show "carrier R - {\<zero>} \<subseteq> Units R"
|
|
706 |
proof |
|
707 |
fix x |
|
708 |
assume xcarr': "x \<in> carrier R - {\<zero>}"
|
|
709 |
then have xcarr: "x \<in> carrier R" and xnZ: "x \<noteq> \<zero>" by auto |
|
710 |
from xcarr have xIdl: "ideal (PIdl x) R" |
|
711 |
by (intro cgenideal_ideal) fast |
|
712 |
have "PIdl x \<noteq> {\<zero>}"
|
|
713 |
using xcarr xnZ cgenideal_self by blast |
|
714 |
with haveideals have "PIdl x = carrier R" |
|
715 |
by (blast intro!: xIdl) |
|
716 |
then have "\<one> \<in> PIdl x" by simp |
|
717 |
then have "\<exists>y. \<one> = y \<otimes> x \<and> y \<in> carrier R" |
|
718 |
unfolding cgenideal_def by blast |
|
719 |
then obtain y where ycarr: " y \<in> carrier R" and ylinv: "\<one> = y \<otimes> x" |
|
720 |
by fast |
|
721 |
have "\<exists>y \<in> carrier R. y \<otimes> x = \<one> \<and> x \<otimes> y = \<one>" |
|
722 |
using m_comm xcarr ycarr ylinv by auto |
|
723 |
with xcarr show "x \<in> Units R" |
|
724 |
unfolding Units_def by fast |
|
725 |
qed |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
726 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
727 |
|
| 44677 | 728 |
lemma (in field) all_ideals: "{I. ideal I R} = {{\<zero>}, carrier R}"
|
| 68464 | 729 |
proof (intro equalityI subsetI) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
730 |
fix I |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
731 |
assume a: "I \<in> {I. ideal I R}"
|
| 44677 | 732 |
then interpret ideal I R by simp |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
733 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
734 |
show "I \<in> {{\<zero>}, carrier R}"
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
735 |
proof (cases "\<exists>a. a \<in> I - {\<zero>}")
|
| 44677 | 736 |
case True |
737 |
then obtain a where aI: "a \<in> I" and anZ: "a \<noteq> \<zero>" |
|
738 |
by fast+ |
|
| 68464 | 739 |
have aUnit: "a \<in> Units R" |
740 |
by (simp add: aI anZ field_Units) |
|
| 44677 | 741 |
then have a: "a \<otimes> inv a = \<one>" by (rule Units_r_inv) |
742 |
from aI and aUnit have "a \<otimes> inv a \<in> I" |
|
743 |
by (simp add: I_r_closed del: Units_r_inv) |
|
744 |
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
|
745 |
have "carrier R \<subseteq> I" |
| 68464 | 746 |
using oneI one_imp_carrier by auto |
| 44677 | 747 |
with a_subset have "I = carrier R" by fast |
748 |
then show "I \<in> {{\<zero>}, carrier R}" by fast
|
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
749 |
next |
| 44677 | 750 |
case False |
751 |
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
|
752 |
have a: "I \<subseteq> {\<zero>}"
|
| 68464 | 753 |
using False by auto |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
754 |
have "\<zero> \<in> I" by simp |
| 44677 | 755 |
with a have "I = {\<zero>}" by fast
|
756 |
then show "I \<in> {{\<zero>}, carrier R}" by fast
|
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
757 |
qed |
| 68464 | 758 |
qed (auto simp: zeroideal oneideal) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
759 |
|
|
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
|
760 |
\<comment>\<open>"Jacobson Theorem 2.2"\<close> |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
761 |
lemma (in cring) trivialideals_eq_field: |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
762 |
assumes carrnzero: "carrier R \<noteq> {\<zero>}"
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
763 |
shows "({I. ideal I R} = {{\<zero>}, carrier R}) = field R"
|
| 44677 | 764 |
by (fast intro!: trivialideals_fieldI[OF carrnzero] field.all_ideals) |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
765 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
766 |
|
| 61382 | 767 |
text \<open>Like zeroprimeideal for domains\<close> |
| 44677 | 768 |
lemma (in field) zeromaximalideal: "maximalideal {\<zero>} R"
|
| 68464 | 769 |
proof (intro maximalidealI zeroideal) |
| 44677 | 770 |
from one_not_zero have "\<one> \<notin> {\<zero>}" by simp
|
771 |
with one_closed show "carrier R \<noteq> {\<zero>}" by fast
|
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
772 |
next |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
773 |
fix J |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
774 |
assume Jideal: "ideal J R" |
| 44677 | 775 |
then have "J \<in> {I. ideal I R}" by fast
|
776 |
with all_ideals show "J = {\<zero>} \<or> J = carrier R"
|
|
777 |
by simp |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
778 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
779 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
780 |
lemma (in cring) zeromaximalideal_fieldI: |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
781 |
assumes zeromax: "maximalideal {\<zero>} R"
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
782 |
shows "field R" |
| 68464 | 783 |
proof (intro trivialideals_fieldI maximalideal.I_notcarr[OF zeromax]) |
784 |
have "J = carrier R" if Jn0: "J \<noteq> {\<zero>}" and idealJ: "ideal J R" for J
|
|
785 |
proof - |
|
786 |
interpret ideal J R by (rule idealJ) |
|
787 |
have "{\<zero>} \<subseteq> J"
|
|
788 |
by force |
|
789 |
from zeromax idealJ this a_subset |
|
790 |
have "J = {\<zero>} \<or> J = carrier R"
|
|
791 |
by (rule maximalideal.I_maximal) |
|
792 |
with Jn0 show "J = carrier R" |
|
793 |
by simp |
|
794 |
qed |
|
795 |
then show "{I. ideal I R} = {{\<zero>}, carrier R}"
|
|
796 |
by (auto simp: zeroideal oneideal) |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
797 |
qed |
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
798 |
|
| 44677 | 799 |
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
|
800 |
using field.zeromaximalideal zeromaximalideal_fieldI by blast |
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
801 |
|
|
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
diff
changeset
|
802 |
end |