src/HOL/Sledgehammer.thy
author blanchet
Fri Jun 25 16:42:06 2010 +0200 (2010-06-25)
changeset 37577 5379f41a1322
parent 37574 b8c1f4c46983
child 37578 9367cb36b1c4
permissions -rw-r--r--
merge "Sledgehammer_{F,H}OL_Clause", as requested by a FIXME
     1 (*  Title:      HOL/Sledgehammer.thy
     2     Author:     Lawrence C Paulson
     3     Author:     Jia Meng, 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   "~~/src/Tools/Metis/metis.ML"
    14   ("Tools/Sledgehammer/clausifier.ML")
    15   ("Tools/Sledgehammer/meson_tactic.ML")
    16   ("Tools/Sledgehammer/sledgehammer_util.ML")
    17   ("Tools/Sledgehammer/sledgehammer_fol_clause.ML")
    18   ("Tools/Sledgehammer/sledgehammer_fact_filter.ML")
    19   ("Tools/Sledgehammer/sledgehammer_tptp_format.ML")
    20   ("Tools/ATP_Manager/atp_manager.ML")
    21   ("Tools/ATP_Manager/atp_systems.ML")
    22   ("Tools/Sledgehammer/sledgehammer_proof_reconstruct.ML")
    23   ("Tools/Sledgehammer/sledgehammer_fact_minimizer.ML")
    24   ("Tools/Sledgehammer/sledgehammer_isar.ML")
    25   ("Tools/Sledgehammer/metis_tactics.ML")
    26 begin
    27 
    28 definition skolem_id :: "'a \<Rightarrow> 'a" where
    29 [no_atp]: "skolem_id = (\<lambda>x. x)"
    30 
    31 definition COMBI :: "'a \<Rightarrow> 'a" where
    32 [no_atp]: "COMBI P \<equiv> P"
    33 
    34 definition COMBK :: "'a \<Rightarrow> 'b \<Rightarrow> 'a" where
    35 [no_atp]: "COMBK P Q \<equiv> P"
    36 
    37 definition COMBB :: "('b => 'c) \<Rightarrow> ('a => 'b) \<Rightarrow> 'a \<Rightarrow> 'c" where [no_atp]:
    38 "COMBB P Q R \<equiv> P (Q R)"
    39 
    40 definition COMBC :: "('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'b \<Rightarrow> 'a \<Rightarrow> 'c" where
    41 [no_atp]: "COMBC P Q R \<equiv> P R Q"
    42 
    43 definition COMBS :: "('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'c" where
    44 [no_atp]: "COMBS P Q R \<equiv> P R (Q R)"
    45 
    46 definition fequal :: "'a \<Rightarrow> 'a \<Rightarrow> bool" where [no_atp]:
    47 "fequal X Y \<equiv> (X = Y)"
    48 
    49 lemma fequal_imp_equal [no_atp]: "fequal X Y \<Longrightarrow> X = Y"
    50   by (simp add: fequal_def)
    51 
    52 lemma equal_imp_fequal [no_atp]: "X = Y \<Longrightarrow> fequal X Y"
    53   by (simp add: fequal_def)
    54 
    55 text{*Theorems for translation to combinators*}
    56 
    57 lemma abs_S [no_atp]: "\<lambda>x. (f x) (g x) \<equiv> COMBS f g"
    58 apply (rule eq_reflection)
    59 apply (rule ext) 
    60 apply (simp add: COMBS_def) 
    61 done
    62 
    63 lemma abs_I [no_atp]: "\<lambda>x. x \<equiv> COMBI"
    64 apply (rule eq_reflection)
    65 apply (rule ext) 
    66 apply (simp add: COMBI_def) 
    67 done
    68 
    69 lemma abs_K [no_atp]: "\<lambda>x. y \<equiv> COMBK y"
    70 apply (rule eq_reflection)
    71 apply (rule ext) 
    72 apply (simp add: COMBK_def) 
    73 done
    74 
    75 lemma abs_B [no_atp]: "\<lambda>x. a (g x) \<equiv> COMBB a g"
    76 apply (rule eq_reflection)
    77 apply (rule ext) 
    78 apply (simp add: COMBB_def) 
    79 done
    80 
    81 lemma abs_C [no_atp]: "\<lambda>x. (f x) b \<equiv> COMBC f b"
    82 apply (rule eq_reflection)
    83 apply (rule ext) 
    84 apply (simp add: COMBC_def) 
    85 done
    86 
    87 use "Tools/Sledgehammer/clausifier.ML"
    88 setup Clausifier.setup
    89 use "Tools/Sledgehammer/meson_tactic.ML"
    90 setup Meson_Tactic.setup
    91 
    92 use "Tools/Sledgehammer/sledgehammer_util.ML"
    93 use "Tools/Sledgehammer/sledgehammer_fol_clause.ML"
    94 use "Tools/Sledgehammer/sledgehammer_fact_filter.ML"
    95 use "Tools/Sledgehammer/sledgehammer_tptp_format.ML"
    96 use "Tools/ATP_Manager/atp_manager.ML"
    97 use "Tools/ATP_Manager/atp_systems.ML"
    98 setup ATP_Systems.setup
    99 use "Tools/Sledgehammer/sledgehammer_proof_reconstruct.ML"
   100 use "Tools/Sledgehammer/sledgehammer_fact_minimizer.ML"
   101 use "Tools/Sledgehammer/sledgehammer_isar.ML"
   102 use "Tools/Sledgehammer/metis_tactics.ML"
   103 setup Metis_Tactics.setup
   104 
   105 end