src/CCL/Term.thy
author wenzelm
Sun, 25 Aug 2024 15:07:22 +0200
changeset 80761 bc936d3d8b45
parent 80754 701912f5645a
child 80914 d97fdabd9e2b
permissions -rw-r--r--
tuned, following be8c0e039a5e;
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
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    12
definition one :: "i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    13
  where "one == true"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    14
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    15
definition "if" :: "[i,i,i]\<Rightarrow>i"  ("(3if _/ then _/ else _)" [0,0,60] 60)
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    16
  where "if b then t else u  == case(b, t, u, \<lambda> x y. bot, \<lambda>v. bot)"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    18
definition inl :: "i\<Rightarrow>i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    19
  where "inl(a) == <true,a>"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    21
definition inr :: "i\<Rightarrow>i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    22
  where "inr(b) == <false,b>"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    23
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    24
definition split :: "[i,[i,i]\<Rightarrow>i]\<Rightarrow>i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    25
  where "split(t,f) == case(t, bot, bot, f, \<lambda>u. bot)"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    26
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    27
definition "when" :: "[i,i\<Rightarrow>i,i\<Rightarrow>i]\<Rightarrow>i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    28
  where "when(t,f,g) == split(t, \<lambda>b x. if b then f(x) else g(x))"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    29
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    30
definition fst :: "i\<Rightarrow>i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    31
  where "fst(t) == split(t, \<lambda>x y. x)"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    32
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    33
definition snd :: "i\<Rightarrow>i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    34
  where "snd(t) == split(t, \<lambda>x y. y)"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    35
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    36
definition thd :: "i\<Rightarrow>i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    37
  where "thd(t) == split(t, \<lambda>x p. split(p, \<lambda>y z. z))"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    38
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    39
definition zero :: "i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    40
  where "zero == inl(one)"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    41
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    42
definition succ :: "i\<Rightarrow>i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    43
  where "succ(n) == inr(n)"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    44
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    45
definition ncase :: "[i,i,i\<Rightarrow>i]\<Rightarrow>i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    46
  where "ncase(n,b,c) == when(n, \<lambda>x. b, \<lambda>y. c(y))"
998
91d09e262799 Gave tighter priorities to if, napply and the let-forms to
lcp
parents: 610
diff changeset
    47
74443
dbf68dbacaff clarified 'let' syntax: avoid conflict with existing 'let' in FOL;
wenzelm
parents: 74441
diff changeset
    48
definition "let1" :: "[i,i\<Rightarrow>i]\<Rightarrow>i"
dbf68dbacaff clarified 'let' syntax: avoid conflict with existing 'let' in FOL;
wenzelm
parents: 74441
diff changeset
    49
  where let_def: "let1(t, f) == case(t,f(true),f(false), \<lambda>x y. f(<x,y>), \<lambda>u. f(lam x. u(x)))"
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    50
74443
dbf68dbacaff clarified 'let' syntax: avoid conflict with existing 'let' in FOL;
wenzelm
parents: 74441
diff changeset
    51
syntax "_let1" :: "[idt,i,i]\<Rightarrow>i"  ("(3let _ be _/ in _)" [0,0,60] 60)
80761
bc936d3d8b45 tuned, following be8c0e039a5e;
wenzelm
parents: 80754
diff changeset
    52
syntax_consts "_let1" == let1
74443
dbf68dbacaff clarified 'let' syntax: avoid conflict with existing 'let' in FOL;
wenzelm
parents: 74441
diff changeset
    53
translations "let x be a in e" == "CONST let1(a, \<lambda>x. e)"
998
91d09e262799 Gave tighter priorities to if, napply and the let-forms to
lcp
parents: 610
diff changeset
    54
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    55
definition letrec :: "[[i,i\<Rightarrow>i]\<Rightarrow>i,(i\<Rightarrow>i)\<Rightarrow>i]\<Rightarrow>i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    56
  where "letrec(h, b) == b(\<lambda>x. fix(\<lambda>f. lam x. h(x,\<lambda>y. f`y))`x)"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    57
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    58
definition letrec2 :: "[[i,i,i\<Rightarrow>i\<Rightarrow>i]\<Rightarrow>i,(i\<Rightarrow>i\<Rightarrow>i)\<Rightarrow>i]\<Rightarrow>i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    59
  where "letrec2 (h, f) ==
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    60
    letrec (\<lambda>p g'. split(p,\<lambda>x y. h(x,y,\<lambda>u v. g'(<u,v>))), \<lambda>g'. f(\<lambda>x y. g'(<x,y>)))"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    61
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    62
definition letrec3 :: "[[i,i,i,i\<Rightarrow>i\<Rightarrow>i\<Rightarrow>i]\<Rightarrow>i,(i\<Rightarrow>i\<Rightarrow>i\<Rightarrow>i)\<Rightarrow>i]\<Rightarrow>i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    63
  where "letrec3 (h, f) ==
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    64
    letrec (\<lambda>p g'. split(p,\<lambda>x xs. split(xs,\<lambda>y z. h(x,y,z,\<lambda>u v w. g'(<u,<v,w>>)))),
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    65
      \<lambda>g'. f(\<lambda>x y z. g'(<x,<y,z>>)))"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    66
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    67
syntax
74444
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    68
  "_letrec" :: "[idt,idt,i,i]\<Rightarrow>i"  ("(3letrec _ _ be _/ in _)" [0,0,0,60] 60)
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    69
  "_letrec2" :: "[idt,idt,idt,i,i]\<Rightarrow>i"  ("(3letrec _ _ _ be _/ in _)" [0,0,0,0,60] 60)
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    70
  "_letrec3" :: "[idt,idt,idt,idt,i,i]\<Rightarrow>i"  ("(3letrec _ _ _ _ be _/ in _)" [0,0,0,0,0,60] 60)
80761
bc936d3d8b45 tuned, following be8c0e039a5e;
wenzelm
parents: 80754
diff changeset
    71
syntax_consts
bc936d3d8b45 tuned, following be8c0e039a5e;
wenzelm
parents: 80754
diff changeset
    72
  "_letrec" == letrec and
bc936d3d8b45 tuned, following be8c0e039a5e;
wenzelm
parents: 80754
diff changeset
    73
  "_letrec2" == letrec2 and
bc936d3d8b45 tuned, following be8c0e039a5e;
wenzelm
parents: 80754
diff changeset
    74
  "_letrec3" == letrec3
74444
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    75
parse_translation \<open>
74441
wenzelm
parents: 69593
diff changeset
    76
  let
74444
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    77
    fun abs_tr t u = Syntax_Trans.abs_tr [t, u];
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    78
    fun letrec_tr [f, x, a, b] =
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    79
      Syntax.const \<^const_syntax>\<open>letrec\<close> $ abs_tr x (abs_tr f a) $ abs_tr f b;
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    80
    fun letrec2_tr [f, x, y, a, b] =
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    81
      Syntax.const \<^const_syntax>\<open>letrec2\<close> $ abs_tr x (abs_tr y (abs_tr f a)) $ abs_tr f b;
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    82
    fun letrec3_tr [f, x, y, z, a, b] =
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    83
      Syntax.const \<^const_syntax>\<open>letrec3\<close> $ abs_tr x (abs_tr y (abs_tr z (abs_tr f a))) $ abs_tr f b;
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    84
  in
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    85
    [(\<^syntax_const>\<open>_letrec\<close>, K letrec_tr),
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    86
     (\<^syntax_const>\<open>_letrec2\<close>, K letrec2_tr),
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    87
     (\<^syntax_const>\<open>_letrec3\<close>, K letrec3_tr)]
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    88
  end
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    89
\<close>
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    90
print_translation \<open>
74441
wenzelm
parents: 69593
diff changeset
    91
  let
74444
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    92
    val bound = Syntax_Trans.mark_bound_abs;
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    93
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    94
    fun letrec_tr' [Abs(x,T,Abs(f,S,a)),Abs(ff,SS,b)] =
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    95
      let
74448
2fd74a2c4e1c clarified signature;
wenzelm
parents: 74445
diff changeset
    96
        val (f',b') = Syntax_Trans.print_abs(ff,SS,b)
2fd74a2c4e1c clarified signature;
wenzelm
parents: 74445
diff changeset
    97
        val (_,a'') = Syntax_Trans.print_abs(f,S,a)
2fd74a2c4e1c clarified signature;
wenzelm
parents: 74445
diff changeset
    98
        val (x',a') = Syntax_Trans.print_abs(x,T,a'')
74444
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
    99
      in
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   100
        Syntax.const \<^syntax_const>\<open>_letrec\<close> $ bound(f',SS) $ bound(x',T) $ a' $ b'
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   101
      end;
74441
wenzelm
parents: 69593
diff changeset
   102
74444
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   103
    fun letrec2_tr' [Abs(x,T,Abs(y,U,Abs(f,S,a))),Abs(ff,SS,b)] =
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   104
      let
74448
2fd74a2c4e1c clarified signature;
wenzelm
parents: 74445
diff changeset
   105
        val (f',b') = Syntax_Trans.print_abs(ff,SS,b)
2fd74a2c4e1c clarified signature;
wenzelm
parents: 74445
diff changeset
   106
        val ( _,a1) = Syntax_Trans.print_abs(f,S,a)
2fd74a2c4e1c clarified signature;
wenzelm
parents: 74445
diff changeset
   107
        val (y',a2) = Syntax_Trans.print_abs(y,U,a1)
2fd74a2c4e1c clarified signature;
wenzelm
parents: 74445
diff changeset
   108
        val (x',a') = Syntax_Trans.print_abs(x,T,a2)
74444
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   109
      in
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   110
        Syntax.const \<^syntax_const>\<open>_letrec2\<close> $ bound(f',SS) $ bound(x',T) $ bound(y',U) $ a' $ b'
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   111
      end;
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   112
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   113
    fun letrec3_tr' [Abs(x,T,Abs(y,U,Abs(z,V,Abs(f,S,a)))),Abs(ff,SS,b)] =
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   114
      let
74448
2fd74a2c4e1c clarified signature;
wenzelm
parents: 74445
diff changeset
   115
        val (f',b') = Syntax_Trans.print_abs(ff,SS,b)
2fd74a2c4e1c clarified signature;
wenzelm
parents: 74445
diff changeset
   116
        val ( _,a1) = Syntax_Trans.print_abs(f,S,a)
2fd74a2c4e1c clarified signature;
wenzelm
parents: 74445
diff changeset
   117
        val (z',a2) = Syntax_Trans.print_abs(z,V,a1)
2fd74a2c4e1c clarified signature;
wenzelm
parents: 74445
diff changeset
   118
        val (y',a3) = Syntax_Trans.print_abs(y,U,a2)
2fd74a2c4e1c clarified signature;
wenzelm
parents: 74445
diff changeset
   119
        val (x',a') = Syntax_Trans.print_abs(x,T,a3)
74444
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   120
      in
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   121
        Syntax.const \<^syntax_const>\<open>_letrec3\<close> $
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   122
          bound(f',SS) $ bound(x',T) $ bound(y',U) $ bound(z',V) $ a' $ b'
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   123
      end;
74441
wenzelm
parents: 69593
diff changeset
   124
  in
74444
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   125
    [(\<^const_syntax>\<open>letrec\<close>, K letrec_tr'),
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   126
     (\<^const_syntax>\<open>letrec2\<close>, K letrec2_tr'),
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   127
     (\<^const_syntax>\<open>letrec3\<close>, K letrec3_tr')]
30995552ea4c more standard binder syntax;
wenzelm
parents: 74443
diff changeset
   128
  end
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   129
\<close>
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   130
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   131
definition nrec :: "[i,i,[i,i]\<Rightarrow>i]\<Rightarrow>i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   132
  where "nrec(n,b,c) == letrec g x be ncase(x, b, \<lambda>y. c(y,g(y))) in g(n)"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   133
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   134
definition nil :: "i"  ("([])")
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   135
  where "[] == inl(one)"
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   136
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   137
definition cons :: "[i,i]\<Rightarrow>i"  (infixr "$" 80)
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   138
  where "h$t == inr(<h,t>)"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   139
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   140
definition lcase :: "[i,i,[i,i]\<Rightarrow>i]\<Rightarrow>i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   141
  where "lcase(l,b,c) == when(l, \<lambda>x. b, \<lambda>y. split(y,c))"
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   142
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   143
definition lrec :: "[i,i,[i,i,i]\<Rightarrow>i]\<Rightarrow>i"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   144
  where "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
   145
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   146
definition napply :: "[i\<Rightarrow>i,i,i]\<Rightarrow>i"  ("(_ ^ _ ` _)" [56,56,56] 56)
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   147
  where "f ^n` a == nrec(n,a,\<lambda>x g. f(g))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   148
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   149
lemmas simp_can_defs = one_def inl_def inr_def
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   150
  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
   151
lemmas simp_defs = simp_can_defs simp_ncan_defs
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   152
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   153
lemmas ind_can_defs = zero_def succ_def nil_def cons_def
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   154
  and ind_ncan_defs = ncase_def nrec_def lcase_def lrec_def
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   155
lemmas ind_defs = ind_can_defs ind_ncan_defs
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   156
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   157
lemmas data_defs = simp_defs ind_defs napply_def
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   158
  and genrec_defs = letrec_def letrec2_def letrec3_def
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   159
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   160
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   161
subsection \<open>Beta Rules, including strictness\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   162
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   163
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
   164
  apply (unfold let_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   165
  apply (erule rev_mp)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   166
  apply (rule_tac t = "t" in term_case)
74445
63a697f1fb8f tuned proofs;
wenzelm
parents: 74444
diff changeset
   167
      apply simp_all
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   168
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   169
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   170
lemma letBabot: "let x be bot in f(x) = bot"
74445
63a697f1fb8f tuned proofs;
wenzelm
parents: 74444
diff changeset
   171
  unfolding let_def by (rule caseBbot)
20140
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)
74445
63a697f1fb8f tuned proofs;
wenzelm
parents: 74444
diff changeset
   177
     apply simp_all
20140
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)"
74445
63a697f1fb8f tuned proofs;
wenzelm
parents: 74444
diff changeset
   181
  by (simp add: apply_def)
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   182
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   183
lemma applyBbot: "bot ` a = bot"
74445
63a697f1fb8f tuned proofs;
wenzelm
parents: 74444
diff changeset
   184
  unfolding apply_def by (rule caseBbot)
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   185
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   186
lemma fixB: "fix(f) = f(fix(f))"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   187
  apply (unfold fix_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   188
  apply (rule applyB [THEN ssubst], rule refl)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   189
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   190
74445
63a697f1fb8f tuned proofs;
wenzelm
parents: 74444
diff changeset
   191
lemma letrecB: "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
   192
  apply (unfold letrec_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   193
  apply (rule fixB [THEN ssubst], rule applyB [THEN ssubst], rule refl)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   194
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   195
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   196
lemmas rawBs = caseBs applyB applyBbot
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   197
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   198
method_setup beta_rl = \<open>
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   199
  Scan.succeed (fn ctxt =>
74445
63a697f1fb8f tuned proofs;
wenzelm
parents: 74444
diff changeset
   200
    let val ctxt' = Context_Position.set_visible false ctxt in
63a697f1fb8f tuned proofs;
wenzelm
parents: 74444
diff changeset
   201
      SIMPLE_METHOD' (CHANGED o
63a697f1fb8f tuned proofs;
wenzelm
parents: 74444
diff changeset
   202
        simp_tac (ctxt' addsimps @{thms rawBs} setloop (fn _ => stac ctxt @{thm letrecB})))
63a697f1fb8f tuned proofs;
wenzelm
parents: 74444
diff changeset
   203
    end)
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   204
\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   205
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   206
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
   207
  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
   208
  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
   209
  unfolding data_defs by beta_rl+
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   210
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   211
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
   212
  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
   213
  and whenBbot: "when(bot,t,u) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   214
  unfolding data_defs by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   215
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   216
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
   217
  and splitBbot: "split(bot,h) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   218
  unfolding data_defs by beta_rl+
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
   219
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   220
lemma fstB: "fst(<a,b>) = a"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   221
  and fstBbot: "fst(bot) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   222
  unfolding data_defs by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   223
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   224
lemma sndB: "snd(<a,b>) = b"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   225
  and sndBbot: "snd(bot) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   226
  unfolding data_defs by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   227
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   228
lemma thdB: "thd(<a,<b,c>>) = c"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   229
  and thdBbot: "thd(bot) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   230
  unfolding data_defs by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   231
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   232
lemma ncaseBzero: "ncase(zero,t,u) = t"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   233
  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
   234
  and ncaseBbot: "ncase(bot,t,u) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   235
  unfolding data_defs by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   236
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   237
lemma nrecBzero: "nrec(zero,t,u) = t"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   238
  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
   239
  and nrecBbot: "nrec(bot,t,u) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   240
  unfolding data_defs by beta_rl+
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   241
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   242
lemma lcaseBnil: "lcase([],t,u) = t"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   243
  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
   244
  and lcaseBbot: "lcase(bot,t,u) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   245
  unfolding data_defs by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   246
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   247
lemma lrecBnil: "lrec([],t,u) = t"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   248
  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
   249
  and lrecBbot: "lrec(bot,t,u) = bot"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   250
  unfolding data_defs by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   251
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   252
lemma letrec2B:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   253
  "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
   254
  unfolding data_defs letrec2_def by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   255
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   256
lemma letrec3B:
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   257
  "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
   258
    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
   259
  unfolding data_defs letrec3_def by beta_rl+
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   260
32153
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   261
lemma napplyBzero: "f^zero`a = a"
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   262
  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
   263
  unfolding data_defs by beta_rl+
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   264
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   265
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
   266
  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
   267
  whenBbot ncaseBzero ncaseBsucc ncaseBbot nrecBzero nrecBsucc
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   268
  nrecBbot lcaseBnil lcaseBcons lcaseBbot lrecBnil lrecBcons lrecBbot
a0e57fb1b930 misc modernization: proper method setup instead of adhoc ML proofs;
wenzelm
parents: 32010
diff changeset
   269
  napplyBzero napplyBsucc
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   270
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   271
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   272
subsection \<open>Constructors are injective\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   273
32154
9721e8e4d48c eliminated adhoc ML code;
wenzelm
parents: 32153
diff changeset
   274
lemma term_injs:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   275
  "(inl(a) = inl(a')) \<longleftrightarrow> (a=a')"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   276
  "(inr(a) = inr(a')) \<longleftrightarrow> (a=a')"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   277
  "(succ(a) = succ(a')) \<longleftrightarrow> (a=a')"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   278
  "(a$b = a'$b') \<longleftrightarrow> (a=a' \<and> b=b')"
32154
9721e8e4d48c eliminated adhoc ML code;
wenzelm
parents: 32153
diff changeset
   279
  by (inj_rl applyB splitB whenBinl whenBinr ncaseBsucc lcaseBcons)
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   280
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   281
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   282
subsection \<open>Constructors are distinct\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   283
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   284
ML \<open>
56199
8e8d28ed7529 tuned signature -- rearranged modules;
wenzelm
parents: 52143
diff changeset
   285
ML_Thms.bind_thms ("term_dstncts",
69593
3dda49e08b9d isabelle update -u control_cartouches;
wenzelm
parents: 62143
diff changeset
   286
  mkall_dstnct_thms \<^context> @{thms data_defs} (@{thms ccl_injs} @ @{thms term_injs})
24825
c4f13ab78f9d avoid unnamed infixes;
wenzelm
parents: 24790
diff changeset
   287
    [["bot","inl","inr"], ["bot","zero","succ"], ["bot","nil","cons"]]);
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   288
\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   289
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   290
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 60770
diff changeset
   291
subsection \<open>Rules for pre-order \<open>[=\<close>\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   292
32154
9721e8e4d48c eliminated adhoc ML code;
wenzelm
parents: 32153
diff changeset
   293
lemma term_porews:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   294
  "inl(a) [= inl(a') \<longleftrightarrow> a [= a'"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   295
  "inr(b) [= inr(b') \<longleftrightarrow> b [= b'"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   296
  "succ(n) [= succ(n') \<longleftrightarrow> n [= n'"
9576b510f6a2 more symbols;
wenzelm
parents: 58976
diff changeset
   297
  "x$xs [= x'$xs' \<longleftrightarrow> x [= x' \<and> xs [= xs'"
32154
9721e8e4d48c eliminated adhoc ML code;
wenzelm
parents: 32153
diff changeset
   298
  by (simp_all add: data_defs ccl_porews)
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   299
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   300
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   301
subsection \<open>Rewriting and Proving\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   302
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   303
ML \<open>
56199
8e8d28ed7529 tuned signature -- rearranged modules;
wenzelm
parents: 52143
diff changeset
   304
  ML_Thms.bind_thms ("term_injDs", XH_to_Ds @{thms term_injs});
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 60555
diff changeset
   305
\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   306
20917
803c94363ccc reorderd ML/lemmas (Why!?);
wenzelm
parents: 20140
diff changeset
   307
lemmas term_rews = termBs term_injs term_dstncts ccl_porews term_porews
803c94363ccc reorderd ML/lemmas (Why!?);
wenzelm
parents: 20140
diff changeset
   308
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   309
lemmas [simp] = term_rews
20917
803c94363ccc reorderd ML/lemmas (Why!?);
wenzelm
parents: 20140
diff changeset
   310
lemmas [elim!] = term_dstncts [THEN notE]
803c94363ccc reorderd ML/lemmas (Why!?);
wenzelm
parents: 20140
diff changeset
   311
lemmas [dest!] = term_injDs
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   312
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 19796
diff changeset
   313
end