src/HOL/ATP_Linkup.thy
author wenzelm
Sat Aug 18 13:32:18 2007 +0200 (2007-08-18)
changeset 24318 2477286fcc7e
parent 24288 4016baca4973
child 24742 73b8b42a36b6
permissions -rw-r--r--
renamed ResAtpMethods.setup;
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@21254
     5
*)
wenzelm@21254
     6
wenzelm@21254
     7
header{* The Isabelle-ATP Linkup *}
wenzelm@21254
     8
wenzelm@21254
     9
theory ATP_Linkup
haftmann@24161
    10
imports Divides Record Hilbert_Choice
wenzelm@21254
    11
uses
wenzelm@21254
    12
  "Tools/polyhash.ML"
paulson@21977
    13
  "Tools/res_clause.ML"
wenzelm@21254
    14
  ("Tools/res_hol_clause.ML")
wenzelm@21254
    15
  ("Tools/res_axioms.ML")
paulson@21999
    16
  ("Tools/res_reconstruct.ML")
paulson@23519
    17
  ("Tools/watcher.ML")
wenzelm@21254
    18
  ("Tools/res_atp.ML")
wenzelm@21254
    19
  ("Tools/res_atp_provers.ML")
wenzelm@21254
    20
  ("Tools/res_atp_methods.ML")
wenzelm@23444
    21
  "~~/src/Tools/Metis/metis.ML"
wenzelm@23444
    22
  ("Tools/metis_tools.ML")
wenzelm@21254
    23
begin
wenzelm@21254
    24
wenzelm@21254
    25
constdefs
wenzelm@21254
    26
  COMBI :: "'a => 'a"
wenzelm@21254
    27
    "COMBI P == P"
wenzelm@21254
    28
wenzelm@21254
    29
  COMBK :: "'a => 'b => 'a"
wenzelm@21254
    30
    "COMBK P Q == P"
wenzelm@21254
    31
wenzelm@21254
    32
  COMBB :: "('b => 'c) => ('a => 'b) => 'a => 'c"
wenzelm@21254
    33
    "COMBB P Q R == P (Q R)"
wenzelm@21254
    34
wenzelm@21254
    35
  COMBC :: "('a => 'b => 'c) => 'b => 'a => 'c"
wenzelm@21254
    36
    "COMBC P Q R == P R Q"
wenzelm@21254
    37
wenzelm@21254
    38
  COMBS :: "('a => 'b => 'c) => ('a => 'b) => 'a => 'c"
wenzelm@21254
    39
    "COMBS P Q R == P R (Q R)"
wenzelm@21254
    40
wenzelm@21254
    41
  COMBB' :: "('a => 'c) => ('b => 'a) => ('d => 'b) => 'd => 'c"
wenzelm@21254
    42
    "COMBB' M P Q R == M (P (Q R))"
wenzelm@21254
    43
wenzelm@21254
    44
  COMBC' :: "('a => 'b => 'c) => ('d => 'a) => 'b => 'd => 'c"
wenzelm@21254
    45
    "COMBC' M P Q R == M (P R) Q"
wenzelm@21254
    46
wenzelm@21254
    47
  COMBS' :: "('a => 'b => 'c) => ('d => 'a) => ('d => 'b) => 'd => 'c"
wenzelm@21254
    48
    "COMBS' M P Q R == M (P R) (Q R)"
wenzelm@21254
    49
wenzelm@21254
    50
  fequal :: "'a => 'a => bool"
wenzelm@21254
    51
    "fequal X Y == (X=Y)"
wenzelm@21254
    52
wenzelm@21254
    53
lemma fequal_imp_equal: "fequal X Y ==> X=Y"
wenzelm@21254
    54
  by (simp add: fequal_def)
wenzelm@21254
    55
wenzelm@21254
    56
lemma equal_imp_fequal: "X=Y ==> fequal X Y"
wenzelm@21254
    57
  by (simp add: fequal_def)
wenzelm@21254
    58
wenzelm@21254
    59
lemma K_simp: "COMBK P == (%Q. P)"
wenzelm@21254
    60
apply (rule eq_reflection)
wenzelm@21254
    61
apply (rule ext)
wenzelm@21254
    62
apply (simp add: COMBK_def)
wenzelm@21254
    63
done
wenzelm@21254
    64
wenzelm@21254
    65
lemma I_simp: "COMBI == (%P. P)"
wenzelm@21254
    66
apply (rule eq_reflection)
wenzelm@21254
    67
apply (rule ext)
wenzelm@21254
    68
apply (simp add: COMBI_def)
wenzelm@21254
    69
done
wenzelm@21254
    70
wenzelm@21254
    71
lemma B_simp: "COMBB P Q == %R. P (Q R)"
wenzelm@21254
    72
apply (rule eq_reflection)
wenzelm@21254
    73
apply (rule ext)
wenzelm@21254
    74
apply (simp add: COMBB_def)
wenzelm@21254
    75
done
wenzelm@21254
    76
wenzelm@21254
    77
text{*These two represent the equivalence between Boolean equality and iff.
wenzelm@21254
    78
They can't be converted to clauses automatically, as the iff would be
wenzelm@21254
    79
expanded...*}
wenzelm@21254
    80
wenzelm@21254
    81
lemma iff_positive: "P | Q | P=Q"
wenzelm@21254
    82
by blast
wenzelm@21254
    83
wenzelm@21254
    84
lemma iff_negative: "~P | ~Q | P=Q"
wenzelm@21254
    85
by blast
wenzelm@21254
    86
paulson@21999
    87
use "Tools/res_axioms.ML"      --{*requires the combinators declared above*}
paulson@21999
    88
use "Tools/res_hol_clause.ML"  --{*requires the combinators*}
paulson@21999
    89
use "Tools/res_reconstruct.ML"
paulson@23519
    90
use "Tools/watcher.ML"
wenzelm@21254
    91
use "Tools/res_atp.ML"
wenzelm@21254
    92
wenzelm@21254
    93
setup ResAxioms.meson_method_setup
wenzelm@21254
    94
wenzelm@21254
    95
wenzelm@21254
    96
subsection {* Setup for Vampire, E prover and SPASS *}
wenzelm@21254
    97
wenzelm@21254
    98
use "Tools/res_atp_provers.ML"
wenzelm@21254
    99
wenzelm@21254
   100
oracle vampire_oracle ("string * int") = {* ResAtpProvers.vampire_o *}
wenzelm@21254
   101
oracle eprover_oracle ("string * int") = {* ResAtpProvers.eprover_o *}
wenzelm@21254
   102
oracle spass_oracle ("string * int") = {* ResAtpProvers.spass_o *}
wenzelm@21254
   103
wenzelm@21254
   104
use "Tools/res_atp_methods.ML"
wenzelm@24318
   105
setup ResAtpMethods.setup
wenzelm@21254
   106
wenzelm@23444
   107
wenzelm@23444
   108
subsection {* The Metis prover *}
wenzelm@23444
   109
wenzelm@23444
   110
use "Tools/metis_tools.ML"
wenzelm@23444
   111
setup MetisTools.setup
wenzelm@23444
   112
wenzelm@21254
   113
end