Category theory

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
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
equivalence classquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive 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, (idemponent) 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




In a strict sense of the term, a function is a homomorphism f:STf : S \to T of sets. We may also speak of a map or mapping, but those terms are used in other ways in other contexts.

A function from a set AA to a set BB is determined by giving, for each element of AA, a specified element of BB. The process of passing from elements of AA to elements of BB is called function application. The set AA is called the domain of ff, and BB is called its codomain.

A function is sometimes called a total function to distinguish it from a partial function.

More generally, every morphism between objects in a category may be thought of as a function in a generalized sense. This generalized use of the word is wide spread (and justified) in type theory, where for SS and TT two types, there is a function type denoted STS \to T and then the expression f:STf : S \to T means that ff is a term of function type, hence is a function.

In this generalized sense, functions between sets are the morphisms in the category Set. This is cartesian closed, and the function type STS \to T is then the function set.

For more on this more general use of “function” see at function type.


The formal definition of a function depends on the foundations chosen.

  • In material set theory, a function ff is often defined to be a set of ordered pairs such that for every xx, there is at most one yy such that (x,y)f(x,y)\in f. The domain of ff is then the set of all xx for which there exists some such yy. This definition is not entirely satisfactory since it does not determine the codomain (since not every element of the codomain may be in the image); thus to be completely precise it is better to define a function to be an ordered triple (f,A,B)(f,A,B) where AA is the domain and BB the codomain.

  • In structural set theory, the role of functions depends on the particular axiomatization chosen. In ETCS, functions are among the undefined things, whereas in SEAR, functions are defined to be particular relations (which in turn are undefined things).

  • In type theory, functions are simply terms belonging to function types.

See set theory and type theory for more details.

As morphisms of discrete categories

If we regard sets as discrete categories, then a function is a functor between sets. The functoriality structure becomes the property that a function preserves equality:

(1)x=yf(x)=f(y). x = y \Rightarrow f(x) = f(y) .

For classes

See the MathOverflow: what-are-maps-between-proper-classes

Revised on August 12, 2013 10:23:02 by Urs Schreiber (