Polynomial functor (type theory)

From testwiki
Jump to navigation Jump to search

In type theory, a polynomial functor (or container functor) is a kind of endofunctor of a category of types that is intimately related to the concept of inductive and coinductive types. Specifically, all W-types (resp. M-types) are (isomorphic to) initial algebras (resp. final coalgebras) of such functors.

Polynomial functors have been studied in the more general setting of a pretopos with Σ-types;[1] this article deals only with the applications of this concept inside the category of types of a Martin-Löf style type theory.

Definition

Let Template:Var be a universe of types, let Template:Var : Template:Var, and let Template:Var : Template:VarTemplate:Var be a family of types indexed by Template:Var. The pair (Template:Var, Template:Var) is sometimes called a signatureTemplate:Sfn or a container.Template:Sfn The polynomial functor associated to the container (Template:Var, Template:Var) is defined as follows:Template:SfnTemplate:SfnTemplate:Sfn

P:UUXa:A(B(a)X)

Any functor naturally isomorphic to Template:Var is called a container functor.Template:Sfn The action of Template:Var on functions is defined by

P:(XY)(PXPY)f((a,g)(a,gf))

Note that this assignment is only truly functorial in extensional type theories (see #Properties).

Properties

In intensional type theories, such functions are not truly functors, because the universe type is not strictly a category (the field of homotopy type theory is dedicated to exploring how the universe type behaves more like a higher category). However, it is functorial up to propositional equalities, that is, the following identity types are inhabited:

P(fg)=PfPgP(𝗂𝖽X)=𝗂𝖽PX

for any functions Template:Var and Template:Var and any type Template:Var, where 𝗂𝖽X is the identity function on the type Template:Var.Template:Sfn

Inline citations

Template:Reflist

References