lemma ntree_unfold: "ntree(A) = A \ (\n \ nat. n -> ntree(A))" by (blast intro: ntree.intros [unfolded ntree.con_defs]
elim: ntree.cases [unfolded ntree.con_defs])
lemma ntree_induct [consumes 1, case_names Branch, induct set: ntree]: assumes t: "t \ ntree(A)" and step: "\x n h. \x \ A; n \ nat; h \ n -> ntree(A); \i \ n. P(h`i) \<rbrakk> \<Longrightarrow> P(Branch(x,h))" shows"P(t)" \<comment> \<open>A nicer induction rule than the standard one.\<close> using t apply induct apply (erule UN_E) apply (assumption | rule step)+ apply (fast elim: fun_weaken_type) apply (fast dest: apply_type) done
lemma ntree_induct_eqn [consumes 1]: assumes t: "t \ ntree(A)" and f: "f \ ntree(A)->B" and g: "g \ ntree(A)->B" and step: "\x n h. \x \ A; n \ nat; h \ n -> ntree(A); f O h = g O h\ \
f ` Branch(x,h) = g ` Branch(x,h)" shows"f`t=g`t" \<comment> \<open>Induction on \<^term>\<open>ntree(A)\<close> to prove an equation\<close> using t apply induct apply (assumption | rule step)+ apply (insert f g) apply (rule fun_extension) apply (assumption | rule comp_fun)+ apply (simp add: comp_fun_apply) done
text\<open> \medskip Lemmas to justify using \<open>Ntree\<close> in other recursive
type definitions. \<close>
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.