author | paulson |
Sun, 13 Jun 1999 13:52:50 +0200 | |
changeset 6822 | 8932f33259d4 |
parent 6738 | 06189132c67b |
child 6833 | 15d6c121d75f |
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 |
|
6646 | 29 |
Goalw [component_def] "F component (F Join G)"; |
5968 | 30 |
by (Blast_tac 1); |
31 |
qed "component_Join1"; |
|
32 |
||
6646 | 33 |
Goalw [component_def] "G component (F Join G)"; |
5968 | 34 |
by (simp_tac (simpset() addsimps [Join_commute]) 1); |
35 |
by (Blast_tac 1); |
|
36 |
qed "component_Join2"; |
|
37 |
||
6646 | 38 |
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
|
39 |
by (blast_tac (claset() addIs [JN_absorb]) 1); |
5968 | 40 |
qed "component_JN"; |
41 |
||
6646 | 42 |
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
|
43 |
by (blast_tac (claset() addIs [Join_assoc RS sym]) 1); |
5597 | 44 |
qed "component_trans"; |
45 |
||
6646 | 46 |
Goal "[| F component G; G component F |] ==> F=G"; |
6738
06189132c67b
component_eq_subset: a neat characterization of "component"
paulson
parents:
6703
diff
changeset
|
47 |
by (full_simp_tac (simpset() addsimps [component_eq_subset]) 1); |
06189132c67b
component_eq_subset: a neat characterization of "component"
paulson
parents:
6703
diff
changeset
|
48 |
by (blast_tac (claset() addSIs [program_equalityI]) 1); |
6703 | 49 |
qed "component_antisym"; |
5597 | 50 |
|
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset
|
51 |
Goalw [component_def] |
6646 | 52 |
"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
|
53 |
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
|
54 |
qed "component_eq"; |
5597 | 55 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
56 |
|
5597 | 57 |
(*** existential properties ***) |
58 |
||
59 |
Goalw [ex_prop_def] |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
60 |
"[| ex_prop X; finite GG |] ==> GG Int X ~= {} --> (JN G:GG. G) : X"; |
5597 | 61 |
by (etac finite_induct 1); |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
62 |
by (auto_tac (claset(), simpset() addsimps [Int_insert_left])); |
5597 | 63 |
qed_spec_mp "ex1"; |
64 |
||
65 |
Goalw [ex_prop_def] |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
66 |
"ALL GG. finite GG & GG Int X ~= {} --> (JN G:GG. G) : X ==> ex_prop X"; |
5597 | 67 |
by (Clarify_tac 1); |
68 |
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
|
69 |
by Auto_tac; |
5597 | 70 |
qed "ex2"; |
71 |
||
72 |
(*Chandy & Sanders take this as a definition*) |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
73 |
Goal "ex_prop X = (ALL GG. finite GG & GG Int X ~= {} --> (JN G:GG. G) : X)"; |
5597 | 74 |
by (blast_tac (claset() addIs [ex1,ex2]) 1); |
75 |
qed "ex_prop_finite"; |
|
76 |
||
77 |
(*Their "equivalent definition" given at the end of section 3*) |
|
6646 | 78 |
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
|
79 |
by Auto_tac; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
80 |
by (rewrite_goals_tac [ex_prop_def, component_def]); |
5597 | 81 |
by (Blast_tac 1); |
82 |
by Safe_tac; |
|
83 |
by (stac Join_commute 2); |
|
84 |
by (ALLGOALS Blast_tac); |
|
85 |
qed "ex_prop_equiv"; |
|
86 |
||
87 |
||
88 |
(*** universal properties ***) |
|
89 |
||
90 |
Goalw [uv_prop_def] |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
91 |
"[| uv_prop X; finite GG |] ==> GG <= X --> (JN G:GG. G) : X"; |
5597 | 92 |
by (etac finite_induct 1); |
93 |
by (auto_tac (claset(), simpset() addsimps [Int_insert_left])); |
|
94 |
qed_spec_mp "uv1"; |
|
95 |
||
96 |
Goalw [uv_prop_def] |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
97 |
"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
|
98 |
by (rtac conjI 1); |
5597 | 99 |
by (Clarify_tac 2); |
100 |
by (dres_inst_tac [("x", "{F,G}")] spec 2); |
|
101 |
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
|
102 |
by Auto_tac; |
5597 | 103 |
qed "uv2"; |
104 |
||
105 |
(*Chandy & Sanders take this as a definition*) |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
106 |
Goal "uv_prop X = (ALL GG. finite GG & GG <= X --> (JN G:GG. G) : X)"; |
5597 | 107 |
by (blast_tac (claset() addIs [uv1,uv2]) 1); |
108 |
qed "uv_prop_finite"; |
|
109 |
||
110 |
||
111 |
(*** guarantees ***) |
|
112 |
||
5668 | 113 |
(*This equation is more intuitive than the official definition*) |
6822 | 114 |
Goal "(F : X guar Y) = \ |
5968 | 115 |
\ (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
|
116 |
by (simp_tac (simpset() addsimps [guarantees_def, component_eq]) 1); |
5668 | 117 |
by (Blast_tac 1); |
118 |
qed "guarantees_eq"; |
|
119 |
||
6822 | 120 |
Goalw [guarantees_def] "X <= Y ==> X guar Y = UNIV"; |
5597 | 121 |
by (Blast_tac 1); |
6646 | 122 |
qed "subset_imp_guarantees_UNIV"; |
123 |
||
124 |
(*Equivalent to subset_imp_guarantees_UNIV but more intuitive*) |
|
6822 | 125 |
Goalw [guarantees_def] "X <= Y ==> F : X guar Y"; |
6646 | 126 |
by (Blast_tac 1); |
5597 | 127 |
qed "subset_imp_guarantees"; |
128 |
||
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
129 |
(*Remark at end of section 4.1*) |
6822 | 130 |
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
|
131 |
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
|
132 |
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
|
133 |
qed "ex_prop_equiv2"; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
134 |
|
6822 | 135 |
(** Distributive laws. Re-orient to perform miniscoping **) |
136 |
||
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
137 |
Goalw [guarantees_def] |
6822 | 138 |
"(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
|
139 |
by (Blast_tac 1); |
6822 | 140 |
qed "guarantees_UN_left"; |
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
141 |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
142 |
Goalw [guarantees_def] |
6822 | 143 |
"(X Un Y) guar Z = (X guar Z) Int (Y guar Z)"; |
144 |
by (Blast_tac 1); |
|
145 |
qed "guarantees_Un_left"; |
|
146 |
||
147 |
Goalw [guarantees_def] |
|
148 |
"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
|
149 |
by (Blast_tac 1); |
6822 | 150 |
qed "guarantees_INT_right"; |
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
151 |
|
6822 | 152 |
Goalw [guarantees_def] |
153 |
"Z guar (X Int Y) = (Z guar X) Int (Z guar Y)"; |
|
154 |
by (Blast_tac 1); |
|
155 |
qed "guarantees_Int_right"; |
|
156 |
||
157 |
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
|
158 |
by (Blast_tac 1); |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
159 |
qed "shunting"; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
160 |
|
6822 | 161 |
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
|
162 |
by (Blast_tac 1); |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
163 |
qed "contrapositive"; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
164 |
|
6646 | 165 |
(** The following two can be expressed using intersection and subset, which |
166 |
is more faithful to the text but looks cryptic. |
|
167 |
**) |
|
168 |
||
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
169 |
Goalw [guarantees_def] |
6822 | 170 |
"[| F : V guar X; F : (X Int Y) guar Z |]\ |
171 |
\ ==> 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
|
172 |
by (Blast_tac 1); |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
173 |
qed "combining1"; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
174 |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
175 |
Goalw [guarantees_def] |
6822 | 176 |
"[| F : V guar (X Un Y); F : Y guar Z |]\ |
177 |
\ ==> 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
|
178 |
by (Blast_tac 1); |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
179 |
qed "combining2"; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
180 |
|
6646 | 181 |
(** The following two follow Chandy-Sanders, but the use of object-quantifiers |
182 |
does not suit Isabelle... **) |
|
183 |
||
6822 | 184 |
(*Premise should be (!!i. i: I ==> F: X guar Y i) *) |
5630 | 185 |
Goalw [guarantees_def] |
6822 | 186 |
"ALL i:I. F : X guar (Y i) ==> F : X guar (INT i:I. Y i)"; |
5630 | 187 |
by (Blast_tac 1); |
188 |
qed "all_guarantees"; |
|
189 |
||
6822 | 190 |
(*Premises should be [| F: X guar Y i; i: I |] *) |
5630 | 191 |
Goalw [guarantees_def] |
6822 | 192 |
"EX i:I. F : X guar (Y i) ==> F : X guar (UN i:I. Y i)"; |
5630 | 193 |
by (Blast_tac 1); |
194 |
qed "ex_guarantees"; |
|
195 |
||
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset
|
196 |
val prems = Goal |
5968 | 197 |
"(!!G. [| F Join G : X; Disjoint F G |] ==> F Join G : Y) \ |
6822 | 198 |
\ ==> F : X guar Y"; |
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset
|
199 |
by (simp_tac (simpset() addsimps [guarantees_def, component_eq]) 1); |
5630 | 200 |
by (blast_tac (claset() addIs prems) 1); |
201 |
qed "guaranteesI"; |
|
202 |
||
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset
|
203 |
Goalw [guarantees_def, component_def] |
6822 | 204 |
"[| F : X guar Y; F Join G : X |] ==> F Join G : Y"; |
5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset
|
205 |
by (Blast_tac 1); |
5637 | 206 |
qed "guaranteesD"; |
207 |
||
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
208 |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
209 |
(*** well-definedness ***) |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
210 |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
211 |
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
|
212 |
by Auto_tac; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
213 |
qed "Join_welldef_D1"; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
214 |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
215 |
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
|
216 |
by Auto_tac; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
217 |
qed "Join_welldef_D2"; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
218 |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
219 |
(*** refinement ***) |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
220 |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
221 |
Goalw [refines_def] "F refines F wrt X"; |
5597 | 222 |
by (Blast_tac 1); |
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
223 |
qed "refines_refl"; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
224 |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
225 |
Goalw [refines_def] |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
226 |
"[| 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
|
227 |
by Auto_tac; |
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
228 |
qed "refines_trans"; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
229 |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
230 |
Goalw [strict_ex_prop_def] |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
231 |
"strict_ex_prop X \ |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
232 |
\ ==> (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
|
233 |
by (Blast_tac 1); |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
234 |
qed "strict_ex_refine_lemma"; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
235 |
|
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
236 |
Goalw [strict_ex_prop_def] |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
237 |
"strict_ex_prop X \ |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
238 |
\ ==> (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
|
239 |
\ (F: welldef Int X --> G:X)"; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
240 |
by Safe_tac; |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
241 |
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
|
242 |
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
|
243 |
qed "strict_ex_refine_lemma_v"; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
244 |
|
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
245 |
Goal "[| strict_ex_prop X; \ |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
246 |
\ 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
|
247 |
\ ==> (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
|
248 |
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
|
249 |
THEN assume_tac 1); |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
250 |
by (asm_full_simp_tac |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
251 |
(simpset() addsimps [refines_def, iso_refines_def, |
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
252 |
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
|
253 |
qed "ex_refinement_thm"; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
254 |
|
6012
1894bfc4aee9
Addition of the States component; parts of Comp not working
paulson
parents:
5968
diff
changeset
|
255 |
|
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
256 |
Goalw [strict_uv_prop_def] |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
257 |
"strict_uv_prop X \ |
6295
351b3c2b0d83
removed the infernal States, eqStates, compatible, etc.
paulson
parents:
6018
diff
changeset
|
258 |
\ ==> (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
|
259 |
by (Blast_tac 1); |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
260 |
qed "strict_uv_refine_lemma"; |
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 [strict_uv_prop_def] |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
263 |
"strict_uv_prop X \ |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
264 |
\ ==> (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
|
265 |
\ (F: welldef Int X --> G:X)"; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
266 |
by Safe_tac; |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
267 |
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
|
268 |
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
|
269 |
simpset())); |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
270 |
qed "strict_uv_refine_lemma_v"; |
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 |
Goal "[| strict_uv_prop X; \ |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
273 |
\ 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
|
274 |
\ ==> (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
|
275 |
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
|
276 |
THEN assume_tac 1); |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
277 |
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
|
278 |
strict_uv_refine_lemma_v]) 1); |
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset
|
279 |
qed "uv_refinement_thm"; |