next up previous
Next: Dual trees Up: Partial constructions Previous: Partial constructions

   
Inductive construction

Given a quadruple, one can define a family of sets of `leafless' well-founded trees (T(a) for a:A) as the least solution (with respect to pointwise inclusion between families of sets with the same index) of

\begin{displaymath}\forall a : A . \;
T(a) = \{ \; \mbox{$\mathit{sup}$ }_T (b,...
...ert \; b : B(a),
\phi : \Pi_{ c : C(a,b) } T(d(a,b,c)) \; \}
\end{displaymath}

where $\mbox{$\mathit{sup}$ }_T$ is a constructor. Each set T(a) is given as a generalised sum ($\Sigma$) of generalised products ($\Pi$), where the factors in the product are other sets T(d(a,b,c)). This is Petersson and Synek's construction in ``A set Constructor for Inductive Sets in Martin-Löf's type theory'' LNCS 389. Note that the `tips' of such a tree are of the form $\mbox{$\mathit{sup}$ }_T(b,\phi)$ where the domain of $\phi$ is empty. If C(a,b) is never empty, there are no tips and hence no trees.

The family T of sets of trees is somehow of central interest. However we get a construction which is even more useful, if we allow the trees to be `incomplete', or to have leaves. This section gives two metaphors for thinking about trees of the extended family, and then the definition of the `star' construction, which includes the definition of the family.

construction metaphor
A `plastic' metaphor: think of constructions made from the following components, or constructors. These are something like the bricks in a `construction kit' for children, in that there are pegs, and holes they can plug into. Each constructor has a single peg, and some number (maybe zero) of holes, in various locations. The pegs and holes are of various disjoint shapes: triangular, square, round, and so on. The pegs and holes are rigid: only a peg with the right shape will fit in a given hole. The constructors also are rigid: they cannot for example bend round and plug into themselves. (It would be interesting to explore that kind of `hermaphrody', if there is such a word. People with dirty minds should maybe skip the rest of this plastic metaphor.) You make constructions by putting constructors together, in such a way that pegs plug into holes of the same shape: a construction has a single `output' component that isn't plugged into anything. Constructions can be built `bottom-up', by adding a new output component to a family of pre-existing constructions, leaving any holes in them alone. However, they can also be thought of as built `top-down' by plugging a new input component into a previously unplugged hole, leaving the output component alone. In the metaphor, A is the set of shapes, B(a) is the set of constructors or nodes with output shape a, and C(a,b) is the set of locations in a constructor b at which there are holes. The indexed family $\{\; d(a,b,c) \; \vert \; c : C(a,b) \; \}$ is the set of shapes of the holes in b, indexed by their location.

tree metaphor
This is an pictorial, arboreal metaphor. Think of trees consisting of nodes and directed arrows. Nodes are leaves, or interior. An arrow originates at an interior node. An arrow may or may not terminate; if it does, it terminates at a node (interior or leaf). There must be exactly one root node at which no arrow terminates, and the tree condition must hold. As for the labelling, the nodes are labelled with A's, and the terminating arrows from a node with label a are labelled with pairs

\begin{displaymath}\langle b, c \rangle : \Sigma b : B(a). C(a,b)
\end{displaymath}

The unterminated arrows are labelled simply with elements of B(a). The labelling has to be such that the label of the destination node of a terminating arrow is given by the d function. Given a tree labelled in this way, the terminal objects are divided into 3 kinds:
1.
nodes labelled by a for which B(a) is empty. These are dead nodes.
2.
unterminated arrows from a node labelled by a, that are themselves labelled by b for which C(a,b) is empty. These are dead arrows.
3.
leaf nodes.

By a forest, I mean a function whose values are trees, and whose arguments can be thought of as locations. Trees can be thought of as growing at the root, by growing a a new root node. This is how they grow in the inductive definition below. They can also be thought of as growing at the leaves, by grafting appropriately labelled trees, given as a forest, in for leaf nodes.

The `star' operator is an operator from quadruples to quadruples. It preserves the base set A. If (A,B,C,d) is the input structure, I write the output structure (A,B*, C*, d*). The components of the operator are defined as follows:

1.
B* is the least (pointwise) solution of:

\begin{displaymath}\begin{array}{l}
\forall a : A . \\
\; B^*(a) =
\begin{a...
...,b) } B^*(d(a,b,c)) \; \}
\end{array} \end{array} \end{array} \end{displaymath}

where $\ensuremath{\mathit{Leaf}} $ and $\ensuremath{\mathop{\mathit{Fork}}(\makebox[1em]{\_},\makebox[1em]{\_})} $ are constructors - that is, operators which are, in the following sense, disjoint and embedding:

\begin{displaymath}\begin{array}{l}
\begin{array}{l}\forall a : A,
b : B(a), ...
...th{\mathop{\mathit{Fork}}(b',\phi')} \end{array}
\end{array} \end{displaymath}

For a : A, the set B*(a) is a set of trees. It contains degenerate trees consisting of a single leaf, and as well as trees formed by plugging a forest or indexed family of trees into a node in which the forest fits. Moreover each set in the family contains the bare minimum. In particular, cyclic structures are excluded. In the formulation above, the parameter a does not appear as an argument of the constructors $\ensuremath{\mathit{Leaf}} $ and $\ensuremath{\mathop{\mathit{Fork}}(\makebox[1em]{\_},\makebox[1em]{\_})} $. That would be superfluous, as far as I can see. As for the form of the definition, the entire family B* is defined simultaneously, by a rather general kind of positive inductive definition. The family is defined to be the least fixed-point, with respect to pointwise inclusion of an operator on families. The general term of that family is given as a sum of products, with the function d mapping out the interdependency between the members of the family. The definition could be rewritten as follows:

\begin{displaymath}\begin{array}{l}
\forall a : A . \\
\; B^*(a) =
\begin{a...
...,b) } B^*(d(a,b,c)) \; \}
\end{array} \end{array} \end{array} \end{displaymath}

2.
C* is the least (pointwise) solution of:

\begin{displaymath}\begin{array}{l}
\forall a : A, \beta : B^*(a) . \\
\; C^*...
...a,b,c), \phi(c)) \; \}
\end{array} \end{array}
\end{array} \end{displaymath}

where $\ensuremath{\mathit{Nil}} $ and $\ensuremath{\mathop{\mathit{Cons}(\makebox[1em]{\_},\makebox[1em]{\_})}} $ are constructors which are disjoint and embedding in the following sense:

\begin{displaymath}\begin{array}{l}
\begin{array}{l}
\forall
\begin{array}[t...
...ons}(c',\ensuremath{\mathit{cs}}')}} \end{array}
\end{array} \end{displaymath}

For a : A and b : B*(a), the set C*(a,b) is a set of paths. The paths start at the root of the tree b, travel a complete branch in the tree b, and terminate at with a leaf. Another way to think of C*(a,b) is as the set of occurrences of leaves in b. Note that a path in a set C(a,b) must end with a leaf; it cannot peter out somewhere in the middle of the tree, or at a leafless tip.

3.
d* is recursively defined by:

\begin{displaymath}\begin{array}{lcl}
d^*(a,\ensuremath{\mathit{Leaf}} , \ensur...
...gamma)}} ) & = & d^*(d(a,b,c), \phi(c), \gamma)
\end{array}
\end{displaymath}

The function d gives the shape of the leaf at location c in the `canopy' of tree b.

(The output structure is compositionally closed in a sense defined in section 3).

Say that a tree b : B*(a) is complete if C*(a,b) is empty, that is if leaves do not occur in b. Then Petersson and Synek's trees are exactly the complete ones. But with our operator on quadruples, we can now describe incomplete trees, and so dynamic properties of growing trees, even if in the end we are interested only in complete trees.


next up previous
Next: Dual trees Up: Partial constructions Previous: Partial constructions
Peter Hancock
1998-04-08