src/HOL/ATP_Linkup.thy
author paulson
Thu Sep 27 17:55:28 2007 +0200 (2007-09-27)
changeset 24742 73b8b42a36b6
parent 24318 2477286fcc7e
child 24819 7d8e0a47392e
permissions -rw-r--r--
removal of some "ref"s from res_axioms.ML; a side-effect is that the ordering
theorems of Nat.thy are hidden by the Ordering.thy versions
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@21254
    26
constdefs
wenzelm@21254
    27
  COMBI :: "'a => 'a"
wenzelm@21254
    28
    "COMBI P == P"
wenzelm@21254
    29
wenzelm@21254
    30
  COMBK :: "'a => 'b => 'a"
wenzelm@21254
    31
    "COMBK P Q == P"
wenzelm@21254
    32
wenzelm@21254
    33
  COMBB :: "('b => 'c) => ('a => 'b) => 'a => 'c"
wenzelm@21254
    34
    "COMBB P Q R == P (Q R)"
wenzelm@21254
    35
wenzelm@21254
    36
  COMBC :: "('a => 'b => 'c) => 'b => 'a => 'c"
wenzelm@21254
    37
    "COMBC P Q R == P R Q"
wenzelm@21254
    38
wenzelm@21254
    39
  COMBS :: "('a => 'b => 'c) => ('a => 'b) => 'a => 'c"
wenzelm@21254
    40
    "COMBS P Q R == P R (Q R)"
wenzelm@21254
    41
wenzelm@21254
    42
  COMBB' :: "('a => 'c) => ('b => 'a) => ('d => 'b) => 'd => 'c"
wenzelm@21254
    43
    "COMBB' M P Q R == M (P (Q R))"
wenzelm@21254
    44
wenzelm@21254
    45
  COMBC' :: "('a => 'b => 'c) => ('d => 'a) => 'b => 'd => 'c"
wenzelm@21254
    46
    "COMBC' M P Q R == M (P R) Q"
wenzelm@21254
    47
wenzelm@21254
    48
  COMBS' :: "('a => 'b => 'c) => ('d => 'a) => ('d => 'b) => 'd => 'c"
wenzelm@21254
    49
    "COMBS' M P Q R == M (P R) (Q R)"
wenzelm@21254
    50
wenzelm@21254
    51
  fequal :: "'a => 'a => bool"
wenzelm@21254
    52
    "fequal X Y == (X=Y)"
wenzelm@21254
    53
wenzelm@21254
    54
lemma fequal_imp_equal: "fequal X Y ==> X=Y"
wenzelm@21254
    55
  by (simp add: fequal_def)
wenzelm@21254
    56
wenzelm@21254
    57
lemma equal_imp_fequal: "X=Y ==> fequal X Y"
wenzelm@21254
    58
  by (simp add: fequal_def)
wenzelm@21254
    59
wenzelm@21254
    60
lemma K_simp: "COMBK P == (%Q. P)"
wenzelm@21254
    61
apply (rule eq_reflection)
wenzelm@21254
    62
apply (rule ext)
wenzelm@21254
    63
apply (simp add: COMBK_def)
wenzelm@21254
    64
done
wenzelm@21254
    65
wenzelm@21254
    66
lemma I_simp: "COMBI == (%P. P)"
wenzelm@21254
    67
apply (rule eq_reflection)
wenzelm@21254
    68
apply (rule ext)
wenzelm@21254
    69
apply (simp add: COMBI_def)
wenzelm@21254
    70
done
wenzelm@21254
    71
wenzelm@21254
    72
lemma B_simp: "COMBB P Q == %R. P (Q R)"
wenzelm@21254
    73
apply (rule eq_reflection)
wenzelm@21254
    74
apply (rule ext)
wenzelm@21254
    75
apply (simp add: COMBB_def)
wenzelm@21254
    76
done
wenzelm@21254
    77
wenzelm@21254
    78
text{*These two represent the equivalence between Boolean equality and iff.
wenzelm@21254
    79
They can't be converted to clauses automatically, as the iff would be
wenzelm@21254
    80
expanded...*}
wenzelm@21254
    81
wenzelm@21254
    82
lemma iff_positive: "P | Q | P=Q"
wenzelm@21254
    83
by blast
wenzelm@21254
    84
wenzelm@21254
    85
lemma iff_negative: "~P | ~Q | P=Q"
wenzelm@21254
    86
by blast
wenzelm@21254
    87
paulson@21999
    88
use "Tools/res_axioms.ML"      --{*requires the combinators declared above*}
paulson@21999
    89
use "Tools/res_hol_clause.ML"  --{*requires the combinators*}
paulson@21999
    90
use "Tools/res_reconstruct.ML"
paulson@23519
    91
use "Tools/watcher.ML"
wenzelm@21254
    92
use "Tools/res_atp.ML"
wenzelm@21254
    93
wenzelm@21254
    94
setup ResAxioms.meson_method_setup
wenzelm@21254
    95
wenzelm@21254
    96
wenzelm@21254
    97
subsection {* Setup for Vampire, E prover and SPASS *}
wenzelm@21254
    98
wenzelm@21254
    99
use "Tools/res_atp_provers.ML"
wenzelm@21254
   100
wenzelm@21254
   101
oracle vampire_oracle ("string * int") = {* ResAtpProvers.vampire_o *}
wenzelm@21254
   102
oracle eprover_oracle ("string * int") = {* ResAtpProvers.eprover_o *}
wenzelm@21254
   103
oracle spass_oracle ("string * int") = {* ResAtpProvers.spass_o *}
wenzelm@21254
   104
wenzelm@21254
   105
use "Tools/res_atp_methods.ML"
wenzelm@24318
   106
setup ResAtpMethods.setup
wenzelm@21254
   107
wenzelm@23444
   108
wenzelm@23444
   109
subsection {* The Metis prover *}
wenzelm@23444
   110
wenzelm@23444
   111
use "Tools/metis_tools.ML"
wenzelm@23444
   112
setup MetisTools.setup
wenzelm@23444
   113
paulson@24742
   114
(*Sledgehammer*)
paulson@24742
   115
setup ResAxioms.setup
paulson@24742
   116
paulson@24742
   117
setup {*
paulson@24742
   118
  Theory.at_end ResAxioms.clause_cache_endtheory
paulson@24742
   119
*}
paulson@24742
   120
wenzelm@21254
   121
end