src/HOL/Sledgehammer.thy
author blanchet
Tue Aug 31 23:50:59 2010 +0200 (2010-08-31)
changeset 38988 483879af0643
parent 38606 3003ddbd46d9
child 38990 7fba3ccc755a
permissions -rw-r--r--
finished renaming
blanchet@35827
     1
(*  Title:      HOL/Sledgehammer.thy
blanchet@38027
     2
    Author:     Lawrence C. Paulson, Cambridge University Computer Laboratory
blanchet@38028
     3
    Author:     Jia Meng, Cambridge University Computer Laboratory and NICTA
blanchet@35865
     4
    Author:     Fabian Immler, TU Muenchen
blanchet@35865
     5
    Author:     Jasmin Blanchette, TU Muenchen
wenzelm@21254
     6
*)
wenzelm@21254
     7
blanchet@35827
     8
header {* Sledgehammer: Isabelle--ATP Linkup *}
wenzelm@21254
     9
blanchet@35827
    10
theory Sledgehammer
haftmann@33593
    11
imports Plain Hilbert_Choice
wenzelm@21254
    12
uses
blanchet@38047
    13
  ("Tools/ATP/async_manager.ML")
blanchet@38047
    14
  ("Tools/ATP/atp_problem.ML")
blanchet@38047
    15
  ("Tools/ATP/atp_systems.ML")
blanchet@38025
    16
  ("~~/src/Tools/Metis/metis.ML")
blanchet@37574
    17
  ("Tools/Sledgehammer/clausifier.ML")
blanchet@37569
    18
  ("Tools/Sledgehammer/meson_tactic.ML")
blanchet@37578
    19
  ("Tools/Sledgehammer/metis_clauses.ML")
blanchet@37578
    20
  ("Tools/Sledgehammer/metis_tactics.ML")
blanchet@37571
    21
  ("Tools/Sledgehammer/sledgehammer_util.ML")
blanchet@38988
    22
  ("Tools/Sledgehammer/sledgehammer_filter.ML")
blanchet@38282
    23
  ("Tools/Sledgehammer/sledgehammer_translate.ML")
blanchet@38988
    24
  ("Tools/Sledgehammer/sledgehammer_reconstruct.ML")
blanchet@38023
    25
  ("Tools/Sledgehammer/sledgehammer.ML")
blanchet@38988
    26
  ("Tools/Sledgehammer/sledgehammer_minimize.ML")
blanchet@35866
    27
  ("Tools/Sledgehammer/sledgehammer_isar.ML")
wenzelm@21254
    28
begin
wenzelm@21254
    29
blanchet@37410
    30
definition skolem_id :: "'a \<Rightarrow> 'a" where
blanchet@37410
    31
[no_atp]: "skolem_id = (\<lambda>x. x)"
blanchet@37399
    32
blanchet@36569
    33
definition COMBI :: "'a \<Rightarrow> 'a" where
blanchet@38606
    34
[no_atp]: "COMBI P = P"
wenzelm@24819
    35
blanchet@36569
    36
definition COMBK :: "'a \<Rightarrow> 'b \<Rightarrow> 'a" where
blanchet@38606
    37
[no_atp]: "COMBK P Q = P"
wenzelm@21254
    38
blanchet@36569
    39
definition COMBB :: "('b => 'c) \<Rightarrow> ('a => 'b) \<Rightarrow> 'a \<Rightarrow> 'c" where [no_atp]:
blanchet@38606
    40
"COMBB P Q R = P (Q R)"
wenzelm@21254
    41
blanchet@36569
    42
definition COMBC :: "('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'b \<Rightarrow> 'a \<Rightarrow> 'c" where
blanchet@38606
    43
[no_atp]: "COMBC P Q R = P R Q"
wenzelm@21254
    44
blanchet@36569
    45
definition COMBS :: "('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'c" where
blanchet@38606
    46
[no_atp]: "COMBS P Q R = P R (Q R)"
wenzelm@21254
    47
blanchet@36569
    48
definition fequal :: "'a \<Rightarrow> 'a \<Rightarrow> bool" where [no_atp]:
blanchet@38606
    49
"fequal X Y \<longleftrightarrow> (X = Y)"
blanchet@38606
    50
blanchet@38606
    51
lemma fequal_imp_equal [no_atp]: "\<not> fequal X Y \<or> X = Y"
blanchet@38606
    52
by (simp add: fequal_def)
wenzelm@21254
    53
blanchet@38606
    54
lemma equal_imp_fequal [no_atp]: "\<not> X = Y \<or> fequal X Y"
blanchet@38606
    55
by (simp add: fequal_def)
wenzelm@21254
    56
blanchet@38606
    57
lemma equal_imp_equal [no_atp]: "X = Y ==> X = Y"
blanchet@38606
    58
by auto
wenzelm@21254
    59
paulson@24827
    60
text{*Theorems for translation to combinators*}
paulson@24827
    61
blanchet@36569
    62
lemma abs_S [no_atp]: "\<lambda>x. (f x) (g x) \<equiv> COMBS f g"
paulson@24827
    63
apply (rule eq_reflection)
paulson@24827
    64
apply (rule ext) 
paulson@24827
    65
apply (simp add: COMBS_def) 
paulson@24827
    66
done
paulson@24827
    67
blanchet@36569
    68
lemma abs_I [no_atp]: "\<lambda>x. x \<equiv> COMBI"
paulson@24827
    69
apply (rule eq_reflection)
paulson@24827
    70
apply (rule ext) 
paulson@24827
    71
apply (simp add: COMBI_def) 
paulson@24827
    72
done
paulson@24827
    73
blanchet@36569
    74
lemma abs_K [no_atp]: "\<lambda>x. y \<equiv> COMBK y"
paulson@24827
    75
apply (rule eq_reflection)
paulson@24827
    76
apply (rule ext) 
paulson@24827
    77
apply (simp add: COMBK_def) 
paulson@24827
    78
done
paulson@24827
    79
blanchet@36569
    80
lemma abs_B [no_atp]: "\<lambda>x. a (g x) \<equiv> COMBB a g"
paulson@24827
    81
apply (rule eq_reflection)
paulson@24827
    82
apply (rule ext) 
paulson@24827
    83
apply (simp add: COMBB_def) 
paulson@24827
    84
done
paulson@24827
    85
blanchet@36569
    86
lemma abs_C [no_atp]: "\<lambda>x. (f x) b \<equiv> COMBC f b"
paulson@24827
    87
apply (rule eq_reflection)
paulson@24827
    88
apply (rule ext) 
paulson@24827
    89
apply (simp add: COMBC_def) 
paulson@24827
    90
done
paulson@24827
    91
blanchet@38047
    92
use "Tools/ATP/async_manager.ML"
blanchet@38047
    93
use "Tools/ATP/atp_problem.ML"
blanchet@38047
    94
use "Tools/ATP/atp_systems.ML"
blanchet@38025
    95
setup ATP_Systems.setup
blanchet@38025
    96
blanchet@38025
    97
use "~~/src/Tools/Metis/metis.ML"
blanchet@37574
    98
use "Tools/Sledgehammer/clausifier.ML"
blanchet@37569
    99
use "Tools/Sledgehammer/meson_tactic.ML"
blanchet@37569
   100
setup Meson_Tactic.setup
blanchet@37571
   101
blanchet@37578
   102
use "Tools/Sledgehammer/metis_clauses.ML"
blanchet@37578
   103
use "Tools/Sledgehammer/metis_tactics.ML"
blanchet@37578
   104
blanchet@37571
   105
use "Tools/Sledgehammer/sledgehammer_util.ML"
blanchet@38988
   106
use "Tools/Sledgehammer/sledgehammer_filter.ML"
blanchet@38282
   107
use "Tools/Sledgehammer/sledgehammer_translate.ML"
blanchet@38988
   108
use "Tools/Sledgehammer/sledgehammer_reconstruct.ML"
blanchet@38023
   109
use "Tools/Sledgehammer/sledgehammer.ML"
blanchet@38023
   110
setup Sledgehammer.setup
blanchet@38988
   111
use "Tools/Sledgehammer/sledgehammer_minimize.ML"
blanchet@35866
   112
use "Tools/Sledgehammer/sledgehammer_isar.ML"
blanchet@35826
   113
setup Metis_Tactics.setup
wenzelm@23444
   114
wenzelm@21254
   115
end