Categories for the practising physicist

Bob Coecke, Eric Oliver Paquette

Prologue: cooking with vegetables

Consider a ‘raw potato’. Conveniently, we refer to it as AA. Raw potato AA admits several states e.g. ‘dirty’, ‘clean’, ‘skinned’, … Since raw potatoes don’t digest well we need to process AA into ‘cooked potato’ BB. We refer to AA and BB as kinds or types of food. Also BB admits several states e.g. ‘boiled’, ‘fried’, ‘baked with skin’, ‘baked without skin’, … Correspondingly, there are several ways to turn raw potato AA into cooked potato BB e.g. ‘boiling’, ‘frying’, ‘baking’, to which we respectively refer as ff, f′f^{\prime} and f′′f^{\prime\prime}. We make the fact that each of these cooking processes applies to raw potato AA and produces cooked potato BB explicit via labelled arrows:

Sequential composition. A plain cooked potato tastes dull so we’d like to process it into ‘spiced cooked potato’ CC. We refer to the composite process that consists of first ‘boiling’ A\rTofBA\rTo^{f}B and then ‘salting’ B\rTogCB\rTo^{g}C as

We refer to the trivial process of ‘doing nothing to vegetable XX’ as

Clearly we have 1Y∘ξ=ξ∘1X=ξ1_{Y}\circ\xi=\xi\circ 1_{X}=\xi for all processes X\rToξYX\rTo^{\xi}Y. Note that there is a slight subtlety here: we need to specify what we mean by equality of cooking processes. We will conceive two cooking processes X\rToξYX\rTo^{\xi}Y and X\rToζYX\rTo^{\zeta}Y as equal, and write ξ=ζ\xi=\zeta, if the resulting effect on each of the states which XX admits is the same. A stronger notion of equality arises when we also want some additional details of the processes to coincide e.g. the brand of the cooking pan that we use.

Let DD be a ‘raw carrot’. Note that it is indeed very important to explicitly distinguish our potato and our carrot and any other vegetable such as ‘lettuce’ LL in terms of their respective names AA, DD and LL, since each admits distinct ways of processing. And also a cooked potato admits different ways of processing than a raw one, for example, while we can mash cooked potatoes, we can’t mash raw ones. We denote all processes which turn raw potato AA into cooked potato BB by C(A,B){\bf C}(A,B). Consequently, we can repackage composition of cooking processes as a function

Parallel composition. We want to turn ‘raw potato’ AA and ‘raw carrot’ DD into ‘carrot-potato mash’ MM. We refer to the fact that this requires (or consumes) both AA and DD as A⊗DA\otimes D. Refer to ‘frying the carrot’ as D\rTohED\rTo^{h}E. Then, by

we mean ‘boiling potato AA’ while ‘frying carrot DD’ and by

we mean ‘mashing spiced cooked potato CC and spiced cooked carrot FF’.

Laws. The whole process from raw components AA and DD to ‘meal’ MM is

where ‘peppering the carrot’ is referred to as E\rTokFE\rTo^{k}F. We refer to the list of the operations that we apply, i.e. (ff while hh, gg while kk, xx), as a recipe. Distinct recipes can yield the same meal. The reason for this is that the two operations ‘and then’ (i.e. −∘−-\circ-) and ‘while’ (i.e. −⊗−-\otimes-) which we have at our disposal are not totally independent but interact in a certain way. This is exemplified by the equality

on cooking processes, which states that it makes no difference whether ‘we first boil the potato and then fry the carrot’, or, ‘first fry the carrot and then boil the potato’.

Eq.(1) is in fact a generally valid equational law for cooking processes, which does not depend on specific properties of A,B,D,E,fA,B,D,E,f nor hh.

Of course, chefs do not perform computations involving eq.(1), since their ‘intuition’ accounts for its content. But, if we were to teach an android how to become a chef, which would require it/him/her to reason about recipes, then we would need to teach it/him/her the laws governing these recipes.

In fact, there is a more general law governing cooking processes from which eq.(1) can be derived, namely,

That is, ‘boiling the potato and then salting it, while, frying the carrot and then peppering it’, is equal to ‘boiling the potato while frying the carrot, and then, salting the potato while peppering the carrot’. In the light of the previous footnote, note here that this law applies to any reasonable notion of equality for processes. A proof of the fact that eq.(1) can be derived from eq.(2) is in Proposition 2 below.

Logic. Eq.(2) is indeed a logical statement. In particular, note the remarkable similarity, but at the same time also the essential difference, of eq.(2) with the well-known distributive law of classical logic, which states that

For simple situations, if one possesses enough brainpower, ‘intuition’ again accounts for this distributive law. Ot the other hand, it needs to be explicitly taught to androids, since this distributive law is key to the resolution method which is the standard implementation of artificial reasoning in AI and robotics resolution_method. Also for complicated sentences we ourselves will need to rely on this method too.

The (∘,⊗)(\circ,\otimes)-logic is a logic of interaction. It applies to cooking processes, physical processes, biological processes, logical processes (i.e. proofs), or computer processes (i.e. programs). The theory of monoidal categories, the subject of this chapter, is the mathematical framework that accounts for the common structure of each of these theories of processes. The framework of monoidal categories moreover enables modeling and axiomatising (or ‘classify’) the extra structure which certain families of processes may have. For example, how cooking processes differ from physical processes, and how quantum processes differ from classical processes.

Pictures. We mentioned that our intuition accounts for (∘,⊗)(\circ,\otimes)-logic. Wouldn’t it be nice if there would be mathematical structures which also ‘automatically’ (or ‘implicitly’) account for the logical mechanisms which we intuitively perform? Well, these mathematical structures do exist. While they are only a fairly recent development, they are becoming more and more prominent in mathematics, including in important ‘Fields Medal awarding areas’ such as algebraic topology and representation theory — see for example (Morrison, and references therein). Rather than being symbolic, these mathematical structures are purely graphical. Indeed, by far ***the*** coolest thing about monoidal categories is that they admit a purely pictorial calculus, and these pictures automatically account for the logical mechanisms which we intuitively perform. As pictures, both sides of eq.(2) become:

Hence eq.(2) becomes an implicit salient feature of the graphical calculus and needs no explicit attention anymore. This, as we will see below, substantially simplifies many computations. To better understand in which manner these pictures simplify computations note that the differences between the two sides of eq.(2) can be recovered by introducing ‘artificial’ brackets within the two pictures:

A detailed account on this graphical calculus is in Section 2.2.

In the remainder of this chapter we provide a formal tutorial on several kinds of monoidal categories that are relevant to physics. If you’d rather stick to the informal story of this prologue you might want to first take a bite of C2005c; C2005d. Paper C2005c provided a conceptual template for setting up the content of this paper. However, here we go in more detail and provide more examples. Section 1 introduces categories and Section 2 introduces tensor structure. Section 3 studies quantum-like tensors and Section 4 studies classical-like tensors. Section 5 introduces mappings between monoidal categories (= monoidal functors), and natural transformations between these, which enable to concisely define topological quantum field theories. Section 6 suggests further reading.

The 1D case: New arrows for your quiver

The bulk of the previous section discussed the two manners in which we can compose processes, namely sequentially and in parallel, or more physically put, in time and in space. These are indeed the situations we truly care about in this chapter. Historically however, category theoreticians cared mostly about one-dimensional fragments of the two-dimensional monoidal categories. These one-dimensional fragments are (ordinary) categories, hence the name category theory. Some people will get rebuked by the terminology and particular syntactic language used in category theory — which can sound and look like unintelligible jargon — resulting in its unfortunate label of generalised abstract nonsense. The reader should realise that initially category theory was crafted as ‘a theory of mathematical structures’. Hence substantial effort was made to avoid any reference to the underlying concrete models, resulting in its seemingly idiosyncratic format. The personalities involved in crafting category theory, however brilliant minds they had, also did not always help the cause of making category theory accessible to a broader community.

But this ‘theory of mathematical structures’ view is not the only way to conceive category theory. As we argued above, and as is witnessed by its important use in computer science, in proof theory, and more recently also in quantum informatics and in quantum foundations, category theory is a theory which brings the notions of (type of ) system and process to the forefront, two notions which are hard to cast within traditional monolithic mathematical structures.

We profoundly believe that the fact that the mainstream physics community has not yet acquired this (type of) systems/process structure as a primal part of its theories is merely accidental, and temporary, … and will soon change.

We will use the following syntax to denote a function:

where XX is the set of arguments, YY the set of possible values, and

means that argument xx is mapped on value yy.

A family Typically, ‘family’ will mean a class rather than a set. While for many constructions the size of ∣C∣|{\bf C}| is important, it will not play a key role in this paper. ∣C∣|{\bf C}| of objects ;

For any A,B∈∣C∣A,B\in|{\bf C}|, a set C(A,B){\bf C}(A,B) of morphisms, the hom-set ;

For any A,B,C∈∣C∣A,B,C\in|{\bf C}|, and any f∈C(A,B)f\in{\bf C}(A,B) and g∈C(B,C)g\in{\bf C}(B,C), a composite g∘f∈C(A,C)g\circ f\in{\bf C}(A,C), i.e., for all A,B,C∈∣C∣A,B,C\in|{\bf C}| there is a composition operation

and this composition operation is associative and has units, that is,

for any f∈C(A,B)f\in{\bf C}(A,B), g∈C(B,C)g\in{\bf C}(B,C) and h∈C(C,D)h\in{\bf C}(C,D) we have

for any A∈∣C∣A\in|{\bf C}|, there exists a morphism 1A∈C(A,A)1_{A}\in{\bf C}(A,A), called the identity, which is such that for any f∈C(A,B)f\in{\bf C}(A,B) we have

A shorthand for f∈C(A,B)f\in{\bf C}(A,B) is A\rTofBA\rTo^{f}B. As already mentioned above, this definition was proposed by Samuel Eilenberg and Saunders Mac Lane in 1945 as part of a framework which intended to unify a variety of mathematical constructions within different areas of mathematics EilenbergMacLane. Consequently, most of the examples of categories that one encounters in the literature encode mathematical structures: the objects will be examples of this mathematical structure and the morphisms will be the structure-preserving maps between these. This kind of categories is usually referred to as concrete categories Adamek. We will also call them concrete categorical models.

2 Concrete categories

Traditionally, mathematical structures are defined as a set equipped with some operations and some axioms, for instance:

A group is a set GG with an associative binary operation −∙−:G×G→G-\bullet-:G\times G\rightarrow G and with a two-sided identity 1∈G1\in G, relative to which each element is invertible, that is, for all g∈Gg\in G there exists g−1∈Gg^{-1}\in G such that g∙g−1=g−1∙g=1g\bullet g^{-1}=g^{-1}\bullet g=1.

Similarly we define rings and fields. Slightly more involved but in the same spirit:

It is to these operations and axioms that one usually refers to as structure. Functions on the underlying sets which preserve (at least part of) this structure are called structure preserving maps. Here are some examples of structure preserving maps:

group homomorphisms, i.e. functions which preserve the group multiplication, from which it then also follows that the unit and inverses are preserved;

linear maps, i.e. functions from a vector space to a vector space which preserve linear combinations of vectors.

Let Set{\bf Set} be the concrete category with:

all functions between sets as morphisms, that is, more precisely, if XX and YY are sets and f:X→Yf:X\to Y is a function between these sets, then f∈Set(X,Y)f\in{\bf Set}(X,Y),

ordinary composition of functions, that is, for f:X→Yf:X\rightarrow Y and g:Y→Zg:Y\rightarrow Z we have (g∘f)(x):=g(f(x))(g\circ f)(x):=g(f(x)) for the composite g∘f:X→Zg\circ f:X\to Z, and,

the obvious identities i.e. 1X(x):=x1_{X}(x):=x.

function composition is associative, and,

for any function f:X→Yf:X\rightarrow Y we have (1Y∘f)(x)=f(x)=(f∘1X)(x)(1_{Y}\circ f)(x)=f(x)=(f\circ 1_{X})(x) .

all linear maps between these vectors spaces as morphisms, and

ordinary composition of the underlying functions, and,

the composite of two linear maps is again a linear map, and,

Grp{\bf Grp} is the concrete category with:

group homomorphisms between these groups as morphisms, and,

the composite of two group homomorphisms is a group homomorphism, and,

identity functions are group homomorphisms.

Above we explained that mathematical structures such as groups typically consist of a set with additional structure. In the case of a category we have a collection of objects, and for each pair of objects a set of morphisms. The ‘structure of a category’ then consists of the composition operation on morphisms and the identities on objects. So there is no reference to what the individual objects actually are (e.g. a set, a vector space, or a group). Consequently, one would expect that when passing from a mathematical structure (cf. group) to the corresponding concrete category with these mathematical structures as objects (cf. Grp{\bf Grp}), one looses the object’s ‘own’ structure. But fortunately, this happens not to be the case. The fact that we consider structure preserving maps as morphisms will allow us to recover the mathematical structures that we started from. In particular, by only relying on categorical concepts we are still able to identify the ‘elements’ of the objects.

For the set X∈∣Set∣X\in|{\bf Set}| and some chosen element x∈Xx\in X the function

where {∗}\{*\} is any one-element set, maps the unique element of {∗}\{*\} onto the chosen element xx. If XX contains nn elements, then there are nn such functions each corresponding to the element on which ∗* is mapped. Hence the elements of the set XX are now encoded as the set Set({∗},X){\bf Set}(\{*\},X).

Pos{\bf Pos} is the concrete category with:

partially ordered sets, that is, a set together with a reflexive, anti-symmetric and transitive relation, as objects,

order preserving maps, i.e. x≤y⇒f(x)≤f(y)x\leq y\Rightarrow f(x)\leq f(y), as morphisms, and,

ordinary function composition, and identity functions.

An extended version of this category is Pre{\bf Pre} where we consider arbitrary pre-ordered sets, that is, a set together with a reflexive and transitive relation.

Cat{\bf Cat} is the concrete category with: In order to conceive Cat{\bf Cat} as a concrete category, the family of objects should be restricted to the so-called “small” categories i.e., categories for which the family of objects is a set.

so-called functors between these as morphisms (see Section 1.6), and,

functor composition, and identity functors.

3 Real world categories

But viewing category theory as some kind of metatheory about mathematical structure is not necessarily the most useful perspective for the sort of applications that we have in mind. Indeed, here are a few examples of the kind of categories we truly care about, and which are not categories with mathematical structures as objects and structure preserving maps as morphisms.

all physical systems A,B,C,…A,B,C,\ldots as objects,

all physical processes which take a physical system of type AA into a physical system of type BB as the morphisms of type A\rToBA\rTo B (these processes typically require some finite amount of time to be completed), and,

sequential composition of these physical processes as composition, and the process which leaves system AA invariant as the identity 1A1_{A}.

Note that in this case associativity of composition admits a physical interpretation: if we first have process ff, then process gg, and then process hh, it doesn’t matter whether we either consider (g∘f)(g\circ f) as a single entity after which we apply hh, or whether we consider (h∘g)(h\circ g) as a single entity which we apply after ff. Hence brackets constitute superfluous data that can be omitted i.e.

The category PhysOpp\mathbf{PhysOpp} is an operational variant of the above where, rather than general physical systems such as stars, we focus on systems which can be manipulated in the lab, and rather than general processes, we consider the operations which the practising experimenter performs on these systems, for example, applying force-fields, performing measurements etc.

The category QuantOpp\mathbf{QuantOpp} is a restriction of the above where we restrict ourselves to quantum systems and operations thereon. Special processes in QuantOpp\mathbf{QuantOpp} are preparation procedures, or states. If QQ denotes a qubit, then the type of a preparation procedure would be I\rToQ{\rm I}\rTo Q where I{\rm I} stands for ‘unspecified’. Indeed, the point of a preparation procedure is to provide a qubit in a certain state, and the resources which we use to produce that state are typically not of relevance for the remainder of the experimental procedure. We can further specialise to either pure (or closed) quantum systems or mixed (or open) quantum systems, categories to which we respectively refer as PurQuantOpp\mathbf{PurQuantOpp} and MixQuantOpp\mathbf{MixQuantOpp}.

Obviously, Example 9 is related to the concrete category which has Hilbert spaces as objects and certain types of linear mappings (e.g. completely positive maps) as morphisms. The preparation procedures discussed above then correspond to ‘categorical elements’ in the sense of Example 4. We discuss this correspondence below.

While to the sceptical reader the above examples still might not seem very useful yet, the next two ones, which are very similar, have become really important for Computer Science and Logic. They are the reason that, for example, University of Oxford Computing Laboratory offers category theory to its undergraduates.

all data types, e.g. Booleans, integers, reals, as objects,

all programs which take data of type AA as their input and produce data of type BB as their output as the morphisms of type A\rToBA\rTo B, and,

sequential composition of programs as composition, and the programs which output their input unaltered as identities.

all proofs which conclude from proposition AA that proposition BB holds as the morphisms of type A\rToBA\rTo B, and,

concatenation (or chaining) of proofs as composition, and the tautologies ‘from AA follows AA’ as identities.

Computer scientists particularly like category theory because it explicitly introduces the notion of type: an arrow A\rTofBA\rTo^{f}B has type A\rToBA\rTo B. These types prevent silly mistakes when writing programs, e.g. the composition g∘fg\circ f makes no sense for C\rTogDC\rTo^{g}D because the output — called the codomain — of ff doesn’t match the input — called the domain — of gg. Computer scientists would say:

Similar categories BioProc{\bf BioProc} and ChemProc{\bf ChemProc} can be build for organisms and biological processes, chemicals and chemical reactions, etc. The first time the 1st author heard about categories was in a Philosophy of Science course, given by a biologist specialised in population dynamics, who discussed the importance of category theory in the influential work of Robert Rosen Rosen. The recipe for producing these categories is obvious:

Composition boils down to ‘first ff and then gg happens’ and identities are just ‘nothing happens’. Somewhat more operationally put, composition is ‘first do ff and then do gg’ and identities are just ‘doing nothing’. The reason for providing both the ‘objectivist’ (= passive) and ‘instrumentalist’ (= active) perspective is that we both want to appeal to members of the theoretical physics community and members of the quantum information community. The first community typically doesn’t like instrumentalism since it just doesn’t seem to make sense in the context of theories such as cosmology; on the other hand, instrumentalism is as important to quantum informatics as it is to ordinary informatics. We leave it up to the reader to decide whether it should play a role in the interpretation of quantum theory.

4 Abstract categorical structures and properties

One can treat categories as mathematical structures in their own right, just as groups and vector spaces are mathematical structures. In contrast with concrete categories, abstract categorical structures then arise by either endowing categories with more structure or by requiring them to satisfy certain properties.

We are of course aware that this is not a formal definition. Our sheepish excuse is that physicists rarely provide precise definitions. There is however a formal definition which can be found in Adamek. We do provide one below in Example 24.

A monoid (M,∙,1)(M,\bullet,1) is a set together with a binary associative operation

which admits a unit — i.e. a ‘group without inverses’. Equivalently, we can define a monoid as a category M{\bf M} with a single object ∗*. Indeed, it suffices to identify

the elements of the hom-set M(∗,∗){\bf M}(*,*) with those of MM,

with the associative monoid multiplication ∙\bullet, and

the identity 1∗:∗→∗1_{*}:*\rightarrow* with the unit 11.

Dually, in any category C{\bf C}, for any A∈∣C∣A\in|{\bf C}|, the set C(A,A){\bf C}(A,A) is always a monoid.

Two objects A,B∈∣C∣A,B\in|{\bf C}| are isomorphic if there exists morphisms f∈C(A,B)f\in{\bf C}(A,B) and g∈C(B,A)g\in{\bf C}(B,A) such that g∘f=1Ag\circ f=1_{A} and f∘g=1Bf\circ g=1_{B}. The morphism ff is called an isomorphism and f−1:=gf^{-1}:=g is called the inverse to ff.

The notion of isomorphism known to the reader is the set-theoretical one, namely that of a bijection. We now show that in the concrete category Set{\bf Set} the category-theoretical notion of isomorphism coincides with the notion of bijection. Given functions f:X→Yf:X\to Y and g:Y→Xg:Y\to X satisfying g(f(x))=xg(f(x))=x for all x∈Xx\in X and f(g(y))=yf(g(y))=y for all y∈Yy\in Y we have:

f(x1)=f(x2)⇒g(f(x1))=g(f(x2))⇒x1=x2f(x_{1})=f(x_{2})\Rightarrow g(f(x_{1}))=g(f(x_{2}))\Rightarrow x_{1}=x_{2} so ff is injective, and,

for all y∈Yy\in Y, setting x:=g(y)x:=g(y), we have f(x)=yf(x)=y so ff is surjective,

so ff is indeed a bijection. We leave it to the reader to verify that the converse also holds. For the other concrete categories mentioned above the categorical notion of isomorphism also coincides with the usual one.

Since a group (G,∙,1)(G,\bullet,1) is a monoid with inverses it can now be equivalently defined as a category with one object in which each morphism is an isomorphism. More generally, a groupoid is a category in which each morphism has an inverse. For instance, the category Bijec{\bf Bijec} which has sets as objects and bijections as morphisms is such a groupoid. So is FdUnit{\bf FdUnit} which has finite dimensional Hilbert spaces as objects and unitary operators as morphisms. Groupoids have important applications in mathematics, for example, in algebraic topology Brown.

From this, we see that any group is an example of an abstract categorical structure. At the same time, all groups together, with structure preserving maps between them, constitute a concrete category. Still following? That categories allow several ways of representing mathematical structures might seem confusing at first, but it is a token of their versatility. While monoids correspond to categories with only one object, with groups as a special case, similarly, pre-orders are categories with very few morphisms, with partially ordered sets as a special case.

Any preordered set (P,≤)(P,\leq) can be seen as a category P{\bf P}:

The elements of PP are the objects of P{\bf P},

Whenever a≤ba\leq b for a,b∈Pa,b\in P then there is a single morphism of type a\rToba\rTo b, that is, P(a,b){\bf P}(a,b) is a singleton, and whenever a≰ba\not\leq b then there is no morphism of type a\rToba\rTo b, that is, P(a,b){\bf P}(a,b) is empty.

Whenever there is pair of morphisms of types a\rToba\rTo b and b\rTocb\rTo c, that is, whenever a≤ba\leq b and b≤cb\leq c, then transitivity of ≤\leq guarantees the existence of a unique morphism of type a\rToca\rTo c, which we take to be the composite of the morphisms of type a\rToba\rTo b and b\rTocb\rTo c.

Reflexivity guarantees the existence of a unique morphism of type a\rToaa\rTo a, which we take to be the identity on the object aa.

Conversely, a category C{\bf C} of which the objects constitute a set, and in which there is at most one morphism of any type i.e., hom-sets are either singletons or empty, is in fact a preordered set. Concretely:

The set ∣C∣|{\bf C}| are the elements of the preordered set,

We set A≤BA\leq B if and only if C(A,B){\bf C}(A,B) is non-empty,

Since C{\bf C} is a category, whenever there exist morphisms f∈C(A,B)f\in{\bf C}(A,B) and g∈C(B,C)g\in{\bf C}(B,C), that is, whenever both C(A,B){\bf C}(A,B) and C(B,C){\bf C}(B,C) are non-empty, then there exist a morphism g∘f∈C(A,C)g\circ f\in{\bf C}(A,C), so C(A,C){\bf C}(A,C) is also non-empty. Hence, A≤BA\leq B and B≤CB\leq C yields A≤CA\leq C, so ≤\leq is transitive.

Since 1A∈C(A,A)1_{A}\in{\bf C}(A,A) we also have A≤AA\leq A, so ≤\leq is reflexive.

Hence, preordered sets indeed constitute an abstract category: its defining property is that every hom-set contains at most one morphism. Such categories are sometimes called thin categories. Conversely, categories with non-trivial hom-sets are called thick. Partially ordered sets also constitute an abstract category, namely one in which:

every hom-set contains at most one morphism ;

whenever two objects are isomorphic then they must be equal .

This second condition imposes anti-symmetry on the partial order.

Let {∗}\{*\} and ∅\emptyset denote a singleton set and the empty set respectively. Then for any set A∈∣Set∣A\in|{\bf Set}|, the set Set(A,{∗}){\bf Set}(A,\{*\}) of all functions of type A→{∗}A\rightarrow\{*\} is itself a singleton, since there is only one function which maps all a∈Aa\in A on ∗*, the single element of {∗}\{*\}. This concept can be dualised. The set Set(∅,A){\bf Set}(\emptyset,A) of functions of type ∅→A\emptyset\rightarrow A is again a singleton consisting of the ‘empty function’. Due to these special properties, we call {∗}\{*\} and ∅\emptyset respectively the terminal object and the initial object in Set{\bf Set}. All this can be generalised to arbitrary categories as follows:

An object ⊤∈∣C∣\top\in|{\bf C}| is terminal in C{\bf C} if, for any A∈∣C∣A\in|{\bf C}|, there is only one morphism of type A\rTo⊤A\rTo\top. Dually, an object ⊥∈∣C∣\bot\in|{\bf C}| is initial in C{\bf C} if, for any A∈∣C∣A\in|{\bf C}|, there is only one morphism of type ⊥\rToA\bot\rTo A.

If a category C{\bf C} has two initial objects then they are isomorphic. The same property holds for terminal objects.

Indeed. Let ⊥\bot and ⊥′\bot^{\prime} both be initial objects in C{\bf C}. Since ⊥\bot is initial, there is a unique morphism ff such that C(⊥,⊥′)={f}{\bf C}(\bot,\bot^{\prime})=\{f\}. Analogously, there is a unique morphism gg such that C(⊥′,⊥)={g}{\bf C}(\bot^{\prime},\bot)=\{g\}. Now, since C{\bf C} is a category and relying again on the fact that ⊥\bot is initial, it follows that g∘f∈C(⊥,⊥)={1⊥}g\circ f\in{\bf C}(\bot,\bot)=\{1_{\bot}\}. Similarly, g∘f∈C(⊥′,⊥′)={1⊥′}g\circ f\in{\bf C}(\bot^{\prime},\bot^{\prime})=\{1_{\bot^{\prime}}\}. Hence, ⊥≃⊥′\bot\simeq\bot^{\prime} as claimed. Similarly we show that ⊤≃⊤′\top\simeq\top^{\prime}.

A partially ordered set PP is bounded if there exist two elements ⊤\top and ⊥\bot such that for all a∈Pa\in P we have ⊥≤a≤⊤\bot\leq a\leq\top. Hence, when PP is viewed as a category, this means that it has both a terminal and an initial object.

The next example of an abstract categorical structure is the most important one in this paper. Therefore, we state it as a definition. Among many (more important) things, it axiomatises ‘cooking with vegetables’.

A strict monoidal category is a category for which:

objects come with monoid structure (∣C∣,⊗,I)(|{\bf C}|,\otimes,{\rm I}) i.e, for all A,B,C∈∣C∣A,B,C\in|{\bf C}|,

for all objects A,B,C,D∈∣C∣A,B,C,D\in|{\bf C}| there exists an operation

which is associative and has 1I1_{\rm I} as its unit, that is, Note that this operation on morphisms is a typed variant of the notion of monoid.

for all morphisms f,g,h,kf,g,h,k with matching types we have

for all objects A,B∈∣C∣A,B\in|{\bf C}| we have

As we will see in Section 5.1, the two equational constraints eq.(4) and eq.(5) can be conceived as a single principle.

The symbol ⊗\otimes is sometimes called the tensor. We will also use this terminology, since ‘tensor’ is shorter than ‘monoidal product’. However, the reader should not deduce from this that the above definition necessitates ⊗\otimes to be anything like a tensor product, since this is not at all the case.

The categories of systems and processes discussed in Section 1.3 are all examples of strict monoidal categories. We already explained in Section 0 what −⊗−-\otimes- stands for: it enables dealing with situations where several systems are involved. To a certain extent −⊗−-\otimes- can be interpreted as a logical conjunction:

There is however considerable care required with this view: while

This is where the so-called linear logic Girard; Seely kicks in, which is discussed in substantial detail in AbramskyT.

since it is the unit for the monoid. Hence, it refers to a system which leaves any system invariant when adjoined to it. In short, it stands for ‘unspecified’, for ‘no system’, or even for ‘nothing’. We already made reference to it in Example 9 when discussing preparation procedures. Similarly, 1I1_{\rm I} is the operation which ‘does nothing to nothing’. The system I{\rm I} will allow us to encode a notion of state within arbitrary monoidal categories, and also a notion of number and probabilistic weight — see Example 27 below.

Now, a monoid (M,∙,1)(M,\bullet,1) can also be conceived as a strict monoidal category in which all morphisms are identities. Indeed, take MM to be the objects, ∙\bullet to be the tensor and 11 to be the unit for the tensor. By taking identities to be the only morphisms, we can equip these with the same monoid structure as the monoid structure on the objects. Hence it satisfies eq.(5). By

5 Categories in physics

In the previous section, we saw how groups and partial orders, both of massive importance for physics, are themselves abstract categorical structures.

While there is no need to argue for the importance of group theory to physics here, it is worth mentioning that John Slater (cf. Slater determinant in quantum chemistry) referred to Weyl, Wigner and others’ use of group theory in quantum physics as der Gruppenpest, what translates as the ‘plague of groups’. Even in 1975 he wrote: As soon as [my] paper became known, it was obvious that a great many other physicists were as disgusted as I had been with the group-theoretical approach to the problem. As I heard later, there were remarks made such as ‘Slater has slain the Gruppenpest’. I believe that no other piece of work I have done was so universally popular.” Similarly, we may wonder whether it are the category theoreticians or their opponents which are the true aliens.

Partial orders model spatio-temporal causal structure Penrose72; Sorkin91. Roughly speaking, if a≤ba\leq b then events aa and bb are causally related, if a<ba<b then they are time-like separated, and if aa and bb don’t compare then they are space-like separated. This theme is discussed in great detail in MartinPanangaden.

The degree of bipartite quantum entanglement gives rise to a preorder on bipartite quantum states Nielsen. The relevant preorder is Muirheads’ majorization order Muirhead. However, multipartite quantum entanglement and mixed state quantum entanglement are not well understood yet. We strongly believe that category theory provides the key to the solution, in the following sense:

We also acknowledge the use of category theory in several involved subjects in mathematical physics ranging from topological quantum field theories (TQFTs) to proposals for a theory of quantum gravity; here the motivation to use category theory is of a mathematical nature. We discuss one such topic, namely TQFT, in Section 5.5.

But the particular perspective which we would like to promote here is categories as physical theories. Above we discussed three kinds of categories:

Concrete categories have mathematical structures as objects, and structure preserving maps between these as morphisms.

Real world categories have some notion of system as objects, and corresponding processes thereoff as morphisms.

Abstract categorical structures are mathematical structures in their own right; they are defined in terms of additional structure and/or certain properties.

The real world categories constitute the area of our focus (e.g. quantum physics, proof theory, computation, organic chemistry, …), the concrete categories constitute the formal mathematical models for these (e.g., in the case of quantum physics, Hilbert spaces as objects, certain types of linear maps as morphisms, and the tensor product as the monoidal structure), while the abstract categorical structures constitute axiomatisations of these.

The latter is the obvious place to start when one is interested in comparing theories. We can study which axioms and/or structural properties give rise to certain physical phenomena, for example, which tensor structures give rise to teleportation (e.g. AC2004), or to non-local quantum-like behavior BES. Or, we can study which structural features distinguish classical from quantum theories (e.g. CPav2006; CPP2008).

Quantum theory is subject to the so-called No-Cloning, No-Deleting and No-Broadcasting theorems Broadcast; Pati; WZ, which impose key constraints on our capabilities to process quantum states. Expressing these clearly requires a formalism that allows to vary types from a single to multiple systems, as well as one which explicitly accommodates processes (cf. copying/deleting process). Monoidal categories provide the appropriate mathematical arena for this on-the-nose.

Why does a tiger have stripes and a lion doesn’t? One might expect that the explanation is written within the fundamental building blocks which these animals are made up from, so one could take a big knife and open the lion’s and the tiger’s bellies. One finds intestines, but these are the same for both animals. So maybe the answer is hidden in even smaller constituents. With a tiny knife we keep cutting and identify a smaller kind of building block, namely the cell. Again, there is no obvious difference between tigers and lions at this level. So we need to go even smaller. After a century of advancing ‘small knife technology’ we discover DNA and this constituent truly reveals the difference. So yes, now we know why tigers have stripes and lions don’t! Do we really? No, of course not. Following in the footsteps of Charles Darwin, your favorite nature channel would tell you that the explanation is given by a process of type

which represents the successful challenge of a predator, operating within some environment, on some prey. Key to the success of such a challenge is the predator’s camouflage. Sandy savanna is the lion’s habitat while forests constitute the tiger’s habitat, so their respective coat blends them within their natural habitat. Any (neo-)Darwinist biologist will tell you that the fact that this is encoded in the animal’s DNA is not a cause, but rather a consequence, via the process of natural selection.

This example illustrates how monoidal categories enable to shift the focus from an atomistic or reductionist attitude to one where systems are studied in terms of their interactions with other systems, rather than in terms of their constituents. Clearly, in recent history, physics has solely focused on chopping down things into smaller things. Focussing on interactions might provide us with a complementary understanding of the fundamental theories of nature.

6 Structure preserving maps for categories

The notion of structure preserving map between categories — which we referred to in Example 6 — wasn’t made explicit yet. These ‘maps which preserve categorical structure’, the so-called functors, must preserve the structure of a category, that is, composition and identities. An example of a functor that might be known to the reader because of its applications in physics, is the linear representation of a group. A representation of a group GG on a vector space VV is a group homomorphism from GG to \mboxGL(V)\mbox{GL}(V), the general linear group on VV, i.e., a map ρ:G→\mboxGL(V)\rho:G\rightarrow\mbox{GL}(V) such that

Secondly, we need to specify to which linear map in

is mapped. This defines a map from a hom-set to a hom-set, namely

The fact that ρ\rho is a group homomorphism implies in our category-theoretic context that RρR_{\rho} preserves composition of morphisms as well as identities, that is, RρR_{\rho} preserves the categorical structure.

Having this example in mind, we infer that a functor must consist not of a single but of two kinds of mappings: one map on the objects, and a family of maps on the hom-sets which preserve identities and composition.

Let C{\bf C} and D{\bf D} be categories. A functor

which preserves identities and composition, i.e.,

for any f∈C(A,B)f\in{\bf C}(A,B) and g∈C(B,C)g\in{\bf C}(B,C) we have

Typically one drops the parentheses unless they are necessary. For instance, F(A)F(A) and F(f)F(f) will be denoted simply as FAFA and FfFf.

Consider the category PhysProc{\bf PhysProc} of Example 7 and a concrete category Mod{\bf Mod} in which we wish to model these mathematically by assigning to each process a morphism in the concrete category Mod{\bf Mod}. Functoriality of

means that sequential composition of physical processes is mapped on composition of morphisms in Mod{\bf Mod}, and that void processes are mapped on the identity morphisms. From this, we see that functoriality is an obvious requirement when designing mathematical models for physical processes.

matrix composition, and identity matrices.

This example is closely related to Example 2. However, it strongly emphasizes that objects are but labels with no internal structure. Strictly speaking this is not a concrete category in the sense of Section 1.2. However, for all practical purposes, it can serve as well as a model as any other concrete category. Therefore, we can relax our conception of concrete categories to accommodate such models.

We now introduce the concept of duality which we already hinted at above. Simply put, it means reversal of the arrows in a given category C{\bf C}. We illustrate this notion in term of an example. Transposition of matrices, just like a functor, is a mapping on both objects and morphisms which:

reverses the direction of the morphisms since when the matrix MM has type n\rTomn\rTo m, then the matrix MTM^{T} has type m\rTonm\rTo n, and

preserves the composition ‘up to this reversal of the arrows’, i.e. for any pair of matrices NN and MM for which types match we have

So transposition is a functor up to reversal of the arrows.

A contravariant functor F:C→DF:{\bf C}\rightarrow{\bf D} consists of the same data as a functor, it also preserves identities, but reverses composition that is:

In contrast to contravariant functors, ordinary functors are often referred to as covariant functors.

The opposite category C\mboxop{\bf C}^{\scriptsize\mbox{op}} of a category C{\bf C} is the category with

in which morphisms are ‘reversed’, that is,

where to avoid confusion from now on we denote f∈C\mboxop(B,A)f\in{\bf C}^{\scriptsize\mbox{op}}(B,A) by f\mboxopf^{\scriptsize\mbox{op}},

identities in C\mboxop{\bf C}^{\scriptsize\mbox{op}} are those of C{\bf C}, and

Contravariant functors of type C→D{\bf C}\rightarrow{\bf D} can now be defined as functors of type C\mboxop→D{\bf C}^{\scriptsize\mbox{op}}\rightarrow{\bf D}. Of course, the operation (−)\mboxop(-)^{\scriptsize\mbox{op}} on categories is involutive: reversing the arrows twice is the same as doing nothing. The process of reversing the arrow is sometimes indicated by the prefix ‘co’, indicating that the defining equations for those structures are the same as the defining equations for the original structure, but with arrows reversed.

The transpose is the involutive contravariant functor

which maps each vector space on the corresponding dual vector space, and which maps each linear map ff on its transpose fTf^{T}.

Let FdHilb{\bf FdHilb} be the category with finite dimensional Hilbert spaces as objects and with linear maps as morphisms. Of course, one could define other categories with Hilbert spaces as objects, for example, the groupoid FdUnit{\bf FdUnit} of Example 13. But as we will see below in Section 2.3, the category FdHilb{\bf FdHilb} as defined here comes with enough extra structure to extract all unitary maps from it. Hence, FdHilb{\bf FdHilb} subsumes FdUnit{\bf FdUnit}. This extra structure comes as a functor, whose action is taking the adjoint or hermitian transpose. This is the contravariant functor

and assigns morphisms to their adjoints, that is,

Since for f∈FdHilb(H,K)f\in{\bf FdHilb}({\cal H},{\cal K}) and g∈FdHilb(K,L)g\in{\bf FdHilb}({\cal K},{\cal L}) we have:

we indeed obtain an identity-on-object contravariant functor. This functor is moreover involutive, that is, for all morphisms ff we have

While the morphisms of FdHilb{\bf FdHilb} do not reflect the inner-product structure, the latter is required to specify the adjoint. In turn, this adjoint will allow us to recover the inner-product in purely category-theoretic terms, as we shall see in Section 2.3.

Define the category FunctC,D{\bf Funct}_{{\bf C},{\bf D}} with

all functors from C{\bf C} to D{\bf D} as objects,

natural transformations between these as morphisms (cf. Section 5.2), and,

composition of natural transformations and corresponding identities.

The defining equations of strict monoidal categories, that is,

to which we from now on refer as bifunctoriality, is nothing but functoriality of a certain functor. We will discuss this in detail in Section 5.1.

A concrete category, or even better, a Set{\bf Set}-concrete category, is a category C{\bf C} together with a functor U:C⟶SetU:{\bf C}\longrightarrow{\bf Set}. The way in which we construct this functor for categories with mathematical structures as objects is by sending each object to the underlying set, and morphisms to the underlying functions. So we forget the extra structure the object has. Therefore the functor UU is typically called forgetful. For example, the category Grp{\bf Grp} is a concrete category for the functor

which ‘forgets’ the group’s multiplication and unit, and morphisms are mapped on their underlying functions. More generally, a D{\bf D}-concrete category is a category C{\bf C} with a functor U:C⟶DU:{\bf C}\longrightarrow{\bf D}.

The TQFTs of Section 5.5 are special kinds of functors.

The 2D case: Muscle power

We now genuinely start to study the interaction of the parallel and the sequential modes of composing systems, and operations thereon.

The starting point of this Section is the notion of a strict monoidal category as given in Definition 4. Such categories enable us to give formal meaning to physical processes which involve several types, e.g. classical and quantum as the following example clearly demonstrates.

Define CQOpp{\bf CQOpp} to be the strict monoidal category containing both classical and quantum systems, with operations thereon as morphisms, and with the obvious notion of monoidal tensor, that is, a physical analogue of the tensor for vegetables that we saw in the prologue. Concretely, by A⊗BA\otimes B we mean that we have both AA and BB available to operate on. Note in particular that at this stage of the discussion there are no Hilbert spaces involved, so ⊗\otimes cannot stand for the tensor product, but this does not exclude that we may want to model it by the tensor product at a later stage. In this category, non-destructive (projective) measurements have type

where QQ is a quantum system and XX is the classical data produced by the measurement. Obviously, the hom-sets

have a very different structure since CQOpp(Q,Q){\bf CQOpp}(Q,Q) stands for the operations we can perform on a quantum system while CQOpp(X,X){\bf CQOpp}(X,X) stands for the classical operations (e.g. classical computations) which we can perform on classical systems. But all of these now live within a single mathematical entity CQOpp{\bf CQOpp}.

The structure of a strict monoidal category does not yet capture certain important properties of cooking with vegetables. Denote the strict monoidal category constructed in the Prologue by Cook{\bf Cook}.

Clearly ‘boil the potato while fry the carrot’ is very much the same thing as ‘fry the carrot while boil the potato’. But we cannot just bluntly say that in the category Cook{\bf Cook} the equality

holds. By plain set theory, for this equality to be meaningful, the two morphisms h⊗fh\otimes f and f⊗hf\otimes h need to live in the same set. That is, respecting the structure of a category, within the same hom-set. So

need to have the same type, which implies that

must hold. But this completely blurs the distinction between a carrot and a potato. For example, we cannot distinguish anymore between ‘boil the potato while fry the carrot’, which we denoted by

and ‘fry the potato while boil the carrot’, which given eqs.(7), we can write as

So we basically threw out the child with the bath water.

The solution to this problem is to introduce an operation

which swaps the role of the potato and the carrot relative to the monoidal tensor. The fact that ‘boil the potato while fry the carrot’ is essentially the same thing as ‘fry the carrot while boil the potato’ can now be expressed as

In our ‘real world example’ of cooking this operation can be interpreted as physically swapping the vegetables C2005d. An equational law governing ‘swapping’ is:

A strict symmetric monoidal category is a strict monoidal category C{\bf C} which moreover comes with a family of isomorphisms

called symmetries, and which are such that:

for all A,B∈∣C∣A,B\in|{\bf C}| we have σA,B−1=σB,A\sigma_{A,B}^{-1}=\sigma_{B,A}, and

for all A,B,C,D∈∣C∣A,B,C,D\in|{\bf C}| and all f,gf,g of appropriate type we have

All Examples of Section 1.3 are strict symmetric monoidal categories for the obvious notion of symmetry in terms of ‘swapping’.

We can rewrite eq.(8) in a form which makes the types explicit:

This representation is referred to as commutative diagrams.

Indeed, relying on bifunctoriality we have:

The reader can easily verify that, given a connective −⊗−-\otimes- defined both on objects and morphisms as in items 1 & 2 of Definition 4, the four equations

when varying over all objects A,B,C,D∈∣C∣A,B,C,D\in|{\bf C}| and all morphisms ff and gg of appropriate type, are equivalent to the single equation

when varying over f,g,h,kf,g,h,k. Eqs.(12,13) together with

is usually referred to as −⊗−-\otimes- being functorial in both arguments. They are indeed equivalent to the mappings on objects and morphisms

both being functors, for all objects A,B∈∣C∣A,B\in|{\bf C}| — their action on objects is

Hence, functoriality in both arguments is strictly weaker than bifunctoriality (cf. Example 23), since the latter also requires eqs(11).

2 Graphical calculus for symmetric monoidal categories

The most attractive, and at the same time, also the most powerful feature of strict symmetric monoidal categories, is that they admit a purely diagrammatic calculus. Such a graphical language is subject to the following characteristics:

The symbolic ingredients in the definition of strict symmetric monoidal structure, e.g. ⊗\otimes, ∘\circ, AA, I{\rm I}, ff etc., or any other abstract categorical structure which refines it, all have a purely diagrammatic counterpart ;

The corresponding axioms become very intuitive graphical manipulations ;

And crucially, an equational statement is derivable in the graphical language if and only if it is symbolically derivable from the axioms of the theory.

For a more formal presentation of what we precisely mean by a graphical calculus we refer the reader to Peter Selinger’s marvelous paper Selinger in these volumes.

These diagrammatic calculi trace back to Penrose’s work in the early 1970s, and have been given rigorous formal treatments in FY; JS; JSV; SelingerPre. Some examples of possible elaborations and corresponding applications of the graphical language presented in this paper are in CP2006; CPP2008; CoeckeDuncan; Lauda; Selinger; StreetBook; Vicary; YetterBook.

The graphical counterparts to the axioms are typically much simpler then their formal counterparts. For example, in the Prologue we mentioned that bifunctoriality becomes a tautology in this context. Therefore such a graphical language radically simplifies algebraic manipulations, and in many cases trivialises something very complicated. Also the physical interpretation of the axioms, something which is dear to the authors of this paper, becomes very direct.

The graphical counterparts to strict symmetric monoidal structure are:

The identity 1I1_{\rm I} is the empty picture (= it is not depicted).

The identity 1A1_{A} for and object AA different of I{\rm I} is depicted as

The composition of morphisms f:A\rToBf:A\rTo B and g:B\rToCg:B\rTo C is depicted by locating gg above ff and by connecting the output of ff to the input of gg, i.e.

The tensor product of morphisms f:A\rToBf:A\rTo B and g:C\rToDg:C\rTo D is depicted by aligning the graphical representation of ff and gg side by side in the order they occur within the expression f⊗gf\otimes g, i.e.

The diamond shape of the morphisms of type I\rToI{\rm I}\rTo{\rm I} indicates that they arise when composing two triangles:

In the category QuantOpp{\bf QuantOpp} the triangles of respective types I\rToA{\rm I}\rTo A and A\rToIA\rTo{\rm I} represent states and effects, and the diamonds of type I\rToI{\rm I}\rTo{\rm I} can be interpreted as probabilistic weights: they give the likeliness of a certain effect to occur when the system is in a certain state. In the usual quantum formalism these values are obtained when computing the Born rule or Luders’ rule. In appropriate categories, we find these exact values back as one of these diamonds, by composing a state and an effect deLL; Selinger.

established in Proposition 2 is depicted as:

In words: we can ‘slide’ boxes along their wires.

The first defining equation of symmetry, i.e. eq.(9), depicts as:

i.e., we can still ‘slide’ boxes along crossings of wires. The equation

which when varying A,B∈∣C∣A,B\in|{\bf C}| states that

Suppose now that for any three arbitrary morphisms

in any strict symmetric monoidal category, one intends to prove that

always holds. Then, the typical textbook proof proceeds by diagram chasing:

One needs to read this ‘dragon’ as follows. The two outer paths both going from the left-upper-corner to the right-lower-corner represent the two sides of the equality we want to prove. Then, we do what category-theoreticians call diagram chasing, that is, ‘pasting’ together several commutative diagrams, which connect one of the outer paths to the other. For example, the triangle at the top of the diagram expresses that

that is, an instance of bifunctoriality. Using properties of strict symmetric monoidal categories, namely bifunctoriality and eq.(9) expressed as commutative diagrams, we can pass from the outer path at the top and the right to the outer path on the left and the bottom. This is clearly a very tedious task and getting these diagrams into LaTeX becomes a time-consuming activity.

On the other hand, when using the graphical calculus, one immediately sees that

must hold. We pass from one picture to the other by sliding the boxes along wires and then by rearranging these wires. In terms of the underlying equations of strict symmetric monoidal structure, ‘sliding the boxes along wires’ uses eq.(9) and eq.(15), while ‘rearranging these wires’ means that we used eq.(9) as follows:

Indeed, since symmetry is a morphism it can be conceived as a box, and hence we can ‘slide it along wires’.

In a broader historical perspective, we are somewhat unfair here. Writing equational reasoning down in terms of these commutative diagrams rather than long lists of equalities was an important step towards a better geometrical understanding of the structure of proofs.

3 Extended Dirac notation

A strict dagger monoidal category C{\bf C} is a strict monoidal category equipped with an involutive identity-on-objects contravariant functor

A†=AA^{\dagger}=A for all A∈∣C∣A\in|{\bf C}|, and

f††=ff^{\dagger\dagger}=f for all morphisms ff,

and this functor preserves the tensor, that is,

We will refer to B\rTof†AB\rTo^{f^{\dagger}}A as the adjoint to A\rTofBA\rTo^{f}B. A strict dagger symmetric monoidal category C{\bf C} is both a strict dagger monoidal category and a strict symmetric monoidal category such that

AC2004 A morphism U:A\rToBU:A\rTo B in a strict dagger monoidal category C{\bf C} is called unitary if its inverse and its adjoint coincide, that is, if

Let ψ,ϕ:I\rToA\psi,\phi:{\rm I}\rTo A be ‘elements’ in C{\bf C}. Their inner-product is the ‘scalar’

So in any strict monoidal category we refer to morphisms of type

as elements (cf. Example 4), to those of type

as scalars. As already discussed in Example 27 in the category QuantOpp{\bf QuantOpp} these corresponds respectively to states, effects and probabilistic weights.

Even at this abstract level, many familiar things follow from Definition 10. For example, we recover the defining property of adjoints for any dagger functor:

From this it follows that unitary morphisms preserve the inner-product:

Importantly, the graphical calculus of the previous section extends to strict dagger symmetric monoidal categories. Following Selinger Selinger, we introduce an asymmetry in the graphical notation of the morphisms A\rTofBA\rTo{f}B as follows:

Then we depict the adjoint B\rTof†AB\rTo{f^{\dagger}}A of A\rTofBA\rTo{f}B as follows:

that is, we turn the box representing ff upside-down. All this enables interpreting Dirac notation Dirac in terms of strict dagger symmetric monoidal categories, and in particular, in terms of the corresponding graphical calculus:

The latter notation merely requires closing the bra’s and ket’s and performing a 90∘90^{\circ} rotation. This 90∘90^{\circ} rotation is merely a consequence of our convention to read pictures from bottom-to-top. Other authors obey different conventions e.g. top-to-bottom or left-to-right. Summarising we now have:

In particular, note that in the language of strict dagger symmetric monoidal categories both a bra-ket and a ket-bra are compositions of morphisms, namely ϕ†∘ψ\phi^{\dagger}\circ\psi and ψ∘ϕ†\psi\circ\phi^{\dagger} respectively. What the diagrammatic calculus adds to standard Dirac notation is a second dimension to accommodate the monoidal composition:

The advantages of this have already been made clear in the previous section and will even become clearer in Section 3.1.

since by linearity the image of 11 fully specifies this map.

However, by making explicit reference to FdHilb{\bf FdHilb} and hence also by having matrices (morphisms in FdHilb{\bf FdHilb} expressed relative to some bases) in the above table, we are actually cheating. The fact that Hilbert spaces and linear maps are set-theoretic based mathematical structures has non-trivial ‘unpleasant’ implications. In particular, while the ⊗\otimes-notation for the monoidal structure of strict monoidal categories insinuates that the tensor product would turn FdHilb{\bf FdHilb} into a strict symmetric monoidal category, this turns out not to be true in the ‘strict’ sense of the word true.

4 The set-theoretic verdict on strictness

As outlined in Section 1.5, we ‘model’ real world categories in terms of concrete categories. While the real world categories are indeed strict monoidal categories, their corresponding models typically aren’t.

What goes wrong is the following: for set-theory based mathematical structures such as groups, topological spaces, partial orders and vector spaces, neither

hold. This is due to the fact that for the underlying sets X,Y,ZX,Y,Z we have that

hold. We do have something very closely related to this, namely

That is, we have isomorphisms rather than strict equations. But these isomorphisms are not just ordinary isomorphisms but so-called natural isomorphisms. They are an instance of the more general natural transformations which we will discuss in Section 5.2. Naturality is one of the most important concepts of formal category theory. In fact, in the founding paper EilenbergMacLane Eilenberg and MacLane argue that their main motivation for introducing the notion of a category is to introduce the notion of a functor, and that their main motivation for introducing the notion of a functor is to introduce the notion of a natural transformation. Meanwhile we introduce a restricted version of this general notion of natural transformation, one which comes with a clear interpretation.

Consider a category C{\bf C} that comes with an operation on objects

and with for all objects A,B,C,D∈∣C∣A,B,C,D\in|{\bf C}| we also have an operation on hom-sets

be two well-formed expressions built from:

and constants C1,…,Cm∈∣C∣C_{1},\ldots,C_{m}\in|{\bf C}|.

Then a natural transformation is a family

of morphisms which are such that for all objects A1,…,An,B1,…,Bn∈∣C∣A_{1},\ldots,A_{n},B_{1},\ldots,B_{n}\in|{\bf C}| and all morphisms A1\rTof1B1 , …, An\rTofnBnA_{1}\rTo^{f_{1}}B_{1}\,,\,\ldots,\,A_{n}\rTo^{f_{n}}B_{n} we have:

A natural transformation is a natural isomorphism if, in addition, all these morphisms ξA1,… ⁣,An\xi_{A_{1},\ldots\!,A_{n}} are isomorphisms in the sense of Definition 2.

Examples of such well-formed expressions are

and the corresponding constraint on the morphims is

If diagram (20) commutes for all A,B,C,A′,B′,C′,f,g,hA,B,C,A^{\prime},B^{\prime},C^{\prime},f,g,h and the morphisms

are all isomorphisms, then this natural isomorphism is called associativity. Its name refers to the fact that this natural isomorphism embodies a weaker form of the strict associative law A⊗(B⊗C)=(A⊗B)⊗CA\otimes(B\otimes C)=(A\otimes B)\otimes C. A better name would actually be re-bracketing, since that is what it truly does: it is a morphism —which we like to think of as a process— which transforms type A⊗(B⊗C)A\otimes(B\otimes C) into type (A⊗B)⊗C(A\otimes B)\otimes C. In other words, it provides a formal witness to the actual processes of re-bracketing a mathematical expression. The naturality condition in diagram (20) formally states that re-bracketing commutes with any triple of operations f,g,hf,g,h we apply to the systems, and hence it tells us that the process of re-bracketing does not interfere with any non-trivial processes f,g,hf,g,h — almost as if it wasn’t there.

Other important pairs of well-formed formal expressions are

and, if I{\rm I} is taken to be the constant object, the corresponding naturality constraint is

The natural isomorphisms λ\lambda and ρ\rho in diagrams (21) are called left- and right unit. In this case, a better name would have been left- and right introduction since they correspond to the process of introducing a new object relative to an existing one.

We encountered a fourth important example in Definition 8, namely

for which diagram (9) is the naturality condition. The isomorphism σ\sigma is called symmetry but a better name could have been exchange or swapping.

The category Set{\bf Set} has associativity, left- and right unit, and symmetry natural isomorphisms relative to the Cartesian product, with the singleton set {∗}\{*\} as the monoidal unit. Explicitly, setting

for f:X→Yf:X\to Y and f′:X′→Y′f^{\prime}:X^{\prime}\to Y^{\prime}, these natural isomorphisms are

The reader can easily verify that diagrams (9), (20) and (21) all commute. Showing that bifunctoriality holds is somewhat more tedious.

A monoidal category consists of the following data:

a bifunctor −⊗−-\otimes-, that is, an operation both on objects and on morphisms as in prescriptions (18) and (19) above, which moreover satisfies

for all A,B∈∣C∣A,B\in|{\bf C}| and all morphisms f,g,h,kf,g,h,k of appropriate type , and

hence satisfying eq.(20) and eq.(21), and such that the Mac Lane pentagon

commutes for all A,B,C,D∈∣C∣A,B,C,D\in|{\bf C}|, that also

commutes for all A,B∈∣C∣A,B\in|{\bf C}|, and that

A monoidal category is moreover symmetric if there is a fourth natural isomorphism

commutes for all A∈∣C∣A\in|{\bf C}|, and that

The set-theoretic verdict on strictness is very hard! The punishment is grave: a definition which stretches over two pages, since we need to carry along associativity and unit natural isomorphisms, which, on top of that, are subject to a formal overdose of coherence conditions, that is, eqs.(22,23,24,25,27). They embody rules which should be obeyed when natural ismorphisms interact with each other, in addition to the naturality conditions which state how natural isomorphisms interact with other morphisms in the category. For example, eq.(26) tells us that if we introduce I{\rm I} on the left of AA, and then swap I{\rm I} and AA, that this should be the same as introducing I{\rm I} on the right of AA. Eq.(26) tells us that the two ways of re-bracketing the four variable expressions involved should be the same.

The idea behind coherence conditions is as follows: if for formal expressions Λ(A1,\mbox…,An,C1,\mbox…,Cm)\Lambda(A_{1},\mbox{\scriptsize\ldots},A_{n},C_{1},\mbox{\scriptsize\ldots},C_{m}) and Ξ(A1,\mbox…,An,C1,\mbox…,Cm)\Xi(A_{1},\mbox{\scriptsize\ldots},A_{n},C_{1},\mbox{\scriptsize\ldots},C_{m}) there are two morphisms

which are obtained by composing the natural isomorphisms α\alpha, σ\sigma, λ\lambda, ρ\rho and 11 both with −⊗−-\otimes- and −∘−-\circ-, then f=gf=g – identities are indeed natural isomorphisms, for the formal expressions Λ(A)=Ξ(A)=A\Lambda(A)=\Xi(A)=A. That eqs.(22,23,24,25,27) suffice for this purpose is in itself remarkable. This is a the consequence of MacLane’s highly non-trivial coherence theorem for symmetric monoidal categories SML, which states that from this set of equations we can derive any other one.

If it wasn’t for this theorem, things could have been even worse, potentially involving equations with an unbounded number of symbols.

Any monoidal category C{\bf C} is categorically equivalent, via a pair of strong monoidal functors G:C⟶DG:{\bf C}\longrightarrow{\bf D} and F:D⟶CF:{\bf D}\longrightarrow{\bf C}, to a strict monoidal category D{\bf D}.

The definitions of categorical equivalence and strong monoidal functor can be found below in Section 5.3. In words, what this means is that for practical purposes, arbitrary monoidal categories behave the same as strict monoidal categories. In particular, the connection between diagrammatic reasoning (incl. Dirac notation) and axiomatic reasoning for strict monoidal categories extends to arbitrary monoidal categories. The essence of the above theorem is that the unit and associativity isomorphims are so well-behaved that they don’t affect this correspondence. In the graphical calculus, the associativity natural isomorphisms becomes implicit when we write

The absence of any brackets means that we can interpret this picture either as

That is, it does not matter whether in first order we want to associate ff with gg, and then in second order this pair as a whole with hh, or whether in first order we want to associate gg with hh, and then in second order this pair as a whole with ff.

So things turn out not to be as bad as they looked at first sight!

The category Set{\bf Set} admits two important symmetric monoidal structures. We discussed the Cartesian product in Example 28. The other one is the disjoint union. Given two sets XX and YY their disjoint union is the set

This set can be thought of as the set of all elements both of XX and YY, but where the elements of XX are “coloured” with 1 while those of YY are “coloured” with 2. This guarantees that, when the same element occurs both in XX and YY, it is twice accounted for in X+YX+Y since the “colours” 1 and 2 recall whether the elements in X+YX+Y either originated in XX or in YY. As a consequence, the intersection of {(x,1) ∣ x∈X}\{(x,1)\ |\ x\in X\} and {(y,2) ∣ y∈Y}\{(y,2)\ |\ y\in Y\} is empty, hence the name ‘disjoint’ union.

For the disjoint union, we take the empty set ∅\emptyset as the monoidal unit and set

for f:X→Yf:X\to Y and f′:X′→Y′f^{\prime}:X^{\prime}\to Y^{\prime}. The natural isomorphisms of the symmetric monoidal structure are

One again easily verifies that diagrams (20), (21) and (9) all commute. Showing that bifunctoriality holds is again somewhat more tedious.

Note that the inverse to λV\lambda_{V} is

On the other hand, the monoidal unit for the direct sum is the 00-dimensional vector space. Hence this monoidal structure only admits a single ‘scalar’. The following subsection discusses scalars in more detail.

A dagger monoidal category C{\bf C} is a monoidal category which comes with an identity-on-objects contravariant involutive functor

satisfying eq.(17), and for which all unit and associativity natural isomorphisms are unitary. A dagger symmetric monoidal category C{\bf C} is both a dagger monoidal category and a symmetric monoidal category, in which the symmetry natural isomorphism is also unitary.

The category FdHilb{\bf FdHilb} admits two dagger symmetric monoidal structures, respectively provided by the tensor product and by the direct sum. In both cases, the adjoint of Example 21 is the dagger functor.

As we will see in great detail in Sections 3.2 and 4.4, the category Rel{\bf Rel} which has sets as objects and relations as morphisms also admits two symmetric monoidal structures, just like Set{\bf Set}: these are again the Cartesian product and the disjoint union. Moreover, Rel{\bf Rel} is dagger symmetric monoidal relative to both monoidal structures with the relational converse as the dagger functor. This is a first very important difference between Rel{\bf Rel} and Set{\bf Set}, since the latter does not admit a dagger functor for either of the monoidal structures we identified on it.

The category 2Cob{\bf 2Cob} has 1-dimensional closed manifolds as objects, and 2-dimensional cobordisms between these as morphisms, it is dagger symmetric monoidal with the disjoint union of manifolds as its monoidal product and with the reversal of cobordisms as the dagger. This category will be discussed in great detail in Section 3.3.

Of course, in FdHilb{\bf FdHilb} the tensor product ⊗\otimes and the direct sum ⊕\oplus are very different monoidal structures as exemplified by the particular role each of these plays within quantum theory. In particular, as pointed out by Schrödinger in the 1930’s Schrodinger, the tensor product description of compound quantum systems is what makes quantum physics so different from classical physics. We will refer to monoidal structures which are somewhat like ⊗\otimes in FdHilb{\bf FdHilb} as quantum-like, and to those that are rather like ⊕\oplus in FdHilb{\bf FdHilb} as classical-like. As we will see below, the quantum-like tensors allow for correlations between subsystems, so the joint state can in general not be decomposed into states of the individual subsystems. In contrast, the classical-like tensors can only describe ‘separated’ systems, that is, the state of a joint system can always be faithfully represented by states of the individual subsystems.

The tensors considered in this paper have the following nature:

While ×\times behaves ‘classical-like’ in Set{\bf Set}, it behaves ‘quantum-like’ in Rel{\bf Rel}, and this despite the fact that Rel{\bf Rel} contains Set{\bf Set} as a subcategory with the same objects as Rel{\bf Rel}, and which inherits its monoidal structures from Rel{\bf Rel}.

There is a remarkable parallel between the role that the pair (⊕,⊗)(\oplus,\otimes) plays for FdHilb{\bf FdHilb} and the role that the pair (+,×)(+,\times) plays for Rel{\bf Rel}.

In nCob{\bf nCob} the direct sum even becomes ‘quantum-like’ — a point which has been strongly emphasized for a while by John Baez B2004.

All of this clearly indicates that being either quantum-like and classical-like is something that involves not just the objects, but also the tensor and the morphism structure.

Sections 3 and 4 provide a detailed discussion of these two very distinct kinds of monoidal structures, which will shed more light on the above table.

5 Scalar valuation and multiples

The following is a fascinating fact discovered by Kelly and Laplaza in KellyLaplaza: even for “non-symmetric” monoidal categories, the scalar monoid is always commutative. The proof is given by the following commutative diagram:

Equality of the two outer paths both going from the left-lower-corner to the right-upper-corner boils down to equality between:

the outer left/upper path which consists of t∘st\circ s, and the composite of isomorphism I≃I⊗I{\rm I}\simeq{\rm I}\otimes{\rm I} with its inverse, so nothing but 1I1_{\rm I}, giving all together t∘st\circ s, and

the outer lower/right path, giving all together s∘ts\circ t.

Their equality relies on bifunctoriality (cf. middle two rectangles) and naturality of the left- and right-unit isomorphisms (cf. the four squares).

Diagrammatically commutativity is subsumed by the fact that scalars do not have wires, and hence can ‘move freely around in the picture’:

Thus, the scalar structure on (Set,×,{∗})({\bf Set},\times,\{*\}) is trivial. On the other hand, in Rel{\bf Rel} there are two relations of type {∗}→{∗}\{*\}\to\{*\}, the identity and the empty relation, so

So scalars and scalar multiples are more closely related to the ‘multiplicative’ tensor product structure than to the ‘additive’ direct sum structure. We also have

In general, it is the quantum-like monoidal structures which admit non-trivial scalar structure. This might come as a surprise to the reader, given that for vector spaces one typically associates these scalars with linear combinations of vectors, which are very much ‘additive’ in spirit.

The right half of commutative diagram (28) states that {diagram} We generalize this by defining scalar multiples of a morphism A\rTofBA\rTo{f}B as {diagram} These scalars satisfy the usual properties, namely

Diagrammatically these properties are again implicit and require ‘artificial’ brackets to be made explicit, for example, eq.(29) is hidden as:

Of course, we could still prove these properties with commutative diagrams. For eq.(29) the left-hand-side and the right-hand-side are respectively the top and the bottom path of the following diagram:

where we use the fact that t∘s=λI−1∘(s⊗t)∘ρIt\circ s=\lambda^{-1}_{\rm I}\circ(s\otimes t)\circ\rho_{\rm I}. The diamond on the left commutes by naturality of ρI\rho_{\rm I}. The top triangle commutes because both paths are equal to 1I⊗B1_{{\rm I}\otimes B} as λI=ρI\lambda_{\rm I}=\rho_{\rm I}. The bottom triangle commutes by eq.(15). Finally, the right diamond commutes by naturality of λI\lambda_{\rm I}.

Quantum-like tensors

So what makes ⊗\otimes so different from ⊕\oplus in the category FdHilb{\bf FdHilb}, what makes ×\times so different in the categories Rel{\bf Rel} and Set{\bf Set}, and what makes ×\times so similar in the category Rel{\bf Rel} to ⊗\otimes in the category FdHilb{\bf FdHilb}?

A compact (closed) category C{\bf C} is a symmetric monoidal category in which every object A∈∣C∣A\in|{\bf C}| comes with

which are such that the following two diagrams commute:

In the case that C{\bf C} is strict the above diagrams simplify to

Definition 13 can also be expressed diagrammatically, provided we introduce some new graphical elements:

As before AA will be represented by an upward arrow:

On the other hand, we depict A∗A^{*}, the dual object to AA, either by an upward arrow labelled by A∗A^{*}, or by a downward arrow labelled AA:

The unit ηA\eta_{A} and counit ϵA\epsilon_{A} are respectively depicted as

Commutation of the two diagrams now boils down to:

When expressed diagrammatically, these equational constraints admit the simple interpretation of ‘yanking a wire’. While at first sight compactness of a category as stated in Definition 13 seems to be a somewhat ad hoc notion, this graphical interpretation establishes it as a very canonical one which extends the graphical calculus for symmetric monoidal categories with cup- and cap-shaped wires. As the following lemma shows, the equational constraints imply that we are allowed to ‘slide’ morphisms also along these cups and caps.

Given a morphism f:A\rToBf:A\rTo B define its transpose to be

Diagrammatically, when depicting the morphism ff as

Anticipating what will follow, we abbreviate this notation for f∗f^{*} to

that is, we can ‘slide’ morphisms along cup- and cap-shaped wires.

The proof of the first equality simply is

The proof for the second equality proceeds analogously.

where {ei}i=1n\{e_{i}\}_{i=1}^{n} is a basis of VV and fj∈V∗f_{j}\in V^{*} is the linear functional such that fj(ei)=δi,jf_{j}(e_{i})=\delta_{i,j} for all 1≤i,j≤n1\leq i,j\leq n. Finally, we take the counit to be

We leave it to the reader to verify commutation of diagrams 31 and 32. Two important points need to be made here:

The linear maps ηV\eta_{V} and ϵV\epsilon_{V} do not depend on the choice of the basis {ei}i=1n\{e_{i}\}_{i=1}^{n}. It suffices to verify that there is a canonical isomorphism

which does not depend on the choice of basis. The unit ηV\eta_{V} is the image of 1V1_{V} under this isomorphism and since 1V1_{V} is independent of the choice of basis it follows that ηV\eta_{V} does not depend on any choice of basis. The argument for ϵV\epsilon_{V} proceeds analogously.

make diagrams (31) and (32) commute. Indeed, graphically we have:

The category Rel{\bf Rel} of sets and relations is also compact relative to the Cartesian product as we shall see in detail in Section 3.2.

The category QuantOpp\mathbf{QuantOpp} is compact. We can pick Bell-states as the units and the corresponding Bell-effects as counits. As shown in AC2004; C2005c, compactness is exactly what enables modeling protocols such as quantum teleportation:

where the trapezoid is assumed to be unitary and hence, its adjoint coincides with its inverse. The classical information flow is (implicitly) encoded in the fact that the same trapezoid appears in the left-hand-side picture both at Alice’s and Bob’s side.

Given a morphism f:A\rToBf:A\rTo B in a compact category, its name

Following AC2004 we can show that for f:A\rToBf:A\rTo B and g:B\rToCg:B\rTo C

always holds. The graphical proof is again trivial:

In contrast a (non-strict) symbolic proof goes as follows:

Both paths on the outside are equal to g∘fg\circ f. We want to show that the pentagon labelled ‘Result’ commutes. To do this we will ‘unfold’ arrows using equations which hold in compact categories in order to pass from the composite g∘fg\circ f at the left/bottom/right to λC−1∘(⌞f⌟⊗1C)∘(1A⊗⌜g⌝)∘ρA\lambda^{-1}_{C}\circ(\llcorner f\lrcorner\otimes 1_{C})\circ(1_{A}\otimes\ulcorner g\urcorner)\circ\rho_{A}. This will transform the tautology g∘f=g∘fg\circ f=g\circ f into commutation of the pentagon labelled ‘Result’. For instance, we use compactness to go from the identity arrow at the bottom of the diagram to the composite λB−1∘(ϵB⊗1B)∘(1B⊗ηB)∘ρB\lambda_{B}^{-1}\circ(\epsilon_{B}\otimes 1_{B})\circ(1_{B}\otimes\eta_{B})\circ\rho_{B}. The outer left and right trapezoids express naturality of ρ\rho and λ\lambda. The remaining triangles/diamonds express bifunctoriality and the definitions of name/coname.

A dagger compact category C{\bf C} is both a compact category and a dagger symmetric monoidal category, such that for all A∈∣C∣A\in|{\bf C}|, ϵA=ηA†∘σA,A∗\epsilon_{A}=\eta_{A}^{\dagger}\circ\sigma_{A,A^{*}}.

The category FdHilb{\bf FdHilb} is dagger compact.

2 The category of relations

We now turn our attention to the category Rel{\bf Rel} of sets and relations, a category which we briefly encountered in previous sections. Perhaps surprisingly, Rel{\bf Rel} possesses more ‘quantum features’ than the category Set{\bf Set} of sets and functions. In particular, just like FdHilb{\bf FdHilb} it is a dagger compact category.

A relation R:X→YR:X\rightarrow Y between two sets XX and YY is a subset of the set of all their ordered pairs, that is, R⊆X×YR\subseteq X\times Y. Thus, given an element (x,y)∈R(x,y)\in R, we say that x∈Xx\in X relates to y∈Yy\in Y, which we denote as xRyxRy. The set

is also referred to as the graph of the relation.

The monoidal category Rel{\bf Rel} is defined as follows:

The morphisms are all relations R:X→YR:X\rightarrow Y.

For R1:X→YR_{1}:X\rightarrow Y and R2:Y→ZR_{2}:Y\rightarrow Z the composite R2∘R1⊆X×ZR_{2}\circ R_{1}\subseteq X\times Z is

Composition is easily seen to be associative. For X∈∣Rel∣X\in|{\bf Rel}| we have

The monoidal product of two sets is their Cartesian product, the unit for the monoidal structure is any singleton, and for two relations R1:X1→Y1R_{1}:X_{1}\rightarrow Y_{1} and R2:X2→Y2R_{2}:X_{2}\to Y_{2} the monoidal product R1×R2⊆X1×X2→Y1×Y2R_{1}\times R_{2}\subseteq X_{1}\times X_{2}\to Y_{1}\times Y_{2} is

We mentioned before that Set{\bf Set} was contained in Rel{\bf Rel} as a ‘sub-monoidal category’. In Rel{\bf Rel}, the left- and right-unit natural isomorphisms respectively are

and the associativity natural isomorphism is

These relations are all single-valued, so they are also functions, and they are the same functions as the natural isomorphisms for the Cartesian product in Set{\bf Set}. Let us verify the coherence conditions for them:

Unfolding the definition of relational composition we obtain

which by the definition of α\alpha simplifies to

The bottom path yields the same result, hence making the pentagon commute. For the remaining diagrams we leave the details to the reader.

As ×\times is symmetric in Set{\bf Set} we also expect Rel{\bf Rel} to be symmetric monoidal. For any XX and Y∈∣Rel∣Y\in|{\bf Rel}|, the natural isomorphism

commute since both paths of the left triangle are equal to

while the paths of the right triangle are equal to

So Rel{\bf Rel} is indeed a symmetric monoidal category as expected. Rel{\bf Rel} shares many common characteristics with FdHilb{\bf FdHilb}, one of them being a †\dagger-compact structure. Firstly, Rel{\bf Rel} is compact closed with self-dual objects that is, X∗=XX^{*}=X for any X∈∣Rel∣X\in|{\bf Rel}|. Moreover, for any X∈∣Rel∣X\in|{\bf Rel}| let

such that there exists an (x′′′′,∗)∈X×{∗}(x^{\prime\prime\prime\prime},*)\in X\times\{*\} with

By definition of ρ\rho and 1X1_{X}, and of the product of relations, this entails that x,x′′′′x,x^{\prime\prime\prime\prime} and x′x^{\prime} are all equal. Moreover, by definition of ηX\eta_{X}, and of the product of relations, we have that x′′x^{\prime\prime} and x′′′x^{\prime\prime\prime} are also equal. Thus,

such that there exists an ((x′′,x′′′),x′′′′)∈(X×X)×X((x^{\prime\prime},x^{\prime\prime\prime}),x^{\prime\prime\prime\prime})\in(X\times X)\times X with

By the computation in (b) we have that x=x′′x=x^{\prime\prime} and x′′′=x′′′′x^{\prime\prime\prime}=x^{\prime\prime\prime\prime}. By definition of ϵX\epsilon_{X}, 1X1_{X} and the product of relations we have x′′=x′′′x^{\prime\prime}=x^{\prime\prime\prime} and x′′′′=x′x^{\prime\prime\prime\prime}=x^{\prime}. All this together yields x=x′′=x′′′=x′′′′=x′x=x^{\prime\prime}=x^{\prime\prime\prime}=x^{\prime\prime\prime\prime}=x^{\prime} and hence

(d) Post-composing the previous composite with the natural isomorphism λX−1\lambda^{-1}_{X} yields a morphism of type X→XX\rightarrow X, namely

which is the identity relation as required.

Commutation of the dual diagram is done analogously. From this, we conclude that Rel{\bf Rel} is compact closed. The obvious candidate for the dagger

is the relational converse. For relation R:X→YR:X\rightarrow Y its converse R∪:Y→XR^{\cup}:Y\rightarrow X is

We define the contravariant identity-on-objects involutive functor

Note that the adjoint and the transpose coincide, that is,

which the reader may easily check. Finally, we verify that Rel{\bf Rel} is dagger compact:

The category Rel{\bf Rel} is dagger monoidal:

(i) From the definition of the monoidal product of two relations

(ii) The fact that α†=α−1\alpha^{\dagger}=\alpha^{-1}, λ†=λ−1\lambda^{\dagger}=\lambda^{-1}, ρ†=ρ−1\rho^{\dagger}=\rho^{-1} and σ†=σ−1\sigma^{\dagger}=\sigma^{-1} is trivial as the inverse of all these morphisms is the relational converse.

and hence σ∘ϵX†=ϵX†=ηX\sigma\circ\epsilon^{\dagger}_{X}=\epsilon^{\dagger}_{X}=\eta_{X}.

So Rel{\bf Rel} is indeed a dagger compact category.

3 The category of 2D cobordisms

The category 2Cob{\bf 2Cob} can be informally described as a category whose morphisms, so-called cobordisms, describe the ‘topological evolution’ of manifolds of dimension 2−1=12-1=1 through time. For instance, consider some snapshots of two circles which merge into a single circle, with time going upwards:

Passing to the continuum, the same process can be described by the cobordism

Thus, we take a cobordism to be a (compact) 2-dimensional manifold whose boundary is partitioned in two. We take these closed one-dimensional manifolds to be the domain and the codomain of the cobordism. Since we are only interested in the topology of the manifolds, each (co)domain consists of a finite number of closed strings.

The category 2Cob{\bf 2Cob} is defined as follows:

For each object nn, the identity 1n:n→n1_{n}:n\rightarrow n which is given by nn parallel cylinders:

Composition is given by “gluing” manifolds together, e.g.

where the cobordism M′:1→2M^{\prime}:1\rightarrow 2 is glued to M:2→1M:2\rightarrow 1 along the object 11.

The disjoint union of manifolds provides this category with a monoidal structure. For example, if M:1→0M:1\rightarrow 0 and M′:2→1M^{\prime}:2\rightarrow 1 are cobordisms, then the cobordism M+M′:1+2→0+1M+M^{\prime}:1+2\rightarrow 0+1 depicts as:

The empty manifold 0 is the identity for the disjoint union.

The twist cobordism provides symmetry. For example, the twist

of the compact structure on 11 are the cobordisms

We recover the equations of compactness as

which hold since all cobordisms involved are homeomorphically equivalent. The generalisation of the units to arbitrary nn is again obvious:

These together with corresponding counits are easily seen to always satisfy the equations of compactness.

The dagger consists in ‘flipping’ the cobordisms, e.g. if M:2→1M:2\rightarrow 1 is

Clearly the dagger is compatible with the disjoint union which makes 2Cob{\bf 2Cob} a dagger monoidal category. It is also dagger compact since σ1,1∘ϵ1†\sigma_{1,1}\circ\epsilon_{1}^{\dagger} is

which is again easily seen to be true for arbitrary nn.

Obviously, we have been very informal here. For a more elaborated discussion and technical details we refer the reader to B2004; BaezDolan; Kock; Turaev. The key thing to remember is that there are important ‘concrete’ categories in which the morphisms are nothing like maps from the domain to the codomain.

Note also that we can conceive — again somewhat informally — the diagrammatic calculus of the previous sections as the result of contracting the diameter of the strings in 2Cob{\bf 2Cob} to zero. These categories of cobordisms play a key role in topological quantum field theory (TQFT). We discuss this topic in Section 5.5.

Classical-like tensors

The tensors to which we referred as classical-like are not compact. Instead they do come with some other structure which, in all non-trivial cases, turns out to be incompatible with compactness AbrClone. In fact, this incompatibility is the abstract incarnation of the No-Cloning theorem which plays a key role in quantum information Dieks; WZ.

Consider the category Set{\bf Set} with the Cartesian product as the monoidal tensor, as defined in Example 28. Given sets A1,A2∈∣Set∣A_{1},A_{2}\in|{\bf Set}|, their Cartesian product A1×A2A_{1}\times A_{2} consists of all pairs (x1,x2)(x_{1},x_{2}) with x1∈A1x_{1}\in A_{1} and x2∈A2x_{2}\in A_{2}. The fact that Cartesian products consist of pairs is witnessed by the projection maps

which identify the respective components, together with the fact that, in turn, we can pair x1=π1(x1,x2)∈A1x_{1}=\pi_{1}(x_{1},x_{2})\in A_{1} and x2=π2(x1,x2)∈A2x_{2}=\pi_{2}(x_{1},x_{2})\in A_{2} back together into (x1,x2)∈A1×A2(x_{1},x_{2})\in A_{1}\times A_{2}, merely by putting brackets around them. We would like to express this fact purely in category-theoretic terms. But both the projections and the pairing operation are expressed in terms of their action on elements, while categorical structure only recognises hom-sets, and not the internal structure of the underlying objects. Therefore, we consider the action of projections on hom-sets, namely

which we can combine into a single operation ‘decompose’

so decCA1,A2dec_{C}^{A_{1},A_{2}} and recCA1,A2rec_{C}^{A_{1},A_{2}} are now effectively each others inverses. In the light of Example 4, setting C:={∗}C:=\{*\}, we obtain

which corresponds to projecting and pairing elements exactly as in the discussion at the beginning of this section. All of this extends in abstract generality.

A product of A1A_{1} and A2∈∣C∣A_{2}\in|{\bf C}| is a triple which consists of another object A1×A2∈∣C∣A_{1}\times A_{2}\in|{\bf C}| together with two morphisms

and which is such that for all C∈∣C∣C\in|{\bf C}| the mapping

admits an inverse ⟨−,−⟩C,A1,A2\langle-,-\rangle_{C,A_{1},A_{2}}.

Below we omit the indices C,A1,A2C,A_{1},A_{2} in ⟨−,−⟩C,A1,A2\langle-,-\rangle_{C,A_{1},A_{2}}.

A category C{\bf C} is Cartesian if any pair of objects A,B∈∣C∣A,B\in|{\bf C}| admits a (not necessarily unique) product.

If a pair of objects admits two distinct products then the carrier objects are isomorphic in the category-theoretic sense of Definition 2.

Indeed, suppose that A1A_{1} and A2∈∣C∣A_{2}\in|{\bf C}| have two products A1×A2A_{1}\times A_{2} and A1⊠A2A_{1}\boxtimes A_{2} with respective projections

By Definition 17 we can apply the respective inverses of

say ff and gg respectively, for which we have

and applying the inverse to (π1′∘−,π2′∘−)(\pi_{1}^{\prime}\circ-,\pi_{2}^{\prime}\circ-) now gives 1A1⊠A2=g∘f1_{A_{1}\boxtimes A_{2}}=g\circ f. An analogue argument gives f∘g=1A1×A2f\circ g=1_{A_{1}\times A_{2}} so ff is an isomorphism between the two objects A1×A2A_{1}\times A_{2} and A1⊠A2A_{1}\boxtimes A_{2} with gg as its inverse.

The above definition of products in terms of ‘decomposing and recombining compound objects’ is not the one that one usually finds in the literature.

A product of two objects A1A_{1} and A2A_{2} in a category C{\bf C} is a triple consisting of another object A1×A2∈∣C∣A_{1}\times A_{2}\in|{\bf C}| together with two morphisms

and which is such that for any object C∈∣C∣C\in|{\bf C}|, and any pair of morphisms C\rTof1A1C\rTo^{f_{1}}A_{1} and C\rTof2A2C\rTo^{f_{2}}A_{2} in C{\bf C}, there exists a unique morphism C\rTofA1×A2C\rTo^{f}A_{1}\times A_{2} such that

We can concisely summarise this universal property by the commutative diagram

It is easy to see that this definition is equivalent to the previous one: the inverse ⟨−,−⟩\langle-,-\rangle to (π1∘−,π2∘−)(\pi_{1}\circ-,\pi_{2}\circ-) provides for any pair (f1,f2)(f_{1},f_{2}) a unique morphism f:=⟨f1,f2⟩f:=\langle f_{1},f_{2}\rangle which is such that (π1∘f,π2∘f)=(f1,f2)(\pi_{1}\circ f,\pi_{2}\circ f)=(f_{1},f_{2}). Conversely, uniqueness of C\rTofA1×A2C\rTo^{f}A_{1}\times A_{2} guarantees (π1∘−,π2∘−)(\pi_{1}\circ-,\pi_{2}\circ-) to have an inverse ⟨−,−⟩\langle-,-\rangle, which is obtained by setting ⟨f1,f2⟩:=f\langle f_{1},f_{2}\rangle:=f.

For more details on this definition, and the reason for its prominence in the literature, we refer to AbramskyT and standard textbooks such as Adamek; SML.

If a category C{\bf C} is Cartesian, then each choice of a product for each pair of objects always defines a symmetric monoidal structure on C{\bf C} with A⊗B:=A×BA\otimes B:=A\times B, and with the terminal object as the monoidal unit.

Proving this requires work. First, for f:A1\rToB1f:A_{1}\rTo B_{1} and g:A2\rToB2g:A_{2}\rTo B_{2} let

be the unique morphism defined in terms of Definition 19 within

Then it immediately follows that the diagrams

commute. From Definition 17 we know that for any hh,

Using eq.(36) for A\rTofBA\rTo^{f}B, B\rTogCB\rTo^{g}C and B\rTohDB\rTo^{h}D we have

Using this, for A\rTofBA\rTo^{f}B, A\rTogCA\rTo^{g}C, B\rTohDB\rTo^{h}D and C\rTokEC\rTo^{k}E , we have

where ⟨−,−⟩′\langle-,-\rangle^{\prime} is the pairing operation relative to (π1′∘−,π2′∘−)(\pi_{1}^{\prime}\circ-,\pi_{2}^{\prime}\circ-). In a similar manner the reader can verify that −×−-\times- is bifunctorial.

To support the claim in Proposition 4 we will now also construct the required natural isomorphisms, and leave verification of the coherence diagrams to the reader. Let !A!_{A} be the unique morphism of type A\rTo⊤A\rTo\top. Setting

that is, λ\lambda is natural. The components are moreover isomorphisms with π2\pi_{2} as inverse. The fact that π2∘λA=1A\pi_{2}\circ\lambda_{A}=1_{A} holds by definition, and from

and the fact that by the terminality of ⊤\top we have

commutes, so by uniqueness, it follows that ⟨!A∘π2,1A∘π2⟩=!⊤×1A\langle!_{A}\circ\pi_{2},1_{A}\circ\pi_{2}\rangle=!_{\top}\times 1_{A}, and hence

Similarly the components ρA:=⟨1A,!A⟩\rho_{A}:=\langle 1_{A},!_{A}\rangle also define a natural isomorphism.

For associativity, let us fix some notation for the projections:

We define a morphism of type A×(B×C)→A×BA\times(B\times C)\rightarrow A\times B within

Naturality as well as the fact that the components are isomorphisms relies on uniqueness of the morphisms as defined above and is left to the reader.

For symmetry, the components σA,B:A×B\rToB×A\sigma_{A,B}:A\times B\rTo B\times A are defined within

where again we leave verifications to the reader.

2 Copy-ability and delete-ability

So how does all this translate in term of morphisms as physical processes? By a uniform copying operation or diagonal in a monoidal category C{\bf C} we mean a natural transformation

The corresponding commutativity requirement

expresses that ‘when performing operation ff on a system AA and then copying it’, is the same as ‘copying system AA and then performing operation ff on each copy’. For example, correcting typos on a sheet of written paper and then Xeroxing it is the same as first Xeroxing it and then correcting the typos on each of the copies.

as a uniform copying operation since we have commutation of {diagram}

Is there a uniform copying operation in FdHilb{\bf FdHilb}? We cannot just set

since this map is not even linear. On the other hand, when for each Hilbert space H{\cal H} a basis {∣i⟩}i\{|i\rangle\}_{i} is specified, we can consider

But now the diagram {diagram} fails to commute, since via one path we obtain the (unnormalized) Bell-state

while via the other path we obtain an (unnormalized) disentangled state

This inability to define a uniform copying operation reflects the fact that we cannot copy (unknown) quantum states.

Let us now turn our attention to Rel{\bf Rel} and, given that every function is also a relation, consider the family of functions which provided a uniform copying operation for Set{\bf Set}. In more typical relational notation we have

However, the diagram {diagram} fails to commute, since via one path we have

Note here in particular the similarity with the counterexample that we provided for the case of FdHilb{\bf FdHilb}, by identifying

is not a component of a uniform copying relation

The category Set{\bf Set} admits a uniform copying operation as a consequence of being Cartesian. We indeed have the following general result.

Each Cartesian category admits a uniform copying operation.

and let A\rTofBA\rTo^{f}B be arbitrary. Then we have

so ∇\nabla is a natural transformation, and hence a uniform copying operation.

In fact, one can define Cartesian categories in terms of the existence of a uniform copying operation and a corresponding uniform deleting operation

for which the naturality constraint now means that

commutes. There are some additional constraints such as ‘first copying and then deleting results in the same as doing nothing’, and similar ones, which all together formally boil down to saying that for each object AA in the category the triple

The fact that the diagonal in Set{\bf Set} fails to be a diagonal in Rel{\bf Rel} seems to indicate that in Rel{\bf Rel} the Cartesian product does not provide a product in the sense of Definition 17. Consider

where ∅\emptyset stands for the empty relation. Since {∗}×{∗}={(∗,∗)}\{*\}\times\{*\}=\{(*,*)\} is a singleton there are only two possible choices for π1\pi_{1} and π2\pi_{2}, namely the empty relation and the singleton relation {((∗,∗),∗)}⊆{(∗,∗)}×{∗}\{((*,*),*)\}\subseteq\{(*,*)\}\times\{*\}. Similarly there are also only two candidate relations to play the role of ff. So since π1∘f=∅\pi_{1}\circ f=\emptyset either π1\pi_{1} or ff has to be ∅\emptyset and since π2∘f=1{∗}\pi_{2}\circ f=1_{\{*\}} neither π2\pi_{2} nor ff can be ∅\emptyset. Thus π1\pi_{1} has to be the empty relation and π2\pi_{2} has to be the singleton relation. However, when considering

π2\pi_{2} has to be the empty relation and π1\pi_{1} has to be the singleton relation, so we have a contradiction. Key to all this is the fact that the empty relation is a relation, while it is not a function, or more generally, that relations need not be total (total = each argument is assigned to a value). On the other hand, when showing that the diagonal in Set{\bf Set} was not a diagonal in Rel{\bf Rel} we relied on the multi-valuedness of the relation {(∗,0),(∗,1)}⊆{∗}×{0,1}\{(*,0),(*,1)\}\subseteq\{*\}\times\{0,1\}. Hence multi-valuedness of certain relations obstructs the existence of a natural diagonal in Rel{\bf Rel}, while the lack of totality of certain relations obstructs the existence of faithful projections in Rel{\bf Rel}, causing a break-down of the Cartesian structure of ×\times in Rel{\bf Rel} as compared to the role it plays in Set{\bf Set}.

3 Disjunction vs. conjunction

As we saw in Section 4.1, the fact that in Set{\bf Set} Cartesian products X×YX\times Y consist of pairs (x,y)(x,y) of elements x∈Xx\in X and y∈Yy\in Y can be expressed in terms of a bijective correspondence

One can then naturally ask whether we also have that

where A1+A2A_{1}+A_{2} is the disjoint union of two sets A1A_{1} and A2A_{2}, that is, we repeat,

This isomorphism now involves injection maps

They embed the elements of A1A_{1} and A2A_{2} within A1+A2A_{1}+A_{2}. Their action on hom-sets is

which converts a function that takes values on all elements that either live in A1A_{1} or A2A_{2}, into two functions, one that takes values in A1A_{1}, and one that takes values in A2A_{2}. We can again recombine these two operations in a single one

The binary operation $onfunctionsnowrecombinestwofunctionson functions now recombines two functionsf_{1}andandf_{2}$ into a single one. We have an isomorphism

Note that while [f1,f2][f_{1},f_{2}] produces an image either for the function f1f_{1} or the function f2f_{2}, in contrast ⟨f1,f2⟩\langle f_{1},f_{2}\rangle produces an image both for the function f1f_{1} and the function f2f_{2}. In operational terms, while the product allows to describe a pair of (classical) systems, the disjoint union allows to describe a situation where we have either of two systems. For example, it allows to describe the branching structure that arises as a consequence of non-determinism.

A coproduct of two objects A1A_{1} and A2A_{2} in a category C{\bf C} is a triple consisting of another object A1+A2∈∣C∣A_{1}+A_{2}\in|{\bf C}| together with two morphisms

and which is such that for all C∈∣C∣C\in|{\bf C}| the mapping

admits an inverse. A category C{\bf C} is co-Cartesian if any pair of objects A,B∈∣C∣A,B\in|{\bf C}| admits a (not necessarily unique) coproduct.

As in the case of products, we also have the following variant:

A coproduct of two objects A1A_{1} and A2A_{2} in a category C{\bf C} is a triple consisting of another object A1+A2∈∣C∣A_{1}+A_{2}\in|{\bf C}| together with two morphisms

and which is such that for any object C∈∣C∣C\in|{\bf C}|, and any pair of morphisms A1\rTof1CA_{1}\rTo^{f_{1}}C and A2\rTof2CA_{2}\rTo^{f_{2}}C in C{\bf C}, there exists a unique morphism A1+A2\rTofCA_{1}+A_{2}\rTo^{f}C such that

We can again represent this in a commutative diagram:

As a counterpart to the diagonal which we have in Cartesian categories we now have a codiagonal, with components

As explained in Example 14, we can think of a partially ordered set PP as a category P{\bf P}. In such a category products turn out to be greatest lower bounds or meets, and coproducts turn out to be least upper bounds or joins. The existence of an isomorphism

given that P(a1+a2,c){\bf P}(a_{1}+a_{2},c), P(a1,c){\bf P}(a_{1},c) and P(a2,c){\bf P}(a_{2},c) and hence also P(a1,c)×P(a2,c){\bf P}(a_{1},c)\times{\bf P}(a_{2},c) are all either singletons or empty, means that P(a1+a2,c){\bf P}(a_{1}+a_{2},c) is non-empty if and only if P(a1,c)×P(a2,c){\bf P}(a_{1},c)\times{\bf P}(a_{2},c) is non-empty, that is, if and only if both P(a1,c){\bf P}(a_{1},c) and P(a2,c){\bf P}(a_{2},c) are non-empty. Since non-emptiness of P(a,b){\bf P}(a,b) means that a≤ba\leq b, we indeed have

so a1+a2a_{1}+a_{2} is indeed the least upper bounds of a1a_{1} and a2a_{2}. So Definition 21 provides us with a complementary but equivalent definition of least upper bounds. In

we now have that the existence of ι1\iota_{1} and ι2\iota_{2} assert that a1≤a1+a2a_{1}\leq a_{1}+a_{2} and a2≤a1+a2a_{2}\leq a_{1}+a_{2}, so a1+a2a_{1}+a_{2} is an upper bound for a1a_{1} and a2a_{2}, and whenever there exists an element c∈Pc\in P which is such that both a1≤ca_{1}\leq c and a2≤ca_{2}\leq c hold, then we have that a1+a2≤ca_{1}+a_{2}\leq c, so a1+a2a_{1}+a_{2} is indeed the least upper bound for a1a_{1} and a2a_{2}.

Dually to what we did in a category with products, in a category with coproducts we can define sum morphisms f+gf+g in terms of commutation of

From this we can derive that coproducts provide a monoidal structure.

We already hinted at the fact that while a product can be interpreted as a conjunction, the coproduct can be interpreted as a disjunction. The distributive law

of classical logic incarnates in categorical logic as the existence of a natural isomorphism wich effectively ‘distributes’, namely

This of course requires the category to be both Cartesian and co-Cartesian.

Such an isomorphism does not always exist, as the following example illustrates.

Let H{\cal H} be a Hilbert space and let L(H)L({\cal H}) be the set of all of its (closed, in the infinite-dimensional case) subspaces, ordered by inclusion. Again this can be thought of as a category L{\bf L}. It has an initial object, namely the zero-dimensional subspace, and it has a terminal object, namely the whole Hilbert space itself. This category is Cartesian with intersection as product, and it is also co-Cartesian for

that is, the (closed) linear span of VV and WW. However, as observed by Birkhoff and von Neumann in BvN, this lattice does not satisfy the distributive law. Take for example two vectors ψ,ϕ∈H\psi,\phi\in{\cal H} with ϕ⊥ψ\phi\perp\psi. Then we have

only include the zero-vector 00, we have

Recall that an isomorphism consists of a pair of morphisms that are mutually inverse. So a natural isomorphism consists of a pair of natural transformations. In a category which is both Cartesian and co-Cartesian one of the two components of the distributivity natural isomorphism always exists, namely the natural transformation

Indeed, by the assumption that the category is both Cartesian and co-Cartesian there exist unique morphisms ff and gg such that

commute, namely f:=[π1,π1]f:=[\pi_{1},\pi_{1}] and g:=[ι1∘π2,ι2∘π2]g:=[\iota_{1}\circ\pi_{2},\iota_{2}\circ\pi_{2}], and hence there also exists a unique morphism θA,B,C\theta_{A,B,C} such that

is moreover a natural transformation since given

using the various lemmas for products and coproducts, we have that

If this natural transformation is an isomorphism we have a distributive category.

From the above it follows that in any lattice we have

Below we will see that also the so-called orthomodular law can be given a purely category-theoretic form, so Birkhoff-von Neumann style quantum logic can be entirely casted in purely category-theoretic terms.

4 Direct sums

where 1U1_{U} denotes the identity on UU and 0U,U′0_{U,U^{\prime}} is a matrix of 0’s of dimension \mboxdim(U)×\mboxdim(U′)\mbox{dim}(U)\times\mbox{dim}(U^{\prime}). Let M:V→WM:V\rightarrow W and N:V→W′N:V\rightarrow W^{\prime} also be represented as matrices. The unique matrix PP which makes

Therefore ⊕\oplus is a product. The dual is obtained by transposing the matrices in this diagram. Setting ιi\iota_{i} for the transpose of πi\pi_{i} the diagram

commutes. This shows that W⊕W′W\oplus W^{\prime} is indeed also a coproduct. Moreover, the zero-dimensional space is both initial and terminal.

In the category Rel{\bf Rel} we can extend the disjoint union to morphisms. For any two relations R1:X→X′R_{1}:X\rightarrow X^{\prime} and R2:Y→Y′R_{2}:Y\rightarrow Y^{\prime} we set

We define injection relations ι1:X→X+Y\iota_{1}:X\rightarrow X+Y and ι2:Y→X+Y\iota_{2}:Y\rightarrow X+Y to be

and the copairing relation [R1,R2]:X+Y→Z[R_{1},R_{2}]:X+Y\rightarrow Z to be

One easily verifies that all these data define a coproduct. We define projection relations as the relational converse of the injection relations, that is,

One easily verifies that this defines a product. So the diagrams expressing the product properties are converted into the diagrams expressing the coproduct properties by the relational converse. Since for any X∈∣Rel∣X\in|{\bf Rel}| there is only one relation of type

A category C{\bf C} is enriched in commutative monoids if each hom-set C(A,B){\bf C}(A,B) is a commutative monoid

and if for all f∈C(A,B)f\in{\bf C}(A,B), all g1,g2∈C(B,C)g_{1},g_{2}\in{\bf C}(B,C) and all h∈C(C,D)h\in{\bf C}(C,D) we have

The direct sum or biproduct of two objects A1,A2∈∣C∣A_{1},A_{2}\in|{\bf C}| is a quintuple consisting of another object A1⊕A2∈∣C∣A_{1}\oplus A_{2}\in|{\bf C}| together with four morphisms

Note that Definition 38 does not explicitly require that A1⊕A2A_{1}\oplus A_{2} is both a product and a coproduct. In particular, it does not make any reference to other objects CC as the definitions of product and coproduct do.

A zero object is an object which is both initial and terminal.

If a category C{\bf C} has a zero object, then for each pair of objects A,B∈∣C∣A,B\in|{\bf C}| we can construct a canonical zero map by relying on the uniqueness of morphism from the initial object to BB and from AA to the terminal object:

One can show that if a category with a zero object is enriched in commutative monoids, that these unique morphisms must be the units for the monoids.

A biproduct category is a category with a zero object in which for any two objects A1A_{1} and A2A_{2} a biproduct (A1⊕A2,π1,π2,ι1,ι2)(A_{1}\oplus A_{2},\pi_{1},\pi_{2},\iota_{1},\iota_{2}) is specified. There is no particular reason why we ask for biproducts to be specified while in the case of Cartesian categories we only required existence. This is a matter of taste, whether one prefers ‘being Cartesian’ or ‘being a biproduct category’ to be conceived as a ‘property a category possesses’ or ‘some extra structure it comes with’. There are different ‘schools’ of category theory which have strong arguments for either of these. Each of these have their virtues and therefore we decided to give an example of both.

One can show that the above definition is equivalent to the following one, which does make explicit reference to products and coproducts Houston.

Let C{\bf C} be both Cartesian and co-Cartesian with specified products and coproducts, and let ⊥\bot and ⊤\top respectively denote an initial and a terminal object of C{\bf C}. Then C{\bf C} is a biproduct category if:

the (unique) morphism ⊥\rTo⊤\bot\rTo\top is an isomorphism ,

is an isomorphism for all objects A1,A2∈∣C∣A_{1},A_{2}\in|{\bf C}|.

is fully characterised by four ‘component’ morphisms, namely

Therefore it makes sense to think of ff as the matrix

Using this, condition 2 in Definition 26 can now be stated as the requirement that

The two remaining equations are obtained in the same manner.

In Rel{\bf Rel} the disjoint union ++ is a biproduct. The morphism

is a subset of X×XX\times X. The composite of

is {(x,x) ∣ x∈X}=1X\{(x,x)\ |\ x\in X\}=1_{X}. The morphism

is a subset of X×YX\times Y, namely the set of pairs (x,y)(x,y) such that there exists a (x,z)∈ι2(x,z)\in\iota_{2} and (z,x)∈π1(z,x)\in\pi_{1}. But there are no such elements zz since the elements of XX are labeled by 11 and those of YY by 22 within X+YX+Y. Thus, we obtain the empty relation 0Y,X0_{Y,X}.

5 Categorical matrix calculus

By Definition 26 each biproduct category is Cartesian, hence by Proposition 4 it carries monoidal structure. We show now that from Definition 26 it indeed follows that each hom-set C(A,B){\bf C}(A,B) in a biproduct category C{\bf C} is a monoid, with

and with 0A,B0_{A,B} as the unit. Indeed, let f:A→Bf:A\rightarrow B and consider

The equality f+0A,B=ff+0_{A,B}=f can be shown via the commutation of

In the above diagram, all subdiagrams correspond to definitions, except for the square at the bottom. To show that it commutes, consider

Since this is a product diagram, f⊕00,0f\oplus 0_{0,0} is the unique morphism making it commute. Moreover, the diagram

commutes, so it follows that ι1′∘f∘π1\iota_{1}^{\prime}\circ f\circ\pi_{1} also makes diagram (40) commute. Thus,

by uniqueness, that is, the square at the bottom of diagram (39) also commutes. To establish 0A,B+f0_{A,B}+f one proceeds similarly.

This is established in terms of commutation of the diagram

where αA,A,A\alpha_{A,A,A} is defined as in Proposition 4. The central square commutes by definition. We now show that the left triangle also commutes. We have

The right triangle is also easily seen to commute.

This addition moreover satisfies a distributive law, namely

One usually refers to this additive structure on morphisms as enrichment in monoids. We leave it up to the reader to verify these distributive laws. A physicist-friendly introduction to enriched category theory suitable for the readers of this chapter is BorceuxStubbe. An inspiring paper which introduced the concept is Lawvere.

We now show that from Definition 26 it also follows that for

Indeed, unfolding the definitions we have

and using the fact that a biproduct of morphisms is at the same time a product of morphisms we obtain

and the composite of identities being again the identity, we proved the claim.

A dagger biproduct category is a category which is both a dagger symmetric monoidal category and a biproduct category for which the monoidal tensor and the biproduct coincide, and with ιi=πi†\iota_{i}=\pi_{i}^{\dagger} for all projections and injections.

These dagger biproduct categories were introduced in AC2004; deLL; SelingerPre in order to enable one to talk about quantum spectra in purely category-theoretic language. Let

be unitary in a dagger biproduct category. By the corresponding projector spectrum we mean the family {Pi}i\{{\rm P}_{i}\}_{i} of projectors

This result easily extends to more general biproducts A1⊕…⊕AnA_{1}\oplus\ldots\oplus A_{n}, which can be defined in the obvious manner, and which allow us in addition to define nn-ary projector spectra too. In FdHilb{\bf FdHilb}, this nn-ary generalisation of Proposition 6 corresponds to the fact that

is the projector spectrum of an arbitrary self-adjoint operator. More details on this abstract view of quantum spectra are in AC2004; deLL; SelingerPre.

Now, consider two biproducts A1⊕…⊕AnA_{1}\oplus\ldots\oplus A_{n} and B1⊕…⊕BmB_{1}\oplus\ldots\oplus B_{m} each with their respective injections and projections. As already indicated in the previous section, with each morphism

Moreover, these matrices obey the usual matrix rules with respect to composition and the above defined summation. Indeed, for composition, the composite g∘f=hg\circ f=h also has an associated matrix with entries

from which we recover matrix multiplication. For the sum, using the distributivity of the composition over the sum, one finds that for individual entries in f+gf+g we have

We illustrate the concepts of this section for the category Rel{\bf Rel}. Somewhat unfortunately, the disjoint union bifunctor and the monoidal enrichment operation share the same notation ++. But since their type are essentially different, i.e.

respectively, this should not confuse the reader.

The sum R1+R2:X→YR_{1}+R_{2}:X\rightarrow Y of two relations is, by definition, the composite

Using the definition of copairing ∇Y:=[1Y,1Y]\nabla_{Y}:=[1_{Y},1_{Y}] we obtain

are defined as ιX∘πX\iota_{X}\circ\pi_{X} and ιY∘πY\iota_{Y}\circ\pi_{Y} respectively, that is,

Using the definition of the sum we obtain

as required. It is easily seen that this generalises to an arbitrary number of terms in the biproduct.

— contra the two-element field where we have 1+1=01+1=0 — so the operations −⋅−-\cdot- and −+−-+- coincide with the Boolean logic operations:

A relation R:{a,b}→{c,d}R:\{a,b\}\rightarrow\{c,d\} can now be represented by a 2×22\times 2 matrix, e.g.

when aRcaRc, bRcbRc and aRdaRd (and not bRdbRd). Similarly, R′:{c,d}→{e,f,g}R^{\prime}:\{c,d\}\rightarrow\{e,f,g\} is

when cRecRe, cRfcRf, dRfdRf and dRgdRg. Their composite

can be computed by matrix multiplication:

For a relation R′′:{a,b}→{c,d}R^{\prime\prime}:\{a,b\}\rightarrow\{c,d\} represented by the matrix

that is, R′′={(b,c),(b,d)}R^{\prime\prime}=\{(b,c),(b,d)\}, the sum R+R′′R+R^{\prime\prime} is given by

which indeed corresponds to the matrix sum

6 Quantum tensors from classical tensors

Interesting categories such as FdHilb{\bf FdHilb} and Rel{\bf Rel} have both a classical-like and a quantum-like tensor. Obviously these two structures interact. For example, due to very general reasons we have distributivity natural isomorphisms

both in the case of FdHilb{\bf FdHilb} and Rel{\bf Rel}. We can rely on so-called closedness of the ⊗\otimes-structure to prove this, something for which we refer to other sources. Another manner to establish this fact for the cases of FdHilb{\bf FdHilb} and Rel{\bf Rel}, is to observe that the ⊗\otimes-structure arises from the ⊕\oplus-structure.

Let C{\bf C} be a biproduct category and let X∈CX\in{\bf C} be such that composition commutes in C(X,X){\bf C}(X,X). Define a new category C∣X{\bf C}|X as follows:

The objects of C∣X{\bf C}|X are those objects of C{\bf C} which are of the form X⊕…⊕XX\oplus\ldots\oplus X. We denote such an object consisting of nn terms by [n][n].

Note that we can represent all morphisms in C([n],[m]){\bf C}([n],[m]) by matrices, and hence also those in C∣X ⁣([n],[m]){\bf C}|X\!([n],[m]). Now we define a monoidal structure:

For all f∈C([n],[m])f\in{\bf C}([n],[m]) and g∈C([n′],[m′])g\in{\bf C}([n^{\prime}],[m^{\prime}]) we define

We leave it to the reader to verify that this provides C∣X{\bf C}|X with a symmetric monoidal structure. Note that commutativity of C(X,X){\bf C}(X,X) is necessary, since otherwise we would be in contradiction with the fact that the scalar monoid in a monoidal category is always commutative — cf. Section 2.5. With these definitions we have:

Indeed, note first that since [n]=I⊕⋯⊕I⏟n[n]=\underbrace{{\rm I}\oplus\dots\oplus{\rm I}}_{n} we have

where [n+m]=I⊕⋯⊕I⏟n+m[n+m]=\underbrace{{\rm I}\oplus\dots\oplus{\rm I}}_{n+m}. Therefore,

We can endow C∣X{\bf C}|X with compact structure. Set:

Let η[n]∈C∣X ⁣(I,[n]∗⊗[n])\eta_{[n]}\in{\bf C}|X\!({\rm I},[n]^{*}\otimes[n]) be the morphism with matrix entries

Let ϵ[n]∈C∣X ⁣([n]⊗[n]∗,I)\epsilon_{[n]}\in{\bf C}|X\!([n]\otimes[n]^{*},{\rm I}) to be the morphism with matrix entries

To see that this indeed defines a compact structure, observe that the identity of [n][n] is

We can now verify the equations of compactness by computing the composite — say ee — of the two preceding morphisms using matrix calculus, i.e.

Note that the indexation over jj, kk and ll has two different bracketings in the above sum. By definition of the identity, unit and counit, the term e(m,n)e_{(m,n)} will be 1I1_{I} only if j=k=lj=k=l, which entails that e(m,n)=δi,je_{(m,n)}=\delta_{i,j}, the identity. Since the objects are self-dual the other equation holds too.

Robin Houston proved a surprising result in Houston which to some extent is a converse to the above. It states that when a compact category is Cartesian (or co-Cartesian) then it also has direct sums.

7 Internal classical structures

In AC2004 unitary biproduct decompositions of the form

These basis vectors are then identified with outcomes of measurements.

But there is another way to encode bases as morphisms in a category, one for which we only need to rely on the tensor structure, and hence we can stay in the diagrammatic realm of Section 2.2. If we have a basis

of a Hilbert space H{\cal H} then we can consider the linear maps

These two maps indeed faithfully encode the basis B{\cal B} since we can extract it back from them. It suffices to solve the equation

in the unknown ∣ψ⟩|\psi\rangle. Indeed, the only ∣ψ⟩|\psi\rangle’s for which the right-hand-side is of the form ∣ϕ⟩⊗∣ϕ′⟩|\phi\rangle\otimes|\phi^{\prime}\rangle are the basis vectors. For any other ψ=∑iαi ∣i⟩\psi=\sum_{i}\alpha_{i}\,|i\rangle we have that

that is, we obtain a genuinely entangled state.

The pair of maps (δ,ϵ)(\delta,\epsilon) satisfies several properties e.g.

establishing it as an instance of the following concept in FdHilb{\bf FdHilb}:

Let (C,⊗,I)({\bf C},\otimes,{\rm I}) be a monoidal category. An internal comonoid is an object C∈∣C∣C\in|{\bf C}| together with a pair of morphims

where δ\delta is the comultiplication and ϵ\epsilon the comultiplicative unit, which are such that

define an internal comonoid on XX in Rel{\bf Rel} as the reader may verify. We could refer to these as the copying and deleting relations.

The notion of internal comonoid is dual to the notion of internal monoid.

Let (C,⊗,I)({\bf C},\otimes,{\rm I}) be a monoidal category. An internal monoid is an object M∈∣C∣M\in|{\bf C}| together with a pair of morphisms

where μ\mu is the multiplication and ee the multiplicative unit, which are such that

The origin of this name is the fact that monoids can equivalently be defined as internal monoids in Set{\bf Set}. Since the notion of internal monoid applies to arbitrary monoidal categories, it generalises the usual notion of a monoid.

A strict monoidal category can also be defined as an internal monoid in the category Cat{\bf Cat}, which has categories as objects, functors as morphisms and the product of categories as tensor — see Section 5.1 below. Proving this is slightly beyond the scope of this chapter but we invite the interested reader to do so.

We now show that internal monoids in Set{\bf Set} are indeed ordinary monoids. Given such an internal monoid (X,μ,e)(X,\mu,e) in Set{\bf Set} with functions

we take the elements of the monoid to be those of XX, the monoid operation to be

and the unit of the monoid to be 1:=e(∗)∈X1:=e(*)\in X. The condition

boils down to the fact that for all x,y,z∈Xx,y,z\in X we have

that is, associativity of the monoid operation, and the condition

boils down to the fact that for all x∈Xx\in X we have

that is, the element 11 is the unit of the monoid.

An internal definition of a group requires a bit more work.

Let C{\bf C} be a category with finite products and let ⊤\top be the terminal object in C{\bf C}. An internal group is an internal monoid (G,μ,e)(G,\mu,e) together with a morphism inv:G\rToG{\rm inv}:G\rTo G such that we have commutation of

The additional operation inv:G\rToG{\rm inv}:G\rTo G assigns the inverses to the elements of the group. We leave it to the reader to verify that internal groups in Set{\bf Set} are indeed ordinary groups. When we rather consider groups in other categories, in particular those in categories of vector spaces, then one typically speaks about Hopf algebras, of which quantum groups are a special case. An excellent textbook on this topic is StreetBook. There are also lectures on this topic available on-line CatstersHopf. Also the notion of group homomorphism can be ‘internalized’ in a category. We define a group homomorphism between two group objects (G,μ,e,inv)(G,\mu,e,{\rm inv}) and (G′,μ′,e′,inv′)(G^{\prime},\mu^{\prime},e^{\prime},{\rm inv}^{\prime}) to be a morphism ϕ:G\rToG′\phi:G\rTo G^{\prime} which commutes with all three structural morphisms, that is, the diagrams

all commute. Again, these diagrams generalise what we know about group homomorphisms, namely that they preserve multiplication, unit and inverses. The notion of (co)monoid homomorphism is defined analogously.

8 Diagrammatic classicality

In a dagger monoidal category every internal comonoid

This merely involves reversal of the arrows. We can easily see this in diagrammatic terms. We represent the comultiplication and its unit as follows:

Then, the corresponding requirements are:

Now, if we flip all of these upside-down we obtain a monoid:

A dagger (co)monoid is a (co)monoid satisfying all the preceding requirements.

The dagger comonoids in FdHilb{\bf FdHilb} and Rel{\bf Rel} which we have seen above both have some additional properties. For example, they are commutative:

The comultiplication is isometric or special:

But by far, the most fascinating law which they obey are the Frobenius equations:

For a commutative dagger comonoid these two equations are easily seen to be equivalent. We verify that these equations hold for the dagger comonoids in FdHilb{\bf FdHilb} and Rel{\bf Rel} discussed in the previous section.

One can show that the Frobenius equation together with isometry guarantees a normal form for any connected picture made up of dagger Frobenius (co)monoids, identities and symmetry, and which only depends on the number of input and output wires CP2006; Lack. As a result we can represent any such network as a ‘spider’ e.g.,

Hence commutative dagger special Frobenius comonoids turn out to be structures which come with a very simple graphical calculus, but at the same time they are of key importance to quantum theory, as is exemplified by this theorem CPV:

In FdHilb{\bf FdHilb} there is a bijective correspondence between dagger special Frobenius comonoids and orthonormal bases. Explicitly, each dagger special Frobenius comonoid in FdHilb{\bf FdHilb} is of the form

relative to some orthonormal basis {∣i⟩}i\{|i\rangle\}_{i}.

In the category 2Cob{\bf 2Cob} we also encounter the Frobenius equation:

but the (co)monoids involved are not special, since the two cobordisms

are not homeomorphic. Therefore a normal form in 2Cob{\bf 2Cob} is of the form Kock

The commutative diagram in Definition 30 becomes

One refers to this equation typically as the Hopf law – cf. the Hopf algebras mentioned above. What also holds for these operations are the bialgebra laws:

There’s lots more to say on the connections between algebraic structures and these pictures. The reader may consult, for example, Kock; Selinger; StreetBook. A great place to find some very well-explained introductions to this is John Baez’ This Week’s Finds in Mathematical Physics TWF, for example, weeks 174, 224, 268.

Monoidal functoriality, naturality and TQFTs

In this section we provide the remaining bits of theory required to state the definition of a topological quantum field theory.

The category Cat{\bf Cat} which has categories as objects and functors as morphisms also comes with a monoidal structure:

The product of categories C{\bf C} and D{\bf D} is a category C×D{\bf C}\times{\bf D}:

objects are pairs (C,D)(C,D) with C∈∣C∣C\in|{\bf C}| and D∈∣D∣D\in|{\bf D}| ,

morphisms are pairs (f,g):(C,D)\rTo(C′,D′)(f,g):(C,D)\rTo(C^{\prime},D^{\prime}) where f:C\rToC′f:C\rTo C^{\prime} is a morphism in C{\bf C} and g:D\rToD′g:D\rTo D^{\prime} is a morphism in D{\bf D} ,

and the identities are pairs of identities.

This monoidal structure is Cartesian. The obvious projection functors

This notion of product allows for a very concise definition of bifunctoriality. A bifunctor is now nothing but an ordinary functor of type

So, for instance, to say that a tensor is a bifunctor it now suffices to say that

is a functor. Indeed, this implies that we have

for all morphisms φ,ξ\varphi,\xi and all objects Ξ\Xi in C×C{\bf C}\times{\bf C}, that is,

We give another example of bifunctor which is contravariant in the first variable and covariant in the second variable. This functor is key to the so-called Yoneda Lemma, which constitutes the core of many categorical constructs, for which we refer to the standard literature SML. For all A∈∣C∣A\in|{\bf C}| let

each object B∈∣C∣B\in|{\bf C}| to the set C(A,B)∈∣Set∣{\bf C}(A,B)\in|{\bf Set}| , and

each morphism g:B\rToCg:B\rTo C to the function

each object A∈∣C∣A\in|{\bf C}| to the set C(A,C)∈∣Set∣{\bf C}(A,C)\in|{\bf Set}| , and

each morphism f:A\rToBf:A\rTo B to the function

One verifies that given any pair f:A\rToBf:A\rTo B and h:C\rToDh:C\rTo D the diagram

commutes, sending a morphism g:B\rToCg:B\rTo C to the composite h∘g∘f:A\rToDh\circ g\circ f:A\rTo D. The bifunctor – also called hom-functor – which unifies the above two functors is

each pair of objects (A,B)∈∣C∣(A,B)\in|{\bf C}| to the set C(A,B)∈∣Set∣{\bf C}(A,B)\in|{\bf Set}| , and

each pair morphism (f:A\rToB,h:C\rToD)(f:A\rTo B,h:C\rTo D) to the function

These functors are called representable functors. They enable us to represent objects and morphisms of any category as functors on the well-known category Set{\bf Set}.

2 Naturality

We already encountered a fair number of examples of our restricted variant of natural isomorphisms, namely

as well as some proper natural transformations, namely

What makes all of these special is that all of the above expressions only involve objects of the category C{\bf C} without there being any reference to morphisms. This is not the case anymore for the general notion of natural transformations, which are in fact, structure preserving maps between functors.

Let F,G:C⟶DF,G:{\bf C}\longrightarrow{\bf D} be functors. A natural transformation

commutes for any A,B∈∣C∣A,B\in|{\bf C}| and any f∈C(A,B)f\in{\bf C}(A,B).

Given vector spaces VV and WW, then two group representations

are equivalent if there exists an isomorphism τ:V→W\tau:V\rightarrow W so that for all g∈Gg\in G,

This isomorphism is a natural transformation. Indeed, taking the functorial point of view for the two representations above, we get two functors

where Rρ1R_{\rho_{1}} maps ∗* on some vector space Rρ1(∗)R_{\rho_{1}}(*) and Rρ2R_{\rho_{2}} maps ∗* on some vector space Rρ2(∗)R_{\rho_{2}}(*). Naturality means that the diagram

from a vector space to its double dual is a natural transformation

the linear map f:V→Vf:V\to V can be interpreted as a change of basis, and then the linear maps Ff:FV→FVFf:FV\to FV and Gf:GV→GVGf:GV\to GV apply this change of basis to the expressions FVFV and GVGV respectively. Commutation of the above diagram then means that it makes no difference whether we apply τV\tau_{V} before the change of basis, or whether we apply it after the change of basis. Hence it asserts that τV\tau_{V} is a basis independent construction.

3 Monoidal functors and monoidal natural transformations

A monoidal functor, unsurprisingly, is a functor between two monoidal categories that preserves the monoidal structure ‘coherently’.

be monoidal categories. Then a monoidal functor is a functor

which are such that for every A,B,C∈∣C∣A,B,C\in|{\bf C}| the diagrams

commute in D{\bf D}. Moreover, a monoidal functor between symmetric monoidal categories is symmetric if, in addition, for all A,B∈∣C∣A,B\in|{\bf C}| the diagram

commutes in D{\bf D}. A monoidal functor is strong if the components of the natural transformation ϕ−,−\phi_{-,-} as well as the morphism ϕ\phi are isomorphisms, and it is strict if they are identities. In this case the equational requirements simplify to

Hence a strict monoidal functor between strict monoidal categories just means that the tensor is preserved by FF.

The functor †:Cop⟶C\dagger:{\bf C}^{op}\longrightarrow{\bf C} is a strict monoidal functor. In a compact category C{\bf C}, the functor (−)∗:Cop⟶C(-)^{*}:{\bf C}^{op}\longrightarrow{\bf C} which maps any object AA on A∗A^{*} and any morphism ff on its transpose f∗f^{*} is a strong monoidal functor.

between two monoidal functors is a natural transformation such that

commute. A monoidal natural transformation is symmetric if the two monoidal functors which constitute its domain and codomain are both symmetric.

4 Equivalence of categories

In Example 6 we defined the category Cat{\bf Cat} which has categories as objects and functors as morphism. Definition 2 on isomorphic objects, when applied to this special category Cat{\bf Cat}, tells us that two categories C{\bf C} and D{\bf D} are isomorphic if there exists two functors F:C⟶DF:{\bf C}\longrightarrow{\bf D} and G:D⟶CG:{\bf D}\longrightarrow{\bf C} such that

Thus, the functor FF defines a bijection between the objects as well as between the hom-sets of C{\bf C} and D{\bf D}. However, many categories that are — for most practical purposes — equivalent are not isomorphic. For example,

the category FSet{\bf FSet} which has all finite sets as objects, and functions between these sets as morphisms, and,

Therefore, it is useful to define some properties for functors that are weaker than being isomorphisms. For instance, the two following definitions describe functors whose morphism assignments are injective and surjective respectively.

A functor F:C⟶DF:{\bf C}\longrightarrow{\bf D} is faithful if for any A,B∈∣C∣A,B\in|{\bf C}| and any f,g:A\rToBf,g:A{\rTo}B we have that

A functor F:C⟶DF:{\bf C}\longrightarrow{\bf D} is full if for any A,B∈∣C∣A,B\in|{\bf C}| and for any g:FA→FBg:FA\rightarrow FB there exists an f:A\rToBf:A{\rTo}B such that Ff=gFf=g.

A subcategory D{\bf D} of a category C{\bf C} is a collection of objects of C{\bf C} as well as a collection of morphisms of C{\bf C} such that

for every morphism f:A\rToBf:A{\rTo}B in D{\bf D}, both AA and B∈∣D∣B\in|{\bf D}| ,

for every A∈∣D∣A\in|{\bf D}|, 1A1_{A} is in D{\bf D} , and

for every pair of composable morphisms ff and gg in D{\bf D}, g∘fg\circ f is in D{\bf D}.

These conditions entail that D{\bf D} is itself a category. Moreover, if D{\bf D} is a subcategory of C{\bf C}, the inclusion functor F:D⟶CF:{\bf D}\longrightarrow{\bf C} which maps every A∈∣D∣A\in|{\bf D}| and f∈Df\in{\bf D} to itself in C{\bf C} is automatically faithful. If in addition FF is full, then we say that D{\bf D} is a full subcategory of C{\bf C}. A full and faithful functor is in general not an isomorphism, as we shall see in Theorem 5.1 below.

Two categories C{\bf C} and D{\bf D} are equivalent if there is a pair of functors F:C⟶DF:{\bf C}\longrightarrow{\bf D} and G:D⟶CG:{\bf D}\longrightarrow{\bf C} and natural isomorphisms

An equivalence of categories is weaker than the notion of isomorphism of categories. It captures the essence of what we can do with categories without using concrete descriptions of objects: if two categories C{\bf C} and D{\bf D} are equivalent then any result following from the categorical structure in C{\bf C} remains true in D{\bf D}, and vice-versa.

(SML, p. 93) A functor F:C⟶DF:{\bf C}\longrightarrow{\bf D} is an equivalence of categories if and only if it is both full and faithful, and if each object B∈∣D∣B\in|{\bf D}| is isomorphic to an object FAFA for some A∈∣C∣A\in|{\bf C}|.

A skeleton D{\bf D} of a category C{\bf C} is any full subcategory of C{\bf C} such that each A∈∣C∣A\in|{\bf C}| is isomorphic in C{\bf C} to exactly one B∈∣D∣B\in|{\bf D}|. An equivalence between a category C{\bf C} and one of its skeleton D{\bf D} is defined as follows:

As D{\bf D} is a full subcategory of C{\bf C}, there is an inclusion functor F:D⟶CF:{\bf D}\longrightarrow{\bf C}.

By the definition of a skeleton, every A∈∣C∣A\in|{\bf C}| is isomorphic to an A′∈∣D∣A^{\prime}\in|{\bf D|}, so we can set GA:=A′GA:=A^{\prime} and pick an isomorphism τA:A\rToGA\tau_{A}:A\rTo GA.

From the preceding point, there is a unique way to define a functor G:C⟶DG:{\bf C}\longrightarrow{\bf D} such that we have FG⇒∼1CFG\stackrel{{\scriptstyle\sim}}{{\Rightarrow}}1_{\bf C} and GF⇒∼1DGF\stackrel{{\scriptstyle\sim}}{{\Rightarrow}}1_{\bf D}.

The two categories with sets as objects and functions as morphisms discussed at the beginning of this section.

5 Topological quantum field theories

TQFTs are primarily used in condensed matter physics to describe, for instance, the fractional quantum Hall effect. Perhaps more accurately, TQFTs are quantum field theories that compute topological invariants. In the context of this paper, TQFTs are our main example of monoidal functors. Defining a TQFT as a monoidal functor is very elegant, however, the seemingly short definition that we will provide is packed with subtleties. In order to appreciate it to its full extent, we will first give the non-categorical axiomatics of a generic nn-dimensional TQFTs as given in Turaev. We then derive the categorical definition from it. The bulk of this section is taken from Kock to which the reader is referred for a more detailed discussion on the subject.

if M≃M′M\simeq M^{\prime} then T(M)=T(M′)\mathcal{T}(M)=\mathcal{T}(M^{\prime}) ;

each cylinder Σ×\Sigma\times is sent to the identity map of T(Σ)\mathcal{T}(\Sigma) ;

If M=M′∘M′′M=M^{\prime}\circ M^{\prime\prime} then

the disjoint union Σ=Σ′+Σ′′\Sigma=\Sigma^{\prime}+\Sigma^{\prime\prime} is mapped to

and the disjoint union M=M′+M′′M=M^{\prime}+M^{\prime\prime} is mapped to

All of this can be written down in one line.

An nn-dimensional TQFT is a symmetric monoidal functor

where TT are the ‘twist’ cobordisms e.g. T_{1}=\vbox{\hbox{ \begin{pspicture}[(]0,0)(7.96,8.73) \end{pspicture} }}.

The rule that maps manifolds to vector spaces and cobordisms to linear maps gives the domain and the codomain of the functor. Condition 1 says that we consider homeomorphism classes of cobordisms. Conditions 2 and 3 spell out that the TQFT is a functor. Conditions 4 and 5 say that it is a monoidal functor.

We now construct such a functor. In the case of 2-dimensional quantum field theories, it turns out that this question can be answered with the material we introduced in the preceding sections.

The monoidal category 2Cob{\bf 2Cob} is generated by

That means, any cobordism in 2Cob{\bf 2Cob} can be written in terms of these generators when using composition and tensor.

The converse is also true, that is, given a Frobenius comonoid on VV, then we can define a TQFT with the preceding prescription, so there is a one-to-one correspondence between commutative Frobenius comonoids and 2-dimensional TQFTs. This is interesting in itself but we can go a step further.

Further reading

This concludes our tutorial of (a small fraction of) category theory. We particularly focussed on monoidal categories, given that we expect their role to grow within physics. We indicated how the monoidal structure encodes the nature of physical systems, e.g. classical versus quantum. Admittedly, the distinction as presented here requires substantial qualification, and by no means characterizes what quantum theory is truly about. A recent more elaborated categorical comparison of classical vs. quantum theories is in BES. All of this is part of a novel vastly growing research area, and we hope that this chapter may help the interested reader to take a bite of it.

We end this chapter by pointing in the direction of other important categorical concepts, for which we refer the reader to other sources. A good place to start are the YouTube postings by the Catsters Catsters.

Adjoint functors are, at least from a mathematical perspective, the greatest achievement of category theory thus far: it essentially unifies all known mathematical constructs of a variety of areas of mathematics such as algebra, geometry, topology, analysis and combinatorics within a single mathematical concept.

The restriction of adjoint functors to posetal categories, that is, those discussed in Examples 14, 15, 45 and 46, is the concept of Galois adjoints. These play an important role in computer science when reasoning about computational processes. Let PP be a partial order which represents the properties one wishes to attribute to the input data of a process, with ‘a≤ba\leq b’ if and only if ‘whenever aa holds, then bb must hold too’, and let QQ be the partial order which represents the properties one wishes to attribute to the output data of that process. So the process is an order preserving map f:P→Qf:P\to Q. The order preserving map g:Q→Pg:Q\to P, which maps a property bb of the output to the ‘weakest’ property (i.e. highest in the partial ordering) which the input data needs to satisfy in order to guarantee that the output satisfies bb, is then the left Galois adjoint to ff. One refers to g(b)g(b) as the weakest precondition. Formally ff is left Galois adjoint to gg if and only if for all a∈Pa\in P and all b∈Qb\in Q we have

The orthomodular law of quantum logic Piron, that is, in the light of Example 46, a weakening of the distributive law which L(H)L({\cal H}) does satisfy, is an example of such an adjunction of processes, namely

Pc{\rm P}_{c} is an order-theoretic generalization of the linear algebraic notion of an ‘orthogonal projector on subspace cc’, formally defined to be

where (−)⊥(-)^{\perp} stands for the orthocomplement ;

[−→](−)[-\rightarrow](-) is referred to as Sasaki hook, or unfortunately, also sometimes referred to as ‘quantum implication’, and is formally defined within

Heyting algebras, that is, the order-theoretic incarnation of intuitionistic logic, and which play an important role in the recent work by Doering and Isham DoeringIsham are, by definition, Galois adjoints now defined within

So these Galois adjoints relate logical conjunction to logical implication.

The general notion of adjoint functors involves, instead of an ‘if and only if’ between statements f(a)≤bf(a)\leq b and a≤g(b)a\leq g(b), a ‘natural equivalence’ between hom-sets D(FA,B){\bf D}(FA,B) and C(A,GB){\bf C}(A,GB), where F:C⟶DF:{\bf C}\longrightarrow{\bf D} and G:D⟶CG:{\bf D}\longrightarrow{\bf C} are now functors. We refer to AbramskyT; BaezStay in these volumes for an account on adjoint functors and the role they play in logic. We also recommend LambekScott on this topic.

The composite G∘F:C⟶CG\circ F:{\bf C}\longrightarrow{\bf C} of a pair of adjoint functors is a monad, and each monad arises in this manner. The posetal counterpart to this is a closure operator, of which the linear span in a vector space is an example.

The composite F∘G:D⟶DF\circ G:{\bf D}\longrightarrow{\bf D} of a pair of adjoint functors is a comonad. Comonads are an instance of the research area of coalgebra, of which comonoids are also an instance. The study of coalgebraic structures has become increasingly important both in computer science and physics. These structures are very different from algebraic structures: while algebraic structures typically would take two pieces of data aa and bb as input, and produce the composite a∙ba\bullet b, coalgebraic structures would do the opposite, that is, take one piece of data as input and produce two pieces of data as output, cf. a copying operation. Another example of a coalgebraic concept is quantum measurement. Quantum measurements take a quantum state as input and produces another quantum state together with classical data CPav2006.

There also is the area of higher-dimensional category theory, after which the nn-category cafe is named Cafe. Monoidal categories are a special case of bicategories, since we can compose the objects with the tensor, as well as the processes between these objects. There is currently much activity on the study of nn-categories, that is, categories in which the hom-sets are themselves categories, and the hom-sets of these categories are again categories etc. Why would we be interested in that? If one is interested in processes then one should also be in modifying processes, and that is exactly what these higher dimensional categorical structures enable to model. An excellent book on higher-dimensional category theory is Leinster.

We end by recommending the other chapters in these volumes entitled New Structures for Physics, which, among many other things, contain complementary tutorials on category theory and its graphical calculus AbramskyT; BaezStay; Selinger.

Acknowledgements

We very much appreciated the feedback from the nn-category cafe on a previous draft of this paper, by John Baez, Hendrik Boom, Dave Clarke, David Corfield and Aaron Lauda. We in particular thank Frank Valckenborgh for proofreading the final version.

References