A Generalized Modality for Recursion

05/28/2018
by   Adrien Guatto, et al.
0

Nakano's later modality allows types to express that the output of a function does not immediately depend on its input, and thus that computing its fixpoint is safe. This idea, guarded recursion, has proved useful in various contexts, from functional programming with infinite data structures to formulations of step-indexing internal to type theory. Categorical models have revealed that the later modality corresponds in essence to a simple reindexing of the discrete time scale. Unfortunately, existing guarded type theories suffer from significant limitations for programming purposes. These limitations stem from the fact that the later modality is not expressive enough to capture precise input-output dependencies of functions. As a consequence, guarded type theories reject many productive definitions. Combining insights from guarded type theories and synchronous programming languages, we propose a new modality for guarded recursion. This modality can apply any well-behaved reindexing of the time scale to a type. We call such reindexings time warps. Several modalities from the literature, including later, correspond to fixed time warps, and thus arise as special cases of ours.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/01/2021

Finitary type theories with and without contexts

We give a definition of finitary type theories that subsumes many exampl...
research
04/09/2018

Modality via Iterated Enrichment

This paper investigates modal type theories by using a new categorical s...
research
04/24/2018

Guarded Computational Type Theory

Nakano's later modality can be used to specify and define recursive func...
research
07/02/2022

Sikkel: Multimode Simple Type Theory as an Agda Library

Many variants of type theory extend a basic theory with additional primi...
research
12/14/2018

Truly Visual Polymorphic Algebraic Data Structures through Maramafication

This paper presents a so-called maramafication of an essential part of f...
research
02/03/2021

A model of Clocked Cubical Type Theory

Guarded recursion is a powerful modal approach to recursion that can be ...
research
06/28/2021

Topos and Stacks of Deep Neural Networks

Every known artificial deep neural network (DNN) corresponds to an objec...

Please sign up or login with your details

Forgot password? Click here to reset