added also, finally;
authorwenzelm
Fri, 04 Jun 1999 19:54:38 +0200
changeset 6774 dec73900168b
parent 6773 83c09a9684cf
child 6775 9d96ce9c27d6
added also, finally;
src/Pure/Isar/isar_thy.ML
--- a/src/Pure/Isar/isar_thy.ML	Fri Jun 04 19:54:23 1999 +0200
+++ b/src/Pure/Isar/isar_thy.ML	Fri Jun 04 19:54:38 1999 +0200
@@ -113,6 +113,8 @@
   val terminal_proof: Method.text * Comment.interest -> Toplevel.transition -> Toplevel.transition
   val immediate_proof: Toplevel.transition -> Toplevel.transition
   val default_proof: Toplevel.transition -> Toplevel.transition
+  val also: Comment.text -> Toplevel.transition -> Toplevel.transition
+  val finally: Comment.text -> Toplevel.transition -> Toplevel.transition
   val use_mltext: string -> theory option -> theory option
   val use_mltext_theory: string -> theory -> theory
   val use_setup: string -> theory -> theory
@@ -342,6 +344,18 @@
 val default_proof = local_default_proof o global_default_proof;
 
 
+(* calculational proof commands *)
+
+fun cond_print_calc int thm =
+  if int then Pretty.writeln (Pretty.big_list "calculation:" [Display.pretty_thm thm])
+  else ();
+
+fun proof''' f = Toplevel.proof' (f o cond_print_calc);
+
+fun also _ = proof''' (ProofHistory.applys o Calculation.also);
+fun finally _ = proof''' (ProofHistory.applys o Calculation.finally);
+
+
 (* use ML text *)
 
 fun use_mltext txt opt_thy = #2 (Context.pass opt_thy (use_text false) txt);