diff -r 321e220a6baa -r 034150db9d91 ProgTutorial/Tactical.thy --- a/ProgTutorial/Tactical.thy Tue May 21 16:22:30 2019 +0200 +++ b/ProgTutorial/Tactical.thy Wed May 22 12:38:51 2019 +0200 @@ -962,7 +962,8 @@ lemma shows "A \ True \ A" apply(tactic \(resolve_tac @{context} [@{thm conjI}] - THEN' RANGE [resolve_tac @{context} [@{thm TrueI}], assume_tac @{context}]) 1\) + THEN' RANGE [resolve_tac @{context} [@{thm TrueI}], + assume_tac @{context}]) 1\) txt \\begin{minipage}{\textwidth} @{subgoals [display]} \end{minipage}\ @@ -976,8 +977,11 @@ \ ML %grayML\fun foo_tac'' ctxt = - EVERY' [eresolve_tac ctxt [@{thm disjE}], resolve_tac ctxt [@{thm disjI2}], - assume_tac ctxt, resolve_tac ctxt [@{thm disjI1}], assume_tac ctxt]\ + EVERY' [eresolve_tac ctxt [@{thm disjE}], + resolve_tac ctxt [@{thm disjI2}], + assume_tac ctxt, + resolve_tac ctxt [@{thm disjI1}], + assume_tac ctxt]\ text \ There is even another way of implementing this tactic: in automatic proof @@ -988,8 +992,11 @@ \ ML %grayML\fun foo_tac1 ctxt = - EVERY1 [eresolve_tac ctxt [@{thm disjE}], resolve_tac ctxt [@{thm disjI2}], - assume_tac ctxt, resolve_tac ctxt [@{thm disjI1}], assume_tac ctxt]\ + EVERY1 [eresolve_tac ctxt [@{thm disjE}], + resolve_tac ctxt [@{thm disjI2}], + assume_tac ctxt, + resolve_tac ctxt [@{thm disjI1}], + assume_tac ctxt]\ text \ and call @{ML foo_tac1}. @@ -1073,8 +1080,10 @@ \ ML %grayML\fun select_tac'' ctxt = - TRY o FIRST' [resolve_tac ctxt [@{thm conjI}], resolve_tac ctxt [@{thm impI}], - resolve_tac ctxt [@{thm notI}], resolve_tac ctxt [@{thm allI}]]\ + TRY o FIRST' [resolve_tac ctxt [@{thm conjI}], + resolve_tac ctxt [@{thm impI}], + resolve_tac ctxt [@{thm notI}], + resolve_tac ctxt [@{thm allI}]]\ text_raw\\label{tac:selectprimeprime}\ text \ @@ -1472,7 +1481,8 @@ the simplification rule @{thm [source] Diff_Int} as follows: \ -ML %grayML\val ss1 = put_simpset empty_ss @{context} addsimps [@{thm Diff_Int} RS @{thm eq_reflection}]\ +ML %grayML\val ss1 = put_simpset empty_ss @{context} addsimps + [@{thm Diff_Int} RS @{thm eq_reflection}]\ thm "INF_cong" text \ @@ -1490,7 +1500,8 @@ Adding also the congruence rule @{thm [source] INF_cong} \ -ML %grayML\val ss2 = ss1 |> Simplifier.add_cong (@{thm INF_cong} RS @{thm eq_reflection})\ +ML %grayML\val ss2 = ss1 |> + Simplifier.add_cong (@{thm INF_cong} RS @{thm eq_reflection})\ text \ gives @@ -1501,7 +1512,8 @@ ??.unknown: A1 - B1 \ C1 \ A1 - B1 \ (A1 - C1) Congruences rules: Complete_Lattices.Inf_class.Inf: - \A1 = B1; \x. x \ B1 \ C1 x = D1 x\ \ Inf (C1 ` A1) \ Inf (D1 ` B1) + \A1 = B1; \x. x \ B1 \ C1 x = D1 x\ + \ Inf (C1 ` A1) \ Inf (D1 ` B1) Simproc patterns:\} Notice that we had to add these lemmas as meta-equations. The @{ML empty_ss}