In
category theory
Category theory is a general theory of mathematical structures and their relations. It was introduced by Samuel Eilenberg and Saunders Mac Lane in the middle of the 20th century in their foundational work on algebraic topology. Category theory ...
, a
category
Category, plural categories, may refer to:
General uses
*Classification, the general act of allocating things to classes/categories Philosophy
* Category of being
* ''Categories'' (Aristotle)
* Category (Kant)
* Categories (Peirce)
* Category ( ...
is Cartesian closed if, roughly speaking, any
morphism
In mathematics, a morphism is a concept of category theory that generalizes structure-preserving maps such as homomorphism between algebraic structures, functions from a set to another set, and continuous functions between topological spaces. Al ...
defined on a
product of two
objects can be naturally identified with a morphism defined on one of the factors. These categories are particularly important in
mathematical logic
Mathematical logic is the study of Logic#Formal logic, formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory (also known as computability theory). Research in mathematical logic com ...
and the theory of programming, in that their
internal language is the
simply typed lambda calculus
The simply typed lambda calculus (), a form
of type theory, is a typed interpretation of the lambda calculus with only one type constructor () that builds function types. It is the canonical and simplest example of a typed lambda calculus. The ...
. They are generalized by
closed monoidal categories, whose internal language,
linear type system
Substructural type systems are a family of type systems analogous to substructural logics where one or more of the structural rules are absent or only allowed under controlled circumstances. Such systems can constrain access to system resource ...
s, are suitable for both
quantum
In physics, a quantum (: quanta) is the minimum amount of any physical entity (physical property) involved in an interaction. The fundamental notion that a property can be "quantized" is referred to as "the hypothesis of quantization". This me ...
and classical computation.
Etymology
Named after
René Descartes
René Descartes ( , ; ; 31 March 1596 – 11 February 1650) was a French philosopher, scientist, and mathematician, widely considered a seminal figure in the emergence of modern philosophy and Modern science, science. Mathematics was paramou ...
(1596–1650), French philosopher, mathematician, and scientist, whose formulation of analytic geometry gave rise to the concept of
Cartesian product
In mathematics, specifically set theory, the Cartesian product of two sets and , denoted , is the set of all ordered pairs where is an element of and is an element of . In terms of set-builder notation, that is
A\times B = \.
A table c ...
, which was later generalized to the notion of
categorical product.
Definition
The category C is called Cartesian closed iff it satisfies the following three properties:
* It has a
terminal object
In category theory, a branch of mathematics, an initial object of a category is an object in such that for every object in , there exists precisely one morphism .
The dual notion is that of a terminal object (also called terminal element): ...
.
* Any two objects ''X'' and ''Y'' of C have a
product ''X'' ×''Y'' in C.
* Any two objects ''Y'' and ''Z'' of C have an
exponential
Exponential may refer to any of several mathematical topics related to exponentiation, including:
* Exponential function, also:
**Matrix exponential, the matrix analogue to the above
*Exponential decay, decrease at a rate proportional to value
* Ex ...
''Z
Y'' in C.
The first two conditions can be combined to the single requirement that any finite (possibly empty) family of objects of ''C'' admit a product in ''C'', because of the natural
associativity
In mathematics, the associative property is a property of some binary operations that rearranging the parentheses in an expression will not change the result. In propositional logic, associativity is a Validity (logic), valid rule of replaceme ...
of the categorical product and because the
empty product
In mathematics, an empty product, or nullary product or vacuous product, is the result of multiplication, multiplying no factors. It is by convention equal to the multiplicative identity (assuming there is an identity for the multiplication operat ...
in a category is the terminal object of that category.
The third condition is equivalent to the requirement that the
functor
In mathematics, specifically category theory, a functor is a Map (mathematics), mapping between Category (mathematics), categories. Functors were first considered in algebraic topology, where algebraic objects (such as the fundamental group) ar ...
– ×''Y'' (i.e. the functor from C to C that maps objects ''X'' to ''X'' ×''Y'' and morphisms φ to φ×id
''Y'') has a
right adjoint
In mathematics, specifically category theory, adjunction is a relationship that two functors may exhibit, intuitively corresponding to a weak form of equivalence between two related categories. Two functors that stand in this relationship are k ...
, usually denoted –
''Y'', for all objects ''Y'' in C.
For
locally small
In mathematics, a category (sometimes called an abstract category to distinguish it from a concrete category) is a collection of "objects" that are linked by "arrows". A category has two basic properties: the ability to compose the arrows asso ...
categories, this can be expressed by the existence of a
bijection
In mathematics, a bijection, bijective function, or one-to-one correspondence is a function between two sets such that each element of the second set (the codomain) is the image of exactly one element of the first set (the domain). Equival ...
between the
hom-set
In mathematics, a morphism is a concept of category theory that generalizes structure-preserving maps such as homomorphism between algebraic structures, functions from a set to another set, and continuous functions between topological spaces. Alt ...
s
:
which is
natural
Nature is an inherent character or constitution, particularly of the ecosphere or the universe as a whole. In this general sense nature refers to the laws, elements and phenomena of the physical world, including life. Although humans are part ...
in ''X'', ''Y'', and ''Z''.
Take care to note that a Cartesian closed category need not have finite
limits; only finite products are guaranteed.
If a category has the property that all its
slice categories are Cartesian closed, then it is called ''locally cartesian closed''. Note that if C is locally Cartesian closed, it need not actually be Cartesian closed; that happens if and only if C has a terminal object.
Basic constructions
Evaluation
For each object ''Y'', the counit of the exponential adjunction is a
natural transformation
In category theory, a branch of mathematics, a natural transformation provides a way of transforming one functor into another while respecting the internal structure (i.e., the composition of morphisms) of the categories involved. Hence, a natur ...
:
called the (internal) evaluation map. More generally, we can construct the
partial application
Partial may refer to:
Mathematics
*Partial derivative, derivative with respect to one of several variables of a function, with the other variables held constant
** ∂, a symbol that can denote a partial derivative, sometimes pronounced "partial ...
map as the composite
:
In the particular case of the category Set, these reduce to the ordinary operations:
:
Composition
Evaluating the exponential in one argument at a morphism ''p'' : ''X'' → ''Y'' gives morphisms
:
:
corresponding to the operation of composition with ''p''. Alternate notations for the operation ''p''
''Z'' include ''p''
* and ''p''∘-. Alternate notations for the operation ''Z''
''p'' include ''p''
* and -∘''p''.
Evaluation maps can be chained as
:
the corresponding arrow under the exponential adjunction
:
is called the (internal) composition map.
In the particular case of the category Set, this is the ordinary
composition
Composition or Compositions may refer to:
Arts and literature
*Composition (dance), practice and teaching of choreography
* Composition (language), in literature and rhetoric, producing a work in spoken tradition and written discourse, to include ...
operation:
:
Sections
For a morphism ''p'':''X'' → ''Y'', suppose the following
pullback
In mathematics, a pullback is either of two different, but related processes: precomposition and fiber-product. Its dual is a pushforward.
Precomposition
Precomposition with a function probably provides the most elementary notion of pullback: ...
square exists, which defines the subobject of ''X''
''Y'' corresponding to maps whose composite with ''p'' is the identity:
:
where the arrow on the right is ''p''
''Y'' and the arrow on the bottom corresponds to the identity on ''Y''. Then Γ
''Y''(''p'') is called the
object of sections of ''p''. It is often abbreviated as Γ
''Y''(''X'').
If Γ
''Y''(''p'') exists for every morphism ''p'' with codomain ''Y'', then it can be assembled into a functor Γ
''Y'' : ''C''/''Y'' → ''C'' on the slice category, which is right adjoint to a variant of the product functor:
:
The exponential by ''Y'' can be expressed in terms of sections:
:
Examples
Examples of Cartesian closed categories include:
* The category Set of all
set
Set, The Set, SET or SETS may refer to:
Science, technology, and mathematics Mathematics
*Set (mathematics), a collection of elements
*Category of sets, the category whose objects and morphisms are sets and total functions, respectively
Electro ...
s, with
functions as morphisms, is Cartesian closed. The product ''X''×''Y'' is the Cartesian product of ''X'' and ''Y'', and ''Z''
''Y'' is the set of all functions from ''Y'' to ''Z''. The adjointness is expressed by the following fact: the function ''f'' : ''X''×''Y'' → ''Z'' is naturally identified with the
curried function ''g'' : ''X'' → ''Z''
''Y'' defined by ''g''(''x'')(''y'') = ''f''(''x'',''y'') for all ''x'' in ''X'' and ''y'' in ''Y''.
* The
subcategory
In mathematics, specifically category theory, a subcategory of a category ''C'' is a category ''S'' whose objects are objects in ''C'' and whose morphisms are morphisms in ''C'' with the same identities and composition of morphisms. Intuitively, ...
of
finite sets, with functions as morphisms, is also Cartesian closed for the same reason.
* If ''G'' is a
group
A group is a number of persons or things that are located, gathered, or classed together.
Groups of people
* Cultural group, a group whose members share the same cultural identity
* Ethnic group, a group whose members share the same ethnic iden ...
, then the category of all
''G''-sets is Cartesian closed. If ''Y'' and ''Z'' are two ''G''-sets, then ''Z''
''Y'' is the set of all functions from ''Y'' to ''Z'' with ''G'' action defined by (''g''.''F'')(''y'') = ''g''.F(''g''
−1.''y'') for all ''g'' in ''G'', ''F'':''Y'' → ''Z'' and ''y'' in ''Y''.
* The subcategory of finite ''G''-sets is also Cartesian closed.
* The category Cat of all small categories (with functors as morphisms) is Cartesian closed; the exponential ''C''
''D'' is given by the
functor category
In category theory, a branch of mathematics, a functor category D^C is a category where the objects are the functors F: C \to D and the morphisms are natural transformations \eta: F \to G between the functors (here, G: C \to D is another object i ...
consisting of all functors from ''D'' to ''C'', with natural transformations as morphisms.
* If ''C'' is a
small category
In mathematics, a category (sometimes called an abstract category to distinguish it from a concrete category) is a collection of "objects" that are linked by "arrows". A category has two basic properties: the ability to compose the arrows asso ...
, then the functor category Set
''C'' consisting of all covariant functors from ''C'' into the category of sets, with natural transformations as morphisms, is Cartesian closed. If ''F'' and ''G'' are two functors from ''C'' to Set, then the exponential ''F''
''G'' is the functor whose value on the object ''X'' of ''C'' is given by the set of all natural transformations from to ''F''.
** The earlier example of ''G''-sets can be seen as a special case of functor categories: every group can be considered as a one-object category, and ''G''-sets are nothing but functors from this category to Set
** The category of all
directed graphs is Cartesian closed; this is a functor category as explained under functor category.
** In particular, the category of
simplicial set
In mathematics, a simplicial set is a sequence of sets with internal order structure ( abstract simplices) and maps between them. Simplicial sets are higher-dimensional generalizations of directed graphs.
Every simplicial set gives rise to a "n ...
s (which are functors ''X'' : Δ
op → Set) is Cartesian closed.
* Even more generally, every elementary
topos
In mathematics, a topos (, ; plural topoi or , or toposes) is a category that behaves like the category of sheaves of sets on a topological space (or more generally, on a site). Topoi behave much like the category of sets and possess a notio ...
is Cartesian closed.
* In
algebraic topology
Algebraic topology is a branch of mathematics that uses tools from abstract algebra to study topological spaces. The basic goal is to find algebraic invariant (mathematics), invariants that classification theorem, classify topological spaces up t ...
, Cartesian closed categories are particularly easy to work with. Neither the
category of topological spaces
In mathematics, the category of topological spaces, often denoted Top, is the category whose objects are topological spaces and whose morphisms are continuous maps. This is a category because the composition of two continuous maps is again con ...
with
continuous maps nor the
category of smooth manifolds with smooth maps is Cartesian closed. Substitute categories have therefore been considered: the category of
compactly generated Hausdorff space
In topology and related branches of mathematics, a Hausdorff space ( , ), T2 space or separated space, is a topological space where distinct points have disjoint neighbourhoods. Of the many separation axioms that can be imposed on a topologi ...
s is Cartesian closed, as is the category of
Frölicher spaces.
* In
order theory
Order theory is a branch of mathematics that investigates the intuitive notion of order using binary relations. It provides a formal framework for describing statements such as "this is less than that" or "this precedes that". This article intr ...
,
complete partial order
In mathematics, the phrase complete partial order is variously used to refer to at least three similar, but distinct, classes of partially ordered sets, characterized by particular completeness properties. Complete partial orders play a central ro ...
s (''cpo''s) have a natural
topology
Topology (from the Greek language, Greek words , and ) is the branch of mathematics concerned with the properties of a Mathematical object, geometric object that are preserved under Continuous function, continuous Deformation theory, deformat ...
, the
Scott topology, whose continuous maps do form a Cartesian closed category (that is, the objects are the cpos, and the morphisms are the
Scott continuous maps). Both
currying
In mathematics and computer science, currying is the technique of translating a function that takes multiple arguments into a sequence of families of functions, each taking a single argument.
In the prototypical example, one begins with a functi ...
and ''
apply
In mathematics and computer science, apply is a function that applies a function to arguments. It is central to programming languages derived from lambda calculus, such as LISP and Scheme, and also in functional languages. It has a role in the ...
'' are continuous functions in the Scott topology, and currying, together with apply, provide the adjoint.
* A
Heyting algebra
In mathematics, a Heyting algebra (also known as pseudo-Boolean algebra) is a bounded lattice (with join and meet operations written ∨ and ∧ and with least element 0 and greatest element 1) equipped with a binary operation ''a'' → ''b'' call ...
is a Cartesian closed (bounded)
lattice. An important example arises from topological spaces. If ''X'' is a topological space, then the
open set
In mathematics, an open set is a generalization of an Interval (mathematics)#Definitions_and_terminology, open interval in the real line.
In a metric space (a Set (mathematics), set with a metric (mathematics), distance defined between every two ...
s in ''X'' form the objects of a category O(''X'') for which there is a unique morphism from ''U'' to ''V'' if ''U'' is a subset of ''V'' and no morphism otherwise. This
poset
In mathematics, especially order theory, a partial order on a Set (mathematics), set is an arrangement such that, for certain pairs of elements, one precedes the other. The word ''partial'' is used to indicate that not every pair of elements need ...
is a Cartesian closed category: the "product" of ''U'' and ''V'' is the
intersection
In mathematics, the intersection of two or more objects is another object consisting of everything that is contained in all of the objects simultaneously. For example, in Euclidean geometry, when two lines in a plane are not parallel, their ...
of ''U'' and ''V'' and the exponential ''U''
''V'' is the
interior of .
* A category with a
zero object
In category theory, a branch of mathematics, an initial object of a category is an object in such that for every object in , there exists precisely one morphism .
The dual notion is that of a terminal object (also called terminal element): ...
is Cartesian closed if and only if it is
equivalent to a category with only one object and one identity morphism. Indeed, if 0 is an initial object and 1 is a final object and we have
, then
which has only one element.
**In particular, any non-trivial category with a zero object, such as an
abelian category
In mathematics, an abelian category is a category in which morphisms and objects can be added and in which kernels and cokernels exist and have desirable properties.
The motivating prototypical example of an abelian category is the category o ...
, is not Cartesian closed. So the
category of modules over a ring is not Cartesian closed. However, the functor
tensor product
In mathematics, the tensor product V \otimes W of two vector spaces V and W (over the same field) is a vector space to which is associated a bilinear map V\times W \rightarrow V\otimes W that maps a pair (v,w),\ v\in V, w\in W to an element of ...
with a fixed
module does have
a right adjoint. The tensor product is not a categorical product, so this does not contradict the above. We obtain instead that the category of modules is
monoidal closed.
Examples of locally Cartesian closed categories include:
* Every elementary topos is locally Cartesian closed. This example includes Set, ''FinSet'', ''G''-sets for a group ''G'', as well as Set
''C'' for small categories ''C''.
* The category ''LH'' whose objects are topological spaces and whose morphisms are
local homeomorphism
In mathematics, more specifically topology, a local homeomorphism is a function between topological spaces that, intuitively, preserves local (though not necessarily global) structure.
If f : X \to Y is a local homeomorphism, X is said to be an � ...
s is locally Cartesian closed, since ''LH''/''X'' is equivalent to the category of
sheaves . However, ''LH'' does not have a terminal object, and thus is not Cartesian closed.
* If ''C'' has pullbacks and for every arrow ''p'' : ''X'' → ''Y'', the functor ''p''
* : ''C/Y'' → ''C/X'' given by taking pullbacks has a right adjoint, then ''C'' is locally Cartesian closed.
* If ''C'' is locally Cartesian closed, then all of its slice categories ''C''/''X'' are also locally Cartesian closed.
Non-examples of locally Cartesian closed categories include:
* Cat is not locally Cartesian closed.
Applications
In Cartesian closed categories, a "function of two variables" (a morphism ''f'' : ''X''×''Y'' → ''Z'') can always be represented as a "function of one variable" (the morphism λ''f'' : ''X'' → ''Z''
''Y''). In
computer science
Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
applications, this is known as
currying
In mathematics and computer science, currying is the technique of translating a function that takes multiple arguments into a sequence of families of functions, each taking a single argument.
In the prototypical example, one begins with a functi ...
; it has led to the realization that simply-typed lambda calculus can be interpreted in any Cartesian closed category.
The
Curry–Howard–Lambek correspondence provides a deep
isomorphism
In mathematics, an isomorphism is a structure-preserving mapping or morphism between two structures of the same type that can be reversed by an inverse mapping. Two mathematical structures are isomorphic if an isomorphism exists between the ...
between
intuitionistic logic
Intuitionistic logic, sometimes more generally called constructive logic, refers to systems of symbolic logic that differ from the systems used for classical logic by more closely mirroring the notion of constructive proof. In particular, systems ...
, simply-typed lambda calculus and Cartesian closed categories.
Certain Cartesian closed categories, the
topoi
In mathematics, a topos (, ; plural topoi or , or toposes) is a category that behaves like the category of sheaves of sets on a topological space (or more generally, on a site). Topoi behave much like the category of sets and possess a notion ...
, have been proposed as a general setting for mathematics, instead of traditional
set theory
Set theory is the branch of mathematical logic that studies Set (mathematics), sets, which can be informally described as collections of objects. Although objects of any kind can be collected into a set, set theory – as a branch of mathema ...
.
Computer scientist
John Backus
John Warner Backus (December 3, 1924 – March 17, 2007) was an American computer scientist. He led the team that invented and implemented FORTRAN, the first widely used high-level programming language, and was the inventor of the Backus–N ...
has advocated a variable-free notation, or
Function-level programming
In computer science, function-level programming refers to one of the two contrasting programming paradigms identified by John Backus in his work on programs as mathematical objects, the other being value-level programming.
In his 1977 Turin ...
, which in retrospect bears some similarity to the
internal language of Cartesian closed categories.
CAML
Caml (originally an acronym for Categorical Abstract Machine Language) is a multi-paradigm, general-purpose, high-level, functional programming language which is a dialect of the ML programming language family. Caml was developed in France ...
is more consciously modelled on Cartesian closed categories.
Dependent sum and product
Let ''C'' be a locally Cartesian closed category. Then ''C'' has all pullbacks, because the pullback of two arrows with codomain ''Z'' is given by the product in ''C''/''Z''.
For every arrow ''p'' : ''X'' → ''Y'', let ''P'' denote the corresponding object of ''C/Y''. Taking pullbacks along ''p'' gives a functor ''p''
* : ''C''/''Y'' → ''C''/''X'' which has both a left and a right adjoint.
The left adjoint
is called the dependent sum and is given by composition
.
The right adjoint
is called the dependent product.
The exponential by ''P'' in ''C''/''Y'' can be expressed in terms of the dependent product by the formula
.
The reason for these names is because, when interpreting ''P'' as a
dependent type
In computer science and logic, a dependent type is a type whose definition depends on a value. It is an overlapping feature of type theory and type systems. In intuitionistic type theory, dependent types are used to encode logic's quantifiers lik ...
, the functors
and
correspond to the type formations
and
respectively.
Equational theory
In every Cartesian closed category (using exponential notation), (''X''
''Y'')
''Z'' and (''X''
''Z'')
''Y'' are isomorphic for all objects ''X'', ''Y'' and ''Z''. We write this as the "equation"
:(''x''
''y'')
''z'' = (''x''
''z'')
''y''.
One may ask what other such equations are valid in all Cartesian closed categories. It turns out that all of them follow logically from the following axioms:
*''x''×(''y''×''z'') = (''x''×''y'')×''z''
*''x''×''y'' = ''y''×''x''
*''x''×1 = ''x'' (here 1 denotes the terminal object of ''C'')
*1
''x'' = 1
*''x''
1 = ''x''
*(''x''×''y'')
''z'' = ''x''
''z''×''y''
''z''
*(''x''
''y'')
''z'' = ''x''
(''y''×''z'')
Bicartesian closed categories
Bicartesian closed categories extend Cartesian closed categories with binary
coproduct
In category theory, the coproduct, or categorical sum, is a construction which includes as examples the disjoint union of sets and of topological spaces, the free product of groups, and the direct sum of modules and vector spaces. The cop ...
s and an
initial object
In category theory, a branch of mathematics, an initial object of a category is an object in such that for every object in , there exists precisely one morphism .
The dual notion is that of a terminal object (also called terminal element) ...
, with products distributing over coproducts. Their equational theory is extended with the following axioms, yielding something similar to
Tarski's high school axioms but with a zero:
*''x'' + ''y'' = ''y'' + ''x''
*(''x'' + ''y'') + ''z'' = ''x'' + (''y'' + ''z'')
*''x''×(''y'' + ''z'') = ''x''×''y'' + ''x''×''z''
*''x''
(''y'' + ''z'') = ''x
y×x
z''
*0 + ''x'' = ''x''
*''x''×0 = 0
*''x''
0 = 1
Note however that the above list is not complete; type isomorphism in the free BCCC is not finitely axiomatizable, and its decidability is still an
open problem
In science and mathematics, an open problem or an open question is a known problem which can be accurately stated, and which is assumed to have an objective and verifiable solution, but which has not yet been solved (i.e., no solution for it is kno ...
.
References
*
External links
*
*
{{category theory
Closed categories
Lambda calculus