This mentions no names (and works on a "scope", a non "opened term" with 1 deBruijn variable still in it).īut then you have the fresh names in the normal form! You need to abstract over the name again before applying the Lambda constructor. You don't actually need to do this with the second pattern match! When opening a term and immediately substituting, you can skip a step and call instantiate directly. In OCaml, you can cheat a little and create a statefull fresh : unit -> name function that always produces a never-seen-before name. We were kind of hoping to not have to care about generating fresh variables with locally nameless. What name do you want to open with? Well it probably needs to be a name you haven't opened with "above", aka a fresh variable. instantiate the top level deBruijn index with a name. The resulting language (lambda calculus plus the type system) is called the simply-typed lambda calculus. For example, that a program never tries to add an integer to a function. The locally nameless version is exactly the same, except that you need to open the lambdas right after pattern matching on one, i.e. Machine-checked Proof of the Church-Rosser Theorem for the Lambda Calculus Using the Barendregt Variable Convention in Constructive Type Theory The 12th Workshop on Logical and Semantic Frameworks, with Applications (LSFA 2017), Electronic Notes in Theoretical Computer Science, 338 ( 2018 ), pp. Simply-typed lambda calculus We will consider a type system for the lambda calculus that ensures that values are used correctly. | Lambda (v, t'') -> norm (subst v u' t'') There are A partial formalization 22 of this work in Agda 2,31 and an accompanying technical report 23. In particular, take a naive call-by-name normalization algorithm on terms with named binders that ignores variable capture (in OCaml syntax): let rec norm t = match t with This work opens the door to a substitution calculus and normalization of a dependently typed modal type theory. A good rule of thumb with locally nameless is "pattern matching on a binder is opening". Im reading Girards Proofs and Types, and in section 4. A lambda calculus system with the normalization property can be viewed as a programming language with the property that every program terminates.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |