# HG changeset patch # User Christian Urban # Date 1254735949 -7200 # Node ID 46100dc4a80839266aa874e55b51c469b058ed0d # Parent 7718da58d9c01327c90c2c49f7d6c7bd7cb14458 used rewrite_goal_tac (instead of rewrite_goals_tac) diff -r 7718da58d9c0 -r 46100dc4a808 ProgTutorial/Package/Ind_Code.thy --- a/ProgTutorial/Package/Ind_Code.thy Sun Oct 04 21:56:53 2009 +0200 +++ b/ProgTutorial/Package/Ind_Code.thy Mon Oct 05 11:45:49 2009 +0200 @@ -278,7 +278,7 @@ ML %linenosgray{*fun ind_tac defs prem insts = EVERY1 [ObjectLogic.full_atomize_tac, cut_facts_tac prem, - K (rewrite_goals_tac defs), + rewrite_goal_tac defs, inst_spec_tac insts, assume_tac]*} @@ -563,7 +563,7 @@ ML %linenosgray{*fun expand_tac defs = ObjectLogic.rulify_tac 1 - THEN rewrite_goals_tac defs + THEN rewrite_goal_tac defs 1 THEN (REPEAT (resolve_tac [@{thm allI}, @{thm impI}] 1)) *} text {* @@ -905,7 +905,7 @@ ML %linenosgray{*fun intro_tac defs rules preds i ctxt = EVERY1 [ObjectLogic.rulify_tac, - K (rewrite_goals_tac defs), + rewrite_goal_tac defs, REPEAT o (resolve_tac [@{thm allI}, @{thm impI}]), prove_intro_tac i preds rules ctxt]*} diff -r 7718da58d9c0 -r 46100dc4a808 ProgTutorial/Package/simple_inductive_package.ML --- a/ProgTutorial/Package/simple_inductive_package.ML Sun Oct 04 21:56:53 2009 +0200 +++ b/ProgTutorial/Package/simple_inductive_package.ML Mon Oct 05 11:45:49 2009 +0200 @@ -65,7 +65,7 @@ fun induction_tac defs prems insts = EVERY1 [ObjectLogic.full_atomize_tac, cut_facts_tac prems, - K (rewrite_goals_tac defs), + rewrite_goal_tac defs, EVERY' (map (dtac o inst_spec) insts), assume_tac] (* @end *) @@ -139,7 +139,7 @@ fun introductions_tac defs rules preds i ctxt = EVERY1 [ObjectLogic.rulify_tac, - K (rewrite_goals_tac defs), + rewrite_goal_tac defs, REPEAT o (resolve_tac [@{thm allI},@{thm impI}]), subproof1 rules preds i ctxt] diff -r 7718da58d9c0 -r 46100dc4a808 ProgTutorial/Tactical.thy --- a/ProgTutorial/Tactical.thy Sun Oct 04 21:56:53 2009 +0200 +++ b/ProgTutorial/Tactical.thy Mon Oct 05 11:45:49 2009 +0200 @@ -1366,7 +1366,7 @@ The simplifier is often used to unfold definitions in a proof. For this the - simplifier implements the tactic @{ML_ind rewrite_goals_tac}.\footnote{FIXME: + simplifier implements the tactic @{ML_ind rewrite_goal_tac}.\footnote{\bf FIXME: see LocalDefs infrastructure.} Suppose for example the definition *} @@ -1374,12 +1374,11 @@ definition "MyTrue \ True" text {* - then in the following proof we can unfold this constant + then we can use this tactic to unfold the definition of the constant. *} -lemma shows "MyTrue \ True \ True" -apply(rule conjI) -apply(tactic {* rewrite_goals_tac @{thms MyTrue_def} *}) +lemma shows "MyTrue \ True" +apply(tactic {* rewrite_goal_tac @{thms MyTrue_def} 1 *}) txt{* producing the goal state \begin{minipage}{\textwidth} @@ -1388,7 +1387,8 @@ (*<*)oops(*>*) text {* - As you can see, the tactic unfolds the definitions in all subgoals. + If you want to unfold definitions in all subgoals, then use the + the tactic @{ML_ind rewrite_goals_tac}. *} diff -r 7718da58d9c0 -r 46100dc4a808 progtutorial.pdf Binary file progtutorial.pdf has changed