equal
deleted
inserted
replaced
1 (* Title: HOL/UNITY/Transformers |
1 (* Title: HOL/UNITY/Transformers |
2 ID: $Id$ |
2 ID: $Id$ |
3 Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
3 Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
4 Copyright 2003 University of Cambridge |
4 Copyright 2003 University of Cambridge |
5 |
5 |
6 Predicate Transformers from |
6 Predicate Transformers. From |
7 |
7 |
8 David Meier and Beverly Sanders, |
8 David Meier and Beverly Sanders, |
9 Composing Leads-to Properties |
9 Composing Leads-to Properties |
10 Theoretical Computer Science 243:1-2 (2000), 339-361. |
10 Theoretical Computer Science 243:1-2 (2000), 339-361. |
|
11 |
|
12 David Meier, |
|
13 Progress Properties in Program Refinement and Parallel Composition |
|
14 Swiss Federal Institute of Technology Zurich (1997) |
11 *) |
15 *) |
12 |
16 |
13 header{*Predicate Transformers*} |
17 header{*Predicate Transformers*} |
14 |
18 |
15 theory Transformers = Comp: |
19 theory Transformers = Comp: |
272 apply (clarify dest!: bchoice) |
276 apply (clarify dest!: bchoice) |
273 apply (rule_tac x = "\<Union>{Z. \<exists>U\<in>W. Z = f U}" in exI) |
277 apply (rule_tac x = "\<Union>{Z. \<exists>U\<in>W. Z = f U}" in exI) |
274 apply (blast intro: wens_set.Union) |
278 apply (blast intro: wens_set.Union) |
275 done |
279 done |
276 |
280 |
277 theorem leadsTo_Union: |
281 theorem leadsTo_Join: |
278 assumes awpF: "T-B \<subseteq> awp F T" |
282 assumes leadsTo: "F \<in> A leadsTo B" |
|
283 and awpF: "T-B \<subseteq> awp F T" |
279 and awpG: "!!X. X \<in> wens_set F B ==> (T\<inter>X) - B \<subseteq> awp G (T\<inter>X)" |
284 and awpG: "!!X. X \<in> wens_set F B ==> (T\<inter>X) - B \<subseteq> awp G (T\<inter>X)" |
280 and leadsTo: "F \<in> A leadsTo B" |
|
281 shows "F\<squnion>G \<in> T\<inter>A leadsTo B" |
285 shows "F\<squnion>G \<in> T\<inter>A leadsTo B" |
282 apply (rule leadsTo [THEN leadsTo_imp_wens_set, THEN bexE]) |
286 apply (rule leadsTo [THEN leadsTo_imp_wens_set, THEN bexE]) |
283 apply (rule wens_Union [THEN bexE]) |
287 apply (rule wens_Union [THEN bexE]) |
284 apply (rule awpF) |
288 apply (rule awpF) |
285 apply (erule awpG, assumption) |
289 apply (erule awpG, assumption) |
470 apply (erule ssubst, erule single_subset_wens_set) |
474 apply (erule ssubst, erule single_subset_wens_set) |
471 done |
475 done |
472 |
476 |
473 text{*Generalizing Misra's Fixed Point Union Theorem (4.41)*} |
477 text{*Generalizing Misra's Fixed Point Union Theorem (4.41)*} |
474 |
478 |
475 lemma fp_leadsTo_Union: |
479 lemma fp_leadsTo_Join: |
476 "[|T-B \<subseteq> awp F T; T-B \<subseteq> FP G; F \<in> A leadsTo B|] ==> F\<squnion>G \<in> T\<inter>A leadsTo B" |
480 "[|T-B \<subseteq> awp F T; T-B \<subseteq> FP G; F \<in> A leadsTo B|] ==> F\<squnion>G \<in> T\<inter>A leadsTo B" |
477 apply (rule leadsTo_Union, assumption) |
481 apply (rule leadsTo_Join, assumption, blast) |
478 apply (simp add: FP_def awp_iff_constrains stable_def constrains_def, blast, assumption) |
482 apply (simp add: FP_def awp_iff_constrains stable_def constrains_def, blast) |
479 done |
483 done |
480 |
484 |
481 end |
485 end |