united foundations. General category theory, an extension of universal algebra having many new features allowing for semantic flexibility and higher-order logic, came later; it is now applied throughout mathematics.
Certain categories called topoi (singular topos) can even serve as an alternative to axiomatic set theory as a foundation of mathematics. These foundational applications of category theory have been worked out in fair detail as a basis for, and justification of, constructive mathematics. More recent efforts to introduce undergraduates to categories as a foundation for mathematics include Lawvere and Rosebrugh (2003) and Lawvere and Schanuel (1997).
Categorical logic is now a well-defined field based on type theory for intuitionistic logics, with applications in functional programming and domain theory, where a cartesian closed category is taken as a non-syntactic description of a lambda calculus. At the very least, category theoretic language clarifies what exactly these related areas have in common (in some abstract sense).
A category C consists of the following three mathematical entities:
From these axioms, it can be proved that there is exactly one identity morphism for every object. Some authors deviate from the definition just given by identifying each object with its identity morphism.
Relations among morphisms (such as fg = h) are often depicted using commutative diagrams, with "points" (corners) representing objects and "arrows" representing morphisms. The influence of commutative diagrams has been such that "arrow" and morphism are now synonymous.
Functors are structure-preserving maps between categories. They can be thought of as morphisms in the category of all (small) categories.
A (covariant) functor F from a category C to a category D, written F:C → D, consists of:
such that the following two properties hold:
A contravariant functor F: C → D, is like a covariant functor, except that it "turns morphisms around" ("reverses all the arrows"). More specifically, every morphism f : x → y in C must be assigned to a morphism F(f) : F(y) → F(x) in D. In other words, a contravariant functor is a covariant functor from the opposite category Cop to D.
A natural transformation is a relation between two functors. Functors often describe "natural constructions" and natural transformations then describe "natural homomorphisms" between two such constructions. Sometimes two quite different constructions yield "the same" result; this is expressed by a natural isomorphism between the two functors.
If F and G are (covariant) functors between the categories C and D, then a natural transformation from F to G associates to every object x in C a morphism ηx : F(x) → G(x) in D such that for every morphism f : x → y in C, we have ηy o F(f) = G(f) o ηx; this means that the following diagram is commutative:
The two functors F and G are called naturally isomorphic if there exists a natural transformation from F to G such that ηx is an isomorphism for every object x in C.
Using the language of category theory, many areas of mathematical study can be cast into appropriate categories, such as the categories of all sets, groups, topologies, and so on. These categories surely have some objects that are "special" in a certain way, such as the empty set or the product of two topologies. Yet, in the definition of a category, objects are considered to be atomic; i.e., we do not know whether an object A is a set, a topology, or any other abstract concept. Hence, the challenge is to define special objects without referring to the internal structure of these objects. But how can we define the empty set without referring to elements, or the product topology without referring to open sets?
The solution is to characterize these objects in terms of their relations to other objects, as given by the morphisms of the respective categories. Thus the task is to find universal properties that uniquely determine the objects of interest. Indeed, it turns out that numerous important constructions can be described in a purely categorical way. The ce