DeepAI AI Chat
Log In Sign Up

Efficient Mendler-Style Lambda-Encodings in Cedille

03/06/2018
by   Denis Firsov, et al.
The University of Iowa
0

It is common to model inductive datatypes as least fixed points of functors. We show that within the Cedille type theory we can relax functoriality constraints and generically derive an induction principle for Mendler-style lambda-encoded inductive datatypes, which arise as least fixed points of covariant schemes where the morphism lifting is defined only on identities. Additionally, we implement a destructor for these lambda-encodings that runs in constant-time. As a result, we can define lambda-encoded natural numbers with an induction principle and a constant-time predecessor function so that the normal form of a numeral requires only linear space. The paper also includes several more advanced examples.

READ FULL TEXT

page 1

page 2

page 3

page 4

05/24/2023

Preliminary investigations on induction over real numbers

The induction principle for natural numbers expresses that when a proper...
03/19/2019

Elaborating Inductive Datatypes and Course-of-Values Pattern Matching to Cedille

In CDLE, a pure Curry-style type theory, it is possible to generically d...
06/04/2019

Interpolating Strong Induction

The principle of strong induction, also known as k-induction is one of t...
11/29/2018

Course-of-Value Induction in Cedille

In the categorical setting, histomorphisms model a course-of-value recur...
07/01/2020

The Integers as a Higher Inductive Type

We consider the problem of defining the integers in Homotopy Type Theory...
05/01/2020

Efficient lambda encodings for Mendler-style coinductive types in Cedille

In the calculus of dependent lambda eliminations (CDLE), it is possible ...
01/15/2020

Circular Proofs in First-Order Linear Logic with Least and Greatest Fixed Points

Inductive and coinductive structures are everywhere in mathematics and c...

Code Repositories

generic-reuse

Source code accompanying the draft paper "Generic Zero-Cost Reuse for Dependent Types"


view repo