6 research outputs found
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
Lincx: A Linear Logical Framework with First-class Contexts
Linear logic provides an elegant framework for modelling stateful, imperative and con- current systems by viewing a context of assumptions as a set of resources. However, mech- anizing the meta-theory of such systems remains a challenge, as we need to manage and reason about mixed contexts of linear and intuitionistic assumptions. We present Lincx, a contextual linear logical framework with first-class mixed contexts. Lincx allows us to model (linear) abstract syntax trees as syntactic structures that may depend on intuitionistic and linear assumptions. It can also serve as a foundation for reasoning about such structures. Lincx extends the linear logical framework LLF with first-class (linear) contexts and an equational theory of context joins that can otherwise be very tedious and intricate to develop. This work may be also viewed as a generalization of contextual LF that supports both intuitionistic and linear variables, functions, and assumptions. We describe a decidable type-theoretic foundation for Lincx that only characterizes canonical forms and show that our equational theory of context joins is associative and commu- tative. Finally, we outline how Lincx may serve as a practical foundation for mechanizing the meta-theory of stateful systems.La logique lineĢaire represente une structure eĢleĢgante pour modeler des systeĢmes im- peĢratifs, concurrents et avec des systeĢmes a eĢtats, en repreĢsentant un contexte d'hypotheĢses comme une collection de ressources. Cependant, la meĢcanisation de la meĢtatheĢorie de ces systeĢmes demeure un deĢfi, puisque nous devons geĢrer et raisonner aĢ propos de contextes d'hypotheĢses mixtes lineĢaires et intuitionistiques. Nous preĢsentons Lincx, une structure logique lineĢaire et contextuelle avec des contextes mixtes de premieĢre classe. Lincx nous permet d'eĢtablir des modeĢles (lineĢaires) d'arbres de syntaxe abstraits en tant que structures syntactiques qui peuvent dependre d'hypotheĢses intuitionistiques et lineĢaires. Lincx peut eĢgalement servir de fondation pour raisonner aĢ propos de telles structures. Lincx eĢtend la structure logique lineĢaire LLF avec des contextes (lineĢaires) de premier ordre et une theĢorie d'equations d'assemblage de contextes qui peut autrement eĢtre treĢs fastidieux et complexe aĢ deĢvelopper. Cet oeuvre peut eĢgalement eĢtre percĢ§u comme une geĢneĢralisation du LF contextuel qui supporte les fonctions, les hypotheĢses et les variables intuitionistiques et lineĢaires. Nous deĢcrivons une fondation de la theĢorie des types deĢcidable pour Lincx qui ne deĢcrit que les formes canoniques et montrons que notre theorie d'eĢquations d'assemblage de contextes est associative et commutative. Finalement, nous donnons un apercĢ§u de comment Lincx peut servir de fondation pratique pour la meĢcanisation de la meĢtatheĢorie de systeĢmes aĢ eĢtats
POPLMark reloaded: Mechanizing proofs by logical relations
We propose a new collection of benchmark problems in mechanizing the metatheory of programming languages, in order to compare and push the state of the art of proof assistants. In particular, we focus on proofs using logical relations (LRs) and propose establishing strong normalization of a simply typed calculus with a proof by Kripke-style LRs as a benchmark. We give a modern view of this well-understood problem by formulating our LR on well-typed terms. Using this case study, we share some of the lessons learned tackling this problem in different dependently typed proof environments. In particular, we consider the mechanization in Beluga, a proof environment that supports higher-order abstract syntax encodings and contrast it to the development and strategies used in general-purpose proof assistants such as Coq and Agda. The goal of this paper is to engage the community in discussions on what support in proof environments is needed to truly bring mechanized metatheory to the masses and engage said community in the crafting of future benchmarks