| author | wenzelm |
| Wed, 18 Nov 1998 10:56:53 +0100 | |
| changeset 5922 | 85d62ecb950d |
| parent 5527 | 38928c4a8eb2 |
| child 6046 | 2c8a8be36c94 |
| 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 |
||
|
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5068
diff
changeset
|
14 |
Goalw [unmark_def] "unmark(Var(n)) = Var(n)"; |
| 2469 | 15 |
by (Asm_simp_tac 1); |
|
3734
33f355f56f82
Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents:
2469
diff
changeset
|
16 |
qed "unmark_Var"; |
| 1048 | 17 |
|
|
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5068
diff
changeset
|
18 |
Goalw [unmark_def] "unmark(Fun(t)) = Fun(unmark(t))"; |
| 2469 | 19 |
by (Asm_simp_tac 1); |
|
3734
33f355f56f82
Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents:
2469
diff
changeset
|
20 |
qed "unmark_Fun"; |
| 1048 | 21 |
|
|
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5068
diff
changeset
|
22 |
Goalw [unmark_def] "unmark(App(b,n,m)) = App(0,unmark(n),unmark(m))"; |
| 2469 | 23 |
by (Asm_simp_tac 1); |
|
3734
33f355f56f82
Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents:
2469
diff
changeset
|
24 |
qed "unmark_App"; |
| 1048 | 25 |
|
26 |
||
27 |
(* ------------------------------------------------------------------------- *) |
|
28 |
(* term simplification set *) |
|
29 |
(* ------------------------------------------------------------------------- *) |
|
30 |
||
31 |
||
| 2469 | 32 |
Addsimps ([unmark_App, unmark_Fun, unmark_Var, |
33 |
lambda.dom_subset RS subsetD] @ |
|
34 |
lambda.intrs); |
|
| 1048 | 35 |
|
36 |
||
37 |
(* ------------------------------------------------------------------------- *) |
|
38 |
(* unmark lemmas *) |
|
39 |
(* ------------------------------------------------------------------------- *) |
|
40 |
||
| 5068 | 41 |
Goalw [unmark_def] |
|
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5068
diff
changeset
|
42 |
"u:redexes ==> unmark(u):lambda"; |
| 5527 | 43 |
by (etac redexes.induct 1); |
| 2469 | 44 |
by (ALLGOALS Asm_simp_tac); |
|
3734
33f355f56f82
Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents:
2469
diff
changeset
|
45 |
qed "unmark_type"; |
| 1048 | 46 |
|
|
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5068
diff
changeset
|
47 |
Goal "u:lambda ==> unmark(u) = u"; |
| 5527 | 48 |
by (etac lambda.induct 1); |
| 2469 | 49 |
by (ALLGOALS Asm_simp_tac); |
|
3734
33f355f56f82
Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents:
2469
diff
changeset
|
50 |
qed "lambda_unmark"; |
| 1048 | 51 |
|
52 |
||
53 |
(* ------------------------------------------------------------------------- *) |
|
54 |
(* lift and subst preserve lambda *) |
|
55 |
(* ------------------------------------------------------------------------- *) |
|
56 |
||
| 5527 | 57 |
Goal "v:lambda ==> ALL k:nat. lift_rec(v,k):lambda"; |
58 |
by (etac lambda.induct 1); |
|
59 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [lift_rec_Var]))); |
|
|
3734
33f355f56f82
Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents:
2469
diff
changeset
|
60 |
qed "liftL_typea"; |
| 1048 | 61 |
val liftL_type =liftL_typea RS bspec ; |
62 |
||
| 5527 | 63 |
Goal "v:lambda ==> ALL n:nat. ALL u:lambda. subst_rec(u,v,n):lambda"; |
64 |
by (etac lambda.induct 1); |
|
65 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [liftL_type,subst_Var]))); |
|
|
3734
33f355f56f82
Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents:
2469
diff
changeset
|
66 |
qed "substL_typea"; |
| 1048 | 67 |
val substL_type = substL_typea RS bspec RS bspec ; |
68 |
||
69 |
||
70 |
(* ------------------------------------------------------------------------- *) |
|
71 |
(* type-rule for reduction definitions *) |
|
72 |
(* ------------------------------------------------------------------------- *) |
|
73 |
||
74 |
val red_typechecks = [substL_type]@nat_typechecks@lambda.intrs@bool_typechecks; |