| author | nipkow | 
| Sun, 12 Nov 2006 19:22:10 +0100 | |
| changeset 21312 | 1d39091a3208 | 
| parent 19736 | d8d0f8f51d69 | 
| child 21404 | eb85850d3eb7 | 
| permissions | -rw-r--r-- | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
1  | 
(* Title: HOL/Library/Continuity.thy  | 
| 11355 | 2  | 
ID: $Id$  | 
3  | 
Author: David von Oheimb, TU Muenchen  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
4  | 
*)  | 
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
5  | 
|
| 14706 | 6  | 
header {* Continuity and iterations (of set transformers) *}
 | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
7  | 
|
| 15131 | 8  | 
theory Continuity  | 
| 15140 | 9  | 
imports Main  | 
| 15131 | 10  | 
begin  | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
11  | 
|
| 21312 | 12  | 
subsection{*Continuity for complete lattices*}
 | 
13  | 
||
14  | 
constdefs  | 
|
15  | 
chain :: "(nat \<Rightarrow> 'a::order) \<Rightarrow> bool"  | 
|
16  | 
"chain M == !i. M i \<le> M(Suc i)"  | 
|
17  | 
 continuous :: "('a::order \<Rightarrow> 'a::order) \<Rightarrow> bool"
 | 
|
18  | 
"continuous F == !M. chain M \<longrightarrow> F(SUP i. M i) = (SUP i. F(M i))"  | 
|
19  | 
||
20  | 
abbreviation  | 
|
21  | 
bot :: "'a::order"  | 
|
22  | 
"bot == Sup {}"
 | 
|
23  | 
||
24  | 
lemma SUP_nat_conv:  | 
|
25  | 
"(SUP n::nat. M n::'a::comp_lat) = join (M 0) (SUP n. M(Suc n))"  | 
|
26  | 
apply(rule order_antisym)  | 
|
27  | 
apply(rule SUP_leI)  | 
|
28  | 
apply(case_tac n)  | 
|
29  | 
apply simp  | 
|
30  | 
apply (blast intro:le_SUPI le_joinI2)  | 
|
31  | 
apply(simp)  | 
|
32  | 
apply (blast intro:SUP_leI le_SUPI)  | 
|
33  | 
done  | 
|
34  | 
||
35  | 
lemma continuous_mono: fixes F :: "'a::comp_lat \<Rightarrow> 'a::comp_lat"  | 
|
36  | 
assumes "continuous F" shows "mono F"  | 
|
37  | 
proof  | 
|
38  | 
fix A B :: "'a" assume "A <= B"  | 
|
39  | 
let ?C = "%i::nat. if i=0 then A else B"  | 
|
40  | 
have "chain ?C" using `A <= B` by(simp add:chain_def)  | 
|
41  | 
have "F B = join (F A) (F B)"  | 
|
42  | 
proof -  | 
|
43  | 
have "join A B = B" using `A <= B` by (simp add:join_absorp2)  | 
|
44  | 
hence "F B = F(SUP i. ?C i)" by(simp add: SUP_nat_conv)  | 
|
45  | 
also have "\<dots> = (SUP i. F(?C i))"  | 
|
46  | 
using `chain ?C` `continuous F` by(simp add:continuous_def)  | 
|
47  | 
also have "\<dots> = join (F A) (F B)" by(simp add: SUP_nat_conv)  | 
|
48  | 
finally show ?thesis .  | 
|
49  | 
qed  | 
|
50  | 
thus "F A \<le> F B" by(subst le_def_join, simp)  | 
|
51  | 
qed  | 
|
52  | 
||
53  | 
lemma continuous_lfp:  | 
|
54  | 
assumes "continuous F" shows "lfp F = (SUP i. (F^i) bot)"  | 
|
55  | 
proof -  | 
|
56  | 
note mono = continuous_mono[OF `continuous F`]  | 
|
57  | 
  { fix i have "(F^i) bot \<le> lfp F"
 | 
|
58  | 
proof (induct i)  | 
|
59  | 
show "(F^0) bot \<le> lfp F" by simp  | 
|
60  | 
next  | 
|
61  | 
case (Suc i)  | 
|
62  | 
have "(F^(Suc i)) bot = F((F^i) bot)" by simp  | 
|
63  | 
also have "\<dots> \<le> F(lfp F)" by(rule monoD[OF mono Suc])  | 
|
64  | 
also have "\<dots> = lfp F" by(simp add:lfp_unfold[OF mono, symmetric])  | 
|
65  | 
finally show ?case .  | 
|
66  | 
qed }  | 
|
67  | 
hence "(SUP i. (F^i) bot) \<le> lfp F" by (blast intro!:SUP_leI)  | 
|
68  | 
moreover have "lfp F \<le> (SUP i. (F^i) bot)" (is "_ \<le> ?U")  | 
|
69  | 
proof (rule lfp_lowerbound)  | 
|
70  | 
have "chain(%i. (F^i) bot)"  | 
|
71  | 
proof -  | 
|
72  | 
      { fix i have "(F^i) bot \<le> (F^(Suc i)) bot"
 | 
|
73  | 
proof (induct i)  | 
|
74  | 
case 0 show ?case by simp  | 
|
75  | 
next  | 
|
76  | 
case Suc thus ?case using monoD[OF mono Suc] by auto  | 
|
77  | 
qed }  | 
|
78  | 
thus ?thesis by(auto simp add:chain_def)  | 
|
79  | 
qed  | 
|
80  | 
hence "F ?U = (SUP i. (F^(i+1)) bot)" using `continuous F` by (simp add:continuous_def)  | 
|
81  | 
also have "\<dots> \<le> ?U" by(blast intro:SUP_leI le_SUPI)  | 
|
82  | 
finally show "F ?U \<le> ?U" .  | 
|
83  | 
qed  | 
|
84  | 
ultimately show ?thesis by (blast intro:order_antisym)  | 
|
85  | 
qed  | 
|
86  | 
||
87  | 
text{* The following development is just for sets but presents an up
 | 
|
88  | 
and a down version of chains and continuity and covers @{const gfp}. *}
 | 
|
89  | 
||
90  | 
||
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
91  | 
subsection "Chains"  | 
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
92  | 
|
| 19736 | 93  | 
definition  | 
| 11355 | 94  | 
up_chain :: "(nat => 'a set) => bool"  | 
| 19736 | 95  | 
"up_chain F = (\<forall>i. F i \<subseteq> F (Suc i))"  | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
96  | 
|
| 11355 | 97  | 
lemma up_chainI: "(!!i. F i \<subseteq> F (Suc i)) ==> up_chain F"  | 
98  | 
by (simp add: up_chain_def)  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
99  | 
|
| 11355 | 100  | 
lemma up_chainD: "up_chain F ==> F i \<subseteq> F (Suc i)"  | 
101  | 
by (simp add: up_chain_def)  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
102  | 
|
| 19736 | 103  | 
lemma up_chain_less_mono:  | 
104  | 
"up_chain F ==> x < y ==> F x \<subseteq> F y"  | 
|
105  | 
apply (induct y)  | 
|
106  | 
apply (blast dest: up_chainD elim: less_SucE)+  | 
|
| 11355 | 107  | 
done  | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
108  | 
|
| 11355 | 109  | 
lemma up_chain_mono: "up_chain F ==> x \<le> y ==> F x \<subseteq> F y"  | 
110  | 
apply (drule le_imp_less_or_eq)  | 
|
111  | 
apply (blast dest: up_chain_less_mono)  | 
|
112  | 
done  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
113  | 
|
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
114  | 
|
| 19736 | 115  | 
definition  | 
| 11355 | 116  | 
down_chain :: "(nat => 'a set) => bool"  | 
| 19736 | 117  | 
"down_chain F = (\<forall>i. F (Suc i) \<subseteq> F i)"  | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
118  | 
|
| 11355 | 119  | 
lemma down_chainI: "(!!i. F (Suc i) \<subseteq> F i) ==> down_chain F"  | 
120  | 
by (simp add: down_chain_def)  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
121  | 
|
| 11355 | 122  | 
lemma down_chainD: "down_chain F ==> F (Suc i) \<subseteq> F i"  | 
123  | 
by (simp add: down_chain_def)  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
124  | 
|
| 19736 | 125  | 
lemma down_chain_less_mono:  | 
126  | 
"down_chain F ==> x < y ==> F y \<subseteq> F x"  | 
|
127  | 
apply (induct y)  | 
|
128  | 
apply (blast dest: down_chainD elim: less_SucE)+  | 
|
| 11355 | 129  | 
done  | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
130  | 
|
| 11355 | 131  | 
lemma down_chain_mono: "down_chain F ==> x \<le> y ==> F y \<subseteq> F x"  | 
132  | 
apply (drule le_imp_less_or_eq)  | 
|
133  | 
apply (blast dest: down_chain_less_mono)  | 
|
134  | 
done  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
135  | 
|
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
136  | 
|
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
137  | 
subsection "Continuity"  | 
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
138  | 
|
| 19736 | 139  | 
definition  | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
140  | 
  up_cont :: "('a set => 'a set) => bool"
 | 
| 19736 | 141  | 
"up_cont f = (\<forall>F. up_chain F --> f (\<Union>(range F)) = \<Union>(f ` range F))"  | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
142  | 
|
| 11355 | 143  | 
lemma up_contI:  | 
144  | 
"(!!F. up_chain F ==> f (\<Union>(range F)) = \<Union>(f ` range F)) ==> up_cont f"  | 
|
145  | 
apply (unfold up_cont_def)  | 
|
146  | 
apply blast  | 
|
147  | 
done  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
148  | 
|
| 11355 | 149  | 
lemma up_contD:  | 
150  | 
"up_cont f ==> up_chain F ==> f (\<Union>(range F)) = \<Union>(f ` range F)"  | 
|
151  | 
apply (unfold up_cont_def)  | 
|
152  | 
apply auto  | 
|
153  | 
done  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
154  | 
|
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
155  | 
|
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
156  | 
lemma up_cont_mono: "up_cont f ==> mono f"  | 
| 11355 | 157  | 
apply (rule monoI)  | 
158  | 
apply (drule_tac F = "\<lambda>i. if i = 0 then A else B" in up_contD)  | 
|
159  | 
apply (rule up_chainI)  | 
|
160  | 
apply simp+  | 
|
161  | 
apply (drule Un_absorb1)  | 
|
| 11461 | 162  | 
apply (auto simp add: nat_not_singleton)  | 
| 11355 | 163  | 
done  | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
164  | 
|
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
165  | 
|
| 19736 | 166  | 
definition  | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
167  | 
  down_cont :: "('a set => 'a set) => bool"
 | 
| 19736 | 168  | 
"down_cont f =  | 
169  | 
(\<forall>F. down_chain F --> f (Inter (range F)) = Inter (f ` range F))"  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
170  | 
|
| 11355 | 171  | 
lemma down_contI:  | 
172  | 
"(!!F. down_chain F ==> f (Inter (range F)) = Inter (f ` range F)) ==>  | 
|
173  | 
down_cont f"  | 
|
174  | 
apply (unfold down_cont_def)  | 
|
175  | 
apply blast  | 
|
176  | 
done  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
177  | 
|
| 11355 | 178  | 
lemma down_contD: "down_cont f ==> down_chain F ==>  | 
179  | 
f (Inter (range F)) = Inter (f ` range F)"  | 
|
180  | 
apply (unfold down_cont_def)  | 
|
181  | 
apply auto  | 
|
182  | 
done  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
183  | 
|
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
184  | 
lemma down_cont_mono: "down_cont f ==> mono f"  | 
| 11355 | 185  | 
apply (rule monoI)  | 
186  | 
apply (drule_tac F = "\<lambda>i. if i = 0 then B else A" in down_contD)  | 
|
187  | 
apply (rule down_chainI)  | 
|
188  | 
apply simp+  | 
|
189  | 
apply (drule Int_absorb1)  | 
|
| 11461 | 190  | 
apply (auto simp add: nat_not_singleton)  | 
| 11355 | 191  | 
done  | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
192  | 
|
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
193  | 
|
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
194  | 
subsection "Iteration"  | 
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
195  | 
|
| 19736 | 196  | 
definition  | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
197  | 
  up_iterate :: "('a set => 'a set) => nat => 'a set"
 | 
| 19736 | 198  | 
  "up_iterate f n = (f^n) {}"
 | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
199  | 
|
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
200  | 
lemma up_iterate_0 [simp]: "up_iterate f 0 = {}"
 | 
| 11355 | 201  | 
by (simp add: up_iterate_def)  | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
202  | 
|
| 11355 | 203  | 
lemma up_iterate_Suc [simp]: "up_iterate f (Suc i) = f (up_iterate f i)"  | 
204  | 
by (simp add: up_iterate_def)  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
205  | 
|
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
206  | 
lemma up_iterate_chain: "mono F ==> up_chain (up_iterate F)"  | 
| 11355 | 207  | 
apply (rule up_chainI)  | 
208  | 
apply (induct_tac i)  | 
|
209  | 
apply simp+  | 
|
210  | 
apply (erule (1) monoD)  | 
|
211  | 
done  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
212  | 
|
| 11355 | 213  | 
lemma UNION_up_iterate_is_fp:  | 
214  | 
"up_cont F ==>  | 
|
215  | 
F (UNION UNIV (up_iterate F)) = UNION UNIV (up_iterate F)"  | 
|
216  | 
apply (frule up_cont_mono [THEN up_iterate_chain])  | 
|
217  | 
apply (drule (1) up_contD)  | 
|
218  | 
apply simp  | 
|
219  | 
apply (auto simp del: up_iterate_Suc simp add: up_iterate_Suc [symmetric])  | 
|
220  | 
apply (case_tac xa)  | 
|
221  | 
apply auto  | 
|
222  | 
done  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
223  | 
|
| 11355 | 224  | 
lemma UNION_up_iterate_lowerbound:  | 
225  | 
"mono F ==> F P = P ==> UNION UNIV (up_iterate F) \<subseteq> P"  | 
|
226  | 
apply (subgoal_tac "(!!i. up_iterate F i \<subseteq> P)")  | 
|
227  | 
apply fast  | 
|
228  | 
apply (induct_tac i)  | 
|
229  | 
prefer 2 apply (drule (1) monoD)  | 
|
230  | 
apply auto  | 
|
231  | 
done  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
232  | 
|
| 11355 | 233  | 
lemma UNION_up_iterate_is_lfp:  | 
234  | 
"up_cont F ==> lfp F = UNION UNIV (up_iterate F)"  | 
|
235  | 
apply (rule set_eq_subset [THEN iffD2])  | 
|
236  | 
apply (rule conjI)  | 
|
237  | 
prefer 2  | 
|
238  | 
apply (drule up_cont_mono)  | 
|
239  | 
apply (rule UNION_up_iterate_lowerbound)  | 
|
240  | 
apply assumption  | 
|
241  | 
apply (erule lfp_unfold [symmetric])  | 
|
242  | 
apply (rule lfp_lowerbound)  | 
|
243  | 
apply (rule set_eq_subset [THEN iffD1, THEN conjunct2])  | 
|
244  | 
apply (erule UNION_up_iterate_is_fp [symmetric])  | 
|
245  | 
done  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
246  | 
|
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
247  | 
|
| 19736 | 248  | 
definition  | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
249  | 
  down_iterate :: "('a set => 'a set) => nat => 'a set"
 | 
| 19736 | 250  | 
"down_iterate f n = (f^n) UNIV"  | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
251  | 
|
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
252  | 
lemma down_iterate_0 [simp]: "down_iterate f 0 = UNIV"  | 
| 11355 | 253  | 
by (simp add: down_iterate_def)  | 
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
254  | 
|
| 11355 | 255  | 
lemma down_iterate_Suc [simp]:  | 
256  | 
"down_iterate f (Suc i) = f (down_iterate f i)"  | 
|
257  | 
by (simp add: down_iterate_def)  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
258  | 
|
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
259  | 
lemma down_iterate_chain: "mono F ==> down_chain (down_iterate F)"  | 
| 11355 | 260  | 
apply (rule down_chainI)  | 
261  | 
apply (induct_tac i)  | 
|
262  | 
apply simp+  | 
|
263  | 
apply (erule (1) monoD)  | 
|
264  | 
done  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
265  | 
|
| 11355 | 266  | 
lemma INTER_down_iterate_is_fp:  | 
267  | 
"down_cont F ==>  | 
|
268  | 
F (INTER UNIV (down_iterate F)) = INTER UNIV (down_iterate F)"  | 
|
269  | 
apply (frule down_cont_mono [THEN down_iterate_chain])  | 
|
270  | 
apply (drule (1) down_contD)  | 
|
271  | 
apply simp  | 
|
272  | 
apply (auto simp del: down_iterate_Suc simp add: down_iterate_Suc [symmetric])  | 
|
273  | 
apply (case_tac xa)  | 
|
274  | 
apply auto  | 
|
275  | 
done  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
276  | 
|
| 11355 | 277  | 
lemma INTER_down_iterate_upperbound:  | 
278  | 
"mono F ==> F P = P ==> P \<subseteq> INTER UNIV (down_iterate F)"  | 
|
279  | 
apply (subgoal_tac "(!!i. P \<subseteq> down_iterate F i)")  | 
|
280  | 
apply fast  | 
|
281  | 
apply (induct_tac i)  | 
|
282  | 
prefer 2 apply (drule (1) monoD)  | 
|
283  | 
apply auto  | 
|
284  | 
done  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
285  | 
|
| 11355 | 286  | 
lemma INTER_down_iterate_is_gfp:  | 
287  | 
"down_cont F ==> gfp F = INTER UNIV (down_iterate F)"  | 
|
288  | 
apply (rule set_eq_subset [THEN iffD2])  | 
|
289  | 
apply (rule conjI)  | 
|
290  | 
apply (drule down_cont_mono)  | 
|
291  | 
apply (rule INTER_down_iterate_upperbound)  | 
|
292  | 
apply assumption  | 
|
293  | 
apply (erule gfp_unfold [symmetric])  | 
|
294  | 
apply (rule gfp_upperbound)  | 
|
295  | 
apply (rule set_eq_subset [THEN iffD1, THEN conjunct2])  | 
|
296  | 
apply (erule INTER_down_iterate_is_fp)  | 
|
297  | 
done  | 
|
| 
11351
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
298  | 
|
| 
 
c5c403d30c77
added Library/Nat_Infinity.thy and Library/Continuity.thy
 
oheimb 
parents:  
diff
changeset
 | 
299  | 
end  |