Idea

Minimal form of indexed inductive types, formed as the initial algebra over an indexed containers.

Definition

An indexed W-type generalizes standard W-types to represent dependent inductive families. Given an index type , an indexed W-type is specified by a Polynomial Functor over the slice category over . We define it using four parameters:

  1. , the type of indices.
  2. , the family of shapes or constructors for each index.
  3. , the family of arities or positions for each constructor.
  4. , the function assigning an index to each recursive subtree.

The indexed W-type is defined by the following rules.

Formation

Introduction

The canonical constructor takes an index , a shape , and a function producing subtrees of the correct recursive indices prescribed by .

Elimination

To eliminate into a motive , we require an inductive step function.

\text{ind} : & \prod_{i:I} \prod_{a:A(i)} \prod_{f:\prod_{b} W(C(i,a,b))} \left( \prod_{b:B(i,a)} P(C(i,a,b), f(b)) \right) \to P(i, \sup(i, a, f)) \\ & \to \prod_{i:I} \prod_{w:W_{I}^{A,B,C}(i)} P(i, w) \end{aligned}$$ ### Computation The computation rule states that eliminating a canonical $\sup$ term applies the step function to the recursive inductive applications. $$\text{ind}(\text{step}, i, \sup(i, a, f)) \equiv \text{step}(i, a, f, \lambda b. \, \text{ind}(\text{step}, C(i,a,b), f(b)))$$ ## See also * [[Homotopy Type Theory]] * [[W Type|W-type]] * [[Indexed Inductive Type]] ## References [[altenkirch2009-indexed-containers]]