equal
deleted
inserted
replaced
12 qed_goalw "Gamma_mono" Denotation.thy [mono_def,Gamma_def] |
12 qed_goalw "Gamma_mono" Denotation.thy [mono_def,Gamma_def] |
13 "mono (Gamma b c)" |
13 "mono (Gamma b c)" |
14 (fn _ => [Fast_tac 1]); |
14 (fn _ => [Fast_tac 1]); |
15 |
15 |
16 |
16 |
17 goal Denotation.thy "C(WHILE b DO c) = C(IF b THEN c;WHILE b DO c ELSE SKIP)"; |
17 Goal "C(WHILE b DO c) = C(IF b THEN c;WHILE b DO c ELSE SKIP)"; |
18 by (Simp_tac 1); |
18 by (Simp_tac 1); |
19 by (EVERY[stac (Gamma_mono RS lfp_Tarski) 1, |
19 by (EVERY[stac (Gamma_mono RS lfp_Tarski) 1, |
20 stac (Gamma_def RS meta_eq_to_obj_eq RS fun_cong) 1, |
20 stac (Gamma_def RS meta_eq_to_obj_eq RS fun_cong) 1, |
21 Simp_tac 1, |
21 Simp_tac 1, |
22 IF_UNSOLVED no_tac]); |
22 IF_UNSOLVED no_tac]); |
23 qed "C_While_If"; |
23 qed "C_While_If"; |
24 |
24 |
25 |
25 |
26 (* Operational Semantics implies Denotational Semantics *) |
26 (* Operational Semantics implies Denotational Semantics *) |
27 |
27 |
28 goal Denotation.thy "!!c s t. <c,s> -c-> t ==> (s,t) : C(c)"; |
28 Goal "!!c s t. <c,s> -c-> t ==> (s,t) : C(c)"; |
29 |
29 |
30 (* start with rule induction *) |
30 (* start with rule induction *) |
31 by (etac evalc.induct 1); |
31 by (etac evalc.induct 1); |
32 by Auto_tac; |
32 by Auto_tac; |
33 (* while *) |
33 (* while *) |
39 |
39 |
40 qed "com1"; |
40 qed "com1"; |
41 |
41 |
42 (* Denotational Semantics implies Operational Semantics *) |
42 (* Denotational Semantics implies Operational Semantics *) |
43 |
43 |
44 goal Denotation.thy "!s t. (s,t):C(c) --> <c,s> -c-> t"; |
44 Goal "!s t. (s,t):C(c) --> <c,s> -c-> t"; |
45 by (com.induct_tac "c" 1); |
45 by (com.induct_tac "c" 1); |
46 |
46 |
47 by (ALLGOALS Full_simp_tac); |
47 by (ALLGOALS Full_simp_tac); |
48 by (ALLGOALS (TRY o Fast_tac)); |
48 by (ALLGOALS (TRY o Fast_tac)); |
49 |
49 |
56 qed_spec_mp "com2"; |
56 qed_spec_mp "com2"; |
57 |
57 |
58 |
58 |
59 (**** Proof of Equivalence ****) |
59 (**** Proof of Equivalence ****) |
60 |
60 |
61 goal Denotation.thy "(s,t) : C(c) = (<c,s> -c-> t)"; |
61 Goal "(s,t) : C(c) = (<c,s> -c-> t)"; |
62 by (fast_tac (claset() addEs [com2] addDs [com1]) 1); |
62 by (fast_tac (claset() addEs [com2] addDs [com1]) 1); |
63 qed "denotational_is_natural"; |
63 qed "denotational_is_natural"; |