src/HOL/Meson.thy
author paulson <lp15@cam.ac.uk>
Tue, 30 May 2023 12:33:06 +0100
changeset 78127 24b70433c2e8
parent 74610 87fc10f5826c
permissions -rw-r--r--
New HOL Light material on metric spaces and topological spaces
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
     1
(*  Title:      HOL/Meson.thy
39944
03ac1fbc76d3 update authors
blanchet
parents: 39941
diff changeset
     2
    Author:     Lawrence C. Paulson, Cambridge University Computer Laboratory
03ac1fbc76d3 update authors
blanchet
parents: 39941
diff changeset
     3
    Author:     Tobias Nipkow, TU Muenchen
03ac1fbc76d3 update authors
blanchet
parents: 39941
diff changeset
     4
    Author:     Jasmin Blanchette, TU Muenchen
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
     5
    Copyright   2001  University of Cambridge
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
     6
*)
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
     7
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
     8
section \<open>MESON Proof Method\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
     9
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    10
theory Meson
54553
2b0da4c1dd40 moved meson up the dependency chain
blanchet
parents: 54148
diff changeset
    11
imports Nat
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    12
begin
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    13
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    14
subsection \<open>Negation Normal Form\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    15
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    16
text \<open>de Morgan laws\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    17
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    18
lemma not_conjD: "\<not>(P\<and>Q) \<Longrightarrow> \<not>P \<or> \<not>Q"
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    19
  and not_disjD: "\<not>(P\<or>Q) \<Longrightarrow> \<not>P \<and> \<not>Q"
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    20
  and not_notD: "\<not>\<not>P \<Longrightarrow> P"
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    21
  and not_allD: "\<And>P. \<not>(\<forall>x. P(x)) \<Longrightarrow> \<exists>x. \<not>P(x)"
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    22
  and not_exD: "\<And>P. \<not>(\<exists>x. P(x)) \<Longrightarrow> \<forall>x. \<not>P(x)"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    23
  by fast+
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    24
61941
31f2105521ee discontinued ASCII replacement syntax <->;
wenzelm
parents: 61799
diff changeset
    25
text \<open>Removal of \<open>\<longrightarrow>\<close> and \<open>\<longleftrightarrow>\<close> (positive and negative occurrences)\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    26
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    27
lemma imp_to_disjD: "P\<longrightarrow>Q \<Longrightarrow> \<not>P \<or> Q"
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    28
  and not_impD: "\<not>(P\<longrightarrow>Q) \<Longrightarrow> P \<and> \<not>Q"
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    29
  and iff_to_disjD: "P=Q \<Longrightarrow> (\<not>P \<or> Q) \<and> (\<not>Q \<or> P)"
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    30
  and not_iffD: "\<not>(P=Q) \<Longrightarrow> (P \<or> Q) \<and> (\<not>P \<or> \<not>Q)"
69593
3dda49e08b9d isabelle update -u control_cartouches;
wenzelm
parents: 69144
diff changeset
    31
    \<comment> \<open>Much more efficient than \<^prop>\<open>(P \<and> \<not>Q) \<or> (Q \<and> \<not>P)\<close> for computing CNF\<close>
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    32
  and not_refl_disj_D: "x \<noteq> x \<or> P \<Longrightarrow> P"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    33
  by fast+
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    34
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    35
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    36
subsection \<open>Pulling out the existential quantifiers\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    37
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    38
text \<open>Conjunction\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    39
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    40
lemma conj_exD1: "\<And>P Q. (\<exists>x. P(x)) \<and> Q \<Longrightarrow> \<exists>x. P(x) \<and> Q"
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    41
  and conj_exD2: "\<And>P Q. P \<and> (\<exists>x. Q(x)) \<Longrightarrow> \<exists>x. P \<and> Q(x)"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    42
  by fast+
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    43
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    44
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    45
text \<open>Disjunction\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    46
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    47
lemma disj_exD: "\<And>P Q. (\<exists>x. P(x)) \<or> (\<exists>x. Q(x)) \<Longrightarrow> \<exists>x. P(x) \<or> Q(x)"
61799
4cf66f21b764 isabelle update_cartouches -c -t;
wenzelm
parents: 61076
diff changeset
    48
  \<comment> \<open>DO NOT USE with forall-Skolemization: makes fewer schematic variables!!\<close>
4cf66f21b764 isabelle update_cartouches -c -t;
wenzelm
parents: 61076
diff changeset
    49
  \<comment> \<open>With ex-Skolemization, makes fewer Skolem constants\<close>
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    50
  and disj_exD1: "\<And>P Q. (\<exists>x. P(x)) \<or> Q \<Longrightarrow> \<exists>x. P(x) \<or> Q"
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    51
  and disj_exD2: "\<And>P Q. P \<or> (\<exists>x. Q(x)) \<Longrightarrow> \<exists>x. P \<or> Q(x)"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    52
  by fast+
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    53
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    54
lemma disj_assoc: "(P\<or>Q)\<or>R \<Longrightarrow> P\<or>(Q\<or>R)"
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    55
  and disj_comm: "P\<or>Q \<Longrightarrow> Q\<or>P"
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    56
  and disj_FalseD1: "False\<or>P \<Longrightarrow> P"
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    57
  and disj_FalseD2: "P\<or>False \<Longrightarrow> P"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    58
  by fast+
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    59
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    60
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    61
text\<open>Generation of contrapositives\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    62
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    63
text\<open>Inserts negated disjunct after removing the negation; P is a literal.
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    64
  Model elimination requires assuming the negation of every attempted subgoal,
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    65
  hence the negated disjuncts.\<close>
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    66
lemma make_neg_rule: "\<not>P\<or>Q \<Longrightarrow> ((\<not>P\<Longrightarrow>P) \<Longrightarrow> Q)"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    67
by blast
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    68
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    69
text\<open>Version for Plaisted's "Postive refinement" of the Meson procedure\<close>
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    70
lemma make_refined_neg_rule: "\<not>P\<or>Q \<Longrightarrow> (P \<Longrightarrow> Q)"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    71
by blast
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    72
69593
3dda49e08b9d isabelle update -u control_cartouches;
wenzelm
parents: 69144
diff changeset
    73
text\<open>\<^term>\<open>P\<close> should be a literal\<close>
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    74
lemma make_pos_rule: "P\<or>Q \<Longrightarrow> ((P\<Longrightarrow>\<not>P) \<Longrightarrow> Q)"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    75
by blast
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    76
61799
4cf66f21b764 isabelle update_cartouches -c -t;
wenzelm
parents: 61076
diff changeset
    77
text\<open>Versions of \<open>make_neg_rule\<close> and \<open>make_pos_rule\<close> that don't
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    78
insert new assumptions, for ordinary resolution.\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    79
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    80
lemmas make_neg_rule' = make_refined_neg_rule
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    81
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    82
lemma make_pos_rule': "\<lbrakk>P\<or>Q; \<not>P\<rbrakk> \<Longrightarrow> Q"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    83
by blast
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    84
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    85
text\<open>Generation of a goal clause -- put away the final literal\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    86
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    87
lemma make_neg_goal: "\<not>P \<Longrightarrow> ((\<not>P\<Longrightarrow>P) \<Longrightarrow> False)"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    88
by blast
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    89
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
    90
lemma make_pos_goal: "P \<Longrightarrow> ((P\<Longrightarrow>\<not>P) \<Longrightarrow> False)"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    91
by blast
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    92
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    93
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    94
subsection \<open>Lemmas for Forward Proof\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    95
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 61941
diff changeset
    96
text\<open>There is a similarity to congruence rules. They are also useful in ordinary proofs.\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    97
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    98
(*NOTE: could handle conjunctions (faster?) by
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
    99
    nf(th RS conjunct2) RS (nf(th RS conjunct1) RS conjI) *)
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
   100
lemma conj_forward: "\<lbrakk>P'\<and>Q';  P' \<Longrightarrow> P;  Q' \<Longrightarrow> Q \<rbrakk> \<Longrightarrow> P\<and>Q"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   101
by blast
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   102
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
   103
lemma disj_forward: "\<lbrakk>P'\<or>Q';  P' \<Longrightarrow> P;  Q' \<Longrightarrow> Q \<rbrakk> \<Longrightarrow> P\<or>Q"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   104
by blast
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   105
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
   106
lemma imp_forward: "\<lbrakk>P' \<longrightarrow> Q';  P \<Longrightarrow> P';  Q' \<Longrightarrow> Q \<rbrakk> \<Longrightarrow> P \<longrightarrow> Q"
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 61941
diff changeset
   107
by blast
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 61941
diff changeset
   108
69144
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents: 67091
diff changeset
   109
lemma imp_forward2: "\<lbrakk>P' \<longrightarrow> Q';  P \<Longrightarrow> P';  P' \<Longrightarrow> Q' \<Longrightarrow> Q \<rbrakk> \<Longrightarrow> P \<longrightarrow> Q"
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents: 67091
diff changeset
   110
  by blast
f13b82281715 new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents: 67091
diff changeset
   111
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   112
(*Version of @{text disj_forward} for removal of duplicate literals*)
67091
1393c2340eec more symbols;
wenzelm
parents: 62381
diff changeset
   113
lemma disj_forward2: "\<lbrakk> P'\<or>Q';  P' \<Longrightarrow> P;  \<lbrakk>Q'; P\<Longrightarrow>False\<rbrakk> \<Longrightarrow> Q\<rbrakk> \<Longrightarrow> P\<or>Q"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   114
apply blast 
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   115
done
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   116
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   117
lemma all_forward: "[| \<forall>x. P'(x);  !!x. P'(x) ==> P(x) |] ==> \<forall>x. P(x)"
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   118
by blast
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   119
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   120
lemma ex_forward: "[| \<exists>x. P'(x);  !!x. P'(x) ==> P(x) |] ==> \<exists>x. P(x)"
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   121
by blast
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   122
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   123
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   124
subsection \<open>Clausification helper\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   125
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   126
lemma TruepropI: "P \<equiv> Q \<Longrightarrow> Trueprop P \<equiv> Trueprop Q"
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   127
by simp
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   128
47953
a2c3706c4cb1 added "ext_cong_neq" lemma (not used yet); tuning
blanchet
parents: 42616
diff changeset
   129
lemma ext_cong_neq: "F g \<noteq> F h \<Longrightarrow> F g \<noteq> F h \<and> (\<exists>x. g x \<noteq> h x)"
a2c3706c4cb1 added "ext_cong_neq" lemma (not used yet); tuning
blanchet
parents: 42616
diff changeset
   130
apply (erule contrapos_np)
a2c3706c4cb1 added "ext_cong_neq" lemma (not used yet); tuning
blanchet
parents: 42616
diff changeset
   131
apply clarsimp
a2c3706c4cb1 added "ext_cong_neq" lemma (not used yet); tuning
blanchet
parents: 42616
diff changeset
   132
apply (rule cong[where f = F])
a2c3706c4cb1 added "ext_cong_neq" lemma (not used yet); tuning
blanchet
parents: 42616
diff changeset
   133
by auto
a2c3706c4cb1 added "ext_cong_neq" lemma (not used yet); tuning
blanchet
parents: 42616
diff changeset
   134
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   135
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   136
text\<open>Combinator translation helpers\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   137
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   138
definition COMBI :: "'a \<Rightarrow> 'a" where
54148
c8cc5ab4a863 killed more "no_atp"s
blanchet
parents: 48891
diff changeset
   139
"COMBI P = P"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   140
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   141
definition COMBK :: "'a \<Rightarrow> 'b \<Rightarrow> 'a" where
54148
c8cc5ab4a863 killed more "no_atp"s
blanchet
parents: 48891
diff changeset
   142
"COMBK P Q = P"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   143
54148
c8cc5ab4a863 killed more "no_atp"s
blanchet
parents: 48891
diff changeset
   144
definition COMBB :: "('b => 'c) \<Rightarrow> ('a => 'b) \<Rightarrow> 'a \<Rightarrow> 'c" where
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   145
"COMBB P Q R = P (Q R)"
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   146
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   147
definition COMBC :: "('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'b \<Rightarrow> 'a \<Rightarrow> 'c" where
54148
c8cc5ab4a863 killed more "no_atp"s
blanchet
parents: 48891
diff changeset
   148
"COMBC P Q R = P R Q"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   149
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   150
definition COMBS :: "('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'c" where
54148
c8cc5ab4a863 killed more "no_atp"s
blanchet
parents: 48891
diff changeset
   151
"COMBS P Q R = P R (Q R)"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   152
54148
c8cc5ab4a863 killed more "no_atp"s
blanchet
parents: 48891
diff changeset
   153
lemma abs_S: "\<lambda>x. (f x) (g x) \<equiv> COMBS f g"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   154
apply (rule eq_reflection)
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   155
apply (rule ext) 
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   156
apply (simp add: COMBS_def) 
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   157
done
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   158
54148
c8cc5ab4a863 killed more "no_atp"s
blanchet
parents: 48891
diff changeset
   159
lemma abs_I: "\<lambda>x. x \<equiv> COMBI"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   160
apply (rule eq_reflection)
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   161
apply (rule ext) 
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   162
apply (simp add: COMBI_def) 
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   163
done
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   164
54148
c8cc5ab4a863 killed more "no_atp"s
blanchet
parents: 48891
diff changeset
   165
lemma abs_K: "\<lambda>x. y \<equiv> COMBK y"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   166
apply (rule eq_reflection)
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   167
apply (rule ext) 
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   168
apply (simp add: COMBK_def) 
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   169
done
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   170
54148
c8cc5ab4a863 killed more "no_atp"s
blanchet
parents: 48891
diff changeset
   171
lemma abs_B: "\<lambda>x. a (g x) \<equiv> COMBB a g"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   172
apply (rule eq_reflection)
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   173
apply (rule ext) 
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   174
apply (simp add: COMBB_def) 
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   175
done
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   176
54148
c8cc5ab4a863 killed more "no_atp"s
blanchet
parents: 48891
diff changeset
   177
lemma abs_C: "\<lambda>x. (f x) b \<equiv> COMBC f b"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   178
apply (rule eq_reflection)
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   179
apply (rule ext) 
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   180
apply (simp add: COMBC_def) 
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   181
done
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   182
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   183
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   184
subsection \<open>Skolemization helpers\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   185
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   186
definition skolem :: "'a \<Rightarrow> 'a" where
54148
c8cc5ab4a863 killed more "no_atp"s
blanchet
parents: 48891
diff changeset
   187
"skolem = (\<lambda>x. x)"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   188
61076
bdc1e2f0a86a eliminated \<Colon>;
wenzelm
parents: 60758
diff changeset
   189
lemma skolem_COMBK_iff: "P \<longleftrightarrow> skolem (COMBK P (i::nat))"
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   190
unfolding skolem_def COMBK_def by (rule refl)
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   191
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   192
lemmas skolem_COMBK_I = iffD1 [OF skolem_COMBK_iff]
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   193
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   194
60758
d8d85a8172b5 isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   195
subsection \<open>Meson package\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   196
69605
a96320074298 isabelle update -u path_cartouches;
wenzelm
parents: 69593
diff changeset
   197
ML_file \<open>Tools/Meson/meson.ML\<close>
a96320074298 isabelle update -u path_cartouches;
wenzelm
parents: 69593
diff changeset
   198
ML_file \<open>Tools/Meson/meson_clausify.ML\<close>
a96320074298 isabelle update -u path_cartouches;
wenzelm
parents: 69593
diff changeset
   199
ML_file \<open>Tools/Meson/meson_tactic.ML\<close>
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   200
39953
aa54f347e5e2 hide uninteresting MESON/Metis constants and facts and remove "meson_" prefix to (now hidden) fact names
blanchet
parents: 39950
diff changeset
   201
hide_const (open) COMBI COMBK COMBB COMBC COMBS skolem
aa54f347e5e2 hide uninteresting MESON/Metis constants and facts and remove "meson_" prefix to (now hidden) fact names
blanchet
parents: 39950
diff changeset
   202
hide_fact (open) not_conjD not_disjD not_notD not_allD not_exD imp_to_disjD
aa54f347e5e2 hide uninteresting MESON/Metis constants and facts and remove "meson_" prefix to (now hidden) fact names
blanchet
parents: 39950
diff changeset
   203
    not_impD iff_to_disjD not_iffD not_refl_disj_D conj_exD1 conj_exD2 disj_exD
aa54f347e5e2 hide uninteresting MESON/Metis constants and facts and remove "meson_" prefix to (now hidden) fact names
blanchet
parents: 39950
diff changeset
   204
    disj_exD1 disj_exD2 disj_assoc disj_comm disj_FalseD1 disj_FalseD2 TruepropI
47953
a2c3706c4cb1 added "ext_cong_neq" lemma (not used yet); tuning
blanchet
parents: 42616
diff changeset
   205
    ext_cong_neq COMBI_def COMBK_def COMBB_def COMBC_def COMBS_def abs_I abs_K
74610
87fc10f5826c clarified antiquotations;
wenzelm
parents: 69605
diff changeset
   206
    abs_B abs_C abs_S skolem_def skolem_COMBK_iff skolem_COMBK_I
39941
02fcd9cd1eac move Meson to Plain
blanchet
parents:
diff changeset
   207
end