src/HOL/ATP_Linkup.thy
author haftmann
Fri Apr 20 11:21:42 2007 +0200 (2007-04-20)
changeset 22744 5cbe966d67a2
parent 21999 0cf192e489e2
child 23444 6d4703843f93
permissions -rw-r--r--
Isar definitions are now added explicitly to code theorem table
     1 (*  Title:      HOL/ATP_Linkup.thy
     2     ID:         $Id$
     3     Author:     Lawrence C Paulson
     4     Author:     Jia Meng, NICTA
     5 *)
     6 
     7 header{* The Isabelle-ATP Linkup *}
     8 
     9 theory ATP_Linkup
    10 imports Map Hilbert_Choice
    11 uses
    12   "Tools/polyhash.ML"
    13   "Tools/res_clause.ML"
    14   "Tools/ATP/reduce_axiomsN.ML"
    15   ("Tools/res_hol_clause.ML")
    16   ("Tools/res_axioms.ML")
    17   ("Tools/res_reconstruct.ML")
    18   ("Tools/ATP/watcher.ML")
    19   ("Tools/res_atp.ML")
    20   ("Tools/res_atp_provers.ML")
    21   ("Tools/res_atp_methods.ML")
    22 begin
    23 
    24 constdefs
    25   COMBI :: "'a => 'a"
    26     "COMBI P == P"
    27 
    28   COMBK :: "'a => 'b => 'a"
    29     "COMBK P Q == P"
    30 
    31   COMBB :: "('b => 'c) => ('a => 'b) => 'a => 'c"
    32     "COMBB P Q R == P (Q R)"
    33 
    34   COMBC :: "('a => 'b => 'c) => 'b => 'a => 'c"
    35     "COMBC P Q R == P R Q"
    36 
    37   COMBS :: "('a => 'b => 'c) => ('a => 'b) => 'a => 'c"
    38     "COMBS P Q R == P R (Q R)"
    39 
    40   COMBB' :: "('a => 'c) => ('b => 'a) => ('d => 'b) => 'd => 'c"
    41     "COMBB' M P Q R == M (P (Q R))"
    42 
    43   COMBC' :: "('a => 'b => 'c) => ('d => 'a) => 'b => 'd => 'c"
    44     "COMBC' M P Q R == M (P R) Q"
    45 
    46   COMBS' :: "('a => 'b => 'c) => ('d => 'a) => ('d => 'b) => 'd => 'c"
    47     "COMBS' M P Q R == M (P R) (Q R)"
    48 
    49   fequal :: "'a => 'a => bool"
    50     "fequal X Y == (X=Y)"
    51 
    52 lemma fequal_imp_equal: "fequal X Y ==> X=Y"
    53   by (simp add: fequal_def)
    54 
    55 lemma equal_imp_fequal: "X=Y ==> fequal X Y"
    56   by (simp add: fequal_def)
    57 
    58 lemma K_simp: "COMBK P == (%Q. P)"
    59 apply (rule eq_reflection)
    60 apply (rule ext)
    61 apply (simp add: COMBK_def)
    62 done
    63 
    64 lemma I_simp: "COMBI == (%P. P)"
    65 apply (rule eq_reflection)
    66 apply (rule ext)
    67 apply (simp add: COMBI_def)
    68 done
    69 
    70 lemma B_simp: "COMBB P Q == %R. P (Q R)"
    71 apply (rule eq_reflection)
    72 apply (rule ext)
    73 apply (simp add: COMBB_def)
    74 done
    75 
    76 text{*These two represent the equivalence between Boolean equality and iff.
    77 They can't be converted to clauses automatically, as the iff would be
    78 expanded...*}
    79 
    80 lemma iff_positive: "P | Q | P=Q"
    81 by blast
    82 
    83 lemma iff_negative: "~P | ~Q | P=Q"
    84 by blast
    85 
    86 use "Tools/res_axioms.ML"      --{*requires the combinators declared above*}
    87 use "Tools/res_hol_clause.ML"  --{*requires the combinators*}
    88 use "Tools/res_reconstruct.ML"
    89 use "Tools/ATP/watcher.ML"
    90 use "Tools/res_atp.ML"
    91 
    92 setup ResAxioms.meson_method_setup
    93 
    94 
    95 subsection {* Setup for Vampire, E prover and SPASS *}
    96 
    97 use "Tools/res_atp_provers.ML"
    98 
    99 oracle vampire_oracle ("string * int") = {* ResAtpProvers.vampire_o *}
   100 oracle eprover_oracle ("string * int") = {* ResAtpProvers.eprover_o *}
   101 oracle spass_oracle ("string * int") = {* ResAtpProvers.spass_o *}
   102 
   103 use "Tools/res_atp_methods.ML"
   104 setup ResAtpMethods.ResAtps_setup
   105 
   106 end