Monotone recursive types and recursive data representations in Cedille

Christopher Jenkins, Aaron Stump
1/9/2020
cs.PLcs.LO

Official code: cedille/cedille-developments (38 stars, Haskell, last commit 2025-06-10).

Abstract

Guided by Tarksi's fixpoint theorem in order theory, we show how to derive monotone recursive types with constant-time roll and unroll operations within Cedille, an impredicative, constructive, and logically consistent pure typed lambda calculus. This derivation takes place within the preorder on Cedille types induced by type inclusions, a notion which is expressible within the theory itself.

Show full abstract

As applications, we use monotone recursive types to generically derive two recursive representations of data in lambda calculus, the Parigot and Scott encoding. For both encodings, we prove induction and examine the computational and extensional properties of their destructor, iterator, and primitive recursor in Cedille. For our Scott encoding in particular, we translate into Cedille a construction due to Lepigre and Raffalli that equips Scott naturals with primitive recursion, then extend this construction to derive a generic induction principle. This allows us to give efficient and provably unique (up to function extensionality) solutions for the iteration and primitive recursion schemes for Scott-encoded data.

View on arXivView PDF

Code Implementations(1)

A showcase of interesting code and proof developments in Cedille

384HaskellJul 10, 20181 years ago

Similar Papers

Cite this paper

@article{jenkins2020monotone,
  title  = {Monotone recursive types and recursive data representations in Cedille},
  author = {Christopher Jenkins and Aaron Stump},
  year   = {2020},
  eprint = {2001.02828},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2001.02828}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2001.02828.svg)](https://codeofpaper.com/paper/2001.02828)

Discussion