diff -r 438703674711 -r 321e220a6baa ProgTutorial/Package/Ind_Prelims.thy --- a/ProgTutorial/Package/Ind_Prelims.thy Tue May 21 14:37:39 2019 +0200 +++ b/ProgTutorial/Package/Ind_Prelims.thy Tue May 21 16:22:30 2019 +0200 @@ -117,8 +117,8 @@ by starting a subproof. \ + subgoal premises for P proof - - case (goal1 P) have p1: "R x y" by fact have p2: "\P. (\x. P x x) \ (\x y z. R x y \ P y z \ P x z) \ P y z" by fact @@ -155,6 +155,7 @@ apply(rule p2[THEN spec[where x=P], THEN mp, THEN mp, OF r1, OF r2]) done qed +done text \ Now we are done. It might be surprising that we are not using the automatic @@ -231,8 +232,8 @@ shows "odd m \ even (Suc m)" apply (unfold odd_def even_def) apply (rule allI impI)+ +subgoal premises for P Q proof - - case (goal1 P Q) have p1: "\P Q. P 0 \ (\m. Q m \ P (Suc m)) \ (\m. P m \ Q (Suc m)) \ Q m" by fact have r1: "P 0" by fact @@ -244,6 +245,7 @@ THEN mp, THEN mp, THEN mp, OF r1, OF r2, OF r3]) done qed +done text \ The interesting lines are 7 to 15. Again, the assumptions fall into two categories: @@ -280,21 +282,23 @@ shows "(\y. R y x \ accpart R y) \ accpart R x" apply (unfold accpart_def) apply (rule allI impI)+ +subgoal premises for P proof - - case (goal1 P) have p1: "\y. R y x \ (\P. (\x. (\y. R y x \ P y) \ P x) \ P y)" by fact have r1: "\x. (\y. R y x \ P y) \ P x" by fact show "P x" apply(rule r1[rule_format]) + subgoal premises for y proof - - case (goal1 y) have r1_prem: "R y x" by fact show "P y" - apply(rule p1[OF r1_prem, THEN spec[where x=P], THEN mp, OF r1]) + apply(rule p1[OF r1_prem, THEN spec[where x=P], THEN mp, OF r1]) done - qed + qed + done qed +done text \ As you can see, there are now two subproofs. The assumptions fall as usual into