Inductive Type
Definition
Induction Principle
Coinduction Principle
Inductive Types
Church Data Type (iterative), in λ2
Scott Data Type (case), in λ2μ
Church-Scott Data Type (primitive recursive), in λ2μ
Coinductive Types
μ
𝟏 + 𝟏
𝟐, boolean.
𝟏 + A
Option, or maybe.
𝟏 + X
Church-Scott
[herman-geuvers-2014], [herman-geuvers-2015]
𝟏 + (A × X )
List.
Church-Scott
𝟏 + ( A × X × X )
Binary tree.
Church-Scott
A + ( A × X ) + ( X × X )
Lambda calculus.
[yigal-duppen-2000]
𝟏 + X + (ℕ → X )
Ordinals.
𝟏 + ( X × Y )
F tree.
ν
A × X
Stream.
Church-Scott
λ2
λ2μ
𝟐× (A → X )
Deterministic automata.
A × (B→ X )
W-types.
μ _.(𝟏 + A × X )
Colist.
ℕ × (μ X.𝟏 + A × X )
Vector.
Polynomial Functors
Quotients of Polynomial Functors
The class of QPFs is closed under:
- composition
- quotients
- initial algebras
- final colagebras
In particular, finset and multiset are QPFs.
References
- Bahareh Afshari, Gerhard Jäger, Graham E. Leigh. An Infinitary Treatment of Full μ-Calculus. 2019.
- Simon Hudon. Datatypes as Quotients of Polynomial Functors. 2019.
- Xavier Leroy. Sisyphus Happy: Infinite Data Types, Proofs by Coinduction, and Reactive Programming. 2019.
- Ambrus Kaposi. A Syntax for Higher Inductive Inductive Types (HIITs). 2018.
- Alexander Kurz. An Introduction to Coalgebra in Four Short Lectures and Two Long Appendices. 2018.
- Jakob Vidmar. Polynomial Functors and W-Types for Groupoids. 2018.
- Niels van der Weide. Higher Inductive Types. 2016.
- Andreas Abel, Brigitte Pientka, David Thibodeau, Anton Setzer. Copatterns: Programming Infinite Structures by Observations. 2013.
- Michael Abbott, Thorsten Altenkirch, Neil Ghani1. Representing Nested Inductive Types Using W-Types. 2004.