« Diagrams 0.6 » The Dawn of Software Engineering

The algebra of species: primitives

Posted on January 7, 2013
Tagged , , , , , ,

[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 \(\mathbb{B}\), the category of finite sets and bijections, to \(\mathbb{E}\),1 the category of finite sets and total functions. (Equivalently, species are endofunctors on \(\mathbb{B}\), but in this post I’m going to want to think about them as the former.) That is, a species \(F\) is a mapping sending every set of labels \(U\) to a set of structures \(F[U]\), which also lifts relabelings \(\sigma : U \leftrightarrow V\) to functions \(F[\sigma] : U \to V\) 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.

As a summary, here’s a graphic showing \(\mathbf{0}\)-, \(\mathbf{1}\)-, \(\mathbf{X}\)-, and \(\mathbf{E}\)-structures arranged by size (i.e., the size of the underlying set of labels \(U\)): 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 \(\mathbf{X}\) and \(\mathbf{E}\) 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!

References

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.


  1. Last time I called this category \(\mathbf{FinSet}\), but \(\mathbb{E}\) is more concise and matches the species literarure.↩︎

  2. The species literature calls this the species of sets, but that’s misleading to computer scientists, who expect the word “set” to imply that elements cannot be repeated.↩︎