author | wenzelm |
Fri, 06 Oct 2000 17:35:58 +0200 | |
changeset 10168 | 50be659d4222 |
parent 6161 | bc2a76ce1ea3 |
child 10835 | f4745d77e620 |
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 |
|
6161 | 11 |
Goal "[|eA --> A ; eB & ~eA --> ~A|] ==> (eA | eB) --> A=eA"; |
4477
b3e5857d8d99
New Auto_tac (by Oheimb), and new syntax (without parens), and expandshort
paulson
parents:
4473
diff
changeset
|
12 |
by Auto_tac; |
3275 | 13 |
qed"compatibility_consequence3"; |
14 |
||
15 |
||
5068 | 16 |
Goal |
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); |
|
4098 | 23 |
by (REPEAT (asm_full_simp_tac (simpset() |
3275 | 24 |
addsimps [ext_is_act,ext1_ext2_is_not_act1]) 1)); |
25 |
qed"Filter_actAisFilter_extA"; |
|
26 |
||
27 |
||
5976 | 28 |
(* the next two theorems are only necessary, as there is no theorem ext (A||B) = ext (B||A) *) |
3275 | 29 |
|
6161 | 30 |
Goal "[|eA --> A ; eB & ~eA --> ~A|] ==> (eB | eA) --> A=eA"; |
4477
b3e5857d8d99
New Auto_tac (by Oheimb), and new syntax (without parens), and expandshort
paulson
parents:
4473
diff
changeset
|
31 |
by Auto_tac; |
3275 | 32 |
qed"compatibility_consequence4"; |
33 |
||
6161 | 34 |
Goal "[| compatible A B; Forall (%a. a: ext B | a: ext A) tr |] ==> \ |
3275 | 35 |
\ Filter (%a. a: act A)`tr= Filter (%a. a: ext A)`tr"; |
3457 | 36 |
by (rtac ForallPFilterQR 1); |
37 |
by (assume_tac 2); |
|
38 |
by (rtac compatibility_consequence4 1); |
|
4098 | 39 |
by (REPEAT (asm_full_simp_tac (simpset() |
3275 | 40 |
addsimps [ext_is_act,ext1_ext2_is_not_act1]) 1)); |
41 |
qed"Filter_actAisFilter_extA2"; |
|
42 |
||
43 |
||
44 |
(* -------------------------------------------------------------------------- *) |
|
45 |
section " Main Compositionality Theorem "; |
|
46 |
(* -------------------------------------------------------------------------- *) |
|
47 |
||
48 |
||
49 |
||
6161 | 50 |
Goal "[| is_trans_of A1; is_trans_of A2; is_trans_of B1; is_trans_of B2;\ |
3521 | 51 |
\ is_asig_of A1; is_asig_of A2; \ |
52 |
\ is_asig_of B1; is_asig_of B2; \ |
|
3433
2de17c994071
added deadlock freedom, polished definitions and proofs
mueller
parents:
3275
diff
changeset
|
53 |
\ compatible A1 B1; compatible A2 B2; \ |
3071 | 54 |
\ A1 =<| A2; \ |
55 |
\ B1 =<| B2 |] \ |
|
56 |
\ ==> (A1 || B1) =<| (A2 || B2)"; |
|
3275 | 57 |
|
4098 | 58 |
by (asm_full_simp_tac (simpset() addsimps [is_asig_of_def]) 1); |
4473 | 59 |
by (forw_inst_tac [("A1","A1")] (compat_commute RS iffD1) 1); |
60 |
by (forw_inst_tac [("A1","A2")] (compat_commute RS iffD1) 1); |
|
4098 | 61 |
by (asm_full_simp_tac (simpset() addsimps [ioa_implements_def, |
3275 | 62 |
inputs_of_par,outputs_of_par,externals_of_par]) 1); |
63 |
by (safe_tac set_cs); |
|
4098 | 64 |
by (asm_full_simp_tac (simpset() addsimps [compositionality_tr]) 1); |
3275 | 65 |
by (subgoal_tac "ext A1 = ext A2 & ext B1 = ext B2" 1); |
4098 | 66 |
by (asm_full_simp_tac (simpset() addsimps [externals_def]) 2); |
3275 | 67 |
by (REPEAT (etac conjE 1)); |
68 |
(* rewrite with proven subgoal *) |
|
4098 | 69 |
by (asm_full_simp_tac (simpset() addsimps [externals_of_par]) 1); |
3275 | 70 |
by (safe_tac set_cs); |
71 |
||
72 |
(* 2 goals, the 3rd has been solved automatically *) |
|
73 |
(* 1: Filter A2 x : traces A2 *) |
|
74 |
by (dres_inst_tac [("A","traces A1")] subsetD 1); |
|
3457 | 75 |
by (assume_tac 1); |
4098 | 76 |
by (asm_full_simp_tac (simpset() addsimps [Filter_actAisFilter_extA]) 1); |
3275 | 77 |
(* 2: Filter B2 x : traces B2 *) |
78 |
by (dres_inst_tac [("A","traces B1")] subsetD 1); |
|
3457 | 79 |
by (assume_tac 1); |
4098 | 80 |
by (asm_full_simp_tac (simpset() addsimps [Filter_actAisFilter_extA2]) 1); |
3275 | 81 |
qed"compositionality"; |
3071 | 82 |
|
83 |
||
84 |
||
3275 | 85 |