Table of Contents
Fetching ...

Semantics for a Turing-complete Reversible Programming Language with Inductive Types

Kostia Chardonnet, Louis Lemonnier, Benoît Valiron

TL;DR

This work presents a reversible, higher-order language with inductive types, patterned after Theseus, and proves reversible Turing completeness by encoding RTMs as isos. It develops a sound and adequate denotational semantics in a DCPO-enriched join inverse rig category, handling recursion and inductive types via initial algebras. A canonical representation and Bennett-style garbage-removal constructions show that every computable partial injective function is realizable as an iso, establishing a precise correspondence with $\mathbf{PInj}$. The results bridge reversible programming with categorical semantics and demonstrate that reversible languages can capture all computable injective morphisms, with potential implications for energy-efficient and quantum computation models.

Abstract

This paper is concerned with the expressivity and denotational semantics of a functional higher-order reversible programming language based on Theseus. In this language, pattern-matching is used to ensure the reversibility of functions. We show how one can encode any Reversible Turing Machine in said language. We then build a sound and adequate categorical semantics based on join inverse categories, with additional structures to capture pattern-matching. We then derive a full completeness result, stating that any computable, partial injective function is the image of a term in the language.

Semantics for a Turing-complete Reversible Programming Language with Inductive Types

TL;DR

This work presents a reversible, higher-order language with inductive types, patterned after Theseus, and proves reversible Turing completeness by encoding RTMs as isos. It develops a sound and adequate denotational semantics in a DCPO-enriched join inverse rig category, handling recursion and inductive types via initial algebras. A canonical representation and Bennett-style garbage-removal constructions show that every computable partial injective function is realizable as an iso, establishing a precise correspondence with . The results bridge reversible programming with categorical semantics and demonstrate that reversible languages can capture all computable injective morphisms, with potential implications for energy-efficient and quantum computation models.

Abstract

This paper is concerned with the expressivity and denotational semantics of a functional higher-order reversible programming language based on Theseus. In this language, pattern-matching is used to ensure the reversibility of functions. We show how one can encode any Reversible Turing Machine in said language. We then build a sound and adequate categorical semantics based on join inverse categories, with additional structures to capture pattern-matching. We then derive a full completeness result, stating that any computable, partial injective function is the image of a term in the language.
Paper Structure (25 sections, 68 theorems, 49 equations, 1 figure, 9 tables)

This paper contains 25 sections, 68 theorems, 49 equations, 1 figure, 9 tables.

Key Result

Lemma 2

If $\Psi;\Delta\vdash t \colon A$ and $t\rightarrow t'$, then $\Psi;\Delta\vdash t' \colon A$.∎

Figures (1)

  • Figure 1: Reversibly removing additional garbage from some process.

Theorems & Definitions (106)

  • Definition 1: Orthogonality
  • Lemma 2: Subject Reduction
  • Lemma 4: Inversion is well-typed
  • Lemma 5: Inversion is preserved by evaluation
  • Theorem 6: Semantics of isos and their inversions chardonnet2022curry
  • Example 7
  • Example 8: Cantor Pairing
  • Definition 9: Duplication
  • Lemma 10: Properties of Duplication
  • Lemma 11: Semantics of Duplication
  • ...and 96 more