src/HOL/Sledgehammer.thy
author blanchet
Wed Jul 28 19:04:59 2010 +0200 (2010-07-28)
changeset 38047 9033c03cc214
parent 38028 22dcaec5fa77
child 38282 319c59682c51
permissions -rw-r--r--
consequence of directory renaming
     1 (*  Title:      HOL/Sledgehammer.thy
     2     Author:     Lawrence C. Paulson, Cambridge University Computer Laboratory
     3     Author:     Jia Meng, Cambridge University Computer Laboratory and NICTA
     4     Author:     Fabian Immler, TU Muenchen
     5     Author:     Jasmin Blanchette, TU Muenchen
     6 *)
     7 
     8 header {* Sledgehammer: Isabelle--ATP Linkup *}
     9 
    10 theory Sledgehammer
    11 imports Plain Hilbert_Choice
    12 uses
    13   ("Tools/ATP/async_manager.ML")
    14   ("Tools/ATP/atp_problem.ML")
    15   ("Tools/ATP/atp_systems.ML")
    16   ("~~/src/Tools/Metis/metis.ML")
    17   ("Tools/Sledgehammer/clausifier.ML")
    18   ("Tools/Sledgehammer/meson_tactic.ML")
    19   ("Tools/Sledgehammer/metis_clauses.ML")
    20   ("Tools/Sledgehammer/metis_tactics.ML")
    21   ("Tools/Sledgehammer/sledgehammer_util.ML")
    22   ("Tools/Sledgehammer/sledgehammer_fact_filter.ML")
    23   ("Tools/Sledgehammer/sledgehammer_proof_reconstruct.ML")
    24   ("Tools/Sledgehammer/sledgehammer.ML")
    25   ("Tools/Sledgehammer/sledgehammer_fact_minimizer.ML")
    26   ("Tools/Sledgehammer/sledgehammer_isar.ML")
    27 begin
    28 
    29 definition skolem_id :: "'a \<Rightarrow> 'a" where
    30 [no_atp]: "skolem_id = (\<lambda>x. x)"
    31 
    32 definition COMBI :: "'a \<Rightarrow> 'a" where
    33 [no_atp]: "COMBI P \<equiv> P"
    34 
    35 definition COMBK :: "'a \<Rightarrow> 'b \<Rightarrow> 'a" where
    36 [no_atp]: "COMBK P Q \<equiv> P"
    37 
    38 definition COMBB :: "('b => 'c) \<Rightarrow> ('a => 'b) \<Rightarrow> 'a \<Rightarrow> 'c" where [no_atp]:
    39 "COMBB P Q R \<equiv> P (Q R)"
    40 
    41 definition COMBC :: "('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'b \<Rightarrow> 'a \<Rightarrow> 'c" where
    42 [no_atp]: "COMBC P Q R \<equiv> P R Q"
    43 
    44 definition COMBS :: "('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'c" where
    45 [no_atp]: "COMBS P Q R \<equiv> P R (Q R)"
    46 
    47 definition fequal :: "'a \<Rightarrow> 'a \<Rightarrow> bool" where [no_atp]:
    48 "fequal X Y \<equiv> (X = Y)"
    49 
    50 lemma fequal_imp_equal [no_atp]: "fequal X Y \<Longrightarrow> X = Y"
    51   by (simp add: fequal_def)
    52 
    53 lemma equal_imp_fequal [no_atp]: "X = Y \<Longrightarrow> fequal X Y"
    54   by (simp add: fequal_def)
    55 
    56 text{*Theorems for translation to combinators*}
    57 
    58 lemma abs_S [no_atp]: "\<lambda>x. (f x) (g x) \<equiv> COMBS f g"
    59 apply (rule eq_reflection)
    60 apply (rule ext) 
    61 apply (simp add: COMBS_def) 
    62 done
    63 
    64 lemma abs_I [no_atp]: "\<lambda>x. x \<equiv> COMBI"
    65 apply (rule eq_reflection)
    66 apply (rule ext) 
    67 apply (simp add: COMBI_def) 
    68 done
    69 
    70 lemma abs_K [no_atp]: "\<lambda>x. y \<equiv> COMBK y"
    71 apply (rule eq_reflection)
    72 apply (rule ext) 
    73 apply (simp add: COMBK_def) 
    74 done
    75 
    76 lemma abs_B [no_atp]: "\<lambda>x. a (g x) \<equiv> COMBB a g"
    77 apply (rule eq_reflection)
    78 apply (rule ext) 
    79 apply (simp add: COMBB_def) 
    80 done
    81 
    82 lemma abs_C [no_atp]: "\<lambda>x. (f x) b \<equiv> COMBC f b"
    83 apply (rule eq_reflection)
    84 apply (rule ext) 
    85 apply (simp add: COMBC_def) 
    86 done
    87 
    88 use "Tools/ATP/async_manager.ML"
    89 use "Tools/ATP/atp_problem.ML"
    90 use "Tools/ATP/atp_systems.ML"
    91 setup ATP_Systems.setup
    92 
    93 use "~~/src/Tools/Metis/metis.ML"
    94 use "Tools/Sledgehammer/clausifier.ML"
    95 use "Tools/Sledgehammer/meson_tactic.ML"
    96 setup Meson_Tactic.setup
    97 
    98 use "Tools/Sledgehammer/metis_clauses.ML"
    99 use "Tools/Sledgehammer/metis_tactics.ML"
   100 
   101 use "Tools/Sledgehammer/sledgehammer_util.ML"
   102 use "Tools/Sledgehammer/sledgehammer_fact_filter.ML"
   103 use "Tools/Sledgehammer/sledgehammer_proof_reconstruct.ML"
   104 use "Tools/Sledgehammer/sledgehammer.ML"
   105 setup Sledgehammer.setup
   106 use "Tools/Sledgehammer/sledgehammer_fact_minimizer.ML"
   107 use "Tools/Sledgehammer/sledgehammer_isar.ML"
   108 setup Metis_Tactics.setup
   109 
   110 end