src/HOL/Metis.thy
author blanchet
Thu Apr 14 11:24:05 2011 +0200 (2011-04-14)
changeset 42349 721e85fd2db3
parent 41140 9c68004b8c9d
child 42616 92715b528e78
permissions -rw-r--r--
make 48170228f562 work also with "HO_Reas" examples
blanchet@39946
     1
(*  Title:      HOL/Metis.thy
blanchet@39946
     2
    Author:     Lawrence C. Paulson, Cambridge University Computer Laboratory
blanchet@39946
     3
    Author:     Jia Meng, Cambridge University Computer Laboratory and NICTA
blanchet@39946
     4
    Author:     Jasmin Blanchette, TU Muenchen
blanchet@39946
     5
*)
blanchet@39946
     6
blanchet@39946
     7
header {* Metis Proof Method *}
blanchet@39946
     8
blanchet@39946
     9
theory Metis
blanchet@39946
    10
imports Meson
blanchet@39946
    11
uses "~~/src/Tools/Metis/metis.ML"
blanchet@39946
    12
     ("Tools/Metis/metis_translate.ML")
blanchet@39946
    13
     ("Tools/Metis/metis_reconstruct.ML")
blanchet@39946
    14
     ("Tools/Metis/metis_tactics.ML")
blanchet@41042
    15
     ("Tools/try.ML")
blanchet@39946
    16
begin
blanchet@39946
    17
blanchet@42349
    18
blanchet@42349
    19
subsection {* Higher-order reasoning helpers *}
blanchet@42349
    20
blanchet@41140
    21
definition fFalse :: bool where [no_atp]:
blanchet@41140
    22
"fFalse \<longleftrightarrow> False"
blanchet@39946
    23
blanchet@41140
    24
definition fTrue :: bool where [no_atp]:
blanchet@41140
    25
"fTrue \<longleftrightarrow> True"
blanchet@41140
    26
blanchet@41140
    27
definition fNot :: "bool \<Rightarrow> bool" where [no_atp]:
blanchet@41140
    28
"fNot P \<longleftrightarrow> \<not> P"
blanchet@39946
    29
blanchet@41140
    30
definition fconj :: "bool \<Rightarrow> bool \<Rightarrow> bool" where [no_atp]:
blanchet@41140
    31
"fconj P Q \<longleftrightarrow> P \<and> Q"
blanchet@41140
    32
blanchet@41140
    33
definition fdisj :: "bool \<Rightarrow> bool \<Rightarrow> bool" where [no_atp]:
blanchet@41140
    34
"fdisj P Q \<longleftrightarrow> P \<or> Q"
blanchet@39946
    35
blanchet@41140
    36
definition fimplies :: "bool \<Rightarrow> bool \<Rightarrow> bool" where [no_atp]:
blanchet@41140
    37
"fimplies P Q \<longleftrightarrow> (P \<longrightarrow> Q)"
blanchet@41140
    38
blanchet@41140
    39
definition fequal :: "'a \<Rightarrow> 'a \<Rightarrow> bool" where [no_atp]:
blanchet@41140
    40
"fequal x y \<longleftrightarrow> (x = y)"
blanchet@39946
    41
blanchet@42349
    42
blanchet@42349
    43
subsection {* Literal selection helpers *}
blanchet@42349
    44
blanchet@42349
    45
definition select :: "'a \<Rightarrow> 'a" where
blanchet@42349
    46
[no_atp]: "select = (\<lambda>x. x)"
blanchet@42349
    47
blanchet@42349
    48
lemma not_atomize: "(\<not> A \<Longrightarrow> False) \<equiv> Trueprop A"
blanchet@42349
    49
by (cut_tac atomize_not [of "\<not> A"]) simp
blanchet@42349
    50
blanchet@42349
    51
lemma atomize_not_select: "(A \<Longrightarrow> select False) \<equiv> Trueprop (\<not> A)"
blanchet@42349
    52
unfolding select_def by (rule atomize_not)
blanchet@42349
    53
blanchet@42349
    54
lemma not_atomize_select: "(\<not> A \<Longrightarrow> select False) \<equiv> Trueprop A"
blanchet@42349
    55
unfolding select_def by (rule not_atomize)
blanchet@42349
    56
blanchet@42349
    57
lemma select_FalseI: "False \<Longrightarrow> select False" by simp
blanchet@42349
    58
blanchet@42349
    59
blanchet@42349
    60
subsection {* Metis package *}
blanchet@42349
    61
blanchet@39946
    62
use "Tools/Metis/metis_translate.ML"
blanchet@39946
    63
use "Tools/Metis/metis_reconstruct.ML"
blanchet@39946
    64
use "Tools/Metis/metis_tactics.ML"
blanchet@39980
    65
blanchet@39980
    66
setup {*
blanchet@39980
    67
  Metis_Reconstruct.setup
blanchet@39980
    68
  #> Metis_Tactics.setup
blanchet@39980
    69
*}
blanchet@39946
    70
blanchet@42349
    71
hide_const (open) fFalse fTrue fNot fconj fdisj fimplies fequal select
blanchet@41140
    72
hide_fact (open) fFalse_def fTrue_def fNot_def fconj_def fdisj_def fimplies_def
blanchet@42349
    73
    fequal_def select_def not_atomize atomize_not_select not_atomize_select
blanchet@42349
    74
    select_FalseI
blanchet@39953
    75
blanchet@41042
    76
subsection {* Try *}
blanchet@41042
    77
blanchet@41042
    78
use "Tools/try.ML"
blanchet@41042
    79
blanchet@41042
    80
setup {* Try.setup *}
blanchet@41042
    81
blanchet@39946
    82
end