author  paulson 
Wed, 25 Nov 1998 15:52:45 +0100  
changeset 5968  06f9dbfff032 
parent 5804  8e0a4c4fd67b 
child 6012  1894bfc4aee9 
permissions  rwrr 
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 
(*split_all_tac causes a big blowup*) 

5706  12 
claset_ref() := claset() delSWrapper record_split_name; 
5597  13 

14 
Delsimps [split_paired_All]; 

15 

16 

17 
(*** component ***) 

18 

5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

19 
Goalw [component_def] "component SKIP F"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

20 
by (blast_tac (claset() addIs [Join_SKIP_left]) 1); 
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 

5597  23 
Goalw [component_def] "component F F"; 
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
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 

5968  29 
Goalw [component_def] "component F (F Join G)"; 
30 
by (Blast_tac 1); 

31 
qed "component_Join1"; 

32 

33 
Goalw [component_def] "component G (F Join G)"; 

34 
by (simp_tac (simpset() addsimps [Join_commute]) 1); 

35 
by (Blast_tac 1); 

36 
qed "component_Join2"; 

37 

38 
Goalw [component_def] "i : I ==> component (F i) (JN i:I. (F i))"; 

39 
by (blast_tac (claset() addIs [JN_absorb]) 1); 

40 
qed "component_JN"; 

41 

5597  42 
Goalw [component_def] "[ component F G; component G H ] ==> component F H"; 
43 
by (blast_tac (claset() addIs [Join_assoc RS sym]) 1); 

44 
qed "component_trans"; 

45 

46 
Goalw [component_def,Join_def] "component F G ==> Acts F <= Acts G"; 

5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

47 
by Auto_tac; 
5620  48 
qed "component_Acts"; 
5597  49 

50 
Goalw [component_def,Join_def] "component F G ==> Init G <= Init F"; 

5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

51 
by Auto_tac; 
5620  52 
qed "component_Init"; 
5597  53 

54 
Goal "[ component F G; component G F ] ==> F=G"; 

55 
by (asm_simp_tac (simpset() addsimps [program_equalityI, equalityI, 

5620  56 
component_Acts, component_Init]) 1); 
5597  57 
qed "component_anti_sym"; 
58 

5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset

59 
Goalw [component_def] 
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset

60 
"component F H = (EX G. F Join G = H & Disjoint F G)"; 
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset

61 
by (blast_tac (claset() addSIs [Diff_Disjoint, Join_Diff2]) 1); 
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset

62 
qed "component_eq"; 
5597  63 

64 
(*** existential properties ***) 

65 

66 
Goalw [ex_prop_def] 

67 
"[ ex_prop X; finite GG ] ==> GG Int X ~= {} > (JN G:GG. G) : X"; 

68 
by (etac finite_induct 1); 

69 
by (auto_tac (claset(), simpset() addsimps [Int_insert_left])); 

70 
qed_spec_mp "ex1"; 

71 

72 
Goalw [ex_prop_def] 

5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

73 
"ALL GG. finite GG & GG Int X ~= {} > (JN G:GG. G) : X ==> ex_prop X"; 
5597  74 
by (Clarify_tac 1); 
75 
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

76 
by Auto_tac; 
5597  77 
qed "ex2"; 
78 

79 
(*Chandy & Sanders take this as a definition*) 

80 
Goal "ex_prop X = (ALL GG. finite GG & GG Int X ~= {} > (JN G:GG. G) : X)"; 

81 
by (blast_tac (claset() addIs [ex1,ex2]) 1); 

82 
qed "ex_prop_finite"; 

83 

84 
(*Their "equivalent definition" given at the end of section 3*) 

85 
Goal "ex_prop X = (ALL G. G:X = (ALL H. component G H > H: X))"; 

5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

86 
by Auto_tac; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

87 
by (rewrite_goals_tac [ex_prop_def, component_def]); 
5597  88 
by (Blast_tac 1); 
89 
by Safe_tac; 

90 
by (stac Join_commute 2); 

91 
by (ALLGOALS Blast_tac); 

92 
qed "ex_prop_equiv"; 

93 

94 

95 
(*** universal properties ***) 

96 

97 
Goalw [uv_prop_def] 

98 
"[ uv_prop X; finite GG ] ==> GG <= X > (JN G:GG. G) : X"; 

99 
by (etac finite_induct 1); 

100 
by (auto_tac (claset(), simpset() addsimps [Int_insert_left])); 

101 
qed_spec_mp "uv1"; 

102 

103 
Goalw [uv_prop_def] 

104 
"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

105 
by (rtac conjI 1); 
5597  106 
by (Clarify_tac 2); 
107 
by (dres_inst_tac [("x", "{F,G}")] spec 2); 

108 
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

109 
by Auto_tac; 
5597  110 
qed "uv2"; 
111 

112 
(*Chandy & Sanders take this as a definition*) 

113 
Goal "uv_prop X = (ALL GG. finite GG & GG <= X > (JN G:GG. G) : X)"; 

114 
by (blast_tac (claset() addIs [uv1,uv2]) 1); 

115 
qed "uv_prop_finite"; 

116 

117 

118 
(*** guarantees ***) 

119 

5668  120 
(*This equation is more intuitive than the official definition*) 
5968  121 
Goal "(F : X guarantees Y) = \ 
122 
\ (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

123 
by (simp_tac (simpset() addsimps [guarantees_def, component_eq]) 1); 
5668  124 
by (Blast_tac 1); 
125 
qed "guarantees_eq"; 

126 

5597  127 
Goalw [guarantees_def] "X <= Y ==> X guarantees Y = UNIV"; 
128 
by (Blast_tac 1); 

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 

e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

155 
Goalw [guarantees_def] 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

156 
"V guarantees X Int ((X Int Y) guarantees Z) <= (V Int Y) guarantees Z"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

157 
by (Blast_tac 1); 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

158 
qed "combining1"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

159 

e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

160 
Goalw [guarantees_def] 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

161 
"V guarantees (X Un Y) Int (Y guarantees Z) <= V guarantees (X Un Z)"; 
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 "combining2"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

164 

5630  165 
Goalw [guarantees_def] 
5968  166 
"ALL i:I. F : X guarantees (Y i) ==> F : X guarantees (INT i:I. Y i)"; 
5630  167 
by (Blast_tac 1); 
168 
qed "all_guarantees"; 

169 

170 
Goalw [guarantees_def] 

5968  171 
"EX i:I. F : X guarantees (Y i) ==> F : X guarantees (UN i:I. Y i)"; 
5630  172 
by (Blast_tac 1); 
173 
qed "ex_guarantees"; 

174 

5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset

175 
val prems = Goal 
5968  176 
"(!!G. [ F Join G : X; Disjoint F G ] ==> F Join G : Y) \ 
177 
\ ==> F : X guarantees Y"; 

5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset

178 
by (simp_tac (simpset() addsimps [guarantees_def, component_eq]) 1); 
5630  179 
by (blast_tac (claset() addIs prems) 1); 
180 
qed "guaranteesI"; 

181 

5804
8e0a4c4fd67b
Revising the Client proof as suggested by Michel Charpentier. New lemmas
paulson
parents:
5706
diff
changeset

182 
Goalw [guarantees_def, component_def] 
5968  183 
"[ 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

184 
by (Blast_tac 1); 
5637  185 
qed "guaranteesD"; 
186 

5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

187 

e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

188 
(*** welldefinedness ***) 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

189 

e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

190 
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

191 
by Auto_tac; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

192 
qed "Join_welldef_D1"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

193 

e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

194 
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

195 
by Auto_tac; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

196 
qed "Join_welldef_D2"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

197 

e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

198 
(*** refinement ***) 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

199 

e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

200 
Goalw [refines_def] "F refines F wrt X"; 
5597  201 
by (Blast_tac 1); 
5612
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

202 
qed "refines_refl"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

203 

e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

204 
Goalw [refines_def] 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

205 
"[ H refines G wrt X; G refines F wrt X ] ==> H refines F wrt X"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

206 
by (Blast_tac 1); 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

207 
qed "refines_trans"; 
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 
Goalw [strict_ex_prop_def] 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

210 
"strict_ex_prop X \ 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

211 
\ ==> (ALL H. F Join H : X > G Join H : X) = (F:X > G:X)"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

212 
by (Blast_tac 1); 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

213 
qed "strict_ex_refine_lemma"; 
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 [strict_ex_prop_def] 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

216 
"strict_ex_prop X \ 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

217 
\ ==> (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

218 
\ (F: welldef Int X > G:X)"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

219 
by Safe_tac; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

220 
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

221 
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

222 
qed "strict_ex_refine_lemma_v"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

223 

e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

224 
Goal "[ strict_ex_prop X; \ 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

225 
\ 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

226 
\ ==> (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

227 
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

228 
THEN assume_tac 1); 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

229 
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

230 
strict_ex_refine_lemma_v]) 1); 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

231 
qed "ex_refinement_thm"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

232 

e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

233 
Goalw [strict_uv_prop_def] 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

234 
"strict_uv_prop X \ 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

235 
\ ==> (ALL H. F Join H : X > G Join H : X) = (F:X > G:X)"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

236 
by (Blast_tac 1); 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

237 
qed "strict_uv_refine_lemma"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

238 

e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

239 
Goalw [strict_uv_prop_def] 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

240 
"strict_uv_prop X \ 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

241 
\ ==> (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

242 
\ (F: welldef Int X > G:X)"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

243 
by Safe_tac; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

244 
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

245 
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

246 
simpset())); 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

247 
qed "strict_uv_refine_lemma_v"; 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

248 

e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

249 
Goal "[ strict_uv_prop X; \ 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

250 
\ 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

251 
\ ==> (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

252 
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

253 
THEN assume_tac 1); 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

254 
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

255 
strict_uv_refine_lemma_v]) 1); 
e981ca6f7332
Finished proofs to end of section 5.1 of Chandy and Sanders
paulson
parents:
5597
diff
changeset

256 
qed "uv_refinement_thm"; 