author | wenzelm |
Mon, 03 Nov 1997 12:24:13 +0100 | |
changeset 4091 | 771b1f6422a8 |
parent 3840 | e0baea4d485a |
child 5068 | fb28eaa07e01 |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: Terms.ML |
1048 | 2 |
ID: $Id$ |
1461 | 3 |
Author: Ole Rasmussen |
1048 | 4 |
Copyright 1995 University of Cambridge |
5 |
Logic Image: ZF |
|
6 |
*) |
|
7 |
||
8 |
open Terms; |
|
9 |
||
10 |
(* ------------------------------------------------------------------------- *) |
|
11 |
(* unmark simplifications *) |
|
12 |
(* ------------------------------------------------------------------------- *) |
|
13 |
||
14 |
goalw Terms.thy [unmark_def] |
|
15 |
"unmark(Var(n)) = Var(n)"; |
|
2469 | 16 |
by (Asm_simp_tac 1); |
3734
33f355f56f82
Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents:
2469
diff
changeset
|
17 |
qed "unmark_Var"; |
1048 | 18 |
|
19 |
goalw Terms.thy [unmark_def] |
|
20 |
"unmark(Fun(t)) = Fun(unmark(t))"; |
|
2469 | 21 |
by (Asm_simp_tac 1); |
3734
33f355f56f82
Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents:
2469
diff
changeset
|
22 |
qed "unmark_Fun"; |
1048 | 23 |
|
24 |
goalw Terms.thy [unmark_def] |
|
25 |
"unmark(App(b,n,m)) = App(0,unmark(n),unmark(m))"; |
|
2469 | 26 |
by (Asm_simp_tac 1); |
3734
33f355f56f82
Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents:
2469
diff
changeset
|
27 |
qed "unmark_App"; |
1048 | 28 |
|
29 |
||
30 |
(* ------------------------------------------------------------------------- *) |
|
31 |
(* term simplification set *) |
|
32 |
(* ------------------------------------------------------------------------- *) |
|
33 |
||
34 |
||
2469 | 35 |
Addsimps ([unmark_App, unmark_Fun, unmark_Var, |
36 |
lambda.dom_subset RS subsetD] @ |
|
37 |
lambda.intrs); |
|
1048 | 38 |
|
39 |
||
40 |
(* ------------------------------------------------------------------------- *) |
|
41 |
(* unmark lemmas *) |
|
42 |
(* ------------------------------------------------------------------------- *) |
|
43 |
||
44 |
goalw Terms.thy [unmark_def] |
|
3840 | 45 |
"!!u. u:redexes ==> unmark(u):lambda"; |
1048 | 46 |
by (eresolve_tac [redexes.induct] 1); |
2469 | 47 |
by (ALLGOALS Asm_simp_tac); |
3734
33f355f56f82
Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents:
2469
diff
changeset
|
48 |
qed "unmark_type"; |
1048 | 49 |
|
50 |
goal Terms.thy |
|
3840 | 51 |
"!!u. u:lambda ==> unmark(u) = u"; |
1048 | 52 |
by (eresolve_tac [lambda.induct] 1); |
2469 | 53 |
by (ALLGOALS Asm_simp_tac); |
3734
33f355f56f82
Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents:
2469
diff
changeset
|
54 |
qed "lambda_unmark"; |
1048 | 55 |
|
56 |
||
57 |
(* ------------------------------------------------------------------------- *) |
|
58 |
(* lift and subst preserve lambda *) |
|
59 |
(* ------------------------------------------------------------------------- *) |
|
60 |
||
61 |
goal Terms.thy |
|
3840 | 62 |
"!!u.[|v:lambda|]==> ALL k:nat. lift_rec(v,k):lambda"; |
1048 | 63 |
by (eresolve_tac [lambda.induct] 1); |
4091 | 64 |
by (ALLGOALS(asm_full_simp_tac (addsplit (simpset())))); |
3734
33f355f56f82
Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents:
2469
diff
changeset
|
65 |
qed "liftL_typea"; |
1048 | 66 |
val liftL_type =liftL_typea RS bspec ; |
67 |
||
68 |
goal Terms.thy |
|
3840 | 69 |
"!!n.[|v:lambda|]==> ALL n:nat. ALL u:lambda. subst_rec(u,v,n):lambda"; |
1048 | 70 |
by (eresolve_tac [lambda.induct] 1); |
4091 | 71 |
by (ALLGOALS(asm_full_simp_tac ((addsplit (simpset())) addsimps [liftL_type]))); |
3734
33f355f56f82
Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents:
2469
diff
changeset
|
72 |
qed "substL_typea"; |
1048 | 73 |
val substL_type = substL_typea RS bspec RS bspec ; |
74 |
||
75 |
||
76 |
(* ------------------------------------------------------------------------- *) |
|
77 |
(* type-rule for reduction definitions *) |
|
78 |
(* ------------------------------------------------------------------------- *) |
|
79 |
||
80 |
val red_typechecks = [substL_type]@nat_typechecks@lambda.intrs@bool_typechecks; |