20 research outputs found
Localisable Monads
Monads govern computational side-effects in programming semantics. A collection of monads can be combined together in a local-to-global way to handle several instances of such effects. Indexed monads and graded monads do this in a modular way. Here, instead, we start with a single monad and equip it with a fine-grained structure by using techniques from tensor topology. This provides an intrinsic theory of local computational effects without needing to know how constituent effects interact beforehand.
Specifically, any monoidal category decomposes as a sheaf of local categories over a base space. We identify a notion of localisable monads which characterises when a monad decomposes as a sheaf of monads. Equivalently, localisable monads are formal monads in an appropriate presheaf 2-category, whose algebras we characterise. Three extended examples demonstrate how localisable monads can interpret the base space as locations in a computer memory, as sites in a network of interacting agents acting concurrently, and as time in stochastic processes
Time Warps, from Algebra to Algorithms
Graded modalities have been proposed in recent work on programming languages
as a general framework for refining type systems with intensional properties.
In particular, continuous endomaps of the discrete time scale, or time warps,
can be used to quantify the growth of information in the course of program
execution. Time warps form a complete residuated lattice, with the residuals
playing an important role in potential programming applications. In this paper,
we study the algebraic structure of time warps, and prove that their equational
theory is decidable, a necessary condition for their use in real-world
compilers. We also describe how our universal-algebraic proof technique lends
itself to a constraint-based implementation, establishing a new link between
universal algebra and verification technology.Comment: Submitted to a conferenc
Space in monoidal categories
The category of Hilbert modules may be interpreted as a naive quantum field theory over a base space. Open subsets of the base space are recovered as idempotent subunits, which form a meet-semilattice in any firm braided monoidal category. There is an operation of restriction to an idempotent subunit: it is a graded monad on the category, and has the universal property of algebraic localisation. Spacetime structure on the base space induces a closure operator on the idempotent subunits. Restriction is then interpreted as spacetime propagation. This lets us study relativistic quantum information theory using methods entirely internal to monoidal categories. As a proof of concept, we show that quantum teleportation is only successfully supported on the intersection of Alice and Bob's causal future
Strong pseudomonads and premonoidal bicategories
Strong monads and premonoidal categories play a central role in clarifying
the denotational semantics of effectful programming languages. Unfortunately,
this theory excludes many modern semantic models in which the associativity and
unit laws only hold up to coherent isomorphism: for instance, because
composition is defined using a universal property. This paper remedies the
situation. We define premonoidal bicategories and a notion of strength for
pseudomonads, and show that the Kleisli bicategory of a strong pseudomonad is
premonoidal. As often in 2-dimensional category theory, the main difficulty is
to find the correct coherence axioms on 2-cells. We therefore justify our
definitions with numerous examples and by proving a correspondence theorem
between actions and strengths, generalizing a well-known category-theoretic
result.Comment: Comments and feedback welcome
Comprehending Ringads for Phil Wadler, on the occasion of his 60th birthday
Abstract. List comprehensions are a widely used programming construct, in languages such as Haskell and Python and in technologies such as Microsoft's Language Integrated Query. They generalize from lists to arbitrary monads, yielding a lightweight idiom of imperative programming in a pure functional language. When the monad has the additional structure of a so-called ringad, corresponding to 'empty' and 'union' operations, then it can be seen as some kind of collection type, and the comprehension notation can also be extended to incorporate aggregations. Ringad comprehensions represent a convenient notation for expressing database queries. The ringad structure alone does not provide a good explanation or an efficient implementation of relational joins; but by allowing heterogeneous comprehensions, involving both bag and indexed table ringads, we show how to accommodate these too
A Complete V-Equational System for Graded lambda-Calculus
Modern programming frequently requires generalised notions of program
equivalence based on a metric or a similar structure. Previous work addressed
this challenge by introducing the notion of a V-equation, i.e. an equation
labelled by an element of a quantale V, which covers inter alia (ultra-)metric,
classical, and fuzzy (in)equations. It also introduced a V-equational system
for the linear variant of lambda-calculus where any given resource must be used
exactly once.
In this paper we drop the (often too strict) linearity constraint by adding
graded modal types which allow multiple uses of a resource in a controlled
manner. We show that such a control, whilst providing more expressivity to the
programmer, also interacts more richly with V-equations than the linear or
Cartesian cases. Our main result is the introduction of a sound and complete
V-equational system for a lambda-calculus with graded modal types interpreted
by what we call a Lipschitz exponential comonad. We also show how to build such
comonads canonically via a universal construction, and use our results to
derive graded metric equational systems (and corresponding models) for programs
with timed and probabilistic behaviour