/qpf

Datatypes as quotients of polynomial functors

Primary LanguageLeanApache License 2.0Apache-2.0

Datatypes as Quotients of Polynomial Functors

This repository contains work in progress by Jeremy Avigad, Mario Carneiro, and Simon Hudon.

In analogy to Isabelle's bounded natural functors, we represent datatypes as quotients of polynomial functors. The file qpf.lean shows that every qpf has an initial algebra and a final coalgebra, and that compositions and quotients of qpfs are again qpfs. It should compile with any recent version of Lean's mathlib.

(The constructions depend on M-type constructions which we have also carried out in Lean, but, at the moment, they are assumed axiomatically in qpf.lean.)

We are working on a multiple-arity version of qpfs, and showing that the qpf structure is preserved under the initial algebra and final coalgebra constructions.

For more information, see this talk: http://www.andrew.cmu.edu/user/avigad/Talks/qpf.pdf.