diff -r 0035be079bee -r ead82c82da9e src/HOL/Lattice/CompleteLattice.thy --- a/src/HOL/Lattice/CompleteLattice.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Lattice/CompleteLattice.thy Wed Jun 13 18:30:11 2007 +0200 @@ -22,8 +22,8 @@ theorem ex_Sup: "\sup::'a::complete_lattice. is_Sup A sup" proof - from ex_Inf obtain sup where "is_Inf {b. \a\A. a \ b} sup" by blast - hence "is_Sup A sup" by (rule Inf_Sup) - thus ?thesis .. + then have "is_Sup A sup" by (rule Inf_Sup) + then show ?thesis .. qed text {* @@ -50,8 +50,8 @@ lemma Meet_equality [elim?]: "is_Inf A inf \ \A = inf" proof (unfold Meet_def) assume "is_Inf A inf" - thus "(THE inf. is_Inf A inf) = inf" - by (rule the_equality) (rule is_Inf_uniq) + then show "(THE inf. is_Inf A inf) = inf" + by (rule the_equality) (rule is_Inf_uniq [OF _ `is_Inf A inf`]) qed lemma MeetI [intro?]: @@ -63,8 +63,8 @@ lemma Join_equality [elim?]: "is_Sup A sup \ \A = sup" proof (unfold Join_def) assume "is_Sup A sup" - thus "(THE sup. is_Sup A sup) = sup" - by (rule the_equality) (rule is_Sup_uniq) + then show "(THE sup. is_Sup A sup) = sup" + by (rule the_equality) (rule is_Sup_uniq [OF _ `is_Sup A sup`]) qed lemma JoinI [intro?]: @@ -82,7 +82,8 @@ lemma is_Inf_Meet [intro?]: "is_Inf A (\A)" proof (unfold Meet_def) from ex_Inf obtain inf where "is_Inf A inf" .. - thus "is_Inf A (THE inf. is_Inf A inf)" by (rule theI) (rule is_Inf_uniq) + then show "is_Inf A (THE inf. is_Inf A inf)" + by (rule theI) (rule is_Inf_uniq [OF _ `is_Inf A inf`]) qed lemma Meet_greatest [intro?]: "(\a. a \ A \ x \ a) \ x \ \A" @@ -95,7 +96,8 @@ lemma is_Sup_Join [intro?]: "is_Sup A (\A)" proof (unfold Join_def) from ex_Sup obtain sup where "is_Sup A sup" .. - thus "is_Sup A (THE sup. is_Sup A sup)" by (rule theI) (rule is_Sup_uniq) + then show "is_Sup A (THE sup. is_Sup A sup)" + by (rule theI) (rule is_Sup_uniq [OF _ `is_Sup A sup`]) qed lemma Join_least [intro?]: "(\a. a \ A \ a \ x) \ \A \ x" @@ -122,15 +124,15 @@ have ge: "f ?a \ ?a" proof fix x assume x: "x \ ?H" - hence "?a \ x" .. - hence "f ?a \ f x" by (rule mono) + then have "?a \ x" .. + then have "f ?a \ f x" by (rule mono) also from x have "... \ x" .. finally show "f ?a \ x" . qed also have "?a \ f ?a" proof from ge have "f (f ?a) \ f ?a" by (rule mono) - thus "f ?a \ ?H" .. + then show "f ?a \ ?H" .. qed finally show "f ?a = ?a" . qed @@ -153,7 +155,7 @@ lemma bottom_least [intro?]: "\ \ x" proof (unfold bottom_def) have "x \ UNIV" .. - thus "\UNIV \ x" .. + then show "\UNIV \ x" .. qed lemma bottomI [intro?]: "(\a. x \ a) \ \ = x" @@ -161,7 +163,7 @@ assume "\a. x \ a" show "\UNIV = x" proof - fix a show "x \ a" . + fix a show "x \ a" by fact next fix b :: "'a::complete_lattice" assume b: "\a \ UNIV. b \ a" @@ -173,7 +175,7 @@ lemma top_greatest [intro?]: "x \ \" proof (unfold top_def) have "x \ UNIV" .. - thus "x \ \UNIV" .. + then show "x \ \UNIV" .. qed lemma topI [intro?]: "(\a. a \ x) \ \ = x" @@ -181,7 +183,7 @@ assume "\a. a \ x" show "\UNIV = x" proof - fix a show "a \ x" . + fix a show "a \ x" by fact next fix b :: "'a::complete_lattice" assume b: "\a \ UNIV. a \ b" @@ -204,8 +206,8 @@ show "\inf'. is_Inf A' inf'" proof - have "\sup. is_Sup (undual ` A') sup" by (rule ex_Sup) - hence "\sup. is_Inf (dual ` undual ` A') (dual sup)" by (simp only: dual_Inf) - thus ?thesis by (simp add: dual_ex [symmetric] image_compose [symmetric]) + then have "\sup. is_Inf (dual ` undual ` A') (dual sup)" by (simp only: dual_Inf) + then show ?thesis by (simp add: dual_ex [symmetric] image_compose [symmetric]) qed qed @@ -217,15 +219,15 @@ theorem dual_Meet [intro?]: "dual (\A) = \(dual ` A)" proof - from is_Inf_Meet have "is_Sup (dual ` A) (dual (\A))" .. - hence "\(dual ` A) = dual (\A)" .. - thus ?thesis .. + then have "\(dual ` A) = dual (\A)" .. + then show ?thesis .. qed theorem dual_Join [intro?]: "dual (\A) = \(dual ` A)" proof - from is_Sup_Join have "is_Inf (dual ` A) (dual (\A))" .. - hence "\(dual ` A) = dual (\A)" .. - thus ?thesis .. + then have "\(dual ` A) = dual (\A)" .. + then show ?thesis .. qed text {* @@ -237,10 +239,10 @@ have "\ = dual \" proof fix a' have "\ \ undual a'" .. - hence "dual (undual a') \ dual \" .. - thus "a' \ dual \" by simp + then have "dual (undual a') \ dual \" .. + then show "a' \ dual \" by simp qed - thus ?thesis .. + then show ?thesis .. qed theorem dual_top [intro?]: "dual \ = \" @@ -248,10 +250,10 @@ have "\ = dual \" proof fix a' have "undual a' \ \" .. - hence "dual \ \ dual (undual a')" .. - thus "dual \ \ a'" by simp + then have "dual \ \ dual (undual a')" .. + then show "dual \ \ a'" by simp qed - thus ?thesis .. + then show ?thesis .. qed @@ -267,13 +269,13 @@ lemma is_inf_binary: "is_inf x y (\{x, y})" proof - have "is_Inf {x, y} (\{x, y})" .. - thus ?thesis by (simp only: is_Inf_binary) + then show ?thesis by (simp only: is_Inf_binary) qed lemma is_sup_binary: "is_sup x y (\{x, y})" proof - have "is_Sup {x, y} (\{x, y})" .. - thus ?thesis by (simp only: is_Sup_binary) + then show ?thesis by (simp only: is_Sup_binary) qed instance complete_lattice \ lattice @@ -302,16 +304,16 @@ fix a assume "a \ A" also assume "A \ B" finally have "a \ B" . - thus "\B \ a" .. + then show "\B \ a" .. qed theorem Join_subset_mono: "A \ B \ \A \ \B" proof - assume "A \ B" - hence "dual ` A \ dual ` B" by blast - hence "\(dual ` B) \ \(dual ` A)" by (rule Meet_subset_antimono) - hence "dual (\B) \ dual (\A)" by (simp only: dual_Join) - thus ?thesis by (simp only: dual_leq) + then have "dual ` A \ dual ` B" by blast + then have "\(dual ` B) \ \(dual ` A)" by (rule Meet_subset_antimono) + then have "dual (\B) \ dual (\A)" by (simp only: dual_Join) + then show ?thesis by (simp only: dual_leq) qed text {* @@ -321,7 +323,7 @@ theorem Meet_Un: "\(A \ B) = \A \ \B" proof fix a assume "a \ A \ B" - thus "\A \ \B \ a" + then show "\A \ \B \ a" proof assume a: "a \ A" have "\A \ \B \ \A" .. @@ -340,13 +342,13 @@ show "b \ \A" proof fix a assume "a \ A" - hence "a \ A \ B" .. + then have "a \ A \ B" .. with b show "b \ a" .. qed show "b \ \B" proof fix a assume "a \ B" - hence "a \ A \ B" .. + then have "a \ A \ B" .. with b show "b \ a" .. qed qed @@ -370,11 +372,11 @@ theorem Meet_singleton: "\{x} = x" proof fix a assume "a \ {x}" - hence "a = x" by simp - thus "x \ a" by (simp only: leq_refl) + then have "a = x" by simp + then show "x \ a" by (simp only: leq_refl) next fix b assume "\a \ {x}. b \ a" - thus "b \ x" by simp + then show "b \ x" by simp qed theorem Join_singleton: "\{x} = x" @@ -392,12 +394,12 @@ proof fix a :: "'a::complete_lattice" assume "a \ {}" - hence False by simp - thus "\UNIV \ a" .. + then have False by simp + then show "\UNIV \ a" .. next fix b :: "'a::complete_lattice" have "b \ UNIV" .. - thus "b \ \UNIV" .. + then show "b \ \UNIV" .. qed theorem Join_empty: "\{} = \UNIV"