78,783 research outputs found
A Category Theoretic View of Contextual Types: from Simple Types to Dependent Types
We describe the categorical semantics for a simply typed variant and a
simplified dependently typed variant of Cocon, a contextual modal type theory
where the box modality mediates between the weak function space that is used to
represent higher-order abstract syntax (HOAS) trees and the strong function
space that describes (recursive) computations about them. What makes Cocon
different from standard type theories is the presence of first-class contexts
and contextual objects to describe syntax trees that are closed with respect to
a given context of assumptions. Following M. Hofmann's work, we use a presheaf
model to characterise HOAS trees. Surprisingly, this model already provides the
necessary structure to also model Cocon. In particular, we can capture the
contextual objects of Cocon using a comonad that restricts presheaves
to their closed elements. This gives a simple semantic characterisation of the
invariants of contextual types (e.g. substitution invariance) and identifies
Cocon as a type-theoretic syntax of presheaf models. We further extend this
characterisation to dependent types using categories with families and show
that we can model a fragment of Cocon without recursor in the Fitch-style
dependent modal type theory presented by Birkedal et. al.
Names and Binding in Type Theory
Names and name-binding are useful concepts in the theory and practice of formal systems. In this thesis we study them in the context of dependent type theory. We propose a novel dependent type theory with primitives for the explicit handling of names. As the main application, we consider programming and reasoning with abstract syntax involving variable binders.
Gabbay and Pitts have shown that Fraenkel Mostowski (FM) set theory models a notion of name using which informal work with names and binding can be made precise. They have given a number of useful constructions for working with names and binding, such as a syntax-independent notion of freshness that formalises when two objects do not share names, and a freshness quantifier that simplifies working with names and binding. Related to FM set theory, a number of systems for working with names have been given, among them are the first-order Nominal Logic, the higher-order logic FM-HOL, the Theory of Contexts as well as the programming language FreshML.
In this thesis we study how dependent type theory can be extended with primitives for working with names and binding. Our choice of primitives is different from that in FM set theory. In FM set theory the fundamental primitive for working with names is swapping. All other concepts such as \alpha-equivalence classes and binding are constructed from it. For dependent type theory, however, this approach of constructing everything from swapping is not ideal, since it requires us to make strong assumptions on the type theory. For instance, the construction of \alpha-equivalence classes from swapping appears to require quotient types. Our approach is to treat constructions such as \alpha-equivalence classes and name-binding directly, turning them into primitives of the type theory. To do this, it is convenient to take freshness rather than swapping as the fundamental primitive.
Based on the close correspondence between type theories and categories, we approach the design of the dependent type theory by studying the categorical structure underlying FM set theory. We start from a monoidal structure capturing freshness. By analogy with the definition of simple dependent sums \Sigma and products \Pi from the cartesian product, we define monoidal dependent sums \Sigma^* and products \Pi^* from the monoidal structure. For the type of names N, we have an isomorphism \Sigma^*_N\iso\Pi^*_N generalising the freshness quantifier. We show that this structure includes \alpha-equivalence classes, name binding, unique choice of fresh names as well as the freshness quantifier. In addition to the set theoretic model corresponding to FM set theory, we also give a realizability model of this structure.
The semantic structure leads us to a bunched type theory having both a dependent additive context structure and a non-dependent multiplicative context structure. This type theory generalises the simply-typed \alpha\lambda-calculus of O'Hearn and Pym in the additive direction. It includes novel monoidal products \Pi^* and sums \Sigma^* as well as hidden-name types H for working with names and binding.
We give examples for the use of the type theory for programming and reasoning with abstract syntax
involving binders. We show that abstract syntax can be handled both in the style of FM set theory and in the style of Weak Higher Order Abstract Syntax. Moreover, these two styles of working with abstract syntax can be mixed, which has interesting applications such as the derivation of a term for the unique choice of new names
A dependent nominal type theory
Nominal abstract syntax is an approach to representing names and binding
pioneered by Gabbay and Pitts. So far nominal techniques have mostly been
studied using classical logic or model theory, not type theory. Nominal
extensions to simple, dependent and ML-like polymorphic languages have been
studied, but decidability and normalization results have only been established
for simple nominal type theories. We present a LF-style dependent type theory
extended with name-abstraction types, prove soundness and decidability of
beta-eta-equivalence checking, discuss adequacy and canonical forms via an
example, and discuss extensions such as dependently-typed recursion and
induction principles
An Open Challenge Problem Repository for Systems Supporting Binders
A variety of logical frameworks support the use of higher-order abstract
syntax in representing formal systems; however, each system has its own set of
benchmarks. Even worse, general proof assistants that provide special libraries
for dealing with binders offer a very limited evaluation of such libraries, and
the examples given often do not exercise and stress-test key aspects that arise
in the presence of binders. In this paper we design an open repository ORBI
(Open challenge problem Repository for systems supporting reasoning with
BInders). We believe the field of reasoning about languages with binders has
matured, and a common set of benchmarks provides an important basis for
evaluation and qualitative comparison of different systems and libraries that
support binders, and it will help to advance the field.Comment: In Proceedings LFMTP 2015, arXiv:1507.0759
Nominal Logic Programming
Nominal logic is an extension of first-order logic which provides a simple
foundation for formalizing and reasoning about abstract syntax modulo
consistent renaming of bound names (that is, alpha-equivalence). This article
investigates logic programming based on nominal logic. We describe some typical
nominal logic programs, and develop the model-theoretic, proof-theoretic, and
operational semantics of such programs. Besides being of interest for ensuring
the correct behavior of implementations, these results provide a rigorous
foundation for techniques for analysis and reasoning about nominal logic
programs, as we illustrate via examples.Comment: 46 pages; 19 page appendix; 13 figures. Revised journal submission as
of July 23, 200
A Case Study on Logical Relations using Contextual Types
Proofs by logical relations play a key role to establish rich properties such
as normalization or contextual equivalence. They are also challenging to
mechanize. In this paper, we describe the completeness proof of algorithmic
equality for simply typed lambda-terms by Crary where we reason about logically
equivalent terms in the proof environment Beluga. There are three key aspects
we rely upon: 1) we encode lambda-terms together with their operational
semantics and algorithmic equality using higher-order abstract syntax 2) we
directly encode the corresponding logical equivalence of well-typed
lambda-terms using recursive types and higher-order functions 3) we exploit
Beluga's support for contexts and the equational theory of simultaneous
substitutions. This leads to a direct and compact mechanization, demonstrating
Beluga's strength at formalizing logical relations proofs.Comment: In Proceedings LFMTP 2015, arXiv:1507.0759
- …