Definition
An indexed container generalizes standard the standard notion container to represent dependent inductive families. Given an index type , an indexed container is specified with three components:
- , the family of shapes or constructors for each index.
- , the family of arities or positions for each constructor.
- , the function assigning an index to each recursive subtree.
Definition
An indexed container over is given by a record, written , where:
- specifies shapes.
- specifies positions.
- specifies child indices.
Indexed Container Functor
Every indexed container freely generates an Indexed Functor . The action on an indexed family is given by:
The action on morphisms applies post-compositionally to the subtree assignment:
Initial Algebra
We define the indexed W-type as the carrier of the initial Indexed Algebra for the functor . The introduction rule is the algebra structure map:
The dependent elimination principle for states that for any displayed family equipped with a displayed algebra structure , there exists a unique section in the category of algebras:
The displayed algebra structure corresponds exactly to the inductive step function, requiring that the motive holds for the parent node given that it holds for all recursive children at indices .