author | nipkow |
Wed, 26 Mar 1997 17:58:48 +0100 | |
changeset 2841 | c2508f4ab739 |
parent 2798 | f84be65745b2 |
child 2846 | 53c76f9d95fd |
permissions | -rw-r--r-- |
2798 | 1 |
(* Title: HOLCF/IMP/Denotational.ML |
2 |
ID: $Id$ |
|
3 |
Author: Tobias Nipkow & Robert Sandner |
|
4 |
Copyright 1996 TUM |
|
5 |
||
6 |
Equivalence of Denotational Semantics in HOLCF and Evaluation Semantics in HOL |
|
7 |
*) |
|
8 |
||
2841
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
9 |
goalw thy [dlift_def] "dlift f`(Def x) = f`(Discr x)"; |
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
10 |
by(Simp_tac 1); |
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
11 |
qed "dlift_Def"; |
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
12 |
Addsimps [dlift_Def]; |
2798 | 13 |
|
2841
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
14 |
goalw thy [dlift_def] "cont(%f. dlift f)"; |
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
15 |
by(Simp_tac 1); |
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
16 |
qed "cont_dlift"; |
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
17 |
AddIffs [cont_dlift]; |
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
18 |
|
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
19 |
goalw thy [dlift_def] "dlift f`l = Def y --> (? x. l = Def x)"; |
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
20 |
by(simp_tac (!simpset setloop (split_tac[expand_lift_case])) 1); |
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
21 |
qed_spec_mp "dlift_DefD"; |
2798 | 22 |
|
23 |
||
2841
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
24 |
goal thy "!!c. <c,s> -c-> t ==> D c`(Discr s) = (Def t)"; |
2798 | 25 |
be evalc.induct 1; |
26 |
by (ALLGOALS Asm_simp_tac); |
|
27 |
by (ALLGOALS (rtac (fix_eq RS ssubst) THEN' Asm_full_simp_tac)); |
|
28 |
qed_spec_mp "eval_implies_D"; |
|
29 |
||
2841
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
30 |
goal thy "!s t. D c`(Discr s) = (Def t) --> <c,s> -c-> t"; |
2798 | 31 |
by (com.induct_tac "c" 1); |
32 |
by (fast_tac ((HOL_cs addSIs evalc.intrs) addss !simpset) 1); |
|
33 |
by (fast_tac ((HOL_cs addSIs evalc.intrs) addss !simpset) 1); |
|
34 |
by (Simp_tac 1); |
|
35 |
by (strip_tac 1); |
|
2841
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
36 |
by (forward_tac [dlift_DefD] 1); |
2798 | 37 |
be exE 1; |
38 |
by (rotate_tac ~1 1); |
|
39 |
by (Asm_full_simp_tac 1); |
|
40 |
by (fast_tac (HOL_cs addSIs evalc.intrs) 1); |
|
2841
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
41 |
by (simp_tac (!simpset setloop (split_tac[expand_if])) 1); |
2798 | 42 |
by (fast_tac ((HOL_cs addIs evalc.intrs) unsafe_addss !simpset) 1); |
43 |
by (Simp_tac 1); |
|
44 |
br fix_ind 1; |
|
45 |
by(fast_tac (HOL_cs addSIs (adm_lemmas@[adm_flatdom,flat_lift])) 1); |
|
46 |
by (Simp_tac 1); |
|
2841
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
47 |
by (simp_tac (!simpset setloop (split_tac[expand_if])) 1); |
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
48 |
by (safe_tac HOL_cs); |
2798 | 49 |
(* case bexp s *) |
2841
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
50 |
by (forward_tac [dlift_DefD] 1); |
2798 | 51 |
be exE 1; |
52 |
by (rotate_tac ~1 1); |
|
53 |
by (Asm_full_simp_tac 1); |
|
54 |
by (fast_tac (HOL_cs addIs evalc.intrs) 1); |
|
55 |
(* case ~bexp s *) |
|
56 |
by (fast_tac ((HOL_cs addSIs evalc.intrs) unsafe_addss !simpset) 1); |
|
57 |
qed_spec_mp "D_implies_eval"; |
|
58 |
||
59 |
||
2841
c2508f4ab739
Added "discrete" CPOs and modified IMP to use those rather than "lift"
nipkow
parents:
2798
diff
changeset
|
60 |
goal thy "(D c`(Discr s) = (Def t)) = (<c,s> -c-> t)"; |
2798 | 61 |
by (fast_tac (HOL_cs addSEs [D_implies_eval,eval_implies_D]) 1); |
62 |
qed "D_is_eval"; |