33 research outputs found
A Fibrational Framework for Substructural and Modal Logics
We define a general framework that abstracts the common features of many intuitionistic substructural and modal logics / type theories. The framework is a sequent calculus / normal-form type theory parametrized by a mode theory, which is used to describe the structure of contexts and the structural properties they obey. In this sequent calculus, the context itself obeys standard structural properties, while a term, drawn from the mode theory, constrains how the context can be used. Product types, implications, and modalities are defined as instances of two general connectives, one positive and one negative, that manipulate these terms. Specific mode theories can express a range of substructural and modal connectives, including non-associative, ordered, linear, affine, relevant, and cartesian products and implications; monoidal and non-monoidal functors, (co)monads and adjunctions; n-linear variables; and bunched implications. We prove cut (and identity) admissibility independently of the mode theory, obtaining it for many different logics at once. Further, we give a general equational theory on derivations / terms that, in addition to the usual beta/eta-rules, characterizes when two derivations differ only by the placement of structural rules. Additionally, we give an equivalent semantic presentation of these ideas, in which a mode theory corresponds to a 2-dimensional cartesian multicategory, the framework corresponds to another such multicategory with a functor to the mode theory, and the logical connectives make this into a bifibration. Finally, we show how the framework can be used both to encode existing existing logics / type theories and to design new ones
A linear algebra approach to linear metatheory
Linear typed λ-calculi are more delicate than their simply typed siblings when it comes to metatheoretic results like preservation of typing under renaming and substitution. Tracking the usage of variables in contexts places more constraints on how variables may be renamed or substituted. We present a methodology based on linear algebra over semirings, extending McBride's kits and traversals approach for the metatheory of syntax with binding to linear usage-annotated terms. Our approach is readily formalisable, and we have done so in Agda
Modal Abstractions for Virtualizing Memory Addresses
Operating system kernels employ virtual memory management (VMM) subsystems to
virtualize the addresses of memory regions in order to to isolate untrusted
processes, ensure process isolation and implement demand-paging and
copy-on-write behaviors for performance and resource controls. Bugs in these
systems can lead to kernel crashes. VMM code is a critical piece of
general-purpose OS kernels, but their verification is challenging due to the
hardware interface (mappings are updated via writes to memory locations, using
addresses which are themselves virtualized). Prior work on VMM verification has
either only handled a single address space, trusted significant pieces of
assembly code, or resorted to direct reasoning over machine semantics rather
than exposing a clean logical interface.
In this paper, we introduce a modal abstraction to describe the truth of
assertions relative to a specific virtual address space, allowing different
address spaces to refer to each other, and enabling verification of instruction
sequences manipulating multiple address spaces. Using them effectively requires
working with other assertions, such as points-to assertions in our separation
logic, as relative to a given address space. We therefore define virtual
points-to assertions, which mimic hardware address translation, relative to a
page table root. We demonstrate our approach with challenging fragments of VMM
code showing that our approach handles examples beyond what prior work can
address, including reasoning about a sequence of instructions as it changes
address spaces. All definitions and theorems mentioned in this paper including
the operational model of a RISC-like fragment of supervisor-mode x86-64, and a
logic as an instantiation of the Iris framework, are mechanized inside Coq
Modal dependent type theory and dependent right adjoints
In recent years we have seen several new models of dependent type theory
extended with some form of modal necessity operator, including nominal type
theory, guarded and clocked type theory, and spatial and cohesive type theory.
In this paper we study modal dependent type theory: dependent type theory with
an operator satisfying (a dependent version of) the K-axiom of modal logic. We
investigate both semantics and syntax. For the semantics, we introduce
categories with families with a dependent right adjoint (CwDRA) and show that
the examples above can be presented as such. Indeed, we show that any finite
limit category with an adjunction of endofunctors gives rise to a CwDRA via the
local universe construction. For the syntax, we introduce a dependently typed
extension of Fitch-style modal lambda-calculus, show that it can be interpreted
in any CwDRA, and build a term model. We extend the syntax and semantics with
universes
Recommended from our members
Modal dependent type theory and dependent right adjoints
In recent years we have seen several new models of dependent type theory
extended with some form of modal necessity operator, including nominal type
theory, guarded and clocked type theory, and spatial and cohesive type theory.
In this paper we study modal dependent type theory: dependent type theory with
an operator satisfying (a dependent version of) the K-axiom of modal logic. We
investigate both semantics and syntax. For the semantics, we introduce
categories with families with a dependent right adjoint (CwDRA) and show that
the examples above can be presented as such. Indeed, we show that any finite
limit category with an adjunction of endofunctors gives rise to a CwDRA via the
local universe construction. For the syntax, we introduce a dependently typed
extension of Fitch-style modal lambda-calculus, show that it can be interpreted
in any CwDRA, and build a term model. We extend the syntax and semantics with
universes
Multimodal Dependent Type Theory
We introduce MTT, a dependent type theory which supports multiple modalities.
MTT is parametrized by a mode theory which specifies a collection of modes,
modalities, and transformations between them. We show that different choices of
mode theory allow us to use the same type theory to compute and reason in many
modal situations, including guarded recursion, axiomatic cohesion, and
parametric quantification. We reproduce examples from prior work in guarded
recursion and axiomatic cohesion, thereby demonstrating that MTT constitutes a
simple and usable syntax whose instantiations intuitively correspond to
previous handcrafted modal type theories. In some cases, instantiating MTT to a
particular situation unearths a previously unknown type theory that improves
upon prior systems. Finally, we investigate the metatheory of MTT. We prove the
consistency of MTT and establish canonicity through an extension of recent
type-theoretic gluing techniques. These results hold irrespective of the choice
of mode theory, and thus apply to a wide variety of modal situations
Semantics of multimodal adjoint type theory
We show that contrary to appearances, Multimodal Type Theory (MTT) over a
2-category M can be interpreted in any M-shaped diagram of categories having,
and functors preserving, M-sized limits, without the need for extra left
adjoints. This is achieved by a construction called "co-dextrification" that
co-freely adds left adjoints to any such diagram, which can then be used to
interpret the "context lock" functors of MTT. Furthermore, if any of the
functors in the diagram have right adjoints, these can also be internalized in
type theory as negative modalities in the style of FitchTT. We introduce the
name Multimodal Adjoint Type Theory (MATT) for the resulting combined general
modal type theory. In particular, we can interpret MATT in any finite diagram
of toposes and geometric morphisms, with positive modalities for inverse image
functors and negative modalities for direct image functors.Comment: 24 pages. v2: Improved notation; extended pre-proceedings version for
MFPS 202