<p>The answer to your question depends on several things, the most important of which is the <em>size of your function spaces</em>. I'll explain. Define
$$O_0 = nat $$
$$O_{n+1} = \mu X.\ 1+X+(O_n\rightarrow X)$$
As you noted in your answer, each $O_n$ can be considered <em>internally</em> to be the $n$-th regular cardinal of your system. In set theory, this datatype can be represented by an actual ordinal and is appropriately huge. </p>

<p>However, such constructions may be added to some version of type theory, and the question becomes: what ordinal is needed to give a <em>set-theoretic interpretation</em> to this construct? Now if we restrict ourselves to <em>constructive</em> semantics, a natural idea is to try to interpret each type by the set of "realizers" of this type, which is a subset of the set of $\lambda$-terms, or equivalently, the natural numbers $\mathbb{N}$.</p>

<p>In this case, it is easy to show that the ordinal is countable for any $O_n$, but that this ordinal grows very quickly. How quickly? Again, this depends on the amount of freedom you have when trying to build functions. The theory to building such ordinals is described in the theory of Large Countable Ordinals, of which <a href="http://en.wikipedia.org/wiki/Large_countable_ordinal" rel="nofollow">Wikipedia</a> has, surprisingly, a lot to say. In general it is easy to show that the ordinals in question are smaller than the <a href="http://en.wikipedia.org/wiki/Church-Kleene_ordinal" rel="nofollow">Church-Kleene Ordinal</a>, unless you allow non-constructive means of building functions (say $Beaver(n)$ that computes the busy beaver number for machines with $n$ states).</p>

<p>This isn't saying much though, except that in a constructive theory, you only require constructive ordinals to build interpretations. There is a bit more to say though. First, there is a very nice presentation by <a href="http://www.cse.chalmers.se/~coquand/ordinal.ps" rel="nofollow">Thierry Coquand</a> that details that <strong>in the absence of an eliminator for all other types but $nat$</strong>, you can build $O_1$ in exactly $\epsilon_0$ steps. </p>

<p>In general there seems to be a correspondence between the logical strength of a type theory, and the size of the largest ordinal that it can represent in this manner. This correspondence is the subject matter of <a href="http://en.wikipedia.org/wiki/Ordinal_analysis" rel="nofollow">Ordinal Analysis</a>, which has been studied at great length since the late sixties, and is still under study today (with some amazing open questions). Warning though: the subject matter is as technical as it is fascinating.</p>

<p>Hope this helps.</p>

CC BY-SA 3.0
2012-09-11T18:51:18.490Z
2012-09-12T20:32:22.910Z
2012-09-12T20:32:22.910Z
cody
<p>I think I've found an answer that works in categories sufficiently like Set. It's theorem 3.1.12 in <a href="https://www.tu-braunschweig.de/Medien-DB/iti/survey_full.pdf" rel="nofollow">Initial algebras and terminal coalgebras: a survey</a> by Adamek, Milius, and Moss.</p>

<p>The answer is that no one ordinal is sufficient for all such functors. They get arbitrarily large.</p>

<p>More precisely, for $F(X) = C_0\times(A_0 \rightarrow X) + C_1\times(A_1 \rightarrow X)\;+\;...\;+\; C_n\times(A_n \rightarrow X)$, the answer is the first <a href="http://en.wikipedia.org/wiki/Regular_cardinal" rel="nofollow">regular ordinal</a> larger than all the $A_i$. We say $\alpha$ is regular if for all $\beta &lt; \alpha$, all $\beta$-indexed chains of ordinals &lt; $\alpha$ have a supremum &lt; $\alpha$. Roughly, $\alpha$ is not reachable from a smaller chain of smaller ordinals.</p>

<p>The key result is that for $\alpha$ a regular ordinal, the well-founded $\alpha$-branching trees have transfinite depth &lt; $\alpha$.</p>

<p>Informally, I understand it as any $f : A_k \rightarrow F^\alpha(0)$ (i.e. $f : A_k \rightarrow \bigcup_{i&lt;\alpha} F^i(0)$) "fits into" $A_k \rightarrow F^j(0)$ where $j := \mathrm{sup}_{(a:A_k)} \text{``the i such that }f(a) \text{ fits into } F^i(0)"$. That $j &lt; \alpha$ holds is precisely because $\alpha$ is regular and $|A_k| &lt; \alpha$.</p>

<p>So $(A_k \rightarrow \bigcup_{i&lt;\alpha}F^i(0)) \subseteq \bigcup_{j&lt;\alpha} (A_k \rightarrow F^j(0))$ for each $k$.</p>

<p>So extending this across the $+$s and $\times$s, we have: $F(F^\alpha(0)) \subseteq \bigcup_{j&lt;\alpha}F(F^j(0)) = \bigcup_{j&lt;\alpha}F^j(0) = F^\alpha(0)$, and so it's reached the fixed point at $\alpha$.</p>

<p>It's not quite clear to me how to generalize this argument beyond Set though. How do we take $A_k$-indexed colimits?</p>

CC BY-SA 3.0
2012-09-11T17:42:25.317Z
2012-09-11T18:58:38.890Z
2012-09-11T18:58:38.890Z
Andrew Cave
<p>Functors built from finite products and sums have closure ordinal $\omega$, detailed nicely in
<a href="http://www.pps.univ-paris-diderot.fr/~metayer/PDF/fix.pdf">this manuscript</a> by Francois Metayer. i.e. we can reach the inductive type $nat := \mu X. 1 + X$ by iterating the functor $1 + X$, which reaches its fixed point after $\omega$ iterations. </p>

<p>But once we allow constant exponentiation, such as in $\mu X. 1 + X + (nat \rightarrow X)$, then $\omega$ isn't enough.</p>

<p>I'm looking for results that include exponentiation. What kind of ordinals are sufficient?</p>

<p>Especially appreciated would be a reference that presents a proof that such functors are $\alpha$-continuous for some ordinal $\alpha$ like in the above manuscript.</p>

<lo.logic><type-theory><ct.category-theory>
Closure ordinals for inductive types with function spaces
Andrew Cave
# Closure ordinals for inductive types with function spaces

(Asked by: username_0 on 2012-09-10)

Functors built from finite products and sums have closure ordinal $\omega$, detailed nicely in
[this manuscript](http://www.pps.univ-paris-diderot.fr/~metayer/PDF/fix.pdf) by Francois Metayer. i.e. we can reach the inductive type $nat := \mu X. 1 + X$ by iterating the functor $1 + X$, which reaches its fixed point after $\omega$ iterations.

But once we allow constant exponentiation, such as in $\mu X. 1 + X + (nat \rightarrow X)$, then $\omega$ isn't enough.

I'm looking for results that include exponentiation. What kind of ordinals are sufficient?

Especially appreciated would be a reference that presents a proof that such functors are $\alpha$-continuous for some ordinal $\alpha$ like in the above manuscript.

**Tags:** lo.logic, type-theory, ct.category-theory


---

## 2 answers

### Answer by username_1 on 2012-09-11. Score: 5

The answer to your question depends on several things, the most important of which is the *size of your function spaces*. I'll explain. Define
$$O\_0 = nat $$
$$O\_{n+1} = \mu X.\ 1+X+(O\_n\rightarrow X)$$
As you noted in your answer, each $O\_n$ can be considered *internally* to be the $n$-th regular cardinal of your system. In set theory, this datatype can be represented by an actual ordinal and is appropriately huge.

However, such constructions may be added to some version of type theory, and the question becomes: what ordinal is needed to give a *set-theoretic interpretation* to this construct? Now if we restrict ourselves to *constructive* semantics, a natural idea is to try to interpret each type by the set of "realizers" of this type, which is a subset of the set of $\lambda$-terms, or equivalently, the natural numbers $\mathbb{N}$.

In this case, it is easy to show that the ordinal is countable for any $O\_n$, but that this ordinal grows very quickly. How quickly? Again, this depends on the amount of freedom you have when trying to build functions. The theory to building such ordinals is described in the theory of Large Countable Ordinals, of which [Wikipedia](http://en.wikipedia.org/wiki/Large_countable_ordinal) has, surprisingly, a lot to say. In general it is easy to show that the ordinals in question are smaller than the [Church-Kleene Ordinal](http://en.wikipedia.org/wiki/Church-Kleene_ordinal), unless you allow non-constructive means of building functions (say $Beaver(n)$ that computes the busy beaver number for machines with $n$ states).

This isn't saying much though, except that in a constructive theory, you only require constructive ordinals to build interpretations. There is a bit more to say though. First, there is a very nice presentation by [Thierry Coquand](http://www.cse.chalmers.se/~coquand/ordinal.ps) that details that **in the absence of an eliminator for all other types but $nat$**, you can build $O\_1$ in exactly $\epsilon\_0$ steps.

In general there seems to be a correspondence between the logical strength of a type theory, and the size of the largest ordinal that it can represent in this manner. This correspondence is the subject matter of [Ordinal Analysis](http://en.wikipedia.org/wiki/Ordinal_analysis), which has been studied at great length since the late sixties, and is still under study today (with some amazing open questions). Warning though: the subject matter is as technical as it is fascinating.

Hope this helps.


---

### Answer by username_0 on 2012-09-11. Score: 4

I think I've found an answer that works in categories sufficiently like Set. It's theorem 3.1.12 in [Initial algebras and terminal coalgebras: a survey](https://www.tu-braunschweig.de/Medien-DB/iti/survey_full.pdf) by Adamek, Milius, and Moss.

The answer is that no one ordinal is sufficient for all such functors. They get arbitrarily large.

More precisely, for $F(X) = C\_0\times(A\_0 \rightarrow X) + C\_1\times(A\_1 \rightarrow X)\;+\;...\;+\; C\_n\times(A\_n \rightarrow X)$, the answer is the first [regular ordinal](http://en.wikipedia.org/wiki/Regular_cardinal) larger than all the $A\_i$. We say $\alpha$ is regular if for all $\beta < \alpha$, all $\beta$-indexed chains of ordinals < $\alpha$ have a supremum < $\alpha$. Roughly, $\alpha$ is not reachable from a smaller chain of smaller ordinals.

The key result is that for $\alpha$ a regular ordinal, the well-founded $\alpha$-branching trees have transfinite depth < $\alpha$.

Informally, I understand it as any $f : A\_k \rightarrow F^\alpha(0)$ (i.e. $f : A\_k \rightarrow \bigcup\_{i<\alpha} F^i(0)$) "fits into" $A\_k \rightarrow F^j(0)$ where $j := \mathrm{sup}\_{(a:A\_k)} \text{``the i such that }f(a) \text{ fits into } F^i(0)"$. That $j < \alpha$ holds is precisely because $\alpha$ is regular and $|A\_k| < \alpha$.

So $(A\_k \rightarrow \bigcup\_{i<\alpha}F^i(0)) \subseteq \bigcup\_{j<\alpha} (A\_k \rightarrow F^j(0))$ for each $k$.

So extending this across the $+$s and $\times$s, we have: $F(F^\alpha(0)) \subseteq \bigcup\_{j<\alpha}F(F^j(0)) = \bigcup\_{j<\alpha}F^j(0) = F^\alpha(0)$, and so it's reached the fixed point at $\alpha$.

It's not quite clear to me how to generalize this argument beyond Set though. How do we take $A\_k$-indexed colimits?


---

