nLab
computational trilogy

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

computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory

logiccategory theorytype theory
trueterminal object/(-2)-truncated objecth-level 0-type/unit type
falseinitial objectempty type
proposition(-1)-truncated objecth-proposition, mere proposition
proofgeneralized elementprogram
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
cut elimination for implicationcounit for hom-tensor adjunctionbeta reduction
introduction rule for implicationunit for hom-tensor adjunctioneta conversion
logical conjunctionproductproduct type
disjunctioncoproduct ((-1)-truncation of)sum type (bracket type of)
implicationinternal homfunction type
negationinternal hom into initial objectfunction type into empty type
universal quantificationdependent productdependent product type
existential quantificationdependent sum ((-1)-truncation of)dependent sum type (bracket type of)
equivalencepath space objectidentity type/path type
equivalence classquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
completely presented setdiscrete object/0-truncated objecth-level 2-type/preset/h-set
setinternal 0-groupoidBishop set/setoid
universeobject classifiertype of types
modalityclosure operator, (idempotent) monadmodal type theory, monad (in computer science)
linear logic(symmetric, closed) monoidal categorylinear type theory/quantum computation
proof netstring diagramquantum circuit
(absence of) contraction rule(absence of) diagonalno-cloning theorem
synthetic mathematicsdomain specific embedded programming language

homotopy levels

semantics

Category theory

Constructivism, Retalizability, Computability

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

  1. propositions as types,

  2. programs as proofs,

  3. relation between type theory and category theory

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:

From Melliès 06

(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

the traditional computational trilogy above enhances to read as follows:

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.

See also Shulman 18.

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:

  1. from logic/type theory to linear logic/linear type theory;

  2. from computation to quantum computation;

  3. from cartesian closed categories to closed.

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:

From Melliès 06, p. 4

See also Baez & Stay 09.

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:
In Whitehead-generalized
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,


From Sati+Schreiber21: 'Topological and Quantum Systems'


Rosetta stone

The following shows a rosetta stone dictionary with more details:

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

computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory

logiccategory theorytype theory
trueterminal object/(-2)-truncated objecth-level 0-type/unit type
falseinitial objectempty type
proposition(-1)-truncated objecth-proposition, mere proposition
proofgeneralized elementprogram
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
cut elimination for implicationcounit for hom-tensor adjunctionbeta reduction
introduction rule for implicationunit for hom-tensor adjunctioneta conversion
logical conjunctionproductproduct type
disjunctioncoproduct ((-1)-truncation of)sum type (bracket type of)
implicationinternal homfunction type
negationinternal hom into initial objectfunction type into empty type
universal quantificationdependent productdependent product type
existential quantificationdependent sum ((-1)-truncation of)dependent sum type (bracket type of)
equivalencepath space objectidentity type/path type
equivalence classquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
completely presented setdiscrete object/0-truncated objecth-level 2-type/preset/h-set
setinternal 0-groupoidBishop set/setoid
universeobject classifiertype of types
modalityclosure operator, (idempotent) monadmodal type theory, monad (in computer science)
linear logic(symmetric, closed) monoidal categorylinear type theory/quantum computation
proof netstring diagramquantum circuit
(absence of) contraction rule(absence of) diagonalno-cloning theorem
synthetic mathematicsdomain specific embedded programming language

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:

See also

Last revised on May 15, 2021 at 15:37:17. See the history of this page for a list of all contributions to it.