-
A Mixed Linear and Graded Logic: Proofs, Terms, and Models
Authors:
Victoria Vollmer,
Daniel Marshall,
Harley Eades III,
Dominic Orchard
Abstract:
Graded modal logics generalise standard modal logics via families of modalities indexed by an algebraic structure whose operations mediate between the different modalities. The graded "of-course" modality $!_r$ captures how many times a proposition is used and has an analogous interpretation to the of-course modality from linear logic; the of-course modality from linear logic can be modelled by a…
▽ More
Graded modal logics generalise standard modal logics via families of modalities indexed by an algebraic structure whose operations mediate between the different modalities. The graded "of-course" modality $!_r$ captures how many times a proposition is used and has an analogous interpretation to the of-course modality from linear logic; the of-course modality from linear logic can be modelled by a linear exponential comonad and graded of-course can be modelled by a graded linear exponential comonad. Benton showed in his seminal paper on Linear/Non-Linear logic that the of-course modality can be split into two modalities connecting intuitionistic logic with linear logic, forming a symmetric monoidal adjunction. Later, Fujii et al. demonstrated that every graded comonad can be decomposed into an adjunction and a 'strict action'. We give a similar result to Benton, leveraging Fujii et al.'s decomposition, showing that graded modalities can be split into two modalities connecting a graded logic with a graded linear logic. We propose a sequent calculus, its proof theory and categorical model, and a natural deduction system which we show is isomorphic to the sequent calculus. Interestingly, our system can also be understood as Linear/Non-Linear logic composed with an action that adds the grading, further illuminating the shared principles between linear logic and a class of graded modal logics.
△ Less
Submitted 30 January, 2024;
originally announced January 2024.
-
Combining dependency, grades, and adjoint logic
Authors:
Peter Hanukaev,
Harley Eades III
Abstract:
We propose two new dependent type systems. The first, is a dependent graded/linear type system where a graded dependent type system is connected via modal operators to a linear type system in the style of Linear/Non-linear logic. We then generalize this system to support many graded systems connected by many modal operators through the introduction of modes from Adjoint Logic. Finally, we prove se…
▽ More
We propose two new dependent type systems. The first, is a dependent graded/linear type system where a graded dependent type system is connected via modal operators to a linear type system in the style of Linear/Non-linear logic. We then generalize this system to support many graded systems connected by many modal operators through the introduction of modes from Adjoint Logic. Finally, we prove several meta-theoretic properties of these two systems including graded substitution.
△ Less
Submitted 18 July, 2023;
originally announced July 2023.
-
A Dependent Dependency Calculus (Extended Version)
Authors:
Pritam Choudhury,
Harley Eades III,
Stephanie Weirich
Abstract:
Over twenty years ago, Abadi et al. established the Dependency Core Calculus (DCC) as a general purpose framework for analyzing dependency in typed programming languages. Since then, dependency analysis has shown many practical benefits to language design: its results can help users and compilers enforce security constraints, eliminate dead code, among other applications. In this work, we present…
▽ More
Over twenty years ago, Abadi et al. established the Dependency Core Calculus (DCC) as a general purpose framework for analyzing dependency in typed programming languages. Since then, dependency analysis has shown many practical benefits to language design: its results can help users and compilers enforce security constraints, eliminate dead code, among other applications. In this work, we present a Dependent Dependency Calculus (DDC), which extends this general idea to the setting of a dependently-typed language. We use this calculus to track both run-time and compile-time irrelevance, enabling faster type-checking and program execution.
△ Less
Submitted 2 February, 2022; v1 submitted 26 January, 2022;
originally announced January 2022.
-
A graded dependent type system with a usage-aware semantics (extended version)
Authors:
Pritam Choudhury,
Harley Eades III,
Richard A. Eisenberg,
Stephanie C Weirich
Abstract:
Graded Type Theory provides a mechanism to track and reason about resource usage in type systems. In this paper, we develop GraD, a novel version of such a graded dependent type system that includes functions, tensor products, additive sums, and a unit type. Since standard operational semantics is resource-agnostic, we develop a heap-based operational semantics and prove a soundness theorem that s…
▽ More
Graded Type Theory provides a mechanism to track and reason about resource usage in type systems. In this paper, we develop GraD, a novel version of such a graded dependent type system that includes functions, tensor products, additive sums, and a unit type. Since standard operational semantics is resource-agnostic, we develop a heap-based operational semantics and prove a soundness theorem that shows correct accounting of resource usage. Several useful properties, including the standard type soundness theorem, non-interference of irrelevant resources in computation and single pointer property for linear resources, can be derived from this theorem. We hope that our work will provide a base for integrating linearity, irrelevance and dependent types in practical programming languages like Haskell.
△ Less
Submitted 6 January, 2021; v1 submitted 8 November, 2020;
originally announced November 2020.
-
Graded Modal Dependent Type Theory
Authors:
Benjamin Moon,
Harley Eades III,
Dominic Orchard
Abstract:
Graded type theories are an emerging paradigm for augmenting the reasoning power of types with parameterizable, fine-grained analyses of program properties. There have been many such theories in recent years which equip a type theory with quantitative dataflow tracking, usually via a semiring-like structure which provides analysis on variables (often called `quantitative' or `coeffect' theories).…
▽ More
Graded type theories are an emerging paradigm for augmenting the reasoning power of types with parameterizable, fine-grained analyses of program properties. There have been many such theories in recent years which equip a type theory with quantitative dataflow tracking, usually via a semiring-like structure which provides analysis on variables (often called `quantitative' or `coeffect' theories). We present Graded Modal Dependent Type Theory (GrTT for short), which equips a dependent type theory with a general, parameterizable analysis of the flow of data, both in and between computational terms and types. In this theory, it is possible to study, restrict, and reason about data use in programs and types, enabling, for example, parametric quantifiers and linearity to be captured in a dependent setting. We propose GrTT, study its metatheory, and explore various case studies of its use in reasoning about programs and studying other type theories. We have implemented the theory and highlight the interesting details, including showing an application of grading to optimising the type checking procedure itself.
△ Less
Submitted 20 February, 2021; v1 submitted 25 October, 2020;
originally announced October 2020.
-
Grading Adjoint Logic
Authors:
Harley Eades III,
Dominic Orchard
Abstract:
We introduce a new logic that combines Adjoint Logic with Graded Necessity Modalities. This results in a very expressive system capable of controlling when and how structural rules are used. We give a sequent calculus, natural deduction, and term assignment for Graded Adjoint Logic.
We introduce a new logic that combines Adjoint Logic with Graded Necessity Modalities. This results in a very expressive system capable of controlling when and how structural rules are used. We give a sequent calculus, natural deduction, and term assignment for Graded Adjoint Logic.
△ Less
Submitted 15 June, 2020;
originally announced June 2020.
-
Unifying graded and parameterised monads
Authors:
Dominic Orchard,
Philip Wadler,
Harley Eades III
Abstract:
Monads are a useful tool for structuring effectful features of computation such as state, non-determinism, and continuations. In the last decade, several generalisations of monads have been suggested which provide a more fine-grained model of effects by replacing the single type constructor of a monad with an indexed family of constructors. Most notably, graded monads (indexed by a monoid) model e…
▽ More
Monads are a useful tool for structuring effectful features of computation such as state, non-determinism, and continuations. In the last decade, several generalisations of monads have been suggested which provide a more fine-grained model of effects by replacing the single type constructor of a monad with an indexed family of constructors. Most notably, graded monads (indexed by a monoid) model effect systems and parameterised monads (indexed by pairs of pre- and post-conditions) model program logics. This paper studies the relationship between these two generalisations of monads via a third generalisation. This third generalisation, which we call category-graded monads, arises by generalising a view of monads as a particular special case of lax functors. A category-graded monad provides a family of functors T f indexed by morphisms f of some other category. This allows certain compositions of effects to be ruled out (in the style of a program logic) as well as an abstract description of effects (in the style of an effect system). Using this as a basis, we show how graded and parameterised monads can be unified, studying their similarities and differences along the way.
△ Less
Submitted 30 April, 2020; v1 submitted 28 January, 2020;
originally announced January 2020.
-
On the Lambek Calculus with an Exchange Modality
Authors:
Jiaming Jiang,
Harley Eades III,
Valeria de Paiva
Abstract:
In this paper we introduce Commutative/Non-Commutative Logic (CNC logic) and two categorical models for CNC logic. This work abstracts Benton's Linear/Non-Linear Logic by removing the existence of the exchange structural rule. One should view this logic as composed of two logics; one sitting to the left of the other. On the left, there is intuitionistic linear logic, and on the right is a mixed co…
▽ More
In this paper we introduce Commutative/Non-Commutative Logic (CNC logic) and two categorical models for CNC logic. This work abstracts Benton's Linear/Non-Linear Logic by removing the existence of the exchange structural rule. One should view this logic as composed of two logics; one sitting to the left of the other. On the left, there is intuitionistic linear logic, and on the right is a mixed commutative/non-commutative formalization of the Lambek calculus. Then both of these logics are connected via a pair of monoidal adjoint functors. An exchange modality is then derivable within the logic using the adjunction between both sides. Thus, the adjoint functors allow one to pull the exchange structural rule from the left side to the right side. We then give a categorical model in terms of a monoidal adjunction, and then a concrete model in terms of dialectica Lambek spaces.
△ Less
Submitted 15 April, 2019;
originally announced April 2019.
-
An Intuitionistic Linear Logical Semantics of SAND Attack Trees
Authors:
Harley Eades III
Abstract:
In this paper we introduce a new logical foundation of SAND attack trees in intuitionistic linear logic. This new foundation is based on a new logic called the Attack Tree Linear Logic (ATLL). Before introducing ATLL we given several new logical models of attack trees, the first, is a very basic model based in truth tables. Then we lift this semantics into a semantics of attack trees based on line…
▽ More
In this paper we introduce a new logical foundation of SAND attack trees in intuitionistic linear logic. This new foundation is based on a new logic called the Attack Tree Linear Logic (ATLL). Before introducing ATLL we given several new logical models of attack trees, the first, is a very basic model based in truth tables. Then we lift this semantics into a semantics of attack trees based on lineales which introduces implication, but this can be further lifted into a dialectica model which ATLL is based. One important feature of ATLL is that it supports full distributivity of sequential conjunction over choice.
△ Less
Submitted 21 January, 2018;
originally announced January 2018.
-
Dialectica Categories for the Lambek Calculus
Authors:
Valeria de Paiva,
Harley Eades III
Abstract:
We revisit the old work of de Paiva on the models of the Lambek Calculus in dialectica models making sure that the syntactic details that were sketchy on the first version got completed and verified. We extend the Lambek Calculus with a κmodality, inspired by Yetter's work, which makes the calculus commutative. Then we add the of-course modality !, as Girard did, to re-introduce weakening and cont…
▽ More
We revisit the old work of de Paiva on the models of the Lambek Calculus in dialectica models making sure that the syntactic details that were sketchy on the first version got completed and verified. We extend the Lambek Calculus with a κmodality, inspired by Yetter's work, which makes the calculus commutative. Then we add the of-course modality !, as Girard did, to re-introduce weakening and contraction for all formulas and get back the full power of intuitionistic and classical logic. We also present the categorical semantics, proved sound and complete. Finally we show the traditional properties of type systems, like subject reduction, the Church-Rosser theorem and normalization for the calculi of extended modalities, which we did not have before.
△ Less
Submitted 21 January, 2018;
originally announced January 2018.
-
A Cointuitionistic Adjoint Logic
Authors:
Harley Eades III,
Gianluigi Bellin
Abstract:
One leading question with respect to Bi-intuitionistic logic (BINT) is, what does BINT look like across the three arcs -- logic, typed $λ$-calculi, and category theory -- of the Curry-Howard-Lambek correspondence? Categorically, BINT can be seen as a mixing of two worlds: the first being intuitionistic logic (IL), which is modeled by a cartesian closed category, and the second being the dual to in…
▽ More
One leading question with respect to Bi-intuitionistic logic (BINT) is, what does BINT look like across the three arcs -- logic, typed $λ$-calculi, and category theory -- of the Curry-Howard-Lambek correspondence? Categorically, BINT can be seen as a mixing of two worlds: the first being intuitionistic logic (IL), which is modeled by a cartesian closed category, and the second being the dual to intuitionistic logic called cointuitionistic logic (coIL), which is modeled by a cocartesian coclosed category. Crolard showed that combining these two categories into the same category results in it degenerating to a poset. However, this degeneration does not occur when both logics are linear. We propose that IL and coIL need to be separated, and then mixed in a controlled way using the modalities from linear logic. This separation can be ultimately achieved by an adjoint formalization of bi-intuitionistic logic. This formalization consists of three worlds instead of two: the first is intuitionistic logic, the second is linear bi-intuitionistic (Bi-ILL), and the third is cointuitionistic logic. They are then related via two adjunctions. The adjunction between IL and ILL is known as a Linear/Non-linear model (LNL model) of ILL, and is due to Benton. However, the dual to LNL models which would amount to the adjunction between coILL and coIL has yet to appear in the literature. In this paper we fill this gap by studying the dual to LNL models which we call dual LNL models. We show that dual LNL models correspond to dual linear categories, the dual to Bierman's linear categories proposed by Bellin. Then we give the definition of bi-LNL models by combining our model with LNL models to obtain a new model of bi-intuitionistic logic. Finally, we give a corresponding sequent calculus, natural deduction, and term assignment for dual LNL models.
△ Less
Submitted 19 August, 2017;
originally announced August 2017.
-
Dualized Simple Type Theory
Authors:
Harley Eades III,
Aaron Stump,
Ryan McCleeary
Abstract:
We propose a new bi-intuitionistic type theory called Dualized Type Theory (DTT). It is a simple type theory with perfect intuitionistic duality, and corresponds to a single-sided polarized sequent calculus. We prove DTT strongly normalizing, and prove type preservation. DTT is based on a new propositional bi-intuitionistic logic called Dualized Intuitionistic Logic (DIL) that builds on Pinto and…
▽ More
We propose a new bi-intuitionistic type theory called Dualized Type Theory (DTT). It is a simple type theory with perfect intuitionistic duality, and corresponds to a single-sided polarized sequent calculus. We prove DTT strongly normalizing, and prove type preservation. DTT is based on a new propositional bi-intuitionistic logic called Dualized Intuitionistic Logic (DIL) that builds on Pinto and Uustalu's logic L. DIL is a simplification of L by removing several admissible inference rules while maintaining consistency and completeness. Furthermore, DIL is defined using a dualized syntax by labeling formulas and logical connectives with polarities thus reducing the number of inference rules needed to define the logic. We give a direct proof of consistency, but prove completeness by reduction to L.
△ Less
Submitted 7 August, 2016; v1 submitted 3 May, 2016;
originally announced May 2016.
-
Hereditary Substitution for the λΔ-Calculus
Authors:
Harley Eades,
Aaron Stump
Abstract:
Hereditary substitution is a form of type-bounded iterated substitution, first made explicit by Watkins et al. and Adams in order to show normalization of proof terms for various constructive logics. This paper is the first to apply hereditary substitution to show normalization of a type theory corresponding to a non-constructive logic, namely the lambda-Delta calculus as formulated by Rehof. We s…
▽ More
Hereditary substitution is a form of type-bounded iterated substitution, first made explicit by Watkins et al. and Adams in order to show normalization of proof terms for various constructive logics. This paper is the first to apply hereditary substitution to show normalization of a type theory corresponding to a non-constructive logic, namely the lambda-Delta calculus as formulated by Rehof. We show that there is a non-trivial extension of the hereditary substitution function of the simply-typed lambda calculus to one for the lambda-Delta calculus. Then hereditary substitution is used to prove normalization.
△ Less
Submitted 5 September, 2013;
originally announced September 2013.
-
Irrelevance, Heterogeneous Equality, and Call-by-value Dependent Type Systems
Authors:
Vilhelm Sjöberg,
Chris Casinghino,
Ki Yung Ahn,
Nathan Collins,
Harley D. Eades III,
Peng Fu,
Garrin Kimmell,
Tim Sheard,
Aaron Stump,
Stephanie Weirich
Abstract:
We present a full-spectrum dependently typed core language which includes both nontermination and computational irrelevance (a.k.a. erasure), a combination which has not been studied before. The two features interact: to protect type safety we must be careful to only erase terminating expressions. Our language design is strongly influenced by the choice of CBV evaluation, and by our novel treatmen…
▽ More
We present a full-spectrum dependently typed core language which includes both nontermination and computational irrelevance (a.k.a. erasure), a combination which has not been studied before. The two features interact: to protect type safety we must be careful to only erase terminating expressions. Our language design is strongly influenced by the choice of CBV evaluation, and by our novel treatment of propositional equality which has a heterogeneous, completely erased elimination form.
△ Less
Submitted 13 February, 2012;
originally announced February 2012.