Reasoning about modular datatypes with Mendler induction

Paolo Torrini
(KU Leuven)
Tom Schrijvers
(KU Leuven)

In functional programming, datatypes a la carte provide a convenient modular representation of recursive datatypes, based on their initial algebra semantics. Unfortunately it is highly challenging to implement this technique in proof assistants that are based on type theory, like Coq. The reason is that it involves type definitions, such as those of type-level fixpoint operators, that are not strictly positive. The known work-around of impredicative encodings is problematic, insofar as it impedes conventional inductive reasoning. Weak induction principles can be used instead, but they considerably complicate proofs.

This paper proposes a novel and simpler technique to reason inductively about impredicative encodings, based on Mendler-style induction. This technique involves dispensing with dependent induction, ensuring that datatypes can be lifted to predicates and relying on relational formulations. A case study on proving subject reduction for structural operational semantics illustrates that the approach enables modular proofs, and that these proofs are essentially similar to conventional ones.

In Ralph Matthes and Matteo Mio: Proceedings Tenth International Workshop on Fixed Points in Computer Science (FICS 2015), Berlin, Germany, September 11-12, 2015, Electronic Proceedings in Theoretical Computer Science 191, pp. 143–157.
Published: 9th September 2015.

ArXived at: http://dx.doi.org/10.4204/EPTCS.191.13 bibtex PDF
References in reconstructed bibtex, XML and HTML format (approximated).
Comments and questions to: eptcs@eptcs.org
For website issues: webmaster@eptcs.org