14 research outputs found

    Heterogeneous substitution systems revisited

    Full text link
    Matthes and Uustalu (TCS 327(1-2):155-174, 2004) presented a categorical description of substitution systems capable of capturing syntax involving binding which is independent of whether the syntax is made up from least or greatest fixed points. We extend this work in two directions: we continue the analysis by creating more categorical structure, in particular by organizing substitution systems into a category and studying its properties, and we develop the proofs of the results of the cited paper and our new ones in UniMath, a recent library of univalent mathematics formalized in the Coq theorem prover.Comment: 24 page

    High-level signatures and initial semantics

    Get PDF
    We present a device for specifying and reasoning about syntax for datatypes, programming languages, and logic calculi. More precisely, we study a notion of signature for specifying syntactic constructions. In the spirit of Initial Semantics, we define the syntax generated by a signature to be the initial object---if it exists---in a suitable category of models. In our framework, the existence of an associated syntax to a signature is not automatically guaranteed. We identify, via the notion of presentation of a signature, a large class of signatures that do generate a syntax. Our (presentable) signatures subsume classical algebraic signatures (i.e., signatures for languages with variable binding, such as the pure lambda calculus) and extend them to include several other significant examples of syntactic constructions. One key feature of our notions of signature, syntax, and presentation is that they are highly compositional, in the sense that complex examples can be obtained by assembling simpler ones. Moreover, through the Initial Semantics approach, our framework provides, beyond the desired algebra of terms, a well-behaved substitution and the induction and recursion principles associated to the syntax. This paper builds upon ideas from a previous attempt by Hirschowitz-Maggesi, which, in turn, was directly inspired by some earlier work of Ghani-Uustalu-Hamana and Matthes-Uustalu. The main results presented in the paper are computer-checked within the UniMath system.Comment: v2: extended version of the article as published in CSL 2018 (http://dx.doi.org/10.4230/LIPIcs.CSL.2018.4); list of changes given in Section 1.5 of the paper; v3: small corrections throughout the paper, no major change

    High-level signatures and initial semantics

    Get PDF
    We present a device for specifying and reasoning about syntax for datatypes, programming languages, and logic calculi. More precisely, we consider a general notion of "signature" for specifying syntactic constructions. Our signatures subsume classical algebraic signatures (i.e., signatures for languages with variable binding, such as the pure lambda calculus) and extend to much more general examples. In the spirit of Initial Semantics, we define the "syntax generated by a signature" to be the initial object - if it exists - in a suitable category of models. Our notions of signature and syntax are suited for compositionality and provide, beyond the desired algebra of terms, a well-behaved substitution and the associated inductive/recursive principles. Our signatures are "general" in the sense that the existence of an associated syntax is not automatically guaranteed. In this work, we identify a large and simple class of signatures which do generate a syntax. This paper builds upon ideas from a previous attempt by Hirschowitz-Maggesi, which, in turn, was directly inspired by some earlier work of Ghani-Uustalu-Hamana and Matthes-Uustalu. The main results presented in the paper are computer-checked within the UniMath system

    The Formal Theory of Monads, Univalently

    Get PDF
    We develop the formal theory of monads, as established by Street, in univalent foundations. This allows us to formally reason about various kinds of monads on the right level of abstraction. In particular, we define the bicategory of monads internal to a bicategory, and prove that it is univalent. We also define Eilenberg-Moore objects, and we show that both Eilenberg-Moore categories and Kleisli categories give rise to Eilenberg-Moore objects. Finally, we relate monads and adjunctions in arbitrary bicategories. Our work is formalized in Coq using the https://github.com/UniMath/UniMath library

    Formalizing Monoidal Categories and Actions for Syntax with Binders

    Full text link
    We discuss some aspects of our work on the mechanization of syntax and semantics in the UniMath library, based on the proof assistant Coq. We focus on experiences where Coq (as a type-theoretic proof assistant with decidable typechecking) made us use more theory or helped us to see theory more clearly.Comment: Abstract for a talk at CoqPL 2023, https://popl23.sigplan.org/details/CoqPL-2023-papers/7/Formalizing-Monoidal-Categories-and-Actions-for-Syntax-with-Binder

    For Finitary Induction-Induction, Induction is Enough

    Get PDF
    Inductive-inductive types (IITs) are a generalisation of inductive types in type theory. They allow the mutual definition of types with multiple sorts where later sorts can be indexed by previous ones. An example is the Chapman-style syntax of type theory with conversion relations for each sort where e.g. the sort of types is indexed by contexts. In this paper we show that if a model of extensional type theory (ETT) supports indexed W-types, then it supports finitely branching IITs. We use a small internal type theory called the theory of signatures to specify IITs. We show that if a model of ETT supports the syntax for the theory of signatures, then it supports all IITs. We construct this syntax from indexed W-types using preterms and typing relations and prove its initiality following Streicher. The construction of the syntax and its initiality proof were formalised in Agda

    Computer Science Logic 2018: CSL 2018, September 4-8, 2018, Birmingham, United Kingdom

    Get PDF

    A general theory of syntax with bindings

    Get PDF
    In this thesis we give a general theory of syntax with bindings. We address the problem from a mathematical point of view and at the same time we give a formalization, in the Isabelle/HOL proof assistant. Our theory uses explicit names for variables, and then deals with alpha-equivalence classes, remaining intuitive and close to informal mathematics, although being fully formalized and sound in classical high-order logic. In this sense it can be regarded as a generalization of nominal logic. Our end product can be used to construct complex binding patterns and binding-aware datatypes, including non-well-founded and infinitely branching types, in a modular fashion. We provide definitions of the fundamental operators on terms (free variables, alpha-equivalence, and capture-avoiding substitution) and reasoning and definition principles, obeying Barendregt’s convention. We present our work as a thinking process that starts from some desiderata, and then evolves in different formalization stages for the general theory. We start by taking a “universal algebra” approach, modelling syntaxes via algebraic-style binding signatures, which we employ in a substantial case study on formal reasoning: Church-Rosser and standardization theorems for lamda-calculus. This solution proves itself too restrictive, so we refine it into a more flexible one, which constitutes the main original contribution of this thesis: We construct a universe of functors on sets that handle bindings on a general, flexible and modular level. Our functors do not commit to any a priori syntactic format, cater for codatatypes in addition to datatypes, and are supported by powerful definition and reasoning principles. They generalize the bounded natural functors (BNFs), which have been previously implemented in Isabelle/HOL to support (co)datatypes
    corecore