Previous lecture here.

Recall: there’s a species with

G(X) = {ways to totally order X and chop it into blocks of length 1 or 2}

For example,

We saw that

where is the n-th Fibonacci number. Note that ; it’s not . We also saw that which implies that . This would follow from if were a species with . Before, we talked about as the species of “being a k-element set”, with

but this gives that . What we now want is , the species of “being a totally-ordered k-element set”, with

so that .

To totally order X and chop it into blocks of length 1 or 2, you just

- see if , and stop if so; otherwise
- chop X into two subsets: the first with 1 element, and the second totally ordered and chopped into blocks of length 1 or 2; or
- chop X into two subsets: the first with 2 elements, and the second totally ordered and chopped into blocks of length 1 or 2.

Note that gave us . Going one level further, with gave us and the Fibonacci numbers.

Going yet one more level, we get the **tribonacci numbers**, which are those that follow

i.e. 1, 1, 1, 3, 5, 9, 17, 31, …

Indeed, there’s a species with , and we can show (using the same ideas) that , and that

= |{ ways to chop {0, … , n-1} into blocks of length 1, 2, or 3}|.

Let be the species with

B(X) = {binary rooted planar trees with leaves equipped with a bijection to X}

as in Lecture 3. Notice that

|B(n)|= n! |{binary rooted planar trees}|

since a B-structure on X is a total ordering along with a choice of binary rooted planar tree. For example, |B(5)| = 5! 5.

Here, , i.e. a tree with X-labelled leaves is either just a root, or given by chopping X into two subsets and putting a labelled tree structure on the leftover stuff. Using this, we see that gives

but since |B(0)| should be 0, not 1, we see that we want to take the root given by taking to be -. So write . For ,

and so

…

where we are using !! to denote the double factorial. More interesting is the fact that

= {number of trees with n leaves} = .

Next time, we’ll return to the Catalan numbers.

]]>We defined two binary operations on species :

**Addition**. ;

**Multiplication**. .

These obey and . In total, we’ll talk about five binary operations on species, the least useful of which is the **Cartesian product**: . Since

and

we see that

which is some poorly-understood operation on power series.

Recall that is the species “being a k-element set”: if |X|=k, and otherwise.

Let (TO for total order) be given by TO(X) is the set of total orders (aka “linear orders”, “orders”, “reflexive, transitive, antisymmetric, trichotonous relations”) on X.

For example

TO(3) = {[0 < 1 < 2], [0 < 2 < 1], [1 < 0 < 2], [1 < 2 < 0], [2 < 0 < 1], [2 < 1 < 0]}

so |TO(3)| = 6.

Note . What this says is “you can construct a total order on X by either: do nothing if X is empty, or select a single point of X and then totally order the rest of the set”.

To put a TO structure on X you can pick one element of X to be the least element, and then put a TO structure on . This doesn’t work for the empty set though, but if X is empty, then you’re already done. So . This is sort of like a recursive algorithm for totally ordering a set. Let’s use this to count total orderings now:

and so, rearranging, we get that

and so |TO(n)|=n!.

Notice that we used both subtraction and division, which are not really things that we can do with finite sets. The result, however, is obvious, since to totally order an n-element set we choose one element to be the least (n choices), then one to be the next least (n-1 choices), etc., so n(n-1)(n-2)…1=n! choices in total.

Let’s start with a sequence of numbers, turn it into a generating function, and then find a species with that generating function! All mathematicians are in love with the **Fibonacci numbers**, which are defined recursively by , and .

Let’s invent a power series coming from this sequence:

(note that there’s no n! here).

Now let’s turn the recursive definition into some fact about f.

so we see that , which we can rearrange to two different things: , which gives us a recursive definition for a species with f(x) as its generating function; and , which is the generating function.

Let’s actually see this function f(x) as the generating function of some species. Starting with the second recursive definition from above, let’s expand it, but we’re going to write it in a funny way:

Because we wrote it this funny way, we can see that each term is like a list of all the ways one could write a number as the sum of a sequence of 1’s and 2’s. So it describes a partition of an n-element totally ordered set into ordered blocks of size either 1 or 2.

**Exercises**:

1) Show that for some and , where is the golden ratio.

2) Expand and using geometric series formulas to get a closed form for .

3) Show that . In fact, is always the closest integer to .

Next time, we’ll continue with our analysis of the Fibonacci numbers using species.

]]>Last time, we looked at the relationship between species and their generating functions, a formal power series associated to a species which lets you count structures described by the species. Now we’ll take a closer look at species themselves. In particular, there is a category where the objects are species. As is the case in so many branches of math, looking at the category of our main objects of study will be a useful perspective.

There is a category of species, called , with species as objects and *natural transformations* as morphisms.

There is a subcategory of where the objects are *finite* species, denoted .

We’ve talked about functors in this class before, but not yet natural transformations. Recall: given categories and , a **functor** sends objects to objects , and morphisms in to morphisms in such that and .

If are functors, then a **natural transformation** assigns to each object a morphism in , such that the **naturality square**

commutes. If all the components are invertible, then we say that is a **natural isomorphism**.

**Proposition**: If is a natural isomorphism then there exists a natural transformation given by .

**Theorem**: If and are categories then there is a category whose objects are functors and whose morphisms are natural transformations, with composition of and given by .

**Example**: Let be defined as follows. For a finite set X, let P(X) be the set of all ways of performing the following procedure:

- draw a regular (|X|+1)-gon;
- label all but one of the sides with the elements of X;
- triangulate the polygon.

For example, here is an element of P(5):

**Example**: Let be the species defined as follows: for a finite set X, B(X) is the set of binary, planar, rooted trees whose leaves are equipped with a bijection to X, or **X-labelled trees** for short. For X=5, B(5) has an element like this:

**Theorem**: , i.e.\ the functors are naturally isomorphic

**Proof idea**: We need bijections for which are natural.

Given the tree in from the above example, let’s construct the corresponding element of . We start with a (5+1)-gon.

Rather than labelling sides, we’re going to label vertices that we place just outside of each side of the polygon (except for one that we place inside). So we draw vertices, label the top-most one `root’, and the others in the same order as the leaves of our element of .

Then we draw a copy of our tree inside the polygon.

Finally, we triangulate our polygon by crossing each branch of the tree exactly once.

**Theorem**: Let be finite species. If then .

Note that the converse is not true! In future lectures, we’ll look at examples of non-isomorphic species with the same generating functions.

**Proof**: If there’s a natural isomorphism , then there’s a bijection for all , so for all X, thus

.

In Lecture 4, we’ll begin to see how we can actually *use* species and their generating functions to solve problems in combinatorics.

Thanks to Tim Hosgood for helping me out with both pictures and typing!

There’s a category of species and there’s a set of generating functions. Just like F and , we’ll see how generating functions are a decategorification of species.

Let 0 denote the empty set, 1 denote the set {0}, 2 = {0,1}, etc. In general, for , let n denote {0, 1, … , n-1}. We can define all natural numbers this way. Representing the natural numbers this way is referred to as the von Neumann ordinals.

We use Set to denote the category of sets and functions, F to denote the category of finite sets and functions, and S to denote the category of finite sets and bijections.

**Definition**: A **species** is a functor . A **finite species** is a functor .

We can turn a finite set X into a number: its cardinality |X|. This is useful because in Set if and only if |X| = |Y|. What can we do that is like this for species? Given a species, we can cook up something called its *generating function*.

Let be the set of **formal power series**, which are expressions of the form

with .

Note: we don’t care about convergence of these series *at all*.

You can add and multiply these, and they obey the axioms of a commutative ring. Note: the polynomial ring is a subring of .

**Definition**: Given a finite species , its **generating function** is the formal power series |G| given by

.

**Example**: Let be the species of k-colorings of sets:

= {ways to color the set X with k colors} = .

Let’s figure out what the generating function is:

=

=

=

= .

**Example**: Let be the species that says “there is exactly one -structure on an n-element set if n=k, and no structures otherwise.” That is, is 1 if |X|=k, and 0 otherwise. This structure is really just a property, but we can still calculate its generating function:

= .

We can call the species of **being a k-element set**.

Let’s figure out how to add and multiply species, since already know how to add and multiply power series. Given finite species G and H, we want these operations on species to match up with the corresponding operations on formal power series in the following way:

|G+H| = |G|+|H| and |GH| = |G||H|.

**Definition**: Given two finite species , let be given by

(G+H)(X) = G(X)+H(X)

for a finite set X, and the obvious thing on bijections.

**Theorem**: |G+H|=|G|+|H|.

proof:

=

=

=

=

= .

Putting a (G+H)-structure on a finite set is the same as either putting a G-structure on it or putting an H-structure on it.

**Example**: .

What about GH? Note that this multiplication we’re going to talk about does *not* correspond to putting a G-structure *and* an H-structure on X. In fact, if it did, then it turns out we wouldn’t get |GH| = |G||H|. So let’s work backwards from this property!

=

then we cleverly substitute n=j+k to get

=

=

=

and so we want to define GH so that . Define GH to be the species whose structure comes from chopping X into two disjoint parts, putting a G-structure on the first part, and putting an H-structure on the second part.

**Example**: A -structure on a set X is where we chop X into two parts, then 1-color the first part, and then 2-color the second part. This is the same as just 3-coloring X, as we can show:

= =

= = .

Note that is *isomorphic*, but *not* equal, to .

In Lecture 3, we’ll talk about the *category* of species.

Larry Harper taught this course in the past. John is going to be talking about combinatorial species. He previously talked about species in his quantum gravity seminar. Textbooks referenced in the course:

*Generatingfunctionology*by Wilf*Introduction to the Theory of Combinatorial Species of Structure*by Bergeron, Labelle, and Leroux

There are a ton of answers to this question. So whatever you say, its probably wrong. Here are some possible answers:

- The art of counting.
- The study of structures on finite sets.
- The study of the category of finite sets.

Let F denote the category where the objects are finite sets, and the morphisms are functions.

Any finite set X has a *cardinality* |X|, the number of elements, and “counting” means computing |X|. Why do we care about cardinality? It turns out that two sets X and Y are isomorphic in F if and only if |X| = |Y|. If you are asking whether or not sets X and Y are isomorphic, you’re asking if there is a function which has an inverse . There could be a lot of isomorphisms, you might worry about finding a specific one. But counting reduces this problem to something simpler: a yes or no question of equality in the set of natural numbers, ℕ.

So counting reduces a question about a category to a question about a set. This is an example of something mathematicians do a lot, “decategorification”. If you want to get good at counting , you have to learn a lot about the category of finite sets. To prove things about numbers, we will go in the opposite direction, turn it into a statement about F, i.e. “categorification”.

If you haven’t already, you should read Categorification by Baez and Dolan, especially the parable of the shepherd in the introduction.

If k is a natural number, there is a structure called a *k-coloring* of a finite set X. It is given by a function . You think of the set {1, …, k} as a set of colors, and the function as assigning each point of X to a color.

You could ask how many k-colorings are there for some finite set X? The answer is . In general, we define . Really, this is the definition of exponentiation in ℕ.

Here are some other relationships between F and ℕ:

- |X × Y| = |X| |Y|, where × is the cartesian product
- |X ∐ Y| = |X| + |Y|, where ∐ is disjoint union, and + is addition
- |∅| = 0, ∅ is called the “initial object” of F
- |{x}| = 1, {x} is called a “terminal object” of F

Notice that there is a unique initial object, but there are tons of terminal objects in F.

A *pointed finite set* is a finite set X equipped with a chosen point, i.e. a function . You think of the image of the unique point x to be a distinguished element of X.

Note that this is similar to the first example because its expressed as a function, but its different because it is a function *into* X.

**Question**: how many ways are there to choose a point in X? **Answer**: |X|.

A *partition* of a finite set X is a collection of disjoint, non-empty subsets , such that .

**Question**: how many partitions does X have? **Answer**: if |X|=n, it’s the n-th *Bell number*.

This is not really an answer unless we know what a Bell number is. Let’s try just working out a few.

How many partitions of a 1-element set are there? Just 1.

How many partitions of a 2-element set are there? 2.

Nice pattern so far, let’s continue.

How many partitions of a 3-element set are there? 5.

Hmm, ok….

But we skipped something, we didn’t ask how many partitions of the empty set there are. You might think there are none, because if the parts of a partition must be nonempty, then you can’t form any parts from the empty set. However, there is nothing in the definition which says that the *set of parts* must be non-empty! So there is one partition of the empty set, the one with no parts. I won’t bother drawing it.

In general, what is a *kind* of structure that you can put on a finite set? André Joyal, a famous category theorist, answered this. He called it a *species*. Remember, we have the category F of finite sets and functions, but we need another category to define species.

Let S be the category with finite sets for objects, and bijections for the morphisms. A *species* is a functor .

In more elementary terms, it is a family of finite sets indexed by S. Each finite set X gets a set G(X), which we think of as the set of all structures of a given kind which you can put on X. For example, if our species is “3-colorings”, then .

You might ask why we define species this way in particular, functors S to F. So far we’ve only mentioned objects in our elementary description, but a functor must also send morphisms to morphisms. So for some in S (a bijection), G gives us . Returning to our 3-colorings example, from any 3-coloring of X, we can use f to obtain a 3-coloring of Y: .

Furthermore, for G to be a functor, we need and .

For 3-colorings, we can compute:

What about pointed sets? Let have H(X) = {ways of picking a point of X } = X. If we picked a point in X, and we have a bijection , we can use that to pick a point in Y. This gives our function .

- What is the number of partitions on an n-element set?
- How many triangulations of a convex polygon with n vertices are there? (by “triangulation” I mean drawing new edges between the vertices so that every open space has exactly 3 edges at its boundary)

In the lecture 2, we’ll talk about the relationship between species and generating functions, and operations on species.

]]>In undergrad, I focused heavily on topology. After getting deep into it, I realized I really liked algebraic topology and homotopy theory, and not so much differential topology and geometry. But when it came time to choose an advisor, I realized there were no homotopy theorists available.

My choices were to either accept some more geometry and differential stuff, or to work with John Baez. By this point, I knew that John had done higher category theory in the past, and was now interested in applied category theory. I was fully indoctrinated in the idea that I must do *pure* math though.

Luckily, his group met every Wednesday and it was open to anybody stopping by and hanging out. So I hung out for a bit to see what it was like. I ended up really liking what I was hearing, though I was super lost on terminology.

One day he told me that if I wanted to keep hanging out, I was going to have to start proving things. Later that session, he was saying “…and now we just need to prove this really is an operad. Oh hey, Joe, you wanna do that?”, so I took it. By the way, it was about certain ways of combining simple graphs. I didn’t know what an operad was, but I said I’d prove it.

So I went home, started reading, came back the next week with a proof. Then he said “Great! Now can you prove it for directed graphs? multigraphs? directed multigraphs? Loops or no?”. I thought that would be no problem, because the proof really didn’t use anything about being a simple graph, really just some basic combinatorial properties of graphs generally.

So I came back the next week with the construction of the operad generalized to anything with this list of properties I cooked up. After I explained all the properties and the way they relate, he said “Oh, that sounds like a lax symmetric monoidal functor…”

So I came back the next week with the properties formulated as a lax symmetric monoidal functor (FinBij, +) -> (Mon, x). We called this gizmo a *network model*. I told John “The construction of the operad involves this weird process I don’t know how to explain cleanly, where you bust open all the monoids and the elements become the objects of this symmetric monoidal category.” He said I should check out something called the “category of elements”.

So I came back the next week with the construction of the operad described by the Grothendieck construction. I told him there was something funny about this though because I have a symmetric monoidal category, but the Grothendieck construction doesn’t mention monoidal categories at all, and I couldn’t find anything about their relationship. So he told me to work it out for myself. So I did.

All this was part of a project John was working on with another student, Blake Pollard, and a company called Metron which had a contract with DARPA, specifically an employee named John Foley. So this work I was doing culminated in a paper whose authors are John, John, Blake, and myself.

- John Baez, John Foley, Joe Moeller, Blake Pollard,
**Network Models**, arxiv:1711.00037, 2017.

John and I agreed that it would be strange if nobody had considered the relationship between the Grothendieck construction and monoidal structures before, so he told me to send an email to the categories mailing list. I got one response, it was from Christina Vasilakopoulou. She said she had come up with something similar in her own research (completely unrelated to network theory by the way). By a very nice coincidence, unknown to me, she was about to start working at UCR the very next quarter!

Around the same time, I had been hanging around Metron for a few weeks, thinking about how to come up with more examples of network models to bring different types of networks and restrictions into our framework. In particular, I wanted a type of network which allowed you to remember the order in which the edges were added to the network. This turned out to be pretty tricky to fit into the framework because of the necessary symmetries involved. Of course I’d bounce ideas off of both Johns, and the other Baez students, but I basically figured this one out on my own. I give a construction for a *free* network model. I would describe this paper as idiosyncratic. This recently became my first published paper!

- Joe Moeller,
**Noncommutative Network Models**, arxiv:1804.07402, 2018. To appear in*Mathematical Structures in Computer Science*.

While I was writing that paper, Christina started working at UCR, and hanging out with the Baez group. We started talking about the monoidal Grothendieck construction, she taught me a ton of 2-category theory. After I sent *Noncommutative Network Models* out to a journal, we started working on a paper together. It turns out Mike Shulman had worked out a monoidal version of the Grothendieck construction before.

- Mike Shulman,
**Framed bicategories and monoidal fibrations**,*Theory and Applications of Categories*, Vol. 20, No. 18, 2008, pp. 650–738. TAC

But our construction looked a little different. This was a pretty fun period for me, because every time we would meet, we would have a bunch of ideas about things that correspond by our constructions, or else examples where it would naturally show up in algebra and network theory. Eventually, we had two different monoidal versions of the GC, and conditions for when they were equivalent, which realizes Shulman’s version as a special case.

- Joe Moeller, Christina Vasilakopoulou,
**Monoidal Grothendieck Construction**, arxiv:1809.00727, 2018.

I have another paper out after that (with John Baez), and three more irons in the fire at the moment (with John Baez again, with Jade Master for the first time, and another sole-author). I wouldn’t say those count as part of the story of how I got into my research though, so I’ll stop here.

]]>What am I going to tell you about addition that you don’t already know? Nothing. I’m just going to frame it in a way that lends itself to the story I’m trying to tell.

What is addition? You take some numbers, a, b, and you make up a new number, called a+b. You could take a bunch of numbers and make up a new number by repetition of the two-number version, call it . Taking a bunch of numbers is the same thing as a function .

Let k be a natural number. A partition of k is a list of numbers that add up to k. I’ll skip the rigor for this example… its pretty clear that lists of natural numbers and partitions of natural numbers are basically the same thing. The connection is you just add up the numbers in the list, and then call the list a partition of the sum.

So, yeah… this stuff is pretty trivial at this level. But that’s always how it goes, right? Well, it’s not completely trivial: there is no closed form for the number of partitions of an natural number.

I can’t transition to the next step up better than Baez and Dolan did in their paper Categorification:

Long ago, when shepherds wanted to see if two herds of sheep were isomorphic, they would look for an explicit isomorphism. In other words, they would line up both herds and try to match each sheep in one herd with a sheep in the other. But one day, along came a shepherd who invented decategorification. She realized one could take each herd and ‘count’ it, setting up an isomorphism between it and some set of ‘numbers’, which were nonsense words like ‘one, two, three, . . . ’ specially designed for this purpose. By comparing the resulting numbers, she could show that two herds were isomorphic without explicitly establishing an isomorphism! In short, by decategorifying the category of finite sets, the set of natural numbers was invented.

The categorification of adding natural numbers is taking the disjoint union of sets. You can take a pair of set, A, B, and take their disjoint union, which we write as A+B to emphasize the analogy. We could take a bunch of sets like we did with numbers, and take their disjoint union too . Taking a bunch of sets is same thing as a functor , where we’re thinking of the set {1, …, n} as a category with only identity morphisms.

**Definition**: A *multiset* is a set X and a functor . A *multifunction* between two multisets (X,f) and (Y,g) is a function and a natural transformation as below. Let MSet denote the category of multisets and multifunctions.

If you like the word “presheaf”, a multiset is a presheaf on a discrete category. Note that naturality of is trivial since X is discrete. Thus you get one of these by gathering any old collection of functions that fit the types.

In simple terms, a multiset is a family of sets , and a multi function is a function between the indexing sets , and a family of functions . These multisets don’t just have multiple copies of an element sitting together, it’s like there’s an address system built in that tells you where each copy lives, so you can distinguish between them. Maybe I risk running this analogy into the ground, but its like each x in X gives a town in a county, and you can have multiple people named Joe living in the same county, but at most one per town!

A multifunction has to use this address system. The part assigns each town in (X,f) to a town in (Y,g), and then assigns each person in town to a person in the corresponding town … Maybe this analogy is getting a little weird…

If we take the disjoint union of the sets in a multiset (X,f), we lose some of the information. We lose the distinction between the different sets. What we get is just a set with cardinality equal to the sum of the cardinalities. There’s another way you could record this information though. Define a function which sends each element to the index of the set it originally comes from. Then the preimage of an element x is precisely the set . In the towns and counties analogy, this is record of which town each person in the county lives in. It’s easy to see this really just a different way of recording the exact same data as a multiset. What we’re really talking about now is the *arrow category* of the category of sets. This has functions for the objects, and commutative squares of functions as the morphisms.

**Theorem**: MSet is equivalent to the arrow category of Set.

I told you how to turn a multiset into a function. If is a multifunction as above, I get a commutative square like this:

where is a function you get by combining all the ‘s in an obvious way. You can get this from universal property of the coproduct, but I’ll let you figure that out. The fact that this commutes just comes directly from the fact that is a function from to .

I’ll just describe the inverse of this functor and move on. Given an object of the arrow category of Set, i.e. a function , we can define a functor by sending an element x in X to . That’s sufficient to define a functor since X is a discrete category. I’ll abuse notation and call this functor . Given a morphism in the arrow category of Set, i.e. a commutative square:

we can define a multifunction like this:

where is given by restricting to . We can corestrict to that codomain by commutativity of the square.

An easy naive way to categorify something is to replace all the sets in it with categories. In the last section, we considered multisets as functors where X is some set. So the obvious thing to try out if we want to go up another level is functors where X is a category. Mostly because of some motivating examples I’ll explain later, we actually want to consider contravariant functors, i.e. . Described more simply, we have an indexing category, X, and for each object x in X, we have a category , and for each morphism in X, we get a functor . It’s reasonable then that these things are called **indexed categories**.

So now our towns have streets, and our county has highways between the towns!

To a degree, this setup is fine. There is a naivete to it, but the story works out mostly the same as the real deal. I’ll describe the real deal in the next paragraph, but it involves 2-category theory. If you aren’t comfortable with that stuff, feel free to skim or skip the next paragraph and continue reading.

The naivete of this attempt is that we should bump categories in the multisets stuff to 2-categories. In multisets, X was a set, and we bumped it up to a category really just because the collection of sets naturally wants to be a category. We could have just as well have said that a multiset was a function , if you don’t mind that one of those isn’t a set. In the same way, the collection of categories naturally wants to be a 2-category, so we should bump the category X up to a 2-category and consider the corresponding type of thing that can go . A slight snag here is that we actually have enough room now to have multiple option of things that could be considered as naturally fitting into this situation. I’ll just assert that the right thing to pick is a *pseudofunctor*, which is like a 2-functor, but only associative up to isomorphism.

In the last section, we transformed multisets into an equivalent form of data by taking the disjoint union of all the pieces of a multiset, and remembering the distinction with a function back to the indexing set. Maybe we could do the same thing here? Given an indexed category , we can turn it into a single category by taking the disjoint union of the pieces . And we can get a functor by sending everything in to x.

Oops. There’s something clearly missing from this picture. This picture of the county doesn’t contain any info about the highways! How can we retain the information about the highways in the county map, where the only things we can draw are places and streets between them? You can draw in a new street for everywhere you can get between cities that involves taking a highway. Now it’s time for the definition of the Grothendieck construction.

**Definition**: Given an indexed category , define a category where

- objects are pairs (x, a) where x is an object of X and a is an object of
- morphisms are pairs where is a morphism in X, and is a morphism in
- composition is given by

I’m claiming that this will solve our problem of the missing highways. First, notice that the objects of are exactly the disjoint union of the objects of the ‘s. What about the morphisms? If was a morphism in , i.e. a morphism in one of the ‘s, then it is also in , but now its called . So is sitting inside of .

This is essentially keeping track of the information that the highways added to the map, but in this new map where you only have one type of road.

The formula for composition would look a little more complicated if we were doing it for pseudofunctors instead of functors, but the idea is the same. The formula might seem a little goofy, but actually it’s completely natural! I always remember it by drawing out this picture for morphisms and :

We are still able to define a functor like this:

where you send an object (x,a) to x, and a morphism (f,g) to f. In fact, this functor has a nice lifting property which makes it a *fibration* of categories, and we say that is fibred over X. I won’t get into exactly what this lifting property is, but its precisely what is needed to take all the arrows that cross the dotted lines in the picture above, and turn them into a functor between those two subcategories.

**Theorem**: The 2-category of X-indexed categories is 2-equivalent to the 2-category of categories fibred over X.

I already described one direction of this equivalence (that’s the Grothendieck construction). The inverse is given by sending an object x of X to its *fibre*, which is basically its preimage subcategory.

I plan on writing a sequel to this with some examples I have in mind that I think give a lot of the flavor of what the Grothendieck construction can do.

]]>Last time: for an abelian category A, C(A) is the category of complexes in A. Say are homotopic, f~g, if there are maps such that .

Definition The **homotopy category** K(A) of A is the category with objects complexes of A, and morphisms are homotopy classes of morphisms of complexes. The motivation for this is from algebraic topology, where there is a homotopy category of topological spaces, hTop, where the objects are topological spaces and the morphisms are homotopy classes of continuous maps.

**Example** Singular cochains gives a functor .

Let . Note that the squares formed by an element of this set do not necessarily have to commute. Then we get a complex . Let . Note that for , is in the kernel of iff iff f~0. Thus .

We also defined the mapping cone for a map .

**Proposition/Exercise** For a map of complexes in A, the following are equivalent:

- f~0
- f factors through the canonical map
- f factors through the canonical map
- the sequence splits

**Corollary** If and f~g, then for each i. Hence, we get well-defined cohomology functors, where .

**proof** If f~0, then f factors through which is acyclic!

**Corollary** Every homotopy equivalence (i.e. isomorphism in K(A)) is a quasi-isomorphism.

Note that K(A) (nor the derived category D(A), as we will see) is an abelian category! It is a *triangulated category*.

**Lemma** Given a map of complexes in A, we get the sequence

The composite of any two consecutive maps is zero in K(A).

**proof** The composite of is zero on the nose. For , then

So factors through , so . Similar for .

Definition A **triangle** in an additive category with a shift funcor [1] is a sequence , such that is the long sequence, any two consecutive maps compose to zero.

So is a triangle in K(A).

A** morphism of triangles **is a commutative diagram:

In K(A), a **standard** **triangle** is one of the form . An **exact** **triangle** in K(A) is one that is isomorphic to a standard triangle.

**Proposition** Exact triangles satisfy:

- for any map there is an exact triangle and is an exact triangle
- If is an exact triangle, so are its rotations and
- Direct sum of exact triangles is exact
- Given two exact triangles , and , and morphisms and such that the square commutes, then there exists a map making this collection of maps a map of triangles

Last time: global sections functor is left exact. We’ll leave sheaves for now to look at derived categories. What do sheaves have to do with cohomology?

**Poincare Lemma**: Let M be a manifold. Consider the following complex of sheaves:

where d is the de Rham differential, and consists of smooth functions. This complex is a resolution of the constant sheaf !

Then apply :

This is a chain complex of real vector spaces. The cohomology of this complex is the de Rham cohomology:

This construction is analogous to the definition/construction of Ext groups! Let X be a k-module, and given another k-module Y take a projective resolution of Y:

Apply Hom(X, -) to this resolution to get a complex

Then let .

Exercise: The k-module doesn’t depend on the choice of resolution.

and are examples of derived functors.

Definition: A **complex** in an abelian category is a sequence

such that for any i. A **homomorphism of complexes** is a collection of maps such that all the squares commute.

Let C(A) be the category of complexes in A. Note the kernel and cokernel are given by and . For each i, we have a functor given by , the *i***th cohomology** of .

Definition: If , let be the **shifted complex** and .

Why the sign? We want things to be “graded-commutative”, i.e. if s, t are homogeneous operators, then , |[n]| = n, |d|=1. Whereas has degree 0 .

Note for abelian category A that by . This makes A a full subcategory of C(A).

Definition: A homomorphism f of complexes is a **quasi-isomorphism** if the map f induces on cohomology is an isomorphism.

Definition: A complex is **acyclic** if it is quasi-isomorphic to 0, i.e. for all i.

Definition: The **mapping cone** of is the complex C(f) where and .

Check that this is a complex.

Exercises:

- C(f) is functorial.
- there is a short exact sequence
- Let K = ker(f), Q = cok(f). Then

- If f is injective (resp. surjective) then (resp. ) is a quasi-isomorphism.
- If f is an isomorphism, then C(f) is acyclic.
- For any i, the short exact sequence above induces exact

Definition: A map is **null-homotopic** if there is a map such that for each i.

We say f and g are **homotopic**, and write f~g, if f-g is null-homotopic.

Note if f~0, then and for any h, g.

Definition: The **homotopy category** K(A) of an abelian category A is the category with complexes of A for objects, and homotopy classes of complex homomorphisms for morphisms .