165 next |
165 next |
166 case (insert x F) then show ?case |
166 case (insert x F) then show ?case |
167 by (simp add: Pi_def smult_r_distr) |
167 by (simp add: Pi_def smult_r_distr) |
168 qed |
168 qed |
169 |
169 |
|
170 |
|
171 |
|
172 subsection \<open>Submodules\<close> |
|
173 |
|
174 locale submodule = subgroup H "add_monoid M" for H and R :: "('a, 'b) ring_scheme" and M (structure) |
|
175 + assumes smult_closed [simp, intro]: |
|
176 "\<lbrakk>a \<in> carrier R; x \<in> H\<rbrakk> \<Longrightarrow> a \<odot>\<^bsub>M\<^esub> x \<in> H" |
|
177 |
|
178 |
|
179 lemma (in module) submoduleI : |
|
180 assumes subset: "H \<subseteq> carrier M" |
|
181 and zero: "\<zero>\<^bsub>M\<^esub> \<in> H" |
|
182 and a_inv: "!!a. a \<in> H \<Longrightarrow> \<ominus>\<^bsub>M\<^esub> a \<in> H" |
|
183 and add : "\<And> a b. \<lbrakk>a \<in> H ; b \<in> H\<rbrakk> \<Longrightarrow> a \<oplus>\<^bsub>M\<^esub> b \<in> H" |
|
184 and smult_closed : "\<And> a x. \<lbrakk>a \<in> carrier R; x \<in> H\<rbrakk> \<Longrightarrow> a \<odot>\<^bsub>M\<^esub> x \<in> H" |
|
185 shows "submodule H R M" |
|
186 apply (intro submodule.intro subgroup.intro) |
|
187 using assms unfolding submodule_axioms_def |
|
188 by (simp_all add : a_inv_def) |
|
189 |
|
190 |
|
191 lemma (in module) submoduleE : |
|
192 assumes "submodule H R M" |
|
193 shows "H \<subseteq> carrier M" |
|
194 and "H \<noteq> {}" |
|
195 and "\<And>a. a \<in> H \<Longrightarrow> \<ominus>\<^bsub>M\<^esub> a \<in> H" |
|
196 and "\<And>a b. \<lbrakk>a \<in> carrier R; b \<in> H\<rbrakk> \<Longrightarrow> a \<odot>\<^bsub>M\<^esub> b \<in> H" |
|
197 and "\<And> a b. \<lbrakk>a \<in> H ; b \<in> H\<rbrakk> \<Longrightarrow> a \<oplus>\<^bsub>M\<^esub> b \<in> H" |
|
198 and "\<And> x. x \<in> H \<Longrightarrow> (a_inv M x) \<in> H" |
|
199 using group.subgroupE[of "add_monoid M" H, OF _ submodule.axioms(1)[OF assms]] a_comm_group |
|
200 submodule.smult_closed[OF assms] |
|
201 unfolding comm_group_def a_inv_def |
|
202 by auto |
|
203 |
|
204 |
|
205 lemma (in module) carrier_is_submodule : |
|
206 "submodule (carrier M) R M" |
|
207 apply (intro submoduleI) |
|
208 using a_comm_group group.inv_closed unfolding comm_group_def a_inv_def group_def monoid_def |
|
209 by auto |
|
210 |
|
211 lemma (in submodule) submodule_is_module : |
|
212 assumes "module R M" |
|
213 shows "module R (M\<lparr>carrier := H\<rparr>)" |
|
214 proof (auto intro! : moduleI abelian_group.intro) |
|
215 show "cring (R)" using assms unfolding module_def by auto |
|
216 show "abelian_monoid (M\<lparr>carrier := H\<rparr>)" |
|
217 using comm_monoid.submonoid_is_comm_monoid[OF _ subgroup_is_submonoid] assms |
|
218 unfolding abelian_monoid_def module_def abelian_group_def |
|
219 by auto |
|
220 thus "abelian_group_axioms (M\<lparr>carrier := H\<rparr>)" |
|
221 using subgroup_is_group assms |
|
222 unfolding abelian_group_axioms_def comm_group_def abelian_monoid_def module_def abelian_group_def |
|
223 by auto |
|
224 show "\<And>z. z \<in> H \<Longrightarrow> \<one>\<^bsub>R\<^esub> \<odot> z = z" |
|
225 using subgroup_imp_subset[OF subgroup_axioms] module.smult_one[OF assms] |
|
226 by auto |
|
227 fix a b x y assume a : "a \<in> carrier R" and b : "b \<in> carrier R" and x : "x \<in> H" and y : "y \<in> H" |
|
228 show "(a \<oplus>\<^bsub>R\<^esub> b) \<odot> x = a \<odot> x \<oplus> b \<odot> x" |
|
229 using a b x module.smult_l_distr[OF assms] subgroup_imp_subset[OF subgroup_axioms] |
|
230 by auto |
|
231 show "a \<odot> (x \<oplus> y) = a \<odot> x \<oplus> a \<odot> y" |
|
232 using a x y module.smult_r_distr[OF assms] subgroup_imp_subset[OF subgroup_axioms] |
|
233 by auto |
|
234 show "a \<otimes>\<^bsub>R\<^esub> b \<odot> x = a \<odot> (b \<odot> x)" |
|
235 using a b x module.smult_assoc1[OF assms] subgroup_imp_subset[OF subgroup_axioms] |
|
236 by auto |
|
237 qed |
|
238 |
|
239 |
|
240 lemma (in module) module_incl_imp_submodule : |
|
241 assumes "H \<subseteq> carrier M" |
|
242 and "module R (M\<lparr>carrier := H\<rparr>)" |
|
243 shows "submodule H R M" |
|
244 apply (intro submodule.intro) |
|
245 using add.group_incl_imp_subgroup[OF assms(1)] assms module.axioms(2)[OF assms(2)] |
|
246 module.smult_closed[OF assms(2)] |
|
247 unfolding abelian_group_def abelian_group_axioms_def comm_group_def submodule_axioms_def |
|
248 by simp_all |
|
249 |
|
250 |
170 end |
251 end |