# HG changeset patch # User wenzelm # Date 1454870620 -3600 # Node ID 4cfe65cfd369b408bd3b1a3d58f431279cbbeab9 # Parent 77e3ffb5aeb3b5aa2e8d809f520eefbb532aa524 more explicit dummy proofs; diff -r 77e3ffb5aeb3 -r 4cfe65cfd369 src/Doc/Isar_Ref/First_Order_Logic.thy --- a/src/Doc/Isar_Ref/First_Order_Logic.thy Sun Feb 07 19:33:42 2016 +0100 +++ b/src/Doc/Isar_Ref/First_Order_Logic.thy Sun Feb 07 19:43:40 2016 +0100 @@ -418,47 +418,47 @@ have "A \ B" proof assume A - show B sorry %noproof + show B \ qed text_raw \\end{minipage}\qquad\begin{minipage}[t]{0.4\textwidth}\(*<*)next(*>*) - have "A \ B" and A sorry %noproof + have "A \ B" and A \ then have B .. text_raw \\end{minipage}\\[3ex]\begin{minipage}[t]{0.4\textwidth}\(*<*)next(*>*) - have A sorry %noproof + have A \ then have "A \ B" .. - have B sorry %noproof + have B \ then have "A \ B" .. text_raw \\end{minipage}\qquad\begin{minipage}[t]{0.4\textwidth}\(*<*)next(*>*) - have "A \ B" sorry %noproof + have "A \ B" \ then have C proof assume A - then show C sorry %noproof + then show C \ next assume B - then show C sorry %noproof + then show C \ qed text_raw \\end{minipage}\\[3ex]\begin{minipage}[t]{0.4\textwidth}\(*<*)next(*>*) - have A and B sorry %noproof + have A and B \ then have "A \ B" .. text_raw \\end{minipage}\qquad\begin{minipage}[t]{0.4\textwidth}\(*<*)next(*>*) - have "A \ B" sorry %noproof + have "A \ B" \ then obtain A and B .. text_raw \\end{minipage}\\[3ex]\begin{minipage}[t]{0.4\textwidth}\(*<*)next(*>*) - have "\" sorry %noproof + have "\" \ then have A .. text_raw \\end{minipage}\qquad\begin{minipage}[t]{0.4\textwidth}\(*<*)next(*>*) @@ -470,12 +470,12 @@ have "\ A" proof assume A - then show "\" sorry %noproof + then show "\" \ qed text_raw \\end{minipage}\qquad\begin{minipage}[t]{0.4\textwidth}\(*<*)next(*>*) - have "\ A" and A sorry %noproof + have "\ A" and A \ then have B .. text_raw \\end{minipage}\\[3ex]\begin{minipage}[t]{0.4\textwidth}\(*<*)next(*>*) @@ -483,24 +483,24 @@ have "\x. B x" proof fix x - show "B x" sorry %noproof + show "B x" \ qed text_raw \\end{minipage}\qquad\begin{minipage}[t]{0.4\textwidth}\(*<*)next(*>*) - have "\x. B x" sorry %noproof + have "\x. B x" \ then have "B a" .. text_raw \\end{minipage}\\[3ex]\begin{minipage}[t]{0.4\textwidth}\(*<*)next(*>*) have "\x. B x" proof - show "B a" sorry %noproof + show "B a" \ qed text_raw \\end{minipage}\qquad\begin{minipage}[t]{0.4\textwidth}\(*<*)next(*>*) - have "\x. B x" sorry %noproof + have "\x. B x" \ then obtain a where "B a" .. text_raw \\end{minipage}\ diff -r 77e3ffb5aeb3 -r 4cfe65cfd369 src/Doc/Isar_Ref/Framework.thy --- a/src/Doc/Isar_Ref/Framework.thy Sun Feb 07 19:33:42 2016 +0100 +++ b/src/Doc/Isar_Ref/Framework.thy Sun Feb 07 19:43:40 2016 +0100 @@ -141,7 +141,7 @@ proof fix A assume "A \ \" - show "x \ A" sorry %noproof + show "x \ A" \ qed (*<*) end @@ -192,7 +192,7 @@ proof fix A assume "x \ A" and "A \ \" - show C sorry %noproof + show C \ qed (*<*) end @@ -664,25 +664,25 @@ text_raw \\begin{minipage}[t]{0.45\textwidth}\ { fix x - have "B x" sorry %noproof + have "B x" \ } note \\x. B x\ text_raw \\end{minipage}\quad\begin{minipage}[t]{0.45\textwidth}\(*<*)next(*>*) { assume A - have B sorry %noproof + have B \ } note \A \ B\ text_raw \\end{minipage}\\[3ex]\begin{minipage}[t]{0.45\textwidth}\(*<*)next(*>*) { def x \ a - have "B x" sorry %noproof + have "B x" \ } note \B a\ text_raw \\end{minipage}\quad\begin{minipage}[t]{0.45\textwidth}\(*<*)next(*>*) { - obtain x where "A x" sorry %noproof - have B sorry %noproof + obtain x where "A x" \ + have B \ } note \B\ text_raw \\end{minipage}\ @@ -754,7 +754,7 @@ shows "C x y" proof - from \A x\ and \B y\ - show "C x y" sorry %noproof + show "C x y" \ qed text_raw \\end{minipage}\begin{minipage}{0.5\textwidth}\ @@ -763,7 +763,7 @@ obtains x and y where "A x" and "B y" proof - - have "A a" and "B b" sorry %noproof + have "A a" and "B b" \ then show thesis .. qed @@ -833,7 +833,7 @@ proof assume A show B - sorry %noproof + \ qed text_raw \\end{minipage}\quad \begin{minipage}[t]{0.06\textwidth} @@ -892,7 +892,7 @@ proof - fix x and y assume "A x" and "B y" - show "C x y" sorry %noproof + show "C x y" \ qed text_raw \\end{minipage}\begin{minipage}{0.5\textwidth}\ @@ -904,7 +904,7 @@ proof - fix x assume "A x" fix y assume "B y" - show "C x y" sorry %noproof + show "C x y" \ qed text_raw \\end{minipage}\\[3ex]\begin{minipage}{0.5\textwidth}\ @@ -916,7 +916,7 @@ proof - fix y assume "B y" fix x assume "A x" - show "C x y" sorry + show "C x y" \ qed text_raw \\end{minipage}\begin{minipage}{0.5\textwidth}\ @@ -927,7 +927,7 @@ proof - fix y assume "B y" fix x - show "C x y" sorry + show "C x y" \ qed (*<*) end @@ -1000,9 +1000,9 @@ notepad begin (*>*) - have "a = b" sorry - also have "\ = c" sorry - also have "\ = d" sorry + have "a = b" \ + also have "\ = c" \ + also have "\ = d" \ finally have "a = d" . (*<*) end diff -r 77e3ffb5aeb3 -r 4cfe65cfd369 src/Doc/Isar_Ref/Proof_Script.thy --- a/src/Doc/Isar_Ref/Proof_Script.thy Sun Feb 07 19:33:42 2016 +0100 +++ b/src/Doc/Isar_Ref/Proof_Script.thy Sun Feb 07 19:43:40 2016 +0100 @@ -133,24 +133,24 @@ lemma "\x y z. A x \ B y \ C z" and "\u v. X u \ Y v" - subgoal sorry - subgoal sorry + subgoal \ + subgoal \ done lemma "\x y z. A x \ B y \ C z" and "\u v. X u \ Y v" - subgoal for x y z sorry - subgoal for u v sorry + subgoal for x y z \ + subgoal for u v \ done lemma "\x y z. A x \ B y \ C z" and "\u v. X u \ Y v" subgoal premises for x y z using \A x\ \B y\ - sorry + \ subgoal premises for u v using \X u\ - sorry + \ done lemma "\x y z. A x \ B y \ C z" @@ -159,21 +159,21 @@ proof - have "A x" by (fact prems) moreover have "B y" by (fact prems) - ultimately show ?thesis sorry + ultimately show ?thesis \ qed subgoal premises prems for u v proof - have "\x y z. A x \ B y \ C z" by (fact r) moreover have "X u" by (fact prems) - ultimately show ?thesis sorry + ultimately show ?thesis \ qed done lemma "\x y z. A x \ B y \ C z" subgoal premises prems for \ z proof - - from prems show "C z" sorry + from prems show "C z" \ qed done diff -r 77e3ffb5aeb3 -r 4cfe65cfd369 src/Doc/Isar_Ref/Synopsis.thy --- a/src/Doc/Isar_Ref/Synopsis.thy Sun Feb 07 19:33:42 2016 +0100 +++ b/src/Doc/Isar_Ref/Synopsis.thy Sun Feb 07 19:43:40 2016 +0100 @@ -53,7 +53,7 @@ assume a: A txt \Via proof (``let''):\ - have b: B sorry + have b: B \ txt \Via abbreviation (``let''):\ note c = a b @@ -156,8 +156,8 @@ notepad begin { - have a: A sorry - have b: B sorry + have a: A \ + have b: B \ note a b } note this @@ -174,15 +174,15 @@ begin { - have a: A sorry + have a: A \ next have b: B proof - - show B sorry + show B \ next - have c: C sorry + have c: C \ next - have d: D sorry + have d: D \ qed } @@ -190,19 +190,19 @@ { { - have a: A sorry + have a: A \ } { have b: B proof - { - show B sorry + show B \ } { - have c: C sorry + have c: C \ } { - have d: D sorry + have d: D \ } qed } @@ -235,7 +235,7 @@ have "x = y" proof - term ?thesis - show ?thesis sorry + show ?thesis \ term ?thesis \ \static!\ qed term "\" @@ -260,31 +260,31 @@ notepad begin txt \Plain bottom-up calculation:\ - have "a = b" sorry + have "a = b" \ also - have "b = c" sorry + have "b = c" \ also - have "c = d" sorry + have "c = d" \ finally have "a = d" . txt \Variant using the \\\ abbreviation:\ - have "a = b" sorry + have "a = b" \ also - have "\ = c" sorry + have "\ = c" \ also - have "\ = d" sorry + have "\ = d" \ finally have "a = d" . txt \Top-down version with explicit claim at the head:\ have "a = d" proof - - have "a = b" sorry + have "a = b" \ also - have "\ = c" sorry + have "\ = c" \ also - have "\ = d" sorry + have "\ = d" \ finally show ?thesis . qed @@ -292,11 +292,11 @@ txt \Mixed inequalities (require suitable base type):\ fix a b c d :: nat - have "a < b" sorry + have "a < b" \ also - have "b \ c" sorry + have "b \ c" \ also - have "c = d" sorry + have "c = d" \ finally have "a < d" . end @@ -321,31 +321,31 @@ notepad begin txt \A vacuous proof:\ - have A sorry + have A \ moreover - have B sorry + have B \ moreover - have C sorry + have C \ ultimately have A and B and C . next txt \Slightly more content (trivial bigstep reasoning):\ - have A sorry + have A \ moreover - have B sorry + have B \ moreover - have C sorry + have C \ ultimately have "A \ B \ C" by blast next txt \More ambitious bigstep reasoning involving structured results:\ - have "A \ B \ C" sorry + have "A \ B \ C" \ moreover - { assume A have R sorry } + { assume A have R \ } moreover - { assume B have R sorry } + { assume B have R \ } moreover - { assume C have R sorry } + { assume C have R \ } ultimately have R by blast \ \``big-bang integration'' of proof blocks (occasionally fragile)\ end @@ -367,11 +367,11 @@ fix n :: nat have "P n" proof (rule nat.induct) \ \fragile rule application!\ - show "P 0" sorry + show "P 0" \ next fix n :: nat assume "P n" - show "P (Suc n)" sorry + show "P (Suc n)" \ qed end @@ -394,10 +394,10 @@ have "P n" proof (induct n) case 0 - show ?case sorry + show ?case \ next case (Suc n) - from Suc.hyps show ?case sorry + from Suc.hyps show ?case \ qed end @@ -456,29 +456,29 @@ have "P n" proof (induct n) case 0 - show "P 0" sorry + show "P 0" \ next case (Suc n) - from \P n\ show "P (Suc n)" sorry + from \P n\ show "P (Suc n)" \ qed have "A n \ P n" proof (induct n) case 0 - from \A 0\ show "P 0" sorry + from \A 0\ show "P 0" \ next case (Suc n) from \A n \ P n\ - and \A (Suc n)\ show "P (Suc n)" sorry + and \A (Suc n)\ show "P (Suc n)" \ qed have "\x. Q x n" proof (induct n) case 0 - show "Q x 0" sorry + show "Q x 0" \ next case (Suc n) - from \\x. Q x n\ show "Q x (Suc n)" sorry + from \\x. Q x n\ show "Q x (Suc n)" \ txt \Local quantification admits arbitrary instances:\ note \Q a n\ and \Q b n\ qed @@ -502,11 +502,11 @@ then have "Q x n" proof (induct n arbitrary: x) case 0 - from \A x 0\ show "Q x 0" sorry + from \A x 0\ show "Q x 0" \ next case (Suc n) from \\x. A x n \ Q x n\ \ \arbitrary instances can be produced here\ - and \A x (Suc n)\ show "Q x (Suc n)" sorry + and \A x (Suc n)\ show "Q x (Suc n)" \ qed end @@ -532,13 +532,13 @@ case 0 note prem = \A (a x)\ and defn = \0 = a x\ - show "P (a x)" sorry + show "P (a x)" \ next case (Suc n) note hyp = \\x. n = a x \ A (a x) \ P (a x)\ and prem = \A (a x)\ and defn = \Suc n = a x\ - show "P (a x)" sorry + show "P (a x)" \ qed end @@ -628,7 +628,7 @@ begin { fix x - have "B x" sorry + have "B x" \ } have "\x. B x" by fact @@ -636,7 +636,7 @@ { assume A - have B sorry + have B \ } have "A \ B" by fact @@ -644,15 +644,15 @@ { def x \ t - have "B x" sorry + have "B x" \ } have "B t" by fact next { - obtain x :: 'a where "B x" sorry - have C sorry + obtain x :: 'a where "B x" \ + have C \ } have C by fact @@ -703,7 +703,7 @@ proof - fix x assume "A x" - show "B x" sorry + show "B x" \ qed have "\x. A x \ B x" @@ -711,7 +711,7 @@ { fix x assume "A x" - show "B x" sorry + show "B x" \ } \ "implicit block structure made explicit" note \\x. A x \ B x\ \ "side exit for the resulting rule" @@ -730,36 +730,36 @@ begin assume r1: "A \ B \ C" \ \simple rule (Horn clause)\ - have A sorry \ "prefix of facts via outer sub-proof" + have A \ \ "prefix of facts via outer sub-proof" then have C proof (rule r1) - show B sorry \ "remaining rule premises via inner sub-proof" + show B \ \ "remaining rule premises via inner sub-proof" qed have C proof (rule r1) - show A sorry - show B sorry + show A \ + show B \ qed - have A and B sorry + have A and B \ then have C proof (rule r1) qed - have A and B sorry + have A and B \ then have C by (rule r1) next assume r2: "A \ (\x. B1 x \ B2 x) \ C" \ \nested rule\ - have A sorry + have A \ then have C proof (rule r2) fix x assume "B1 x" - show "B2 x" sorry + show "B2 x" \ qed txt \The compound rule premise @{prop "\x. B1 x \ B2 x"} is better @@ -777,35 +777,35 @@ notepad begin - have "A \ B" and A sorry + have "A \ B" and A \ then have B .. - have A sorry + have A \ then have "A \ B" .. - have B sorry + have B \ then have "A \ B" .. - have "A \ B" sorry + have "A \ B" \ then have C proof assume A - then show C sorry + then show C \ next assume B - then show C sorry + then show C \ qed - have A and B sorry + have A and B \ then have "A \ B" .. - have "A \ B" sorry + have "A \ B" \ then have A .. - have "A \ B" sorry + have "A \ B" \ then have B .. - have False sorry + have False \ then have A .. have True .. @@ -813,36 +813,36 @@ have "\ A" proof assume A - then show False sorry + then show False \ qed - have "\ A" and A sorry + have "\ A" and A \ then have B .. have "\x. P x" proof fix x - show "P x" sorry + show "P x" \ qed - have "\x. P x" sorry + have "\x. P x" \ then have "P a" .. have "\x. P x" proof - show "P a" sorry + show "P a" \ qed - have "\x. P x" sorry + have "\x. P x" \ then have C proof fix a assume "P a" - show C sorry + show C \ qed txt \Less awkward version using @{command obtain}:\ - have "\x. P x" sorry + have "\x. P x" \ then obtain a where "P a" .. end @@ -853,32 +853,32 @@ begin have "A \ B" proof \ \two strictly isolated subproofs\ - show A sorry + show A \ next - show B sorry + show B \ qed have "A \ B" proof \ \one simultaneous sub-proof\ - show A and B sorry + show A and B \ qed have "A \ B" proof \ \two subproofs in the same context\ - show A sorry - show B sorry + show A \ + show B \ qed have "A \ B" proof \ \swapped order\ - show B sorry - show A sorry + show B \ + show A \ qed have "A \ B" proof \ \sequential subproofs\ - show A sorry - show B using \A\ sorry + show A \ + show B using \A\ \ qed end @@ -893,23 +893,23 @@ notepad begin - have "x \ A" and "x \ B" sorry + have "x \ A" and "x \ B" \ then have "x \ A \ B" .. - have "x \ A" sorry + have "x \ A" \ then have "x \ A \ B" .. - have "x \ B" sorry + have "x \ B" \ then have "x \ A \ B" .. - have "x \ A \ B" sorry + have "x \ A \ B" \ then have C proof assume "x \ A" - then show C sorry + then show C \ next assume "x \ B" - then show C sorry + then show C \ qed next @@ -917,19 +917,19 @@ proof fix a assume "a \ A" - show "x \ a" sorry + show "x \ a" \ qed - have "x \ \A" sorry + have "x \ \A" \ then have "x \ a" proof - show "a \ A" sorry + show "a \ A" \ qed - have "a \ A" and "x \ a" sorry + have "a \ A" and "x \ a" \ then have "x \ \A" .. - have "x \ \A" sorry + have "x \ \A" \ then obtain a where "a \ A" and "x \ a" .. end @@ -965,16 +965,16 @@ (\x y. B2 x y \ C2 x y \ R) \ (* case 2 *) R (* main conclusion *)" - have A1 and A2 sorry + have A1 and A2 \ then have R proof (rule r) fix x y assume "B1 x y" and "C1 x y" - show ?thesis sorry + show ?thesis \ next fix x y assume "B2 x y" and "C2 x y" - show ?thesis sorry + show ?thesis \ qed end @@ -1007,7 +1007,7 @@ obtains (case1) x y where "B1 x y" and "C1 x y" | (case2) x y where "B2 x y" and "C2 x y" - sorry + \ subsubsection \Example\ @@ -1024,10 +1024,10 @@ have C proof (cases "x = y" rule: tertium_non_datur) case T - from \x = y\ show ?thesis sorry + from \x = y\ show ?thesis \ next case F - from \x \ y\ show ?thesis sorry + from \x \ y\ show ?thesis \ qed end @@ -1047,10 +1047,10 @@ have C proof (cases x) case Foo - from \x = Foo\ show ?thesis sorry + from \x = Foo\ show ?thesis \ next case (Bar a) - from \x = Bar a\ show ?thesis sorry + from \x = Bar a\ show ?thesis \ qed end @@ -1065,13 +1065,13 @@ begin fix B :: "'a \ bool" - obtain x where "B x" sorry + obtain x where "B x" \ note \B x\ txt \Conclusions from this context may not mention @{term x} again!\ { - obtain x where "B x" sorry - from \B x\ have C sorry + obtain x where "B x" \ + from \B x\ have C \ } note \C\ end diff -r 77e3ffb5aeb3 -r 4cfe65cfd369 src/Doc/Isar_Ref/document/style.sty --- a/src/Doc/Isar_Ref/document/style.sty Sun Feb 07 19:33:42 2016 +0100 +++ b/src/Doc/Isar_Ref/document/style.sty Sun Feb 07 19:43:40 2016 +0100 @@ -16,7 +16,6 @@ %% Isar \newcommand{\isasymBBAR}{{\,\newdimen{\tmpheight}\settoheight\tmpheight{\isacharbar}\rule{1pt}{\tmpheight}\,}} -\isafoldtag{noproof}\def\isafoldnoproof{~\isafold{proof}} \renewcommand{\isacommand}[1]{\isakeyword{\isadigitreset#1}} \newcommand{\isasymproof}{\isamath{\,\langle\mathit{proof}\rangle}}