« Blogging again, & some major life events » Pan-Galactic Division in Haskell

Polynomial Functors Constrained by Regular Expressions

Posted on April 15, 2015
Tagged , , , , , ,

I’ve now finished revising the paper that Dan Piponi and I had accepted to MPC 2015; you can find a PDF here:

Polynomial Functors Constrained by Regular Expressions

Here’s the 2-minute version: certain operations or restrictions on functors can be described by regular expressions, where the elements of the alphabet correspond to type arguments. The idea is to restrict to only those structures for which an inorder traversal yields a sequence of types matching the regular expression. For example, \((aa)^*\) gives you even-size things; \(a^*ha^*\) gives you the derivative (the structure has a bunch of values of type \(a\), a single hole of type \(h\), and then more values of type \(a\)), and \(b^*ha^*\) the dissection.

dissected-tree

The punchline is that we show how to use the machinery of semirings, finite automata, and some basic matrix algebra to automatically derive an algebraic description of any functor constrained by any regular expression. This gives a nice unified way to view differentiation and dissection; we also draw some connections to the theory of divided differences.

I’m still open to discussion, suggestions, typo fixes, etc., though at this point they won’t make it into the proceedings. There’s certainly a lot more that could be said or ways this could be extended further.