author | haftmann |
Thu, 04 Oct 2007 19:41:55 +0200 | |
changeset 24841 | df8448bc7a8b |
parent 24390 | 9b5073c79a0b |
child 24915 | fc90277c0dd7 |
permissions | -rw-r--r-- |
17006 | 1 |
(* Title: HOL/FixedPoint.thy |
2 |
ID: $Id$ |
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
4 |
Author: Stefan Berghofer, TU Muenchen |
17006 | 5 |
Copyright 1992 University of Cambridge |
6 |
*) |
|
7 |
||
22452
8a86fd2a1bf0
adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents:
22439
diff
changeset
|
8 |
header {* Fixed Points and the Knaster-Tarski Theorem*} |
17006 | 9 |
|
10 |
theory FixedPoint |
|
23878 | 11 |
imports Lattices |
22918 | 12 |
begin |
13 |
||
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
14 |
subsection {* Least and greatest fixed points *} |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
15 |
|
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
16 |
definition |
22452
8a86fd2a1bf0
adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents:
22439
diff
changeset
|
17 |
lfp :: "('a\<Colon>complete_lattice \<Rightarrow> 'a) \<Rightarrow> 'a" where |
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
18 |
"lfp f = Inf {u. f u \<le> u}" --{*least fixed point*} |
17006 | 19 |
|
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
20 |
definition |
22452
8a86fd2a1bf0
adjusted to new lattice theory developement in Lattices.thy / FixedPoint.thy
haftmann
parents:
22439
diff
changeset
|
21 |
gfp :: "('a\<Colon>complete_lattice \<Rightarrow> 'a) \<Rightarrow> 'a" where |
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
22 |
"gfp f = Sup {u. u \<le> f u}" --{*greatest fixed point*} |
17006 | 23 |
|
24 |
||
22918 | 25 |
subsection{* Proof of Knaster-Tarski Theorem using @{term lfp} *} |
17006 | 26 |
|
27 |
text{*@{term "lfp f"} is the least upper bound of |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
28 |
the set @{term "{u. f(u) \<le> u}"} *} |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
29 |
|
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
30 |
lemma lfp_lowerbound: "f A \<le> A ==> lfp f \<le> A" |
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
31 |
by (auto simp add: lfp_def intro: Inf_lower) |
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
32 |
|
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
33 |
lemma lfp_greatest: "(!!u. f u \<le> u ==> A \<le> u) ==> A \<le> lfp f" |
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
34 |
by (auto simp add: lfp_def intro: Inf_greatest) |
17006 | 35 |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
36 |
lemma lfp_lemma2: "mono f ==> f (lfp f) \<le> lfp f" |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
37 |
by (iprover intro: lfp_greatest order_trans monoD lfp_lowerbound) |
17006 | 38 |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
39 |
lemma lfp_lemma3: "mono f ==> lfp f \<le> f (lfp f)" |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
40 |
by (iprover intro: lfp_lemma2 monoD lfp_lowerbound) |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
41 |
|
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
42 |
lemma lfp_unfold: "mono f ==> lfp f = f (lfp f)" |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
43 |
by (iprover intro: order_antisym lfp_lemma2 lfp_lemma3) |
17006 | 44 |
|
22356 | 45 |
lemma lfp_const: "lfp (\<lambda>x. t) = t" |
46 |
by (rule lfp_unfold) (simp add:mono_def) |
|
47 |
||
22918 | 48 |
|
49 |
subsection {* General induction rules for least fixed points *} |
|
17006 | 50 |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
51 |
theorem lfp_induct: |
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
52 |
assumes mono: "mono f" and ind: "f (inf (lfp f) P) <= P" |
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
53 |
shows "lfp f <= P" |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
54 |
proof - |
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
55 |
have "inf (lfp f) P <= lfp f" by (rule inf_le1) |
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
56 |
with mono have "f (inf (lfp f) P) <= f (lfp f)" .. |
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
57 |
also from mono have "f (lfp f) = lfp f" by (rule lfp_unfold [symmetric]) |
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
58 |
finally have "f (inf (lfp f) P) <= lfp f" . |
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
59 |
from this and ind have "f (inf (lfp f) P) <= inf (lfp f) P" by (rule le_infI) |
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
60 |
hence "lfp f <= inf (lfp f) P" by (rule lfp_lowerbound) |
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
61 |
also have "inf (lfp f) P <= P" by (rule inf_le2) |
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
62 |
finally show ?thesis . |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
63 |
qed |
17006 | 64 |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
65 |
lemma lfp_induct_set: |
17006 | 66 |
assumes lfp: "a: lfp(f)" |
67 |
and mono: "mono(f)" |
|
68 |
and indhyp: "!!x. [| x: f(lfp(f) Int {x. P(x)}) |] ==> P(x)" |
|
69 |
shows "P(a)" |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
70 |
by (rule lfp_induct [THEN subsetD, THEN CollectD, OF mono _ lfp]) |
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
71 |
(auto simp: inf_set_eq intro: indhyp) |
17006 | 72 |
|
73 |
lemma lfp_ordinal_induct: |
|
74 |
assumes mono: "mono f" |
|
24390 | 75 |
and P_f: "!!S. P S ==> P(f S)" |
76 |
and P_Union: "!!M. !S:M. P S ==> P(Union M)" |
|
77 |
shows "P(lfp f)" |
|
78 |
proof - |
|
79 |
let ?M = "{S. S \<subseteq> lfp f & P S}" |
|
80 |
have "P (Union ?M)" using P_Union by simp |
|
81 |
also have "Union ?M = lfp f" |
|
82 |
proof |
|
83 |
show "Union ?M \<subseteq> lfp f" by blast |
|
84 |
hence "f (Union ?M) \<subseteq> f (lfp f)" by (rule mono [THEN monoD]) |
|
85 |
hence "f (Union ?M) \<subseteq> lfp f" using mono [THEN lfp_unfold] by simp |
|
86 |
hence "f (Union ?M) \<in> ?M" using P_f P_Union by simp |
|
87 |
hence "f (Union ?M) \<subseteq> Union ?M" by (rule Union_upper) |
|
88 |
thus "lfp f \<subseteq> Union ?M" by (rule lfp_lowerbound) |
|
89 |
qed |
|
90 |
finally show ?thesis . |
|
91 |
qed |
|
17006 | 92 |
|
93 |
||
94 |
text{*Definition forms of @{text lfp_unfold} and @{text lfp_induct}, |
|
95 |
to control unfolding*} |
|
96 |
||
97 |
lemma def_lfp_unfold: "[| h==lfp(f); mono(f) |] ==> h = f(h)" |
|
98 |
by (auto intro!: lfp_unfold) |
|
99 |
||
100 |
lemma def_lfp_induct: |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
101 |
"[| A == lfp(f); mono(f); |
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
102 |
f (inf A P) \<le> P |
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
103 |
|] ==> A \<le> P" |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
104 |
by (blast intro: lfp_induct) |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
105 |
|
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
106 |
lemma def_lfp_induct_set: |
17006 | 107 |
"[| A == lfp(f); mono(f); a:A; |
108 |
!!x. [| x: f(A Int {x. P(x)}) |] ==> P(x) |
|
109 |
|] ==> P(a)" |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
110 |
by (blast intro: lfp_induct_set) |
17006 | 111 |
|
112 |
(*Monotonicity of lfp!*) |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
113 |
lemma lfp_mono: "(!!Z. f Z \<le> g Z) ==> lfp f \<le> lfp g" |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
114 |
by (rule lfp_lowerbound [THEN lfp_greatest], blast intro: order_trans) |
17006 | 115 |
|
116 |
||
22918 | 117 |
subsection {* Proof of Knaster-Tarski Theorem using @{term gfp} *} |
17006 | 118 |
|
119 |
text{*@{term "gfp f"} is the greatest lower bound of |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
120 |
the set @{term "{u. u \<le> f(u)}"} *} |
17006 | 121 |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
122 |
lemma gfp_upperbound: "X \<le> f X ==> X \<le> gfp f" |
21312 | 123 |
by (auto simp add: gfp_def intro: Sup_upper) |
17006 | 124 |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
125 |
lemma gfp_least: "(!!u. u \<le> f u ==> u \<le> X) ==> gfp f \<le> X" |
21312 | 126 |
by (auto simp add: gfp_def intro: Sup_least) |
17006 | 127 |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
128 |
lemma gfp_lemma2: "mono f ==> gfp f \<le> f (gfp f)" |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
129 |
by (iprover intro: gfp_least order_trans monoD gfp_upperbound) |
17006 | 130 |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
131 |
lemma gfp_lemma3: "mono f ==> f (gfp f) \<le> gfp f" |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
132 |
by (iprover intro: gfp_lemma2 monoD gfp_upperbound) |
17006 | 133 |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
134 |
lemma gfp_unfold: "mono f ==> gfp f = f (gfp f)" |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
135 |
by (iprover intro: order_antisym gfp_lemma2 gfp_lemma3) |
17006 | 136 |
|
22918 | 137 |
|
138 |
subsection {* Coinduction rules for greatest fixed points *} |
|
17006 | 139 |
|
140 |
text{*weak version*} |
|
141 |
lemma weak_coinduct: "[| a: X; X \<subseteq> f(X) |] ==> a : gfp(f)" |
|
142 |
by (rule gfp_upperbound [THEN subsetD], auto) |
|
143 |
||
144 |
lemma weak_coinduct_image: "!!X. [| a : X; g`X \<subseteq> f (g`X) |] ==> g a : gfp f" |
|
145 |
apply (erule gfp_upperbound [THEN subsetD]) |
|
146 |
apply (erule imageI) |
|
147 |
done |
|
148 |
||
149 |
lemma coinduct_lemma: |
|
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
150 |
"[| X \<le> f (sup X (gfp f)); mono f |] ==> sup X (gfp f) \<le> f (sup X (gfp f))" |
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
151 |
apply (frule gfp_lemma2) |
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
152 |
apply (drule mono_sup) |
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
153 |
apply (rule le_supI) |
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
154 |
apply assumption |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
155 |
apply (rule order_trans) |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
156 |
apply (rule order_trans) |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
157 |
apply assumption |
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
158 |
apply (rule sup_ge2) |
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
159 |
apply assumption |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
160 |
done |
17006 | 161 |
|
162 |
text{*strong version, thanks to Coen and Frost*} |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
163 |
lemma coinduct_set: "[| mono(f); a: X; X \<subseteq> f(X Un gfp(f)) |] ==> a : gfp(f)" |
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
164 |
by (blast intro: weak_coinduct [OF _ coinduct_lemma, simplified sup_set_eq]) |
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
165 |
|
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
166 |
lemma coinduct: "[| mono(f); X \<le> f (sup X (gfp f)) |] ==> X \<le> gfp(f)" |
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
167 |
apply (rule order_trans) |
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
168 |
apply (rule sup_ge1) |
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
169 |
apply (erule gfp_upperbound [OF coinduct_lemma]) |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
170 |
apply assumption |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
171 |
done |
17006 | 172 |
|
173 |
lemma gfp_fun_UnI2: "[| mono(f); a: gfp(f) |] ==> a: f(X Un gfp(f))" |
|
174 |
by (blast dest: gfp_lemma2 mono_Un) |
|
175 |
||
22918 | 176 |
|
177 |
subsection {* Even Stronger Coinduction Rule, by Martin Coen *} |
|
17006 | 178 |
|
179 |
text{* Weakens the condition @{term "X \<subseteq> f(X)"} to one expressed using both |
|
180 |
@{term lfp} and @{term gfp}*} |
|
181 |
||
182 |
lemma coinduct3_mono_lemma: "mono(f) ==> mono(%x. f(x) Un X Un B)" |
|
17589 | 183 |
by (iprover intro: subset_refl monoI Un_mono monoD) |
17006 | 184 |
|
185 |
lemma coinduct3_lemma: |
|
186 |
"[| X \<subseteq> f(lfp(%x. f(x) Un X Un gfp(f))); mono(f) |] |
|
187 |
==> lfp(%x. f(x) Un X Un gfp(f)) \<subseteq> f(lfp(%x. f(x) Un X Un gfp(f)))" |
|
188 |
apply (rule subset_trans) |
|
189 |
apply (erule coinduct3_mono_lemma [THEN lfp_lemma3]) |
|
190 |
apply (rule Un_least [THEN Un_least]) |
|
191 |
apply (rule subset_refl, assumption) |
|
192 |
apply (rule gfp_unfold [THEN equalityD1, THEN subset_trans], assumption) |
|
193 |
apply (rule monoD, assumption) |
|
194 |
apply (subst coinduct3_mono_lemma [THEN lfp_unfold], auto) |
|
195 |
done |
|
196 |
||
197 |
lemma coinduct3: |
|
198 |
"[| mono(f); a:X; X \<subseteq> f(lfp(%x. f(x) Un X Un gfp(f))) |] ==> a : gfp(f)" |
|
199 |
apply (rule coinduct3_lemma [THEN [2] weak_coinduct]) |
|
200 |
apply (rule coinduct3_mono_lemma [THEN lfp_unfold, THEN ssubst], auto) |
|
201 |
done |
|
202 |
||
203 |
||
204 |
text{*Definition forms of @{text gfp_unfold} and @{text coinduct}, |
|
205 |
to control unfolding*} |
|
206 |
||
207 |
lemma def_gfp_unfold: "[| A==gfp(f); mono(f) |] ==> A = f(A)" |
|
208 |
by (auto intro!: gfp_unfold) |
|
209 |
||
210 |
lemma def_coinduct: |
|
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
211 |
"[| A==gfp(f); mono(f); X \<le> f(sup X A) |] ==> X \<le> A" |
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
212 |
by (iprover intro!: coinduct) |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
213 |
|
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
214 |
lemma def_coinduct_set: |
17006 | 215 |
"[| A==gfp(f); mono(f); a:X; X \<subseteq> f(X Un A) |] ==> a: A" |
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
216 |
by (auto intro!: coinduct_set) |
17006 | 217 |
|
218 |
(*The version used in the induction/coinduction package*) |
|
219 |
lemma def_Collect_coinduct: |
|
220 |
"[| A == gfp(%w. Collect(P(w))); mono(%w. Collect(P(w))); |
|
221 |
a: X; !!z. z: X ==> P (X Un A) z |] ==> |
|
222 |
a : A" |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
223 |
apply (erule def_coinduct_set, auto) |
17006 | 224 |
done |
225 |
||
226 |
lemma def_coinduct3: |
|
227 |
"[| A==gfp(f); mono(f); a:X; X \<subseteq> f(lfp(%x. f(x) Un X Un A)) |] ==> a: A" |
|
228 |
by (auto intro!: coinduct3) |
|
229 |
||
230 |
text{*Monotonicity of @{term gfp}!*} |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
231 |
lemma gfp_mono: "(!!Z. f Z \<le> g Z) ==> gfp f \<le> gfp g" |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
232 |
by (rule gfp_upperbound [THEN gfp_least], blast intro: order_trans) |
17006 | 233 |
|
234 |
ML |
|
235 |
{* |
|
236 |
val lfp_def = thm "lfp_def"; |
|
237 |
val lfp_lowerbound = thm "lfp_lowerbound"; |
|
238 |
val lfp_greatest = thm "lfp_greatest"; |
|
239 |
val lfp_unfold = thm "lfp_unfold"; |
|
240 |
val lfp_induct = thm "lfp_induct"; |
|
241 |
val lfp_ordinal_induct = thm "lfp_ordinal_induct"; |
|
242 |
val def_lfp_unfold = thm "def_lfp_unfold"; |
|
243 |
val def_lfp_induct = thm "def_lfp_induct"; |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
244 |
val def_lfp_induct_set = thm "def_lfp_induct_set"; |
17006 | 245 |
val lfp_mono = thm "lfp_mono"; |
246 |
val gfp_def = thm "gfp_def"; |
|
247 |
val gfp_upperbound = thm "gfp_upperbound"; |
|
248 |
val gfp_least = thm "gfp_least"; |
|
249 |
val gfp_unfold = thm "gfp_unfold"; |
|
250 |
val weak_coinduct = thm "weak_coinduct"; |
|
251 |
val weak_coinduct_image = thm "weak_coinduct_image"; |
|
252 |
val coinduct = thm "coinduct"; |
|
253 |
val gfp_fun_UnI2 = thm "gfp_fun_UnI2"; |
|
254 |
val coinduct3 = thm "coinduct3"; |
|
255 |
val def_gfp_unfold = thm "def_gfp_unfold"; |
|
256 |
val def_coinduct = thm "def_coinduct"; |
|
257 |
val def_Collect_coinduct = thm "def_Collect_coinduct"; |
|
258 |
val def_coinduct3 = thm "def_coinduct3"; |
|
259 |
val gfp_mono = thm "gfp_mono"; |
|
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
260 |
val le_funI = thm "le_funI"; |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
261 |
val le_boolI = thm "le_boolI"; |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
262 |
val le_boolI' = thm "le_boolI'"; |
22422
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
263 |
val inf_fun_eq = thm "inf_fun_eq"; |
ee19cdb07528
stepping towards uniform lattice theory development in HOL
haftmann
parents:
22390
diff
changeset
|
264 |
val inf_bool_eq = thm "inf_bool_eq"; |
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
265 |
val le_funE = thm "le_funE"; |
22276
96a4db55a0b3
Introduction and elimination rules for <= on predicates
berghofe
parents:
21547
diff
changeset
|
266 |
val le_funD = thm "le_funD"; |
21017
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
267 |
val le_boolE = thm "le_boolE"; |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
268 |
val le_boolD = thm "le_boolD"; |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
269 |
val le_bool_def = thm "le_bool_def"; |
5693e4471c2b
Generalized gfp and lfp to arbitrary complete lattices.
berghofe
parents:
17589
diff
changeset
|
270 |
val le_fun_def = thm "le_fun_def"; |
17006 | 271 |
*} |
272 |
||
273 |
end |