# HG changeset patch # User Lars Hupel # Date 1537961770 -7200 # Node ID a74b09822d7959c358246a9a364e3ef3cf41ad3c # Parent b9aca3b9619f74577d1e9a4db87a7b3eb51ce556 remove dubious import diff -r b9aca3b9619f -r a74b09822d79 src/HOL/Algebra/Ring_Divisibility.thy --- a/src/HOL/Algebra/Ring_Divisibility.thy Tue Sep 25 20:41:27 2018 +0200 +++ b/src/HOL/Algebra/Ring_Divisibility.thy Wed Sep 26 13:36:10 2018 +0200 @@ -3,7 +3,7 @@ *) theory Ring_Divisibility -imports Ideal Divisibility QuotRing Multiplicative_Group HOL.Zorn +imports Ideal Divisibility QuotRing Multiplicative_Group begin @@ -24,7 +24,7 @@ locale principal_domain = domain + assumes exists_gen: "ideal I R \ \a \ carrier R. I = PIdl a" -locale euclidean_domain = +locale euclidean_domain = domain R for R (structure) + fixes \ :: "'a \ nat" assumes euclidean_function: " \ a \ carrier R - { \ }; b \ carrier R - { \ } \ \ @@ -70,7 +70,7 @@ lemma (in cring) divides_one: assumes "a \ carrier R" shows "a divides \ \ a \ Units R" - using assms m_comm unfolding factor_def Units_def by force + using assms m_comm unfolding factor_def Units_def by force lemma (in ring) one_divides: assumes "a \ carrier R" shows "\ divides a" @@ -91,7 +91,7 @@ lemma (in ring) divides_mult: assumes "a \ carrier R" "c \ carrier R" shows "a divides b \ (c \ a) divides (c \ b)" - using m_assoc[OF assms(2,1)] unfolding factor_def by auto + using m_assoc[OF assms(2,1)] unfolding factor_def by auto lemma (in domain) mult_divides: assumes "a \ carrier R" "b \ carrier R" "c \ carrier R - { \ }" @@ -178,7 +178,7 @@ using c A integral_iff by auto thus "properfactor R b a" using A divides_imp_divides_mult[of a b] unfolding properfactor_def - by (meson DiffI divides_mult_imp_divides empty_iff insert_iff) + by (meson DiffI divides_mult_imp_divides empty_iff insert_iff) qed lemma (in domain) properfactor_imp_properfactor_mult: @@ -321,7 +321,7 @@ hence "p divides\<^bsub>(mult_of R)\<^esub> (a \ b)" using divides_imp_divides_mult[OF assms _ dvd] m_closed[OF a b] by simp moreover have "a \ \" "b \ \" "c \ \" - using False a b c p l_null integral_iff by (auto, simp add: assms) + using False a b c p l_null integral_iff by (auto, simp add: assms) ultimately show ?thesis using a b p unfolding prime_def by (auto, metis Diff_iff divides_mult_imp_divides singletonD) @@ -341,7 +341,7 @@ lemma (in domain) ring_primeI': assumes "p \ carrier R - { \ }" "prime (mult_of R) p" shows "ring_prime p" - using assms prime_eq_prime_mult unfolding ring_prime_def by auto + using assms prime_eq_prime_mult unfolding ring_prime_def by auto subsection \Basic Properties\ @@ -349,14 +349,14 @@ lemma (in cring) to_contain_is_to_divide: assumes "a \ carrier R" "b \ carrier R" shows "PIdl b \ PIdl a \ a divides b" -proof +proof show "PIdl b \ PIdl a \ a divides b" proof - assume "PIdl b \ PIdl a" hence "b \ PIdl a" by (meson assms(2) local.ring_axioms ring.cgenideal_self subsetCE) thus ?thesis - unfolding factor_def cgenideal_def using m_comm assms(1) by blast + unfolding factor_def cgenideal_def using m_comm assms(1) by blast qed show "a divides b \ PIdl b \ PIdl a" proof - @@ -406,13 +406,13 @@ unfolding cgenideal_def by force qed thus "carrier R = PIdl a" - using assms by (simp add: cgenideal_eq_rcos r_coset_subset_G subset_antisym) + using assms by (simp add: cgenideal_eq_rcos r_coset_subset_G subset_antisym) qed lemma (in domain) primeideal_iff_prime: assumes "p \ carrier R - { \ }" shows "primeideal (PIdl p) R \ ring_prime p" -proof +proof assume PIdl: "primeideal (PIdl p) R" show "ring_prime p" proof (rule ring_primeI) show "p \ \" using assms by simp @@ -455,7 +455,7 @@ assumes "subset.chain { I. ideal I R } C" shows "ideal (if C = {} then { \ } else (\C)) R" proof (cases "C = {}") - case True thus ?thesis by (simp add: zeroideal) + case True thus ?thesis by (simp add: zeroideal) next case False have "ideal (\C) R" proof (rule idealI[OF ring_axioms]) @@ -472,11 +472,11 @@ next fix x y assume "x \ \C" "y \ \C" then obtain I where I: "I \ C" "x \ I" "y \ I" - using assms unfolding pred_on.chain_def by blast + using assms unfolding pred_on.chain_def by blast hence ideal: "ideal I R" using assms unfolding pred_on.chain_def by auto thus "x \\<^bsub>add_monoid R\<^esub> y \ \C" - using UnionI I additive_subgroup.a_closed unfolding ideal_def by fastforce + using UnionI I additive_subgroup.a_closed unfolding ideal_def by fastforce show "inv\<^bsub>add_monoid R\<^esub> x \ \C" using UnionI I additive_subgroup.a_inv_closed ideal unfolding ideal_def a_inv_def by metis @@ -532,7 +532,7 @@ proof (auto simp add: noetherian_ring_def noetherian_ring_axioms_def ring_axioms) fix I assume I: "ideal I R" have in_carrier: "I \ carrier R" and add_subgroup: "additive_subgroup I R" - using ideal.axioms(1)[OF I] additive_subgroup.a_subset by auto + using ideal.axioms(1)[OF I] additive_subgroup.a_subset by auto define S where "S = { Idl S' | S'. S' \ I \ finite S' }" have "\M \ S. \S' \ S. M \ S' \ S' = M" @@ -572,7 +572,7 @@ by auto have "M \ Idl (insert a S')" using S' a(1) genideal_minimal[of "Idl (insert a S')" S'] - in_carrier genideal_ideal genideal_self + in_carrier genideal_ideal genideal_self by (meson insert_subset subset_trans) moreover have "Idl (insert a S') \ S" using a(1) S' by (auto simp add: S_def) @@ -610,7 +610,7 @@ ultimately have "\C \ C" using ideal_chain_is_trivial by simp hence "\C \ S" - using chain unfolding pred_on.chain_def by auto + using chain unfolding pred_on.chain_def by auto then obtain r where r: "\C = PIdl r" "r \ carrier R - { \ }" "r \ Units R" "\ ?factorizable r" by (auto simp add: S_def) have "\p. p \ carrier R - { \ } \ p \ Units R \ \ ?factorizable p \ p divides r \ \ r divides p" @@ -712,7 +712,7 @@ proof show "ring_irreducible p \ ring_prime p" using maximalideal_prime[OF irreducible_imp_maximalideal] ring_irreducibleE(1) - primeideal_iff_prime assms by auto + primeideal_iff_prime assms by auto next show "ring_prime p \ ring_irreducible p" using mult_of.prime_irreducible ring_primeI[of p] ring_irreducibleI' assms @@ -757,7 +757,7 @@ by (auto intro!: mult_of.factorial_monoidI) sublocale principal_domain \ factorial_domain - unfolding factorial_domain_def using domain_axioms mult_of.factorial_monoid_axioms by simp + unfolding factorial_domain_def using domain_axioms mult_of.factorial_monoid_axioms by simp lemma (in principal_domain) ideal_sum_iff_gcd: assumes "a \ carrier R" "b \ carrier R" "d \ carrier R" @@ -826,12 +826,12 @@ next fix I assume I: "ideal I R" have "principalideal I R" proof (cases "I = { \ }") - case True thus ?thesis by (simp add: zeropideal) + case True thus ?thesis by (simp add: zeropideal) next case False hence A: "I - { \ } \ {}" - using I additive_subgroup.zero_closed ideal.axioms(1) by auto + using I additive_subgroup.zero_closed ideal.axioms(1) by auto define phi_img :: "nat set" where "phi_img = (\ ` (I - { \ }))" - hence "phi_img \ {}" using A by simp + hence "phi_img \ {}" using A by simp then obtain m where "m \ phi_img" "\k. k \ phi_img \ m \ k" using exists_least_iff[of "\n. n \ phi_img"] not_less by force then obtain a where a: "a \ I - { \ }" "\b. b \ I - { \ } \ \ a \ \ b" @@ -850,7 +850,7 @@ unfolding cgenideal_def using m_comm[of a] ideal.Icarr[OF I] a(1) by auto hence 1: "\ r < \ a \ r \ \" using eucl_div(4) b(2) by auto - + have "r = (\ (a \ q)) \ b" using eucl_div(1-3) a(1) b(1) ideal.Icarr[OF I] r_neg1 by auto moreover have "\ (a \ q) \ I" @@ -884,4 +884,4 @@ by blast qed -end \ No newline at end of file +end