re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
authorboehmes
Sat Oct 03 12:05:40 2009 +0200 (2009-10-03)
changeset 32864a226f29d4bdc
parent 32852 7c8bc41ce810
child 32865 f8d1e16ec758
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
eliminated unused provers,
turned references into configuration values
src/HOL/ATP_Linkup.thy
src/HOL/MetisExamples/Abstraction.thy
src/HOL/MetisExamples/BT.thy
src/HOL/MetisExamples/BigO.thy
src/HOL/MetisExamples/Message.thy
src/HOL/MetisExamples/Tarski.thy
src/HOL/MetisExamples/TransClosure.thy
src/HOL/MetisExamples/set.thy
src/HOL/Mirabelle/Tools/mirabelle_sledgehammer.ML
src/HOL/Tools/ATP_Manager/atp_manager.ML
src/HOL/Tools/ATP_Manager/atp_minimal.ML
src/HOL/Tools/ATP_Manager/atp_wrapper.ML
     1.1 --- a/src/HOL/ATP_Linkup.thy	Fri Oct 02 04:44:56 2009 +0200
     1.2 +++ b/src/HOL/ATP_Linkup.thy	Sat Oct 03 12:05:40 2009 +0200
     1.3 @@ -96,29 +96,26 @@
     1.4  use "Tools/res_reconstruct.ML" setup ResReconstruct.setup
     1.5  use "Tools/res_atp.ML"
     1.6  
     1.7 +use "Tools/ATP_Manager/atp_wrapper.ML" setup AtpWrapper.setup
     1.8  use "Tools/ATP_Manager/atp_manager.ML"
     1.9 -use "Tools/ATP_Manager/atp_wrapper.ML"
    1.10  use "Tools/ATP_Manager/atp_minimal.ML"
    1.11  
    1.12  text {* basic provers *}
    1.13 -setup {* AtpManager.add_prover "spass" AtpWrapper.spass *}
    1.14 -setup {* AtpManager.add_prover "vampire" AtpWrapper.vampire *}
    1.15 -setup {* AtpManager.add_prover "e" AtpWrapper.eprover *}
    1.16 +setup {* AtpManager.add_prover AtpWrapper.spass *}
    1.17 +setup {* AtpManager.add_prover AtpWrapper.vampire *}
    1.18 +setup {* AtpManager.add_prover AtpWrapper.eprover *}
    1.19  
    1.20  text {* provers with stuctured output *}
    1.21 -setup {* AtpManager.add_prover "vampire_full" AtpWrapper.vampire_full *}
    1.22 -setup {* AtpManager.add_prover "e_full" AtpWrapper.eprover_full *}
    1.23 +setup {* AtpManager.add_prover AtpWrapper.vampire_full *}
    1.24 +setup {* AtpManager.add_prover AtpWrapper.eprover_full *}
    1.25  
    1.26  text {* on some problems better results *}
    1.27 -setup {* AtpManager.add_prover "spass_no_tc" (AtpWrapper.spass_opts 40 false) *}
    1.28 +setup {* AtpManager.add_prover AtpWrapper.spass_no_tc *}
    1.29  
    1.30  text {* remote provers via SystemOnTPTP *}
    1.31 -setup {* AtpManager.add_prover "remote_vampire"
    1.32 -  (AtpWrapper.remote_prover_opts 60 false "" "Vampire---9") *}
    1.33 -setup {* AtpManager.add_prover "remote_spass"
    1.34 -  (AtpWrapper.remote_prover_opts 40 true "-x" "SPASS---") *}
    1.35 -setup {* AtpManager.add_prover "remote_e"
    1.36 -  (AtpWrapper.remote_prover_opts 100 false "" "EP---") *}
    1.37 +setup {* AtpManager.add_prover AtpWrapper.remote_vampire *}
    1.38 +setup {* AtpManager.add_prover AtpWrapper.remote_spass *}
    1.39 +setup {* AtpManager.add_prover AtpWrapper.remote_eprover *}
    1.40    
    1.41  
    1.42  
     2.1 --- a/src/HOL/MetisExamples/Abstraction.thy	Fri Oct 02 04:44:56 2009 +0200
     2.2 +++ b/src/HOL/MetisExamples/Abstraction.thy	Sat Oct 03 12:05:40 2009 +0200
     2.3 @@ -22,7 +22,7 @@
     2.4    pset  :: "'a set => 'a set"
     2.5    order :: "'a set => ('a * 'a) set"
     2.6  
     2.7 -ML{*AtpWrapper.problem_name := "Abstraction__Collect_triv"*}
     2.8 +declare [[ atp_problem_prefix = "Abstraction__Collect_triv" ]]
     2.9  lemma (*Collect_triv:*) "a \<in> {x. P x} ==> P a"
    2.10  proof (neg_clausify)
    2.11  assume 0: "(a\<Colon>'a\<Colon>type) \<in> Collect (P\<Colon>'a\<Colon>type \<Rightarrow> bool)"
    2.12 @@ -37,12 +37,12 @@
    2.13  by (metis mem_Collect_eq)
    2.14  
    2.15  
    2.16 -ML{*AtpWrapper.problem_name := "Abstraction__Collect_mp"*}
    2.17 +declare [[ atp_problem_prefix = "Abstraction__Collect_mp" ]]
    2.18  lemma "a \<in> {x. P x --> Q x} ==> a \<in> {x. P x} ==> a \<in> {x. Q x}"
    2.19    by (metis CollectI Collect_imp_eq ComplD UnE mem_Collect_eq);
    2.20    --{*34 secs*}
    2.21  
    2.22 -ML{*AtpWrapper.problem_name := "Abstraction__Sigma_triv"*}
    2.23 +declare [[ atp_problem_prefix = "Abstraction__Sigma_triv" ]]
    2.24  lemma "(a,b) \<in> Sigma A B ==> a \<in> A & b \<in> B a"
    2.25  proof (neg_clausify)
    2.26  assume 0: "(a\<Colon>'a\<Colon>type, b\<Colon>'b\<Colon>type) \<in> Sigma (A\<Colon>'a\<Colon>type set) (B\<Colon>'a\<Colon>type \<Rightarrow> 'b\<Colon>type set)"
    2.27 @@ -60,7 +60,7 @@
    2.28  lemma Sigma_triv: "(a,b) \<in> Sigma A B ==> a \<in> A & b \<in> B a"
    2.29  by (metis SigmaD1 SigmaD2)
    2.30  
    2.31 -ML{*AtpWrapper.problem_name := "Abstraction__Sigma_Collect"*}
    2.32 +declare [[ atp_problem_prefix = "Abstraction__Sigma_Collect" ]]
    2.33  lemma "(a,b) \<in> (SIGMA x: A. {y. x = f y}) ==> a \<in> A & a = f b"
    2.34  (*???metis says this is satisfiable!
    2.35  by (metis CollectD SigmaD1 SigmaD2)
    2.36 @@ -112,7 +112,7 @@
    2.37  qed
    2.38  
    2.39  
    2.40 -ML{*AtpWrapper.problem_name := "Abstraction__CLF_eq_in_pp"*}
    2.41 +declare [[ atp_problem_prefix = "Abstraction__CLF_eq_in_pp" ]]
    2.42  lemma "(cl,f) \<in> CLF ==> CLF = (SIGMA cl: CL.{f. f \<in> pset cl}) ==> f \<in> pset cl"
    2.43  by (metis Collect_mem_eq SigmaD2)
    2.44  
    2.45 @@ -131,7 +131,7 @@
    2.46    by (metis 5 0)
    2.47  qed
    2.48  
    2.49 -ML{*AtpWrapper.problem_name := "Abstraction__Sigma_Collect_Pi"*}
    2.50 +declare [[ atp_problem_prefix = "Abstraction__Sigma_Collect_Pi" ]]
    2.51  lemma
    2.52      "(cl,f) \<in> (SIGMA cl: CL. {f. f \<in> pset cl \<rightarrow> pset cl}) ==> 
    2.53      f \<in> pset cl \<rightarrow> pset cl"
    2.54 @@ -147,7 +147,7 @@
    2.55  qed
    2.56  
    2.57  
    2.58 -ML{*AtpWrapper.problem_name := "Abstraction__Sigma_Collect_Int"*}
    2.59 +declare [[ atp_problem_prefix = "Abstraction__Sigma_Collect_Int" ]]
    2.60  lemma
    2.61      "(cl,f) \<in> (SIGMA cl: CL. {f. f \<in> pset cl \<inter> cl}) ==>
    2.62     f \<in> pset cl \<inter> cl"
    2.63 @@ -170,13 +170,13 @@
    2.64  qed
    2.65  
    2.66  
    2.67 -ML{*AtpWrapper.problem_name := "Abstraction__Sigma_Collect_Pi_mono"*}
    2.68 +declare [[ atp_problem_prefix = "Abstraction__Sigma_Collect_Pi_mono" ]]
    2.69  lemma
    2.70      "(cl,f) \<in> (SIGMA cl: CL. {f. f \<in> pset cl \<rightarrow> pset cl & monotone f (pset cl) (order cl)}) ==>
    2.71     (f \<in> pset cl \<rightarrow> pset cl)  &  (monotone f (pset cl) (order cl))"
    2.72  by auto
    2.73  
    2.74 -ML{*AtpWrapper.problem_name := "Abstraction__CLF_subset_Collect_Int"*}
    2.75 +declare [[ atp_problem_prefix = "Abstraction__CLF_subset_Collect_Int" ]]
    2.76  lemma "(cl,f) \<in> CLF ==> 
    2.77     CLF \<subseteq> (SIGMA cl: CL. {f. f \<in> pset cl \<inter> cl}) ==>
    2.78     f \<in> pset cl \<inter> cl"
    2.79 @@ -187,7 +187,7 @@
    2.80    --{*@{text Int_def} is redundant*}
    2.81  *)
    2.82  
    2.83 -ML{*AtpWrapper.problem_name := "Abstraction__CLF_eq_Collect_Int"*}
    2.84 +declare [[ atp_problem_prefix = "Abstraction__CLF_eq_Collect_Int" ]]
    2.85  lemma "(cl,f) \<in> CLF ==> 
    2.86     CLF = (SIGMA cl: CL. {f. f \<in> pset cl \<inter> cl}) ==>
    2.87     f \<in> pset cl \<inter> cl"
    2.88 @@ -196,7 +196,7 @@
    2.89  by (metis Collect_mem_eq Int_commute SigmaD2)
    2.90  *)
    2.91  
    2.92 -ML{*AtpWrapper.problem_name := "Abstraction__CLF_subset_Collect_Pi"*}
    2.93 +declare [[ atp_problem_prefix = "Abstraction__CLF_subset_Collect_Pi" ]]
    2.94  lemma 
    2.95     "(cl,f) \<in> CLF ==> 
    2.96      CLF \<subseteq> (SIGMA cl': CL. {f. f \<in> pset cl' \<rightarrow> pset cl'}) ==> 
    2.97 @@ -206,7 +206,7 @@
    2.98  by (metis Collect_mem_eq SigmaD2 subsetD)
    2.99  *)
   2.100  
   2.101 -ML{*AtpWrapper.problem_name := "Abstraction__CLF_eq_Collect_Pi"*}
   2.102 +declare [[ atp_problem_prefix = "Abstraction__CLF_eq_Collect_Pi" ]]
   2.103  lemma 
   2.104    "(cl,f) \<in> CLF ==> 
   2.105     CLF = (SIGMA cl: CL. {f. f \<in> pset cl \<rightarrow> pset cl}) ==> 
   2.106 @@ -216,21 +216,21 @@
   2.107  by (metis Collect_mem_eq SigmaD2 contra_subsetD equalityE)
   2.108  *)
   2.109  
   2.110 -ML{*AtpWrapper.problem_name := "Abstraction__CLF_eq_Collect_Pi_mono"*}
   2.111 +declare [[ atp_problem_prefix = "Abstraction__CLF_eq_Collect_Pi_mono" ]]
   2.112  lemma 
   2.113    "(cl,f) \<in> CLF ==> 
   2.114     CLF = (SIGMA cl: CL. {f. f \<in> pset cl \<rightarrow> pset cl & monotone f (pset cl) (order cl)}) ==>
   2.115     (f \<in> pset cl \<rightarrow> pset cl)  &  (monotone f (pset cl) (order cl))"
   2.116  by auto
   2.117  
   2.118 -ML{*AtpWrapper.problem_name := "Abstraction__map_eq_zipA"*}
   2.119 +declare [[ atp_problem_prefix = "Abstraction__map_eq_zipA" ]]
   2.120  lemma "map (%x. (f x, g x)) xs = zip (map f xs) (map g xs)"
   2.121  apply (induct xs)
   2.122  (*sledgehammer*)  
   2.123  apply auto
   2.124  done
   2.125  
   2.126 -ML{*AtpWrapper.problem_name := "Abstraction__map_eq_zipB"*}
   2.127 +declare [[ atp_problem_prefix = "Abstraction__map_eq_zipB" ]]
   2.128  lemma "map (%w. (w -> w, w \<times> w)) xs = 
   2.129         zip (map (%w. w -> w) xs) (map (%w. w \<times> w) xs)"
   2.130  apply (induct xs)
   2.131 @@ -238,28 +238,28 @@
   2.132  apply auto
   2.133  done
   2.134  
   2.135 -ML{*AtpWrapper.problem_name := "Abstraction__image_evenA"*}
   2.136 +declare [[ atp_problem_prefix = "Abstraction__image_evenA" ]]
   2.137  lemma "(%x. Suc(f x)) ` {x. even x} <= A ==> (\<forall>x. even x --> Suc(f x) \<in> A)";
   2.138  (*sledgehammer*)  
   2.139  by auto
   2.140  
   2.141 -ML{*AtpWrapper.problem_name := "Abstraction__image_evenB"*}
   2.142 +declare [[ atp_problem_prefix = "Abstraction__image_evenB" ]]
   2.143  lemma "(%x. f (f x)) ` ((%x. Suc(f x)) ` {x. even x}) <= A 
   2.144         ==> (\<forall>x. even x --> f (f (Suc(f x))) \<in> A)";
   2.145  (*sledgehammer*)  
   2.146  by auto
   2.147  
   2.148 -ML{*AtpWrapper.problem_name := "Abstraction__image_curry"*}
   2.149 +declare [[ atp_problem_prefix = "Abstraction__image_curry" ]]
   2.150  lemma "f \<in> (%u v. b \<times> u \<times> v) ` A ==> \<forall>u v. P (b \<times> u \<times> v) ==> P(f y)" 
   2.151  (*sledgehammer*)  
   2.152  by auto
   2.153  
   2.154 -ML{*AtpWrapper.problem_name := "Abstraction__image_TimesA"*}
   2.155 +declare [[ atp_problem_prefix = "Abstraction__image_TimesA" ]]
   2.156  lemma image_TimesA: "(%(x,y). (f x, g y)) ` (A \<times> B) = (f`A) \<times> (g`B)"
   2.157  (*sledgehammer*) 
   2.158  apply (rule equalityI)
   2.159  (***Even the two inclusions are far too difficult
   2.160 -ML{*AtpWrapper.problem_name := "Abstraction__image_TimesA_simpler"*}
   2.161 +using [[ atp_problem_prefix = "Abstraction__image_TimesA_simpler"]]
   2.162  ***)
   2.163  apply (rule subsetI)
   2.164  apply (erule imageE)
   2.165 @@ -282,13 +282,13 @@
   2.166  (*Given the difficulty of the previous problem, these two are probably
   2.167  impossible*)
   2.168  
   2.169 -ML{*AtpWrapper.problem_name := "Abstraction__image_TimesB"*}
   2.170 +declare [[ atp_problem_prefix = "Abstraction__image_TimesB" ]]
   2.171  lemma image_TimesB:
   2.172      "(%(x,y,z). (f x, g y, h z)) ` (A \<times> B \<times> C) = (f`A) \<times> (g`B) \<times> (h`C)" 
   2.173  (*sledgehammer*) 
   2.174  by force
   2.175  
   2.176 -ML{*AtpWrapper.problem_name := "Abstraction__image_TimesC"*}
   2.177 +declare [[ atp_problem_prefix = "Abstraction__image_TimesC" ]]
   2.178  lemma image_TimesC:
   2.179      "(%(x,y). (x \<rightarrow> x, y \<times> y)) ` (A \<times> B) = 
   2.180       ((%x. x \<rightarrow> x) ` A) \<times> ((%y. y \<times> y) ` B)" 
     3.1 --- a/src/HOL/MetisExamples/BT.thy	Fri Oct 02 04:44:56 2009 +0200
     3.2 +++ b/src/HOL/MetisExamples/BT.thy	Sat Oct 03 12:05:40 2009 +0200
     3.3 @@ -65,21 +65,21 @@
     3.4  
     3.5  text {* \medskip BT simplification *}
     3.6  
     3.7 -ML {*AtpWrapper.problem_name := "BT__n_leaves_reflect"*}
     3.8 +declare [[ atp_problem_prefix = "BT__n_leaves_reflect" ]]
     3.9  lemma n_leaves_reflect: "n_leaves (reflect t) = n_leaves t"
    3.10    apply (induct t)
    3.11    apply (metis add_right_cancel n_leaves.simps(1) reflect.simps(1))
    3.12    apply (metis add_commute n_leaves.simps(2) reflect.simps(2))
    3.13    done
    3.14  
    3.15 -ML {*AtpWrapper.problem_name := "BT__n_nodes_reflect"*}
    3.16 +declare [[ atp_problem_prefix = "BT__n_nodes_reflect" ]]
    3.17  lemma n_nodes_reflect: "n_nodes (reflect t) = n_nodes t"
    3.18    apply (induct t)
    3.19    apply (metis reflect.simps(1))
    3.20    apply (metis n_nodes.simps(2) nat_add_commute reflect.simps(2))
    3.21    done
    3.22  
    3.23 -ML {*AtpWrapper.problem_name := "BT__depth_reflect"*}
    3.24 +declare [[ atp_problem_prefix = "BT__depth_reflect" ]]
    3.25  lemma depth_reflect: "depth (reflect t) = depth t"
    3.26    apply (induct t)
    3.27    apply (metis depth.simps(1) reflect.simps(1))
    3.28 @@ -90,21 +90,21 @@
    3.29    The famous relationship between the numbers of leaves and nodes.
    3.30  *}
    3.31  
    3.32 -ML {*AtpWrapper.problem_name := "BT__n_leaves_nodes"*}
    3.33 +declare [[ atp_problem_prefix = "BT__n_leaves_nodes" ]]
    3.34  lemma n_leaves_nodes: "n_leaves t = Suc (n_nodes t)"
    3.35    apply (induct t)
    3.36    apply (metis n_leaves.simps(1) n_nodes.simps(1))
    3.37    apply auto
    3.38    done
    3.39  
    3.40 -ML {*AtpWrapper.problem_name := "BT__reflect_reflect_ident"*}
    3.41 +declare [[ atp_problem_prefix = "BT__reflect_reflect_ident" ]]
    3.42  lemma reflect_reflect_ident: "reflect (reflect t) = t"
    3.43    apply (induct t)
    3.44    apply (metis add_right_cancel reflect.simps(1));
    3.45    apply (metis reflect.simps(2))
    3.46    done
    3.47  
    3.48 -ML {*AtpWrapper.problem_name := "BT__bt_map_ident"*}
    3.49 +declare [[ atp_problem_prefix = "BT__bt_map_ident" ]]
    3.50  lemma bt_map_ident: "bt_map (%x. x) = (%y. y)"
    3.51  apply (rule ext) 
    3.52  apply (induct_tac y)
    3.53 @@ -115,7 +115,7 @@
    3.54  done
    3.55  
    3.56  
    3.57 -ML {*AtpWrapper.problem_name := "BT__bt_map_appnd"*}
    3.58 +declare [[ atp_problem_prefix = "BT__bt_map_appnd" ]]
    3.59  lemma bt_map_appnd: "bt_map f (appnd t u) = appnd (bt_map f t) (bt_map f u)"
    3.60  apply (induct t)
    3.61    apply (metis appnd.simps(1) bt_map.simps(1))
    3.62 @@ -123,7 +123,7 @@
    3.63  done
    3.64  
    3.65  
    3.66 -ML {*AtpWrapper.problem_name := "BT__bt_map_compose"*}
    3.67 +declare [[ atp_problem_prefix = "BT__bt_map_compose" ]]
    3.68  lemma bt_map_compose: "bt_map (f o g) t = bt_map f (bt_map g t)"
    3.69  apply (induct t) 
    3.70    apply (metis bt_map.simps(1))
    3.71 @@ -133,42 +133,42 @@
    3.72  done
    3.73  
    3.74  
    3.75 -ML {*AtpWrapper.problem_name := "BT__bt_map_reflect"*}
    3.76 +declare [[ atp_problem_prefix = "BT__bt_map_reflect" ]]
    3.77  lemma bt_map_reflect: "bt_map f (reflect t) = reflect (bt_map f t)"
    3.78    apply (induct t)
    3.79    apply (metis add_right_cancel bt_map.simps(1) reflect.simps(1))
    3.80    apply (metis add_right_cancel bt_map.simps(2) reflect.simps(2))
    3.81    done
    3.82  
    3.83 -ML {*AtpWrapper.problem_name := "BT__preorder_bt_map"*}
    3.84 +declare [[ atp_problem_prefix = "BT__preorder_bt_map" ]]
    3.85  lemma preorder_bt_map: "preorder (bt_map f t) = map f (preorder t)"
    3.86    apply (induct t)
    3.87    apply (metis bt_map.simps(1) map.simps(1) preorder.simps(1))
    3.88     apply simp
    3.89    done
    3.90  
    3.91 -ML {*AtpWrapper.problem_name := "BT__inorder_bt_map"*}
    3.92 +declare [[ atp_problem_prefix = "BT__inorder_bt_map" ]]
    3.93  lemma inorder_bt_map: "inorder (bt_map f t) = map f (inorder t)"
    3.94    apply (induct t)
    3.95    apply (metis bt_map.simps(1) inorder.simps(1) map.simps(1))
    3.96    apply simp
    3.97    done
    3.98  
    3.99 -ML {*AtpWrapper.problem_name := "BT__postorder_bt_map"*}
   3.100 +declare [[ atp_problem_prefix = "BT__postorder_bt_map" ]]
   3.101  lemma postorder_bt_map: "postorder (bt_map f t) = map f (postorder t)"
   3.102    apply (induct t)
   3.103    apply (metis bt_map.simps(1) map.simps(1) postorder.simps(1))
   3.104     apply simp
   3.105    done
   3.106  
   3.107 -ML {*AtpWrapper.problem_name := "BT__depth_bt_map"*}
   3.108 +declare [[ atp_problem_prefix = "BT__depth_bt_map" ]]
   3.109  lemma depth_bt_map [simp]: "depth (bt_map f t) = depth t"
   3.110    apply (induct t)
   3.111    apply (metis bt_map.simps(1) depth.simps(1))
   3.112     apply simp
   3.113    done
   3.114  
   3.115 -ML {*AtpWrapper.problem_name := "BT__n_leaves_bt_map"*}
   3.116 +declare [[ atp_problem_prefix = "BT__n_leaves_bt_map" ]]
   3.117  lemma n_leaves_bt_map [simp]: "n_leaves (bt_map f t) = n_leaves t"
   3.118    apply (induct t)
   3.119    apply (metis One_nat_def Suc_eq_plus1 bt_map.simps(1) less_add_one less_antisym linorder_neq_iff n_leaves.simps(1))
   3.120 @@ -176,21 +176,21 @@
   3.121    done
   3.122  
   3.123  
   3.124 -ML {*AtpWrapper.problem_name := "BT__preorder_reflect"*}
   3.125 +declare [[ atp_problem_prefix = "BT__preorder_reflect" ]]
   3.126  lemma preorder_reflect: "preorder (reflect t) = rev (postorder t)"
   3.127    apply (induct t)
   3.128    apply (metis postorder.simps(1) preorder.simps(1) reflect.simps(1) rev_is_Nil_conv)
   3.129    apply (metis append_Nil Cons_eq_append_conv postorder.simps(2) preorder.simps(2) reflect.simps(2) rev.simps(2) rev_append rev_rev_ident)
   3.130    done
   3.131  
   3.132 -ML {*AtpWrapper.problem_name := "BT__inorder_reflect"*}
   3.133 +declare [[ atp_problem_prefix = "BT__inorder_reflect" ]]
   3.134  lemma inorder_reflect: "inorder (reflect t) = rev (inorder t)"
   3.135    apply (induct t)
   3.136    apply (metis inorder.simps(1) reflect.simps(1) rev.simps(1))
   3.137    apply simp
   3.138    done
   3.139  
   3.140 -ML {*AtpWrapper.problem_name := "BT__postorder_reflect"*}
   3.141 +declare [[ atp_problem_prefix = "BT__postorder_reflect" ]]
   3.142  lemma postorder_reflect: "postorder (reflect t) = rev (preorder t)"
   3.143    apply (induct t)
   3.144    apply (metis postorder.simps(1) preorder.simps(1) reflect.simps(1) rev.simps(1))
   3.145 @@ -201,7 +201,7 @@
   3.146   Analogues of the standard properties of the append function for lists.
   3.147  *}
   3.148  
   3.149 -ML {*AtpWrapper.problem_name := "BT__appnd_assoc"*}
   3.150 +declare [[ atp_problem_prefix = "BT__appnd_assoc" ]]
   3.151  lemma appnd_assoc [simp]:
   3.152       "appnd (appnd t1 t2) t3 = appnd t1 (appnd t2 t3)"
   3.153    apply (induct t1)
   3.154 @@ -209,14 +209,14 @@
   3.155    apply (metis appnd.simps(2))
   3.156    done
   3.157  
   3.158 -ML {*AtpWrapper.problem_name := "BT__appnd_Lf2"*}
   3.159 +declare [[ atp_problem_prefix = "BT__appnd_Lf2" ]]
   3.160  lemma appnd_Lf2 [simp]: "appnd t Lf = t"
   3.161    apply (induct t)
   3.162    apply (metis appnd.simps(1))
   3.163    apply (metis appnd.simps(2))
   3.164    done
   3.165  
   3.166 -ML {*AtpWrapper.problem_name := "BT__depth_appnd"*}
   3.167 +declare [[ atp_problem_prefix = "BT__depth_appnd" ]]
   3.168    declare max_add_distrib_left [simp]
   3.169  lemma depth_appnd [simp]: "depth (appnd t1 t2) = depth t1 + depth t2"
   3.170    apply (induct t1)
   3.171 @@ -224,7 +224,7 @@
   3.172  apply (simp add: ); 
   3.173    done
   3.174  
   3.175 -ML {*AtpWrapper.problem_name := "BT__n_leaves_appnd"*}
   3.176 +declare [[ atp_problem_prefix = "BT__n_leaves_appnd" ]]
   3.177  lemma n_leaves_appnd [simp]:
   3.178       "n_leaves (appnd t1 t2) = n_leaves t1 * n_leaves t2"
   3.179    apply (induct t1)
   3.180 @@ -232,7 +232,7 @@
   3.181    apply (simp add: left_distrib)
   3.182    done
   3.183  
   3.184 -ML {*AtpWrapper.problem_name := "BT__bt_map_appnd"*}
   3.185 +declare [[ atp_problem_prefix = "BT__bt_map_appnd" ]]
   3.186  lemma (*bt_map_appnd:*)
   3.187       "bt_map f (appnd t1 t2) = appnd (bt_map f t1) (bt_map f t2)"
   3.188    apply (induct t1)
     4.1 --- a/src/HOL/MetisExamples/BigO.thy	Fri Oct 02 04:44:56 2009 +0200
     4.2 +++ b/src/HOL/MetisExamples/BigO.thy	Sat Oct 03 12:05:40 2009 +0200
     4.3 @@ -15,7 +15,7 @@
     4.4  definition bigo :: "('a => 'b::ordered_idom) => ('a => 'b) set"    ("(1O'(_'))") where
     4.5    "O(f::('a => 'b)) ==   {h. EX c. ALL x. abs (h x) <= c * abs (f x)}"
     4.6  
     4.7 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_pos_const"*}
     4.8 +declare [[ atp_problem_prefix = "BigO__bigo_pos_const" ]]
     4.9  lemma bigo_pos_const: "(EX (c::'a::ordered_idom). 
    4.10      ALL x. (abs (h x)) <= (c * (abs (f x))))
    4.11        = (EX c. 0 < c & (ALL x. (abs(h x)) <= (c * (abs (f x)))))"
    4.12 @@ -212,7 +212,7 @@
    4.13      {h. EX c. (0 < c & (ALL x. abs (h x) <= c * abs (f x)))}"
    4.14  by (auto simp add: bigo_def bigo_pos_const)
    4.15  
    4.16 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_elt_subset"*}
    4.17 +declare [[ atp_problem_prefix = "BigO__bigo_elt_subset" ]]
    4.18  lemma bigo_elt_subset [intro]: "f : O(g) ==> O(f) <= O(g)"
    4.19    apply (auto simp add: bigo_alt_def)
    4.20    apply (rule_tac x = "ca * c" in exI)
    4.21 @@ -230,7 +230,7 @@
    4.22  done
    4.23  
    4.24  
    4.25 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_refl"*}
    4.26 +declare [[ atp_problem_prefix = "BigO__bigo_refl" ]]
    4.27  lemma bigo_refl [intro]: "f : O(f)"
    4.28    apply(auto simp add: bigo_def)
    4.29  proof (neg_clausify)
    4.30 @@ -244,7 +244,7 @@
    4.31    by (metis 0 2)
    4.32  qed
    4.33  
    4.34 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_zero"*}
    4.35 +declare [[ atp_problem_prefix = "BigO__bigo_zero" ]]
    4.36  lemma bigo_zero: "0 : O(g)"
    4.37    apply (auto simp add: bigo_def func_zero)
    4.38  proof (neg_clausify)
    4.39 @@ -334,7 +334,7 @@
    4.40    apply (auto del: subsetI simp del: bigo_plus_idemp)
    4.41  done
    4.42  
    4.43 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_plus_eq"*}
    4.44 +declare [[ atp_problem_prefix = "BigO__bigo_plus_eq" ]]
    4.45  lemma bigo_plus_eq: "ALL x. 0 <= f x ==> ALL x. 0 <= g x ==> 
    4.46    O(f + g) = O(f) \<oplus> O(g)"
    4.47    apply (rule equalityI)
    4.48 @@ -357,13 +357,13 @@
    4.49    apply (rule abs_triangle_ineq)
    4.50    apply (metis add_nonneg_nonneg)
    4.51    apply (rule add_mono)
    4.52 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_plus_eq_simpler"*} 
    4.53 +using [[ atp_problem_prefix = "BigO__bigo_plus_eq_simpler" ]] 
    4.54  (*Found by SPASS; SLOW*)
    4.55  apply (metis le_maxI2 linorder_linear linorder_not_le min_max.sup_absorb1 mult_le_cancel_right order_trans)
    4.56  apply (metis le_maxI2 linorder_not_le mult_le_cancel_right order_trans)
    4.57  done
    4.58  
    4.59 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_bounded_alt"*}
    4.60 +declare [[ atp_problem_prefix = "BigO__bigo_bounded_alt" ]]
    4.61  lemma bigo_bounded_alt: "ALL x. 0 <= f x ==> ALL x. f x <= c * g x ==> 
    4.62      f : O(g)" 
    4.63    apply (auto simp add: bigo_def)
    4.64 @@ -423,7 +423,7 @@
    4.65  
    4.66  
    4.67  text{*So here is the easier (and more natural) problem using transitivity*}
    4.68 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_bounded_alt_trans"*}
    4.69 +declare [[ atp_problem_prefix = "BigO__bigo_bounded_alt_trans" ]]
    4.70  lemma "ALL x. 0 <= f x ==> ALL x. f x <= c * g x ==> f : O(g)" 
    4.71    apply (auto simp add: bigo_def)
    4.72    (*Version 1: one-shot proof*) 
    4.73 @@ -431,7 +431,7 @@
    4.74    done
    4.75  
    4.76  text{*So here is the easier (and more natural) problem using transitivity*}
    4.77 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_bounded_alt_trans"*}
    4.78 +declare [[ atp_problem_prefix = "BigO__bigo_bounded_alt_trans" ]]
    4.79  lemma "ALL x. 0 <= f x ==> ALL x. f x <= c * g x ==> f : O(g)" 
    4.80    apply (auto simp add: bigo_def)
    4.81  (*Version 2: single-step proof*)
    4.82 @@ -470,7 +470,7 @@
    4.83    apply simp
    4.84  done
    4.85  
    4.86 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_bounded2"*}
    4.87 +declare [[ atp_problem_prefix = "BigO__bigo_bounded2" ]]
    4.88  lemma bigo_bounded2: "ALL x. lb x <= f x ==> ALL x. f x <= lb x + g x ==>
    4.89      f : lb +o O(g)"
    4.90    apply (rule set_minus_imp_plus)
    4.91 @@ -493,7 +493,7 @@
    4.92    by (metis 4 2 0)
    4.93  qed
    4.94  
    4.95 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_abs"*}
    4.96 +declare [[ atp_problem_prefix = "BigO__bigo_abs" ]]
    4.97  lemma bigo_abs: "(%x. abs(f x)) =o O(f)" 
    4.98    apply (unfold bigo_def)
    4.99    apply auto
   4.100 @@ -508,7 +508,7 @@
   4.101    by (metis 0 2)
   4.102  qed
   4.103  
   4.104 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_abs2"*}
   4.105 +declare [[ atp_problem_prefix = "BigO__bigo_abs2" ]]
   4.106  lemma bigo_abs2: "f =o O(%x. abs(f x))"
   4.107    apply (unfold bigo_def)
   4.108    apply auto
   4.109 @@ -580,7 +580,7 @@
   4.110      by (simp add: bigo_abs3 [symmetric])
   4.111  qed
   4.112  
   4.113 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_mult"*}
   4.114 +declare [[ atp_problem_prefix = "BigO__bigo_mult" ]]
   4.115  lemma bigo_mult [intro]: "O(f)\<otimes>O(g) <= O(f * g)"
   4.116    apply (rule subsetI)
   4.117    apply (subst bigo_def)
   4.118 @@ -592,7 +592,7 @@
   4.119    apply(erule_tac x = x in allE)+
   4.120    apply(subgoal_tac "c * ca * abs(f x * g x) = 
   4.121        (c * abs(f x)) * (ca * abs(g x))")
   4.122 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_mult_simpler"*}
   4.123 +using [[ atp_problem_prefix = "BigO__bigo_mult_simpler" ]]
   4.124  prefer 2 
   4.125  apply (metis mult_assoc mult_left_commute
   4.126    OrderedGroup.abs_of_pos OrderedGroup.mult_left_commute
   4.127 @@ -657,14 +657,14 @@
   4.128  qed
   4.129  
   4.130  
   4.131 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_mult2"*}
   4.132 +declare [[ atp_problem_prefix = "BigO__bigo_mult2" ]]
   4.133  lemma bigo_mult2 [intro]: "f *o O(g) <= O(f * g)"
   4.134    apply (auto simp add: bigo_def elt_set_times_def func_times abs_mult)
   4.135  (*sledgehammer*); 
   4.136    apply (rule_tac x = c in exI)
   4.137    apply clarify
   4.138    apply (drule_tac x = x in spec)
   4.139 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_mult2_simpler"*}
   4.140 +using [[ atp_problem_prefix = "BigO__bigo_mult2_simpler" ]]
   4.141  (*sledgehammer [no luck]*); 
   4.142    apply (subgoal_tac "abs(f x) * abs(b x) <= abs(f x) * (c * abs(g x))")
   4.143    apply (simp add: mult_ac)
   4.144 @@ -672,11 +672,11 @@
   4.145    apply (rule abs_ge_zero)
   4.146  done
   4.147  
   4.148 -ML_command{*AtpWrapper.problem_name:="BigO__bigo_mult3"*}
   4.149 +declare [[ atp_problem_prefix = "BigO__bigo_mult3" ]]
   4.150  lemma bigo_mult3: "f : O(h) ==> g : O(j) ==> f * g : O(h * j)"
   4.151  by (metis bigo_mult set_times_intro subset_iff)
   4.152  
   4.153 -ML_command{*AtpWrapper.problem_name:="BigO__bigo_mult4"*}
   4.154 +declare [[ atp_problem_prefix = "BigO__bigo_mult4" ]]
   4.155  lemma bigo_mult4 [intro]:"f : k +o O(h) ==> g * f : (g * k) +o O(g * h)"
   4.156  by (metis bigo_mult2 set_plus_mono_b set_times_intro2 set_times_plus_distrib)
   4.157  
   4.158 @@ -710,13 +710,13 @@
   4.159    qed
   4.160  qed
   4.161  
   4.162 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_mult6"*}
   4.163 +declare [[ atp_problem_prefix = "BigO__bigo_mult6" ]]
   4.164  lemma bigo_mult6: "ALL x. f x ~= 0 ==>
   4.165      O(f * g) = (f::'a => ('b::ordered_field)) *o O(g)"
   4.166  by (metis bigo_mult2 bigo_mult5 order_antisym)
   4.167  
   4.168  (*proof requires relaxing relevance: 2007-01-25*)
   4.169 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_mult7"*}
   4.170 +declare [[ atp_problem_prefix = "BigO__bigo_mult7" ]]
   4.171    declare bigo_mult6 [simp]
   4.172  lemma bigo_mult7: "ALL x. f x ~= 0 ==>
   4.173      O(f * g) <= O(f::'a => ('b::ordered_field)) \<otimes> O(g)"
   4.174 @@ -728,7 +728,7 @@
   4.175  done
   4.176    declare bigo_mult6 [simp del]
   4.177  
   4.178 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_mult8"*}
   4.179 +declare [[ atp_problem_prefix = "BigO__bigo_mult8" ]]
   4.180    declare bigo_mult7[intro!]
   4.181  lemma bigo_mult8: "ALL x. f x ~= 0 ==>
   4.182      O(f * g) = O(f::'a => ('b::ordered_field)) \<otimes> O(g)"
   4.183 @@ -779,7 +779,7 @@
   4.184    qed
   4.185  qed
   4.186  
   4.187 -ML_command{*AtpWrapper.problem_name:="BigO__bigo_plus_absorb"*}
   4.188 +declare [[ atp_problem_prefix = "BigO__bigo_plus_absorb" ]]
   4.189  lemma bigo_plus_absorb [simp]: "f : O(g) ==> f +o O(g) = O(g)"
   4.190  by (metis bigo_plus_absorb_lemma1 bigo_plus_absorb_lemma2 order_eq_iff);
   4.191  
   4.192 @@ -806,7 +806,7 @@
   4.193  lemma bigo_const1: "(%x. c) : O(%x. 1)"
   4.194  by (auto simp add: bigo_def mult_ac)
   4.195  
   4.196 -ML_command{*AtpWrapper.problem_name:="BigO__bigo_const2"*}
   4.197 +declare [[ atp_problem_prefix = "BigO__bigo_const2" ]]
   4.198  lemma (*bigo_const2 [intro]:*) "O(%x. c) <= O(%x. 1)"
   4.199  by (metis bigo_const1 bigo_elt_subset);
   4.200  
   4.201 @@ -829,7 +829,7 @@
   4.202    apply (rule bigo_const1)
   4.203  done
   4.204  
   4.205 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_const3"*}
   4.206 +declare [[ atp_problem_prefix = "BigO__bigo_const3" ]]
   4.207  lemma bigo_const3: "(c::'a::ordered_field) ~= 0 ==> (%x. 1) : O(%x. c)"
   4.208  apply (simp add: bigo_def)
   4.209  proof (neg_clausify)
   4.210 @@ -853,7 +853,7 @@
   4.211      O(%x. c) = O(%x. 1)"
   4.212  by (rule equalityI, rule bigo_const2, rule bigo_const4, assumption)
   4.213  
   4.214 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_const_mult1"*}
   4.215 +declare [[ atp_problem_prefix = "BigO__bigo_const_mult1" ]]
   4.216  lemma bigo_const_mult1: "(%x. c * f x) : O(f)"
   4.217    apply (simp add: bigo_def abs_mult)
   4.218  proof (neg_clausify)
   4.219 @@ -869,7 +869,7 @@
   4.220  lemma bigo_const_mult2: "O(%x. c * f x) <= O(f)"
   4.221  by (rule bigo_elt_subset, rule bigo_const_mult1)
   4.222  
   4.223 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_const_mult3"*}
   4.224 +declare [[ atp_problem_prefix = "BigO__bigo_const_mult3" ]]
   4.225  lemma bigo_const_mult3: "(c::'a::ordered_field) ~= 0 ==> f : O(%x. c * f x)"
   4.226    apply (simp add: bigo_def)
   4.227  (*sledgehammer [no luck]*); 
   4.228 @@ -887,7 +887,7 @@
   4.229      O(%x. c * f x) = O(f)"
   4.230  by (rule equalityI, rule bigo_const_mult2, erule bigo_const_mult4)
   4.231  
   4.232 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_const_mult5"*}
   4.233 +declare [[ atp_problem_prefix = "BigO__bigo_const_mult5" ]]
   4.234  lemma bigo_const_mult5 [simp]: "(c::'a::ordered_field) ~= 0 ==> 
   4.235      (%x. c) *o O(f) = O(f)"
   4.236    apply (auto del: subsetI)
   4.237 @@ -907,7 +907,7 @@
   4.238  done
   4.239  
   4.240  
   4.241 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_const_mult6"*}
   4.242 +declare [[ atp_problem_prefix = "BigO__bigo_const_mult6" ]]
   4.243  lemma bigo_const_mult6 [intro]: "(%x. c) *o O(f) <= O(f)"
   4.244    apply (auto intro!: subsetI
   4.245      simp add: bigo_def elt_set_times_def func_times
   4.246 @@ -964,7 +964,7 @@
   4.247  apply (blast intro: order_trans mult_right_mono abs_ge_self) 
   4.248  done
   4.249  
   4.250 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_setsum1"*}
   4.251 +declare [[ atp_problem_prefix = "BigO__bigo_setsum1" ]]
   4.252  lemma bigo_setsum1: "ALL x y. 0 <= h x y ==> 
   4.253      EX c. ALL x y. abs(f x y) <= c * (h x y) ==>
   4.254        (%x. SUM y : A x. f x y) =o O(%x. SUM y : A x. h x y)"
   4.255 @@ -981,7 +981,7 @@
   4.256        (%x. SUM y : A x. f y) =o O(%x. SUM y : A x. h y)"
   4.257  by (rule bigo_setsum1, auto)  
   4.258  
   4.259 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_setsum3"*}
   4.260 +declare [[ atp_problem_prefix = "BigO__bigo_setsum3" ]]
   4.261  lemma bigo_setsum3: "f =o O(h) ==>
   4.262      (%x. SUM y : A x. (l x y) * f(k x y)) =o
   4.263        O(%x. SUM y : A x. abs(l x y * h(k x y)))"
   4.264 @@ -1012,7 +1012,7 @@
   4.265    apply (erule set_plus_imp_minus)
   4.266  done
   4.267  
   4.268 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_setsum5"*}
   4.269 +declare [[ atp_problem_prefix = "BigO__bigo_setsum5" ]]
   4.270  lemma bigo_setsum5: "f =o O(h) ==> ALL x y. 0 <= l x y ==> 
   4.271      ALL x. 0 <= h x ==>
   4.272        (%x. SUM y : A x. (l x y) * f(k x y)) =o
   4.273 @@ -1069,7 +1069,7 @@
   4.274    apply (simp add: func_times) 
   4.275  done
   4.276  
   4.277 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_fix"*}
   4.278 +declare [[ atp_problem_prefix = "BigO__bigo_fix" ]]
   4.279  lemma bigo_fix: "(%x. f ((x::nat) + 1)) =o O(%x. h(x + 1)) ==> f 0 = 0 ==>
   4.280      f =o O(h)"
   4.281    apply (simp add: bigo_alt_def)
   4.282 @@ -1134,7 +1134,7 @@
   4.283    apply (erule spec)+
   4.284  done
   4.285  
   4.286 -ML_command{*AtpWrapper.problem_name:="BigO__bigo_lesso1"*}
   4.287 +declare [[ atp_problem_prefix = "BigO__bigo_lesso1" ]]
   4.288  lemma bigo_lesso1: "ALL x. f x <= g x ==> f <o g =o O(h)"
   4.289    apply (unfold lesso_def)
   4.290    apply (subgoal_tac "(%x. max (f x - g x) 0) = 0")
   4.291 @@ -1146,7 +1146,7 @@
   4.292  done
   4.293  
   4.294  
   4.295 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_lesso2"*}
   4.296 +declare [[ atp_problem_prefix = "BigO__bigo_lesso2" ]]
   4.297  lemma bigo_lesso2: "f =o g +o O(h) ==>
   4.298      ALL x. 0 <= k x ==> ALL x. k x <= f x ==>
   4.299        k <o g =o O(h)"
   4.300 @@ -1183,7 +1183,7 @@
   4.301    by (metis min_max.sup_commute min_max.inf_commute min_max.sup_inf_absorb min_max.le_iff_inf 0 max_diff_distrib_left 1 linorder_not_le 8)
   4.302  qed
   4.303  
   4.304 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_lesso3"*}
   4.305 +declare [[ atp_problem_prefix = "BigO__bigo_lesso3" ]]
   4.306  lemma bigo_lesso3: "f =o g +o O(h) ==>
   4.307      ALL x. 0 <= k x ==> ALL x. g x <= k x ==>
   4.308        f <o k =o O(h)"
   4.309 @@ -1200,7 +1200,7 @@
   4.310    apply (simp)
   4.311    apply (subst abs_of_nonneg)
   4.312    apply (drule_tac x = x in spec) back
   4.313 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_lesso3_simpler"*}
   4.314 +using [[ atp_problem_prefix = "BigO__bigo_lesso3_simpler" ]]
   4.315  apply (metis diff_less_0_iff_less linorder_not_le not_leE uminus_add_conv_diff xt1(12) xt1(6))
   4.316  apply (metis add_minus_cancel diff_le_eq le_diff_eq uminus_add_conv_diff)
   4.317  apply (metis abs_ge_zero linorder_linear min_max.sup_absorb1 min_max.sup_commute)
   4.318 @@ -1220,7 +1220,7 @@
   4.319      split: split_max abs_split)
   4.320  done
   4.321  
   4.322 -ML_command{*AtpWrapper.problem_name := "BigO__bigo_lesso5"*}
   4.323 +declare [[ atp_problem_prefix = "BigO__bigo_lesso5" ]]
   4.324  lemma bigo_lesso5: "f <o g =o O(h) ==>
   4.325      EX C. ALL x. f x <= g x + C * abs(h x)"
   4.326    apply (simp only: lesso_def bigo_alt_def)
     5.1 --- a/src/HOL/MetisExamples/Message.thy	Fri Oct 02 04:44:56 2009 +0200
     5.2 +++ b/src/HOL/MetisExamples/Message.thy	Sat Oct 03 12:05:40 2009 +0200
     5.3 @@ -77,7 +77,7 @@
     5.4    | Body:        "Crypt K X \<in> parts H ==> X \<in> parts H"
     5.5  
     5.6  
     5.7 -ML{*AtpWrapper.problem_name := "Message__parts_mono"*}
     5.8 +declare [[ atp_problem_prefix = "Message__parts_mono" ]]
     5.9  lemma parts_mono: "G \<subseteq> H ==> parts(G) \<subseteq> parts(H)"
    5.10  apply auto
    5.11  apply (erule parts.induct) 
    5.12 @@ -101,7 +101,7 @@
    5.13  
    5.14  subsubsection{*Inverse of keys *}
    5.15  
    5.16 -ML{*AtpWrapper.problem_name := "Message__invKey_eq"*}
    5.17 +declare [[ atp_problem_prefix = "Message__invKey_eq" ]]
    5.18  lemma invKey_eq [simp]: "(invKey K = invKey K') = (K=K')"
    5.19  by (metis invKey)
    5.20  
    5.21 @@ -202,7 +202,7 @@
    5.22  apply (simp only: parts_Un)
    5.23  done
    5.24  
    5.25 -ML{*AtpWrapper.problem_name := "Message__parts_insert_two"*}
    5.26 +declare [[ atp_problem_prefix = "Message__parts_insert_two" ]]
    5.27  lemma parts_insert2:
    5.28       "parts (insert X (insert Y H)) = parts {X} \<union> parts {Y} \<union> parts H"
    5.29  by (metis Un_commute Un_empty_left Un_empty_right Un_insert_left Un_insert_right parts_Un)
    5.30 @@ -239,7 +239,7 @@
    5.31  lemma parts_idem [simp]: "parts (parts H) = parts H"
    5.32  by blast
    5.33  
    5.34 -ML{*AtpWrapper.problem_name := "Message__parts_subset_iff"*}
    5.35 +declare [[ atp_problem_prefix = "Message__parts_subset_iff" ]]
    5.36  lemma parts_subset_iff [simp]: "(parts G \<subseteq> parts H) = (G \<subseteq> parts H)"
    5.37  apply (rule iffI) 
    5.38  apply (metis Un_absorb1 Un_subset_iff parts_Un parts_increasing)
    5.39 @@ -250,7 +250,7 @@
    5.40  by (blast dest: parts_mono); 
    5.41  
    5.42  
    5.43 -ML{*AtpWrapper.problem_name := "Message__parts_cut"*}
    5.44 +declare [[ atp_problem_prefix = "Message__parts_cut" ]]
    5.45  lemma parts_cut: "[|Y\<in> parts(insert X G);  X\<in> parts H|] ==> Y\<in> parts(G \<union> H)"
    5.46  by (metis Un_subset_iff insert_subset parts_increasing parts_trans) 
    5.47  
    5.48 @@ -315,7 +315,7 @@
    5.49  done
    5.50  
    5.51  
    5.52 -ML{*AtpWrapper.problem_name := "Message__msg_Nonce_supply"*}
    5.53 +declare [[ atp_problem_prefix = "Message__msg_Nonce_supply" ]]
    5.54  lemma msg_Nonce_supply: "\<exists>N. \<forall>n. N\<le>n --> Nonce n \<notin> parts {msg}"
    5.55  apply (induct_tac "msg") 
    5.56  apply (simp_all add: parts_insert2)
    5.57 @@ -367,7 +367,7 @@
    5.58  lemmas not_parts_not_analz = analz_subset_parts [THEN contra_subsetD, standard]
    5.59  
    5.60  
    5.61 -ML{*AtpWrapper.problem_name := "Message__parts_analz"*}
    5.62 +declare [[ atp_problem_prefix = "Message__parts_analz" ]]
    5.63  lemma parts_analz [simp]: "parts (analz H) = parts H"
    5.64  apply (rule equalityI)
    5.65  apply (metis analz_subset_parts parts_subset_iff)
    5.66 @@ -519,7 +519,7 @@
    5.67  by (drule analz_mono, blast)
    5.68  
    5.69  
    5.70 -ML{*AtpWrapper.problem_name := "Message__analz_cut"*}
    5.71 +declare [[ atp_problem_prefix = "Message__analz_cut" ]]
    5.72      declare analz_trans[intro]
    5.73  lemma analz_cut: "[| Y\<in> analz (insert X H);  X\<in> analz H |] ==> Y\<in> analz H"
    5.74  (*TOO SLOW
    5.75 @@ -537,7 +537,7 @@
    5.76  
    5.77  text{*A congruence rule for "analz" *}
    5.78  
    5.79 -ML{*AtpWrapper.problem_name := "Message__analz_subset_cong"*}
    5.80 +declare [[ atp_problem_prefix = "Message__analz_subset_cong" ]]
    5.81  lemma analz_subset_cong:
    5.82       "[| analz G \<subseteq> analz G'; analz H \<subseteq> analz H' |] 
    5.83        ==> analz (G \<union> H) \<subseteq> analz (G' \<union> H')"
    5.84 @@ -615,7 +615,7 @@
    5.85  by (intro Un_least synth_mono Un_upper1 Un_upper2)
    5.86  
    5.87  
    5.88 -ML{*AtpWrapper.problem_name := "Message__synth_insert"*}
    5.89 +declare [[ atp_problem_prefix = "Message__synth_insert" ]]
    5.90   
    5.91  lemma synth_insert: "insert X (synth H) \<subseteq> synth(insert X H)"
    5.92  by (metis insert_iff insert_subset subset_insertI synth.Inj synth_mono)
    5.93 @@ -637,7 +637,7 @@
    5.94  lemma synth_trans: "[| X\<in> synth G;  G \<subseteq> synth H |] ==> X\<in> synth H"
    5.95  by (drule synth_mono, blast)
    5.96  
    5.97 -ML{*AtpWrapper.problem_name := "Message__synth_cut"*}
    5.98 +declare [[ atp_problem_prefix = "Message__synth_cut" ]]
    5.99  lemma synth_cut: "[| Y\<in> synth (insert X H);  X\<in> synth H |] ==> Y\<in> synth H"
   5.100  (*TOO SLOW
   5.101  by (metis insert_absorb insert_mono insert_subset synth_idem synth_increasing synth_mono)
   5.102 @@ -669,7 +669,7 @@
   5.103  
   5.104  subsubsection{*Combinations of parts, analz and synth *}
   5.105  
   5.106 -ML{*AtpWrapper.problem_name := "Message__parts_synth"*}
   5.107 +declare [[ atp_problem_prefix = "Message__parts_synth" ]]
   5.108  lemma parts_synth [simp]: "parts (synth H) = parts H \<union> synth H"
   5.109  apply (rule equalityI)
   5.110  apply (rule subsetI)
   5.111 @@ -684,14 +684,14 @@
   5.112  
   5.113  
   5.114  
   5.115 -ML{*AtpWrapper.problem_name := "Message__analz_analz_Un"*}
   5.116 +declare [[ atp_problem_prefix = "Message__analz_analz_Un" ]]
   5.117  lemma analz_analz_Un [simp]: "analz (analz G \<union> H) = analz (G \<union> H)"
   5.118  apply (rule equalityI);
   5.119  apply (metis analz_idem analz_subset_cong order_eq_refl)
   5.120  apply (metis analz_increasing analz_subset_cong order_eq_refl)
   5.121  done
   5.122  
   5.123 -ML{*AtpWrapper.problem_name := "Message__analz_synth_Un"*}
   5.124 +declare [[ atp_problem_prefix = "Message__analz_synth_Un" ]]
   5.125      declare analz_mono [intro] analz.Fst [intro] analz.Snd [intro] Un_least [intro]
   5.126  lemma analz_synth_Un [simp]: "analz (synth G \<union> H) = analz (G \<union> H) \<union> synth G"
   5.127  apply (rule equalityI)
   5.128 @@ -705,7 +705,7 @@
   5.129  done
   5.130  
   5.131  
   5.132 -ML{*AtpWrapper.problem_name := "Message__analz_synth"*}
   5.133 +declare [[ atp_problem_prefix = "Message__analz_synth" ]]
   5.134  lemma analz_synth [simp]: "analz (synth H) = analz H \<union> synth H"
   5.135  proof (neg_clausify)
   5.136  assume 0: "analz (synth H) \<noteq> analz H \<union> synth H"
   5.137 @@ -728,7 +728,7 @@
   5.138  
   5.139  subsubsection{*For reasoning about the Fake rule in traces *}
   5.140  
   5.141 -ML{*AtpWrapper.problem_name := "Message__parts_insert_subset_Un"*}
   5.142 +declare [[ atp_problem_prefix = "Message__parts_insert_subset_Un" ]]
   5.143  lemma parts_insert_subset_Un: "X\<in> G ==> parts(insert X H) \<subseteq> parts G \<union> parts H"
   5.144  proof (neg_clausify)
   5.145  assume 0: "X \<in> G"
   5.146 @@ -747,7 +747,7 @@
   5.147    by (metis 6 0)
   5.148  qed
   5.149  
   5.150 -ML{*AtpWrapper.problem_name := "Message__Fake_parts_insert"*}
   5.151 +declare [[ atp_problem_prefix = "Message__Fake_parts_insert" ]]
   5.152  lemma Fake_parts_insert:
   5.153       "X \<in> synth (analz H) ==>  
   5.154        parts (insert X H) \<subseteq> synth (analz H) \<union> parts H"
   5.155 @@ -790,14 +790,14 @@
   5.156        ==> Z \<in>  synth (analz H) \<union> parts H";
   5.157  by (blast dest: Fake_parts_insert  [THEN subsetD, dest])
   5.158  
   5.159 -ML{*AtpWrapper.problem_name := "Message__Fake_analz_insert"*}
   5.160 +declare [[ atp_problem_prefix = "Message__Fake_analz_insert" ]]
   5.161      declare analz_mono [intro] synth_mono [intro] 
   5.162  lemma Fake_analz_insert:
   5.163       "X\<in> synth (analz G) ==>  
   5.164        analz (insert X H) \<subseteq> synth (analz G) \<union> analz (G \<union> H)"
   5.165  by (metis Un_commute Un_insert_left Un_insert_right Un_upper1 analz_analz_Un analz_mono analz_synth_Un equalityE insert_absorb order_le_less xt1(12))
   5.166  
   5.167 -ML{*AtpWrapper.problem_name := "Message__Fake_analz_insert_simpler"*}
   5.168 +declare [[ atp_problem_prefix = "Message__Fake_analz_insert_simpler" ]]
   5.169  (*simpler problems?  BUT METIS CAN'T PROVE
   5.170  lemma Fake_analz_insert_simpler:
   5.171       "X\<in> synth (analz G) ==>  
     6.1 --- a/src/HOL/MetisExamples/Tarski.thy	Fri Oct 02 04:44:56 2009 +0200
     6.2 +++ b/src/HOL/MetisExamples/Tarski.thy	Sat Oct 03 12:05:40 2009 +0200
     6.3 @@ -416,7 +416,7 @@
     6.4  (*never proved, 2007-01-22: Tarski__CLF_unnamed_lemma
     6.5    NOT PROVABLE because of the conjunction used in the definition: we don't
     6.6    allow reasoning with rules like conjE, which is essential here.*)
     6.7 -ML_command{*AtpWrapper.problem_name:="Tarski__CLF_unnamed_lemma"*}
     6.8 +declare [[ atp_problem_prefix = "Tarski__CLF_unnamed_lemma" ]]
     6.9  lemma (in CLF) [simp]:
    6.10      "f: pset cl -> pset cl & monotone f (pset cl) (order cl)" 
    6.11  apply (insert f_cl)
    6.12 @@ -433,7 +433,7 @@
    6.13  by (simp add: A_def r_def)
    6.14  
    6.15  (*never proved, 2007-01-22*)
    6.16 -ML_command{*AtpWrapper.problem_name:="Tarski__CLF_CLF_dual"*}
    6.17 +declare [[ atp_problem_prefix = "Tarski__CLF_CLF_dual" ]]
    6.18  declare (in CLF) CLF_set_def [simp] CL_dualCL [simp] monotone_dual [simp] dualA_iff [simp]
    6.19  
    6.20  lemma (in CLF) CLF_dual: "(dual cl, f) \<in> CLF_set" 
    6.21 @@ -461,7 +461,7 @@
    6.22  subsection {* lemmas for Tarski, lub *}
    6.23  
    6.24  (*never proved, 2007-01-22*)
    6.25 -ML{*AtpWrapper.problem_name:="Tarski__CLF_lubH_le_flubH"*}
    6.26 +declare [[ atp_problem_prefix = "Tarski__CLF_lubH_le_flubH" ]]
    6.27    declare CL.lub_least[intro] CLF.f_in_funcset[intro] funcset_mem[intro] CL.lub_in_lattice[intro] PO.transE[intro] PO.monotoneE[intro] CLF.monotone_f[intro] CL.lub_upper[intro] 
    6.28  lemma (in CLF) lubH_le_flubH:
    6.29       "H = {x. (x, f x) \<in> r & x \<in> A} ==> (lub H cl, f (lub H cl)) \<in> r"
    6.30 @@ -471,7 +471,7 @@
    6.31  -- {* @{text "\<forall>x:H. (x, f (lub H r)) \<in> r"} *}
    6.32  apply (rule ballI)
    6.33  (*never proved, 2007-01-22*)
    6.34 -ML_command{*AtpWrapper.problem_name:="Tarski__CLF_lubH_le_flubH_simpler"*}
    6.35 +using [[ atp_problem_prefix = "Tarski__CLF_lubH_le_flubH_simpler" ]]
    6.36  apply (rule transE)
    6.37  -- {* instantiates @{text "(x, ?z) \<in> order cl to (x, f x)"}, *}
    6.38  -- {* because of the def of @{text H} *}
    6.39 @@ -489,7 +489,7 @@
    6.40            CLF.monotone_f[rule del] CL.lub_upper[rule del] 
    6.41  
    6.42  (*never proved, 2007-01-22*)
    6.43 -ML{*AtpWrapper.problem_name:="Tarski__CLF_flubH_le_lubH"*}
    6.44 +declare [[ atp_problem_prefix = "Tarski__CLF_flubH_le_lubH" ]]
    6.45    declare CLF.f_in_funcset[intro] funcset_mem[intro] CL.lub_in_lattice[intro]
    6.46         PO.monotoneE[intro] CLF.monotone_f[intro] CL.lub_upper[intro] 
    6.47         CLF.lubH_le_flubH[simp]
    6.48 @@ -499,7 +499,7 @@
    6.49  apply (rule_tac t = "H" in ssubst, assumption)
    6.50  apply (rule CollectI)
    6.51  apply (rule conjI)
    6.52 -ML_command{*AtpWrapper.problem_name:="Tarski__CLF_flubH_le_lubH_simpler"*}
    6.53 +using [[ atp_problem_prefix = "Tarski__CLF_flubH_le_lubH_simpler" ]]
    6.54  (*??no longer terminates, with combinators
    6.55  apply (metis CO_refl_on lubH_le_flubH monotone_def monotone_f reflD1 reflD2) 
    6.56  *)
    6.57 @@ -513,7 +513,7 @@
    6.58  
    6.59  
    6.60  (*never proved, 2007-01-22*)
    6.61 -ML{*AtpWrapper.problem_name:="Tarski__CLF_lubH_is_fixp"*}
    6.62 +declare [[ atp_problem_prefix = "Tarski__CLF_lubH_is_fixp" ]]
    6.63  (*Single-step version fails. The conjecture clauses refer to local abstraction
    6.64  functions (Frees), which prevents expand_defs_tac from removing those 
    6.65  "definitions" at the end of the proof. *)
    6.66 @@ -588,7 +588,7 @@
    6.67       "H = {x. (x, f x) \<in> r & x \<in> A} ==> lub H cl \<in> fix f A"
    6.68  apply (simp add: fix_def)
    6.69  apply (rule conjI)
    6.70 -ML_command{*AtpWrapper.problem_name:="Tarski__CLF_lubH_is_fixp_simpler"*} 
    6.71 +using [[ atp_problem_prefix = "Tarski__CLF_lubH_is_fixp_simpler" ]]
    6.72  apply (metis CO_refl_on lubH_le_flubH refl_onD1)
    6.73  apply (metis antisymE flubH_le_lubH lubH_le_flubH)
    6.74  done
    6.75 @@ -607,7 +607,7 @@
    6.76  apply (simp_all add: P_def)
    6.77  done
    6.78  
    6.79 -ML{*AtpWrapper.problem_name:="Tarski__CLF_lubH_least_fixf"*}
    6.80 +declare [[ atp_problem_prefix = "Tarski__CLF_lubH_least_fixf" ]]
    6.81  lemma (in CLF) lubH_least_fixf:
    6.82       "H = {x. (x, f x) \<in> r & x \<in> A}
    6.83        ==> \<forall>L. (\<forall>y \<in> fix f A. (y,L) \<in> r) --> (lub H cl, L) \<in> r"
    6.84 @@ -615,7 +615,7 @@
    6.85  done
    6.86  
    6.87  subsection {* Tarski fixpoint theorem 1, first part *}
    6.88 -ML{*AtpWrapper.problem_name:="Tarski__CLF_T_thm_1_lub"*}
    6.89 +declare [[ atp_problem_prefix = "Tarski__CLF_T_thm_1_lub" ]]
    6.90    declare CL.lubI[intro] fix_subset[intro] CL.lub_in_lattice[intro] 
    6.91            CLF.fixf_le_lubH[simp] CLF.lubH_least_fixf[simp]
    6.92  lemma (in CLF) T_thm_1_lub: "lub P cl = lub {x. (x, f x) \<in> r & x \<in> A} cl"
    6.93 @@ -623,7 +623,7 @@
    6.94  apply (rule sym)
    6.95  apply (simp add: P_def)
    6.96  apply (rule lubI)
    6.97 -ML_command{*AtpWrapper.problem_name:="Tarski__CLF_T_thm_1_lub_simpler"*}
    6.98 +using [[ atp_problem_prefix = "Tarski__CLF_T_thm_1_lub_simpler" ]]
    6.99  apply (metis P_def fix_subset) 
   6.100  apply (metis Collect_conj_eq Collect_mem_eq Int_commute Int_lower1 lub_in_lattice vimage_def)
   6.101  (*??no longer terminates, with combinators
   6.102 @@ -638,7 +638,7 @@
   6.103  
   6.104  
   6.105  (*never proved, 2007-01-22*)
   6.106 -ML{*AtpWrapper.problem_name:="Tarski__CLF_glbH_is_fixp"*}
   6.107 +declare [[ atp_problem_prefix = "Tarski__CLF_glbH_is_fixp" ]]
   6.108    declare glb_dual_lub[simp] PO.dualA_iff[intro] CLF.lubH_is_fixp[intro] 
   6.109            PO.dualPO[intro] CL.CL_dualCL[intro] PO.dualr_iff[simp]
   6.110  lemma (in CLF) glbH_is_fixp: "H = {x. (f x, x) \<in> r & x \<in> A} ==> glb H cl \<in> P"
   6.111 @@ -662,13 +662,13 @@
   6.112  
   6.113  
   6.114  (*never proved, 2007-01-22*)
   6.115 -ML{*AtpWrapper.problem_name:="Tarski__T_thm_1_glb"*}  (*ALL THEOREMS*)
   6.116 +declare [[ atp_problem_prefix = "Tarski__T_thm_1_glb" ]]  (*ALL THEOREMS*)
   6.117  lemma (in CLF) T_thm_1_glb: "glb P cl = glb {x. (f x, x) \<in> r & x \<in> A} cl"
   6.118  (*sledgehammer;*)
   6.119  apply (simp add: glb_dual_lub P_def A_def r_def)
   6.120  apply (rule dualA_iff [THEN subst])
   6.121  (*never proved, 2007-01-22*)
   6.122 -ML_command{*AtpWrapper.problem_name:="Tarski__T_thm_1_glb_simpler"*}  (*ALL THEOREMS*)
   6.123 +using [[ atp_problem_prefix = "Tarski__T_thm_1_glb_simpler" ]]  (*ALL THEOREMS*)
   6.124  (*sledgehammer;*)
   6.125  apply (simp add: CLF.T_thm_1_lub [of _ f, OF CLF.intro, OF CL.intro CLF_axioms.intro, OF PO.intro CL_axioms.intro,
   6.126    OF dualPO CL_dualCL] dualPO CL_dualCL CLF_dual dualr_iff)
   6.127 @@ -677,13 +677,13 @@
   6.128  subsection {* interval *}
   6.129  
   6.130  
   6.131 -ML{*AtpWrapper.problem_name:="Tarski__rel_imp_elem"*}
   6.132 +declare [[ atp_problem_prefix = "Tarski__rel_imp_elem" ]]
   6.133    declare (in CLF) CO_refl_on[simp] refl_on_def [simp]
   6.134  lemma (in CLF) rel_imp_elem: "(x, y) \<in> r ==> x \<in> A"
   6.135  by (metis CO_refl_on refl_onD1)
   6.136    declare (in CLF) CO_refl_on[simp del]  refl_on_def [simp del]
   6.137  
   6.138 -ML{*AtpWrapper.problem_name:="Tarski__interval_subset"*}
   6.139 +declare [[ atp_problem_prefix = "Tarski__interval_subset" ]]
   6.140    declare (in CLF) rel_imp_elem[intro] 
   6.141    declare interval_def [simp]
   6.142  lemma (in CLF) interval_subset: "[| a \<in> A; b \<in> A |] ==> interval r a b \<subseteq> A"
   6.143 @@ -718,7 +718,7 @@
   6.144       "[| a \<in> A; b \<in> A; S \<subseteq> interval r a b |]==> S \<subseteq> A"
   6.145  by (simp add: subset_trans [OF _ interval_subset])
   6.146  
   6.147 -ML{*AtpWrapper.problem_name:="Tarski__L_in_interval"*}  (*ALL THEOREMS*)
   6.148 +declare [[ atp_problem_prefix = "Tarski__L_in_interval" ]]  (*ALL THEOREMS*)
   6.149  lemma (in CLF) L_in_interval:
   6.150       "[| a \<in> A; b \<in> A; S \<subseteq> interval r a b;
   6.151           S \<noteq> {}; isLub S cl L; interval r a b \<noteq> {} |] ==> L \<in> interval r a b" 
   6.152 @@ -737,7 +737,7 @@
   6.153  done
   6.154  
   6.155  (*never proved, 2007-01-22*)
   6.156 -ML{*AtpWrapper.problem_name:="Tarski__G_in_interval"*}  (*ALL THEOREMS*)
   6.157 +declare [[ atp_problem_prefix = "Tarski__G_in_interval" ]]  (*ALL THEOREMS*)
   6.158  lemma (in CLF) G_in_interval:
   6.159       "[| a \<in> A; b \<in> A; interval r a b \<noteq> {}; S \<subseteq> interval r a b; isGlb S cl G;
   6.160           S \<noteq> {} |] ==> G \<in> interval r a b"
   6.161 @@ -746,7 +746,7 @@
   6.162                   dualA_iff A_def dualPO CL_dualCL CLF_dual isGlb_dual_isLub)
   6.163  done
   6.164  
   6.165 -ML{*AtpWrapper.problem_name:="Tarski__intervalPO"*}  (*ALL THEOREMS*)
   6.166 +declare [[ atp_problem_prefix = "Tarski__intervalPO" ]]  (*ALL THEOREMS*)
   6.167  lemma (in CLF) intervalPO:
   6.168       "[| a \<in> A; b \<in> A; interval r a b \<noteq> {} |]
   6.169        ==> (| pset = interval r a b, order = induced (interval r a b) r |)
   6.170 @@ -819,7 +819,7 @@
   6.171  lemmas (in CLF) intv_CL_glb = intv_CL_lub [THEN Rdual]
   6.172  
   6.173  (*never proved, 2007-01-22*)
   6.174 -ML{*AtpWrapper.problem_name:="Tarski__interval_is_sublattice"*}  (*ALL THEOREMS*)
   6.175 +declare [[ atp_problem_prefix = "Tarski__interval_is_sublattice" ]]  (*ALL THEOREMS*)
   6.176  lemma (in CLF) interval_is_sublattice:
   6.177       "[| a \<in> A; b \<in> A; interval r a b \<noteq> {} |]
   6.178          ==> interval r a b <<= cl"
   6.179 @@ -827,7 +827,7 @@
   6.180  apply (rule sublatticeI)
   6.181  apply (simp add: interval_subset)
   6.182  (*never proved, 2007-01-22*)
   6.183 -ML_command{*AtpWrapper.problem_name:="Tarski__interval_is_sublattice_simpler"*}  
   6.184 +using [[ atp_problem_prefix = "Tarski__interval_is_sublattice_simpler" ]]
   6.185  (*sledgehammer *)
   6.186  apply (rule CompleteLatticeI)
   6.187  apply (simp add: intervalPO)
   6.188 @@ -846,7 +846,7 @@
   6.189  lemma (in CLF) Bot_dual_Top: "Bot cl = Top (dual cl)"
   6.190  by (simp add: Top_def Bot_def least_def greatest_def dualA_iff dualr_iff)
   6.191  
   6.192 -ML_command{*AtpWrapper.problem_name:="Tarski__Bot_in_lattice"*}  (*ALL THEOREMS*)
   6.193 +declare [[ atp_problem_prefix = "Tarski__Bot_in_lattice" ]]  (*ALL THEOREMS*)
   6.194  lemma (in CLF) Bot_in_lattice: "Bot cl \<in> A"
   6.195  (*sledgehammer; *)
   6.196  apply (simp add: Bot_def least_def)
   6.197 @@ -856,12 +856,12 @@
   6.198  done
   6.199  
   6.200  (*first proved 2007-01-25 after relaxing relevance*)
   6.201 -ML_command{*AtpWrapper.problem_name:="Tarski__Top_in_lattice"*}  (*ALL THEOREMS*)
   6.202 +declare [[ atp_problem_prefix = "Tarski__Top_in_lattice" ]]  (*ALL THEOREMS*)
   6.203  lemma (in CLF) Top_in_lattice: "Top cl \<in> A"
   6.204  (*sledgehammer;*)
   6.205  apply (simp add: Top_dual_Bot A_def)
   6.206  (*first proved 2007-01-25 after relaxing relevance*)
   6.207 -ML_command{*AtpWrapper.problem_name:="Tarski__Top_in_lattice_simpler"*}  (*ALL THEOREMS*)
   6.208 +using [[ atp_problem_prefix = "Tarski__Top_in_lattice_simpler" ]]  (*ALL THEOREMS*)
   6.209  (*sledgehammer*)
   6.210  apply (rule dualA_iff [THEN subst])
   6.211  apply (blast intro!: CLF.Bot_in_lattice [OF CLF.intro, OF CL.intro CLF_axioms.intro, OF PO.intro CL_axioms.intro] dualPO CL_dualCL CLF_dual)
   6.212 @@ -876,7 +876,7 @@
   6.213  done
   6.214  
   6.215  (*never proved, 2007-01-22*)
   6.216 -ML_command{*AtpWrapper.problem_name:="Tarski__Bot_prop"*}  (*ALL THEOREMS*) 
   6.217 +declare [[ atp_problem_prefix = "Tarski__Bot_prop" ]]  (*ALL THEOREMS*) 
   6.218  lemma (in CLF) Bot_prop: "x \<in> A ==> (Bot cl, x) \<in> r"
   6.219  (*sledgehammer*) 
   6.220  apply (simp add: Bot_dual_Top r_def)
   6.221 @@ -885,12 +885,12 @@
   6.222                   dualA_iff A_def dualPO CL_dualCL CLF_dual)
   6.223  done
   6.224  
   6.225 -ML_command{*AtpWrapper.problem_name:="Tarski__Bot_in_lattice"*}  (*ALL THEOREMS*)
   6.226 +declare [[ atp_problem_prefix = "Tarski__Bot_in_lattice" ]]  (*ALL THEOREMS*)
   6.227  lemma (in CLF) Top_intv_not_empty: "x \<in> A  ==> interval r x (Top cl) \<noteq> {}" 
   6.228  apply (metis Top_in_lattice Top_prop empty_iff intervalI reflE)
   6.229  done
   6.230  
   6.231 -ML_command{*AtpWrapper.problem_name:="Tarski__Bot_intv_not_empty"*}  (*ALL THEOREMS*)
   6.232 +declare [[ atp_problem_prefix = "Tarski__Bot_intv_not_empty" ]]  (*ALL THEOREMS*)
   6.233  lemma (in CLF) Bot_intv_not_empty: "x \<in> A ==> interval r (Bot cl) x \<noteq> {}" 
   6.234  apply (metis Bot_prop ex_in_conv intervalI reflE rel_imp_elem)
   6.235  done
   6.236 @@ -902,7 +902,7 @@
   6.237  by (simp add: P_def fix_subset po_subset_po)
   6.238  
   6.239  (*first proved 2007-01-25 after relaxing relevance*)
   6.240 -ML_command{*AtpWrapper.problem_name:="Tarski__Y_subset_A"*}
   6.241 +declare [[ atp_problem_prefix = "Tarski__Y_subset_A" ]]
   6.242    declare (in Tarski) P_def[simp] Y_ss [simp]
   6.243    declare fix_subset [intro] subset_trans [intro]
   6.244  lemma (in Tarski) Y_subset_A: "Y \<subseteq> A"
   6.245 @@ -918,7 +918,7 @@
   6.246    by (rule Y_subset_A [THEN lub_in_lattice])
   6.247  
   6.248  (*never proved, 2007-01-22*)
   6.249 -ML_command{*AtpWrapper.problem_name:="Tarski__lubY_le_flubY"*}  (*ALL THEOREMS*)
   6.250 +declare [[ atp_problem_prefix = "Tarski__lubY_le_flubY" ]]  (*ALL THEOREMS*)
   6.251  lemma (in Tarski) lubY_le_flubY: "(lub Y cl, f (lub Y cl)) \<in> r"
   6.252  (*sledgehammer*) 
   6.253  apply (rule lub_least)
   6.254 @@ -927,12 +927,12 @@
   6.255  apply (rule lubY_in_A)
   6.256  -- {* @{text "Y \<subseteq> P ==> f x = x"} *}
   6.257  apply (rule ballI)
   6.258 -ML_command{*AtpWrapper.problem_name:="Tarski__lubY_le_flubY_simpler"*}  (*ALL THEOREMS*)
   6.259 +using [[ atp_problem_prefix = "Tarski__lubY_le_flubY_simpler" ]]  (*ALL THEOREMS*)
   6.260  (*sledgehammer *)
   6.261  apply (rule_tac t = "x" in fix_imp_eq [THEN subst])
   6.262  apply (erule Y_ss [simplified P_def, THEN subsetD])
   6.263  -- {* @{text "reduce (f x, f (lub Y cl)) \<in> r to (x, lub Y cl) \<in> r"} by monotonicity *}
   6.264 -ML_command{*AtpWrapper.problem_name:="Tarski__lubY_le_flubY_simplest"*}  (*ALL THEOREMS*)
   6.265 +using [[ atp_problem_prefix = "Tarski__lubY_le_flubY_simplest" ]]  (*ALL THEOREMS*)
   6.266  (*sledgehammer*)
   6.267  apply (rule_tac f = "f" in monotoneE)
   6.268  apply (rule monotone_f)
   6.269 @@ -942,7 +942,7 @@
   6.270  done
   6.271  
   6.272  (*first proved 2007-01-25 after relaxing relevance*)
   6.273 -ML_command{*AtpWrapper.problem_name:="Tarski__intY1_subset"*}  (*ALL THEOREMS*)
   6.274 +declare [[ atp_problem_prefix = "Tarski__intY1_subset" ]]  (*ALL THEOREMS*)
   6.275  lemma (in Tarski) intY1_subset: "intY1 \<subseteq> A"
   6.276  (*sledgehammer*) 
   6.277  apply (unfold intY1_def)
   6.278 @@ -954,7 +954,7 @@
   6.279  lemmas (in Tarski) intY1_elem = intY1_subset [THEN subsetD]
   6.280  
   6.281  (*never proved, 2007-01-22*)
   6.282 -ML_command{*AtpWrapper.problem_name:="Tarski__intY1_f_closed"*}  (*ALL THEOREMS*)
   6.283 +declare [[ atp_problem_prefix = "Tarski__intY1_f_closed" ]]  (*ALL THEOREMS*)
   6.284  lemma (in Tarski) intY1_f_closed: "x \<in> intY1 \<Longrightarrow> f x \<in> intY1"
   6.285  (*sledgehammer*) 
   6.286  apply (simp add: intY1_def  interval_def)
   6.287 @@ -962,7 +962,7 @@
   6.288  apply (rule transE)
   6.289  apply (rule lubY_le_flubY)
   6.290  -- {* @{text "(f (lub Y cl), f x) \<in> r"} *}
   6.291 -ML_command{*AtpWrapper.problem_name:="Tarski__intY1_f_closed_simpler"*}  (*ALL THEOREMS*)
   6.292 +using [[ atp_problem_prefix = "Tarski__intY1_f_closed_simpler" ]]  (*ALL THEOREMS*)
   6.293  (*sledgehammer [has been proved before now...]*)
   6.294  apply (rule_tac f=f in monotoneE)
   6.295  apply (rule monotone_f)
   6.296 @@ -975,13 +975,13 @@
   6.297  apply (simp add: intY1_def interval_def  intY1_elem)
   6.298  done
   6.299  
   6.300 -ML_command{*AtpWrapper.problem_name:="Tarski__intY1_func"*}  (*ALL THEOREMS*)
   6.301 +declare [[ atp_problem_prefix = "Tarski__intY1_func" ]]  (*ALL THEOREMS*)
   6.302  lemma (in Tarski) intY1_func: "(%x: intY1. f x) \<in> intY1 -> intY1"
   6.303  apply (rule restrict_in_funcset)
   6.304  apply (metis intY1_f_closed restrict_in_funcset)
   6.305  done
   6.306  
   6.307 -ML_command{*AtpWrapper.problem_name:="Tarski__intY1_mono"*}  (*ALL THEOREMS*)
   6.308 +declare [[ atp_problem_prefix = "Tarski__intY1_mono" ]]  (*ALL THEOREMS*)
   6.309  lemma (in Tarski) intY1_mono:
   6.310       "monotone (%x: intY1. f x) intY1 (induced intY1 r)"
   6.311  (*sledgehammer *)
   6.312 @@ -990,7 +990,7 @@
   6.313  done
   6.314  
   6.315  (*proof requires relaxing relevance: 2007-01-25*)
   6.316 -ML_command{*AtpWrapper.problem_name:="Tarski__intY1_is_cl"*}  (*ALL THEOREMS*)
   6.317 +declare [[ atp_problem_prefix = "Tarski__intY1_is_cl" ]]  (*ALL THEOREMS*)
   6.318  lemma (in Tarski) intY1_is_cl:
   6.319      "(| pset = intY1, order = induced intY1 r |) \<in> CompleteLattice"
   6.320  (*sledgehammer*) 
   6.321 @@ -1003,7 +1003,7 @@
   6.322  done
   6.323  
   6.324  (*never proved, 2007-01-22*)
   6.325 -ML_command{*AtpWrapper.problem_name:="Tarski__v_in_P"*}  (*ALL THEOREMS*)
   6.326 +declare [[ atp_problem_prefix = "Tarski__v_in_P" ]]  (*ALL THEOREMS*)
   6.327  lemma (in Tarski) v_in_P: "v \<in> P"
   6.328  (*sledgehammer*) 
   6.329  apply (unfold P_def)
   6.330 @@ -1013,7 +1013,7 @@
   6.331                   v_def CL_imp_PO intY1_is_cl CLF_set_def intY1_func intY1_mono)
   6.332  done
   6.333  
   6.334 -ML_command{*AtpWrapper.problem_name:="Tarski__z_in_interval"*}  (*ALL THEOREMS*)
   6.335 +declare [[ atp_problem_prefix = "Tarski__z_in_interval" ]]  (*ALL THEOREMS*)
   6.336  lemma (in Tarski) z_in_interval:
   6.337       "[| z \<in> P; \<forall>y\<in>Y. (y, z) \<in> induced P r |] ==> z \<in> intY1"
   6.338  (*sledgehammer *)
   6.339 @@ -1027,14 +1027,14 @@
   6.340  apply (simp add: induced_def)
   6.341  done
   6.342  
   6.343 -ML_command{*AtpWrapper.problem_name:="Tarski__fz_in_int_rel"*}  (*ALL THEOREMS*)
   6.344 +declare [[ atp_problem_prefix = "Tarski__fz_in_int_rel" ]]  (*ALL THEOREMS*)
   6.345  lemma (in Tarski) f'z_in_int_rel: "[| z \<in> P; \<forall>y\<in>Y. (y, z) \<in> induced P r |]
   6.346        ==> ((%x: intY1. f x) z, z) \<in> induced intY1 r" 
   6.347  apply (metis P_def acc_def fix_imp_eq fix_subset indI reflE restrict_apply subset_eq z_in_interval)
   6.348  done
   6.349  
   6.350  (*never proved, 2007-01-22*)
   6.351 -ML_command{*AtpWrapper.problem_name:="Tarski__tarski_full_lemma"*}  (*ALL THEOREMS*)
   6.352 +declare [[ atp_problem_prefix = "Tarski__tarski_full_lemma" ]]  (*ALL THEOREMS*)
   6.353  lemma (in Tarski) tarski_full_lemma:
   6.354       "\<exists>L. isLub Y (| pset = P, order = induced P r |) L"
   6.355  apply (rule_tac x = "v" in exI)
   6.356 @@ -1064,12 +1064,12 @@
   6.357   prefer 2 apply (simp add: v_in_P)
   6.358  apply (unfold v_def)
   6.359  (*never proved, 2007-01-22*)
   6.360 -ML_command{*AtpWrapper.problem_name:="Tarski__tarski_full_lemma_simpler"*} 
   6.361 +using [[ atp_problem_prefix = "Tarski__tarski_full_lemma_simpler" ]]
   6.362  (*sledgehammer*) 
   6.363  apply (rule indE)
   6.364  apply (rule_tac [2] intY1_subset)
   6.365  (*never proved, 2007-01-22*)
   6.366 -ML_command{*AtpWrapper.problem_name:="Tarski__tarski_full_lemma_simplest"*} 
   6.367 +using [[ atp_problem_prefix = "Tarski__tarski_full_lemma_simplest" ]]
   6.368  (*sledgehammer*) 
   6.369  apply (rule CL.glb_lower [OF CL.intro, OF PO.intro CL_axioms.intro, OF _ intY1_is_cl, simplified])
   6.370    apply (simp add: CL_imp_PO intY1_is_cl)
   6.371 @@ -1087,7 +1087,7 @@
   6.372  
   6.373  
   6.374  (*never proved, 2007-01-22*)
   6.375 -ML_command{*AtpWrapper.problem_name:="Tarski__Tarski_full"*}
   6.376 +declare [[ atp_problem_prefix = "Tarski__Tarski_full" ]]
   6.377    declare (in CLF) fixf_po[intro] P_def [simp] A_def [simp] r_def [simp]
   6.378                 Tarski.tarski_full_lemma [intro] cl_po [intro] cl_co [intro]
   6.379                 CompleteLatticeI_simp [intro]
   6.380 @@ -1097,7 +1097,7 @@
   6.381  apply (rule CompleteLatticeI_simp)
   6.382  apply (rule fixf_po, clarify)
   6.383  (*never proved, 2007-01-22*)
   6.384 -ML_command{*AtpWrapper.problem_name:="Tarski__Tarski_full_simpler"*}
   6.385 +using [[ atp_problem_prefix = "Tarski__Tarski_full_simpler" ]]
   6.386  (*sledgehammer*) 
   6.387  apply (simp add: P_def A_def r_def)
   6.388  apply (blast intro!: Tarski.tarski_full_lemma [OF Tarski.intro, OF CLF.intro Tarski_axioms.intro,
     7.1 --- a/src/HOL/MetisExamples/TransClosure.thy	Fri Oct 02 04:44:56 2009 +0200
     7.2 +++ b/src/HOL/MetisExamples/TransClosure.thy	Sat Oct 03 12:05:40 2009 +0200
     7.3 @@ -22,7 +22,7 @@
     7.4  
     7.5  consts f:: "addr \<Rightarrow> val"
     7.6  
     7.7 -ML {*AtpWrapper.problem_name := "TransClosure__test"*}
     7.8 +declare [[ atp_problem_prefix = "TransClosure__test" ]]
     7.9  lemma "\<lbrakk> f c = Intg x; \<forall> y. f b = Intg y \<longrightarrow> y \<noteq> x; (a,b) \<in> R\<^sup>*; (b,c) \<in> R\<^sup>* \<rbrakk> 
    7.10     \<Longrightarrow> \<exists> c. (b,c) \<in> R \<and> (a,c) \<in> R\<^sup>*"  
    7.11  by (metis Transitive_Closure.rtrancl_into_rtrancl converse_rtranclE trancl_reflcl)
    7.12 @@ -51,7 +51,7 @@
    7.13    by (metis 10 3)
    7.14  qed
    7.15  
    7.16 -ML {*AtpWrapper.problem_name := "TransClosure__test_simpler"*}
    7.17 +declare [[ atp_problem_prefix = "TransClosure__test_simpler" ]]
    7.18  lemma "\<lbrakk> f c = Intg x; \<forall> y. f b = Intg y \<longrightarrow> y \<noteq> x; (a,b) \<in> R\<^sup>*; (b,c) \<in> R\<^sup>* \<rbrakk> 
    7.19     \<Longrightarrow> \<exists> c. (b,c) \<in> R \<and> (a,c) \<in> R\<^sup>*"
    7.20  apply (erule_tac x="b" in converse_rtranclE)
     8.1 --- a/src/HOL/MetisExamples/set.thy	Fri Oct 02 04:44:56 2009 +0200
     8.2 +++ b/src/HOL/MetisExamples/set.thy	Sat Oct 03 12:05:40 2009 +0200
     8.3 @@ -197,7 +197,7 @@
     8.4    by (metis 11 6 Un_upper2 1 Un_upper1 0 9 Un_upper2 1 Un_upper1 0)
     8.5  qed 
     8.6  
     8.7 -ML {*AtpWrapper.problem_name := "set__equal_union"*}
     8.8 +declare [[ atp_problem_prefix = "set__equal_union" ]]
     8.9  lemma (*equal_union: *)
    8.10     "(X = Y \<union> Z) =
    8.11      (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" 
    8.12 @@ -205,12 +205,12 @@
    8.13  by (metis Un_least Un_upper1 Un_upper2 set_eq_subset)
    8.14  
    8.15  
    8.16 -ML {*AtpWrapper.problem_name := "set__equal_inter"*}
    8.17 +declare [[ atp_problem_prefix = "set__equal_inter" ]]
    8.18  lemma "(X = Y \<inter> Z) =
    8.19      (X \<subseteq> Y \<and> X \<subseteq> Z \<and> (\<forall>V. V \<subseteq> Y \<and> V \<subseteq> Z \<longrightarrow> V \<subseteq> X))"
    8.20  by (metis Int_greatest Int_lower1 Int_lower2 set_eq_subset)
    8.21  
    8.22 -ML {*AtpWrapper.problem_name := "set__fixedpoint"*}
    8.23 +declare [[ atp_problem_prefix = "set__fixedpoint" ]]
    8.24  lemma fixedpoint:
    8.25      "\<exists>!x. f (g x) = x \<Longrightarrow> \<exists>!y. g (f y) = y"
    8.26  by metis
    8.27 @@ -229,7 +229,7 @@
    8.28    by (metis 4 0)
    8.29  qed
    8.30  
    8.31 -ML {*AtpWrapper.problem_name := "set__singleton_example"*}
    8.32 +declare [[ atp_problem_prefix = "set__singleton_example" ]]
    8.33  lemma (*singleton_example_2:*)
    8.34       "\<forall>x \<in> S. \<Union>S \<subseteq> x \<Longrightarrow> \<exists>z. S \<subseteq> {z}"
    8.35  by (metis Set.subsetI Union_upper insertCI set_eq_subset)
    8.36 @@ -259,7 +259,7 @@
    8.37    293-314.
    8.38  *}
    8.39  
    8.40 -ML {*AtpWrapper.problem_name := "set__Bledsoe_Fung"*}
    8.41 +declare [[ atp_problem_prefix = "set__Bledsoe_Fung" ]]
    8.42  (*Notes: 1, the numbering doesn't completely agree with the paper. 
    8.43  2, we must rename set variables to avoid type clashes.*)
    8.44  lemma "\<exists>B. (\<forall>x \<in> B. x \<le> (0::int))"
     9.1 --- a/src/HOL/Mirabelle/Tools/mirabelle_sledgehammer.ML	Fri Oct 02 04:44:56 2009 +0200
     9.2 +++ b/src/HOL/Mirabelle/Tools/mirabelle_sledgehammer.ML	Sat Oct 03 12:05:40 2009 +0200
     9.3 @@ -291,39 +291,27 @@
     9.4  
     9.5  local
     9.6  
     9.7 -fun safe init done f x =
     9.8 -  let
     9.9 -    val y = init x
    9.10 -    val z = Exn.capture f y
    9.11 -    val _ = done y
    9.12 -  in Exn.release z end
    9.13 -
    9.14 -fun init_sh NONE = !AtpWrapper.destdir
    9.15 -  | init_sh (SOME path) =
    9.16 -      let
    9.17 -        (* Warning: we implicitly assume single-threaded execution here! *)
    9.18 -        val old = !AtpWrapper.destdir
    9.19 -        val _ = AtpWrapper.destdir := path
    9.20 -      in old end
    9.21 -
    9.22 -fun done_sh path = AtpWrapper.destdir := path
    9.23 -
    9.24  datatype sh_result =
    9.25    SH_OK of int * int * string list |
    9.26    SH_FAIL of int * int |
    9.27    SH_ERROR
    9.28  
    9.29 -fun run_sh (prover_name, prover) hard_timeout timeout st _ =
    9.30 +fun run_sh prover hard_timeout timeout dir st =
    9.31    let
    9.32 -    val atp = prover timeout NONE NONE prover_name 1
    9.33 +    val (ctxt, goal) = Proof.get_goal st
    9.34 +    val ctxt' = ctxt |> is_some dir ? Config.put AtpWrapper.destdir (the dir)
    9.35 +    val atp = prover (AtpWrapper.atp_problem_of_goal
    9.36 +      (AtpManager.get_full_types ()) 1 (ctxt', goal))
    9.37 +
    9.38      val time_limit =
    9.39        (case hard_timeout of
    9.40          NONE => I
    9.41        | SOME secs => TimeLimit.timeLimit (Time.fromSeconds secs))
    9.42 -    val ((success, (message, thm_names), time_atp, _, _, _), time_isa) =
    9.43 -      time_limit (Mirabelle.cpu_time atp) (Proof.get_goal st)
    9.44 +    val (AtpWrapper.Prover_Result {success, message, theorem_names,
    9.45 +      runtime=time_atp, ...}, time_isa) =
    9.46 +      time_limit (Mirabelle.cpu_time atp) timeout
    9.47    in
    9.48 -    if success then (message, SH_OK (time_isa, time_atp, thm_names))
    9.49 +    if success then (message, SH_OK (time_isa, time_atp, theorem_names))
    9.50      else (message, SH_FAIL(time_isa, time_atp))
    9.51    end
    9.52    handle ResHolClause.TOO_TRIVIAL => ("trivial", SH_OK (0, 0, []))
    9.53 @@ -348,13 +336,12 @@
    9.54  fun run_sledgehammer args named_thms id ({pre=st, log, ...}: Mirabelle.run_args) =
    9.55    let
    9.56      val _ = change_data id inc_sh_calls
    9.57 -    val atp as (prover_name, _) = get_atp (Proof.theory_of st) args
    9.58 +    val (prover_name, prover) = get_atp (Proof.theory_of st) args
    9.59      val dir = AList.lookup (op =) args keepK
    9.60      val timeout = Mirabelle.get_int_setting args (prover_timeoutK, 30)
    9.61      val hard_timeout = AList.lookup (op =) args prover_hard_timeoutK
    9.62        |> Option.map (fst o read_int o explode)
    9.63 -    val (msg, result) = safe init_sh done_sh
    9.64 -      (run_sh atp hard_timeout timeout st) dir
    9.65 +    val (msg, result) = run_sh prover hard_timeout timeout dir st
    9.66    in
    9.67      case result of
    9.68        SH_OK (time_isa, time_atp, names) =>
    10.1 --- a/src/HOL/Tools/ATP_Manager/atp_manager.ML	Fri Oct 02 04:44:56 2009 +0200
    10.2 +++ b/src/HOL/Tools/ATP_Manager/atp_manager.ML	Sat Oct 03 12:05:40 2009 +0200
    10.3 @@ -21,13 +21,9 @@
    10.4    val kill: unit -> unit
    10.5    val info: unit -> unit
    10.6    val messages: int option -> unit
    10.7 -  type prover = int -> (thm * (string * int)) list option ->
    10.8 -    (thm * (string * int)) list option -> string -> int ->
    10.9 -    Proof.context * (thm list * thm) ->
   10.10 -    bool * (string * string list) * int * string * string vector * (thm * (string * int)) list
   10.11 -  val add_prover: string -> prover -> theory -> theory
   10.12 +  val add_prover: string * AtpWrapper.prover -> theory -> theory
   10.13    val print_provers: theory -> unit
   10.14 -  val get_prover: string -> theory -> prover option
   10.15 +  val get_prover: string -> theory -> AtpWrapper.prover option
   10.16    val sledgehammer: string list -> Proof.state -> unit
   10.17  end;
   10.18  
   10.19 @@ -302,16 +298,11 @@
   10.20  
   10.21  (* named provers *)
   10.22  
   10.23 -type prover = int -> (thm * (string * int)) list option ->
   10.24 -  (thm * (string * int)) list option -> string -> int ->
   10.25 -  Proof.context * (thm list * thm) ->
   10.26 -  bool * (string * string list) * int * string * string vector * (thm * (string * int)) list
   10.27 -
   10.28  fun err_dup_prover name = error ("Duplicate prover: " ^ quote name);
   10.29  
   10.30  structure Provers = TheoryDataFun
   10.31  (
   10.32 -  type T = (prover * stamp) Symtab.table
   10.33 +  type T = (AtpWrapper.prover * stamp) Symtab.table
   10.34    val empty = Symtab.empty
   10.35    val copy = I
   10.36    val extend = I
   10.37 @@ -319,7 +310,7 @@
   10.38      handle Symtab.DUP dup => err_dup_prover dup
   10.39  );
   10.40  
   10.41 -fun add_prover name prover thy =
   10.42 +fun add_prover (name, prover) thy =
   10.43    Provers.map (Symtab.update_new (name, (prover, stamp ()))) thy
   10.44      handle Symtab.DUP dup => err_dup_prover dup;
   10.45  
   10.46 @@ -344,9 +335,11 @@
   10.47          val _ = SimpleThread.fork true (fn () =>
   10.48            let
   10.49              val _ = register birthtime deadtime (Thread.self (), desc)
   10.50 +            val problem = AtpWrapper.atp_problem_of_goal (get_full_types ()) i
   10.51 +              (Proof.get_goal proof_state)
   10.52              val result =
   10.53 -              let val (success, (message, _), _, _, _, _) =
   10.54 -                prover (get_timeout ()) NONE NONE name i (Proof.get_goal proof_state)
   10.55 +              let val AtpWrapper.Prover_Result {success, message, ...} =
   10.56 +                prover problem (get_timeout ())
   10.57                in (success, message) end
   10.58                handle ResHolClause.TOO_TRIVIAL
   10.59                  => (true, "Empty clause: Try this command: " ^ Markup.markup Markup.sendback "apply metis")
    11.1 --- a/src/HOL/Tools/ATP_Manager/atp_minimal.ML	Fri Oct 02 04:44:56 2009 +0200
    11.2 +++ b/src/HOL/Tools/ATP_Manager/atp_minimal.ML	Sat Oct 03 12:05:40 2009 +0200
    11.3 @@ -6,7 +6,7 @@
    11.4  
    11.5  signature ATP_MINIMAL =
    11.6  sig
    11.7 -  val minimalize: AtpManager.prover -> string -> int -> Proof.state ->
    11.8 +  val minimalize: AtpWrapper.prover -> string -> int -> Proof.state ->
    11.9      (string * thm list) list -> ((string * thm list) list * int) option * string
   11.10  end
   11.11  
   11.12 @@ -97,7 +97,11 @@
   11.13     ("# Cannot determine problem status within resource limit", Timeout),
   11.14     ("Error", Error)]
   11.15  
   11.16 -fun produce_answer (success, message, _, result_string, thm_name_vec, filtered) =
   11.17 +fun produce_answer result =
   11.18 +  let
   11.19 +    val AtpWrapper.Prover_Result {success, message, proof=result_string,
   11.20 +      internal_thm_names=thm_name_vec, filtered_clauses=filtered, ...} = result
   11.21 +  in
   11.22    if success then
   11.23      (Success (Vector.foldr op:: [] thm_name_vec, filtered), result_string)
   11.24    else
   11.25 @@ -110,19 +114,23 @@
   11.26        else
   11.27          (Failure, result_string)
   11.28      end
   11.29 -
   11.30 +  end
   11.31  
   11.32  (* wrapper for calling external prover *)
   11.33  
   11.34 -fun sh_test_thms prover prover_name time_limit subgoalno state filtered name_thms_pairs =
   11.35 +fun sh_test_thms prover time_limit subgoalno state filtered name_thms_pairs =
   11.36    let
   11.37      val _ = println ("Testing " ^ (length_string name_thms_pairs) ^ " theorems... ")
   11.38      val name_thm_pairs = maps (fn (n, ths) => map (pair n) ths) name_thms_pairs
   11.39      val _ = debug_fn (fn () => print_names name_thm_pairs)
   11.40      val axclauses = ResAxioms.cnf_rules_pairs (Proof.theory_of state) name_thm_pairs
   11.41 -    val (result, proof) =
   11.42 -      produce_answer
   11.43 -        (prover time_limit (SOME axclauses) filtered prover_name subgoalno (Proof.get_goal state))
   11.44 +    val problem = AtpWrapper.ATP_Problem {
   11.45 +      with_full_types = AtpManager.get_full_types (),
   11.46 +      subgoal = subgoalno,
   11.47 +      goal = Proof.get_goal state,
   11.48 +      axiom_clauses = SOME axclauses,
   11.49 +      filtered_clauses = filtered }
   11.50 +    val (result, proof) = produce_answer (prover problem time_limit)
   11.51      val _ = println (string_of_result result)
   11.52      val _ = debug proof
   11.53    in
   11.54 @@ -140,7 +148,7 @@
   11.55      val _ = debug_fn (fn () => app (fn (n, tl) =>
   11.56          (debug n; app (fn t =>
   11.57            debug ("  " ^ Display.string_of_thm (Proof.context_of state) t)) tl)) name_thms_pairs)
   11.58 -    val test_thms_fun = sh_test_thms prover prover_name time_limit 1 state
   11.59 +    val test_thms_fun = sh_test_thms prover time_limit 1 state
   11.60      fun test_thms filtered thms =
   11.61        case test_thms_fun filtered thms of (Success _, _) => true | _ => false
   11.62      val answer' = pair and answer'' = pair NONE
    12.1 --- a/src/HOL/Tools/ATP_Manager/atp_wrapper.ML	Fri Oct 02 04:44:56 2009 +0200
    12.2 +++ b/src/HOL/Tools/ATP_Manager/atp_wrapper.ML	Sat Oct 03 12:05:40 2009 +0200
    12.3 @@ -6,25 +6,46 @@
    12.4  
    12.5  signature ATP_WRAPPER =
    12.6  sig
    12.7 -  val destdir: string Unsynchronized.ref
    12.8 -  val problem_name: string Unsynchronized.ref
    12.9 -  val tptp_prover_opts_full: int -> bool -> bool -> Path.T * string -> AtpManager.prover
   12.10 -  val tptp_prover_opts: int -> bool -> Path.T * string -> AtpManager.prover
   12.11 -  val tptp_prover: Path.T * string -> AtpManager.prover
   12.12 -  val full_prover_opts: int -> bool -> Path.T * string -> AtpManager.prover
   12.13 -  val full_prover: Path.T * string  -> AtpManager.prover
   12.14 -  val vampire_opts: int -> bool -> AtpManager.prover
   12.15 -  val vampire: AtpManager.prover
   12.16 -  val vampire_opts_full: int -> bool -> AtpManager.prover
   12.17 -  val vampire_full: AtpManager.prover
   12.18 -  val eprover_opts: int -> bool  -> AtpManager.prover
   12.19 -  val eprover: AtpManager.prover
   12.20 -  val eprover_opts_full: int -> bool -> AtpManager.prover
   12.21 -  val eprover_full: AtpManager.prover
   12.22 -  val spass_opts: int -> bool  -> AtpManager.prover
   12.23 -  val spass: AtpManager.prover
   12.24 -  val remote_prover_opts: int -> bool -> string -> string -> AtpManager.prover
   12.25 -  val remote_prover: string -> string -> AtpManager.prover
   12.26 +  (*hooks for problem files*)
   12.27 +  val destdir: string Config.T
   12.28 +  val problem_prefix: string Config.T
   12.29 +  val setup: theory -> theory
   12.30 +
   12.31 +  (*prover configuration, problem format, and prover result*)
   12.32 +  datatype prover_config = Prover_Config of {
   12.33 +    command: Path.T,
   12.34 +    arguments: int -> string,
   12.35 +    max_new_clauses: int,
   12.36 +    insert_theory_const: bool,
   12.37 +    emit_structured_proof: bool }
   12.38 +  datatype atp_problem = ATP_Problem of {
   12.39 +    with_full_types: bool,
   12.40 +    subgoal: int,
   12.41 +    goal: Proof.context * (thm list * thm),
   12.42 +    axiom_clauses: (thm * (string * int)) list option,
   12.43 +    filtered_clauses: (thm * (string * int)) list option }
   12.44 +  val atp_problem_of_goal: bool -> int -> Proof.context * (thm list * thm) ->
   12.45 +    atp_problem
   12.46 +  datatype prover_result = Prover_Result of {
   12.47 +    success: bool,
   12.48 +    message: string,
   12.49 +    theorem_names: string list,
   12.50 +    runtime: int,
   12.51 +    proof: string,
   12.52 +    internal_thm_names: string Vector.vector,
   12.53 +    filtered_clauses: (thm * (string * int)) list }
   12.54 +  type prover = atp_problem -> int -> prover_result
   12.55 +
   12.56 +  (*common provers*)
   12.57 +  val vampire: string * prover
   12.58 +  val vampire_full: string * prover
   12.59 +  val eprover: string * prover
   12.60 +  val eprover_full: string * prover
   12.61 +  val spass: string * prover
   12.62 +  val spass_no_tc: string * prover
   12.63 +  val remote_vampire: string * prover
   12.64 +  val remote_eprover: string * prover
   12.65 +  val remote_spass: string * prover
   12.66    val refresh_systems: unit -> unit
   12.67  end;
   12.68  
   12.69 @@ -33,10 +54,50 @@
   12.70  
   12.71  (** generic ATP wrapper **)
   12.72  
   12.73 -(* global hooks for writing problemfiles *)
   12.74 +(* hooks for writing problem files *)
   12.75 +
   12.76 +val (destdir, destdir_setup) = Attrib.config_string "atp_destdir" "";
   12.77 +  (*Empty string means create files in Isabelle's temporary files directory.*)
   12.78 +
   12.79 +val (problem_prefix, problem_prefix_setup) =
   12.80 +  Attrib.config_string "atp_problem_prefix" "prob";
   12.81 +
   12.82 +val setup = destdir_setup #> problem_prefix_setup;
   12.83 +
   12.84 +
   12.85 +(* prover configuration, problem format, and prover result *)
   12.86 +
   12.87 +datatype prover_config = Prover_Config of {
   12.88 +  command: Path.T,
   12.89 +  arguments: int -> string,
   12.90 +  max_new_clauses: int,
   12.91 +  insert_theory_const: bool,
   12.92 +  emit_structured_proof: bool }
   12.93  
   12.94 -val destdir = Unsynchronized.ref "";   (*Empty means write files to /tmp*)
   12.95 -val problem_name = Unsynchronized.ref "prob";
   12.96 +datatype atp_problem = ATP_Problem of {
   12.97 +  with_full_types: bool,
   12.98 +  subgoal: int,
   12.99 +  goal: Proof.context * (thm list * thm),
  12.100 +  axiom_clauses: (thm * (string * int)) list option,
  12.101 +  filtered_clauses: (thm * (string * int)) list option }
  12.102 +
  12.103 +fun atp_problem_of_goal with_full_types subgoal goal = ATP_Problem {
  12.104 +  with_full_types = with_full_types,
  12.105 +  subgoal = subgoal,
  12.106 +  goal = goal,
  12.107 +  axiom_clauses = NONE,
  12.108 +  filtered_clauses = NONE }
  12.109 +
  12.110 +datatype prover_result = Prover_Result of {
  12.111 +  success: bool,
  12.112 +  message: string,
  12.113 +  theorem_names: string list,  (* relevant theorems *)
  12.114 +  runtime: int,  (* user time of the ATP, in milliseconds *)
  12.115 +  proof: string,
  12.116 +  internal_thm_names: string Vector.vector,
  12.117 +  filtered_clauses: (thm * (string * int)) list }
  12.118 +
  12.119 +type prover = atp_problem -> int -> prover_result
  12.120  
  12.121  
  12.122  (* basic template *)
  12.123 @@ -47,20 +108,9 @@
  12.124    |> Exn.release
  12.125    |> tap (after path)
  12.126  
  12.127 -fun external_prover relevance_filter preparer writer (cmd, args) find_failure produce_answer
  12.128 -  timeout axiom_clauses filtered_clauses name subgoalno goal =
  12.129 +fun external_prover relevance_filter preparer writer cmd args find_failure produce_answer
  12.130 +  axiom_clauses filtered_clauses name subgoalno goal =
  12.131    let
  12.132 -    (* path to unique problem file *)
  12.133 -    val destdir' = ! destdir
  12.134 -    val problem_name' = ! problem_name
  12.135 -    fun prob_pathname nr =
  12.136 -      let val probfile = Path.basic (problem_name' ^ serial_string () ^ "_" ^ string_of_int nr)
  12.137 -      in if destdir' = "" then File.tmp_path probfile
  12.138 -        else if File.exists (Path.explode (destdir'))
  12.139 -        then Path.append  (Path.explode (destdir')) probfile
  12.140 -        else error ("No such directory: " ^ destdir')
  12.141 -      end
  12.142 -
  12.143      (* get clauses and prepare them for writing *)
  12.144      val (ctxt, (chain_ths, th)) = goal
  12.145      val thy = ProofContext.theory_of ctxt
  12.146 @@ -78,6 +128,17 @@
  12.147      val (thm_names, clauses) =
  12.148        preparer goal_cls chain_ths the_axiom_clauses the_filtered_clauses thy
  12.149  
  12.150 +    (* path to unique problem file *)
  12.151 +    val destdir' = Config.get ctxt destdir
  12.152 +    val problem_prefix' = Config.get ctxt problem_prefix
  12.153 +    fun prob_pathname nr =
  12.154 +      let val probfile = Path.basic (problem_prefix' ^ serial_string () ^ "_" ^ string_of_int nr)
  12.155 +      in if destdir' = "" then File.tmp_path probfile
  12.156 +        else if File.exists (Path.explode (destdir'))
  12.157 +        then Path.append  (Path.explode (destdir')) probfile
  12.158 +        else error ("No such directory: " ^ destdir')
  12.159 +      end
  12.160 +
  12.161      (* write out problem file and call prover *)
  12.162      fun cmd_line probfile = "TIMEFORMAT='%3U'; { time " ^ space_implode " "
  12.163        [File.shell_path cmd, args, File.platform_path probfile] ^ " ; } 2>&1"
  12.164 @@ -110,97 +171,100 @@
  12.165      (* check for success and print out some information on failure *)
  12.166      val failure = find_failure proof
  12.167      val success = rc = 0 andalso is_none failure
  12.168 -    val message =
  12.169 +    val (message, real_thm_names) =
  12.170        if is_some failure then ("External prover failed.", [])
  12.171        else if rc <> 0 then ("External prover failed: " ^ proof, [])
  12.172        else apfst (fn s => "Try this command: " ^ s)
  12.173          (produce_answer name (proof, thm_names, conj_pos, ctxt, th, subgoalno))
  12.174      val _ = Output.debug (fn () => "Sledgehammer response (rc = " ^ string_of_int rc ^ "):\n" ^ proof)
  12.175 -  in (success, message, time, proof, thm_names, the_filtered_clauses) end;
  12.176 -
  12.177 +  in
  12.178 +    Prover_Result {success=success, message=message,
  12.179 +      theorem_names=real_thm_names, runtime=time, proof=proof,
  12.180 +      internal_thm_names = thm_names, filtered_clauses=the_filtered_clauses}
  12.181 +  end
  12.182  
  12.183  
  12.184 -(** common provers **)
  12.185 -
  12.186  (* generic TPTP-based provers *)
  12.187  
  12.188 -fun tptp_prover_opts_full max_new theory_const full command timeout ax_clauses fcls name n goal =
  12.189 -  external_prover
  12.190 -  (ResAtp.get_relevant max_new theory_const)
  12.191 -  (ResAtp.prepare_clauses false)
  12.192 -  (ResHolClause.tptp_write_file (AtpManager.get_full_types()))
  12.193 -  command
  12.194 -  ResReconstruct.find_failure
  12.195 -  (if full then ResReconstruct.structured_proof else ResReconstruct.lemma_list false)
  12.196 -  timeout ax_clauses fcls name n goal;
  12.197 +fun gen_tptp_prover (name, prover_config) problem timeout =
  12.198 +  let
  12.199 +    val Prover_Config {max_new_clauses, insert_theory_const,
  12.200 +      emit_structured_proof, command, arguments} = prover_config
  12.201 +    val ATP_Problem {with_full_types, subgoal, goal, axiom_clauses,
  12.202 +      filtered_clauses} = problem
  12.203 +  in
  12.204 +    external_prover
  12.205 +      (ResAtp.get_relevant max_new_clauses insert_theory_const)
  12.206 +      (ResAtp.prepare_clauses false)
  12.207 +      (ResHolClause.tptp_write_file with_full_types)
  12.208 +      command
  12.209 +      (arguments timeout)
  12.210 +      ResReconstruct.find_failure
  12.211 +      (if emit_structured_proof then ResReconstruct.structured_proof
  12.212 +        else ResReconstruct.lemma_list false)
  12.213 +      axiom_clauses
  12.214 +      filtered_clauses
  12.215 +      name
  12.216 +      subgoal
  12.217 +      goal
  12.218 +  end
  12.219  
  12.220 -(*arbitrary ATP with TPTP input/output and problemfile as last argument*)
  12.221 -fun tptp_prover_opts max_new theory_const =
  12.222 -  tptp_prover_opts_full max_new theory_const false;
  12.223 -
  12.224 -fun tptp_prover x = tptp_prover_opts 60 true x;
  12.225 +fun tptp_prover (name, config) = (name, gen_tptp_prover (name, config))
  12.226  
  12.227 -(*for structured proofs: prover must support TSTP*)
  12.228 -fun full_prover_opts max_new theory_const =
  12.229 -  tptp_prover_opts_full max_new theory_const true;
  12.230  
  12.231 -fun full_prover x = full_prover_opts 60 true x;
  12.232 -
  12.233 +(** common provers **)
  12.234  
  12.235  (* Vampire *)
  12.236  
  12.237  (*NB: Vampire does not work without explicit timelimit*)
  12.238  
  12.239 -fun vampire_opts max_new theory_const timeout = tptp_prover_opts
  12.240 -  max_new theory_const
  12.241 -  (Path.explode "$VAMPIRE_HOME/vampire",
  12.242 -    ("--output_syntax tptp --mode casc -t " ^ string_of_int timeout))
  12.243 -  timeout;
  12.244 -
  12.245 -val vampire = vampire_opts 60 false;
  12.246 +val vampire_max_new_clauses = 60
  12.247 +val vampire_insert_theory_const = false
  12.248  
  12.249 -fun vampire_opts_full max_new theory_const timeout = full_prover_opts
  12.250 -  max_new theory_const
  12.251 -  (Path.explode "$VAMPIRE_HOME/vampire",
  12.252 -    ("--output_syntax tptp --mode casc -t " ^ string_of_int timeout))
  12.253 -  timeout;
  12.254 +fun vampire_prover_config full = Prover_Config {
  12.255 +  command = Path.explode "$VAMPIRE_HOME/vampire",
  12.256 +  arguments = (fn timeout => "--output_syntax tptp --mode casc" ^
  12.257 +    " -t " ^ string_of_int timeout),
  12.258 +  max_new_clauses = vampire_max_new_clauses,
  12.259 +  insert_theory_const = vampire_insert_theory_const,
  12.260 +  emit_structured_proof = full }
  12.261  
  12.262 -val vampire_full = vampire_opts_full 60 false;
  12.263 +val vampire = tptp_prover ("vampire", vampire_prover_config false)
  12.264 +val vampire_full = tptp_prover ("vampire_full", vampire_prover_config true)
  12.265  
  12.266  
  12.267  (* E prover *)
  12.268  
  12.269 -fun eprover_opts max_new theory_const timeout = tptp_prover_opts
  12.270 -  max_new theory_const
  12.271 -  (Path.explode "$E_HOME/eproof",
  12.272 -    "--tstp-in --tstp-out -l5 -xAutoDev -tAutoDev --silent --cpu-limit=" ^ string_of_int timeout)
  12.273 -  timeout;
  12.274 -
  12.275 -val eprover = eprover_opts 100 false;
  12.276 +val eprover_max_new_clauses = 100
  12.277 +val eprover_insert_theory_const = false
  12.278  
  12.279 -fun eprover_opts_full max_new theory_const timeout = full_prover_opts
  12.280 -  max_new theory_const
  12.281 -  (Path.explode "$E_HOME/eproof",
  12.282 -    "--tstp-in --tstp-out -l5 -xAutoDev -tAutoDev --silent --cpu-limit=" ^ string_of_int timeout)
  12.283 -  timeout;
  12.284 +fun eprover_config full = Prover_Config {
  12.285 +  command = Path.explode "$E_HOME/eproof",
  12.286 +  arguments = (fn timeout => "--tstp-in --tstp-out -l5 -xAutoDev -tAutoDev" ^
  12.287 +    " --silent --cpu-limit=" ^ string_of_int timeout),
  12.288 +  max_new_clauses = eprover_max_new_clauses,
  12.289 +  insert_theory_const = eprover_insert_theory_const,
  12.290 +  emit_structured_proof = full }
  12.291  
  12.292 -val eprover_full = eprover_opts_full 100 false;
  12.293 +val eprover = tptp_prover ("e", eprover_config false)
  12.294 +val eprover_full = tptp_prover ("e_full", eprover_config true)
  12.295  
  12.296  
  12.297  (* SPASS *)
  12.298  
  12.299 -fun spass_opts max_new theory_const timeout ax_clauses fcls name n goal = external_prover
  12.300 -  (ResAtp.get_relevant max_new theory_const)
  12.301 -  (ResAtp.prepare_clauses true)
  12.302 -  (ResHolClause.dfg_write_file (AtpManager.get_full_types()))
  12.303 -  (Path.explode "$SPASS_HOME/SPASS",
  12.304 -    "-Auto -SOS=1 -PGiven=0 -PProblem=0 -Splits=0 -FullRed=0 -DocProof -TimeLimit=" ^
  12.305 -      string_of_int timeout)
  12.306 -  ResReconstruct.find_failure
  12.307 -  (ResReconstruct.lemma_list true)
  12.308 -  timeout ax_clauses fcls name n goal;
  12.309 +val spass_max_new_clauses = 40
  12.310 +val spass_insert_theory_const = true
  12.311  
  12.312 -val spass = spass_opts 40 true;
  12.313 +fun spass_config insert_theory_const = Prover_Config {
  12.314 +  command = Path.explode "$SPASS_HOME/SPASS",
  12.315 +  arguments = (fn timeout => "-Auto -SOS=1 -PGiven=0 -PProblem=0 -Splits=0" ^
  12.316 +    " -FullRed=0 -DocProof -TimeLimit=" ^ string_of_int timeout),
  12.317 +  max_new_clauses = spass_max_new_clauses,
  12.318 +  insert_theory_const = insert_theory_const,
  12.319 +  emit_structured_proof = false }
  12.320 +
  12.321 +val spass = tptp_prover ("spass", spass_config spass_insert_theory_const)
  12.322 +val spass_no_tc = tptp_prover ("spass_no_tc", spass_config false)
  12.323  
  12.324  
  12.325  (* remote prover invocation via SystemOnTPTP *)
  12.326 @@ -220,20 +284,29 @@
  12.327    get_systems ());
  12.328  
  12.329  fun get_system prefix = Synchronized.change_result systems (fn systems =>
  12.330 -  let val systems = if null systems then get_systems() else systems
  12.331 -  in (find_first (String.isPrefix prefix) systems, systems) end);
  12.332 +  (if null systems then get_systems () else systems)
  12.333 +  |> ` (find_first (String.isPrefix prefix)));
  12.334 +
  12.335 +fun get_the_system prefix =
  12.336 +  (case get_system prefix of
  12.337 +    NONE => error ("No system like " ^ quote prefix ^ " at SystemOnTPTP")
  12.338 +  | SOME sys => sys)
  12.339  
  12.340 -fun remote_prover_opts max_new theory_const args prover_prefix timeout =
  12.341 -  let val sys =
  12.342 -    case get_system prover_prefix of
  12.343 -      NONE => error ("No system like " ^ quote prover_prefix ^ " at SystemOnTPTP")
  12.344 -    | SOME sys => sys
  12.345 -  in tptp_prover_opts max_new theory_const
  12.346 -    (Path.explode "$ISABELLE_ATP_MANAGER/SystemOnTPTP",
  12.347 -      args ^ " -t " ^ string_of_int timeout ^ " -s " ^ sys) timeout
  12.348 -  end;
  12.349 +fun remote_prover_config prover_prefix args max_new insert_tc = Prover_Config {
  12.350 +  command = Path.explode "$ISABELLE_ATP_MANAGER/SystemOnTPTP",
  12.351 +  arguments = (fn timeout => args ^ " -t " ^ string_of_int timeout ^ " -s " ^
  12.352 +    get_the_system prover_prefix),
  12.353 +  max_new_clauses = max_new,
  12.354 +  insert_theory_const = insert_tc,
  12.355 +  emit_structured_proof = false }
  12.356  
  12.357 -val remote_prover = remote_prover_opts 60 false;
  12.358 +val remote_vampire = tptp_prover ("remote_vampire", remote_prover_config
  12.359 +  "Vampire---9" "" vampire_max_new_clauses vampire_insert_theory_const)
  12.360 +
  12.361 +val remote_eprover = tptp_prover ("remote_e", remote_prover_config
  12.362 +  "EP---" "" eprover_max_new_clauses eprover_insert_theory_const)
  12.363 +
  12.364 +val remote_spass = tptp_prover ("remote_spass", remote_prover_config
  12.365 +  "SPASS---" "-x" spass_max_new_clauses spass_insert_theory_const)
  12.366  
  12.367  end;
  12.368 -