author | mueller |
Thu, 17 Jul 1997 12:43:32 +0200 | |
changeset 3521 | bdc51b4c6050 |
parent 3457 | a8ab7c64817c |
child 4098 | 71e05eb27fb6 |
permissions | -rw-r--r-- |
3071 | 1 |
(* Title: HOLCF/IOA/meta_theory/Compositionality.ML |
3275 | 2 |
ID: $Id$ |
3071 | 3 |
Author: Olaf M"uller |
4 |
Copyright 1997 TU Muenchen |
|
5 |
||
6 |
Compositionality of I/O automata |
|
7 |
*) |
|
8 |
||
9 |
||
3275 | 10 |
|
11 |
goal thy "!! A. [|eA --> A ; eB & ~eA --> ~A|] ==> (eA | eB) --> A=eA"; |
|
3457 | 12 |
by (Auto_tac()); |
3275 | 13 |
qed"compatibility_consequence3"; |
14 |
||
15 |
||
16 |
goal thy |
|
3433
2de17c994071
added deadlock freedom, polished definitions and proofs
mueller
parents:
3275
diff
changeset
|
17 |
"!! A B. [| compatible A B; Forall (%a. a: ext A | a: ext B) tr |] ==> \ |
3275 | 18 |
\ Filter (%a. a: act A)`tr= Filter (%a. a: ext A)`tr"; |
3457 | 19 |
by (rtac ForallPFilterQR 1); |
3521 | 20 |
(* i.e.: [| (! x. P x --> (Q x = R x)) ; Forall P tr |] ==> Filter Q`tr = Filter R`tr *) |
3457 | 21 |
by (assume_tac 2); |
22 |
by (rtac compatibility_consequence3 1); |
|
3275 | 23 |
by (REPEAT (asm_full_simp_tac (!simpset |
24 |
addsimps [ext_is_act,ext1_ext2_is_not_act1]) 1)); |
|
25 |
qed"Filter_actAisFilter_extA"; |
|
26 |
||
27 |
||
28 |
(* the next two theorems are only necessary, as there is no theorem ext (A||B) = ext (B||A) |
|
29 |
or even better A||B= B||A, FIX *) |
|
30 |
||
31 |
goal thy "!! A. [|eA --> A ; eB & ~eA --> ~A|] ==> (eB | eA) --> A=eA"; |
|
3457 | 32 |
by (Auto_tac()); |
3275 | 33 |
qed"compatibility_consequence4"; |
34 |
||
35 |
goal thy |
|
3433
2de17c994071
added deadlock freedom, polished definitions and proofs
mueller
parents:
3275
diff
changeset
|
36 |
"!! A B. [| compatible A B; Forall (%a. a: ext B | a: ext A) tr |] ==> \ |
3275 | 37 |
\ Filter (%a. a: act A)`tr= Filter (%a. a: ext A)`tr"; |
3457 | 38 |
by (rtac ForallPFilterQR 1); |
39 |
by (assume_tac 2); |
|
40 |
by (rtac compatibility_consequence4 1); |
|
3275 | 41 |
by (REPEAT (asm_full_simp_tac (!simpset |
42 |
addsimps [ext_is_act,ext1_ext2_is_not_act1]) 1)); |
|
43 |
qed"Filter_actAisFilter_extA2"; |
|
44 |
||
45 |
||
46 |
(* -------------------------------------------------------------------------- *) |
|
47 |
section " Main Compositionality Theorem "; |
|
48 |
(* -------------------------------------------------------------------------- *) |
|
49 |
||
50 |
||
51 |
||
3071 | 52 |
goal thy "!! A1 A2 B1 B2. \ |
3521 | 53 |
\ [| is_trans_of A1; is_trans_of A2; is_trans_of B1; is_trans_of B2;\ |
54 |
\ is_asig_of A1; is_asig_of A2; \ |
|
55 |
\ is_asig_of B1; is_asig_of B2; \ |
|
3433
2de17c994071
added deadlock freedom, polished definitions and proofs
mueller
parents:
3275
diff
changeset
|
56 |
\ compatible A1 B1; compatible A2 B2; \ |
3071 | 57 |
\ A1 =<| A2; \ |
58 |
\ B1 =<| B2 |] \ |
|
59 |
\ ==> (A1 || B1) =<| (A2 || B2)"; |
|
3275 | 60 |
|
3521 | 61 |
by (asm_full_simp_tac (!simpset addsimps [is_asig_of_def]) 1); |
3275 | 62 |
by (forw_inst_tac [("A2","A1")] (compat_commute RS iffD1) 1); |
63 |
by (forw_inst_tac [("A2","A2")] (compat_commute RS iffD1) 1); |
|
3071 | 64 |
by (asm_full_simp_tac (!simpset addsimps [ioa_implements_def, |
3275 | 65 |
inputs_of_par,outputs_of_par,externals_of_par]) 1); |
66 |
by (safe_tac set_cs); |
|
67 |
by (asm_full_simp_tac (!simpset addsimps [compositionality_tr]) 1); |
|
68 |
by (subgoal_tac "ext A1 = ext A2 & ext B1 = ext B2" 1); |
|
69 |
by (asm_full_simp_tac (!simpset addsimps [externals_def]) 2); |
|
70 |
by (REPEAT (etac conjE 1)); |
|
71 |
(* rewrite with proven subgoal *) |
|
72 |
by (asm_full_simp_tac (!simpset addsimps [externals_of_par]) 1); |
|
73 |
by (safe_tac set_cs); |
|
74 |
||
75 |
(* 2 goals, the 3rd has been solved automatically *) |
|
76 |
(* 1: Filter A2 x : traces A2 *) |
|
77 |
by (dres_inst_tac [("A","traces A1")] subsetD 1); |
|
3457 | 78 |
by (assume_tac 1); |
3275 | 79 |
by (asm_full_simp_tac (!simpset addsimps [Filter_actAisFilter_extA]) 1); |
80 |
(* 2: Filter B2 x : traces B2 *) |
|
81 |
by (dres_inst_tac [("A","traces B1")] subsetD 1); |
|
3457 | 82 |
by (assume_tac 1); |
3275 | 83 |
by (asm_full_simp_tac (!simpset addsimps [Filter_actAisFilter_extA2]) 1); |
84 |
qed"compositionality"; |
|
3071 | 85 |
|
86 |
||
87 |
||
3275 | 88 |