src/HOL/ATP_Linkup.thy
author wenzelm
Wed Oct 03 00:02:56 2007 +0200 (2007-10-03)
changeset 24819 7d8e0a47392e
parent 24742 73b8b42a36b6
child 24827 646bdc51eb7d
permissions -rw-r--r--
modernized definitions;
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
paulson@24742
    10
imports Divides Record Hilbert_Choice Presburger Relation_Power SAT Recdef Extraction 
paulson@24742
    11
   (*It must be a parent or a child of every other theory, to prevent theory-merge errors.*)
wenzelm@21254
    12
uses
wenzelm@21254
    13
  "Tools/polyhash.ML"
paulson@21977
    14
  "Tools/res_clause.ML"
wenzelm@21254
    15
  ("Tools/res_hol_clause.ML")
wenzelm@21254
    16
  ("Tools/res_axioms.ML")
paulson@21999
    17
  ("Tools/res_reconstruct.ML")
paulson@23519
    18
  ("Tools/watcher.ML")
wenzelm@21254
    19
  ("Tools/res_atp.ML")
wenzelm@21254
    20
  ("Tools/res_atp_provers.ML")
wenzelm@21254
    21
  ("Tools/res_atp_methods.ML")
wenzelm@23444
    22
  "~~/src/Tools/Metis/metis.ML"
wenzelm@23444
    23
  ("Tools/metis_tools.ML")
wenzelm@21254
    24
begin
wenzelm@21254
    25
wenzelm@24819
    26
definition COMBI :: "'a => 'a"
wenzelm@24819
    27
  where "COMBI P == P"
wenzelm@24819
    28
wenzelm@24819
    29
definition COMBK :: "'a => 'b => 'a"
wenzelm@24819
    30
  where "COMBK P Q == P"
wenzelm@21254
    31
wenzelm@24819
    32
definition COMBB :: "('b => 'c) => ('a => 'b) => 'a => 'c"
wenzelm@24819
    33
  where "COMBB P Q R == P (Q R)"
wenzelm@21254
    34
wenzelm@24819
    35
definition COMBC :: "('a => 'b => 'c) => 'b => 'a => 'c"
wenzelm@24819
    36
  where "COMBC P Q R == P R Q"
wenzelm@21254
    37
wenzelm@24819
    38
definition COMBS :: "('a => 'b => 'c) => ('a => 'b) => 'a => 'c"
wenzelm@24819
    39
  where "COMBS P Q R == P R (Q R)"
wenzelm@21254
    40
wenzelm@24819
    41
definition COMBB' :: "('a => 'c) => ('b => 'a) => ('d => 'b) => 'd => 'c"
wenzelm@24819
    42
  where "COMBB' M P Q R == M (P (Q R))"
wenzelm@21254
    43
wenzelm@24819
    44
definition COMBC' :: "('a => 'b => 'c) => ('d => 'a) => 'b => 'd => 'c"
wenzelm@24819
    45
  where "COMBC' M P Q R == M (P R) Q"
wenzelm@21254
    46
wenzelm@24819
    47
definition COMBS' :: "('a => 'b => 'c) => ('d => 'a) => ('d => 'b) => 'd => 'c"
wenzelm@24819
    48
  where "COMBS' M P Q R == M (P R) (Q R)"
wenzelm@21254
    49
wenzelm@24819
    50
definition fequal :: "'a => 'a => bool"
wenzelm@24819
    51
  where "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
paulson@24742
   113
(*Sledgehammer*)
paulson@24742
   114
setup ResAxioms.setup
paulson@24742
   115
paulson@24742
   116
setup {*
paulson@24742
   117
  Theory.at_end ResAxioms.clause_cache_endtheory
paulson@24742
   118
*}
paulson@24742
   119
wenzelm@21254
   120
end