This paper investigates modal type theories by using a new categorical semantics called change-of-base semantics. Change-of-base semantics is novel in that it is based on (possibly infinitely) iterated enrichment and interpretation of modality as hom objects. In our semantics, the relationship between meta and object levels in multi-staged computation exactly corresponds to the relationship between enriching and enriched categories. As a result, we obtain a categorical explanation of situations where meta and object logics may be completely different. Our categorical models include conventional models of modal type theory (e.g., cartesian closed categories with a monoidal endofunctor) as special cases and hence can be seen as a natural refinement of former results. On the type theoretical side, it is shown that Fitch-style modal type theory can be directly interpreted in iterated enrichment of categories. Interestingly, this interpretation suggests the fact that Fitch-style modal type theory is the right adjoint of dualcontext calculus. In addition, we present how linear temporal, S4, and linear exponential modalities are described in terms of change-of-base semantics. Finally, we show that the change-of-base semantics can be naturally extended to multi-staged effectful computation and generalized contextual modality a la Nanevski et al. We emphasize that this paper answers the question raised in the survey paper by de Paiva and Ritter in 2011, what a categorical model for Fitch-style type theory is like.
In the stream of studies on intuitionistic modal logic, we can find mainly three kinds of natural deduction systems. For logical aspects, adding axiom schemata is a simple and popular way to construct a system. The Curry-Howard correspondence, however, gives us a connection between logic and computer science. From the viewpoint of programming languages, two more important systems, called a dual-context system and a Fitch-style system, have been proposed. While dual-context systems for S4 are heavily used in the field of staged computation, a dual-context system for K is also studied more recently. In our previous studies, categorical semantics for Fitch-style modal logic is proposed and usefulness of levels is noticed. This paper observes an interesting fact that the box modality of the dualcontext system is in fact a left adjoint of that of the Fitch-style system. In order to show the statement, we embed both the two systems, which are refined with levels, into the adjoint calculus that equips an adjunction a priori. Moreover, the adjunction is refined with polarity and the adjoint calculus is extended to polarized logic.
No abstract
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 Fitchstyle system, which introduces hypothetical judgment with hierarchical context. The resulting type theory, Fitch-style 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 λ ∀[] .
Modal types—types that are derived from proof systems of modal logic—have been studied as theoretical foundations of metaprogramming, where program code is manipulated as first-class values. In modal type systems, modality corresponds to a type constructor for code types and controls free variables and their types in code values. Nanevski et al. have proposed contextual modal type theory, which has modal types with fine-grained information on free variables: modal types are explicitly indexed by contexts—the types of all free variables in code values.This paper presents $$\lambda _{\forall []}$$ λ ∀ [ ] , a novel extension of contextual modal type theory with parametric polymorphism over contexts. Such an extension has been studied in the literature but, unlike earlier proposals, $$\lambda _{\forall []}$$ λ ∀ [ ] is more general in that it allows multiple occurrence of context variables in a single context. We formalize $$\lambda _{\forall []}$$ λ ∀ [ ] with its type system and operational semantics given by $$\beta $$ β -reduction and prove its basic properties including subject reduction, strong normalization, and confluence. Moreover, to demonstrate the expressive power of polymorphic contexts, we show a type-preserving embedding from a two-level fragment of Davies’ $$\lambda _{\bigcirc }$$ λ ◯ , which is based on linear-time temporal logic, to $$\lambda _{\forall []}$$ λ ∀ [ ] .
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
hi@scite.ai
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.