7 research outputs found

    A Formalized Extension of the Substitution Lemma in Coq

    Full text link
    The substitution lemma is a renowned theorem within the realm of lambda-calculus theory and concerns the interactional behaviour of the metasubstitution operation. In this work, we augment the lambda-calculus's grammar with an uninterpreted explicit substitution operator, which allows the use of our framework for different calculi with explicit substitutions. Our primary contribution lies in verifying that, despite these modifications, the substitution lemma continues to remain valid. This confirmation was achieved using the Coq proof assistant. Our formalization methodology employs a nominal approach, which provides a direct implementation of the alpha-equivalence concept. The strategy involved in variable renaming within the proofs presents a challenge, specially on ensuring an exploration of the implications of our extension to the grammar of the lambda-calculus.Comment: In Proceedings FROM 2023, arXiv:2309.1295

    Combinatorics of explicit substitutions

    Full text link
    \lambda\upsilon is an extension of the \lambda-calculus which internalises the calculus of substitutions. In the current paper, we investigate the combinatorial properties of \lambda\upsilon focusing on the quantitative aspects of substitution resolution. We exhibit an unexpected correspondence between the counting sequence for \lambda\upsilon-terms and famous Catalan numbers. As a by-product, we establish effective sampling schemes for random \lambda\upsilon-terms. We show that typical \lambda\upsilon-terms represent, in a strong sense, non-strict computations in the classic \lambda-calculus. Moreover, typically almost all substitutions are in fact suspended, i.e. unevaluated, under closures. Consequently, we argue that \lambda\upsilon is an intrinsically non-strict calculus of explicit substitutions. Finally, we investigate the distribution of various redexes governing the substitution resolution in \lambda\upsilon and investigate the quantitative contribution of various substitution primitives

    Resource control and intersection types: an intrinsic connection

    Get PDF
    In this paper we investigate the \lambda -calculus, a \lambda-calculus enriched with resource control. Explicit control of resources is enabled by the presence of erasure and duplication operators, which correspond to thinning and con-traction rules in the type assignment system. We introduce directly the class of \lambda -terms and we provide a new treatment of substitution by its decompo-sition into atomic steps. We propose an intersection type assignment system for \lambda -calculus which makes a clear correspondence between three roles of variables and three kinds of intersection types. Finally, we provide the characterisation of strong normalisation in \lambda -calculus by means of an in-tersection type assignment system. This process uses typeability of normal forms, redex subject expansion and reducibility method.Comment: arXiv admin note: substantial text overlap with arXiv:1306.228

    Higher-order Rewriting for Executable Compiler Specifications

    Get PDF
    In this paper we outline how a simple compiler can be completely specified using higher order rewriting in all stages: parsing, analysis/optimization, and code emission, specifically using the crsx.sf.net system for a small declarative language called "X" inspired by XQuery (for which we are building a production quality compiler in the same way)

    Cartesian closed bicategories: type theory and coherence

    Get PDF
    In this thesis I lift the Curry--Howard--Lambek correspondence between the simply-typed lambda calculus and cartesian closed categories to the bicategorical setting, then use the resulting type theory to prove a coherence result for cartesian closed bicategories. Cartesian closed bicategories---2-categories `up to isomorphism' equipped with similarly weak products and exponentials---arise in logic, categorical algebra, and game semantics. However, calculations in such bicategories quickly fall into a quagmire of coherence data. I show that there is at most one 2-cell between any parallel pair of 1-cells in the free cartesian closed bicategory on a set and hence---in terms of the difficulty of calculating---bring the data of cartesian closed bicategories down to the familiar level of cartesian closed categories. In fact, I prove this result in two ways. The first argument is closely related to Power's coherence theorem for bicategories with flexible bilimits. For the second, which is the central preoccupation of this thesis, the proof strategy has two parts: the construction of a type theory, and the proof that it satisfies a form of normalisation I call local coherence. I synthesise the type theory from algebraic principles using a novel generalisation of the (multisorted) abstract clones of universal algebra, called biclones. The result brings together two extensions of the simply-typed lambda calculus: a 2-dimensional type theory in the style of Hilken, which encodes the 2-dimensional nature of a bicategory, and a version of explicit substitution, which encodes a composition operation that is only associative and unital up to isomorphism. For products and exponentials I develop the theory of cartesian and cartesian closed biclones and pursue a connection with the representable multicategories of Hermida. Unlike preceding 2-categorical type theories, in which products and exponentials are encoded by postulating a unit and counit satisfying the triangle laws, the universal properties for products and exponentials are encoded using T. Fiore's biuniversal arrows. Because the type theory is extracted from the construction of a free biclone, its syntactic model satisfies a suitable 2-dimensional freeness universal property generalising the classical Curry--Howard--Lambek correspondence. One may therefore describe the type theory as an `internal language'. The relationship with the classical situation is made precise by a result establishing that the type theory I construct is the simply-typed lambda calculus up to isomorphism. This relationship is exploited for the proof of local coherence. It is has been known for some time that one may use the normalisation-by-evaluation strategy to prove the simply-typed lambda calculus is strongly normalising. Using a bicategorical treatment of M. Fiore's categorical analysis of normalisation-by-evaluation, I prove a normalisation result which entails the coherence theorem for cartesian closed bicategories. In contrast to previous coherence results for bicategories, the argument does not rely on the theory of rewriting or strictify using the Yoneda embedding. I prove bicategorical generalisations of a series of well-established category-theoretic results, present a notion of glueing of bicategories, and bicategorify the folklore result providing sufficient conditions for a glueing category to be cartesian closed. Once these prerequisites have been met, the argument is remarkably similar to that in the categorical setting

    On Explicit Substitution with Names

    No full text
    International audienceThis paper recounts the origins of the 位x family of calculi of explicit substitution with proper variable names, including the original result of preservation of strong 尾-normalization based on the use of synthetic reductions for garbage collection. We then discuss the properties of a variant of the calculus which is also confluent for "open" terms (with meta-variables), and verify that a version with garbage collection preserves strong 尾-normalization (as is the state of the art), and we summarize the relationship with other efforts on using names and garbage collection rules in explicit substitution
    corecore