(* Title: HOL/HOLCF/ex/Dnat.thy Author: Franz Regensburger
Theory for the domain of natural numbers dnat = one ++ dnat
*)
theory Dnat imports HOLCF begin
domain dnat = dzero | dsucc (dpred :: dnat)
definition
iterator :: "dnat \ ('a \ 'a) \ 'a \ 'a" where "iterator = fix\(LAM h n f x. case n of dzero \<Rightarrow> x
| dsucc\<cdot>m \<Rightarrow> f\<cdot>(h\<cdot>m\<cdot>f\<cdot>x))"
text\<open> \medskip Expand fixed point properties. \<close>
lemma iterator_def2: "iterator = (LAM n f x. case n of dzero \ x | dsucc\m \ f\(iterator\m\f\x))" apply (rule trans) apply (rule fix_eq2) apply (rule iterator_def [THEN eq_reflection]) apply (rule beta_cfun) apply simp done
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.