ncatlab.org

guarded recursion in nLab

Contents

Context

Type theory

natural deduction metalanguage, practical foundations

  1. type formation rule
  2. term introduction rule
  3. term elimination rule
  4. computation rule

type theory (dependent, intensional, observational type theory, homotopy type theory)

syntax object language

homotopy levels

semantics

Contents

Idea

Guarded recursion is a form of recursion that ensures that solutions of self-referential descriptions exist. This is achieved by “guarding” the recursive occurrence of the object under consideration using a unary modality ▸\blacktriangleright and pronounced “later”.

The later modality was first considered by Nakano (Nakano 2000) and used to ensure productivity of coinductively defined programs.

For example, for an object AA, the type of guarded streams is the unique solution to the equation

Str gA≅A×▸Str gA \text{Str}_g A \cong A \times \blacktriangleright \text{Str}_g A

The intended meaning is that the head of the stream is available now while the tail is only available after one step of computation.

(There are other forms of guarded recursion which act through syntactic restriction.)

References

A general calculus for dependent modal type theories.

  • Ranald Clouston, Bassel Mannaa, Rasmus Ejlers Møgelberg, Andrew M. Pitts, Bas Spitters, Modal Dependent Type Theory and Dependent Right Adjoints arxiv

Last revised on February 14, 2023 at 11:42:48. See the history of this page for a list of all contributions to it.