| author | nipkow | 
| Tue, 14 Apr 2015 16:47:55 +0200 | |
| changeset 60070 | 73c6e58a105c | 
| parent 58889 | 5b7a9633cfa8 | 
| child 61952 | 546958347e05 | 
| permissions | -rw-r--r-- | 
| 37936 | 1  | 
(* Title: HOL/UNITY/FP.thy  | 
| 4776 | 2  | 
Author: Lawrence C Paulson, Cambridge University Computer Laboratory  | 
3  | 
Copyright 1998 University of Cambridge  | 
|
4  | 
||
5  | 
From Misra, "A Logic for Concurrent Programming", 1994  | 
|
6  | 
*)  | 
|
7  | 
||
| 58889 | 8  | 
section{*Fixed Point of a Program*}
 | 
| 13798 | 9  | 
|
| 16417 | 10  | 
theory FP imports UNITY begin  | 
| 4776 | 11  | 
|
| 
35416
 
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
 
haftmann 
parents: 
16417 
diff
changeset
 | 
12  | 
definition FP_Orig :: "'a program => 'a set" where  | 
| 5648 | 13  | 
    "FP_Orig F == Union{A. ALL B. F : stable (A Int B)}"
 | 
| 4776 | 14  | 
|
| 
35416
 
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
 
haftmann 
parents: 
16417 
diff
changeset
 | 
15  | 
definition FP :: "'a program => 'a set" where  | 
| 5648 | 16  | 
    "FP F == {s. F : stable {s}}"
 | 
| 4776 | 17  | 
|
| 13796 | 18  | 
lemma stable_FP_Orig_Int: "F : stable (FP_Orig F Int B)"  | 
| 15481 | 19  | 
apply (simp only: FP_Orig_def stable_def Int_Union2)  | 
| 13796 | 20  | 
apply (blast intro: constrains_UN)  | 
21  | 
done  | 
|
22  | 
||
23  | 
lemma FP_Orig_weakest:  | 
|
24  | 
"(!!B. F : stable (A Int B)) ==> A <= FP_Orig F"  | 
|
| 15481 | 25  | 
by (simp add: FP_Orig_def stable_def, blast)  | 
| 13796 | 26  | 
|
27  | 
lemma stable_FP_Int: "F : stable (FP F Int B)"  | 
|
28  | 
apply (subgoal_tac "FP F Int B = (UN x:B. FP F Int {x}) ")
 | 
|
29  | 
prefer 2 apply blast  | 
|
30  | 
apply (simp (no_asm_simp) add: Int_insert_right)  | 
|
| 15481 | 31  | 
apply (simp add: FP_def stable_def)  | 
| 13796 | 32  | 
apply (rule constrains_UN)  | 
33  | 
apply (simp (no_asm))  | 
|
34  | 
done  | 
|
35  | 
||
36  | 
lemma FP_equivalence: "FP F = FP_Orig F"  | 
|
37  | 
apply (rule equalityI)  | 
|
38  | 
apply (rule stable_FP_Int [THEN FP_Orig_weakest])  | 
|
| 15481 | 39  | 
apply (simp add: FP_Orig_def FP_def, clarify)  | 
| 13796 | 40  | 
apply (drule_tac x = "{x}" in spec)
 | 
41  | 
apply (simp add: Int_insert_right)  | 
|
42  | 
done  | 
|
43  | 
||
44  | 
lemma FP_weakest:  | 
|
45  | 
"(!!B. F : stable (A Int B)) ==> A <= FP F"  | 
|
46  | 
by (simp add: FP_equivalence FP_Orig_weakest)  | 
|
47  | 
||
48  | 
lemma Compl_FP:  | 
|
49  | 
    "-(FP F) = (UN act: Acts F. -{s. act``{s} <= {s}})"
 | 
|
50  | 
by (simp add: FP_def stable_def constrains_def, blast)  | 
|
51  | 
||
52  | 
lemma Diff_FP: "A - (FP F) = (UN act: Acts F. A - {s. act``{s} <= {s}})"
 | 
|
53  | 
by (simp add: Diff_eq Compl_FP)  | 
|
54  | 
||
| 
13812
 
91713a1915ee
converting HOL/UNITY to use unconditional fairness
 
paulson 
parents: 
13798 
diff
changeset
 | 
55  | 
lemma totalize_FP [simp]: "FP (totalize F) = FP F"  | 
| 
 
91713a1915ee
converting HOL/UNITY to use unconditional fairness
 
paulson 
parents: 
13798 
diff
changeset
 | 
56  | 
by (simp add: FP_def)  | 
| 
 
91713a1915ee
converting HOL/UNITY to use unconditional fairness
 
paulson 
parents: 
13798 
diff
changeset
 | 
57  | 
|
| 4776 | 58  | 
end  |