src/FOL/FOL.thy
author wenzelm
Sat, 15 Mar 2008 22:07:25 +0100
changeset 26286 3ff5d257f175
parent 24830 a7b3ab44d993
child 26411 cd74690f3bfb
permissions -rw-r--r--
added lemmas from simpdata.ML;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9487
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
     1
(*  Title:      FOL/FOL.thy
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
     2
    ID:         $Id$
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
     3
    Author:     Lawrence C Paulson and Markus Wenzel
11678
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
     4
*)
9487
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
     5
11678
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
     6
header {* Classical first-order logic *}
4093
5e8f3d57dee7 added claset thy_data;
wenzelm
parents: 0
diff changeset
     7
18456
8cc35e95450a updated auxiliary facts for induct method;
wenzelm
parents: 16417
diff changeset
     8
theory FOL
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 15019
diff changeset
     9
imports IFOL
23154
5126551e378b tuned header;
wenzelm
parents: 22139
diff changeset
    10
uses
24097
86734ba03ca2 moved classical tools from theory IFOL to FOL;
wenzelm
parents: 23154
diff changeset
    11
  "~~/src/Provers/classical.ML"
86734ba03ca2 moved classical tools from theory IFOL to FOL;
wenzelm
parents: 23154
diff changeset
    12
  "~~/src/Provers/blast.ML"
86734ba03ca2 moved classical tools from theory IFOL to FOL;
wenzelm
parents: 23154
diff changeset
    13
  "~~/src/Provers/clasimp.ML"
24830
a7b3ab44d993 moved Pure/Isar/induct_attrib.ML and Provers/induct_method.ML to Tools/induct.ML;
wenzelm
parents: 24097
diff changeset
    14
  "~~/src/Tools/induct.ML"
23154
5126551e378b tuned header;
wenzelm
parents: 22139
diff changeset
    15
  ("cladata.ML")
5126551e378b tuned header;
wenzelm
parents: 22139
diff changeset
    16
  ("blastdata.ML")
5126551e378b tuned header;
wenzelm
parents: 22139
diff changeset
    17
  ("simpdata.ML")
18456
8cc35e95450a updated auxiliary facts for induct method;
wenzelm
parents: 16417
diff changeset
    18
begin
9487
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
    19
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
    20
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
    21
subsection {* The classical axiom *}
4093
5e8f3d57dee7 added claset thy_data;
wenzelm
parents: 0
diff changeset
    22
7355
4c43090659ca proper bootstrap of IFOL/FOL theories and packages;
wenzelm
parents: 5887
diff changeset
    23
axioms
4c43090659ca proper bootstrap of IFOL/FOL theories and packages;
wenzelm
parents: 5887
diff changeset
    24
  classical: "(~P ==> P) ==> P"
4093
5e8f3d57dee7 added claset thy_data;
wenzelm
parents: 0
diff changeset
    25
9487
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
    26
11678
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
    27
subsection {* Lemmas and proof tools *}
9487
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
    28
21539
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    29
lemma ccontr: "(\<not> P \<Longrightarrow> False) \<Longrightarrow> P"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    30
  by (erule FalseE [THEN classical])
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    31
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    32
(*** Classical introduction rules for | and EX ***)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    33
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    34
lemma disjCI: "(~Q ==> P) ==> P|Q"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    35
  apply (rule classical)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    36
  apply (assumption | erule meta_mp | rule disjI1 notI)+
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    37
  apply (erule notE disjI2)+
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    38
  done
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    39
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    40
(*introduction rule involving only EX*)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    41
lemma ex_classical:
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    42
  assumes r: "~(EX x. P(x)) ==> P(a)"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    43
  shows "EX x. P(x)"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    44
  apply (rule classical)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    45
  apply (rule exI, erule r)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    46
  done
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    47
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    48
(*version of above, simplifying ~EX to ALL~ *)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    49
lemma exCI:
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    50
  assumes r: "ALL x. ~P(x) ==> P(a)"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    51
  shows "EX x. P(x)"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    52
  apply (rule ex_classical)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    53
  apply (rule notI [THEN allI, THEN r])
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    54
  apply (erule notE)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    55
  apply (erule exI)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    56
  done
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    57
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    58
lemma excluded_middle: "~P | P"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    59
  apply (rule disjCI)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    60
  apply assumption
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    61
  done
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    62
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    63
(*For disjunctive case analysis*)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    64
ML {*
22139
539a63b98f76 tuned ML setup;
wenzelm
parents: 21539
diff changeset
    65
  fun excluded_middle_tac sP =
539a63b98f76 tuned ML setup;
wenzelm
parents: 21539
diff changeset
    66
    res_inst_tac [("Q",sP)] (@{thm excluded_middle} RS @{thm disjE})
21539
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    67
*}
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    68
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    69
lemma case_split_thm:
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    70
  assumes r1: "P ==> Q"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    71
    and r2: "~P ==> Q"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    72
  shows Q
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    73
  apply (rule excluded_middle [THEN disjE])
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    74
  apply (erule r2)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    75
  apply (erule r1)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    76
  done
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    77
24830
a7b3ab44d993 moved Pure/Isar/induct_attrib.ML and Provers/induct_method.ML to Tools/induct.ML;
wenzelm
parents: 24097
diff changeset
    78
lemmas case_split = case_split_thm [case_names True False]
21539
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    79
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    80
(*HOL's more natural case analysis tactic*)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    81
ML {*
22139
539a63b98f76 tuned ML setup;
wenzelm
parents: 21539
diff changeset
    82
  fun case_tac a = res_inst_tac [("P",a)] @{thm case_split_thm}
21539
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    83
*}
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    84
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    85
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    86
(*** Special elimination rules *)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    87
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    88
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    89
(*Classical implies (-->) elimination. *)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    90
lemma impCE:
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    91
  assumes major: "P-->Q"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    92
    and r1: "~P ==> R"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    93
    and r2: "Q ==> R"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    94
  shows R
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    95
  apply (rule excluded_middle [THEN disjE])
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    96
   apply (erule r1)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    97
  apply (rule r2)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    98
  apply (erule major [THEN mp])
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
    99
  done
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   100
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   101
(*This version of --> elimination works on Q before P.  It works best for
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   102
  those cases in which P holds "almost everywhere".  Can't install as
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   103
  default: would break old proofs.*)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   104
lemma impCE':
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   105
  assumes major: "P-->Q"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   106
    and r1: "Q ==> R"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   107
    and r2: "~P ==> R"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   108
  shows R
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   109
  apply (rule excluded_middle [THEN disjE])
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   110
   apply (erule r2)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   111
  apply (rule r1)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   112
  apply (erule major [THEN mp])
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   113
  done
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   114
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   115
(*Double negation law*)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   116
lemma notnotD: "~~P ==> P"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   117
  apply (rule classical)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   118
  apply (erule notE)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   119
  apply assumption
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   120
  done
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   121
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   122
lemma contrapos2:  "[| Q; ~ P ==> ~ Q |] ==> P"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   123
  apply (rule classical)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   124
  apply (drule (1) meta_mp)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   125
  apply (erule (1) notE)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   126
  done
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   127
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   128
(*** Tactics for implication and contradiction ***)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   129
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   130
(*Classical <-> elimination.  Proof substitutes P=Q in 
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   131
    ~P ==> ~Q    and    P ==> Q  *)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   132
lemma iffCE:
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   133
  assumes major: "P<->Q"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   134
    and r1: "[| P; Q |] ==> R"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   135
    and r2: "[| ~P; ~Q |] ==> R"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   136
  shows R
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   137
  apply (rule major [unfolded iff_def, THEN conjE])
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   138
  apply (elim impCE)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   139
     apply (erule (1) r2)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   140
    apply (erule (1) notE)+
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   141
  apply (erule (1) r1)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   142
  done
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   143
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   144
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   145
(*Better for fast_tac: needs no quantifier duplication!*)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   146
lemma alt_ex1E:
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   147
  assumes major: "EX! x. P(x)"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   148
    and r: "!!x. [| P(x);  ALL y y'. P(y) & P(y') --> y=y' |] ==> R"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   149
  shows R
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   150
  using major
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   151
proof (rule ex1E)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   152
  fix x
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   153
  assume * : "\<forall>y. P(y) \<longrightarrow> y = x"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   154
  assume "P(x)"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   155
  then show R
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   156
  proof (rule r)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   157
    { fix y y'
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   158
      assume "P(y)" and "P(y')"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   159
      with * have "x = y" and "x = y'" by - (tactic "IntPr.fast_tac 1")+
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   160
      then have "y = y'" by (rule subst)
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   161
    } note r' = this
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   162
    show "\<forall>y y'. P(y) \<and> P(y') \<longrightarrow> y = y'" by (intro strip, elim conjE) (rule r')
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   163
  qed
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   164
qed
9525
46fb9ccae463 lemmas atomize = all_eq imp_eq;
wenzelm
parents: 9487
diff changeset
   165
10383
a092ae7bb2a6 "atomize" for classical tactics;
wenzelm
parents: 10130
diff changeset
   166
use "cladata.ML"
a092ae7bb2a6 "atomize" for classical tactics;
wenzelm
parents: 10130
diff changeset
   167
setup Cla.setup
14156
2072802ab0e3 new case_tac method
paulson
parents: 14085
diff changeset
   168
setup cla_setup
2072802ab0e3 new case_tac method
paulson
parents: 14085
diff changeset
   169
setup case_setup
10383
a092ae7bb2a6 "atomize" for classical tactics;
wenzelm
parents: 10130
diff changeset
   170
9487
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
   171
use "blastdata.ML"
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
   172
setup Blast.setup
13550
5a176b8dda84 removal of blast.overloaded
paulson
parents: 12367
diff changeset
   173
5a176b8dda84 removal of blast.overloaded
paulson
parents: 12367
diff changeset
   174
5a176b8dda84 removal of blast.overloaded
paulson
parents: 12367
diff changeset
   175
lemma ex1_functional: "[| EX! z. P(a,z);  P(a,b);  P(a,c) |] ==> b = c"
21539
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   176
  by blast
20223
89d2758ecddf tuned proofs;
wenzelm
parents: 18816
diff changeset
   177
89d2758ecddf tuned proofs;
wenzelm
parents: 18816
diff changeset
   178
(* Elimination of True from asumptions: *)
89d2758ecddf tuned proofs;
wenzelm
parents: 18816
diff changeset
   179
lemma True_implies_equals: "(True ==> PROP P) == PROP P"
89d2758ecddf tuned proofs;
wenzelm
parents: 18816
diff changeset
   180
proof
89d2758ecddf tuned proofs;
wenzelm
parents: 18816
diff changeset
   181
  assume "True \<Longrightarrow> PROP P"
89d2758ecddf tuned proofs;
wenzelm
parents: 18816
diff changeset
   182
  from this and TrueI show "PROP P" .
89d2758ecddf tuned proofs;
wenzelm
parents: 18816
diff changeset
   183
next
89d2758ecddf tuned proofs;
wenzelm
parents: 18816
diff changeset
   184
  assume "PROP P"
89d2758ecddf tuned proofs;
wenzelm
parents: 18816
diff changeset
   185
  then show "PROP P" .
89d2758ecddf tuned proofs;
wenzelm
parents: 18816
diff changeset
   186
qed
9487
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
   187
21539
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   188
lemma uncurry: "P --> Q --> R ==> P & Q --> R"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   189
  by blast
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   190
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   191
lemma iff_allI: "(!!x. P(x) <-> Q(x)) ==> (ALL x. P(x)) <-> (ALL x. Q(x))"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   192
  by blast
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   193
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   194
lemma iff_exI: "(!!x. P(x) <-> Q(x)) ==> (EX x. P(x)) <-> (EX x. Q(x))"
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   195
  by blast
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   196
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   197
lemma all_comm: "(ALL x y. P(x,y)) <-> (ALL y x. P(x,y))" by blast
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   198
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   199
lemma ex_comm: "(EX x y. P(x,y)) <-> (EX y x. P(x,y))" by blast
c5cf9243ad62 converted legacy ML scripts;
wenzelm
parents: 20223
diff changeset
   200
26286
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   201
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   202
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   203
(*** Classical simplification rules ***)
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   204
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   205
(*Avoids duplication of subgoals after expand_if, when the true and false
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   206
  cases boil down to the same thing.*)
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   207
lemma cases_simp: "(P --> Q) & (~P --> Q) <-> Q" by blast
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   208
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   209
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   210
(*** Miniscoping: pushing quantifiers in
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   211
     We do NOT distribute of ALL over &, or dually that of EX over |
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   212
     Baaz and Leitsch, On Skolemization and Proof Complexity (1994)
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   213
     show that this step can increase proof length!
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   214
***)
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   215
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   216
(*existential miniscoping*)
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   217
lemma int_ex_simps:
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   218
  "!!P Q. (EX x. P(x) & Q) <-> (EX x. P(x)) & Q"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   219
  "!!P Q. (EX x. P & Q(x)) <-> P & (EX x. Q(x))"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   220
  "!!P Q. (EX x. P(x) | Q) <-> (EX x. P(x)) | Q"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   221
  "!!P Q. (EX x. P | Q(x)) <-> P | (EX x. Q(x))"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   222
  by iprover+
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   223
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   224
(*classical rules*)
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   225
lemma cla_ex_simps:
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   226
  "!!P Q. (EX x. P(x) --> Q) <-> (ALL x. P(x)) --> Q"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   227
  "!!P Q. (EX x. P --> Q(x)) <-> P --> (EX x. Q(x))"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   228
  by blast+
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   229
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   230
lemmas ex_simps = int_ex_simps cla_ex_simps
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   231
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   232
(*universal miniscoping*)
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   233
lemma int_all_simps:
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   234
  "!!P Q. (ALL x. P(x) & Q) <-> (ALL x. P(x)) & Q"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   235
  "!!P Q. (ALL x. P & Q(x)) <-> P & (ALL x. Q(x))"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   236
  "!!P Q. (ALL x. P(x) --> Q) <-> (EX x. P(x)) --> Q"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   237
  "!!P Q. (ALL x. P --> Q(x)) <-> P --> (ALL x. Q(x))"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   238
  by iprover+
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   239
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   240
(*classical rules*)
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   241
lemma cla_all_simps:
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   242
  "!!P Q. (ALL x. P(x) | Q) <-> (ALL x. P(x)) | Q"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   243
  "!!P Q. (ALL x. P | Q(x)) <-> P | (ALL x. Q(x))"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   244
  by blast+
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   245
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   246
lemmas all_simps = int_all_simps cla_all_simps
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   247
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   248
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   249
(*** Named rewrite rules proved for IFOL ***)
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   250
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   251
lemma imp_disj1: "(P-->Q) | R <-> (P-->Q | R)" by blast
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   252
lemma imp_disj2: "Q | (P-->R) <-> (P-->Q | R)" by blast
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   253
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   254
lemma de_Morgan_conj: "(~(P & Q)) <-> (~P | ~Q)" by blast
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   255
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   256
lemma not_imp: "~(P --> Q) <-> (P & ~Q)" by blast
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   257
lemma not_iff: "~(P <-> Q) <-> (P <-> ~Q)" by blast
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   258
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   259
lemma not_all: "(~ (ALL x. P(x))) <-> (EX x.~P(x))" by blast
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   260
lemma imp_all: "((ALL x. P(x)) --> Q) <-> (EX x. P(x) --> Q)" by blast
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   261
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   262
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   263
lemmas meta_simps =
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   264
  triv_forall_equality (* prunes params *)
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   265
  True_implies_equals  (* prune asms `True' *)
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   266
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   267
lemmas IFOL_simps =
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   268
  refl [THEN P_iff_T] conj_simps disj_simps not_simps
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   269
  imp_simps iff_simps quant_simps
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   270
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   271
lemma notFalseI: "~False" by iprover
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   272
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   273
lemma cla_simps_misc:
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   274
  "~(P&Q) <-> ~P | ~Q"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   275
  "P | ~P"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   276
  "~P | P"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   277
  "~ ~ P <-> P"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   278
  "(~P --> P) <-> P"
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   279
  "(~P <-> ~Q) <-> (P<->Q)" by blast+
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   280
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   281
lemmas cla_simps =
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   282
  de_Morgan_conj de_Morgan_disj imp_disj1 imp_disj2
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   283
  not_imp not_all not_ex cases_simp cla_simps_misc
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   284
3ff5d257f175 added lemmas from simpdata.ML;
wenzelm
parents: 24830
diff changeset
   285
9487
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
   286
use "simpdata.ML"
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
   287
setup simpsetup
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
   288
setup "Simplifier.method_setup Splitter.split_modifiers"
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
   289
setup Splitter.setup
7e377f912629 improved comments;
wenzelm
parents: 8643
diff changeset
   290
setup Clasimp.setup
18591
04b9f2bf5a48 tuned EqSubst setup;
wenzelm
parents: 18531
diff changeset
   291
setup EqSubst.setup
15481
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 15019
diff changeset
   292
fc075ae929e4 the new subst tactic, by Lucas Dixon
paulson
parents: 15019
diff changeset
   293
14085
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   294
subsection {* Other simple lemmas *}
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   295
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   296
lemma [simp]: "((P-->R) <-> (Q-->R)) <-> ((P<->Q) | R)"
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   297
by blast
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   298
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   299
lemma [simp]: "((P-->Q) <-> (P-->R)) <-> (P --> (Q<->R))"
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   300
by blast
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   301
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   302
lemma not_disj_iff_imp: "~P | Q <-> (P-->Q)"
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   303
by blast
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   304
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   305
(** Monotonicity of implications **)
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   306
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   307
lemma conj_mono: "[| P1-->Q1; P2-->Q2 |] ==> (P1&P2) --> (Q1&Q2)"
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   308
by fast (*or (IntPr.fast_tac 1)*)
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   309
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   310
lemma disj_mono: "[| P1-->Q1; P2-->Q2 |] ==> (P1|P2) --> (Q1|Q2)"
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   311
by fast (*or (IntPr.fast_tac 1)*)
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   312
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   313
lemma imp_mono: "[| Q1-->P1; P2-->Q2 |] ==> (P1-->P2)-->(Q1-->Q2)"
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   314
by fast (*or (IntPr.fast_tac 1)*)
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   315
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   316
lemma imp_refl: "P-->P"
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   317
by (rule impI, assumption)
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   318
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   319
(*The quantifier monotonicity rules are also intuitionistically valid*)
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   320
lemma ex_mono: "(!!x. P(x) --> Q(x)) ==> (EX x. P(x)) --> (EX x. Q(x))"
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   321
by blast
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   322
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   323
lemma all_mono: "(!!x. P(x) --> Q(x)) ==> (ALL x. P(x)) --> (ALL x. Q(x))"
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   324
by blast
8dc3e532959a moved some lemmas here from ZF
paulson
parents: 13550
diff changeset
   325
11678
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   326
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   327
subsection {* Proof by cases and induction *}
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   328
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   329
text {* Proper handling of non-atomic rule statements. *}
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   330
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   331
constdefs
18456
8cc35e95450a updated auxiliary facts for induct method;
wenzelm
parents: 16417
diff changeset
   332
  induct_forall where "induct_forall(P) == \<forall>x. P(x)"
8cc35e95450a updated auxiliary facts for induct method;
wenzelm
parents: 16417
diff changeset
   333
  induct_implies where "induct_implies(A, B) == A \<longrightarrow> B"
8cc35e95450a updated auxiliary facts for induct method;
wenzelm
parents: 16417
diff changeset
   334
  induct_equal where "induct_equal(x, y) == x = y"
8cc35e95450a updated auxiliary facts for induct method;
wenzelm
parents: 16417
diff changeset
   335
  induct_conj where "induct_conj(A, B) == A \<and> B"
11678
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   336
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   337
lemma induct_forall_eq: "(!!x. P(x)) == Trueprop(induct_forall(\<lambda>x. P(x)))"
18816
aebd7f315b92 tuned proofs;
wenzelm
parents: 18595
diff changeset
   338
  unfolding atomize_all induct_forall_def .
11678
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   339
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   340
lemma induct_implies_eq: "(A ==> B) == Trueprop(induct_implies(A, B))"
18816
aebd7f315b92 tuned proofs;
wenzelm
parents: 18595
diff changeset
   341
  unfolding atomize_imp induct_implies_def .
11678
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   342
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   343
lemma induct_equal_eq: "(x == y) == Trueprop(induct_equal(x, y))"
18816
aebd7f315b92 tuned proofs;
wenzelm
parents: 18595
diff changeset
   344
  unfolding atomize_eq induct_equal_def .
11678
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   345
18456
8cc35e95450a updated auxiliary facts for induct method;
wenzelm
parents: 16417
diff changeset
   346
lemma induct_conj_eq:
8cc35e95450a updated auxiliary facts for induct method;
wenzelm
parents: 16417
diff changeset
   347
  includes meta_conjunction_syntax
8cc35e95450a updated auxiliary facts for induct method;
wenzelm
parents: 16417
diff changeset
   348
  shows "(A && B) == Trueprop(induct_conj(A, B))"
18816
aebd7f315b92 tuned proofs;
wenzelm
parents: 18595
diff changeset
   349
  unfolding atomize_conj induct_conj_def .
11988
8340fb172607 induct_impliesI;
wenzelm
parents: 11848
diff changeset
   350
18456
8cc35e95450a updated auxiliary facts for induct method;
wenzelm
parents: 16417
diff changeset
   351
lemmas induct_atomize = induct_forall_eq induct_implies_eq induct_equal_eq induct_conj_eq
8cc35e95450a updated auxiliary facts for induct method;
wenzelm
parents: 16417
diff changeset
   352
lemmas induct_rulify [symmetric, standard] = induct_atomize
8cc35e95450a updated auxiliary facts for induct method;
wenzelm
parents: 16417
diff changeset
   353
lemmas induct_rulify_fallback =
8cc35e95450a updated auxiliary facts for induct method;
wenzelm
parents: 16417
diff changeset
   354
  induct_forall_def induct_implies_def induct_equal_def induct_conj_def
11678
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   355
18456
8cc35e95450a updated auxiliary facts for induct method;
wenzelm
parents: 16417
diff changeset
   356
hide const induct_forall induct_implies induct_equal induct_conj
11678
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   357
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   358
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   359
text {* Method setup. *}
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   360
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   361
ML {*
24830
a7b3ab44d993 moved Pure/Isar/induct_attrib.ML and Provers/induct_method.ML to Tools/induct.ML;
wenzelm
parents: 24097
diff changeset
   362
  structure Induct = InductFun
a7b3ab44d993 moved Pure/Isar/induct_attrib.ML and Provers/induct_method.ML to Tools/induct.ML;
wenzelm
parents: 24097
diff changeset
   363
  (
22139
539a63b98f76 tuned ML setup;
wenzelm
parents: 21539
diff changeset
   364
    val cases_default = @{thm case_split}
539a63b98f76 tuned ML setup;
wenzelm
parents: 21539
diff changeset
   365
    val atomize = @{thms induct_atomize}
539a63b98f76 tuned ML setup;
wenzelm
parents: 21539
diff changeset
   366
    val rulify = @{thms induct_rulify}
539a63b98f76 tuned ML setup;
wenzelm
parents: 21539
diff changeset
   367
    val rulify_fallback = @{thms induct_rulify_fallback}
24830
a7b3ab44d993 moved Pure/Isar/induct_attrib.ML and Provers/induct_method.ML to Tools/induct.ML;
wenzelm
parents: 24097
diff changeset
   368
  );
11678
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   369
*}
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   370
24830
a7b3ab44d993 moved Pure/Isar/induct_attrib.ML and Provers/induct_method.ML to Tools/induct.ML;
wenzelm
parents: 24097
diff changeset
   371
setup Induct.setup
a7b3ab44d993 moved Pure/Isar/induct_attrib.ML and Provers/induct_method.ML to Tools/induct.ML;
wenzelm
parents: 24097
diff changeset
   372
declare case_split [cases type: o]
11678
6aa3e2d26683 moved atomize stuff to theory IFOL;
wenzelm
parents: 11096
diff changeset
   373
4854
d1850e0964f2 tuned setup;
wenzelm
parents: 4793
diff changeset
   374
end