src/HOL/ATP_Linkup.thy
author wenzelm
Tue Oct 14 15:16:09 2008 +0200 (2008-10-14)
changeset 28585 be3c44ac3e86
parent 28573 6403f0e16269
child 28592 824f8390aaa2
permissions -rw-r--r--
tuned comments;
wenzelm@21254
     1
(*  Title:      HOL/ATP_Linkup.thy
wenzelm@21254
     2
    ID:         $Id$
wenzelm@21254
     3
    Author:     Lawrence C Paulson
wenzelm@21254
     4
    Author:     Jia Meng, NICTA
wenzelm@28483
     5
    Author:     Fabian Immler, TUM
wenzelm@21254
     6
*)
wenzelm@21254
     7
wenzelm@28477
     8
header {* The Isabelle-ATP Linkup *}
wenzelm@21254
     9
wenzelm@21254
    10
theory ATP_Linkup
haftmann@27368
    11
imports Record Hilbert_Choice
wenzelm@21254
    12
uses
wenzelm@21254
    13
  "Tools/polyhash.ML"
paulson@21977
    14
  "Tools/res_clause.ML"
wenzelm@28477
    15
  ("Tools/res_axioms.ML")
wenzelm@21254
    16
  ("Tools/res_hol_clause.ML")
paulson@21999
    17
  ("Tools/res_reconstruct.ML")
wenzelm@21254
    18
  ("Tools/res_atp.ML")
wenzelm@28477
    19
  ("Tools/atp_manager.ML")
wenzelm@28477
    20
  ("Tools/atp_thread.ML")
wenzelm@23444
    21
  "~~/src/Tools/Metis/metis.ML"
wenzelm@23444
    22
  ("Tools/metis_tools.ML")
wenzelm@21254
    23
begin
wenzelm@21254
    24
wenzelm@24819
    25
definition COMBI :: "'a => 'a"
wenzelm@24819
    26
  where "COMBI P == P"
wenzelm@24819
    27
wenzelm@24819
    28
definition COMBK :: "'a => 'b => 'a"
wenzelm@24819
    29
  where "COMBK P Q == P"
wenzelm@21254
    30
wenzelm@24819
    31
definition COMBB :: "('b => 'c) => ('a => 'b) => 'a => 'c"
wenzelm@24819
    32
  where "COMBB P Q R == P (Q R)"
wenzelm@21254
    33
wenzelm@24819
    34
definition COMBC :: "('a => 'b => 'c) => 'b => 'a => 'c"
wenzelm@24819
    35
  where "COMBC P Q R == P R Q"
wenzelm@21254
    36
wenzelm@24819
    37
definition COMBS :: "('a => 'b => 'c) => ('a => 'b) => 'a => 'c"
wenzelm@24819
    38
  where "COMBS P Q R == P R (Q R)"
wenzelm@21254
    39
wenzelm@24819
    40
definition fequal :: "'a => 'a => bool"
wenzelm@24819
    41
  where "fequal X Y == (X=Y)"
wenzelm@21254
    42
wenzelm@21254
    43
lemma fequal_imp_equal: "fequal X Y ==> X=Y"
wenzelm@21254
    44
  by (simp add: fequal_def)
wenzelm@21254
    45
wenzelm@21254
    46
lemma equal_imp_fequal: "X=Y ==> fequal X Y"
wenzelm@21254
    47
  by (simp add: fequal_def)
wenzelm@21254
    48
wenzelm@21254
    49
text{*These two represent the equivalence between Boolean equality and iff.
wenzelm@21254
    50
They can't be converted to clauses automatically, as the iff would be
wenzelm@21254
    51
expanded...*}
wenzelm@21254
    52
wenzelm@21254
    53
lemma iff_positive: "P | Q | P=Q"
wenzelm@21254
    54
by blast
wenzelm@21254
    55
wenzelm@21254
    56
lemma iff_negative: "~P | ~Q | P=Q"
wenzelm@21254
    57
by blast
wenzelm@21254
    58
paulson@24827
    59
text{*Theorems for translation to combinators*}
paulson@24827
    60
paulson@24827
    61
lemma abs_S: "(%x. (f x) (g x)) == COMBS f g"
paulson@24827
    62
apply (rule eq_reflection)
paulson@24827
    63
apply (rule ext) 
paulson@24827
    64
apply (simp add: COMBS_def) 
paulson@24827
    65
done
paulson@24827
    66
paulson@24827
    67
lemma abs_I: "(%x. x) == COMBI"
paulson@24827
    68
apply (rule eq_reflection)
paulson@24827
    69
apply (rule ext) 
paulson@24827
    70
apply (simp add: COMBI_def) 
paulson@24827
    71
done
paulson@24827
    72
paulson@24827
    73
lemma abs_K: "(%x. y) == COMBK y"
paulson@24827
    74
apply (rule eq_reflection)
paulson@24827
    75
apply (rule ext) 
paulson@24827
    76
apply (simp add: COMBK_def) 
paulson@24827
    77
done
paulson@24827
    78
paulson@24827
    79
lemma abs_B: "(%x. a (g x)) == COMBB a g"
paulson@24827
    80
apply (rule eq_reflection)
paulson@24827
    81
apply (rule ext) 
paulson@24827
    82
apply (simp add: COMBB_def) 
paulson@24827
    83
done
paulson@24827
    84
paulson@24827
    85
lemma abs_C: "(%x. (f x) b) == COMBC f b"
paulson@24827
    86
apply (rule eq_reflection)
paulson@24827
    87
apply (rule ext) 
paulson@24827
    88
apply (simp add: COMBC_def) 
paulson@24827
    89
done
paulson@24827
    90
haftmann@27368
    91
wenzelm@28585
    92
subsection {* Setup of external ATPs *}
haftmann@27368
    93
wenzelm@28477
    94
use "Tools/res_axioms.ML" setup ResAxioms.setup
paulson@24827
    95
use "Tools/res_hol_clause.ML"
wenzelm@28477
    96
use "Tools/res_reconstruct.ML" setup ResReconstruct.setup
wenzelm@21254
    97
use "Tools/res_atp.ML"
wenzelm@28573
    98
wenzelm@28477
    99
use "Tools/atp_manager.ML"
wenzelm@28483
   100
use "Tools/atp_thread.ML"
wenzelm@28483
   101
wenzelm@28483
   102
text {* basic provers *}
wenzelm@28483
   103
setup {* AtpManager.add_prover "spass" AtpThread.spass *}
wenzelm@28483
   104
setup {* AtpManager.add_prover "vampire" AtpThread.vampire *}
wenzelm@28483
   105
setup {* AtpManager.add_prover "e" AtpThread.eprover *}
wenzelm@28483
   106
wenzelm@28483
   107
text {* provers with stuctured output *}
wenzelm@28483
   108
setup {* AtpManager.add_prover "vampire_full" AtpThread.vampire_full *}
wenzelm@28483
   109
setup {* AtpManager.add_prover "e_full" AtpThread.eprover_full *}
wenzelm@28483
   110
wenzelm@28483
   111
text {* on some problems better results *}
wenzelm@28483
   112
setup {* AtpManager.add_prover "spass_no_tc" (AtpThread.spass_filter_opts 40 false) *}
wenzelm@27182
   113
wenzelm@28573
   114
text {* remote provers via SystemOnTPTP *}
wenzelm@28573
   115
setup {* AtpManager.add_prover "remote_vamp9"
wenzelm@28573
   116
  (AtpThread.remote_prover "Vampire---9.0" "jumpirefix --output_syntax tptp --mode casc -t 3600") *}
wenzelm@28573
   117
setup {* AtpManager.add_prover "remote_vamp10"
wenzelm@28573
   118
  (AtpThread.remote_prover "Vampire---10.0" "drakosha.pl 60") *}
wenzelm@28573
   119
wenzelm@23444
   120
wenzelm@23444
   121
subsection {* The Metis prover *}
wenzelm@23444
   122
wenzelm@23444
   123
use "Tools/metis_tools.ML"
wenzelm@23444
   124
setup MetisTools.setup
wenzelm@23444
   125
wenzelm@21254
   126
end