diff -r 0e847655b2d8 -r fdac1e9880eb src/HOL/IMP/VC.thy --- a/src/HOL/IMP/VC.thy Tue Sep 20 05:47:11 2011 +0200 +++ b/src/HOL/IMP/VC.thy Tue Sep 20 05:48:23 2011 +0200 @@ -49,14 +49,14 @@ subsection "Soundness" lemma vc_sound: "\s. vc c Q s \ \ {pre c Q} astrip c {Q}" -proof(induct c arbitrary: Q) +proof(induction c arbitrary: Q) case (Awhile b I c) show ?case proof(simp, rule While') from `\s. vc (Awhile b I c) Q s` have vc: "\s. vc c I s" and IQ: "\s. I s \ \ bval b s \ Q s" and pre: "\s. I s \ bval b s \ pre c I s" by simp_all - have "\ {pre c I} astrip c {I}" by(rule Awhile.hyps[OF vc]) + have "\ {pre c I} astrip c {I}" by(rule Awhile.IH[OF vc]) with pre show "\ {\s. I s \ bval b s} astrip c {I}" by(rule strengthen_pre) show "\s. I s \ \bval b s \ Q s" by(rule IQ) @@ -72,20 +72,20 @@ lemma pre_mono: "\s. P s \ P' s \ pre c P s \ pre c P' s" -proof (induct c arbitrary: P P' s) +proof (induction c arbitrary: P P' s) case Asemi thus ?case by simp metis qed simp_all lemma vc_mono: "\s. P s \ P' s \ vc c P s \ vc c P' s" -proof(induct c arbitrary: P P') +proof(induction c arbitrary: P P') case Asemi thus ?case by simp (metis pre_mono) qed simp_all lemma vc_complete: "\ {P}c{Q} \ \c'. astrip c' = c \ (\s. vc c' Q s) \ (\s. P s \ pre c' Q s)" (is "_ \ \c'. ?G P c Q c'") -proof (induct rule: hoare.induct) +proof (induction rule: hoare.induct) case Skip show ?case (is "\ac. ?C ac") proof show "?C Askip" by simp qed @@ -95,8 +95,8 @@ proof show "?C(Aassign x a)" by simp qed next case (Semi P c1 Q c2 R) - from Semi.hyps obtain ac1 where ih1: "?G P c1 Q ac1" by blast - from Semi.hyps obtain ac2 where ih2: "?G Q c2 R ac2" by blast + from Semi.IH obtain ac1 where ih1: "?G P c1 Q ac1" by blast + from Semi.IH obtain ac2 where ih2: "?G Q c2 R ac2" by blast show ?case (is "\ac. ?C ac") proof show "?C(Asemi ac1 ac2)" @@ -104,9 +104,9 @@ qed next case (If P b c1 Q c2) - from If.hyps obtain ac1 where ih1: "?G (\s. P s \ bval b s) c1 Q ac1" + from If.IH obtain ac1 where ih1: "?G (\s. P s \ bval b s) c1 Q ac1" by blast - from If.hyps obtain ac2 where ih2: "?G (\s. P s \ \bval b s) c2 Q ac2" + from If.IH obtain ac2 where ih2: "?G (\s. P s \ \bval b s) c2 Q ac2" by blast show ?case (is "\ac. ?C ac") proof @@ -114,7 +114,7 @@ qed next case (While P b c) - from While.hyps obtain ac where ih: "?G (\s. P s \ bval b s) c P ac" by blast + from While.IH obtain ac where ih: "?G (\s. P s \ bval b s) c P ac" by blast show ?case (is "\ac. ?C ac") proof show "?C(Awhile b P ac)" using ih by simp qed next