Towards an induction principle for nested data types

06/16/2023
by   Peng Fu, et al.
0

A well-known problem in the theory of dependent types is how to handle so-called nested data types. These data types are difficult to program and to reason about in total dependently typed languages such as Agda and Coq. In particular, it is not easy to derive a canonical induction principle for such types. Working towards a solution to this problem, we introduce dependently typed folds for nested data types. Using the nested data type Bush as a guiding example, we show how to derive its dependently typed fold and induction principle. We also discuss the relationship between dependently typed folds and the more traditional higher-order folds.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/17/2021

(Deep) Induction Rules for GADTs

Deep data types are those that are defined in terms of other such data t...
research
06/13/2018

Dependently Typed Folds for Nested Data Types

We present an approach to develop folds for nested data types using depe...
research
01/09/2020

Monotone recursive types and recursive data representations in Cedille

Guided by Tarksi's fixpoint theorem in order theory, we show how to deri...
research
06/25/2020

Generating induction principles and subterm relations for inductive types using MetaCoq

We implement three Coq plugins regarding inductive types in MetaCoq. The...
research
03/28/2022

How Functorial Are (Deep) GADTs?

It is well-known that GADTs do not admit standard map functions of the k...
research
07/02/2022

LibNDT: Towards a Formal Library on Spreadable Properties over Linked Nested Datatypes

Nested datatypes have been widely studied in the past 25 years, both the...
research
01/13/2021

Parametricity for Nested Types and GADTs

This paper considers parametricity and its consequent free theorems for ...

Please sign up or login with your details

Forgot password? Click here to reset