notifications

Inductive Type

Definition

F(μX.F)μX.F(X)F(X)XμX.F(X)X

[bahareh-afshari-2019]

F:UU,(A,B:U)(AB)F(A)F(B).(X:U)(F(X)X)μFX.𝟎,F(𝟎),F(F(𝟎)),(X:U)(XF(X))XνF.𝟏,F(𝟏),F(F(𝟏)),

Induction Principle

(F(X)X)μFX.

Coinduction Principle

(XF(X))XνF.

[xavier-leroy-2019]

𝟏νX.X.𝟎μX.X.

[bahareh-afshari-2019]

Inductive Types

Church Data Type (iterative), in λ2

AλX.(F(X)X)X

Scott Data Type (case), in λ2μ

AλX.(F(A)X)X

Church-Scott Data Type (primitive recursive), in λ2μ

AλX.(F(A×X)X)

Coinductive Types

[herman-geuvers-2015]

μ

𝟏+𝟏

𝟐, boolean.

[herman-geuvers-2014]

𝟏+A

Option, or maybe.

[andreas-abel-2013]

𝟏+X

μX. 𝟏+X.

Church-Scott

λA.A(AA)A.μX.λA.A(XA)A.μX.λA.A(XAA)A.

[herman-geuvers-2014], [herman-geuvers-2015]

𝟏+(A×X)

List.

[thorsten-altenkirch-2004]

Church-Scott

λA.A(XAA)A

[herman-geuvers-2014]

𝟏+(A×X×X)

Binary tree.

[thorsten-altenkirch-2004]

Church-Scott

λX.(AX)(BXXX)X.

[herman-geuvers-2014]

A+(A×X)+(X×X)

Lambda calculus.

[yigal-duppen-2000]

𝟏+X+(X)

Ordinals.

[thorsten-altenkirch-2004]

𝟏+(X×Y)

F tree.

[thorsten-altenkirch-2004]

ν

A×X

Stream.

[andreas-abel-2013]

Church-Scott

λ2

X.X×(XA×X)

λ2μ

μY.X.X×(XA×(X+Y))

[herman-geuvers-2014]

𝟐×(AX)

Deterministic automata.

[alexander-kurz-2018]

A×(BX)

W-types.

[thorsten-altenkirch-2004]

μ_.(𝟏+A×X)

Colist.

[andreas-abel-2013]

×(μX.𝟏+A×X)

Vector.

[andreas-abel-2013]

Polynomial Functors

F(X)(a:A)×B(a)X.List(A)(n:)×Fin(n)A.

[simon-hudon-2019]

Quotients of Polynomial Functors

  1. abs:P(A)F(A), (abstraction)
  2. repr:F(A)P(A)
  3. (x:F(A))abs(repr(x))=x.

The class of QPFs is closed under:

  • composition
  • quotients
  • initial algebras
  • final colagebras

In particular, finset and multiset are QPFs.

[simon-hudon-2019]

References