| author | wenzelm |
| Mon, 28 Jun 1999 21:47:55 +0200 | |
| changeset 6850 | da8a4660fb0c |
| parent 6833 | 15d6c121d75f |
| child 7340 | a22efb7a522b |
| permissions | -rw-r--r-- |
| 5597 | 1 |
(* Title: HOL/UNITY/Comp.thy |
2 |
ID: $Id$ |
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
|
4 |
Copyright 1998 University of Cambridge |
|
5 |
||
6 |
Composition |
|
7 |
||
8 |
From Chandy and Sanders, "Reasoning About Program Composition" |
|
9 |
*) |
|
10 |
||
11 |
(*** component ***) |
|
12 |
||
|
6738
06189132c67b
component_eq_subset: a neat characterization of "component"
paulson
parents:
6703
diff
changeset
|
13 |
Goalw [component_def] |
|
06189132c67b
component_eq_subset: a neat characterization of "component"
paulson
parents:
6703
diff
changeset
|
14 |
"(F component G) = (Init G <= Init F & Acts F <= Acts G)"; |
|
06189132c67b
component_eq_subset: a neat characterization of "component"
paulson
parents:
6703
diff
changeset
|
15 |
by (force_tac (claset() addSIs [exI, program_equalityI], |
|
06189132c67b
component_eq_subset: a neat characterization of "component"
paulson
parents:
6703
diff
changeset
|
16 |
simpset() addsimps [Acts_Join]) 1); |
|
06189132c67b
component_eq_subset: a neat characterization of "component"
paulson
parents:
6703
diff
changeset
|
17 |
qed "component_eq_subset"; |
|
06189132c67b
component_eq_subset: a neat characterization of "component"
paulson
parents:
6703
diff
changeset
|
18 |
|
| 6646 | 19 |
Goalw [component_def] "SKIP component F"; |
|
6012
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5968
diff
changeset
|
20 |
by (force_tac (claset() addIs [Join_SKIP_left], simpset()) 1); |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
21 |
qed "component_SKIP"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
22 |
|
| 6646 | 23 |
Goalw [component_def] "F component F"; |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
24 |
by (blast_tac (claset() addIs [Join_SKIP_right]) 1); |
| 5597 | 25 |
qed "component_refl"; |
26 |
||
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
27 |
AddIffs [component_SKIP, component_refl]; |
| 5597 | 28 |
|
| 6833 | 29 |
Goal "F component SKIP ==> F = SKIP"; |
30 |
by (auto_tac (claset() addSIs [program_equalityI], |
|
31 |
simpset() addsimps [component_eq_subset])); |
|
32 |
qed "SKIP_minimal"; |
|
33 |
||
| 6646 | 34 |
Goalw [component_def] "F component (F Join G)"; |
| 5968 | 35 |
by (Blast_tac 1); |
36 |
qed "component_Join1"; |
|
37 |
||
| 6646 | 38 |
Goalw [component_def] "G component (F Join G)"; |
| 5968 | 39 |
by (simp_tac (simpset() addsimps [Join_commute]) 1); |
40 |
by (Blast_tac 1); |
|
41 |
qed "component_Join2"; |
|
42 |
||
| 6646 | 43 |
Goalw [component_def] "i : I ==> (F i) component (JN i:I. (F i))"; |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
44 |
by (blast_tac (claset() addIs [JN_absorb]) 1); |
| 5968 | 45 |
qed "component_JN"; |
46 |
||
| 6646 | 47 |
Goalw [component_def] "[| F component G; G component H |] ==> F component H"; |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
48 |
by (blast_tac (claset() addIs [Join_assoc RS sym]) 1); |
| 5597 | 49 |
qed "component_trans"; |
50 |
||
| 6646 | 51 |
Goal "[| F component G; G component F |] ==> F=G"; |
|
6738
06189132c67b
component_eq_subset: a neat characterization of "component"
paulson
parents:
6703
diff
changeset
|
52 |
by (full_simp_tac (simpset() addsimps [component_eq_subset]) 1); |
|
06189132c67b
component_eq_subset: a neat characterization of "component"
paulson
parents:
6703
diff
changeset
|
53 |
by (blast_tac (claset() addSIs [program_equalityI]) 1); |
| 6703 | 54 |
qed "component_antisym"; |
| 5597 | 55 |
|
|
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset
|
56 |
Goalw [component_def] |
| 6646 | 57 |
"F component H = (EX G. F Join G = H & Disjoint F G)"; |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
58 |
by (blast_tac (claset() addSIs [Diff_Disjoint, Join_Diff2]) 1); |
|
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset
|
59 |
qed "component_eq"; |
| 5597 | 60 |
|
| 6833 | 61 |
Goal "((F Join G) component H) = (F component H & G component H)"; |
62 |
by (simp_tac (simpset() addsimps [component_eq_subset, Acts_Join]) 1); |
|
63 |
by (Blast_tac 1); |
|
64 |
qed "Join_component_iff"; |
|
65 |
||
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
66 |
|
| 5597 | 67 |
(*** existential properties ***) |
68 |
||
69 |
Goalw [ex_prop_def] |
|
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
70 |
"[| ex_prop X; finite GG |] ==> GG Int X ~= {} --> (JN G:GG. G) : X";
|
| 5597 | 71 |
by (etac finite_induct 1); |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
72 |
by (auto_tac (claset(), simpset() addsimps [Int_insert_left])); |
| 5597 | 73 |
qed_spec_mp "ex1"; |
74 |
||
75 |
Goalw [ex_prop_def] |
|
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
76 |
"ALL GG. finite GG & GG Int X ~= {} --> (JN G:GG. G) : X ==> ex_prop X";
|
| 5597 | 77 |
by (Clarify_tac 1); |
78 |
by (dres_inst_tac [("x", "{F,G}")] spec 1);
|
|
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
79 |
by Auto_tac; |
| 5597 | 80 |
qed "ex2"; |
81 |
||
82 |
(*Chandy & Sanders take this as a definition*) |
|
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
83 |
Goal "ex_prop X = (ALL GG. finite GG & GG Int X ~= {} --> (JN G:GG. G) : X)";
|
| 5597 | 84 |
by (blast_tac (claset() addIs [ex1,ex2]) 1); |
85 |
qed "ex_prop_finite"; |
|
86 |
||
87 |
(*Their "equivalent definition" given at the end of section 3*) |
|
| 6646 | 88 |
Goal "ex_prop X = (ALL G. G:X = (ALL H. G component H --> H: X))"; |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
89 |
by Auto_tac; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
90 |
by (rewrite_goals_tac [ex_prop_def, component_def]); |
| 5597 | 91 |
by (Blast_tac 1); |
92 |
by Safe_tac; |
|
93 |
by (stac Join_commute 2); |
|
94 |
by (ALLGOALS Blast_tac); |
|
95 |
qed "ex_prop_equiv"; |
|
96 |
||
97 |
||
98 |
(*** universal properties ***) |
|
99 |
||
100 |
Goalw [uv_prop_def] |
|
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
101 |
"[| uv_prop X; finite GG |] ==> GG <= X --> (JN G:GG. G) : X"; |
| 5597 | 102 |
by (etac finite_induct 1); |
103 |
by (auto_tac (claset(), simpset() addsimps [Int_insert_left])); |
|
104 |
qed_spec_mp "uv1"; |
|
105 |
||
106 |
Goalw [uv_prop_def] |
|
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
107 |
"ALL GG. finite GG & GG <= X --> (JN G:GG. G) : X ==> uv_prop X"; |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
108 |
by (rtac conjI 1); |
| 5597 | 109 |
by (Clarify_tac 2); |
110 |
by (dres_inst_tac [("x", "{F,G}")] spec 2);
|
|
111 |
by (dres_inst_tac [("x", "{}")] spec 1);
|
|
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
112 |
by Auto_tac; |
| 5597 | 113 |
qed "uv2"; |
114 |
||
115 |
(*Chandy & Sanders take this as a definition*) |
|
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
116 |
Goal "uv_prop X = (ALL GG. finite GG & GG <= X --> (JN G:GG. G) : X)"; |
| 5597 | 117 |
by (blast_tac (claset() addIs [uv1,uv2]) 1); |
118 |
qed "uv_prop_finite"; |
|
119 |
||
120 |
||
121 |
(*** guarantees ***) |
|
122 |
||
| 6833 | 123 |
val prems = Goal |
124 |
"(!!G. [| F Join G : X; Disjoint F G |] ==> F Join G : Y) \ |
|
125 |
\ ==> F : X guar Y"; |
|
126 |
by (simp_tac (simpset() addsimps [guarantees_def, component_eq]) 1); |
|
127 |
by (blast_tac (claset() addIs prems) 1); |
|
128 |
qed "guaranteesI"; |
|
129 |
||
130 |
Goalw [guarantees_def, component_def] |
|
131 |
"[| F : X guar Y; F Join G : X |] ==> F Join G : Y"; |
|
132 |
by (Blast_tac 1); |
|
133 |
qed "guaranteesD"; |
|
134 |
||
| 5668 | 135 |
(*This equation is more intuitive than the official definition*) |
| 6822 | 136 |
Goal "(F : X guar Y) = \ |
| 5968 | 137 |
\ (ALL G. F Join G : X & Disjoint F G --> F Join G : Y)"; |
|
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset
|
138 |
by (simp_tac (simpset() addsimps [guarantees_def, component_eq]) 1); |
| 5668 | 139 |
by (Blast_tac 1); |
140 |
qed "guarantees_eq"; |
|
141 |
||
| 6833 | 142 |
Goalw [guarantees_def] "[| F: X guar X'; Y <= X; X' <= Y' |] ==> F: Y guar Y'"; |
143 |
by (Blast_tac 1); |
|
144 |
qed "guarantees_weaken"; |
|
145 |
||
146 |
Goalw [guarantees_def] "[| F: X guar Y; F component F' |] ==> F': X guar Y"; |
|
147 |
by (blast_tac (claset() addIs [component_trans]) 1); |
|
148 |
qed "guarantees_weaken_prog"; |
|
149 |
||
| 6822 | 150 |
Goalw [guarantees_def] "X <= Y ==> X guar Y = UNIV"; |
| 5597 | 151 |
by (Blast_tac 1); |
| 6646 | 152 |
qed "subset_imp_guarantees_UNIV"; |
153 |
||
154 |
(*Equivalent to subset_imp_guarantees_UNIV but more intuitive*) |
|
| 6822 | 155 |
Goalw [guarantees_def] "X <= Y ==> F : X guar Y"; |
| 6646 | 156 |
by (Blast_tac 1); |
| 5597 | 157 |
qed "subset_imp_guarantees"; |
158 |
||
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
159 |
(*Remark at end of section 4.1*) |
| 6822 | 160 |
Goalw [guarantees_def] "ex_prop Y = (Y = UNIV guar Y)"; |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
161 |
by (simp_tac (simpset() addsimps [ex_prop_equiv]) 1); |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
162 |
by (blast_tac (claset() addEs [equalityE]) 1); |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
163 |
qed "ex_prop_equiv2"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
164 |
|
| 6822 | 165 |
(** Distributive laws. Re-orient to perform miniscoping **) |
166 |
||
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
167 |
Goalw [guarantees_def] |
| 6822 | 168 |
"(UN X:XX. X) guar Y = (INT X:XX. X guar Y)"; |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
169 |
by (Blast_tac 1); |
| 6822 | 170 |
qed "guarantees_UN_left"; |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
171 |
|
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
172 |
Goalw [guarantees_def] |
| 6822 | 173 |
"(X Un Y) guar Z = (X guar Z) Int (Y guar Z)"; |
174 |
by (Blast_tac 1); |
|
175 |
qed "guarantees_Un_left"; |
|
176 |
||
177 |
Goalw [guarantees_def] |
|
178 |
"X guar (INT Y:YY. Y) = (INT Y:YY. X guar Y)"; |
|
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
179 |
by (Blast_tac 1); |
| 6822 | 180 |
qed "guarantees_INT_right"; |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
181 |
|
| 6822 | 182 |
Goalw [guarantees_def] |
183 |
"Z guar (X Int Y) = (Z guar X) Int (Z guar Y)"; |
|
184 |
by (Blast_tac 1); |
|
185 |
qed "guarantees_Int_right"; |
|
186 |
||
187 |
Goalw [guarantees_def] "(X guar Y) = (UNIV guar (-X Un Y))"; |
|
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
188 |
by (Blast_tac 1); |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
189 |
qed "shunting"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
190 |
|
| 6822 | 191 |
Goalw [guarantees_def] "(X guar Y) = -Y guar -X"; |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
192 |
by (Blast_tac 1); |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
193 |
qed "contrapositive"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
194 |
|
| 6646 | 195 |
(** The following two can be expressed using intersection and subset, which |
196 |
is more faithful to the text but looks cryptic. |
|
197 |
**) |
|
198 |
||
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
199 |
Goalw [guarantees_def] |
| 6822 | 200 |
"[| F : V guar X; F : (X Int Y) guar Z |]\ |
201 |
\ ==> F : (V Int Y) guar Z"; |
|
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
202 |
by (Blast_tac 1); |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
203 |
qed "combining1"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
204 |
|
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
205 |
Goalw [guarantees_def] |
| 6822 | 206 |
"[| F : V guar (X Un Y); F : Y guar Z |]\ |
207 |
\ ==> F : V guar (X Un Z)"; |
|
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
208 |
by (Blast_tac 1); |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
209 |
qed "combining2"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
210 |
|
| 6646 | 211 |
(** The following two follow Chandy-Sanders, but the use of object-quantifiers |
212 |
does not suit Isabelle... **) |
|
213 |
||
| 6822 | 214 |
(*Premise should be (!!i. i: I ==> F: X guar Y i) *) |
| 5630 | 215 |
Goalw [guarantees_def] |
| 6822 | 216 |
"ALL i:I. F : X guar (Y i) ==> F : X guar (INT i:I. Y i)"; |
| 5630 | 217 |
by (Blast_tac 1); |
218 |
qed "all_guarantees"; |
|
219 |
||
| 6822 | 220 |
(*Premises should be [| F: X guar Y i; i: I |] *) |
| 5630 | 221 |
Goalw [guarantees_def] |
| 6822 | 222 |
"EX i:I. F : X guar (Y i) ==> F : X guar (UN i:I. Y i)"; |
| 5630 | 223 |
by (Blast_tac 1); |
224 |
qed "ex_guarantees"; |
|
225 |
||
| 6833 | 226 |
(*** Additional guarantees laws, by lcp ***) |
227 |
||
228 |
Goalw [guarantees_def] |
|
229 |
"[| F: U guar V; G: X guar Y |] ==> F Join G: (U Int X) guar (V Int Y)"; |
|
230 |
by (simp_tac (simpset() addsimps [Join_component_iff]) 1); |
|
231 |
by (Blast_tac 1); |
|
232 |
qed "guarantees_Join_Int"; |
|
233 |
||
234 |
Goalw [guarantees_def] |
|
235 |
"[| F: U guar V; G: X guar Y |] ==> F Join G: (U Un X) guar (V Un Y)"; |
|
236 |
by (simp_tac (simpset() addsimps [Join_component_iff]) 1); |
|
237 |
by (Blast_tac 1); |
|
238 |
qed "guarantees_Join_Un"; |
|
| 5630 | 239 |
|
| 6833 | 240 |
Goal "((JOIN I F) component H) = (ALL i: I. F i component H)"; |
241 |
by (simp_tac (simpset() addsimps [component_eq_subset, Acts_JN]) 1); |
|
|
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset
|
242 |
by (Blast_tac 1); |
| 6833 | 243 |
qed "JN_component_iff"; |
244 |
||
245 |
Goalw [guarantees_def] |
|
246 |
"[| ALL i:I. F i : X i guar Y i |] \ |
|
247 |
\ ==> (JOIN I F) : (INTER I X) guar (INTER I Y)"; |
|
248 |
by (simp_tac (simpset() addsimps [JN_component_iff]) 1); |
|
249 |
by (Blast_tac 1); |
|
250 |
qed "guarantees_JN_INT"; |
|
251 |
||
252 |
Goalw [guarantees_def] |
|
253 |
"[| ALL i:I. F i : X i guar Y i |] \ |
|
254 |
\ ==> (JOIN I F) : (UNION I X) guar (UNION I Y)"; |
|
255 |
by (simp_tac (simpset() addsimps [JN_component_iff]) 1); |
|
256 |
by (Blast_tac 1); |
|
257 |
qed "guarantees_JN_UN"; |
|
| 5637 | 258 |
|
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
259 |
|
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
260 |
(*** well-definedness ***) |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
261 |
|
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
262 |
Goalw [welldef_def] "F Join G: welldef ==> F: welldef"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
263 |
by Auto_tac; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
264 |
qed "Join_welldef_D1"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
265 |
|
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
266 |
Goalw [welldef_def] "F Join G: welldef ==> G: welldef"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
267 |
by Auto_tac; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
268 |
qed "Join_welldef_D2"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
269 |
|
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
270 |
(*** refinement ***) |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
271 |
|
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
272 |
Goalw [refines_def] "F refines F wrt X"; |
| 5597 | 273 |
by (Blast_tac 1); |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
274 |
qed "refines_refl"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
275 |
|
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
276 |
Goalw [refines_def] |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
277 |
"[| H refines G wrt X; G refines F wrt X |] ==> H refines F wrt X"; |
|
6012
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5968
diff
changeset
|
278 |
by Auto_tac; |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
279 |
qed "refines_trans"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
280 |
|
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
281 |
Goalw [strict_ex_prop_def] |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
282 |
"strict_ex_prop X \ |
|
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
283 |
\ ==> (ALL H. F Join H : X --> G Join H : X) = (F:X --> G:X)"; |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
284 |
by (Blast_tac 1); |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
285 |
qed "strict_ex_refine_lemma"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
286 |
|
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
287 |
Goalw [strict_ex_prop_def] |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
288 |
"strict_ex_prop X \ |
|
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
289 |
\ ==> (ALL H. F Join H : welldef & F Join H : X --> G Join H : X) = \ |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
290 |
\ (F: welldef Int X --> G:X)"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
291 |
by Safe_tac; |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
292 |
by (eres_inst_tac [("x","SKIP"), ("P", "%H. ?PP H --> ?RR H")] allE 1);
|
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
293 |
by (auto_tac (claset() addDs [Join_welldef_D1, Join_welldef_D2], simpset())); |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
294 |
qed "strict_ex_refine_lemma_v"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
295 |
|
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
296 |
Goal "[| strict_ex_prop X; \ |
|
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
297 |
\ ALL H. F Join H : welldef Int X --> G Join H : welldef |] \ |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
298 |
\ ==> (G refines F wrt X) = (G iso_refines F wrt X)"; |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
299 |
by (res_inst_tac [("x","SKIP")] allE 1
|
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
300 |
THEN assume_tac 1); |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
301 |
by (asm_full_simp_tac |
|
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
302 |
(simpset() addsimps [refines_def, iso_refines_def, |
|
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
303 |
strict_ex_refine_lemma_v]) 1); |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
304 |
qed "ex_refinement_thm"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
305 |
|
|
6012
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5968
diff
changeset
|
306 |
|
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
307 |
Goalw [strict_uv_prop_def] |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
308 |
"strict_uv_prop X \ |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
309 |
\ ==> (ALL H. F Join H : X --> G Join H : X) = (F:X --> G:X)"; |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
310 |
by (Blast_tac 1); |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
311 |
qed "strict_uv_refine_lemma"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
312 |
|
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
313 |
Goalw [strict_uv_prop_def] |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
314 |
"strict_uv_prop X \ |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
315 |
\ ==> (ALL H. F Join H : welldef & F Join H : X --> G Join H : X) = \ |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
316 |
\ (F: welldef Int X --> G:X)"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
317 |
by Safe_tac; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
318 |
by (eres_inst_tac [("x","SKIP"), ("P", "%H. ?PP H --> ?RR H")] allE 1);
|
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
319 |
by (auto_tac (claset() addDs [Join_welldef_D1, Join_welldef_D2], |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
320 |
simpset())); |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
321 |
qed "strict_uv_refine_lemma_v"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
322 |
|
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
323 |
Goal "[| strict_uv_prop X; \ |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
324 |
\ ALL H. F Join H : welldef Int X --> G Join H : welldef |] \ |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
325 |
\ ==> (G refines F wrt X) = (G iso_refines F wrt X)"; |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
326 |
by (res_inst_tac [("x","SKIP")] allE 1
|
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
327 |
THEN assume_tac 1); |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
328 |
by (asm_full_simp_tac (simpset() addsimps [refines_def, iso_refines_def, |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
329 |
strict_uv_refine_lemma_v]) 1); |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
330 |
qed "uv_refinement_thm"; |