src/HOL/Sledgehammer.thy
author hoelzl
Thu Sep 02 10:14:32 2010 +0200 (2010-09-02)
changeset 39072 1030b1a166ef
parent 38990 7fba3ccc755a
child 39036 dff91b90d74c
permissions -rw-r--r--
Add lessThan_Suc_eq_insert_0
     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/atp_problem.ML")
    14   ("Tools/ATP/atp_systems.ML")
    15   ("~~/src/Tools/Metis/metis.ML")
    16   ("Tools/Sledgehammer/clausifier.ML")
    17   ("Tools/Sledgehammer/meson_tactic.ML")
    18   ("Tools/Sledgehammer/metis_clauses.ML")
    19   ("Tools/Sledgehammer/metis_tactics.ML")
    20   ("Tools/Sledgehammer/sledgehammer_util.ML")
    21   ("Tools/Sledgehammer/sledgehammer_filter.ML")
    22   ("Tools/Sledgehammer/sledgehammer_translate.ML")
    23   ("Tools/Sledgehammer/sledgehammer_reconstruct.ML")
    24   ("Tools/Sledgehammer/sledgehammer.ML")
    25   ("Tools/Sledgehammer/sledgehammer_minimize.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 = P"
    34 
    35 definition COMBK :: "'a \<Rightarrow> 'b \<Rightarrow> 'a" where
    36 [no_atp]: "COMBK P Q = P"
    37 
    38 definition COMBB :: "('b => 'c) \<Rightarrow> ('a => 'b) \<Rightarrow> 'a \<Rightarrow> 'c" where [no_atp]:
    39 "COMBB P Q R = 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 = 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 = P R (Q R)"
    46 
    47 definition fequal :: "'a \<Rightarrow> 'a \<Rightarrow> bool" where [no_atp]:
    48 "fequal X Y \<longleftrightarrow> (X = Y)"
    49 
    50 lemma fequal_imp_equal [no_atp]: "\<not> fequal X Y \<or> X = Y"
    51 by (simp add: fequal_def)
    52 
    53 lemma equal_imp_fequal [no_atp]: "\<not> X = Y \<or> fequal X Y"
    54 by (simp add: fequal_def)
    55 
    56 lemma equal_imp_equal [no_atp]: "X = Y ==> X = Y"
    57 by auto
    58 
    59 text{*Theorems for translation to combinators*}
    60 
    61 lemma abs_S [no_atp]: "\<lambda>x. (f x) (g x) \<equiv> COMBS f g"
    62 apply (rule eq_reflection)
    63 apply (rule ext) 
    64 apply (simp add: COMBS_def) 
    65 done
    66 
    67 lemma abs_I [no_atp]: "\<lambda>x. x \<equiv> COMBI"
    68 apply (rule eq_reflection)
    69 apply (rule ext) 
    70 apply (simp add: COMBI_def) 
    71 done
    72 
    73 lemma abs_K [no_atp]: "\<lambda>x. y \<equiv> COMBK y"
    74 apply (rule eq_reflection)
    75 apply (rule ext) 
    76 apply (simp add: COMBK_def) 
    77 done
    78 
    79 lemma abs_B [no_atp]: "\<lambda>x. a (g x) \<equiv> COMBB a g"
    80 apply (rule eq_reflection)
    81 apply (rule ext) 
    82 apply (simp add: COMBB_def) 
    83 done
    84 
    85 lemma abs_C [no_atp]: "\<lambda>x. (f x) b \<equiv> COMBC f b"
    86 apply (rule eq_reflection)
    87 apply (rule ext) 
    88 apply (simp add: COMBC_def) 
    89 done
    90 
    91 use "Tools/ATP/atp_problem.ML"
    92 use "Tools/ATP/atp_systems.ML"
    93 setup ATP_Systems.setup
    94 
    95 use "~~/src/Tools/Metis/metis.ML"
    96 use "Tools/Sledgehammer/clausifier.ML"
    97 use "Tools/Sledgehammer/meson_tactic.ML"
    98 setup Meson_Tactic.setup
    99 
   100 use "Tools/Sledgehammer/metis_clauses.ML"
   101 use "Tools/Sledgehammer/metis_tactics.ML"
   102 
   103 use "Tools/Sledgehammer/sledgehammer_util.ML"
   104 use "Tools/Sledgehammer/sledgehammer_filter.ML"
   105 use "Tools/Sledgehammer/sledgehammer_translate.ML"
   106 use "Tools/Sledgehammer/sledgehammer_reconstruct.ML"
   107 use "Tools/Sledgehammer/sledgehammer.ML"
   108 setup Sledgehammer.setup
   109 use "Tools/Sledgehammer/sledgehammer_minimize.ML"
   110 use "Tools/Sledgehammer/sledgehammer_isar.ML"
   111 setup Metis_Tactics.setup
   112 
   113 end