src/LCF/LCF.thy
author wenzelm
Thu Dec 07 00:42:04 2006 +0100 (2006-12-07)
changeset 21687 f689f729afab
parent 19758 093690d4ba60
child 22810 a8455ca995d6
permissions -rw-r--r--
reorganized structure Goal vs. Tactic;
wenzelm@19757
     1
(*  Title:      LCF/LCF.thy
clasohm@0
     2
    ID:         $Id$
clasohm@1474
     3
    Author:     Tobias Nipkow
clasohm@0
     4
    Copyright   1992  University of Cambridge
clasohm@0
     5
*)
clasohm@0
     6
wenzelm@17248
     7
header {* LCF on top of First-Order Logic *}
clasohm@0
     8
wenzelm@17248
     9
theory LCF
wenzelm@17248
    10
imports FOL
wenzelm@17248
    11
begin
clasohm@0
    12
wenzelm@17248
    13
text {* This theory is based on Lawrence Paulson's book Logic and Computation. *}
clasohm@0
    14
wenzelm@17248
    15
subsection {* Natural Deduction Rules for LCF *}
wenzelm@17248
    16
wenzelm@17248
    17
classes cpo < "term"
wenzelm@17248
    18
defaultsort cpo
wenzelm@17248
    19
wenzelm@17248
    20
typedecl tr
wenzelm@17248
    21
typedecl void
wenzelm@17248
    22
typedecl ('a,'b) "*"    (infixl 6)
wenzelm@17248
    23
typedecl ('a,'b) "+"    (infixl 5)
clasohm@0
    24
lcp@283
    25
arities
wenzelm@17248
    26
  fun :: (cpo, cpo) cpo
wenzelm@17248
    27
  "*" :: (cpo, cpo) cpo
wenzelm@17248
    28
  "+" :: (cpo, cpo) cpo
wenzelm@17248
    29
  tr :: cpo
wenzelm@17248
    30
  void :: cpo
clasohm@0
    31
clasohm@0
    32
consts
clasohm@1474
    33
 UU     :: "'a"
wenzelm@17248
    34
 TT     :: "tr"
wenzelm@17248
    35
 FF     :: "tr"
clasohm@1474
    36
 FIX    :: "('a => 'a) => 'a"
clasohm@1474
    37
 FST    :: "'a*'b => 'a"
clasohm@1474
    38
 SND    :: "'a*'b => 'b"
clasohm@0
    39
 INL    :: "'a => 'a+'b"
clasohm@0
    40
 INR    :: "'b => 'a+'b"
clasohm@0
    41
 WHEN   :: "['a=>'c, 'b=>'c, 'a+'b] => 'c"
clasohm@1474
    42
 adm    :: "('a => o) => o"
clasohm@1474
    43
 VOID   :: "void"               ("'(')")
clasohm@1474
    44
 PAIR   :: "['a,'b] => 'a*'b"   ("(1<_,/_>)" [0,0] 100)
clasohm@1474
    45
 COND   :: "[tr,'a,'a] => 'a"   ("(_ =>/ (_ |/ _))" [60,60,60] 60)
clasohm@1474
    46
 "<<"   :: "['a,'a] => o"       (infixl 50)
wenzelm@17248
    47
wenzelm@17248
    48
axioms
clasohm@0
    49
  (** DOMAIN THEORY **)
clasohm@0
    50
wenzelm@17248
    51
  eq_def:        "x=y == x << y & y << x"
clasohm@0
    52
wenzelm@17248
    53
  less_trans:    "[| x << y; y << z |] ==> x << z"
clasohm@0
    54
wenzelm@17248
    55
  less_ext:      "(ALL x. f(x) << g(x)) ==> f << g"
clasohm@0
    56
wenzelm@17248
    57
  mono:          "[| f << g; x << y |] ==> f(x) << g(y)"
clasohm@0
    58
wenzelm@17248
    59
  minimal:       "UU << x"
clasohm@0
    60
wenzelm@17248
    61
  FIX_eq:        "f(FIX(f)) = FIX(f)"
clasohm@0
    62
clasohm@0
    63
  (** TR **)
clasohm@0
    64
wenzelm@17248
    65
  tr_cases:      "p=UU | p=TT | p=FF"
clasohm@0
    66
wenzelm@17248
    67
  not_TT_less_FF: "~ TT << FF"
wenzelm@17248
    68
  not_FF_less_TT: "~ FF << TT"
wenzelm@17248
    69
  not_TT_less_UU: "~ TT << UU"
wenzelm@17248
    70
  not_FF_less_UU: "~ FF << UU"
clasohm@0
    71
wenzelm@17248
    72
  COND_UU:       "UU => x | y  =  UU"
wenzelm@17248
    73
  COND_TT:       "TT => x | y  =  x"
wenzelm@17248
    74
  COND_FF:       "FF => x | y  =  y"
clasohm@0
    75
clasohm@0
    76
  (** PAIRS **)
clasohm@0
    77
wenzelm@17248
    78
  surj_pairing:  "<FST(z),SND(z)> = z"
clasohm@0
    79
wenzelm@17248
    80
  FST:   "FST(<x,y>) = x"
wenzelm@17248
    81
  SND:   "SND(<x,y>) = y"
clasohm@0
    82
clasohm@0
    83
  (*** STRICT SUM ***)
clasohm@0
    84
wenzelm@17248
    85
  INL_DEF: "~x=UU ==> ~INL(x)=UU"
wenzelm@17248
    86
  INR_DEF: "~x=UU ==> ~INR(x)=UU"
clasohm@0
    87
wenzelm@17248
    88
  INL_STRICT: "INL(UU) = UU"
wenzelm@17248
    89
  INR_STRICT: "INR(UU) = UU"
clasohm@0
    90
wenzelm@17248
    91
  WHEN_UU:  "WHEN(f,g,UU) = UU"
wenzelm@17248
    92
  WHEN_INL: "~x=UU ==> WHEN(f,g,INL(x)) = f(x)"
wenzelm@17248
    93
  WHEN_INR: "~x=UU ==> WHEN(f,g,INR(x)) = g(x)"
clasohm@0
    94
wenzelm@17248
    95
  SUM_EXHAUSTION:
clasohm@0
    96
    "z = UU | (EX x. ~x=UU & z = INL(x)) | (EX y. ~y=UU & z = INR(y))"
clasohm@0
    97
clasohm@0
    98
  (** VOID **)
clasohm@0
    99
wenzelm@17248
   100
  void_cases:    "(x::void) = UU"
clasohm@0
   101
clasohm@0
   102
  (** INDUCTION **)
clasohm@0
   103
wenzelm@17248
   104
  induct:        "[| adm(P); P(UU); ALL x. P(x) --> P(f(x)) |] ==> P(FIX(f))"
clasohm@0
   105
clasohm@0
   106
  (** Admissibility / Chain Completeness **)
clasohm@0
   107
  (* All rules can be found on pages 199--200 of Larry's LCF book.
clasohm@0
   108
     Note that "easiness" of types is not taken into account
clasohm@0
   109
     because it cannot be expressed schematically; flatness could be. *)
clasohm@0
   110
wenzelm@17248
   111
  adm_less:      "adm(%x. t(x) << u(x))"
wenzelm@17248
   112
  adm_not_less:  "adm(%x.~ t(x) << u)"
wenzelm@17248
   113
  adm_not_free:  "adm(%x. A)"
wenzelm@17248
   114
  adm_subst:     "adm(P) ==> adm(%x. P(t(x)))"
wenzelm@17248
   115
  adm_conj:      "[| adm(P); adm(Q) |] ==> adm(%x. P(x)&Q(x))"
wenzelm@17248
   116
  adm_disj:      "[| adm(P); adm(Q) |] ==> adm(%x. P(x)|Q(x))"
wenzelm@17248
   117
  adm_imp:       "[| adm(%x.~P(x)); adm(Q) |] ==> adm(%x. P(x)-->Q(x))"
wenzelm@17248
   118
  adm_all:       "(!!y. adm(P(y))) ==> adm(%x. ALL y. P(y,x))"
wenzelm@17248
   119
wenzelm@19757
   120
wenzelm@19757
   121
lemma eq_imp_less1: "x = y ==> x << y"
wenzelm@19757
   122
  by (simp add: eq_def)
wenzelm@19757
   123
wenzelm@19757
   124
lemma eq_imp_less2: "x = y ==> y << x"
wenzelm@19757
   125
  by (simp add: eq_def)
wenzelm@19757
   126
wenzelm@19757
   127
lemma less_refl [simp]: "x << x"
wenzelm@19757
   128
  apply (rule eq_imp_less1)
wenzelm@19757
   129
  apply (rule refl)
wenzelm@19757
   130
  done
wenzelm@19757
   131
wenzelm@19757
   132
lemma less_anti_sym: "[| x << y; y << x |] ==> x=y"
wenzelm@19757
   133
  by (simp add: eq_def)
wenzelm@19757
   134
wenzelm@19757
   135
lemma ext: "(!!x::'a::cpo. f(x)=(g(x)::'b::cpo)) ==> (%x. f(x))=(%x. g(x))"
wenzelm@19757
   136
  apply (rule less_anti_sym)
wenzelm@19757
   137
  apply (rule less_ext)
wenzelm@19757
   138
  apply simp
wenzelm@19757
   139
  apply simp
wenzelm@19757
   140
  done
wenzelm@19757
   141
wenzelm@19757
   142
lemma cong: "[| f=g; x=y |] ==> f(x)=g(y)"
wenzelm@19757
   143
  by simp
wenzelm@19757
   144
wenzelm@19757
   145
lemma less_ap_term: "x << y ==> f(x) << f(y)"
wenzelm@19757
   146
  by (rule less_refl [THEN mono])
wenzelm@19757
   147
wenzelm@19757
   148
lemma less_ap_thm: "f << g ==> f(x) << g(x)"
wenzelm@19757
   149
  by (rule less_refl [THEN [2] mono])
wenzelm@19757
   150
wenzelm@19757
   151
lemma ap_term: "(x::'a::cpo) = y ==> (f(x)::'b::cpo) = f(y)"
wenzelm@19757
   152
  apply (rule cong [OF refl])
wenzelm@19757
   153
  apply simp
wenzelm@19757
   154
  done
wenzelm@19757
   155
wenzelm@19757
   156
lemma ap_thm: "f = g ==> f(x) = g(x)"
wenzelm@19757
   157
  apply (erule cong)
wenzelm@19757
   158
  apply (rule refl)
wenzelm@19757
   159
  done
wenzelm@19757
   160
wenzelm@19757
   161
wenzelm@19757
   162
lemma UU_abs: "(%x::'a::cpo. UU) = UU"
wenzelm@19757
   163
  apply (rule less_anti_sym)
wenzelm@19757
   164
  prefer 2
wenzelm@19757
   165
  apply (rule minimal)
wenzelm@19757
   166
  apply (rule less_ext)
wenzelm@19757
   167
  apply (rule allI)
wenzelm@19757
   168
  apply (rule minimal)
wenzelm@19757
   169
  done
wenzelm@19757
   170
wenzelm@19757
   171
lemma UU_app: "UU(x) = UU"
wenzelm@19757
   172
  by (rule UU_abs [symmetric, THEN ap_thm])
wenzelm@19757
   173
wenzelm@19757
   174
lemma less_UU: "x << UU ==> x=UU"
wenzelm@19757
   175
  apply (rule less_anti_sym)
wenzelm@19757
   176
  apply assumption
wenzelm@19757
   177
  apply (rule minimal)
wenzelm@19757
   178
  done
wenzelm@17248
   179
wenzelm@19757
   180
lemma tr_induct: "[| P(UU); P(TT); P(FF) |] ==> ALL b. P(b)"
wenzelm@19757
   181
  apply (rule allI)
wenzelm@19757
   182
  apply (rule mp)
wenzelm@19757
   183
  apply (rule_tac [2] p = b in tr_cases)
wenzelm@19757
   184
  apply blast
wenzelm@19757
   185
  done
wenzelm@19757
   186
wenzelm@19757
   187
lemma Contrapos: "~ B ==> (A ==> B) ==> ~A"
wenzelm@19757
   188
  by blast
wenzelm@19757
   189
wenzelm@19757
   190
lemma not_less_imp_not_eq1: "~ x << y \<Longrightarrow> x \<noteq> y"
wenzelm@19757
   191
  apply (erule Contrapos)
wenzelm@19757
   192
  apply simp
wenzelm@19757
   193
  done
wenzelm@19757
   194
wenzelm@19757
   195
lemma not_less_imp_not_eq2: "~ y << x \<Longrightarrow> x \<noteq> y"
wenzelm@19757
   196
  apply (erule Contrapos)
wenzelm@19757
   197
  apply simp
wenzelm@19757
   198
  done
wenzelm@19757
   199
wenzelm@19757
   200
lemma not_UU_eq_TT: "UU \<noteq> TT"
wenzelm@19757
   201
  by (rule not_less_imp_not_eq2) (rule not_TT_less_UU)
wenzelm@19757
   202
lemma not_UU_eq_FF: "UU \<noteq> FF"
wenzelm@19757
   203
  by (rule not_less_imp_not_eq2) (rule not_FF_less_UU)
wenzelm@19757
   204
lemma not_TT_eq_UU: "TT \<noteq> UU"
wenzelm@19757
   205
  by (rule not_less_imp_not_eq1) (rule not_TT_less_UU)
wenzelm@19757
   206
lemma not_TT_eq_FF: "TT \<noteq> FF"
wenzelm@19757
   207
  by (rule not_less_imp_not_eq1) (rule not_TT_less_FF)
wenzelm@19757
   208
lemma not_FF_eq_UU: "FF \<noteq> UU"
wenzelm@19757
   209
  by (rule not_less_imp_not_eq1) (rule not_FF_less_UU)
wenzelm@19757
   210
lemma not_FF_eq_TT: "FF \<noteq> TT"
wenzelm@19757
   211
  by (rule not_less_imp_not_eq1) (rule not_FF_less_TT)
wenzelm@19757
   212
wenzelm@19757
   213
wenzelm@19757
   214
lemma COND_cases_iff [rule_format]:
wenzelm@19757
   215
    "ALL b. P(b=>x|y) <-> (b=UU-->P(UU)) & (b=TT-->P(x)) & (b=FF-->P(y))"
wenzelm@19757
   216
  apply (insert not_UU_eq_TT not_UU_eq_FF not_TT_eq_UU
wenzelm@19757
   217
    not_TT_eq_FF not_FF_eq_UU not_FF_eq_TT)
wenzelm@19757
   218
  apply (rule tr_induct)
wenzelm@19757
   219
  apply (simplesubst COND_UU)
wenzelm@19757
   220
  apply blast
wenzelm@19757
   221
  apply (simplesubst COND_TT)
wenzelm@19757
   222
  apply blast
wenzelm@19757
   223
  apply (simplesubst COND_FF)
wenzelm@19757
   224
  apply blast
wenzelm@19757
   225
  done
wenzelm@19757
   226
wenzelm@19757
   227
lemma COND_cases: 
wenzelm@19757
   228
  "[| x = UU --> P(UU); x = TT --> P(xa); x = FF --> P(y) |] ==> P(x => xa | y)"
wenzelm@19757
   229
  apply (rule COND_cases_iff [THEN iffD2])
wenzelm@19757
   230
  apply blast
wenzelm@19757
   231
  done
wenzelm@19757
   232
wenzelm@19757
   233
lemmas [simp] =
wenzelm@19757
   234
  minimal
wenzelm@19757
   235
  UU_app
wenzelm@19757
   236
  UU_app [THEN ap_thm]
wenzelm@19757
   237
  UU_app [THEN ap_thm, THEN ap_thm]
wenzelm@19757
   238
  not_TT_less_FF not_FF_less_TT not_TT_less_UU not_FF_less_UU not_UU_eq_TT
wenzelm@19757
   239
  not_UU_eq_FF not_TT_eq_UU not_TT_eq_FF not_FF_eq_UU not_FF_eq_TT
wenzelm@19757
   240
  COND_UU COND_TT COND_FF
wenzelm@19757
   241
  surj_pairing FST SND
wenzelm@17248
   242
wenzelm@17248
   243
wenzelm@17248
   244
subsection {* Ordered pairs and products *}
wenzelm@17248
   245
wenzelm@19757
   246
lemma expand_all_PROD: "(ALL p. P(p)) <-> (ALL x y. P(<x,y>))"
wenzelm@19757
   247
  apply (rule iffI)
wenzelm@19757
   248
  apply blast
wenzelm@19757
   249
  apply (rule allI)
wenzelm@19757
   250
  apply (rule surj_pairing [THEN subst])
wenzelm@19757
   251
  apply blast
wenzelm@19757
   252
  done
wenzelm@19757
   253
wenzelm@19757
   254
lemma PROD_less: "(p::'a*'b) << q <-> FST(p) << FST(q) & SND(p) << SND(q)"
wenzelm@19757
   255
  apply (rule iffI)
wenzelm@19757
   256
  apply (rule conjI)
wenzelm@19757
   257
  apply (erule less_ap_term)
wenzelm@19757
   258
  apply (erule less_ap_term)
wenzelm@19757
   259
  apply (erule conjE)
wenzelm@19757
   260
  apply (rule surj_pairing [of p, THEN subst])
wenzelm@19757
   261
  apply (rule surj_pairing [of q, THEN subst])
wenzelm@19757
   262
  apply (rule mono, erule less_ap_term, assumption)
wenzelm@19757
   263
  done
wenzelm@19757
   264
wenzelm@19757
   265
lemma PROD_eq: "p=q <-> FST(p)=FST(q) & SND(p)=SND(q)"
wenzelm@19757
   266
  apply (rule iffI)
wenzelm@19757
   267
  apply simp
wenzelm@19757
   268
  apply (unfold eq_def)
wenzelm@19757
   269
  apply (simp add: PROD_less)
wenzelm@19757
   270
  done
wenzelm@19757
   271
wenzelm@19757
   272
lemma PAIR_less [simp]: "<a,b> << <c,d> <-> a<<c & b<<d"
wenzelm@19757
   273
  by (simp add: PROD_less)
wenzelm@19757
   274
wenzelm@19757
   275
lemma PAIR_eq [simp]: "<a,b> = <c,d> <-> a=c & b=d"
wenzelm@19757
   276
  by (simp add: PROD_eq)
wenzelm@19757
   277
wenzelm@19757
   278
lemma UU_is_UU_UU [simp]: "<UU,UU> = UU"
wenzelm@19757
   279
  by (rule less_UU) (simp add: PROD_less)
wenzelm@19757
   280
wenzelm@19757
   281
lemma FST_STRICT [simp]: "FST(UU) = UU"
wenzelm@19757
   282
  apply (rule subst [OF UU_is_UU_UU])
wenzelm@19757
   283
  apply (simp del: UU_is_UU_UU)
wenzelm@19757
   284
  done
wenzelm@19757
   285
wenzelm@19757
   286
lemma SND_STRICT [simp]: "SND(UU) = UU"
wenzelm@19757
   287
  apply (rule subst [OF UU_is_UU_UU])
wenzelm@19757
   288
  apply (simp del: UU_is_UU_UU)
wenzelm@19757
   289
  done
wenzelm@17248
   290
wenzelm@17248
   291
wenzelm@17248
   292
subsection {* Fixedpoint theory *}
wenzelm@17248
   293
wenzelm@19757
   294
lemma adm_eq: "adm(%x. t(x)=(u(x)::'a::cpo))"
wenzelm@19757
   295
  apply (unfold eq_def)
wenzelm@19757
   296
  apply (rule adm_conj adm_less)+
wenzelm@19757
   297
  done
wenzelm@19757
   298
wenzelm@19757
   299
lemma adm_not_not: "adm(P) ==> adm(%x.~~P(x))"
wenzelm@19757
   300
  by simp
wenzelm@19757
   301
wenzelm@19757
   302
lemma not_eq_TT: "ALL p. ~p=TT <-> (p=FF | p=UU)"
wenzelm@19757
   303
  and not_eq_FF: "ALL p. ~p=FF <-> (p=TT | p=UU)"
wenzelm@19757
   304
  and not_eq_UU: "ALL p. ~p=UU <-> (p=TT | p=FF)"
wenzelm@19757
   305
  by (rule tr_induct, simp_all)+
wenzelm@19757
   306
wenzelm@19757
   307
lemma adm_not_eq_tr: "ALL p::tr. adm(%x. ~t(x)=p)"
wenzelm@19757
   308
  apply (rule tr_induct)
wenzelm@19757
   309
  apply (simp_all add: not_eq_TT not_eq_FF not_eq_UU)
wenzelm@19757
   310
  apply (rule adm_disj adm_eq)+
wenzelm@19757
   311
  done
wenzelm@19757
   312
wenzelm@19757
   313
lemmas adm_lemmas =
wenzelm@19757
   314
  adm_not_free adm_eq adm_less adm_not_less
wenzelm@19757
   315
  adm_not_eq_tr adm_conj adm_disj adm_imp adm_all
wenzelm@19757
   316
wenzelm@19757
   317
wenzelm@19757
   318
ML {*
wenzelm@19757
   319
local
wenzelm@19757
   320
  val adm_lemmas = thms "adm_lemmas"
wenzelm@19757
   321
  val induct = thm "induct"
wenzelm@19757
   322
in
wenzelm@19757
   323
  fun induct_tac v i =
wenzelm@19757
   324
    res_inst_tac[("f",v)] induct i THEN REPEAT (resolve_tac adm_lemmas i)
wenzelm@19757
   325
end
wenzelm@19757
   326
*}
wenzelm@19757
   327
wenzelm@19757
   328
lemma least_FIX: "f(p) = p ==> FIX(f) << p"
wenzelm@19757
   329
  apply (tactic {* induct_tac "f" 1 *})
wenzelm@19757
   330
  apply (rule minimal)
wenzelm@19757
   331
  apply (intro strip)
wenzelm@19757
   332
  apply (erule subst)
wenzelm@19757
   333
  apply (erule less_ap_term)
wenzelm@19757
   334
  done
wenzelm@19757
   335
wenzelm@19757
   336
lemma lfp_is_FIX:
wenzelm@19757
   337
  assumes 1: "f(p) = p"
wenzelm@19757
   338
    and 2: "ALL q. f(q)=q --> p << q"
wenzelm@19757
   339
  shows "p = FIX(f)"
wenzelm@19757
   340
  apply (rule less_anti_sym)
wenzelm@19757
   341
  apply (rule 2 [THEN spec, THEN mp])
wenzelm@19757
   342
  apply (rule FIX_eq)
wenzelm@19757
   343
  apply (rule least_FIX)
wenzelm@19757
   344
  apply (rule 1)
wenzelm@19757
   345
  done
wenzelm@19757
   346
wenzelm@19757
   347
wenzelm@19757
   348
lemma FIX_pair: "<FIX(f),FIX(g)> = FIX(%p.<f(FST(p)),g(SND(p))>)"
wenzelm@19757
   349
  apply (rule lfp_is_FIX)
wenzelm@19757
   350
  apply (simp add: FIX_eq [of f] FIX_eq [of g])
wenzelm@19757
   351
  apply (intro strip)
wenzelm@19757
   352
  apply (simp add: PROD_less)
wenzelm@19757
   353
  apply (rule conjI)
wenzelm@19757
   354
  apply (rule least_FIX)
wenzelm@19757
   355
  apply (erule subst, rule FST [symmetric])
wenzelm@19757
   356
  apply (rule least_FIX)
wenzelm@19757
   357
  apply (erule subst, rule SND [symmetric])
wenzelm@19757
   358
  done
wenzelm@19757
   359
wenzelm@19757
   360
lemma FIX1: "FIX(f) = FST(FIX(%p. <f(FST(p)),g(SND(p))>))"
wenzelm@19757
   361
  by (rule FIX_pair [unfolded PROD_eq FST SND, THEN conjunct1])
wenzelm@19757
   362
wenzelm@19757
   363
lemma FIX2: "FIX(g) = SND(FIX(%p. <f(FST(p)),g(SND(p))>))"
wenzelm@19757
   364
  by (rule FIX_pair [unfolded PROD_eq FST SND, THEN conjunct2])
wenzelm@19757
   365
wenzelm@19757
   366
lemma induct2:
wenzelm@19757
   367
  assumes 1: "adm(%p. P(FST(p),SND(p)))"
wenzelm@19757
   368
    and 2: "P(UU::'a,UU::'b)"
wenzelm@19757
   369
    and 3: "ALL x y. P(x,y) --> P(f(x),g(y))"
wenzelm@19757
   370
  shows "P(FIX(f),FIX(g))"
wenzelm@19757
   371
  apply (rule FIX1 [THEN ssubst, of _ f g])
wenzelm@19757
   372
  apply (rule FIX2 [THEN ssubst, of _ f g])
wenzelm@19758
   373
  apply (rule induct [where ?f = "%x. <f(FST(x)),g(SND(x))>"])
wenzelm@19758
   374
  apply (rule 1)
wenzelm@19757
   375
  apply simp
wenzelm@19757
   376
  apply (rule 2)
wenzelm@19757
   377
  apply (simp add: expand_all_PROD)
wenzelm@19757
   378
  apply (rule 3)
wenzelm@19757
   379
  done
wenzelm@19757
   380
wenzelm@19757
   381
ML {*
wenzelm@19757
   382
local
wenzelm@19757
   383
  val induct2 = thm "induct2"
wenzelm@19757
   384
  val adm_lemmas = thms "adm_lemmas"
wenzelm@19757
   385
in
wenzelm@19757
   386
wenzelm@19757
   387
fun induct2_tac (f,g) i =
wenzelm@19757
   388
  res_inst_tac[("f",f),("g",g)] induct2 i THEN
wenzelm@19757
   389
  REPEAT(resolve_tac adm_lemmas i)
wenzelm@17248
   390
clasohm@0
   391
end
wenzelm@19757
   392
*}
wenzelm@19757
   393
wenzelm@19757
   394
end