Polymorphic Context for Contextual Modality

01/28/2018
by   Yuito Murase, et al.
0

Through the Curry-Howard isomorphism between logics and calculi, necessity modality in logic is interpreted as types representing program code. Particularly, , which was proposed in influential work by Davies, and its successors have been widely used as a logical foundation for syntactic meta-programming. However, it is less known how to extend calculi based on modal type theory to handle more practical operations including manipulation of variable binding structures. This paper constructs such a modal type theory in two steps. First, we reconstruct contextual modal type theory by Nanevski, et al. as a Fitch-style system, which introduces hypothetical judgment with hierarchical context. The resulting type theory, contextual modal type theory , is generalized to accommodate not only S4 but also K, T, and K4 modalities, and proven to enjoy many desired properties. Second, we extend with polymorphic context, which is an internalization of contextual weakening, to obtain a novel modal type theory . Despite the fact that it came from observation in logic, polymorphic context allows both binding manipulation and hygienic code generation. We claim this by showing a sound translation from to .

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/04/2021

Contextual Modal Types for Algebraic Effects and Handlers

Programming languages with algebraic effects often rely on effect annota...
research
04/09/2018

Modality via Iterated Enrichment

This paper investigates modal type theories by using a new categorical s...
research
11/15/2021

Moebius: Metaprogramming using Contextual Types – The stage where System F can pattern match on itself (Long Version)

We describe the foundation of the metaprogramming language, Moebius, whi...
research
11/22/2022

A Categorical Normalization Proof for the Modal Lambda-Calculus

We investigate a simply typed modal λ-calculus, λ^→□, due to Pfenning, W...
research
04/24/2019

A Linear-logical Reconstruction of Intuitionistic Modal Logic S4

We propose a "modal linear logic" to reformulate intuitionistic modal lo...
research
01/10/2019

Cocon: Computation in Contextual Type Theory

We describe a Martin-Löf style dependent type theory, called Cocon, that...
research
05/07/2019

A Type Theory for Defining Logics and Proofs

We describe a Martin-Löf-style dependent type theory, called Cocon, that...

Please sign up or login with your details

Forgot password? Click here to reset