| author | wenzelm | 
| Wed, 30 Sep 2009 11:45:42 +0200 | |
| changeset 32777 | 8ae3a48c69d9 | 
| parent 32327 | 0971cc0b6a57 | 
| child 32864 | a226f29d4bdc | 
| permissions | -rw-r--r-- | 
| 
21254
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
1  | 
(* Title: HOL/ATP_Linkup.thy  | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
2  | 
Author: Lawrence C Paulson  | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
3  | 
Author: Jia Meng, NICTA  | 
| 28483 | 4  | 
Author: Fabian Immler, TUM  | 
| 
21254
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
5  | 
*)  | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
6  | 
|
| 
28477
 
9339d4dcec8b
version of sledgehammer using threads instead of processes, misc cleanup;
 
wenzelm 
parents: 
28476 
diff
changeset
 | 
7  | 
header {* The Isabelle-ATP Linkup *}
 | 
| 
21254
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
8  | 
|
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
9  | 
theory ATP_Linkup  | 
| 
29654
 
24e73987bfe2
Plain, Main form meeting points in import hierarchy
 
haftmann 
parents: 
29611 
diff
changeset
 | 
10  | 
imports Divides Record Hilbert_Choice Plain  | 
| 
21254
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
11  | 
uses  | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
12  | 
"Tools/polyhash.ML"  | 
| 21977 | 13  | 
"Tools/res_clause.ML"  | 
| 
28477
 
9339d4dcec8b
version of sledgehammer using threads instead of processes, misc cleanup;
 
wenzelm 
parents: 
28476 
diff
changeset
 | 
14  | 
  ("Tools/res_axioms.ML")
 | 
| 
21254
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
15  | 
  ("Tools/res_hol_clause.ML")
 | 
| 
21999
 
0cf192e489e2
improvements to proof reconstruction. Some files loaded in a different order
 
paulson 
parents: 
21977 
diff
changeset
 | 
16  | 
  ("Tools/res_reconstruct.ML")
 | 
| 
21254
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
17  | 
  ("Tools/res_atp.ML")
 | 
| 
32327
 
0971cc0b6a57
src/HOL/Tools/ATP_Manager as separate component, with (almost) everything in one place;
 
wenzelm 
parents: 
31835 
diff
changeset
 | 
18  | 
  ("Tools/ATP_Manager/atp_manager.ML")
 | 
| 
 
0971cc0b6a57
src/HOL/Tools/ATP_Manager as separate component, with (almost) everything in one place;
 
wenzelm 
parents: 
31835 
diff
changeset
 | 
19  | 
  ("Tools/ATP_Manager/atp_wrapper.ML")
 | 
| 
 
0971cc0b6a57
src/HOL/Tools/ATP_Manager as separate component, with (almost) everything in one place;
 
wenzelm 
parents: 
31835 
diff
changeset
 | 
20  | 
  ("Tools/ATP_Manager/atp_minimal.ML")
 | 
| 23444 | 21  | 
"~~/src/Tools/Metis/metis.ML"  | 
22  | 
  ("Tools/metis_tools.ML")
 | 
|
| 
21254
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
23  | 
begin  | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
24  | 
|
| 24819 | 25  | 
definition COMBI :: "'a => 'a"  | 
26  | 
where "COMBI P == P"  | 
|
27  | 
||
28  | 
definition COMBK :: "'a => 'b => 'a"  | 
|
29  | 
where "COMBK P Q == P"  | 
|
| 
21254
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
30  | 
|
| 24819 | 31  | 
definition COMBB :: "('b => 'c) => ('a => 'b) => 'a => 'c"
 | 
32  | 
where "COMBB P Q R == P (Q R)"  | 
|
| 
21254
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
33  | 
|
| 24819 | 34  | 
definition COMBC :: "('a => 'b => 'c) => 'b => 'a => 'c"
 | 
35  | 
where "COMBC P Q R == P R Q"  | 
|
| 
21254
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
36  | 
|
| 24819 | 37  | 
definition COMBS :: "('a => 'b => 'c) => ('a => 'b) => 'a => 'c"
 | 
38  | 
where "COMBS P Q R == P R (Q R)"  | 
|
| 
21254
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
39  | 
|
| 24819 | 40  | 
definition fequal :: "'a => 'a => bool"  | 
41  | 
where "fequal X Y == (X=Y)"  | 
|
| 
21254
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
42  | 
|
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
43  | 
lemma fequal_imp_equal: "fequal X Y ==> X=Y"  | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
44  | 
by (simp add: fequal_def)  | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
45  | 
|
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
46  | 
lemma equal_imp_fequal: "X=Y ==> fequal X Y"  | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
47  | 
by (simp add: fequal_def)  | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
48  | 
|
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
49  | 
text{*These two represent the equivalence between Boolean equality and iff.
 | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
50  | 
They can't be converted to clauses automatically, as the iff would be  | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
51  | 
expanded...*}  | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
52  | 
|
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
53  | 
lemma iff_positive: "P | Q | P=Q"  | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
54  | 
by blast  | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
55  | 
|
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
56  | 
lemma iff_negative: "~P | ~Q | P=Q"  | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
57  | 
by blast  | 
| 
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
58  | 
|
| 24827 | 59  | 
text{*Theorems for translation to combinators*}
 | 
60  | 
||
61  | 
lemma abs_S: "(%x. (f x) (g x)) == COMBS f g"  | 
|
62  | 
apply (rule eq_reflection)  | 
|
63  | 
apply (rule ext)  | 
|
64  | 
apply (simp add: COMBS_def)  | 
|
65  | 
done  | 
|
66  | 
||
67  | 
lemma abs_I: "(%x. x) == COMBI"  | 
|
68  | 
apply (rule eq_reflection)  | 
|
69  | 
apply (rule ext)  | 
|
70  | 
apply (simp add: COMBI_def)  | 
|
71  | 
done  | 
|
72  | 
||
73  | 
lemma abs_K: "(%x. y) == COMBK y"  | 
|
74  | 
apply (rule eq_reflection)  | 
|
75  | 
apply (rule ext)  | 
|
76  | 
apply (simp add: COMBK_def)  | 
|
77  | 
done  | 
|
78  | 
||
79  | 
lemma abs_B: "(%x. a (g x)) == COMBB a g"  | 
|
80  | 
apply (rule eq_reflection)  | 
|
81  | 
apply (rule ext)  | 
|
82  | 
apply (simp add: COMBB_def)  | 
|
83  | 
done  | 
|
84  | 
||
85  | 
lemma abs_C: "(%x. (f x) b) == COMBC f b"  | 
|
86  | 
apply (rule eq_reflection)  | 
|
87  | 
apply (rule ext)  | 
|
88  | 
apply (simp add: COMBC_def)  | 
|
89  | 
done  | 
|
90  | 
||
| 27368 | 91  | 
|
| 28585 | 92  | 
subsection {* Setup of external ATPs *}
 | 
| 27368 | 93  | 
|
| 
28477
 
9339d4dcec8b
version of sledgehammer using threads instead of processes, misc cleanup;
 
wenzelm 
parents: 
28476 
diff
changeset
 | 
94  | 
use "Tools/res_axioms.ML" setup ResAxioms.setup  | 
| 24827 | 95  | 
use "Tools/res_hol_clause.ML"  | 
| 
28477
 
9339d4dcec8b
version of sledgehammer using threads instead of processes, misc cleanup;
 
wenzelm 
parents: 
28476 
diff
changeset
 | 
96  | 
use "Tools/res_reconstruct.ML" setup ResReconstruct.setup  | 
| 
21254
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
97  | 
use "Tools/res_atp.ML"  | 
| 28573 | 98  | 
|
| 
32327
 
0971cc0b6a57
src/HOL/Tools/ATP_Manager as separate component, with (almost) everything in one place;
 
wenzelm 
parents: 
31835 
diff
changeset
 | 
99  | 
use "Tools/ATP_Manager/atp_manager.ML"  | 
| 
 
0971cc0b6a57
src/HOL/Tools/ATP_Manager as separate component, with (almost) everything in one place;
 
wenzelm 
parents: 
31835 
diff
changeset
 | 
100  | 
use "Tools/ATP_Manager/atp_wrapper.ML"  | 
| 
 
0971cc0b6a57
src/HOL/Tools/ATP_Manager as separate component, with (almost) everything in one place;
 
wenzelm 
parents: 
31835 
diff
changeset
 | 
101  | 
use "Tools/ATP_Manager/atp_minimal.ML"  | 
| 
31037
 
ac8669134e7a
added Philipp Meyer's implementation of AtpMinimal
 
immler@in.tum.de 
parents: 
29654 
diff
changeset
 | 
102  | 
|
| 28483 | 103  | 
text {* basic provers *}
 | 
| 28592 | 104  | 
setup {* AtpManager.add_prover "spass" AtpWrapper.spass *}
 | 
105  | 
setup {* AtpManager.add_prover "vampire" AtpWrapper.vampire *}
 | 
|
106  | 
setup {* AtpManager.add_prover "e" AtpWrapper.eprover *}
 | 
|
| 28483 | 107  | 
|
108  | 
text {* provers with stuctured output *}
 | 
|
| 28592 | 109  | 
setup {* AtpManager.add_prover "vampire_full" AtpWrapper.vampire_full *}
 | 
110  | 
setup {* AtpManager.add_prover "e_full" AtpWrapper.eprover_full *}
 | 
|
| 28483 | 111  | 
|
112  | 
text {* on some problems better results *}
 | 
|
| 28594 | 113  | 
setup {* AtpManager.add_prover "spass_no_tc" (AtpWrapper.spass_opts 40 false) *}
 | 
| 27182 | 114  | 
|
| 28573 | 115  | 
text {* remote provers via SystemOnTPTP *}
 | 
| 29590 | 116  | 
setup {* AtpManager.add_prover "remote_vampire"
 | 
| 31835 | 117  | 
(AtpWrapper.remote_prover_opts 60 false "" "Vampire---9") *}  | 
| 
29587
 
96599d8d8268
simplified usage of remote-script; added compatible remote-atps
 
immler@in.tum.de 
parents: 
28594 
diff
changeset
 | 
118  | 
setup {* AtpManager.add_prover "remote_spass"
 | 
| 31835 | 119  | 
(AtpWrapper.remote_prover_opts 40 true "-x" "SPASS---") *}  | 
| 
29587
 
96599d8d8268
simplified usage of remote-script; added compatible remote-atps
 
immler@in.tum.de 
parents: 
28594 
diff
changeset
 | 
120  | 
setup {* AtpManager.add_prover "remote_e"
 | 
| 31835 | 121  | 
(AtpWrapper.remote_prover_opts 100 false "" "EP---") *}  | 
| 
29587
 
96599d8d8268
simplified usage of remote-script; added compatible remote-atps
 
immler@in.tum.de 
parents: 
28594 
diff
changeset
 | 
122  | 
|
| 28573 | 123  | 
|
| 23444 | 124  | 
|
125  | 
subsection {* The Metis prover *}
 | 
|
126  | 
||
127  | 
use "Tools/metis_tools.ML"  | 
|
128  | 
setup MetisTools.setup  | 
|
129  | 
||
| 
21254
 
d53f76357f41
incorporated former theories Reconstruction and ResAtpMethods into ATP_Linkup;
 
wenzelm 
parents:  
diff
changeset
 | 
130  | 
end  |