src/CCL/Term.thy
author haftmann
Sat, 19 Dec 2015 17:03:17 +0100
changeset 61891 76189756ff65
parent 60770 240563fbf41d
child 62020 5d208fd2507d
permissions -rw-r--r--
documentation on last state of the art concerning interpretation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
     1
(*  Title:      CCL/Term.thy
1474
3f7d67927fe2 expanded tabs
clasohm
parents: 1149
diff changeset
     2
    Author:     Martin Coen
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     3
    Copyright   1993  University of Cambridge
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
     6
section \<open>Definitions of usual program constructs in CCL\<close>
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
     7
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
     8
theory Term
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
     9
imports CCL
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
    10
begin
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    11
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    12
consts
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    13
998
91d09e262799 Gave tighter priorities to if, napply and the let-forms to
lcp
parents: 610
diff changeset
    14
  one        :: "i"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    15
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    16
  "if"       :: "[i,i,i]\<Rightarrow>i"           ("(3if _/ then _/ else _)" [0,0,60] 60)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    18
  inl        :: "i\<Rightarrow>i"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    19
  inr        :: "i\<Rightarrow>i"
60555
51a6997b1384 support 'when' statement, which corresponds to 'presume';
wenzelm
parents: 59498
diff changeset
    20
  "when"     :: "[i,i\<Rightarrow>i,i\<Rightarrow>i]\<Rightarrow>i"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    21
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    22
  split      :: "[i,[i,i]\<Rightarrow>i]\<Rightarrow>i"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    23
  fst        :: "i\<Rightarrow>i"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    24
  snd        :: "i\<Rightarrow>i"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    25
  thd        :: "i\<Rightarrow>i"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    26
998
91d09e262799 Gave tighter priorities to if, napply and the let-forms to
lcp
parents: 610
diff changeset
    27
  zero       :: "i"
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    28
  succ       :: "i\<Rightarrow>i"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    29
  ncase      :: "[i,i,i\<Rightarrow>i]\<Rightarrow>i"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    30
  nrec       :: "[i,i,[i,i]\<Rightarrow>i]\<Rightarrow>i"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    31
998
91d09e262799 Gave tighter priorities to if, napply and the let-forms to
lcp
parents: 610
diff changeset
    32
  nil        :: "i"                        ("([])")
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    33
  cons       :: "[i,i]\<Rightarrow>i"                 (infixr "$" 80)
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    34
  lcase      :: "[i,i,[i,i]\<Rightarrow>i]\<Rightarrow>i"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    35
  lrec       :: "[i,i,[i,i,i]\<Rightarrow>i]\<Rightarrow>i"
998
91d09e262799 Gave tighter priorities to if, napply and the let-forms to
lcp
parents: 610
diff changeset
    36
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    37
  "let"      :: "[i,i\<Rightarrow>i]\<Rightarrow>i"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    38
  letrec     :: "[[i,i\<Rightarrow>i]\<Rightarrow>i,(i\<Rightarrow>i)\<Rightarrow>i]\<Rightarrow>i"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    39
  letrec2    :: "[[i,i,i\<Rightarrow>i\<Rightarrow>i]\<Rightarrow>i,(i\<Rightarrow>i\<Rightarrow>i)\<Rightarrow>i]\<Rightarrow>i"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    40
  letrec3    :: "[[i,i,i,i\<Rightarrow>i\<Rightarrow>i\<Rightarrow>i]\<Rightarrow>i,(i\<Rightarrow>i\<Rightarrow>i\<Rightarrow>i)\<Rightarrow>i]\<Rightarrow>i"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    41
14765
bafb24c150c1 proper use of 'syntax';
wenzelm
parents: 3837
diff changeset
    42
syntax
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    43
  "_let"     :: "[id,i,i]\<Rightarrow>i"             ("(3let _ be _/ in _)"
1474
3f7d67927fe2 expanded tabs
clasohm
parents: 1149
diff changeset
    44
                        [0,0,60] 60)
998
91d09e262799 Gave tighter priorities to if, napply and the let-forms to
lcp
parents: 610
diff changeset
    45
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    46
  "_letrec"  :: "[id,id,i,i]\<Rightarrow>i"         ("(3letrec _ _ be _/ in _)"
1474
3f7d67927fe2 expanded tabs
clasohm
parents: 1149
diff changeset
    47
                        [0,0,0,60] 60)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    48
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    49
  "_letrec2" :: "[id,id,id,i,i]\<Rightarrow>i"     ("(3letrec _ _ _ be _/ in _)"
1474
3f7d67927fe2 expanded tabs
clasohm
parents: 1149
diff changeset
    50
                        [0,0,0,0,60] 60)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    51
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
    52
  "_letrec3" :: "[id,id,id,id,i,i]\<Rightarrow>i" ("(3letrec _ _ _ _ be _/ in _)"
1474
3f7d67927fe2 expanded tabs
clasohm
parents: 1149
diff changeset
    53
                        [0,0,0,0,0,60] 60)
998
91d09e262799 Gave tighter priorities to if, napply and the let-forms to
lcp
parents: 610
diff changeset
    54
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
    55
ML \<open>
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    56
(** Quantifier translations: variable binding **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    57
17781
32bb237158a5 print_translation: does not handle _idtdummy;
wenzelm
parents: 17456
diff changeset
    58
(* FIXME does not handle "_idtdummy" *)
49660
de49d9b4d7bc more explicit Syntax_Trans.mark_bound_abs/mark_bound_body: preserve type information for show_markup;
wenzelm
parents: 44241
diff changeset
    59
(* FIXME should use Syntax_Trans.mark_bound, Syntax_Trans.variant_abs' *)
2709
241fffc25284 added comment;
wenzelm
parents: 1474
diff changeset
    60
44241
7943b69f0188 modernized signature of Term.absfree/absdummy;
wenzelm
parents: 42814
diff changeset
    61
fun let_tr [Free x, a, b] = Const(@{const_syntax let},dummyT) $ a $ absfree x b;
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    62
fun let_tr' [a,Abs(id,T,b)] =
42284
326f57825e1a explicit structure Syntax_Trans;
wenzelm
parents: 42156
diff changeset
    63
     let val (id',b') = Syntax_Trans.variant_abs(id,T,b)
35113
1a0c129bb2e0 modernized translations;
wenzelm
parents: 32154
diff changeset
    64
     in Const(@{syntax_const "_let"},dummyT) $ Free(id',T) $ a $ b' end;
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    65
44241
7943b69f0188 modernized signature of Term.absfree/absdummy;
wenzelm
parents: 42814
diff changeset
    66
fun letrec_tr [Free f, Free x, a, b] =
7943b69f0188 modernized signature of Term.absfree/absdummy;
wenzelm
parents: 42814
diff changeset
    67
      Const(@{const_syntax letrec}, dummyT) $ absfree x (absfree f a) $ absfree f b;
7943b69f0188 modernized signature of Term.absfree/absdummy;
wenzelm
parents: 42814
diff changeset
    68
fun letrec2_tr [Free f, Free x, Free y, a, b] =
7943b69f0188 modernized signature of Term.absfree/absdummy;
wenzelm
parents: 42814
diff changeset
    69
      Const(@{const_syntax letrec2}, dummyT) $ absfree x (absfree y (absfree f a)) $ absfree f b;
7943b69f0188 modernized signature of Term.absfree/absdummy;
wenzelm
parents: 42814
diff changeset
    70
fun letrec3_tr [Free f, Free x, Free y, Free z, a, b] =
7943b69f0188 modernized signature of Term.absfree/absdummy;
wenzelm
parents: 42814
diff changeset
    71
      Const(@{const_syntax letrec3}, dummyT) $
7943b69f0188 modernized signature of Term.absfree/absdummy;
wenzelm
parents: 42814
diff changeset
    72
        absfree x (absfree y (absfree z (absfree f a))) $ absfree f b;
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    73
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    74
fun letrec_tr' [Abs(x,T,Abs(f,S,a)),Abs(ff,SS,b)] =
42284
326f57825e1a explicit structure Syntax_Trans;
wenzelm
parents: 42156
diff changeset
    75
     let val (f',b') = Syntax_Trans.variant_abs(ff,SS,b)
326f57825e1a explicit structure Syntax_Trans;
wenzelm
parents: 42156
diff changeset
    76
         val (_,a'') = Syntax_Trans.variant_abs(f,S,a)
326f57825e1a explicit structure Syntax_Trans;
wenzelm
parents: 42156
diff changeset
    77
         val (x',a') = Syntax_Trans.variant_abs(x,T,a'')
35113
1a0c129bb2e0 modernized translations;
wenzelm
parents: 32154
diff changeset
    78
     in Const(@{syntax_const "_letrec"},dummyT) $ Free(f',SS) $ Free(x',T) $ a' $ b' end;
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    79
fun letrec2_tr' [Abs(x,T,Abs(y,U,Abs(f,S,a))),Abs(ff,SS,b)] =
42284
326f57825e1a explicit structure Syntax_Trans;
wenzelm
parents: 42156
diff changeset
    80
     let val (f',b') = Syntax_Trans.variant_abs(ff,SS,b)
326f57825e1a explicit structure Syntax_Trans;
wenzelm
parents: 42156
diff changeset
    81
         val ( _,a1) = Syntax_Trans.variant_abs(f,S,a)
326f57825e1a explicit structure Syntax_Trans;
wenzelm
parents: 42156
diff changeset
    82
         val (y',a2) = Syntax_Trans.variant_abs(y,U,a1)
326f57825e1a explicit structure Syntax_Trans;
wenzelm
parents: 42156
diff changeset
    83
         val (x',a') = Syntax_Trans.variant_abs(x,T,a2)
35113
1a0c129bb2e0 modernized translations;
wenzelm
parents: 32154
diff changeset
    84
     in Const(@{syntax_const "_letrec2"},dummyT) $ Free(f',SS) $ Free(x',T) $ Free(y',U) $ a' $ b'
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    85
      end;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    86
fun letrec3_tr' [Abs(x,T,Abs(y,U,Abs(z,V,Abs(f,S,a)))),Abs(ff,SS,b)] =
42284
326f57825e1a explicit structure Syntax_Trans;
wenzelm
parents: 42156
diff changeset
    87
     let val (f',b') = Syntax_Trans.variant_abs(ff,SS,b)
326f57825e1a explicit structure Syntax_Trans;
wenzelm
parents: 42156
diff changeset
    88
         val ( _,a1) = Syntax_Trans.variant_abs(f,S,a)
326f57825e1a explicit structure Syntax_Trans;
wenzelm
parents: 42156
diff changeset
    89
         val (z',a2) = Syntax_Trans.variant_abs(z,V,a1)
326f57825e1a explicit structure Syntax_Trans;
wenzelm
parents: 42156
diff changeset
    90
         val (y',a3) = Syntax_Trans.variant_abs(y,U,a2)
326f57825e1a explicit structure Syntax_Trans;
wenzelm
parents: 42156
diff changeset
    91
         val (x',a') = Syntax_Trans.variant_abs(x,T,a3)
35113
1a0c129bb2e0 modernized translations;
wenzelm
parents: 32154
diff changeset
    92
     in Const(@{syntax_const "_letrec3"},dummyT) $ Free(f',SS) $ Free(x',T) $ Free(y',U) $ Free(z',V) $ a' $ b'
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    93
      end;
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
    94
\<close>
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
    95
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
    96
parse_translation \<open>
52143
36ffe23b25f8 syntax translations always depend on context;
wenzelm
parents: 52037
diff changeset
    97
 [(@{syntax_const "_let"}, K let_tr),
36ffe23b25f8 syntax translations always depend on context;
wenzelm
parents: 52037
diff changeset
    98
  (@{syntax_const "_letrec"}, K letrec_tr),
36ffe23b25f8 syntax translations always depend on context;
wenzelm
parents: 52037
diff changeset
    99
  (@{syntax_const "_letrec2"}, K letrec2_tr),
36ffe23b25f8 syntax translations always depend on context;
wenzelm
parents: 52037
diff changeset
   100
  (@{syntax_const "_letrec3"}, K letrec3_tr)]
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   101
\<close>
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   102
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   103
print_translation \<open>
52143
36ffe23b25f8 syntax translations always depend on context;
wenzelm
parents: 52037
diff changeset
   104
 [(@{const_syntax let}, K let_tr'),
36ffe23b25f8 syntax translations always depend on context;
wenzelm
parents: 52037
diff changeset
   105
  (@{const_syntax letrec}, K letrec_tr'),
36ffe23b25f8 syntax translations always depend on context;
wenzelm
parents: 52037
diff changeset
   106
  (@{const_syntax letrec2}, K letrec2_tr'),
36ffe23b25f8 syntax translations always depend on context;
wenzelm
parents: 52037
diff changeset
   107
  (@{const_syntax letrec3}, K letrec3_tr')]
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   108
\<close>
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   109
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   110
consts
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   111
  napply     :: "[i\<Rightarrow>i,i,i]\<Rightarrow>i"            ("(_ ^ _ ` _)" [56,56,56] 56)
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   112
42156
df219e736a5d modernized specifications -- less axioms;
wenzelm
parents: 42051
diff changeset
   113
defs
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   114
  one_def:                    "one == true"
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   115
  if_def:     "if b then t else u  == case(b, t, u, \<lambda> x y. bot, \<lambda>v. bot)"
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   116
  inl_def:                 "inl(a) == <true,a>"
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   117
  inr_def:                 "inr(b) == <false,b>"
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   118
  when_def:           "when(t,f,g) == split(t, \<lambda>b x. if b then f(x) else g(x))"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   119
  split_def:           "split(t,f) == case(t, bot, bot, f, \<lambda>u. bot)"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   120
  fst_def:                 "fst(t) == split(t, \<lambda>x y. x)"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   121
  snd_def:                 "snd(t) == split(t, \<lambda>x y. y)"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   122
  thd_def:                 "thd(t) == split(t, \<lambda>x p. split(p, \<lambda>y z. z))"
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   123
  zero_def:                  "zero == inl(one)"
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   124
  succ_def:               "succ(n) == inr(n)"
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   125
  ncase_def:         "ncase(n,b,c) == when(n, \<lambda>x. b, \<lambda>y. c(y))"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   126
  nrec_def:          " nrec(n,b,c) == letrec g x be ncase(x, b, \<lambda>y. c(y,g(y))) in g(n)"
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   127
  nil_def:                     "[] == inl(one)"
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   128
  cons_def:                   "h$t == inr(<h,t>)"
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   129
  lcase_def:         "lcase(l,b,c) == when(l, \<lambda>x. b, \<lambda>y. split(y,c))"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   130
  lrec_def:           "lrec(l,b,c) == letrec g x be lcase(x, b, \<lambda>h t. c(h,t,g(t))) in g(l)"
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   131
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   132
  let_def:  "let x be t in f(x) == case(t,f(true),f(false), \<lambda>x y. f(<x,y>), \<lambda>u. f(lam x. u(x)))"
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   133
  letrec_def:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   134
  "letrec g x be h(x,g) in b(g) == b(\<lambda>x. fix(\<lambda>f. lam x. h(x,\<lambda>y. f`y))`x)"
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   135
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   136
  letrec2_def:  "letrec g x y be h(x,y,g) in f(g)==
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   137
               letrec g' p be split(p,\<lambda>x y. h(x,y,\<lambda>u v. g'(<u,v>)))
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   138
                          in f(\<lambda>x y. g'(<x,y>))"
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   139
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   140
  letrec3_def:  "letrec g x y z be h(x,y,z,g) in f(g) ==
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   141
             letrec g' p be split(p,\<lambda>x xs. split(xs,\<lambda>y z. h(x,y,z,\<lambda>u v w. g'(<u,<v,w>>))))
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   142
                          in f(\<lambda>x y z. g'(<x,<y,z>>))"
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   143
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   144
  napply_def: "f ^n` a == nrec(n,a,\<lambda>x g. f(g))"
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   145
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   146
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   147
lemmas simp_can_defs = one_def inl_def inr_def
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   148
  and simp_ncan_defs = if_def when_def split_def fst_def snd_def thd_def
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   149
lemmas simp_defs = simp_can_defs simp_ncan_defs
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   150
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   151
lemmas ind_can_defs = zero_def succ_def nil_def cons_def
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   152
  and ind_ncan_defs = ncase_def nrec_def lcase_def lrec_def
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   153
lemmas ind_defs = ind_can_defs ind_ncan_defs
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   154
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   155
lemmas data_defs = simp_defs ind_defs napply_def
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   156
  and genrec_defs = letrec_def letrec2_def letrec3_def
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   157
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   158
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   159
subsection \<open>Beta Rules, including strictness\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   160
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   161
lemma letB: "\<not> t=bot \<Longrightarrow> let x be t in f(x) = f(t)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   162
  apply (unfold let_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   163
  apply (erule rev_mp)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   164
  apply (rule_tac t = "t" in term_case)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   165
      apply (simp_all add: caseBtrue caseBfalse caseBpair caseBlam)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   166
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   167
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   168
lemma letBabot: "let x be bot in f(x) = bot"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   169
  apply (unfold let_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   170
  apply (rule caseBbot)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   171
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   172
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   173
lemma letBbbot: "let x be t in bot = bot"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   174
  apply (unfold let_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   175
  apply (rule_tac t = t in term_case)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   176
      apply (rule caseBbot)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   177
     apply (simp_all add: caseBtrue caseBfalse caseBpair caseBlam)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   178
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   179
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   180
lemma applyB: "(lam x. b(x)) ` a = b(a)"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   181
  apply (unfold apply_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   182
  apply (simp add: caseBtrue caseBfalse caseBpair caseBlam)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   183
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   184
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   185
lemma applyBbot: "bot ` a = bot"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   186
  apply (unfold apply_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   187
  apply (rule caseBbot)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   188
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   189
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   190
lemma fixB: "fix(f) = f(fix(f))"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   191
  apply (unfold fix_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   192
  apply (rule applyB [THEN ssubst], rule refl)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   193
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   194
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   195
lemma letrecB:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   196
    "letrec g x be h(x,g) in g(a) = h(a,\<lambda>y. letrec g x be h(x,g) in g(y))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   197
  apply (unfold letrec_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   198
  apply (rule fixB [THEN ssubst], rule applyB [THEN ssubst], rule refl)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   199
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   200
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   201
lemmas rawBs = caseBs applyB applyBbot
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   202
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   203
method_setup beta_rl = \<open>
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   204
  Scan.succeed (fn ctxt =>
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   205
    SIMPLE_METHOD' (CHANGED o
59498
50b60f501b05 proper context for resolve_tac, eresolve_tac, dresolve_tac, forward_tac etc.;
wenzelm
parents: 58977
diff changeset
   206
      simp_tac (ctxt addsimps @{thms rawBs} setloop (fn _ => stac ctxt @{thm letrecB}))))
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   207
\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   208
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   209
lemma ifBtrue: "if true then t else u = t"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   210
  and ifBfalse: "if false then t else u = u"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   211
  and ifBbot: "if bot then t else u = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   212
  unfolding data_defs by beta_rl+
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   213
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   214
lemma whenBinl: "when(inl(a),t,u) = t(a)"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   215
  and whenBinr: "when(inr(a),t,u) = u(a)"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   216
  and whenBbot: "when(bot,t,u) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   217
  unfolding data_defs by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   218
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   219
lemma splitB: "split(<a,b>,h) = h(a,b)"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   220
  and splitBbot: "split(bot,h) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   221
  unfolding data_defs by beta_rl+
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   222
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   223
lemma fstB: "fst(<a,b>) = a"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   224
  and fstBbot: "fst(bot) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   225
  unfolding data_defs by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   226
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   227
lemma sndB: "snd(<a,b>) = b"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   228
  and sndBbot: "snd(bot) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   229
  unfolding data_defs by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   230
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   231
lemma thdB: "thd(<a,<b,c>>) = c"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   232
  and thdBbot: "thd(bot) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   233
  unfolding data_defs by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   234
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   235
lemma ncaseBzero: "ncase(zero,t,u) = t"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   236
  and ncaseBsucc: "ncase(succ(n),t,u) = u(n)"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   237
  and ncaseBbot: "ncase(bot,t,u) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   238
  unfolding data_defs by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   239
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   240
lemma nrecBzero: "nrec(zero,t,u) = t"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   241
  and nrecBsucc: "nrec(succ(n),t,u) = u(n,nrec(n,t,u))"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   242
  and nrecBbot: "nrec(bot,t,u) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   243
  unfolding data_defs by beta_rl+
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   244
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   245
lemma lcaseBnil: "lcase([],t,u) = t"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   246
  and lcaseBcons: "lcase(x$xs,t,u) = u(x,xs)"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   247
  and lcaseBbot: "lcase(bot,t,u) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   248
  unfolding data_defs by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   249
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   250
lemma lrecBnil: "lrec([],t,u) = t"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   251
  and lrecBcons: "lrec(x$xs,t,u) = u(x,xs,lrec(xs,t,u))"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   252
  and lrecBbot: "lrec(bot,t,u) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   253
  unfolding data_defs by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   254
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   255
lemma letrec2B:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   256
  "letrec g x y be h(x,y,g) in g(p,q) = h(p,q,\<lambda>u v. letrec g x y be h(x,y,g) in g(u,v))"
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   257
  unfolding data_defs letrec2_def by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   258
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   259
lemma letrec3B:
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   260
  "letrec g x y z be h(x,y,z,g) in g(p,q,r) =
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   261
    h(p,q,r,\<lambda>u v w. letrec g x y z be h(x,y,z,g) in g(u,v,w))"
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   262
  unfolding data_defs letrec3_def by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   263
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   264
lemma napplyBzero: "f^zero`a = a"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   265
  and napplyBsucc: "f^succ(n)`a = f(f^n`a)"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   266
  unfolding data_defs by beta_rl+
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   267
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   268
lemmas termBs = letB applyB applyBbot splitB splitBbot fstB fstBbot
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   269
  sndB sndBbot thdB thdBbot ifBtrue ifBfalse ifBbot whenBinl whenBinr
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   270
  whenBbot ncaseBzero ncaseBsucc ncaseBbot nrecBzero nrecBsucc
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   271
  nrecBbot lcaseBnil lcaseBcons lcaseBbot lrecBnil lrecBcons lrecBbot
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   272
  napplyBzero napplyBsucc
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   273
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   274
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   275
subsection \<open>Constructors are injective\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   276
32154
9721e8e4d48c eliminated adhoc ML code;
wenzelm
parents: 32153
diff changeset
   277
lemma term_injs:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   278
  "(inl(a) = inl(a')) \<longleftrightarrow> (a=a')"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   279
  "(inr(a) = inr(a')) \<longleftrightarrow> (a=a')"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   280
  "(succ(a) = succ(a')) \<longleftrightarrow> (a=a')"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   281
  "(a$b = a'$b') \<longleftrightarrow> (a=a' \<and> b=b')"
32154
9721e8e4d48c eliminated adhoc ML code;
wenzelm
parents: 32153
diff changeset
   282
  by (inj_rl applyB splitB whenBinl whenBinr ncaseBsucc lcaseBcons)
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   283
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   284
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   285
subsection \<open>Constructors are distinct\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   286
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   287
ML \<open>
56199
8e8d28ed7529 tuned signature -- rearranged modules;
wenzelm
parents: 52143
diff changeset
   288
ML_Thms.bind_thms ("term_dstncts",
51670
d721d21e6374 prefer local context;
wenzelm
parents: 49660
diff changeset
   289
  mkall_dstnct_thms @{context} @{thms data_defs} (@{thms ccl_injs} @ @{thms term_injs})
24825
c4f13ab78f9d avoid unnamed infixes;
wenzelm
parents: 24790
diff changeset
   290
    [["bot","inl","inr"], ["bot","zero","succ"], ["bot","nil","cons"]]);
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   291
\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   292
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   293
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   294
subsection \<open>Rules for pre-order @{text "[="}\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   295
32154
9721e8e4d48c eliminated adhoc ML code;
wenzelm
parents: 32153
diff changeset
   296
lemma term_porews:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   297
  "inl(a) [= inl(a') \<longleftrightarrow> a [= a'"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   298
  "inr(b) [= inr(b') \<longleftrightarrow> b [= b'"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   299
  "succ(n) [= succ(n') \<longleftrightarrow> n [= n'"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   300
  "x$xs [= x'$xs' \<longleftrightarrow> x [= x' \<and> xs [= xs'"
32154
9721e8e4d48c eliminated adhoc ML code;
wenzelm
parents: 32153
diff changeset
   301
  by (simp_all add: data_defs ccl_porews)
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   302
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   303
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   304
subsection \<open>Rewriting and Proving\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   305
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   306
ML \<open>
56199
8e8d28ed7529 tuned signature -- rearranged modules;
wenzelm
parents: 52143
diff changeset
   307
  ML_Thms.bind_thms ("term_injDs", XH_to_Ds @{thms term_injs});
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   308
\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   309
20917
803c94363ccc reorderd ML/lemmas (Why!?);
wenzelm
parents: 20140
diff changeset
   310
lemmas term_rews = termBs term_injs term_dstncts ccl_porews term_porews
803c94363ccc reorderd ML/lemmas (Why!?);
wenzelm
parents: 20140
diff changeset
   311
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   312
lemmas [simp] = term_rews
20917
803c94363ccc reorderd ML/lemmas (Why!?);
wenzelm
parents: 20140
diff changeset
   313
lemmas [elim!] = term_dstncts [THEN notE]
803c94363ccc reorderd ML/lemmas (Why!?);
wenzelm
parents: 20140
diff changeset
   314
lemmas [dest!] = term_injDs
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   315
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   316
end