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