lemma fix_const: "(\ x. c) = c" by (subst fix_eq) simp
subsection \<open>Fixed point induction\<close>
lemma fix_ind: "adm P \ P \ \ (\x. P x \ P (F\x)) \ P (fix\F)" unfolding fix_def2 apply (erule admD) apply (rule chain_iterate) apply (rule nat_induct, simp_all) done
lemma cont_fix_ind: "cont F \ adm P \ P \ \ (\x. P x \ P (F x)) \ P (fix\(Abs_cfun F))" by (simp add: fix_ind)
lemma def_fix_ind: "\f \ fix\F; adm P; P \; \x. P x \ P (F\x)\ \ P f" by (simp add: fix_ind)
lemma parallel_fix_ind: assumes adm: "adm (\x. P (fst x) (snd x))" assumes base: "P \ \" assumes step: "\x y. P x y \ P (F\x) (G\y)" shows"P (fix\F) (fix\G)" proof - from adm have adm': "adm (case_prod P)" unfolding split_def . have"P (iterate i\F\\) (iterate i\G\\)" for i by (induct i) (simp add: base, simp add: step) thenhave"\i. case_prod P (iterate i\F\\, iterate i\G\\)" by simp thenhave"case_prod P (\i. (iterate i\F\\, iterate i\G\\))" by - (rule admD [OF adm'], simp, assumption) thenhave"case_prod P (\i. iterate i\F\\, \i. iterate i\G\\)" by (simp add: lub_Pair) thenhave"P (\i. iterate i\F\\) (\i. iterate i\G\\)" by simp thenshow"P (fix\F) (fix\G)" by (simp add: fix_def2) qed
lemma cont_parallel_fix_ind: assumes"cont F"and"cont G" assumes"adm (\x. P (fst x) (snd x))" assumes"P \ \" assumes"\x y. P x y \ P (F x) (G y)" shows"P (fix\(Abs_cfun F)) (fix\(Abs_cfun G))" by (rule parallel_fix_ind) (simp_all add: assms)
subsection \<open>Fixed-points on product types\<close>
text\<open>
Bekic's Theorem: Simultaneous fixed points over pairs
can be written in terms of separate fixed points. \<close>
lemma fix_cprod: fixes F :: "'a::pcpo \ 'b::pcpo \ 'a \ 'b" shows "fix\F =
(\<mu> x. fst (F\<cdot>(x, \<mu> y. snd (F\<cdot>(x, y)))), \<mu> y. snd (F\<cdot>(\<mu> x. fst (F\<cdot>(x, \<mu> y. snd (F\<cdot>(x, y)))), y)))"
(is"fix\F = (?x, ?y)") proof (rule fix_eqI) have *: "fst (F\(?x, ?y)) = ?x" by (rule trans [symmetric, OF fix_eq], simp) have"snd (F\(?x, ?y)) = ?y" by (rule trans [symmetric, OF fix_eq], simp) with * show"F\(?x, ?y) = (?x, ?y)" by (simp add: prod_eq_iff) next fix z assume F_z: "F\z = z" obtain x y where z: "z = (x, y)"by (rule prod.exhaust) from F_z z have F_x: "fst (F\(x, y)) = x" by simp from F_z z have F_y: "snd (F\(x, y)) = y" by simp let ?y1 = "\ y. snd (F\(x, y))" have"?y1 \ y" by (rule fix_least) (simp add: F_y) thenhave"fst (F\(x, ?y1)) \ fst (F\(x, y))" by (simp add: fst_monofun monofun_cfun) with F_x have"fst (F\(x, ?y1)) \ x" by simp thenhave *: "?x \ x" by (simp add: fix_least_below) thenhave"snd (F\(?x, y)) \ snd (F\(x, y))" by (simp add: snd_monofun monofun_cfun) with F_y have"snd (F\(?x, y)) \ y" by simp thenhave"?y \ y" by (simp add: fix_least_below) with z * show"(?x, ?y) \ z" by simp qed
section "Package for defining recursive functions in HOLCF"
subsection \<open>Pattern-match monad\<close>
pcpodef'a match = "UNIV::(one ++ 'a u) set" by simp_all
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.12Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.