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

logicset theory (internal logic of)category theorytype theory
propositionsetobjecttype
predicatefamily of setsdisplay morphismdependent type
proofelementgeneralized elementterm/program
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
introduction rule for implicationcounit for hom-tensor adjunctionlambda
elimination rule for implicationunit for hom-tensor adjunctionapplication
cut elimination for implicationone of the zigzag identities for hom-tensor adjunctionbeta reduction
identity elimination for implicationthe other zigzag identity for hom-tensor adjunctioneta conversion
truesingletonterminal object/(-2)-truncated objecth-level 0-type/unit type
falseempty setinitial objectempty type
proposition, truth valuesubsingletonsubterminal object/(-1)-truncated objecth-proposition, mere proposition
logical conjunctioncartesian productproductproduct type
disjunctiondisjoint union (support of)coproduct ((-1)-truncation of)sum type (bracket type of)
implicationfunction set (into subsingleton)internal hom (into subterminal object)function type (into h-proposition)
negationfunction set into empty setinternal hom into initial objectfunction type into empty type
universal quantificationindexed cartesian product (of family of subsingletons)dependent product (of family of subterminal objects)dependent product type (of family of h-propositions)
existential quantificationindexed disjoint union (support of)dependent sum ((-1)-truncation of)dependent sum type (bracket type of)
logical equivalencebijection setobject of isomorphismsequivalence type
support setsupport object/(-1)-truncationpropositional truncation/bracket type
n-image of morphism into terminal object/n-truncationn-truncation modality
equalitydiagonal function/diagonal subset/diagonal relationpath space objectidentity type/path type
completely presented setsetdiscrete object/0-truncated objecth-level 2-type/set/h-set
setset with equivalence relationinternal 0-groupoidBishop set/setoid with its pseudo-equivalence relation an actual equivalence relation
equivalence class/quotient setquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
presettype without identity types
set of truth valuessubobject classifiertype of propositions
domain of discourseuniverseobject classifiertype universe
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, Realizability, 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, alluding to the doctrinal position of ‘trinitarianism’:

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:

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.

(graphics from SS22)

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 monoidal categories

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”:

(graphics from SS22)

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 SS22)


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

logicset theory (internal logic of)category theorytype theory
propositionsetobjecttype
predicatefamily of setsdisplay morphismdependent type
proofelementgeneralized elementterm/program
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
introduction rule for implicationcounit for hom-tensor adjunctionlambda
elimination rule for implicationunit for hom-tensor adjunctionapplication
cut elimination for implicationone of the zigzag identities for hom-tensor adjunctionbeta reduction
identity elimination for implicationthe other zigzag identity for hom-tensor adjunctioneta conversion
truesingletonterminal object/(-2)-truncated objecth-level 0-type/unit type
falseempty setinitial objectempty type
proposition, truth valuesubsingletonsubterminal object/(-1)-truncated objecth-proposition, mere proposition
logical conjunctioncartesian productproductproduct type
disjunctiondisjoint union (support of)coproduct ((-1)-truncation of)sum type (bracket type of)
implicationfunction set (into subsingleton)internal hom (into subterminal object)function type (into h-proposition)
negationfunction set into empty setinternal hom into initial objectfunction type into empty type
universal quantificationindexed cartesian product (of family of subsingletons)dependent product (of family of subterminal objects)dependent product type (of family of h-propositions)
existential quantificationindexed disjoint union (support of)dependent sum ((-1)-truncation of)dependent sum type (bracket type of)
logical equivalencebijection setobject of isomorphismsequivalence type
support setsupport object/(-1)-truncationpropositional truncation/bracket type
n-image of morphism into terminal object/n-truncationn-truncation modality
equalitydiagonal function/diagonal subset/diagonal relationpath space objectidentity type/path type
completely presented setsetdiscrete object/0-truncated objecth-level 2-type/set/h-set
setset with equivalence relationinternal 0-groupoidBishop set/setoid with its pseudo-equivalence relation an actual equivalence relation
equivalence class/quotient setquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
presettype without identity types
set of truth valuessubobject classifiertype of propositions
domain of discourseuniverseobject classifiertype universe
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 January 21, 2024 at 12:31:22. See the history of this page for a list of all contributions to it.