src/HOL/Metis.thy
author wenzelm
Fri, 18 Mar 2016 21:21:09 +0100
changeset 62672 068b430e678f
parent 60758 d8d85a8172b5
child 62711 09df6a51ad3c
permissions -rw-r--r--
clarified print depth;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39946
78faa9b31202 move Metis into Plain
blanchet
parents:
diff changeset
     1
(*  Title:      HOL/Metis.thy
78faa9b31202 move Metis into Plain
blanchet
parents:
diff changeset
     2
    Author:     Lawrence C. Paulson, Cambridge University Computer Laboratory
78faa9b31202 move Metis into Plain
blanchet
parents:
diff changeset
     3
    Author:     Jia Meng, Cambridge University Computer Laboratory and NICTA
78faa9b31202 move Metis into Plain
blanchet
parents:
diff changeset
     4
    Author:     Jasmin Blanchette, TU Muenchen
78faa9b31202 move Metis into Plain
blanchet
parents:
diff changeset
     5
*)
78faa9b31202 move Metis into Plain
blanchet
parents:
diff changeset
     6
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
     7
section \<open>Metis Proof Method\<close>
39946
78faa9b31202 move Metis into Plain
blanchet
parents:
diff changeset
     8
78faa9b31202 move Metis into Plain
blanchet
parents:
diff changeset
     9
theory Metis
43085
0a2f5b86bdd7 first step in sharing more code between ATP and Metis translation
blanchet
parents: 43016
diff changeset
    10
imports ATP
39946
78faa9b31202 move Metis into Plain
blanchet
parents:
diff changeset
    11
begin
78faa9b31202 move Metis into Plain
blanchet
parents:
diff changeset
    12
56281
03c3d1a7c3b8 proper configuration option "ML_print_depth";
wenzelm
parents: 55509
diff changeset
    13
declare [[ML_print_depth = 0]]
48891
c0eafbd55de3 prefer ML_file over old uses;
wenzelm
parents: 47946
diff changeset
    14
ML_file "~~/src/Tools/Metis/metis.ML"
62672
068b430e678f clarified print depth;
wenzelm
parents: 60758
diff changeset
    15
declare [[ML_print_depth = 20]]
48891
c0eafbd55de3 prefer ML_file over old uses;
wenzelm
parents: 47946
diff changeset
    16
56946
10d9bd4ea94f hide more internal names
blanchet
parents: 56281
diff changeset
    17
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    18
subsection \<open>Literal selection and lambda-lifting helpers\<close>
42349
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    19
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    20
definition select :: "'a \<Rightarrow> 'a" where
54148
c8cc5ab4a863 killed more "no_atp"s
blanchet
parents: 52641
diff changeset
    21
"select = (\<lambda>x. x)"
42349
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    22
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    23
lemma not_atomize: "(\<not> A \<Longrightarrow> False) \<equiv> Trueprop A"
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    24
by (cut_tac atomize_not [of "\<not> A"]) simp
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    25
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    26
lemma atomize_not_select: "(A \<Longrightarrow> select False) \<equiv> Trueprop (\<not> A)"
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    27
unfolding select_def by (rule atomize_not)
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    28
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    29
lemma not_atomize_select: "(\<not> A \<Longrightarrow> select False) \<equiv> Trueprop A"
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    30
unfolding select_def by (rule not_atomize)
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    31
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    32
lemma select_FalseI: "False \<Longrightarrow> select False" by simp
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    33
45511
9b0f8ca4388e continued implementation of lambda-lifting in Metis
blanchet
parents: 44651
diff changeset
    34
definition lambda :: "'a \<Rightarrow> 'a" where
54148
c8cc5ab4a863 killed more "no_atp"s
blanchet
parents: 52641
diff changeset
    35
"lambda = (\<lambda>x. x)"
45511
9b0f8ca4388e continued implementation of lambda-lifting in Metis
blanchet
parents: 44651
diff changeset
    36
9b0f8ca4388e continued implementation of lambda-lifting in Metis
blanchet
parents: 44651
diff changeset
    37
lemma eq_lambdaI: "x \<equiv> y \<Longrightarrow> x \<equiv> lambda y"
9b0f8ca4388e continued implementation of lambda-lifting in Metis
blanchet
parents: 44651
diff changeset
    38
unfolding lambda_def by assumption
9b0f8ca4388e continued implementation of lambda-lifting in Metis
blanchet
parents: 44651
diff changeset
    39
42349
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    40
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    41
subsection \<open>Metis package\<close>
42349
721e85fd2db3 make 48170228f562 work also with "HO_Reas" examples
blanchet
parents: 41140
diff changeset
    42
48891
c0eafbd55de3 prefer ML_file over old uses;
wenzelm
parents: 47946
diff changeset
    43
ML_file "Tools/Metis/metis_generate.ML"
c0eafbd55de3 prefer ML_file over old uses;
wenzelm
parents: 47946
diff changeset
    44
ML_file "Tools/Metis/metis_reconstruct.ML"
c0eafbd55de3 prefer ML_file over old uses;
wenzelm
parents: 47946
diff changeset
    45
ML_file "Tools/Metis/metis_tactic.ML"
39980
f175e482dabe "setup" in theory
blanchet
parents: 39955
diff changeset
    46
56946
10d9bd4ea94f hide more internal names
blanchet
parents: 56281
diff changeset
    47
hide_const (open) select fFalse fTrue fNot fComp fconj fdisj fimplies fAll fEx fequal lambda
10d9bd4ea94f hide more internal names
blanchet
parents: 56281
diff changeset
    48
hide_fact (open) select_def not_atomize atomize_not_select not_atomize_select select_FalseI
10d9bd4ea94f hide more internal names
blanchet
parents: 56281
diff changeset
    49
  fFalse_def fTrue_def fNot_def fconj_def fdisj_def fimplies_def fAll_def fEx_def fequal_def
10d9bd4ea94f hide more internal names
blanchet
parents: 56281
diff changeset
    50
  fTrue_ne_fFalse fNot_table fconj_table fdisj_table fimplies_table fAll_table fEx_table
10d9bd4ea94f hide more internal names
blanchet
parents: 56281
diff changeset
    51
  fequal_table fAll_table fEx_table fNot_law fComp_law fconj_laws fdisj_laws fimplies_laws
10d9bd4ea94f hide more internal names
blanchet
parents: 56281
diff changeset
    52
  fequal_laws fAll_law fEx_law lambda_def eq_lambdaI
45511
9b0f8ca4388e continued implementation of lambda-lifting in Metis
blanchet
parents: 44651
diff changeset
    53
39946
78faa9b31202 move Metis into Plain
blanchet
parents:
diff changeset
    54
end