10.3 Ordinal numbers
Definition 10.3.1.
Let A be a set and
(โ<โ):AโAโ๐ฏ๐๐๐ |
a binary relation on A.
We define by induction
what it means for an element a:A to be accessible
by <:
-
โข
If b is accessible for every b<a, then a is accessible.
We write acc(a) to mean that a is accessible.
It may seem that such an inductive definition can never get off the ground, but of course if a has the property that there are no b such that b<a, then a is vacuously accessible.
Note that this is an inductive definition of a family of types, like the type of vectors considered in \autorefsec:generalizations.
More precisely, it has one constructor, say ๐บ๐ผ๐ผ<, with type
๐บ๐ผ๐ผ<:โa:A(โb:A(b<a)โ๐บ๐ผ๐ผ(b))โ๐บ๐ผ๐ผ(a). |
The induction principle for ๐บ๐ผ๐ผ says that for any P:โ(a:A)๐บ๐ผ๐ผ(a)โ๐ฐ, if we have
f:โ(a:A)โ(h:โ(b:A)(b<a)โ๐บ๐ผ๐ผ(b))(โ(b:A)โ(l:b<a)P(b,h(b,l)))โP(a,๐บ๐ผ๐ผ<(a,h)), |
then we have g:โ(a:A)โ(c:๐บ๐ผ๐ผ(a))P(a,c) defined by induction, with
g(a,๐บ๐ผ๐ผ<(a,h))โกf(a,h,ฮปb.ฮปl.g(b,h(b,l))). |
This is a mouthful, but generally we apply it only in the simpler case where P:Aโ๐ฐ depends only on A. In this case the second and third arguments of f may be combined, so that what we have to prove is
f:โa:A(โb:A(b<a)โ๐บ๐ผ๐ผ(b)รP(b))โP(a). |
That is, we assume every b<a is accessible and g(b):P(b) is defined, and from these define g(a):P(a).
The omission of the second argument of P is justified by the following lemma, whose proof is the only place where we use the more general form of the induction principle.
Lemma 10.3.2.
Accessibility is a mere property.
Proof.
We must show that for any a:A and s1,s2:๐บ๐ผ๐ผ(a) we have s1=s2. We prove this by induction on s1, with
P1(a,s1):โกโs2:๐บ๐ผ๐ผ(a)(s1=s2). |
Thus, we must show that for any a:A and h1:โ(b:A)(b<a)โ๐บ๐ผ๐ผ(b) and
k1:โ(b:A)โ(l:b<a)โ(t:๐บ๐ผ๐ผ(b))h1(b,l)=t, |
we have ๐บ๐ผ๐ผ<(a,h)=s2 for any s2:๐บ๐ผ๐ผ(a). We regard this statement as โ(a:A)โ(s2:๐บ๐ผ๐ผ(a))P2(a,s2), where
P2(a,s2):โกโ(h1:โฏ)โ(k1:โฏ)(๐บ๐ผ๐ผ<(a,h1)=s2); |
thus we may prove it by induction on s2. Therefore, we assume h2:โ(b:A)(b<a)โ๐บ๐ผ๐ผ(b), and k2 with a monstrous but irrelevant type, and must show that for any h1 and k1 with types as above, we have ๐บ๐ผ๐ผ<(a,h1)=๐บ๐ผ๐ผ<(a,h2). By function extensionality, it suffices to show h1(b,l)=h2(b,l) for all b:A and l:b<a. This follows from k1. โ
Definition 10.3.3.
A binary relation < on a set A is well-founded if every element of A is accessible.
The point of well-foundedness is that for P:Aโ๐ฐ, we can use the induction principle of ๐บ๐ผ๐ผ to conclude โ(a:A)๐บ๐ผ๐ผ(a)โP(a), and then apply well-foundedness to conclude โ(a:A)P(a). In other words, if from โ(b:A).(b<a)โP(b) we can prove P(a), then โ(a:A).P(a). This is called well-founded induction.
Lemma 10.3.4.
Well-foundedness is a mere property.
Proof.
Well-foundedness of < is the type โ(a:A)๐บ๐ผ๐ผ(a), which is a mere proposition since each ๐บ๐ผ๐ผ(a) is. โ
Example 10.3.5.
Perhaps the most familiar well-founded relation is the usual strict ordering on N. To show that this is well-founded, we must show that n is accessible for each n:N. This is just the usual proof of โstrong inductionโ from ordinary induction on N.
Specifically, we prove by induction on n:N that k is accessible for all kโคn. The base case is just that 0 is accessible, which is vacuously true since nothing is strictly less than 0. For the inductive step, we assume that k is accessible for all kโคn, which is to say for all k<n+1; hence by definition n+1 is also accessible.
A different relation on N which is also well-founded is obtained by setting only n<succ(n) for all n:N.
Well-foundedness of this relation is almost exactly the ordinary induction principle of N.
Example 10.3.6.
Let A:\set and B:Aโ\set be a family of sets. Recall from \autorefsec:w-types that the W-type W(a:A)B(a) is inductively generated by the single constructor
-
โข
๐๐๐:โ(a:A)(B(a)โ๐ถ(x:A)B(x))โ๐ถ(x:A)B(x)
We define the relation < on W(x:A)B(x) by recursion on its second argument:
-
โข
For any a:A and f:B(a)โ๐ถ(x:A)B(x), we define w<๐๐๐(a,f) to mean that there merely exists a b:B(a) such that w=f(b).
Now we prove that every w:W(x:A)B(x) is accessible for this relation, using the usual induction principle for W(x:A)B(x). This means we assume given a:A and f:B(a)โW(x:A)B(x), and also a lifting fโฒ:โ(b:B(a))acc(f(b)). But then by definition of <, we have acc(w) for all w<sup(a,f); hence sup(a,f) is accessible.
Well-foundedness allows us to define functions by recursion and prove statements by induction, such as for instance the following.
Recall from \autorefsubsec:prop-subsets that ๐ซ(B) denotes the power set ๐ซ(B):โก(Bโ๐ฏ๐๐๐).
Lemma 10.3.7.
Suppose B is a set and we have a function
g:๐ซ(B)โB |
Then if < is a well-founded relation on A, there is a function f:AโB such that for all a:A we have
f(a)=g(\setoff(aโฒ)|aโฒ<a). |
(We are using the notation for images of subsets from \autorefsec:image.)
Proof.
We first define, for every a:A and s:๐บ๐ผ๐ผ(a), an element หf(a,s):B. By induction, it suffices to assume that s is a function assigning to each aโฒ<a a witness s(aโฒ):๐บ๐ผ๐ผ(aโฒ), and that moreover for each such aโฒ we have an element หf(aโฒ,s(aโฒ)):B. In this case, we define
หf(a,s):โกg(\setofหf(aโฒ,s(aโฒ))|aโฒ<a). |
Now since < is well-founded, we have a function w:โ(a:A)๐บ๐ผ๐ผ(a). Thus, we can define f(a):โกหf(a,w(a)). โ
In classical logic, well-foundedness has a more well-known reformulation.
In the following, we say that a subset B:๐ซ(A) is nonempty
if it is unequal to the empty subset (ฮปx.โฅ):๐ซ(X).
We leave it to the reader to verify that assuming excluded middle, this is equivalent to mere inhabitation, i.e. to the condition โ(x:A).xโB.
Lemma 10.3.8.
Assuming excluded middle, < is well-founded if and only if every nonempty subset B:P(A) merely has a minimal element.
Proof.
Suppose first < is well-founded, and suppose BโA is a subset with no minimal element. That is, for any a:A with aโB, there merely exists a b:A with b<a and bโB.
We claim that for any a:A and s:๐บ๐ผ๐ผ(a), we have aโB.
By induction, we may assume s is a function assigning to each aโฒ<a a proof s(aโฒ):๐บ๐ผ๐ผ(a), and that moreover for each such aโฒ we have aโฒโB.
If aโB, then by assumption, there would merely exist a b<a with bโB, which contradicts this assumption.
Thus, aโB; this completes
the induction.
Since < is well-founded, we have aโB for all a:A, i.e. B is empty.
Now suppose each nonempty subset merely has a minimal element. Let B=\setofa:A|ยฌ๐บ๐ผ๐ผ(a). Then if B is nonempty, it merely has a minimal element. Thus there merely exists an a:A with aโB such that for all b<a, we have ๐บ๐ผ๐ผ(b). But then by definition (and induction on truncation), a is merely accessible, and hence accessible, contradicting aโB. Thus, B is empty, so < is well-founded. โ
Definition 10.3.9.
A well-founded relation < on a set A is extensional if for any a,b:A, we have
(โ(c:A).(c<a)โ(c<b))โ(a=b). |
Note that since A is a set, extensionality is a mere proposition.
This notion of โextensionalityโ is unrelated to function extensionality, and also unrelated to the extensionality of identity types.
Rather, it is a โlocalโ counterpart of the axiom of extensionality in classical set theory.
Theorem 10.3.10.
The type of extensional well-founded relations is a set.
Proof.
By the univalence axiom, it suffices to show that if (A,<) is extensional and well-founded and f:(A,<)โ (A,<), then f=๐๐ฝA. We prove by induction on < that f(a)=a for all a:A. The inductive hypothesis is that for all aโฒ<a, we have f(aโฒ)=aโฒ.
Now since A is extensional, to conclude f(a)=a it is sufficient to show
โ(c:A).(c<f(a))โ(c<a). |
However, since f is an automorphism, we have (c<a)โ(f(c)<f(a)).
But c<a implies f(c)=c by the inductive hypothesis, so (c<a)โ(c<f(a)).
On the other hand, if c<f(a), then f-1(c)<a, and so c=f(f-1(c))=f-1(c) by the inductive hypothesis again; thus c<a.
Therefore, we have (c<a)โ(c<f(a)) for any c:A, so f(a)=a.
โ
Definition 10.3.11.
If (A,<) and (B,<) are extensional and well-founded, a simulation is a function f:AโB such that
-
1.
if a<aโฒ, then f(a)<f(aโฒ), and
-
2.
for all a:A and b:B, if b<f(a), then there merely exists an aโฒ<a with f(aโฒ)=b.
Lemma 10.3.12.
Any simulation is injective.
Proof.
We prove by double well-founded induction that for any a,b:A, if f(a)=f(b) then a=b. The inductive hypothesis for a:A says that for any aโฒ<a, and any b:B, if f(aโฒ)=f(b) then a=b. The inner inductive hypothesis for b:A says that for any bโฒ<b, if f(a)=f(bโฒ) then a=bโฒ.
Suppose f(a)=f(b); we must show a=b. By extensionality, it suffices to show that for any c:A we have (c<a)โ(c<b). If c<a, then f(c)<f(a) by \autorefdef:simulation1. Hence f(c)<f(b), so by \autorefdef:simulation2 there merely exists cโฒ:A with cโฒ<b and f(c)=f(cโฒ). By the inductive hypothesis for a, we have c=cโฒ, hence c<b. The dual argument is symmetrical. โ
In particular, this implies that in \autorefdef:simulation2 the word โmerelyโ could be omitted without change of sense.
Corollary 10.3.13.
If f:AโB is a simulation, then for all a:A and b:B, if b<f(a), there purely exists an aโฒ<a with f(aโฒ)=b.
Proof.
Since f is injective, โ(a:A)(f(a)=b) is a mere proposition. โ
We say that a subset C:๐ซ(B) is an initial segment if cโC and b<c imply bโC. The image of a simulation must be an initial segment, while the inclusion of any initial segment is a simulation. Thus, by univalence, every simulation AโB is equal to the inclusion of some initial segment of B.
Theorem 10.3.14.
For a set A, let P(A) be the type of extensional well-founded relations on A.
If <A:P(A) and <B:P(B) and f:AโB, let H<A<B(f) be the mere proposition that f is a simulation.
Then (P,H) is a standard notion of structure over Set in the sense of \autorefsec:sip.
Proof.
We leave it to the reader to verify that identities are simulations, and that composites of simulations are simulations.
Thus, we have a notion of structure.
For standardness, we must show that if < and โบ are two extensional well-founded relations on A, and ๐๐ฝA is a simulation in both directions, then < and โบ are equal.
Since extensionality and well-foundedness are mere propositions, for this it suffices to have โ(a,b:A).(a<b)โ(aโบb).
But this follows from \autorefdef:simulation1 for ๐๐ฝA.
โ
Corollary 10.3.15.
There is a category whose objects are sets equipped with extensional well-founded relations, and whose morphisms are simulations.
In fact, this category is a poset.
Lemma 10.3.16.
For extensional and well-founded (A,<) and (B,<), there is at most one simulation f:AโB.
Proof.
Suppose f,g:AโB are simulations. Since being a simulation is a mere property, it suffices to show โ(a:A).(f(a)=g(a)). By induction on <, we may suppose f(aโฒ)=g(aโฒ) for all aโฒ<a. And by extensionality of B, to have f(a)=g(a) it suffices to have โ(b:B).(b<f(a))โ(b<g(a)).
But since f is a simulation, if b<f(a), then we have aโฒ<a with f(aโฒ)=b. By the inductive hypothesis, we have also g(aโฒ)=b, hence b<g(a). The dual argument is symmetrical. โ
Thus, if A and B are equipped with extensional and well-founded relations, we may write AโคB to mean there exists a simulation f:AโB. \autorefthm:wfcat implies that if AโคB and BโคA, then A=B.
Definition 10.3.17.
An ordinal
is a set A with an extensional well-founded relation which is transitive
, i.e. satisfies โ(a,b,c:A).(a<b)โ(b<c)โ(a<c).
Example 10.3.18.
Of course, the usual strict order on N is transitive. It is easily seen to be extensional as well; thus it is an ordinal. As usual, we denote this ordinal by ฯ.
Let ๐ฎ๐๐ฝ denote the type of ordinals.
By the previous results, ๐ฎ๐๐ฝ is a set and has a natural partial order.
We now show that ๐ฎ๐๐ฝ also admits a well-founded relation.
If A is an ordinal and a:A, let A/a:โก\setofb:A|b<a denote the initial segment.
Note that if A/a=A/b as ordinals, then that isomorphism must respect their inclusions into A (since simulations form a poset), and hence they are equal as subsets of A.
Therefore, since A is extensional, a=b.
Thus the function aโฆA/a is an injection Aโ๐ฎ๐๐ฝ.
Definition 10.3.19.
For ordinals A and B, a simulation f:AโB is said to be bounded if there exists b:B such that A=B/b.
The remarks above imply that such a b is unique when it exists, so that boundedness is a mere property.
We write A<B if there exists a bounded simulation from A to B. Since simulations are unique, A<B is also a mere proposition.
Theorem 10.3.20.
(๐ฎ๐๐ฝ,<) is an ordinal.
More precisely, this theorem says that the type ๐ฎ๐๐ฝ๐ฐi of ordinals in one universe is itself an ordinal in the next higher universe, i.e. (๐ฎ๐๐ฝ๐ฐi,<):๐ฎ๐๐ฝ๐ฐi+1.
Proof.
Let A be an ordinal; we first show that A/a is accessible (in ๐ฎ๐๐ฝ) for all a:A. By well-founded induction on A, suppose A/b is accessible for all b<a. By definition of accessibility, we must show that B is accessible in ๐ฎ๐๐ฝ for all B<A/a. However, if B<A/a then there is some b<a such that B=(A/a)/b=A/b, which is accessible by the inductive hypothesis. Thus, A/a is accessible for all a:A.
Now to show that A is accessible in ๐ฎ๐๐ฝ, by definition we must show B is accessible for all B<A. But as before, B<A means B=A/a for some a:A, which is accessible as we just proved. Thus, ๐ฎ๐๐ฝ is well-founded.
For extensionality, suppose A and B are ordinals such that โ(C:๐ฎ๐๐ฝ)(C<A)โ(C<B). Then for every a:A, since A/a<A, we have A/a<B, hence there is b:B with A/a=B/b. Define f:AโB to take each a to the corresponding b; it is straightforward to verify that f is an isomorphism. Thus Aโ B, hence A=B by univalence.
Finally, it is easy to see that < is transitive. โ
Treating ๐ฎ๐๐ฝ as an ordinal is often very convenient, but it has its pitfalls as well. For instance, consider the following lemma, where we pay attention to how universes are used.
Lemma 10.3.21.
Let U be a universe. For any A:OrdU, there is a B:OrdU such that A<B.
Proof.
Let B=A+๐, with the element โ:๐ being greater than all elements of A. Then B is an ordinal and it is easy to see that Aโ B/โ. โ
This lemma illustrates a potential pitfall of the โtypically ambiguousโ style of using ๐ฐ to denote an arbitrary, unspecified universe. Consider the following alternative proof of it.
Another putative proof of \autorefthm:ordsucc.
Note that C<A if and only if C=A/a for some a:A. This gives an isomorphism Aโ ๐ฎ๐๐ฝ/A, so that A<๐ฎ๐๐ฝ. Thus we may take B:โก๐ฎ๐๐ฝ. โ
The second proof would be valid if we had stated \autorefthm:ordsucc in a typically ambiguous style. But the resulting lemma would be less useful, because the second proof would constrain the second โ๐ฎ๐๐ฝโ in the lemma statement to refer to a higher universe level than the first one. The first proof allows both universes to be the same.
Similar remarks apply to the next lemma, which could be proved in a less useful way by observing that Aโค๐ฎ๐๐ฝ for any A:๐ฎ๐๐ฝ.
Lemma 10.3.22.
Let U be a universe. For any X:U and F:XโOrdU, there exists B:OrdU such that FxโคB for all x:X.
Proof.
Let B be the quotient of the equivalence relation โผ on โ(x:X)Fx defined as follows:
(x,y)โผ(xโฒ,yโฒ):โก((Fx)/yโ (Fxโฒ)/yโฒ). |
Define (x,y)<(xโฒ,yโฒ) if (Fx)/y<(Fxโฒ)/yโฒ. This clearly descends to the quotient, and can be seen to make B into an ordinal. Moreover, for each x:X the induced map FxโB is a simulation. โ
Title | 10.3 Ordinal numbers |
---|---|
\metatable |