PS

Inductive type

Fixed point, 不動点

関数  f について、fixed pointとは、

  •  f(x) = x

を満たす  x のこと。これをendofunctorに拡張する。

Endofunctor  F について、 fixed pointとは、

  •  a : F(A) \cong  A

を満たす  (A, a) のこと。

Initial algebra

 F \unicode{x2013} \mathcal{Alg} のinitial objectのこと。

Lambek's theorem

  • initial algebraはfixed point

証明は簡単。

Inductive type

Initial algebraはleast fixed pointと考えられる。 これでinductive typeを定義できる。たとえば、

  •  F _ a : \mathcal{Hask} \rightarrow \mathcal{Hask}
  •  F _ a(r) = () \mid (a, r)

から、 \text{List} _ a \in \mathcal{Hask} _ 0 を次のように定義できる。

  •  (\text{List} _ a, (\text{Nil} _ a, \text{Cons} _ a)) := \text{initial algebra of } F _ a

Initial algebraの存在の証明は手間がかかる(模様)。

Catamorphism

Initial algebraのmediating morphismのこと。

参考文献

*1:mediating morphismの取り出し