[This is the fifth in a series of posts about combinatorial species. Previous posts: And now, back to your regularly scheduled combinatorial species; Decomposing data structures; Combinatorial species definition, Species definition clarification and exercises.]
Recall that a species is a functor from , the category of finite sets and bijections, to ,1 the category of finite sets and total functions. (Equivalently, species are endofunctors on , but in this post I’m going to want to think about them as the former.) That is, a species is a mapping sending every set of labels to a set of structures , which also lifts relabelings to functions in a way that respects the compositional structure of bijections.
However, as I hinted in a previous post, it’s inconvenient to work directly with this definition in practice. Instead, we use an algebraic theory that lets us compositionally build up certain species from a collection of primitive species and species operations. (It’s important to note that it does not allow us to build all species, but it does allow us to build many of the ones we care about.)
In this post we’ll begin by examining a few natural species to take as primitive.
The zero or empty species, denoted , is the unique species with no structures whatsoever; that is,
Of course, will turn out to be the identity element for species sum (which I’ll define in my next post, though it’s not hard to figure out what it should mean).
The unit species, denoted , is defined by
That is, there is a unique -structure indexed by the empty set of labels, and no -structures with any positive number of labels. lifts bijections in the obvious way, sending every bijection to the appropriate identity function.
Some people initially find this definition surprising, expecting something like for all instead. That is indeed a valid species, and we will meet it below; but as I hope you will come to see, it doesn’t deserve the name .
Of course we should also verify that this definition satisfies the requisite functoriality properties, which is not difficult.
More abstractly, for those who know some category theory, it’s worth mentioning that can be defined as , that is, the covariant hom-functor sending each finite set to the (finite) set of bijections . (This is why I wanted to think of species as functors . I learned this fact from Yeh (1986).) There is, of course, a unique bijection and no bijections for nonempty , thus giving rise to the definition above.
As you might expect, will be the identity element for species product. Like itself, species product isn’t defined quite as most people would initially guess. If you haven’t seen it before, you might like to try working out how product can be defined in order to make an identity element.
The singleton species, denoted , is defined by
with lifting of bijections defined in the evident manner. That is, there is a single -structure on a label set of size (which we identify with the label itself, though we could have also defined when ), and no -structures indexed by any other number of labels.
As with , we may equivalently define as a hom-functor, namely .
It’s worth noting again that although and do “case analysis” on the label set , they actually only depend on the size of ; indeed, as we noted previously, by functoriality this is all they can do.
The species of bags2, denoted , is defined by
that is, there is a single -structure on any set of labels , which we usually identify with the set of labels itself (although we could equivalently define ). The idea is that an -structure consists solely of a collection of labels, with no imposed ordering whatsoever.
If you want to abuse types slightly, one can define as a hom-functor too, namely . (Yeh (1986) actually has , but that’s wrong.)
As a summary, here’s a graphic showing -, -, -, and -structures arranged by size (i.e., the size of the underlying set of labels ): a dot indicates a single structure, and the size of the label set increases as you move to the right.
Just as a teaser, it turns out that and are identity elements for certain binary operations on species as well, though you’ll have to wait to find out which ones!
Next up, addition!
Yeh, Yeong-Nan. 1986. “The calculus of virtual species and K-species.” In Combinatoire énumérative, ed. Gilbert Labelle and Pierre Leroux, 1234:351–369. Springer Berlin Heidelberg. http://dx.doi.org/10.1007/BFb0072525.