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
     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_filter.ML")
    23   ("Tools/Sledgehammer/sledgehammer_translate.ML")
    24   ("Tools/Sledgehammer/sledgehammer_reconstruct.ML")
    25   ("Tools/Sledgehammer/sledgehammer.ML")
    26   ("Tools/Sledgehammer/sledgehammer_minimize.ML")
    27   ("Tools/Sledgehammer/sledgehammer_isar.ML")
    28 begin
    29 
    30 definition skolem_id :: "'a \<Rightarrow> 'a" where
    31 [no_atp]: "skolem_id = (\<lambda>x. x)"
    32 
    33 definition COMBI :: "'a \<Rightarrow> 'a" where
    34 [no_atp]: "COMBI P = P"
    35 
    36 definition COMBK :: "'a \<Rightarrow> 'b \<Rightarrow> 'a" where
    37 [no_atp]: "COMBK P Q = P"
    38 
    39 definition COMBB :: "('b => 'c) \<Rightarrow> ('a => 'b) \<Rightarrow> 'a \<Rightarrow> 'c" where [no_atp]:
    40 "COMBB P Q R = P (Q R)"
    41 
    42 definition COMBC :: "('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'b \<Rightarrow> 'a \<Rightarrow> 'c" where
    43 [no_atp]: "COMBC P Q R = P R Q"
    44 
    45 definition COMBS :: "('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'c" where
    46 [no_atp]: "COMBS P Q R = P R (Q R)"
    47 
    48 definition fequal :: "'a \<Rightarrow> 'a \<Rightarrow> bool" where [no_atp]:
    49 "fequal X Y \<longleftrightarrow> (X = Y)"
    50 
    51 lemma fequal_imp_equal [no_atp]: "\<not> fequal X Y \<or> X = Y"
    52 by (simp add: fequal_def)
    53 
    54 lemma equal_imp_fequal [no_atp]: "\<not> X = Y \<or> fequal X Y"
    55 by (simp add: fequal_def)
    56 
    57 lemma equal_imp_equal [no_atp]: "X = Y ==> X = Y"
    58 by auto
    59 
    60 text{*Theorems for translation to combinators*}
    61 
    62 lemma abs_S [no_atp]: "\<lambda>x. (f x) (g x) \<equiv> COMBS f g"
    63 apply (rule eq_reflection)
    64 apply (rule ext) 
    65 apply (simp add: COMBS_def) 
    66 done
    67 
    68 lemma abs_I [no_atp]: "\<lambda>x. x \<equiv> COMBI"
    69 apply (rule eq_reflection)
    70 apply (rule ext) 
    71 apply (simp add: COMBI_def) 
    72 done
    73 
    74 lemma abs_K [no_atp]: "\<lambda>x. y \<equiv> COMBK y"
    75 apply (rule eq_reflection)
    76 apply (rule ext) 
    77 apply (simp add: COMBK_def) 
    78 done
    79 
    80 lemma abs_B [no_atp]: "\<lambda>x. a (g x) \<equiv> COMBB a g"
    81 apply (rule eq_reflection)
    82 apply (rule ext) 
    83 apply (simp add: COMBB_def) 
    84 done
    85 
    86 lemma abs_C [no_atp]: "\<lambda>x. (f x) b \<equiv> COMBC f b"
    87 apply (rule eq_reflection)
    88 apply (rule ext) 
    89 apply (simp add: COMBC_def) 
    90 done
    91 
    92 use "Tools/ATP/async_manager.ML"
    93 use "Tools/ATP/atp_problem.ML"
    94 use "Tools/ATP/atp_systems.ML"
    95 setup ATP_Systems.setup
    96 
    97 use "~~/src/Tools/Metis/metis.ML"
    98 use "Tools/Sledgehammer/clausifier.ML"
    99 use "Tools/Sledgehammer/meson_tactic.ML"
   100 setup Meson_Tactic.setup
   101 
   102 use "Tools/Sledgehammer/metis_clauses.ML"
   103 use "Tools/Sledgehammer/metis_tactics.ML"
   104 
   105 use "Tools/Sledgehammer/sledgehammer_util.ML"
   106 use "Tools/Sledgehammer/sledgehammer_filter.ML"
   107 use "Tools/Sledgehammer/sledgehammer_translate.ML"
   108 use "Tools/Sledgehammer/sledgehammer_reconstruct.ML"
   109 use "Tools/Sledgehammer/sledgehammer.ML"
   110 setup Sledgehammer.setup
   111 use "Tools/Sledgehammer/sledgehammer_minimize.ML"
   112 use "Tools/Sledgehammer/sledgehammer_isar.ML"
   113 setup Metis_Tactics.setup
   114 
   115 end