Up to index of Isabelle/HOL
theory Sledgehammer(* Title: HOL/Sledgehammer.thy
Author: Lawrence C Paulson
Author: Jia Meng, NICTA
Author: Fabian Immler, TU Muenchen
Author: Jasmin Blanchette, TU Muenchen
*)
header {* Sledgehammer: Isabelle--ATP Linkup *}
theory Sledgehammer
imports Plain Hilbert_Choice
uses
"~~/src/Tools/Metis/metis.ML"
"Tools/Sledgehammer/sledgehammer_util.ML"
("Tools/Sledgehammer/sledgehammer_fol_clause.ML")
("Tools/Sledgehammer/sledgehammer_fact_preprocessor.ML")
("Tools/Sledgehammer/sledgehammer_hol_clause.ML")
("Tools/Sledgehammer/sledgehammer_proof_reconstruct.ML")
("Tools/Sledgehammer/sledgehammer_fact_filter.ML")
("Tools/ATP_Manager/atp_manager.ML")
("Tools/ATP_Manager/atp_systems.ML")
("Tools/Sledgehammer/sledgehammer_fact_minimizer.ML")
("Tools/Sledgehammer/sledgehammer_isar.ML")
("Tools/Sledgehammer/meson_tactic.ML")
("Tools/Sledgehammer/metis_tactics.ML")
begin
definition COMBI :: "'a => 'a" where
[no_atp]: "COMBI P ≡ P"
definition COMBK :: "'a => 'b => 'a" where
[no_atp]: "COMBK P Q ≡ P"
definition COMBB :: "('b => 'c) => ('a => 'b) => 'a => 'c" where [no_atp]:
"COMBB P Q R ≡ P (Q R)"
definition COMBC :: "('a => 'b => 'c) => 'b => 'a => 'c" where
[no_atp]: "COMBC P Q R ≡ P R Q"
definition COMBS :: "('a => 'b => 'c) => ('a => 'b) => 'a => 'c" where
[no_atp]: "COMBS P Q R ≡ P R (Q R)"
definition fequal :: "'a => 'a => bool" where [no_atp]:
"fequal X Y ≡ (X = Y)"
lemma fequal_imp_equal [no_atp]: "fequal X Y ==> X = Y"
by (simp add: fequal_def)
lemma equal_imp_fequal [no_atp]: "X = Y ==> fequal X Y"
by (simp add: fequal_def)
text{*These two represent the equivalence between Boolean equality and iff.
They can't be converted to clauses automatically, as the iff would be
expanded...*}
lemma iff_positive: "P ∨ Q ∨ P = Q"
by blast
lemma iff_negative: "¬ P ∨ ¬ Q ∨ P = Q"
by blast
text{*Theorems for translation to combinators*}
lemma abs_S [no_atp]: "λx. (f x) (g x) ≡ COMBS f g"
apply (rule eq_reflection)
apply (rule ext)
apply (simp add: COMBS_def)
done
lemma abs_I [no_atp]: "λx. x ≡ COMBI"
apply (rule eq_reflection)
apply (rule ext)
apply (simp add: COMBI_def)
done
lemma abs_K [no_atp]: "λx. y ≡ COMBK y"
apply (rule eq_reflection)
apply (rule ext)
apply (simp add: COMBK_def)
done
lemma abs_B [no_atp]: "λx. a (g x) ≡ COMBB a g"
apply (rule eq_reflection)
apply (rule ext)
apply (simp add: COMBB_def)
done
lemma abs_C [no_atp]: "λx. (f x) b ≡ COMBC f b"
apply (rule eq_reflection)
apply (rule ext)
apply (simp add: COMBC_def)
done
subsection {* Setup of external ATPs *}
use "Tools/Sledgehammer/sledgehammer_fol_clause.ML"
use "Tools/Sledgehammer/sledgehammer_fact_preprocessor.ML"
setup Sledgehammer_Fact_Preprocessor.setup
use "Tools/Sledgehammer/sledgehammer_hol_clause.ML"
use "Tools/Sledgehammer/sledgehammer_proof_reconstruct.ML"
use "Tools/Sledgehammer/sledgehammer_fact_filter.ML"
use "Tools/ATP_Manager/atp_manager.ML"
use "Tools/ATP_Manager/atp_systems.ML"
setup ATP_Systems.setup
use "Tools/Sledgehammer/sledgehammer_fact_minimizer.ML"
use "Tools/Sledgehammer/sledgehammer_isar.ML"
setup Sledgehammer_Isar.setup
subsection {* The MESON prover *}
use "Tools/Sledgehammer/meson_tactic.ML"
setup Meson_Tactic.setup
subsection {* The Metis prover *}
use "Tools/Sledgehammer/metis_tactics.ML"
setup Metis_Tactics.setup
end