text\<open>
The free variables of a lambda-term. A complication in this function arises from the fact that it returns a name set, which is not a finitely supported type. Therefore we haveto prove
the invariant that frees always returns a finite set of names. \<close>
lemma subst_supp: shows"supp(t1[a::=t2]) \ (((supp(t1)-{a})\supp(t2))::name set)" proof (nominal_induct t1 avoiding: a t2 rule: lam.strong_induct) case (Var name) thenshow ?case by (simp add: lam.supp(1) supp_atm) next case (App lam1 lam2) thenshow ?case using lam.supp(2) by fastforce next case (Lam name lam) thenshow ?case using frees.simps(3) frees_equals_support by auto qed
text\<open>
Contexts - lambda-terms with a single hole. Note that the lambda casein contexts does not bind a
name, even if we introduce the notation [_]._ for CLam. \<close> nominal_datatype clam =
Hole (\<open>\<box>\<close> 1000)
| CAppL "clam""lam"
| CAppR "lam""clam"
| CLam "name""clam" (\<open>CLam [_]._\<close> [100,100] 100)
text\<open>Filling a lambda-term into a context.\<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.