# HG changeset patch # User wenzelm # Date 1181752211 -7200 # Node ID ead82c82da9e9343e409c2af7dda50a79d9374be # Parent 0035be079bee2da7daacc2eae2364590cc7ef533 tuned proofs: avoid implicit prems; diff -r 0035be079bee -r ead82c82da9e src/HOL/Bali/TypeSafe.thy --- a/src/HOL/Bali/TypeSafe.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Bali/TypeSafe.thy Wed Jun 13 18:30:11 2007 +0200 @@ -2680,8 +2680,8 @@ qed next case (Super s L accC T A) - have conf_s: "Norm s\\(G, L)" . - have wt: "\prg = G, cls = accC, lcl = L\\In1l Super\T" . + note conf_s = `Norm s\\(G, L)` + note wt = `\prg = G, cls = accC, lcl = L\\In1l Super\T` then obtain C c where C: "L This = Some (Class C)" and neq_Obj: "C\Object" and @@ -3426,10 +3426,10 @@ have "\ j. abrupt s2 = Some (Jump j) \ j=Ret" by (rule jumpNestingOk_evalE) (auto intro: jmpOk simp add: s1_no_jmp) moreover - have "s3 = + note `s3 = (if \l. abrupt s2 = Some (Jump (Break l)) \ abrupt s2 = Some (Jump (Cont l)) - then abupd (\x. Some (Error CrossMethodJump)) s2 else s2)" . + then abupd (\x. Some (Error CrossMethodJump)) s2 else s2)` ultimately show ?thesis by force qed @@ -3649,8 +3649,8 @@ from eval_e1 wt_e1 da_e1 wf True have "nrm E1 \ dom (locals (store s1))" by (cases rule: da_good_approxE') iprover - with da_e2 show ?thesis - by (rule da_weakenE) + with da_e2 show thesis + by (rule da_weakenE) (rule that) qed with conf_s1 wt_e2 obtain conf_s2: "s2\\(G, L)" and error_free_s2: "error_free s2" diff -r 0035be079bee -r ead82c82da9e src/HOL/Extraction/Higman.thy --- a/src/HOL/Extraction/Higman.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Extraction/Higman.thy Wed Jun 13 18:30:11 2007 +0200 @@ -146,16 +146,18 @@ assumes ab: "a \ b" and bar: "bar xs" shows "\ys zs. bar ys \ T a xs zs \ T b ys zs \ bar zs" using bar proof induct - fix xs zs assume "good xs" and "T a xs zs" - show "bar zs" by (rule bar1) (rule lemma3) + fix xs zs assume "T a xs zs" and "good xs" + hence "good zs" by (rule lemma3) + then show "bar zs" by (rule bar1) next fix xs ys assume I: "\w ys zs. bar ys \ T a (w # xs) zs \ T b ys zs \ bar zs" assume "bar ys" thus "\zs. T a xs zs \ T b ys zs \ bar zs" proof induct - fix ys zs assume "good ys" and "T b ys zs" - show "bar zs" by (rule bar1) (rule lemma3) + fix ys zs assume "T b ys zs" and "good ys" + then have "good zs" by (rule lemma3) + then show "bar zs" by (rule bar1) next fix ys zs assume I': "\w zs. T a xs zs \ T b (w # ys) zs \ bar zs" and ys: "\w. bar (w # ys)" and Ta: "T a xs zs" and Tb: "T b ys zs" @@ -189,8 +191,9 @@ shows "\zs. xs \ [] \ R a xs zs \ bar zs" using bar proof induct fix xs zs - assume "good xs" and "R a xs zs" - show "bar zs" by (rule bar1) (rule lemma2) + assume "R a xs zs" and "good xs" + then have "good zs" by (rule lemma2) + then show "bar zs" by (rule bar1) next fix xs zs assume I: "\w zs. w # xs \ [] \ R a (w # xs) zs \ bar zs" @@ -299,7 +302,7 @@ thus ?case by iprover next case (bar2 ws) - have "is_prefix (f (length ws) # ws) f" by simp + from bar2.prems have "is_prefix (f (length ws) # ws) f" by simp thus ?case by (iprover intro: bar2) qed diff -r 0035be079bee -r ead82c82da9e src/HOL/Extraction/QuotRem.thy --- a/src/HOL/Extraction/QuotRem.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Extraction/QuotRem.thy Wed Jun 13 18:30:11 2007 +0200 @@ -30,7 +30,7 @@ thus ?case by iprover next assume "r \ b" - hence "r < b" by (simp add: order_less_le) + with `r \ b` have "r < b" by (simp add: order_less_le) with I have "Suc a = Suc b * q + (Suc r) \ (Suc r) \ b" by simp thus ?case by iprover qed diff -r 0035be079bee -r ead82c82da9e src/HOL/Extraction/Warshall.thy --- a/src/HOL/Extraction/Warshall.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Extraction/Warshall.thy Wed Jun 13 18:30:11 2007 +0200 @@ -111,9 +111,10 @@ (\q. is_path r q i j i) \ (\q'. is_path r q' i i k)" proof (simp cong add: conj_cong add: split_paired_all is_path_def, (erule conjE)+) fix xs - assume "list_all (\x. x < Suc i) xs" - assume "is_path' r j xs k" - assume "\ list_all (\x. x < i) xs" + assume asms: + "list_all (\x. x < Suc i) xs" + "is_path' r j xs k" + "\ list_all (\x. x < i) xs" show "(\ys. list_all (\x. x < i) ys \ is_path' r j ys i) \ (\ys. list_all (\x. x < i) ys \ is_path' r i ys k)" proof @@ -182,7 +183,7 @@ qed qed qed - qed + qed (rule asms)+ qed theorem lemma5': diff -r 0035be079bee -r ead82c82da9e src/HOL/IMP/Transition.thy --- a/src/HOL/IMP/Transition.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/IMP/Transition.thy Wed Jun 13 18:30:11 2007 +0200 @@ -366,7 +366,7 @@ "\c, s\ \\<^sub>c s' = \c,s\ \\<^sub>1\<^sup>* \s'\" proof assume "\c,s\ \\<^sub>c s'" - show "\c, s\ \\<^sub>1\<^sup>* \s'\" by (rule evalc_imp_evalc1) + then show "\c, s\ \\<^sub>1\<^sup>* \s'\" by (rule evalc_imp_evalc1) next assume "\c, s\ \\<^sub>1\<^sup>* \s'\" then obtain n where "\c, s\ -n\\<^sub>1 \s'\" by (blast dest: rtrancl_imp_rel_pow) @@ -460,7 +460,7 @@ proof - assume "\b s" have "\?w, s\ \\<^sub>1 \\ b \ c;?w \ \, s\" .. - also have "\\ b \ c;?w \ \, s\ \\<^sub>1 \\, s\" .. + also from `\b s` have "\\ b \ c;?w \ \, s\ \\<^sub>1 \\, s\" .. also have "\\, s\ \\<^sub>1 \s\" .. finally show "\?w, s\ \\<^sub>1\<^sup>* \s\" .. qed @@ -471,7 +471,7 @@ proof - assume "b s" have "\?w, s\ \\<^sub>1 \\ b \ c;?w \ \, s\" .. - also have "\\ b \ c;?w \ \, s\ \\<^sub>1 \c;?w, s\" .. + also from `b s` have "\\ b \ c;?w \ \, s\ \\<^sub>1 \c;?w, s\" .. finally show "\?w, s\ \\<^sub>1\<^sup>* \c;?w,s\" .. qed diff -r 0035be079bee -r ead82c82da9e src/HOL/Isar_examples/BasicLogic.thy --- a/src/HOL/Isar_examples/BasicLogic.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Isar_examples/BasicLogic.thy Wed Jun 13 18:30:11 2007 +0200 @@ -45,8 +45,8 @@ assume A show C proof (rule mp) - show "B --> C" by (rule mp) - show B by (rule mp) + show "B --> C" by (rule mp) assumption+ + show B by (rule mp) assumption+ qed qed qed @@ -65,7 +65,7 @@ lemma "A --> A" proof assume A - show A . + show A by assumption qed text {* @@ -117,7 +117,7 @@ lemma "A --> B --> A" proof (intro impI) assume A - show A . + show A by assumption qed text {* @@ -162,8 +162,8 @@ assume "A & B" show "B & A" proof - show B by (rule conjunct2) - show A by (rule conjunct1) + show B by (rule conjunct2) assumption + show A by (rule conjunct1) assumption qed qed @@ -171,10 +171,9 @@ Above, the @{text "conjunct_1/2"} projection rules had to be named explicitly, since the goals @{text B} and @{text A} did not provide any structural clue. This may be avoided using \isacommand{from} to - focus on @{text prems} (i.e.\ the @{text "A \ B"} assumption) as the - current facts, enabling the use of double-dot proofs. Note that - \isacommand{from} already does forward-chaining, involving the - \name{conjE} rule here. + focus on the @{text "A \ B"} assumption as the current facts, + enabling the use of double-dot proofs. Note that \isacommand{from} + already does forward-chaining, involving the \name{conjE} rule here. *} lemma "A & B --> B & A" @@ -182,8 +181,8 @@ assume "A & B" show "B & A" proof - from prems show B .. - from prems show A .. + from `A & B` show B .. + from `A & B` show A .. qed qed @@ -202,8 +201,8 @@ assume "A & B" then show "B & A" proof -- {* rule @{text conjE} of @{text "A \ B"} *} - assume A B - show ?thesis .. -- {* rule @{text conjI} of @{text "B \ A"} *} + assume B A + then show ?thesis .. -- {* rule @{text conjI} of @{text "B \ A"} *} qed qed @@ -215,10 +214,10 @@ lemma "A & B --> B & A" proof - assume ab: "A & B" - from ab have a: A .. - from ab have b: B .. - from b a show "B & A" .. + assume "A & B" + from `A & B` have A .. + from `A & B` have B .. + from `B` `A` show "B & A" .. qed text {* @@ -230,12 +229,12 @@ lemma "A & B --> B & A" proof - { - assume ab: "A & B" - from ab have a: A .. - from ab have b: B .. - from b a have "B & A" .. + assume "A & B" + from `A & B` have A .. + from `A & B` have B .. + from `B` `A` have "B & A" .. } - thus ?thesis .. -- {* rule \name{impI} *} + then show ?thesis .. -- {* rule \name{impI} *} qed text {* @@ -258,19 +257,16 @@ text {* For our example the most appropriate way of reasoning is probably the middle one, with conjunction introduction done after - elimination. This reads even more concisely using - \isacommand{thus}, which abbreviates - \isacommand{then}~\isacommand{show}.\footnote{In the same vein, - \isacommand{hence} abbreviates \isacommand{then}~\isacommand{have}.} + elimination. *} lemma "A & B --> B & A" proof assume "A & B" - thus "B & A" + then show "B & A" proof - assume A B - show ?thesis .. + assume B A + then show ?thesis .. qed qed @@ -294,13 +290,13 @@ lemma "P | P --> P" proof assume "P | P" - thus P + then show P proof -- {* rule @{text disjE}: \smash{$\infer{C}{A \disj B & \infer*{C}{[A]} & \infer*{C}{[B]}}$} *} - assume P show P . + assume P show P by assumption next - assume P show P . + assume P show P by assumption qed qed @@ -331,11 +327,11 @@ lemma "P | P --> P" proof assume "P | P" - thus P + then show P proof assume P - show P . - show P . + show P by assumption + show P by assumption qed qed @@ -349,7 +345,7 @@ lemma "P | P --> P" proof assume "P | P" - thus P .. + then show P .. qed @@ -372,13 +368,13 @@ lemma "(EX x. P (f x)) --> (EX y. P y)" proof assume "EX x. P (f x)" - thus "EX y. P y" + then show "EX y. P y" proof (rule exE) -- {* rule \name{exE}: \smash{$\infer{B}{\ex x A(x) & \infer*{B}{[A(x)]_x}}$} *} fix a assume "P (f a)" (is "P ?witness") - show ?thesis by (rule exI [of P ?witness]) + then show ?thesis by (rule exI [of P ?witness]) qed qed @@ -394,11 +390,11 @@ lemma "(EX x. P (f x)) --> (EX y. P y)" proof assume "EX x. P (f x)" - thus "EX y. P y" + then show "EX y. P y" proof fix a assume "P (f a)" - show ?thesis .. + then show ?thesis .. qed qed @@ -413,7 +409,7 @@ proof assume "EX x. P (f x)" then obtain a where "P (f a)" .. - thus "EX y. P y" .. + then show "EX y. P y" .. qed text {* @@ -443,18 +439,9 @@ assume r: "A ==> B ==> C" show C proof (rule r) - show A by (rule conjunct1) - show B by (rule conjunct2) + show A by (rule conjunct1) assumption + show B by (rule conjunct2) assumption qed qed -text {* - Note that classic Isabelle handles higher rules in a slightly - different way. The tactic script as given in \cite{isabelle-intro} - for the same example of \name{conjE} depends on the primitive - \texttt{goal} command to decompose the rule into premises and - conclusion. The actual result would then emerge by discharging of - the context at \texttt{qed} time. -*} - end diff -r 0035be079bee -r ead82c82da9e src/HOL/Isar_examples/Cantor.thy --- a/src/HOL/Isar_examples/Cantor.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Isar_examples/Cantor.thy Wed Jun 13 18:30:11 2007 +0200 @@ -34,15 +34,15 @@ proof assume "?S : range f" then obtain y where "?S = f y" .. - thus False + then show False proof (rule equalityCE) assume "y : f y" - assume "y : ?S" hence "y ~: f y" .. - thus ?thesis by contradiction + assume "y : ?S" then have "y ~: f y" .. + with `y : f y` show ?thesis by contradiction next assume "y ~: ?S" - assume "y ~: f y" hence "y : ?S" .. - thus ?thesis by contradiction + assume "y ~: f y" then have "y : ?S" .. + with `y ~: ?S` show ?thesis by contradiction qed qed qed diff -r 0035be079bee -r ead82c82da9e src/HOL/Isar_examples/ExprCompiler.thy --- a/src/HOL/Isar_examples/ExprCompiler.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Isar_examples/ExprCompiler.thy Wed Jun 13 18:30:11 2007 +0200 @@ -121,11 +121,14 @@ case (Cons x xs) show ?case proof (induct x) - case Const show ?case by simp + case Const + from Cons show ?case by simp next - case Load show ?case by simp + case Load + from Cons show ?case by simp next - case Apply show ?case by simp + case Apply + from Cons show ?case by simp qed qed @@ -139,7 +142,7 @@ next case Binop then show ?case by (simp add: exec_append) qed - thus ?thesis by (simp add: execute_def) + then show ?thesis by (simp add: execute_def) qed diff -r 0035be079bee -r ead82c82da9e src/HOL/Isar_examples/MutilatedCheckerboard.thy --- a/src/HOL/Isar_examples/MutilatedCheckerboard.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Isar_examples/MutilatedCheckerboard.thy Wed Jun 13 18:30:11 2007 +0200 @@ -43,12 +43,12 @@ show "(a Un t) Un u : ?T" proof - have "a Un (t Un u) : ?T" + using `a : A` proof (rule tiling.Un) - show "a : A" . from `(a Un t) Int u = {}` have "t Int u = {}" by blast then show "t Un u: ?T" by (rule Un) - have "a <= - t" . - with `(a Un t) Int u = {}` show "a <= - (t Un u)" by blast + from `a <= - t` and `(a Un t) Int u = {}` + show "a <= - (t Un u)" by blast qed also have "a Un (t Un u) = (a Un t) Un u" by (simp only: Un_assoc) @@ -201,7 +201,7 @@ show "?F {}" by (rule finite.emptyI) fix a t assume "?F t" assume "a : domino" then have "?F a" by (rule domino_finite) - then show "?F (a Un t)" by (rule finite_UnI) + from this and `?F t` show "?F (a Un t)" by (rule finite_UnI) qed lemma tiling_domino_01: @@ -223,14 +223,17 @@ have "?e (a Un t) b = ?e a b Un ?e t b" by (rule evnodd_Un) also obtain i j where e: "?e a b = {(i, j)}" proof - + from `a \ domino` and `b < 2` have "EX i j. ?e a b = {(i, j)}" by (rule domino_singleton) then show ?thesis by (blast intro: that) qed also have "... Un ?e t b = insert (i, j) (?e t b)" by simp also have "card ... = Suc (card (?e t b))" proof (rule card_insert_disjoint) - show "finite (?e t b)" - by (rule evnodd_finite, rule tiling_domino_finite) + from `t \ tiling domino` have "finite t" + by (rule tiling_domino_finite) + then show "finite (?e t b)" + by (rule evnodd_finite) from e have "(i, j) : ?e a b" by simp with at show "(i, j) ~: ?e t b" by (blast dest: evnoddD) qed diff -r 0035be079bee -r ead82c82da9e src/HOL/Isar_examples/NestedDatatype.thy --- a/src/HOL/Isar_examples/NestedDatatype.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Isar_examples/NestedDatatype.thy Wed Jun 13 18:30:11 2007 +0200 @@ -44,12 +44,14 @@ fix a show "?P (Var a)" by simp next fix b ts assume "?Q ts" - thus "?P (App b ts)" by (simp add: o_def) + then show "?P (App b ts)" + by (simp only: subst.simps) next show "?Q []" by simp next fix t ts - assume "?P t" "?Q ts" thus "?Q (t # ts)" by simp + assume "?P t" "?Q ts" then show "?Q (t # ts)" + by (simp only: subst.simps) qed qed @@ -64,12 +66,12 @@ fix a show "P (Var a)" by (rule var) next fix b t ts assume "list_all P ts" - thus "P (App b ts)" by (rule app) + then show "P (App b ts)" by (rule app) next show "list_all P []" by simp next fix t ts assume "P t" "list_all P ts" - thus "list_all P (t # ts)" by simp + then show "list_all P (t # ts)" by simp qed lemma @@ -79,7 +81,7 @@ show ?case by (simp add: o_def) next case (App b ts) - thus ?case by (induct ts) simp_all + then show ?case by (induct ts) simp_all qed end diff -r 0035be079bee -r ead82c82da9e src/HOL/Isar_examples/Peirce.thy --- a/src/HOL/Isar_examples/Peirce.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Isar_examples/Peirce.thy Wed Jun 13 18:30:11 2007 +0200 @@ -21,16 +21,16 @@ theorem "((A --> B) --> A) --> A" proof - assume aba: "(A --> B) --> A" + assume "(A --> B) --> A" show A proof (rule classical) assume "~ A" have "A --> B" proof assume A - thus B by contradiction + with `~ A` show B by contradiction qed - with aba show A .. + with `(A --> B) --> A` show A .. qed qed @@ -52,17 +52,17 @@ theorem "((A --> B) --> A) --> A" proof - assume aba: "(A --> B) --> A" + assume "(A --> B) --> A" show A proof (rule classical) presume "A --> B" - with aba show A .. + with `(A --> B) --> A` show A .. next assume "~ A" show "A --> B" proof assume A - thus B by contradiction + with `~ A` show B by contradiction qed qed qed diff -r 0035be079bee -r ead82c82da9e src/HOL/Lattice/Bounds.thy --- a/src/HOL/Lattice/Bounds.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Lattice/Bounds.thy Wed Jun 13 18:30:11 2007 +0200 @@ -147,7 +147,7 @@ from sup show "is_inf (dual x) (dual y) (dual sup)" .. from sup' show "is_inf (dual x) (dual y) (dual sup')" .. qed - thus "sup = sup'" .. + then show "sup = sup'" .. qed theorem is_Inf_uniq: "is_Inf A inf \ is_Inf A inf' \ inf = inf'" @@ -159,12 +159,12 @@ from inf' show "inf \ inf'" proof (rule is_Inf_greatest) fix x assume "x \ A" - from inf show "inf \ x" .. + with inf show "inf \ x" .. qed from inf show "inf' \ inf" proof (rule is_Inf_greatest) fix x assume "x \ A" - from inf' show "inf' \ x" .. + with inf' show "inf' \ x" .. qed qed qed @@ -177,7 +177,7 @@ from sup show "is_Inf (dual ` A) (dual sup)" .. from sup' show "is_Inf (dual ` A) (dual sup')" .. qed - thus "sup = sup'" .. + then show "sup = sup'" .. qed @@ -193,8 +193,8 @@ show ?thesis proof show "x \ x" .. - show "x \ y" . - fix z assume "z \ x" and "z \ y" show "z \ x" . + show "x \ y" by assumption + fix z assume "z \ x" and "z \ y" show "z \ x" by assumption qed qed @@ -203,10 +203,10 @@ assume "x \ y" show ?thesis proof - show "x \ y" . + show "x \ y" by assumption show "y \ y" .. fix z assume "x \ z" and "y \ z" - show "y \ z" . + show "y \ z" by assumption qed qed @@ -233,8 +233,8 @@ from is_Inf show "z \ inf" proof (rule is_Inf_greatest) fix a assume "a \ ?A" - hence "a = x \ a = y" by blast - thus "z \ a" + then have "a = x \ a = y" by blast + then show "z \ a" proof assume "a = x" with zx show ?thesis by simp @@ -249,8 +249,8 @@ show "is_Inf {x, y} inf" proof fix a assume "a \ ?A" - hence "a = x \ a = y" by blast - thus "inf \ a" + then have "a = x \ a = y" by blast + then show "inf \ a" proof assume "a = x" also from is_inf have "inf \ x" .. @@ -304,12 +304,12 @@ from is_Inf show "x \ sup" proof (rule is_Inf_greatest) fix y assume "y \ ?B" - hence "\a \ A. a \ y" .. + then have "\a \ A. a \ y" .. from this x show "x \ y" .. qed next fix z assume "\x \ A. x \ z" - hence "z \ ?B" .. + then have "z \ ?B" .. with is_Inf show "sup \ z" .. qed qed @@ -317,14 +317,14 @@ theorem Sup_Inf: "is_Sup {b. \a \ A. b \ a} inf \ is_Inf A inf" proof - assume "is_Sup {b. \a \ A. b \ a} inf" - hence "is_Inf (dual ` {b. \a \ A. dual a \ dual b}) (dual inf)" + then have "is_Inf (dual ` {b. \a \ A. dual a \ dual b}) (dual inf)" by (simp only: dual_Inf dual_leq) also have "dual ` {b. \a \ A. dual a \ dual b} = {b'. \a' \ dual ` A. a' \ b'}" by (auto iff: dual_ball dual_Collect simp add: image_Collect) (* FIXME !? *) finally have "is_Inf \ (dual inf)" . - hence "is_Sup (dual ` A) (dual inf)" + then have "is_Sup (dual ` A) (dual inf)" by (rule Inf_Sup) - thus ?thesis .. + then show ?thesis .. qed end 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" diff -r 0035be079bee -r ead82c82da9e src/HOL/Lattice/Lattice.thy --- a/src/HOL/Lattice/Lattice.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Lattice/Lattice.thy Wed Jun 13 18:30:11 2007 +0200 @@ -43,8 +43,8 @@ lemma meet_equality [elim?]: "is_inf x y inf \ x \ y = inf" proof (unfold meet_def) assume "is_inf x y inf" - thus "(THE inf. is_inf x y inf) = inf" - by (rule the_equality) (rule is_inf_uniq) + then show "(THE inf. is_inf x y inf) = inf" + by (rule the_equality) (rule is_inf_uniq [OF _ `is_inf x y inf`]) qed lemma meetI [intro?]: @@ -54,8 +54,8 @@ lemma join_equality [elim?]: "is_sup x y sup \ x \ y = sup" proof (unfold join_def) assume "is_sup x y sup" - thus "(THE sup. is_sup x y sup) = sup" - by (rule the_equality) (rule is_sup_uniq) + then show "(THE sup. is_sup x y sup) = sup" + by (rule the_equality) (rule is_sup_uniq [OF _ `is_sup x y sup`]) qed lemma joinI [intro?]: "x \ sup \ y \ sup \ @@ -71,7 +71,8 @@ lemma is_inf_meet [intro?]: "is_inf x y (x \ y)" proof (unfold meet_def) from ex_inf obtain inf where "is_inf x y inf" .. - thus "is_inf x y (THE inf. is_inf x y inf)" by (rule theI) (rule is_inf_uniq) + then show "is_inf x y (THE inf. is_inf x y inf)" + by (rule theI) (rule is_inf_uniq [OF _ `is_inf x y inf`]) qed lemma meet_greatest [intro?]: "z \ x \ z \ y \ z \ x \ y" @@ -87,7 +88,8 @@ lemma is_sup_join [intro?]: "is_sup x y (x \ y)" proof (unfold join_def) from ex_sup obtain sup where "is_sup x y sup" .. - thus "is_sup x y (THE sup. is_sup x y sup)" by (rule theI) (rule is_sup_uniq) + then show "is_sup x y (THE sup. is_sup x y sup)" + by (rule theI) (rule is_sup_uniq [OF _ `is_sup x y sup`]) qed lemma join_least [intro?]: "x \ z \ y \ z \ x \ y \ z" @@ -115,16 +117,16 @@ show "\inf'. is_inf x' y' inf'" proof - have "\sup. is_sup (undual x') (undual y') sup" by (rule ex_sup) - hence "\sup. is_inf (dual (undual x')) (dual (undual y')) (dual sup)" + then have "\sup. is_inf (dual (undual x')) (dual (undual y')) (dual sup)" by (simp only: dual_inf) - thus ?thesis by (simp add: dual_ex [symmetric]) + then show ?thesis by (simp add: dual_ex [symmetric]) qed show "\sup'. is_sup x' y' sup'" proof - have "\inf. is_inf (undual x') (undual y') inf" by (rule ex_inf) - hence "\inf. is_sup (dual (undual x')) (dual (undual y')) (dual inf)" + then have "\inf. is_sup (dual (undual x')) (dual (undual y')) (dual inf)" by (simp only: dual_sup) - thus ?thesis by (simp add: dual_ex [symmetric]) + then show ?thesis by (simp add: dual_ex [symmetric]) qed qed @@ -136,15 +138,15 @@ theorem dual_meet [intro?]: "dual (x \ y) = dual x \ dual y" proof - from is_inf_meet have "is_sup (dual x) (dual y) (dual (x \ y))" .. - hence "dual x \ dual y = dual (x \ y)" .. - thus ?thesis .. + then have "dual x \ dual y = dual (x \ y)" .. + then show ?thesis .. qed theorem dual_join [intro?]: "dual (x \ y) = dual x \ dual y" proof - from is_sup_join have "is_inf (dual x) (dual y) (dual (x \ y))" .. - hence "dual x \ dual y = dual (x \ y)" .. - thus ?thesis .. + then have "dual x \ dual y = dual (x \ y)" .. + then show ?thesis .. qed @@ -179,7 +181,7 @@ proof show "w \ x" proof - - have "w \ x \ y" . + have "w \ x \ y" by fact also have "\ \ x" .. finally show ?thesis . qed @@ -187,11 +189,11 @@ proof show "w \ y" proof - - have "w \ x \ y" . + have "w \ x \ y" by fact also have "\ \ y" .. finally show ?thesis . qed - show "w \ z" . + show "w \ z" by fact qed qed qed @@ -211,8 +213,8 @@ proof show "y \ x \ x" .. show "y \ x \ y" .. - fix z assume "z \ x" and "z \ y" - show "z \ y \ x" .. + fix z assume "z \ y" and "z \ x" + then show "z \ y \ x" .. qed theorem join_commute: "x \ y = y \ x" @@ -230,16 +232,16 @@ show "x \ x" .. show "x \ x \ y" .. fix z assume "z \ x" and "z \ x \ y" - show "z \ x" . + show "z \ x" by assumption qed theorem join_meet_absorb: "x \ (x \ y) = x" proof - have "dual x \ (dual x \ dual y) = dual x" by (rule meet_join_absorb) - hence "dual (x \ (x \ y)) = dual x" + then have "dual (x \ (x \ y)) = dual x" by (simp only: dual_meet dual_join) - thus ?thesis .. + then show ?thesis .. qed text {* @@ -258,9 +260,9 @@ proof - have "dual x \ dual x = dual x" by (rule meet_idem) - hence "dual (x \ x) = dual x" + then have "dual (x \ x) = dual x" by (simp only: dual_join) - thus ?thesis .. + then show ?thesis .. qed text {* @@ -271,14 +273,15 @@ proof assume "x \ y" show "x \ x" .. - show "x \ y" . - fix z assume "z \ x" and "z \ y" show "z \ x" . + show "x \ y" by fact + fix z assume "z \ x" and "z \ y" + show "z \ x" by fact qed theorem join_related [elim?]: "x \ y \ x \ y = y" proof - - assume "x \ y" hence "dual y \ dual x" .. - hence "dual y \ dual x = dual y" by (rule meet_related) + assume "x \ y" then have "dual y \ dual x" .. + then have "dual y \ dual x = dual y" by (rule meet_related) also have "dual y \ dual x = dual (y \ x)" by (simp only: dual_join) also have "y \ x = x \ y" by (rule join_commute) finally show ?thesis .. @@ -295,8 +298,8 @@ theorem meet_connection: "(x \ y) = (x \ y = x)" proof assume "x \ y" - hence "is_inf x y x" .. - thus "x \ y = x" .. + then have "is_inf x y x" .. + then show "x \ y = x" .. next have "x \ y \ y" .. also assume "x \ y = x" @@ -306,8 +309,8 @@ theorem join_connection: "(x \ y) = (x \ y = y)" proof assume "x \ y" - hence "is_sup x y y" .. - thus "x \ y = y" .. + then have "is_sup x y y" .. + then show "x \ y = y" .. next have "x \ x \ y" .. also assume "x \ y = y" @@ -555,27 +558,27 @@ assume "a \ c" have "a \ b \ c \ b" proof have "a \ b \ a" .. - also have "\ \ c" . + also have "\ \ c" by fact finally show "a \ b \ c" . show "a \ b \ b" .. qed } note this [elim?] - assume "x \ z" hence "x \ y \ z \ y" .. + assume "x \ z" then have "x \ y \ z \ y" .. also have "\ = y \ z" by (rule meet_commute) - also assume "y \ w" hence "y \ z \ w \ z" .. + also assume "y \ w" then have "y \ z \ w \ z" .. also have "\ = z \ w" by (rule meet_commute) finally show ?thesis . qed theorem join_mono: "x \ z \ y \ w \ x \ y \ z \ w" proof - - assume "x \ z" hence "dual z \ dual x" .. - moreover assume "y \ w" hence "dual w \ dual y" .. + assume "x \ z" then have "dual z \ dual x" .. + moreover assume "y \ w" then have "dual w \ dual y" .. ultimately have "dual z \ dual w \ dual x \ dual y" by (rule meet_mono) - hence "dual (z \ w) \ dual (x \ y)" + then have "dual (z \ w) \ dual (x \ y)" by (simp only: dual_join) - thus ?thesis .. + then show ?thesis .. qed text {* @@ -590,8 +593,8 @@ proof assume morph: "\x y. f (x \ y) \ f x \ f y" fix x y :: "'a::lattice" - assume "x \ y" hence "x \ y = x" .. - hence "x = x \ y" .. + assume "x \ y" then have "x \ y = x" .. + then have "x = x \ y" .. also have "f \ \ f x \ f y" by (rule morph) also have "\ \ f y" .. finally show "f x \ f y" . @@ -602,8 +605,8 @@ fix x y show "f (x \ y) \ f x \ f y" proof - have "x \ y \ x" .. thus "f (x \ y) \ f x" by (rule mono) - have "x \ y \ y" .. thus "f (x \ y) \ f y" by (rule mono) + have "x \ y \ x" .. then show "f (x \ y) \ f x" by (rule mono) + have "x \ y \ y" .. then show "f (x \ y) \ f y" by (rule mono) qed qed qed diff -r 0035be079bee -r ead82c82da9e src/HOL/Library/AssocList.thy --- a/src/HOL/Library/AssocList.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Library/AssocList.thy Wed Jun 13 18:30:11 2007 +0200 @@ -19,7 +19,7 @@ fun delete :: "'key \ ('key \ 'val) list \ ('key \ 'val) list" where - "delete k [] = []" + "delete k [] = []" | "delete k (p#ps) = (if fst p = k then delete k ps else p # delete k ps)" fun @@ -79,27 +79,25 @@ fun restrict :: "'key set \ ('key \ 'val) list \ ('key \ 'val) list" where - "restrict A [] = []" + "restrict A [] = []" | "restrict A (p#ps) = (if fst p \ A then p#restrict A ps else restrict A ps)" fun map_ran :: "('key \ 'val \ 'val) \ ('key \ 'val) list \ ('key \ 'val) list" where - "map_ran f [] = []" + "map_ran f [] = []" | "map_ran f (p#ps) = (fst p, f (fst p) (snd p)) # map_ran f ps" fun clearjunk :: "('key \ 'val) list \ ('key \ 'val) list" where - "clearjunk [] = []" + "clearjunk [] = []" | "clearjunk (p#ps) = p # clearjunk (delete (fst p) ps)" lemmas [simp del] = compose_hint -(* ******************************************************************************** *) subsection {* Lookup *} -(* ******************************************************************************** *) lemma lookup_simps [code func]: "map_of [] k = None" @@ -107,9 +105,7 @@ by simp_all -(* ******************************************************************************** *) subsection {* @{const delete} *} -(* ******************************************************************************** *) lemma delete_def: "delete k xs = filter (\p. fst p \ k) xs" @@ -140,7 +136,7 @@ lemma distinct_delete: assumes "distinct (map fst al)" shows "distinct (map fst (delete k al))" -using prems +using assms proof (induct al) case Nil thus ?case by simp next @@ -152,7 +148,7 @@ show ?case proof (cases "fst a = k") case True - from True dist_al show ?thesis by simp + with Cons dist_al show ?thesis by simp next case False from dist_al @@ -171,9 +167,8 @@ lemma clearjunk_delete: "clearjunk (delete x al) = delete x (clearjunk al)" by (induct al rule: clearjunk.induct) (auto simp add: delete_idem delete_twist) -(* ******************************************************************************** *) + subsection {* @{const clearjunk} *} -(* ******************************************************************************** *) lemma insert_fst_filter: "insert a(fst ` {x \ set ps. fst x \ a}) = insert a (fst ` set ps)" @@ -221,9 +216,8 @@ lemma clearjunk_idem: "clearjunk (clearjunk al) = clearjunk al" by simp -(* ******************************************************************************** *) + subsection {* @{const dom} and @{term "ran"} *} -(* ******************************************************************************** *) lemma dom_map_of': "fst ` set al = dom (map_of al)" by (induct al) auto @@ -295,9 +289,8 @@ finally show ?thesis . qed -(* ******************************************************************************** *) + subsection {* @{const update} *} -(* ******************************************************************************** *) lemma update_conv: "map_of (update k v al) k' = ((map_of al)(k\v)) k'" by (induct al) auto @@ -311,7 +304,7 @@ lemma distinct_update: assumes "distinct (map fst al)" shows "distinct (map fst (update k v al))" -using prems +using assms proof (induct al) case Nil thus ?case by simp next @@ -374,9 +367,7 @@ by (simp add: update_conv' image_map_upd) -(* ******************************************************************************** *) subsection {* @{const updates} *} -(* ******************************************************************************** *) lemma updates_conv: "map_of (updates ks vs al) k = ((map_of al)(ks[\]vs)) k" proof (induct ks arbitrary: vs al) @@ -401,7 +392,7 @@ lemma distinct_updates: assumes "distinct (map fst al)" shows "distinct (map fst (updates ks vs al))" - using prems + using assms by (induct ks arbitrary: vs al) (auto simp add: distinct_update split: list.splits) @@ -447,9 +438,8 @@ "size xs = size ys \ updates xs (ys@zs) al = updates xs ys al" by (induct xs arbitrary: ys al) (auto split: list.splits) -(* ******************************************************************************** *) + subsection {* @{const map_ran} *} -(* ******************************************************************************** *) lemma map_ran_conv: "map_of (map_ran f al) k = option_map (f k) (map_of al k)" by (induct al) auto @@ -466,9 +456,8 @@ lemma clearjunk_map_ran: "clearjunk (map_ran f al) = map_ran f (clearjunk al)" by (induct al rule: clearjunk.induct) (auto simp add: delete_def map_ran_filter) -(* ******************************************************************************** *) + subsection {* @{const merge} *} -(* ******************************************************************************** *) lemma dom_merge: "fst ` set (merge xs ys) = fst ` set xs \ fst ` set ys" by (induct ys arbitrary: xs) (auto simp add: dom_update) @@ -476,7 +465,7 @@ lemma distinct_merge: assumes "distinct (map fst xs)" shows "distinct (map fst (merge xs ys))" - using prems + using assms by (induct ys arbitrary: xs) (auto simp add: dom_merge distinct_update) lemma clearjunk_merge: @@ -536,14 +525,13 @@ lemma merge_append: "map_of (xs@ys) = map_of (merge ys xs)" by (simp add: merge_conv') -(* ******************************************************************************** *) + subsection {* @{const compose} *} -(* ******************************************************************************** *) lemma compose_first_None [simp]: assumes "map_of xs k = None" shows "map_of (compose xs ys) k = None" -using prems by (induct xs ys rule: compose.induct) +using assms by (induct xs ys rule: compose.induct) (auto split: option.splits split_if_asm) lemma compose_conv: @@ -591,7 +579,7 @@ lemma compose_first_Some [simp]: assumes "map_of xs k = Some v" shows "map_of (compose xs ys) k = map_of ys v" -using prems by (simp add: compose_conv) +using assms by (simp add: compose_conv) lemma dom_compose: "fst ` set (compose xs ys) \ fst ` set xs" proof (induct xs ys rule: compose.induct) @@ -623,7 +611,7 @@ lemma distinct_compose: assumes "distinct (map fst xs)" shows "distinct (map fst (compose xs ys))" -using prems +using assms proof (induct xs ys rule: compose.induct) case 1 thus ?case by simp next @@ -695,9 +683,7 @@ by (simp add: compose_conv map_comp_None_iff) -(* ******************************************************************************** *) subsection {* @{const restrict} *} -(* ******************************************************************************** *) lemma restrict_def: "restrict A = filter (\p. fst p \ A)" diff -r 0035be079bee -r ead82c82da9e src/HOL/Library/BigO.thy --- a/src/HOL/Library/BigO.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Library/BigO.thy Wed Jun 13 18:30:11 2007 +0200 @@ -282,7 +282,7 @@ apply (subst func_diff) apply (rule bigo_abs) done - also have "... <= O(h)" + also from a have "... <= O(h)" by (rule bigo_elt_subset) finally show "(%x. abs (f x) - abs (g x)) : O(h)". qed diff -r 0035be079bee -r ead82c82da9e src/HOL/Library/Graphs.thy --- a/src/HOL/Library/Graphs.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Library/Graphs.thy Wed Jun 13 18:30:11 2007 +0200 @@ -3,7 +3,7 @@ Author: Alexander Krauss, TU Muenchen *) -header "" +header "" (* FIXME proper header *) theory Graphs imports Main SCT_Misc Kleene_Algebras ExecutableSet @@ -56,8 +56,8 @@ lemma graph_ext: assumes "\n e n'. has_edge G n e n' = has_edge H n e n'" shows "G = H" - using prems - by (cases G, cases H, auto simp:split_paired_all has_edge_def) + using assms + by (cases G, cases H) (auto simp:split_paired_all has_edge_def) instance graph :: (type, type) "{comm_monoid_add}" @@ -219,7 +219,7 @@ lemma graph_leqI: assumes "\n e n'. has_edge G n e n' \ has_edge H n e n'" shows "G \ H" - using prems + using assms unfolding graph_leq_def has_edge_def by auto @@ -229,18 +229,18 @@ assumes "has_edge G n e n' \ P" assumes "has_edge H n e n' \ P" shows P - using prems + using assms by (auto simp: in_grplus) lemma assumes "x \ S k" shows "x \ (\k. S k)" - using prems by blast + using assms by blast lemma graph_union_least: assumes "\n. Graph (G n) \ C" shows "Graph (\n. G n) \ C" - using prems unfolding graph_leq_def + using assms unfolding graph_leq_def by auto lemma Sup_graph_eq: @@ -333,15 +333,15 @@ lemma endnode_nth: assumes "length (snd p) = Suc k" shows "end_node p = snd (snd (path_nth p k))" - using prems unfolding end_node_def path_nth_def + using assms unfolding end_node_def path_nth_def by auto lemma path_nth_graph: assumes "k < length (snd p)" assumes "has_fpath G p" shows "(\(n,e,n'). has_edge G n e n') (path_nth p k)" - using prems -proof (induct k arbitrary:p) +using assms +proof (induct k arbitrary: p) case 0 thus ?case unfolding path_nth_def by (auto elim:has_fpath.cases) next @@ -364,7 +364,7 @@ lemma path_nth_connected: assumes "Suc k < length (snd p)" shows "fst (path_nth p (Suc k)) = snd (snd (path_nth p k))" - using prems + using assms unfolding path_nth_def by auto @@ -399,9 +399,9 @@ hence "fst (path_nth p (Suc i mod ?l)) = fst (path_nth p 0)" by (simp add: mod_Suc) also from fst_p0 have "\ = fst p" . - also have "\ = end_node p" . + also have "\ = end_node p" by assumption also have "\ = snd (snd (path_nth p ?k))" - by (auto simp:endnode_nth wrap) + by (auto simp: endnode_nth wrap) finally show ?thesis . qed qed @@ -411,17 +411,21 @@ and loop: "fst p = end_node p" and nonempty: "0 < length (snd p)" (is "0 < ?l") shows "has_ipath G (omega p)" -proof (auto simp:has_ipath_def) - fix i - from `0 < ?l` have "i mod ?l < ?l" (is "?k < ?l") - by simp - with path_nth_graph - have pk_G: "(\(n,e,n'). has_edge G n e n') (path_nth p ?k)" . +proof - + { + fix i + from `0 < ?l` have "i mod ?l < ?l" (is "?k < ?l") + by simp + from this and `has_fpath G p` + have pk_G: "(\(n,e,n'). has_edge G n e n') (path_nth p ?k)" + by (rule path_nth_graph) - from path_loop_connect[OF loop nonempty] pk_G - show "has_edge G (fst (omega p i)) (snd (omega p i)) (fst (omega p (Suc i)))" - unfolding path_loop_def has_edge_def split_def - by simp + from path_loop_connect[OF loop nonempty] pk_G + have "has_edge G (fst (omega p i)) (snd (omega p i)) (fst (omega p (Suc i)))" + unfolding path_loop_def has_edge_def split_def + by simp + } + then show ?thesis by (auto simp:has_ipath_def) qed definition prod :: "('n, 'e::monoid_mult) fpath \ 'e" @@ -514,7 +518,7 @@ lemma upto_append[simp]: assumes "i \ j" "j \ k" shows "[ i ..< j ] @ [j ..< k] = [i ..< k]" - using prems and upt_add_eq_append[of i j "k - j"] + using assms and upt_add_eq_append[of i j "k - j"] by simp lemma foldr_monoid: "foldr (op *) xs 1 * foldr (op *) ys 1 @@ -525,7 +529,7 @@ assumes "i < j" assumes "j < k" shows "prod (p\i,k\) = prod (p\i,j\) * prod (p\j,k\)" - using prems + using assms unfolding prod_def sub_path_def by (simp add:map_compose[symmetric] comp_def) (simp only:foldr_monoid map_append[symmetric] upto_append) @@ -535,7 +539,7 @@ assumes "length es = l" assumes "has_fpath G (n,es)" shows "has_edge (G ^ l) n (prod (n,es)) (end_node (n,es))" -using prems +using assms proof (induct l arbitrary:n es) case 0 thus ?case by (simp add:in_grunit end_node_def) @@ -679,7 +683,7 @@ lemma sub_path_loop: assumes "0 < k" - assumes k:"k = length (snd loop)" + assumes k: "k = length (snd loop)" assumes loop: "fst loop = end_node loop" shows "(omega loop)\k * i,k * Suc i\ = loop" (is "?\ = loop") proof (rule prod_eqI) @@ -698,14 +702,17 @@ = snd (snd (path_nth loop (i mod k)))" unfolding k apply (rule path_loop_connect[OF loop]) - by (insert prems, auto) + using `0 < k` and k + apply auto + done from `j < k` show "snd ?\ ! j = snd loop ! j" unfolding sub_path_def apply (simp add:path_loop_def split_def add_ac) apply (simp add:a k[symmetric]) - by (simp add:path_nth_def) + apply (simp add:path_nth_def) + done qed qed diff -r 0035be079bee -r ead82c82da9e src/HOL/Library/Multiset.thy --- a/src/HOL/Library/Multiset.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Library/Multiset.thy Wed Jun 13 18:30:11 2007 +0200 @@ -450,7 +450,7 @@ proof (elim exE disjE conjE) fix M assume "?R M M0" and N: "N = M + {#a#}" from acc_hyp have "?R M M0 --> ?W (M + {#a#})" .. - then have "?W (M + {#a#})" .. + from this and `?R M M0` have "?W (M + {#a#})" .. then show "?W N" by (simp only: N) next fix K @@ -487,23 +487,23 @@ from wf have "\M \ ?W. ?W (M + {#a#})" proof induct fix a - assume "!!b. r b a ==> \M \ ?W. ?W (M + {#b#})" + assume r: "!!b. r b a ==> \M \ ?W. ?W (M + {#b#})" show "\M \ ?W. ?W (M + {#a#})" proof fix M assume "?W M" then show "?W (M + {#a#})" - by (rule acc_induct) (rule tedious_reasoning) + by (rule acc_induct) (rule tedious_reasoning [OF _ r]) qed qed - then show "?W (M + {#a#})" .. + from this and `?W M` show "?W (M + {#a#})" .. qed qed theorem wf_mult1: "wfP r ==> wfP (mult1 r)" - by (rule acc_wfI, rule all_accessible) + by (rule acc_wfI) (rule all_accessible) theorem wf_mult: "wfP r ==> wfP (mult r)" - by (unfold mult_def, rule wfP_trancl, rule wf_mult1) + unfolding mult_def by (rule wfP_trancl) (rule wf_mult1) subsubsection {* Closure-free presentation *} @@ -511,7 +511,7 @@ (*Badly needed: a linear arithmetic procedure for multisets*) lemma diff_union_single_conv: "a :# J ==> I + J - {#a#} = I + (J - {#a#})" -by (simp add: multiset_eq_conv_count_eq) + by (simp add: multiset_eq_conv_count_eq) text {* One direction. *} @@ -548,7 +548,7 @@ done lemma elem_imp_eq_diff_union: "a :# M ==> M = M - {#a#} + {#a#}" -by (simp add: multiset_eq_conv_count_eq) + by (simp add: multiset_eq_conv_count_eq) lemma size_eq_Suc_imp_eq_union: "size M = Suc n ==> \a N. M = N + {#a#}" apply (erule size_eq_Suc_imp_elem [THEN exE]) @@ -588,8 +588,7 @@ lemma one_step_implies_mult: "J \ {#} ==> \k \ set_of K. \j \ set_of J. r k j ==> mult r (I + K) (I + J)" - apply (insert one_step_implies_mult_aux, blast) - done + using one_step_implies_mult_aux by blast subsubsection {* Partial-order properties *} @@ -609,9 +608,7 @@ lemma mult_irrefl_aux: "finite A ==> (\x \ A. \y \ A. x < (y::'a::order)) \ A = {}" - apply (induct rule: finite_induct) - apply (auto intro: order_less_trans) - done + by (induct rule: finite_induct) (auto intro: order_less_trans) lemma mult_less_not_refl: "\ M < (M::'a::order multiset)" apply (unfold less_multiset_def, auto) @@ -621,15 +618,13 @@ done lemma mult_less_irrefl [elim!]: "M < (M::'a::order multiset) ==> R" -by (insert mult_less_not_refl, fast) + using insert mult_less_not_refl by fast text {* Transitivity. *} theorem mult_less_trans: "K < M ==> M < N ==> K < (N::'a::order multiset)" - apply (unfold less_multiset_def mult_def) - apply (blast intro: trancl_trans') - done + unfolding less_multiset_def mult_def by (blast intro: trancl_trans') text {* Asymmetry. *} diff -r 0035be079bee -r ead82c82da9e src/HOL/Library/Quotient.thy --- a/src/HOL/Library/Quotient.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Library/Quotient.thy Wed Jun 13 18:30:11 2007 +0200 @@ -31,27 +31,27 @@ lemma equiv_not_sym [sym]: "\ (x \ y) ==> \ (y \ (x::'a::equiv))" proof - - assume "\ (x \ y)" thus "\ (y \ x)" + assume "\ (x \ y)" then show "\ (y \ x)" by (rule contrapos_nn) (rule equiv_sym) qed lemma not_equiv_trans1 [trans]: "\ (x \ y) ==> y \ z ==> \ (x \ (z::'a::equiv))" proof - - assume "\ (x \ y)" and yz: "y \ z" + assume "\ (x \ y)" and "y \ z" show "\ (x \ z)" proof assume "x \ z" - also from yz have "z \ y" .. + also from `y \ z` have "z \ y" .. finally have "x \ y" . - thus False by contradiction + with `\ (x \ y)` show False by contradiction qed qed lemma not_equiv_trans2 [trans]: "x \ y ==> \ (y \ z) ==> \ (x \ (z::'a::equiv))" proof - - assume "\ (y \ z)" hence "\ (z \ y)" .. - also assume "x \ y" hence "y \ x" .. - finally have "\ (z \ x)" . thus "(\ x \ z)" .. + assume "\ (y \ z)" then have "\ (z \ y)" .. + also assume "x \ y" then have "y \ x" .. + finally have "\ (z \ x)" . then show "(\ x \ z)" .. qed text {* @@ -80,9 +80,9 @@ theorem quot_exhaust: "\a. A = \a\" proof (cases A) fix R assume R: "A = Abs_quot R" - assume "R \ quot" hence "\a. R = {x. a \ x}" by blast + assume "R \ quot" then have "\a. R = {x. a \ x}" by blast with R have "\a. A = Abs_quot {x. a \ x}" by blast - thus ?thesis unfolding class_def . + then show ?thesis unfolding class_def . qed lemma quot_cases [cases type: quot]: "(!!a. A = \a\ ==> C) ==> C" @@ -105,8 +105,8 @@ by (simp only: class_def Abs_quot_inject quotI) moreover have "a \ a" .. ultimately have "a \ {x. b \ x}" by blast - hence "b \ a" by blast - thus ?thesis .. + then have "b \ a" by blast + then show ?thesis .. qed next assume ab: "a \ b" @@ -125,7 +125,7 @@ finally show "a \ x" . qed qed - thus ?thesis by (simp only: class_def) + then show ?thesis by (simp only: class_def) qed qed @@ -142,15 +142,15 @@ proof (rule someI2) show "\a\ = \a\" .. fix x assume "\a\ = \x\" - hence "a \ x" .. thus "x \ a" .. + then have "a \ x" .. then show "x \ a" .. qed qed theorem pick_inverse [intro]: "\pick A\ = A" proof (cases A) fix a assume a: "A = \a\" - hence "pick A \ a" by (simp only: pick_equiv) - hence "\pick A\ = \a\" .. + then have "pick A \ a" by (simp only: pick_equiv) + then have "\pick A\ = \a\" .. with a show ?thesis by simp qed @@ -175,7 +175,7 @@ moreover show "\pick \b\\ = \b\" .. moreover - show "P \a\ \b\" . + show "P \a\ \b\" by (rule P) ultimately show "P \pick \a\\ \pick \b\\" by (simp only:) qed finally show ?thesis . diff -r 0035be079bee -r ead82c82da9e src/HOL/Library/SCT_Misc.thy --- a/src/HOL/Library/SCT_Misc.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Library/SCT_Misc.thy Wed Jun 13 18:30:11 2007 +0200 @@ -3,9 +3,9 @@ Author: Alexander Krauss, TU Muenchen *) -header "" +header "" (* FIXME proper header *) -theory SCT_Misc +theory SCT_Misc (* FIXME proper name *) imports Main begin @@ -95,11 +95,13 @@ "section_of s n = (LEAST i. n < s (Suc i))" lemma section_help: - assumes [intro, simp]: "increasing s" + assumes "increasing s" shows "\i. n < s (Suc i)" proof - - from increasing_inc have "n \ s n" . - also from increasing_strict have "\ < s (Suc n)" by simp + have "n \ s n" + using `increasing s` by (rule increasing_inc) + also have "\ < s (Suc n)" + using `increasing s` increasing_strict by simp finally show ?thesis .. qed @@ -107,7 +109,7 @@ assumes "increasing s" shows "n < s (Suc (section_of s n))" unfolding section_of_def - by (rule LeastI_ex) (rule section_help) + by (rule LeastI_ex) (rule section_help [OF `increasing s`]) lemma section_of1: assumes [simp, intro]: "increasing s" diff -r 0035be079bee -r ead82c82da9e src/HOL/Library/SCT_Theorem.thy --- a/src/HOL/Library/SCT_Theorem.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Library/SCT_Theorem.thy Wed Jun 13 18:30:11 2007 +0200 @@ -3,7 +3,7 @@ Author: Alexander Krauss, TU Muenchen *) -header "" +header "" (* FIXME proper header *) theory SCT_Theorem imports Main Ramsey SCT_Misc SCT_Definition @@ -795,10 +795,9 @@ unfolding is_desc_fthread_def by auto - have "i < s (Suc ?k)" by (rule section_of2) - also have "\ \ s j" - by (rule increasing_weak[of s], assumption) - (insert `?k < j`, arith) + have "i < s (Suc ?k)" by (rule section_of2) simp + also have "\ \ s j" + by (rule increasing_weak [of s], assumption) (insert `?k < j`, arith) also note `\ \ l` finally have "i < l" . with desc @@ -925,10 +924,10 @@ { fix x assume r: "x \ section s ?L" - have e1: "max (s (Suc i)) n < s (Suc ?K)" by (rule section_of2) + have e1: "max (s (Suc i)) n < s (Suc ?K)" by (rule section_of2) simp note `s (Suc ?K) < j` also have "j < s (Suc ?L)" - by (rule section_of2) + by (rule section_of2) simp finally have "Suc ?K \ ?L" by (simp add:increasing_bij) with increasing_weak have "s (Suc ?K) \ s ?L" by simp @@ -1074,12 +1073,12 @@ "set2list = inv set" lemma finite_set2list: - assumes [intro]: "finite S" + assumes "finite S" shows "set (set2list S) = S" unfolding set2list_def proof (rule f_inv_f) - from finite_list - have "\l. set l = S" . + from `finite S` have "\l. set l = S" + by (rule finite_list) thus "S \ range set" unfolding image_def by auto @@ -1307,7 +1306,7 @@ by (simp only:split_conv, rule a, auto) obtain n H m where - G_struct: "G = (n, H, m)" by (cases G) simp + G_struct: "G = (n, H, m)" by (cases G) let ?s = "enumerate S" let ?q = "contract ?s p" @@ -1381,7 +1380,7 @@ proof - from fin obtain P where b: "bounded_acg P A" unfolding finite_acg_def .. - show ?thesis using LJA_Theorem4[OF b] + show ?thesis using LJA_Theorem4[OF b] and `SCT' A` by simp qed diff -r 0035be079bee -r ead82c82da9e src/HOL/Matrix/MatrixGeneral.thy --- a/src/HOL/Matrix/MatrixGeneral.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/Matrix/MatrixGeneral.thy Wed Jun 13 18:30:11 2007 +0200 @@ -85,7 +85,8 @@ next fix y assume hyp: "Rep_matrix x (fst y) (snd y) \ 0" - show "\ a b. (Rep_matrix x b a \ 0 & y = (b,a))" by (rule exI[of _ "snd y"], rule exI[of _ "fst y"], simp) + show "\ a b. (Rep_matrix x b a \ 0 & y = (b,a))" + by (rule exI[of _ "snd y"], rule exI[of _ "fst y"]) (simp add: hyp) qed then have "finite (?swap`?A)" proof - diff -r 0035be079bee -r ead82c82da9e src/HOL/NumberTheory/Euler.thy --- a/src/HOL/NumberTheory/Euler.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/NumberTheory/Euler.thy Wed Jun 13 18:30:11 2007 +0200 @@ -264,7 +264,7 @@ by (auto simp add: zEven_def zOdd_def) then have aux_1: "2 * ((p - 1) div 2) = (p - 1)" by (auto simp add: even_div_2_prop2) - then have "1 < (p - 1)" + with `2 < p` have "1 < (p - 1)" by auto then have " 1 < (2 * ((p - 1) div 2))" by (auto simp add: aux_1) diff -r 0035be079bee -r ead82c82da9e src/HOL/NumberTheory/Quadratic_Reciprocity.thy --- a/src/HOL/NumberTheory/Quadratic_Reciprocity.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/NumberTheory/Quadratic_Reciprocity.thy Wed Jun 13 18:30:11 2007 +0200 @@ -115,8 +115,8 @@ (-1::int)^(card E) = (-1::int)^(nat(setsum (%x. ((x * a) div p)) A))" proof - assume "a \ zOdd" - from QRLemma4 have - "(int(card E): zEven) = (setsum (%x. ((x * a) div p)) A \ zEven)".. + from QRLemma4 [OF this] have + "(int(card E): zEven) = (setsum (%x. ((x * a) div p)) A \ zEven)" .. moreover have "0 \ int(card E)" by auto moreover have "0 \ setsum (%x. ((x * a) div p)) A" diff -r 0035be079bee -r ead82c82da9e src/HOL/W0/W0.thy --- a/src/HOL/W0/W0.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/W0/W0.thy Wed Jun 13 18:30:11 2007 +0200 @@ -405,7 +405,7 @@ then have "map ($ s) a |- Var n :: map ($ s) a ! n" by (rule has_type.Var) also have "map ($ s) a ! n = $ s (a ! n)" - by (rule nth_map) + by (rule nth_map) (rule Var) also have "map ($ s) a = $ s a" by (simp only: app_subst_list) finally show ?case . diff -r 0035be079bee -r ead82c82da9e src/HOL/ex/Commutative_Ring_Complete.thy --- a/src/HOL/ex/Commutative_Ring_Complete.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/ex/Commutative_Ring_Complete.thy Wed Jun 13 18:30:11 2007 +0200 @@ -150,7 +150,7 @@ then obtain d where X:"x=Suc (Suc d)" .. from prems have NR:"isnorm R" "isnorm P2" by (auto simp add: norm_Pinj[of _ P2] norm_PX2[of Q2 y R]) with prems have "isnorm (Pinj (x - 1) P2)" by(cases P2, auto) - with prems NR have "isnorm (R \ Pinj (x - 1) P2)" "isnorm (PX Q2 y R)" by simp + with prems NR have "isnorm (R \ Pinj (x - 1) P2)" "isnorm (PX Q2 y R)" by simp assumption with X have ?case by (simp add: norm_PXtrans[of Q2 y _]) } ultimately show ?case by blast next @@ -168,7 +168,7 @@ then obtain d where X:"x=Suc (Suc d)" .. from prems have NR:"isnorm R" "isnorm P2" by (auto simp add: norm_Pinj[of _ P2] norm_PX2[of Q2 y R]) with prems have "isnorm (Pinj (x - 1) P2)" by(cases P2, auto) - with prems NR have "isnorm (R \ Pinj (x - 1) P2)" "isnorm (PX Q2 y R)" by simp + with prems NR have "isnorm (R \ Pinj (x - 1) P2)" "isnorm (PX Q2 y R)" by simp assumption with X have ?case by (simp add: norm_PXtrans[of Q2 y _]) } ultimately show ?case by blast next diff -r 0035be079bee -r ead82c82da9e src/HOL/ex/Higher_Order_Logic.thy --- a/src/HOL/ex/Higher_Order_Logic.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/ex/Higher_Order_Logic.thy Wed Jun 13 18:30:11 2007 +0200 @@ -58,7 +58,7 @@ theorem sym [sym]: "x = y \ y = x" proof - assume "x = y" - thus "y = x" by (rule subst) (rule refl) + then show "y = x" by (rule subst) (rule refl) qed lemma [trans]: "x = y \ P y \ P x" @@ -110,7 +110,7 @@ theorem falseE [elim]: "\ \ A" proof (unfold false_def) assume "\A. A" - thus A .. + then show A .. qed theorem trueI [intro]: \ @@ -121,7 +121,7 @@ theorem notI [intro]: "(A \ \) \ \ A" proof (unfold not_def) assume "A \ \" - thus "A \ \" .. + then show "A \ \" .. qed theorem notE [elim]: "\ A \ A \ B" @@ -129,7 +129,7 @@ assume "A \ \" also assume A finally have \ .. - thus B .. + then show B .. qed lemma notE': "A \ \ A \ B" @@ -145,8 +145,8 @@ fix C show "(A \ B \ C) \ C" proof assume "A \ B \ C" - also have A . - also have B . + also note `A` + also note `B` finally show C . qed qed @@ -161,7 +161,7 @@ also have "A \ B \ A" proof assume A - thus "B \ A" .. + then show "B \ A" .. qed finally have A . } moreover { @@ -182,9 +182,9 @@ fix C show "(A \ C) \ (B \ C) \ C" proof assume "A \ C" - also have A . + also note `A` finally have C . - thus "(B \ C) \ C" .. + then show "(B \ C) \ C" .. qed qed qed @@ -199,7 +199,7 @@ show "(B \ C) \ C" proof assume "B \ C" - also have B . + also note `B` finally show C . qed qed @@ -213,11 +213,11 @@ from c have "(A \ C) \ (B \ C) \ C" .. also have "A \ C" proof - assume A thus C by (rule r1) + assume A then show C by (rule r1) qed also have "B \ C" proof - assume B thus C by (rule r2) + assume B then show C by (rule r2) qed finally show C . qed @@ -230,8 +230,8 @@ fix C show "(\x. P x \ C) \ C" proof assume "\x. P x \ C" - hence "P a \ C" .. - also have "P a" . + then have "P a \ C" .. + also note `P a` finally show C . qed qed @@ -247,7 +247,7 @@ fix x show "P x \ C" proof assume "P x" - thus C by (rule r) + then show C by (rule r) qed qed finally show C . @@ -269,7 +269,7 @@ have "A \ B" proof assume A - thus B by (rule contradiction) + with `\ A` show B by (rule contradiction) qed with a show A .. qed @@ -282,7 +282,7 @@ show A proof (rule classical) assume "\ A" - thus ?thesis by (rule contradiction) + with `\ \ A` show ?thesis by (rule contradiction) qed qed @@ -294,11 +294,11 @@ assume "\ (A \ \ A)" have "\ A" proof - assume A hence "A \ \ A" .. - thus \ by (rule contradiction) + assume A then have "A \ \ A" .. + with `\ (A \ \ A)` show \ by (rule contradiction) qed - hence "A \ \ A" .. - thus \ by (rule contradiction) + then have "A \ \ A" .. + with `\ (A \ \ A)` show \ by (rule contradiction) qed qed @@ -309,10 +309,10 @@ from tertium_non_datur show C proof assume A - thus ?thesis by (rule r1) + then show ?thesis by (rule r1) next assume "\ A" - thus ?thesis by (rule r2) + then show ?thesis by (rule r2) qed qed @@ -321,9 +321,9 @@ assume r: "\ A \ A" show A proof (rule classical_cases) - assume A thus A . + assume A then show A . next - assume "\ A" thus A by (rule r) + assume "\ A" then show A by (rule r) qed qed diff -r 0035be079bee -r ead82c82da9e src/HOL/ex/PER.thy --- a/src/HOL/ex/PER.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/ex/PER.thy Wed Jun 13 18:30:11 2007 +0200 @@ -242,7 +242,7 @@ proof (rule someI2) show "\a\ = \a\" .. fix x assume "\a\ = \x\" - then have "a \ x" .. + from this and a have "a \ x" .. then show "x \ a" .. qed qed diff -r 0035be079bee -r ead82c82da9e src/HOL/ex/ThreeDivides.thy --- a/src/HOL/ex/ThreeDivides.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/ex/ThreeDivides.thy Wed Jun 13 18:30:11 2007 +0200 @@ -77,7 +77,7 @@ let ?thr = "(3::nat)" have "?thr dvd 9" by simp moreover - have "?thr dvd (10*(10^n - 1))" by (rule dvd_mult) + have "?thr dvd (10*(10^n - 1))" by (rule dvd_mult) (rule Suc) hence "?thr dvd (10^(n+1) - 10)" by (simp add: nat_distrib) ultimately have"?thr dvd ((10^(n+1) - 10) + 9)" diff -r 0035be079bee -r ead82c82da9e src/HOL/ex/Unification.thy --- a/src/HOL/ex/Unification.thy Wed Jun 13 16:43:02 2007 +0200 +++ b/src/HOL/ex/Unification.thy Wed Jun 13 18:30:11 2007 +0200 @@ -461,7 +461,7 @@ by (rule acc_downward) (rule unify_rel.intros) hence no_new_vars: "\t. vars_of (t \ \1) \ vars_of M \ vars_of M' \ vars_of t" - by (rule unify_vars) + by (rule unify_vars) (rule `unify M M' = Some \1`) from ih2 show ?case proof