# nLab computational trilogy

Contents

category theory

## Applications

#### Constructivism, Retalizability, Computability

intuitionistic mathematics

# Contents

## Idea

A profound cross-disciplinary insight has emerged – starting in the late 1970s, with core refinements in recent years – observing that three superficially different-looking fields of mathematics,

are but three different perspectives on a single underlying phenomenon at the foundations of mathematics:

### Classical

#### Plain

Under the identifications

the following notions are equivalent:

In intuitionistic logic
and type theory:
In programming languages
and computation:
In category theory
and topos theory:
A proof of a proposition,
or a term of some type.
A program/λ-term with
output of some data type.
A generalized element
of an object.

whence these three subjects are but three perspectives on a single underlying phenomenon.

This insight dates from the late 1970s; an early record is Lambek & Scott 86; it is explicitly highlighted as a trilogy (Wikipedia: “three works of art that are connected and can be seen either as a single work or as three individual works”) in Melliès 06, Sec. 1:

(Notice that Melliès 06 on p.2 does mean to regard λ-calculus as programming language.)

In Harper 11 the profoundness of the trilogy inspires the following emphatic prose:

The central dogma of computational trinitarianism holds that Logic, Languages, and Categories are but three manifestations of one divine notion of computation. There is no preferred route to enlightenment: each aspect provides insights that comprise the experience of computation in our lives.

Computational trinitarianism entails that any concept arising in one aspect should have meaning from the perspective of the other two. If you arrive at an insight that has importance for logic, languages, and categories, then you may feel sure that you have elucidated an essential concept of computation–you have made an enduring scientific discovery.

For more detailed review see Eades 12, Sec. 3.

#### Parametrized

More is true: Since

1. computation happens in contexts and is proof relevant;

2. categories give rise to their systems of slice categories and are in general (∞,1)-categories;

3. types may depend on other types and are in general homotopy types

In dependent
homotopy type theory:
In programming languages
and computation:
In locally cartesian closed
(∞,1)-categories/(∞,1)-toposes:
A term of some type
in context.
A program outputting some data type
in context.
A generalized element of an object
in a slice.

In this deeper form yet another equivalence – to algebraic topology (Sati Schreiber 20, p. 5) – opens up, as generalized elements in an (∞,1)-topos may equivalently be regarded as cocycles in (non-abelian) cohomology, and in twisted cohomology if in a slice (∞,1)-category (Sati Schreiber 20 p. 6, FSS 20), whence we have a computational tetralogy:

(from Sati&Schreiber 21, “Topological and Quantum Systems”)

In dependent
homotopy type theory:
In programming languages
and computation:
In locally cartesian closed
∞-categories/∞-toposes:
In non-abelian cohomology
param. homotopy theory:
A term of some type
in context.
A program of some data type
in context.
An element of an object
in a slice.
A cocycle
in twisted cohomology.

### Quantum

#### Plain

An analogous trilogy is seen under passage:

This is the main point of Melliès 06, Sec. 1, only that where Melliès shows “proof nets” (p. 4) we refer to them as “quantum computation” for better emphasis, following Abramsky-Coecke 04, Abramsky & Duncan 05, Duncan 06; going back to Pratt 92:

#### Parametrized

Combining the classical parametrized trilogy with the plain quantum trilogy, as one passes

there appears the “classically controlled quantum computational tetralogy”:

(from Sati & Schreiber 21, “Topological and Quantum Systems”)

In dependent linear
homotopy type theory:
In classically controlled
quantum programming languages:
In indexed monoidal
∞-cats of par. spectra:
twisted cohomology theory:
A term of some type
in context.
A quantum circuit
controlled by classical data.
An element of an object
in a slice.
A cocycle
in twisted cohomology.

(along the lines of Schreiber 14, Nuiten 13,

## Rosetta stone

The following shows a rosetta stone dictionary with more details:

(NB. This table shows the computational aspect mostly under “type theory”…)

## References

In the introduction of

the insight is recalled to have surfaced in the 1970s, with an early appearance in print being the monograph

• Joachim Lambek, Phil Scott, Introduction to Higher Order Categorical Logic, Cambridge Studies in Advanced Mathematics Vol. 7. Cambridge University Press, 1986 (ISBN:978-0-521-24665-1)

See also at History of categorical semantics of linear type theory for more on this.

A exposition of the relation between the three concepts is in

An exposition with emphasis on linear logic/quantum logic and the relation to physics is in

Discussion in the context of homotopy type theory:

For further references see at programs as proofs, propositions as types, and relation between category theory and type theory.

Textbooks on the foundations of mathematics and foundations of programming language which connect via the common theme of type theory/categorical logic include the following: