# 11.6 The surreal numbers

In this section        we consider another example of a higher inductive-inductive type, which draws together many of our threads: Conway’s field $\mathsf{No}$ of surreal numbers  [conway:onag]. The surreal numbers are the natural common generalization  of the (Dedekind) real numbers (\autorefsec:dedekind-reals) and the ordinal numbers  (\autorefsec:ordinals). Conway, working in classical mathematics with excluded middle and Choice, defines a surreal number to be a pair of sets of surreal numbers, written $\{\,L\,\big{|}\,R\,\}$, such that every element of $L$ is strictly less than every element of $R$. This obviously looks like an inductive definition, but there are three issues with regarding it as such.

Firstly, the definition requires the relation    of (strict) inequality between surreals, so that relation must be defined simultaneously with the type $\mathsf{No}$ of surreals. (Conway avoids this issue by first defining games, which are like surreals but omit the compatibility condition on $L$ and $R$.) As with the relation $\mathord{\sim}$ for the Cauchy reals, this simultaneous definition could a priori be either inductive-inductive or inductive-recursive. We will choose to make it inductive-inductive, for the same reasons we made that choice for $\mathord{\sim}$.

Moreover, we will define strict inequality $<$ and non-strict inequality $\leq$ for surreals separately (and mutually inductively). Conway defines $<$ in terms of $\leq$, in a way which is sensible classically but not constructively. Furthermore, a negative definition of $<$ would make it unacceptable as a hypothesis   of the constructor of a higher inductive type (see \autorefsec:strictly-positive).

Secondly, Conway says that $L$ and $R$ in $\{\,L\,\big{|}\,R\,\}$ should be “sets of surreal numbers”, but the naive meaning of this as a predicate   $\mathsf{No}\to\mathsf{Prop}$ is not positive, hence cannot be used as input to an inductive constructor. However, this would not be a good type-theoretic translation of what Conway means anyway, because in set theory  the surreal numbers form a proper class  , whereas the sets $L$ and $R$ are true (small) sets, not arbitrary subclasses of $\mathsf{No}$. In type theory  , this means that $\mathsf{No}$ will be defined relative to a universe  $\mathcal{U}$, but will itself belong to the next higher universe $\mathcal{U}^{\prime}$, like the sets $\mathsf{Ord}$ and $\mathsf{Card}$ of ordinals and cardinals, the cumulative hierarchy $V$, or even the Dedekind reals in the absence of propositional resizing. We will then require the “sets” $L$ and $R$ of surreals to be $\mathcal{U}$-small, and so it is natural to represent them by families of surreals indexed by some $\mathcal{U}$-small type. (This is all exactly the same as what we did with the cumulative hierarchy in \autorefsec:cumulative-hierarchy.) That is, the constructor of surreals will have type

 $\mathchoice{\prod_{\mathcal{L},\mathcal{R}:\mathcal{U}}\,}{\mathchoice{{% \textstyle\prod_{(\mathcal{L},\mathcal{R}:\mathcal{U})}}}{\prod_{(\mathcal{L},% \mathcal{R}:\mathcal{U})}}{\prod_{(\mathcal{L},\mathcal{R}:\mathcal{U})}}{% \prod_{(\mathcal{L},\mathcal{R}:\mathcal{U})}}}{\mathchoice{{\textstyle\prod_{% (\mathcal{L},\mathcal{R}:\mathcal{U})}}}{\prod_{(\mathcal{L},\mathcal{R}:% \mathcal{U})}}{\prod_{(\mathcal{L},\mathcal{R}:\mathcal{U})}}{\prod_{(\mathcal% {L},\mathcal{R}:\mathcal{U})}}}{\mathchoice{{\textstyle\prod_{(\mathcal{L},% \mathcal{R}:\mathcal{U})}}}{\prod_{(\mathcal{L},\mathcal{R}:\mathcal{U})}}{% \prod_{(\mathcal{L},\mathcal{R}:\mathcal{U})}}{\prod_{(\mathcal{L},\mathcal{R}% :\mathcal{U})}}}(\mathcal{L}\to\mathsf{No})\to(\mathcal{R}\to\mathsf{No})\to(% \text{some condition})\to\mathsf{No}$

which is indeed strictly positive.

Finally, after giving the mutual definitions of $\mathsf{No}$ and its ordering, Conway declares two surreal numbers $x$ and $y$ to be equal if $x\leq y$ and $y\leq x$. This is naturally read as passing to a quotient  of the set of “pre-surreals” by an equivalence relation  . However, in the absence of the axiom of choice  , such a quotient presents the same problem as the quotient in the usual construction of Cauchy reals: it will no longer be the case that a pair of families of surreals yield a new surreal $\{\,L\,\big{|}\,R\,\}$, since we cannot necessarily “lift” $L$ and $R$ to families of pre-surreals. Of course, we can solve this problem in the same way we did for Cauchy reals, by using a higher inductive-inductive definition.

###### Definition 11.6.1.

The type $\mathsf{No}$ of surreal numbers, along with the relations $\mathord{<}:\mathsf{No}\to\mathsf{No}\to\mathcal{U}$ and $\mathord{\leq}:\mathsf{No}\to\mathsf{No}\to\mathcal{U}$, are defined higher inductive-inductively as follows. The type $\mathsf{No}$ has the following constructors.

• For any $\mathcal{L},\mathcal{R}:\mathcal{U}$ and functions $\mathcal{L}\to\mathsf{No}$ and $\mathcal{R}\to\mathsf{No}$, whose values we write as $x^{L}$ and $x^{R}$ for $L:\mathcal{L}$ and $R:\mathcal{R}$ respectively, if $\forall(L:\mathcal{L}).\,\forall(R:\mathcal{R}).\,x^{L}, then there is a surreal number $x$.

• For any $x,y:\mathsf{No}$ such that $x\leq y$ and $y\leq x$, we have $\mathsf{eq}_{\mathsf{No}}(x,y):x=y$.

We will refer to the inputs of the first constructor as a cut. If $x$ is the surreal number constructed from a cut, then the notation $x^{L}$ will implicitly assume $L:\mathcal{L}$, and similarly $x^{R}$ will assume $R:\mathcal{R}$. In this way we can usually avoid naming the indexing types $\mathcal{L}$ and $\mathcal{R}$, which is convenient when there are many different cuts under discussion. Following Conway, we call $x^{L}$ a left option of $x$ and $x^{R}$ a right option.

The path constructor implies that different cuts can define the same surreal number. Thus, it does not make sense to speak of the left or right options of an arbitrary surreal number $x$, unless we also know that $x$ is defined by a particular cut. Thus in what follows we will say, for instance, “given a cut defining a surreal number $x$” in contrast to “given a surreal number $x$”.

The relation $\leq$ has the following constructors.

• Given cuts defining two surreal numbers $x$ and $y$, if $x^{L} for all $L$, and $x for all $R$, then $x\leq y$.

• Propositional truncation: for any $x,y:\mathsf{No}$, if $p,q:x\leq y$, then $p=q$.

And the relation $<$ has the following constructors.

• Given cuts defining two surreal numbers $x$ and $y$, if there is an $L$ such that $x\leq y^{L}$, then $x.

• Given cuts defining two surreal numbers $x$ and $y$, if there is an $R$ such that $x^{R}\leq y$, then $x.

• Propositional truncation: for any $x,y:\mathsf{No}$, if $p,q:x, then $p=q$.

We compare this with Conway’s definitions:

• -

If $L,R$ are any two sets of numbers, and no member of $L$ is $\geq$ any member of $R$, then there is a number $\{\,L\,\big{|}\,R\,\}$. All numbers are constructed in this way.

• -

$x\geq y$ iff (no $x^{R}\leq y$ and $x\leq$ no $y^{L}$).

• -

$x=y$ iff ($x\geq y$ and $y\geq x$).

• -

$x>y$ iff ($x\geq y$ and $y\not\geq x$).

The inclusion of $x\geq y$ in the definition of $x>y$ is unnecessary if all objects are [surreal] numbers rather than “games”. Thus, Conway’s $<$ is just the negation  of his $\geq$, so that his condition for $\{\,L\,\big{|}\,R\,\}$ to be a surreal is the same as ours. Negating Conway’s $\leq$ and canceling double negations, we arrive at our definition of $<$, and we can then reformulate his $\leq$ in terms of $<$ without negations.

We can immediately populate $\mathsf{No}$ with many surreal numbers. Like Conway, we write

 $\{\,x,y,z,\dots\,\big{|}\,u,v,w,\dots\,\}$

for the surreal number defined by a cut where $\mathcal{L}\to\mathsf{No}$ and $\mathcal{R}\to\mathsf{No}$ are families described by $x,y,z,\dots$ and $u,v,w,\dots$. Of course, if $\mathcal{L}$ or $\mathcal{R}$ are $\mathbf{0}$, we leave the corresponding part of the notation empty. There is an unfortunate clash with the standard notation $\setof{x:A|P(x)}$ for subsets, but we will not use the latter in this section.

• We define $\iota_{\mathbb{N}}:\mathbb{N}\to\mathsf{No}$ recursively by

 $\displaystyle\iota_{\mathbb{N}}(0)$ $\displaystyle:\!\!\equiv\{\,\,\big{|}\,\,\},$ $\displaystyle\iota_{\mathbb{N}}(\mathsf{succ}(n))$ $\displaystyle:\!\!\equiv\{\,\iota_{\mathbb{N}}(n)\,\big{|}\,\,\}.$

That is, $\iota_{\mathbb{N}}(0)$ is defined by the cut consisting of $\mathbf{0}\to\mathsf{No}$ and $\mathbf{0}\to\mathsf{No}$. Similarly, $\iota_{\mathbb{N}}(\mathsf{succ}(n))$ is defined by $\mathbf{1}\to\mathsf{No}$ (picking out $\iota_{\mathbb{N}}(n)$) and $\mathbf{0}\to\mathsf{No}$.

• Similarly, we define $\iota_{\mathbb{Z}}:\mathbb{Z}\to\mathsf{No}$ using the sign-case recursion principle (\autorefthm:sign-induction):

 $\displaystyle\iota_{\mathbb{Z}}(0)$ $\displaystyle:\!\!\equiv\{\,\,\big{|}\,\,\},$ $\displaystyle\iota_{\mathbb{Z}}(n+1)$ $\displaystyle:\!\!\equiv\{\,\iota_{\mathbb{Z}}(n)\,\big{|}\,\,\}$ $n\geq 0$, $\displaystyle\iota_{\mathbb{Z}}(n-1)$ $\displaystyle:\!\!\equiv\{\,\,\big{|}\,\iota_{\mathbb{Z}}(n)\,\}$ $n\leq 0$.
• By a dyadic rational we mean a pair $(a,n)$ where $a:\mathbb{Z}$ and $n:\mathbb{N}$, and such that if $n>0$ then $a$ is odd. We will write it as $a/2^{n}$, and identify it with the corresponding rational number. If $\mathbb{Q}_{D}$ denotes the set of dyadic rationals, we define $\iota_{\mathbb{Q}_{D}}:\mathbb{Q}_{D}\to\mathsf{No}$ by induction  on $n$:

 $\displaystyle\iota_{\mathbb{Q}_{D}}(a/2^{0})$ $\displaystyle:\!\!\equiv\iota_{\mathbb{Z}}(a),$ $\displaystyle\iota_{\mathbb{Q}_{D}}(a/2^{n})$ $\displaystyle:\!\!\equiv\{\,a/2^{n}-1/2^{n}\,\big{|}\,a/2^{n}+1/2^{n}\,\},% \quad\text{for n>0.}$

Here we use the fact that if $n>0$ and $a$ is odd, then $a/2^{n}\pm 1/2^{n}$ is a dyadic rational with a smaller denominator than $a/2^{n}$.

• We define $\iota_{\mathbb{R}_{\mathsf{d}}}:\mathbb{R}_{\mathsf{d}}\to\mathsf{No}$, where $\mathbb{R}_{\mathsf{d}}$ is (any version of) the Dedekind reals from \autorefsec:dedekind-reals, by

 $\displaystyle\iota_{\mathbb{R}_{\mathsf{d}}}(x)$ $\displaystyle:\!\!\equiv\{\,q\in\mathbb{Q}_{D}\text{ such that }q

Unlike in the previous cases, it is not obvious that this extends $\iota_{\mathbb{Q}_{D}}$ when we regard dyadic rationals as Dedekind reals. This follows from the simplicity theorem  (\autorefthm:NO-simplicity).

• Recall the type $\mathsf{Ord}$ of ordinals from \autorefsec:ordinals, which is well-ordered by the relation $<$, where $A means that $A={B}_{/b}$ for some $b:B$. We define $\iota_{\mathsf{Ord}}:\mathsf{Ord}\to\mathsf{No}$ by well-founded recursion (\autorefthm:wfrec) on $\mathsf{Ord}$:

 $\iota_{\mathsf{Ord}}(A):\!\!\equiv\{\,\iota_{\mathsf{Ord}}({A}_{/a})\text{ for% all }a:A\,\big{|}\,\,\}.$

It will also follow from the simplicity theorem that $\iota_{\mathsf{Ord}}$ restricted to finite ordinals agrees with $\iota_{\mathbb{N}}$.

• A few more interesting examples taken from Conway:

 $\displaystyle\omega$ $\displaystyle:\!\!\equiv\{\,0,1,2,3,\dots\,\big{|}\,\,\}\qquad\text{(also an % ordinal)}$ $\displaystyle-\omega$ $\displaystyle:\!\!\equiv\{\,\,\big{|}\,\dots,-3,-2,-1,0\,\}$ $\displaystyle 1/\omega$ $\displaystyle:\!\!\equiv\textstyle\{\,0\,\big{|}\,1,\frac{1}{2},\frac{1}{4},% \frac{1}{8},\dots\,\}$ $\displaystyle\omega-1$ $\displaystyle:\!\!\equiv\{\,0,1,2,3,\dots\,\big{|}\,\omega\,\}$ $\displaystyle\omega/2$ $\displaystyle:\!\!\equiv\{\,0,1,2,3,\dots\,\big{|}\,\dots,\omega-2,\omega-1,% \omega\,\}.$

In identifying surreal numbers presented by different cuts, the following simple observation is useful.

###### Theorem 11.6.2 (Conway’s simplicity theorem).

Suppose $x$ and $z$ are surreal numbers defined by cuts, and that the following hold.

• $x^{L} for all $L$ and $R$.

• For every left option $z^{L}$ of $z$, there exists a left option $x^{L^{\prime}}$ with $z^{L}\leq x^{L^{\prime}}$.

• For every right option $z^{R}$ of $z$, there exists a right option $x^{R^{\prime}}$ with $x^{R^{\prime}}\leq z^{R}$.

Then $x=z$.

###### Proof.

Applying the path constructor of $\mathsf{No}$, we must show $x\leq z$ and $z\leq x$. The first entails showing $x^{L} for all $L$, which we assumed, and $x for all $R$. But by assumption  , for any $z^{R}$ there is an $x^{R^{\prime}}$ with $x^{R^{\prime}}\leq z^{R}$ hence $x as desired. Thus $x\leq z$; the proof of $z\leq x$ is symmetric  . ∎

In order to say much more about surreal numbers, however, we need their induction principle. The mutual induction principle for $(\mathsf{No},\leq,<)$ applies to three families of types:

 $\displaystyle A$ $\displaystyle:\mathsf{No}\to\mathcal{U}$ $\displaystyle B$ $\displaystyle:\mathchoice{\prod_{(x,y:\mathsf{No})}\,}{\mathchoice{{\textstyle% \prod_{(x,y:\mathsf{No})}}}{\prod_{(x,y:\mathsf{No})}}{\prod_{(x,y:\mathsf{No}% )}}{\prod_{(x,y:\mathsf{No})}}}{\mathchoice{{\textstyle\prod_{(x,y:\mathsf{No}% )}}}{\prod_{(x,y:\mathsf{No})}}{\prod_{(x,y:\mathsf{No})}}{\prod_{(x,y:\mathsf% {No})}}}{\mathchoice{{\textstyle\prod_{(x,y:\mathsf{No})}}}{\prod_{(x,y:% \mathsf{No})}}{\prod_{(x,y:\mathsf{No})}}{\prod_{(x,y:\mathsf{No})}}}% \mathchoice{\prod_{(a:A(x))}\,}{\mathchoice{{\textstyle\prod_{(a:A(x))}}}{% \prod_{(a:A(x))}}{\prod_{(a:A(x))}}{\prod_{(a:A(x))}}}{\mathchoice{{\textstyle% \prod_{(a:A(x))}}}{\prod_{(a:A(x))}}{\prod_{(a:A(x))}}{\prod_{(a:A(x))}}}{% \mathchoice{{\textstyle\prod_{(a:A(x))}}}{\prod_{(a:A(x))}}{\prod_{(a:A(x))}}{% \prod_{(a:A(x))}}}\mathchoice{\prod_{(b:A(y))}\,}{\mathchoice{{\textstyle\prod% _{(b:A(y))}}}{\prod_{(b:A(y))}}{\prod_{(b:A(y))}}{\prod_{(b:A(y))}}}{% \mathchoice{{\textstyle\prod_{(b:A(y))}}}{\prod_{(b:A(y))}}{\prod_{(b:A(y))}}{% \prod_{(b:A(y))}}}{\mathchoice{{\textstyle\prod_{(b:A(y))}}}{\prod_{(b:A(y))}}% {\prod_{(b:A(y))}}{\prod_{(b:A(y))}}}(x\leq y)\to\mathcal{U}$ $\displaystyle C$ $\displaystyle:\mathchoice{\prod_{(x,y:\mathsf{No})}\,}{\mathchoice{{\textstyle% \prod_{(x,y:\mathsf{No})}}}{\prod_{(x,y:\mathsf{No})}}{\prod_{(x,y:\mathsf{No}% )}}{\prod_{(x,y:\mathsf{No})}}}{\mathchoice{{\textstyle\prod_{(x,y:\mathsf{No}% )}}}{\prod_{(x,y:\mathsf{No})}}{\prod_{(x,y:\mathsf{No})}}{\prod_{(x,y:\mathsf% {No})}}}{\mathchoice{{\textstyle\prod_{(x,y:\mathsf{No})}}}{\prod_{(x,y:% \mathsf{No})}}{\prod_{(x,y:\mathsf{No})}}{\prod_{(x,y:\mathsf{No})}}}% \mathchoice{\prod_{(a:A(x))}\,}{\mathchoice{{\textstyle\prod_{(a:A(x))}}}{% \prod_{(a:A(x))}}{\prod_{(a:A(x))}}{\prod_{(a:A(x))}}}{\mathchoice{{\textstyle% \prod_{(a:A(x))}}}{\prod_{(a:A(x))}}{\prod_{(a:A(x))}}{\prod_{(a:A(x))}}}{% \mathchoice{{\textstyle\prod_{(a:A(x))}}}{\prod_{(a:A(x))}}{\prod_{(a:A(x))}}{% \prod_{(a:A(x))}}}\mathchoice{\prod_{(b:A(y))}\,}{\mathchoice{{\textstyle\prod% _{(b:A(y))}}}{\prod_{(b:A(y))}}{\prod_{(b:A(y))}}{\prod_{(b:A(y))}}}{% \mathchoice{{\textstyle\prod_{(b:A(y))}}}{\prod_{(b:A(y))}}{\prod_{(b:A(y))}}{% \prod_{(b:A(y))}}}{\mathchoice{{\textstyle\prod_{(b:A(y))}}}{\prod_{(b:A(y))}}% {\prod_{(b:A(y))}}{\prod_{(b:A(y))}}}(x

As with the induction principle for Cauchy reals, it is helpful to think of $B$ and $C$ as families of relations between the types $A(x)$ and $A(y)$. Thus we write $B(x,y,a,b,\xi)$ as $(x,a)\trianglelefteqslant^{\xi}(y,b)$ and $C(x,y,a,b,\xi)$ as $(x,a)\vartriangleleft^{\xi}(y,b)$. Similarly, we usually omit the $\xi$ since it inhabits a mere proposition and so is uninteresting, and we may often omit $x$ and $y$ as well, writing simply $a\trianglelefteqslant b$ or $a\vartriangleleft b$. With these notations, the hypotheses of the induction principle are the following.

• For any cut defining a surreal number $x$, together with

1. (a)

for each $L$, an element $a^{L}:A(x^{L})$, and

2. (b)

for each $R$, an element $a^{R}:A(x^{R})$, such that

3. (c)

for all $L$ and $R$ we have $(x^{L},a^{L})\vartriangleleft(x^{R},a^{R})$

there is a specified element $f_{a}:A(x)$. We call such data a dependent cut over the cut defining $x$.

• For any $x,y:\mathsf{No}$ with $a:A(x)$ and $b:A(y)$, if $x\leq y$ and $y\leq x$ and also $(x,a)\trianglelefteqslant(y,b)$ and $(y,b)\trianglelefteqslant(x,a)$, then $a=^{A}_{\mathsf{eq}_{\mathsf{No}}}b$.

• Given cuts defining two surreal numbers $x$ and $y$, and dependent cuts $a$ over $x$ and $b$ over $y$, such that for all $L$ we have $x^{L} and $(x^{L},a^{L})\vartriangleleft(y,f_{b})$, and for all $R$ we have $x and $(x,f_{a})\vartriangleleft(y^{R},b^{R})$, then $(x,f_{a})\trianglelefteqslant(y,f_{b})$.

• $\trianglelefteqslant$ takes values in mere propositions.

• Given cuts defining two surreal numbers $x$ and $y$, dependent cuts $a$ over $x$ and $b$ over $y$, and an $L_{0}$ such that $x\leq y^{L_{0}}$ and $(x,f_{a})\trianglelefteqslant(y^{L_{0}},b^{L_{0}})$, we have $(x,f_{a})\vartriangleleft(y,f_{b})$.

• Given cuts defining two surreal numbers $x$ and $y$, dependent cuts $a$ over $x$ and $b$ over $y$, and an ${R_{0}}$ such that $x^{R_{0}}\leq y$ together with $(x^{R_{0}},a^{R_{0}}),\trianglelefteqslant(y,f_{b})$, we have $(x,f_{a})\vartriangleleft(y,f_{b})$.

• $\vartriangleleft$ takes values in mere propositions.

Under these hypotheses we deduce a function $f:\mathchoice{\prod_{x:\mathsf{No}}\,}{\mathchoice{{\textstyle\prod_{(x:% \mathsf{No})}}}{\prod_{(x:\mathsf{No})}}{\prod_{(x:\mathsf{No})}}{\prod_{(x:% \mathsf{No})}}}{\mathchoice{{\textstyle\prod_{(x:\mathsf{No})}}}{\prod_{(x:% \mathsf{No})}}{\prod_{(x:\mathsf{No})}}{\prod_{(x:\mathsf{No})}}}{\mathchoice{% {\textstyle\prod_{(x:\mathsf{No})}}}{\prod_{(x:\mathsf{No})}}{\prod_{(x:% \mathsf{No})}}{\prod_{(x:\mathsf{No})}}}A(x)$ such that

 $\displaystyle f(x)$ $\displaystyle\;\equiv\;f_{f[x]}$ (11.6.3) $\displaystyle(x\leq y)$ $\displaystyle\;\Rightarrow\;(x,f(x))\trianglelefteqslant(y,f(y))$ $\displaystyle(x $\displaystyle\;\Rightarrow\;(x,f(x))\vartriangleleft(y,f(y)).$

In the computation rule (11.6.3) for the point constructor, $x$ is a surreal number defined by a cut, and $f[x]$ denotes the dependent cut over $x$ defined by applying $f$ (and using the fact that $f$ takes $<$ to $\vartriangleleft$). As usual, we will generally use pattern-matching notation, where the definition of $f$ on a cut $\{\,x^{L}\,\big{|}\,x^{R}\,\}$ may use the symbols $f(x^{L})$ and $f(x^{R})$ and the assumption that they form a dependent cut.

As with the Cauchy reals, we have special cases resulting from trivializing some of $A$, $\trianglelefteqslant$, and $\vartriangleleft$. Taking $\trianglelefteqslant$ and $\vartriangleleft$ to be constant at $\mathbf{1}$, we have $\mathsf{No}$-induction, which for simplicity we state only for mere properties:

• Given $P:\mathsf{No}\to\mathsf{Prop}$, if $P(x)$ holds whenever $x$ is a surreal number defined by a cut such that $P(x^{L})$ and $P(x^{R})$ hold for all $L$ and $R$, then $P(x)$ holds for all $x:\mathsf{No}$.

This should be compared with Conway’s remark:

In general when we wish to establish a proposition  $P(x)$ for all numbers $x$, we will prove it inductively by deducing $P(x)$ from the truth of all the propositions $P(x^{L})$ and $P(x^{R})$. We regard the phrase “all numbers are constructed in this way” as justifying the legitimacy of this procedure.

With $\mathsf{No}$-induction, we can prove

###### Theorem 11.6.3 (Conway’s Theorem 0).
1. 1.

For any $x:\mathsf{No}$, we have $x\leq x$.

2. 2.

For any $x:\mathsf{No}$ defined by a cut, we have $x^{L} and $x for all $L$ and $R$.

###### Proof.

Note first that if $x\leq x$, then whenever $x$ occurs as a left option of some cut $y$, we have $x by the first constructor of $<$, and similarly whenever $x$ occurs as a right option of a cut $y$, we have $y by the second constructor of $<$. In particular, 1$\Rightarrow$2.

We prove 1 by $\mathsf{No}$-induction on $x$. Thus, assume $x$ is defined by a cut such that $x^{L}\leq x^{L}$ and $x^{R}\leq x^{R}$ for all $L$ and $R$. But by our observation above, these assumptions imply $x^{L} and $x for all $L$ and $R$, yielding $x\leq x$ by the constructor of $\leq$. ∎

###### Corollary 11.6.4.

$\mathsf{No}$ is a 0-type.

###### Proof.

The mere relation $R(x,y):\!\!\equiv(x\leq y)\land(y\leq x)$ implies identity    by the path constructor of $\mathsf{No}$, and contains the diagonal by \autorefthm:NO-refl-opt1. Thus, \autorefthm:h-set-refrel-in-paths-sets applies. ∎

By contrast, Conway’s Theorem 1 (transitivity of $\leq$) is somewhat harder to establish with our definition; see \autorefthm:NO-unstrict-transitive.

We will also need the joint recursion principle, $(\mathsf{No},\leq,<)$-recursion, which it is convenient to state as follows. Suppose $A$ is a type equipped with relations $\mathord{\trianglelefteqslant}:A\to A\to\mathsf{Prop}$ and $\mathord{\vartriangleleft}:A\to A\to\mathsf{Prop}$. Then we can define $f:\mathsf{No}\to A$ by doing the following.

1. 1.

For any $x$ defined by a cut, assuming $f(x^{L})$ and $f(x^{R})$ to be defined such that $f(x^{L})\vartriangleleft f(x^{R})$ for all $L$ and $R$, we must define $f(x)$. (We call this the primary clause of the recursion.)

2. 2.

Prove that $\trianglelefteqslant$ is antisymmetric: if $a\trianglelefteqslant b$ and $b\trianglelefteqslant a$, then $a=b$.

3. 3.

For $x,y$ defined by cuts such that $x^{L} for all $L$ and $x for all $R$, and assuming inductively that $f(x^{L})\vartriangleleft f(y)$ for all $L$, $f(x)\vartriangleleft f(y^{R})$ for all $R$, and also that $f(x^{L})\vartriangleleft f(x^{R})$ and $f(y^{L})\vartriangleleft f(y^{R})$ for all $L$ and $R$, we must prove $f(x)\trianglelefteqslant f(y)$.

4. 4.

For $x,y$ defined by cuts and an $L_{0}$ such that $x\leq y^{L_{0}}$, and assuming inductively that $f(x)\trianglelefteqslant f(y^{L_{0}})$, and also that $f(x^{L})\vartriangleleft f(x^{R})$ and $f(y^{L})\vartriangleleft f(y^{R})$ for all $L$ and $R$, we must prove $f(x)\vartriangleleft f(y)$.

5. 5.

For $x,y$ defined by cuts and an $R_{0}$ such that $x^{R_{0}}\leq y$, and assuming inductively that $f(x^{R_{0}})\trianglelefteqslant f(y)$, and also that $f(x^{L})\vartriangleleft f(x^{R})$ and $f(y^{L})\vartriangleleft f(y^{R})$ for all $L$ and $R$, we must prove $f(x)\vartriangleleft f(y)$.

The last three clauses can be more concisely described by saying we must prove that $f$ (as defined in the first clause) takes $\leq$ to $\trianglelefteqslant$ and $<$ to $\vartriangleleft$. We will refer to these properties by saying that $f$ preserves inequalities. Moreover, in proving that $f$ preserves inequalities, we may assume the particular instance of $\leq$ or $<$ to be obtained from one of its constructors, and we may also use inductive hypotheses that $f$ preserves all inequalities appearing in the input to that constructor.

If we succeed at 15 above, then we obtain $f:\mathsf{No}\to A$, which computes on cuts as specified by 1, and which preserves all inequalities:

 $\forall(x,y:\mathsf{No}).\,\Big{(}(x\leq y)\to(f(x)\trianglelefteqslant f(y))% \Big{)}\land\Big{(}(x

Like $(\mathbb{R}_{\mathsf{c}},\mathord{\sim})$-recursion for the Cauchy reals, this recursion principle is essential for defining functions on $\mathsf{No}$, since we cannot first define a function on “pre-surreals” and only later prove that it respects the notion of equality.

###### Example 11.6.5.

Let us define the negation function $\mathsf{No}\to\mathsf{No}$. We apply the joint recursion principle with $A:\!\!\equiv\mathsf{No}$, with $(x\trianglelefteqslant y):\!\!\equiv(y\leq x)$, and $(x\vartriangleleft y):\!\!\equiv(y. Clearly this $\trianglelefteqslant$ is antisymmetric.

For the main clause in the definition, we assume $x$ defined by a cut, with $-x^{L}$ and $-x^{R}$ defined such that $-x^{L}\vartriangleleft-x^{R}$ for all $L$ and $R$. By definition, this means $-x^{R}<-x^{L}$ for all $L$ and $R$, so we can define $-x$ by the cut $\{\,-x^{R}\,\big{|}\,-x^{L}\,\}$. This notation, which follows Conway, refers to the cut whose left options are indexed by the type $\mathcal{R}$ indexing the right options of $x$, and whose right options are indexed by the type $\mathcal{L}$ indexing the left options of $x$, with the corresponding families $\mathcal{R}\to\mathsf{No}$ and $\mathcal{L}\to\mathsf{No}$ defined by composing those for $x$ with negation.

We now have to verify that $f$ preserves inequalities.

• For $x\leq y$, we may assume $x^{L} for all $L$ and $x for all $R$, and show $-y\leq-x$. But inductively, we may assume $-y<-x^{L}$ and $-y^{R}<-x$, which gives the desired result, by definition of $-y$, $-x$, and the constructor of $\leq$.

• For $x, in the first case when it arises from some $x\leq y^{L_{0}}$, we may inductively assume $-y^{L_{0}}\leq-x$, in which case $-y<-x$ follows by the constructor of $<$.

• Similarly, if $x arises from $x^{R_{0}}\leq y$, the inductive hypothesis is $-y\leq-x^{R}$, yielding $-y<-x$ again.

To do much more than this, however, we will need to characterize the relations $\leq$ and $<$ more explicitly, as we did for the Cauchy reals in \autorefthm:RC-sim-characterization. Also as there, we will have to simultaneously prove a couple of essential properties of these relations, in order for the induction to go through.

###### Theorem 11.6.6.

There are relations $\mathord{\preceq}:\mathsf{No}\to\mathsf{No}\to\mathsf{Prop}$ and $\mathord{\prec}:\mathsf{No}\to\mathsf{No}\to\mathsf{Prop}$ such that if $x$ and $y$ are surreals defined by cuts, then

 $\displaystyle(x\preceq y)$ $\displaystyle:\!\!\equiv\big{(}\forall(L).\,x^{L}\prec y\big{)}\land\big{(}% \forall(R).\,x\prec y^{R}\big{)}$ $\displaystyle(x\prec y)$ $\displaystyle:\!\!\equiv\big{(}\exists(L).\,x\preceq y^{L}\big{)}\lor\big{(}% \exists(R).\,x^{R}\preceq y\big{)}.$

Moreover, we have

 $(x\prec y)\to(x\preceq y)$ (11.6.6)

and all the reasonable transitivity properties making $\prec$ and $\preceq$ into a “bimodule” over $\leq$ and $<$:

 $\begin{array}[]{c@{\hspace{1cm}}c}(x\leq y)\to(y\preceq z)\to(x\preceq z)% \hskip 28.452756pt&(x\preceq y)\to(y\leq z)\to(x\preceq z)\\ (x\leq y)\to(y\prec z)\to(x\prec z)\hskip 28.452756pt&(x\preceq y)\to(y (11.6.7)
###### Proof.

We define $\preceq$ and $\prec$ by double $(\mathsf{No},\leq,<)$-induction on $x,y$. The first induction is a simple recursion, whose codomain is the subset $A$ of $(\mathsf{No}\to\mathsf{Prop})\times(\mathsf{No}\to\mathsf{Prop})$ consisting of pairs of predicates of which one implies the other and which satisfy “transitivity on the right”, i.e. (11.6.6) and the right column of (11.6.7) with $(x\preceq\mathord{\hskip 1.0pt\text{--}\hskip 1.0pt})$ and $(x\prec\mathord{\hskip 1.0pt\text{--}\hskip 1.0pt})$ replaced by the two given predicates. As in the proof of \autorefdefn:RC-approx, we regard these predicates as half of binary relations, writing them as $y\mapsto(\diamondsuit\preceq y)$ and $y\mapsto(\diamondsuit\prec y)$, with $\diamondsuit$ denoting the pair of relations. We equip $A$ with the following two relations:

 $\displaystyle(\diamondsuit\trianglelefteqslant\heartsuit)$ $\displaystyle:\!\!\equiv\forall(y:\mathsf{No}).\,\Big{(}(\heartsuit\preceq y)% \to(\diamondsuit\preceq y)\Big{)}\land\Big{(}(\heartsuit\prec y)\to(% \diamondsuit\prec y)\Big{)},$ $\displaystyle(\diamondsuit\vartriangleleft\heartsuit)$ $\displaystyle:\!\!\equiv\forall(y:\mathsf{No}).\,\Big{(}(\heartsuit\preceq y)% \to(\diamondsuit\prec y)\Big{)}.$

Note that $\trianglelefteqslant$ is antisymmetric, since if $\diamondsuit\trianglelefteqslant\heartsuit$ and $\heartsuit\trianglelefteqslant\diamondsuit$, then $(\heartsuit\preceq y)\Leftrightarrow(\diamondsuit\preceq y)$ and $(\heartsuit\prec y)\Leftrightarrow(\diamondsuit\prec y)$ for all $y$, hence $\diamondsuit=\heartsuit$ by univalence for mere propositions and function extensionality. Moreover, to say that a function $\mathsf{No}\to A$ preserves inequalities is exactly to say that, when regarded as a pair of binary relations on $\mathsf{No}$, it satisfies “transitivity on the left” (the left column of (11.6.7)).

Now for the primary clause of the recursion, we assume given $x$ defined by a cut, and relations $(x^{L}\prec\mathord{\hskip 1.0pt\text{--}\hskip 1.0pt})$, $(x^{R}\prec\mathord{\hskip 1.0pt\text{--}\hskip 1.0pt})$, $(x^{L}\preceq\mathord{\hskip 1.0pt\text{--}\hskip 1.0pt})$, and $(x^{R}\preceq\mathord{\hskip 1.0pt\text{--}\hskip 1.0pt})$ for all $L$ and $R$, of which the strict ones imply the non-strict ones, which satisfy transitivity on the right, and such that

 $\forall(L,R).\,\forall(y:\mathsf{No}).\,\Big{(}(x^{R}\preceq y)\to(x^{L}\prec y% )\Big{)}.$ (11.6.9)

We now have to define $(x\prec y)$ and $(x\preceq y)$ for all $y$. Here in contrast to \autorefdefn:RC-approx, rather than a nested recursion, we use a nested induction, in order to be able to inductively use transitivity on the left with respect to the inequalities $x^{L} and $x. Define $A^{\prime}:\mathsf{No}\to\mathcal{U}$ by taking $A^{\prime}(y)$ to be the subset $A^{\prime}$ of $\mathsf{Prop}\times\mathsf{Prop}$ consisting of two mere propositions, denoted $\triangle\preceq y$ and $\triangle\prec y$ (with $\triangle:A^{\prime}(y)$), such that

 $\displaystyle(\triangle\prec y)\to(\triangle\preceq y)$ (11.6.10) $\displaystyle\forall(L).\,(\triangle\preceq y)\to(x^{L}\prec y)$ (11.6.10) $\displaystyle\forall(R).\,(x^{R}\preceq y)\to(\triangle\prec y).$ (11.6.10)

Using notation analogous to $\trianglelefteqslant$ and $\vartriangleleft$, we equip $A^{\prime}$ with the two relations defined for $\triangle:A^{\prime}(y)$ and $\square:A^{\prime}(z)$ by

 $\displaystyle(\triangle\sqsubseteq\square)$ $\displaystyle:\!\!\equiv\Big{(}(\triangle\preceq y)\to(\square\preceq z)\Big{)% }\land\Big{(}(\triangle\prec y)\to(\square\prec z)\Big{)}$ $\displaystyle(\triangle\sqsubset\square)$ $\displaystyle:\!\!\equiv\Big{(}(\triangle\preceq y)\to(\square\prec z)\Big{)}.$

Again, $\sqsubseteq$ is evidently antisymmetric in the appropriate sense. Moreover, a function $\mathchoice{\prod_{y:\mathsf{No}}\,}{\mathchoice{{\textstyle\prod_{(y:\mathsf{% No})}}}{\prod_{(y:\mathsf{No})}}{\prod_{(y:\mathsf{No})}}{\prod_{(y:\mathsf{No% })}}}{\mathchoice{{\textstyle\prod_{(y:\mathsf{No})}}}{\prod_{(y:\mathsf{No})}% }{\prod_{(y:\mathsf{No})}}{\prod_{(y:\mathsf{No})}}}{\mathchoice{{\textstyle% \prod_{(y:\mathsf{No})}}}{\prod_{(y:\mathsf{No})}}{\prod_{(y:\mathsf{No})}}{% \prod_{(y:\mathsf{No})}}}A^{\prime}(y)$ which preserves inequalities is precisely a pair of predicates of which one implies the other, which satisfy transitivity on the right, and transitivity on the left with respect to the inequalities $x^{L} and $x. Thus, this inner induction will provide what we need to complete     the primary clause of the outer recursion.

For the primary clause of the inner induction, we assume also given $y$ defined by a cut, and properties $(x\prec y^{L})$, $(x\prec y^{R})$, $(x\preceq y^{L})$, and $(x\preceq y^{R})$ for all $L$ and $R$, with the strict ones implying the non-strict ones, transitivity on the left with respect to $x^{L} and $x, and on the right with respect to $y^{L}. We can now give the definitions specified in the theorem statement:

 $\displaystyle(x\preceq y)$ $\displaystyle:\!\!\equiv(\forall(L).\,x^{L}\prec y)\land(\forall(R).\,x\prec y% ^{R}),$ (11.6.10) $\displaystyle(x\prec y)$ $\displaystyle:\!\!\equiv(\exists(L).\,x\preceq y^{L})\lor(\exists(R).\,x^{R}% \preceq y).$ (11.6.10)

For this to define an element of $A^{\prime}(y)$, we must show first that $(x\prec y)\to(x\preceq y)$. The assumption $x\prec y$ has two cases. On one hand, if there is $L_{0}$ with $x\preceq y^{L_{0}}$, then by transitivity on the right with respect to $y^{L_{0}}, we have $x\prec y^{R}$ for all $R$. Moreover, by transitivity on the left with respect to $x^{L}, we have $x^{L}\prec y^{L_{0}}$ for any $L$, hence $x^{L}\prec y$ by transitivity on the right. Thus, $x\preceq y$.

On the other hand, if there is $R_{0}$ with $x^{R_{0}}\preceq y$, then by transitivity on the left with respect to $x^{L} we have $x^{L}\prec y$ for all $L$. And by transitivity on the left and right with respect to $x and $y, we have $x\prec y^{R}$ for any $R$. Thus, $x\preceq y$.

We also need to show that these definitions are transitive     on the left with respect to $x^{L} and $x. But if $x\preceq y$, then $x^{L}\prec y$ for all $L$ by definition; while if $x^{R}\preceq y$, then $x\prec y$ also by definition.

Thus, (11.6.10) and (11.6.10) do define an element of $A^{\prime}(y)$. We now have to verify that this definition preserves inequalities, as a dependent function into $A^{\prime}$, i.e. that these relations are transitive on the right. Remember that in each case, we may assume inductively that they are transitive on the right with respect to all inequalities arising in the inequality constructor.

• Suppose $x\preceq y$ and $y\leq z$, the latter arising from $y^{L} and $y for all $L$ and $R$. Then the inductive hypothesis (of the inner recursion) applied to $y yields $x\prec z^{R}$ for any $R$. Moreover, by definition $x\preceq y$ implies that $x^{L}\prec y$ for any $L$, so by the inductive hypothesis of the outer recursion we have $x^{L}\prec z$. Thus, $x\preceq z$.

• Suppose $x\preceq y$ and $y. First, suppose $y arises from $y\leq z^{L_{0}}$. Then the inner inductive hypothesis applied to $y\leq z^{L_{0}}$ yields $x\preceq z^{L_{0}}$, hence $x\prec z$.

Second, suppose $y arises from $y^{R_{0}}\leq z$. Then by definition, $x\preceq y$ implies $x\prec y^{R_{0}}$, and then the inner inductive hypothesis for $y^{R_{0}}\leq z$ yields $x\prec z$.

• Suppose $x\prec y$ and $y\leq z$, the latter arising from $y^{L} and $y for all $L$ and $R$. By definition, $x\prec y$ implies there merely exists $R_{0}$ with $x^{R_{0}}\preceq y$ or $L_{0}$ with $x\preceq y^{L_{0}}$. If $x^{R_{0}}\preceq y$, then the outer inductive hypothesis yields $x^{R_{0}}\preceq z$, hence $x\prec z$. If $x\preceq y^{L_{0}}$, then the inner inductive hypothesis for $y^{L_{0}} (which holds by the constructor of $y\leq z$) yields $x\prec z$.

This completes the inner induction. Thus, for any $x$ defined by a cut, we have $(x\prec\mathord{\hskip 1.0pt\text{--}\hskip 1.0pt})$ and $(x\preceq\mathord{\hskip 1.0pt\text{--}\hskip 1.0pt})$ defined by (11.6.10) and (11.6.10), and transitive on the right.

To complete the outer recursion, we need to verify these definitions are transitive on the left. After a $\mathsf{No}$-induction on $z$, we end up with three cases that are essentially identical to those just described above for transitivity on the right. Hence, we omit them. ∎

###### Theorem 11.6.10.

For any $x,y:\mathsf{No}$ we have $(x and $(x\leq y)=(x\preceq y)$.

###### Proof.

From left to right, we use $(\mathsf{No},\leq,<)$-induction where $A(x):\!\!\equiv\mathbf{1}$, with $\preceq$ and $\prec$ supplying the relations $\trianglelefteqslant$ and $\vartriangleleft$. In all the constructor cases, $x$ and $y$ are defined by cuts, so the definitions of $\preceq$ and $\prec$ evaluate, and the inductive hypotheses apply.

From right to left, we use $\mathsf{No}$-induction to assume that $x$ and $y$ are defined by cuts. But now the definitions of $\preceq$ and $\prec$, and the inductive hypotheses, supply exactly the data required for the relevant constructors of $\leq$ and $<$. ∎

###### Corollary 11.6.11.

The relations $\leq$ and $<$ on $\mathsf{No}$ satisfy

 $\forall(x,y:\mathsf{No}).\,(x

and are transitive:

 $\displaystyle(x\leq y)\to(y\leq z)\to(x\leq z)$ $\displaystyle(x\leq y)\to(y $\displaystyle(x

As with the Cauchy reals, the joint $(\mathsf{No},\leq,<)$-recursion principle remains essential when defining all operations  on $\mathsf{No}$.

###### Example 11.6.12.

We define $\mathord{+}:\mathsf{No}\to\mathsf{No}\to\mathsf{No}$ by a double recursion. For the outer recursion, we take the codomain to be the subset of $\mathsf{No}\to\mathsf{No}$ consisting of functions $g$ such that $(x and $(x\leq y)\to(g(x)\leq g(y))$ for all $x,y$. For such $g,h$ we define $(g\trianglelefteqslant h):\!\!\equiv\forall(x:\mathsf{No}).\,g(x)\leq h(x)$ and $(g\vartriangleleft h):\!\!\equiv\forall(x:\mathsf{No}).\,g(x). Clearly $\trianglelefteqslant$ is antisymmetric.

For the primary clause of the recursion, we suppose $x$ defined by a cut, and we define $(x+\mathord{\hskip 1.0pt\text{--}\hskip 1.0pt})$ by an inner recursion on $\mathsf{No}$ with codomain $\mathsf{No}$, with relations $\sqsubseteq$ and $\sqsubset$ coinciding with $\leq$ and $<$. For the primary clause of the inner recursion, we suppose also $y$ defined by a cut, and give Conway’s definition:

 $x+y:\!\!\equiv\{\,x^{L}+y,x+y^{L}\,\big{|}\,x^{R}+y,x+y^{R}\,\}.$

In other words, the left options of $x+y$ are all numbers of the form $x^{L}+y$ for some left option $x^{L}$, or $x+y^{L}$ for some left option $y^{L}$. Now we verify that this definition preserves inequality:

• If $y\leq z$ arises from knowing that $y^{L} and $y for all $L$ and $R$, then the inner inductive hypothesis gives $x+y^{L} and $x+y, while the outer inductive hypotheses give $x^{L}+y and $x^{R}+y. And since each $x^{L}+z$ is by definition a left option of $x+z$, we have $x^{L}+z, and similarly $x+y. Thus, using transitivity, $x^{L}+y and $x+y, and so we may conclude $x+y\leq x+z$ by the constructor of $\leq$.

• If $y arises from an $L_{0}$ with $y\leq z^{L_{0}}$, then inductively $x+y\leq x+z^{L_{0}}$, hence $x+y since $x+z^{L_{0}}$ is a right option of $x+z$.

• Similarly, if $y arises from $y^{R_{0}}\leq z$, then $x+y since $x+y^{R_{0}}\leq x+z$.

This completes the inner recursion. For the outer recursion, we have to verify that $+$ preserves inequality on the left as well. After an $\mathsf{No}$-induction, this proceeds in exactly the same way.

In the Appendix to Part Zero of [conway:onag], Conway discusses how the surreal numbers may be formalized in ZFC set theory: by iterating along the ordinals and passing to sets of representatives of lowest rank for each equivalence class  , or by representing numbers with “sign-expansions”. He then remarks that

The curiously complicated nature of these constructions tells us more about the nature of formalizations within ZF than about our system of numbers…

and goes on to advocate for a general theory of “permissible kinds of construction” which should include

1. 1.

Objects may be created from earlier objects in any reasonably constructive fashion.

2. 2.

Equality among the created objects can be any desired equivalence relation.

Condition 1 can be naturally read as justifying general principles of inductive definition, such as those presented in \autorefsec:strictly-positive,\autorefsec:generalizations. In particular, the condition of strict positivity for constructors can be regarded as a formalization of what it means to be “reasonably constructive”. Condition 2 then suggests we should extend this to higher inductive definitions of all sorts, in which we can impose path constructors making objects equal in any reasonable way. For instance, in the next paragraph Conway says:

…we could also, for instance, freely create a new object $(x,y)$ and call it the ordered pair of $x$ and $y$. We could also create an ordered pair $[x,y]$ different from $(x,y)$ but co-existing with it…If instead we wanted to make $(x,y)$ into an unordered pair, we could define equality by means of the equivalence relation $(x,y)=(z,t)$ if and only if $x=z,y=t$ or $x=t,y=z$.

The freedom to introduce new objects with new names, generated by certain forms of constructors, is precisely what we have in the theory of inductive definitions. Just as with our two copies of the natural numbers  $\mathbb{N}$ and $\mathbb{N}^{\prime}$ in \autorefsec:appetizer-univalence, if we wrote down an identical definition to the cartesian product type $A\times B$, we would obtain a distinct product type $A\times^{\prime}B$ whose canonical elements we could freely write as $[x,y]$. And we could make one of these a type of unordered pairs by adding a suitable path constructor.

To be sure, Conway’s point was not to complain about ZF in particular, but to argue against all foundational theories at once:

…this proposal is not of any particular theory as an alternative to ZF… What is proposed is instead that we give ourselves the freedom to create arbitrary mathematical theories of these kinds, but prove a metatheorem  which ensures once and for all that any such theory could be formalized in terms of any of the standard foundational theories.

One might respond that, in fact, univalent foundations is not one of the “standard foundational theories” which Conway had in mind, but rather the metatheory in which we may express our ability to create new theories, and about which we may prove Conway’s metatheorem. For instance, the surreal numbers are one of the “mathematical theories” Conway has in mind, and we have seen that they can be constructed and justified inside univalent foundations. Similarly, Conway remarked earlier that

…set theory would be such a theory, sets being constructed from earlier ones by processes corresponding to the usual axioms, and the equality relation being that of having the same members.

This description closely matches the higher-inductive construction of the cumulative hierarchy of set theory in \autorefsec:cumulative-hierarchy. Conway’s metatheorem would then correspond to the fact we have referred to several times that we can construct a model of univalent foundations inside ZFC (which is outside the scope of this book).

However, univalent foundations is so rich and powerful in its own right that it would be foolish to relegate it to only a metatheory in which to construct set-like theories. We have seen that even at the level of sets (0-types), the higher inductive types in univalent foundations yield direct constructions of objects by their universal properties  (\autorefsec:free-algebras), such as a constructive theory of Cauchy completion (\autorefsec:cauchy-reals). But most importantly, the potential to model homotopy theory and category theory     directly in the foundational system (\autorefcha:homotopy   ,\autorefcha:category-theory) gives univalent foundations an advantage which no set-theoretic foundation can match.

Title 11.6 The surreal numbers
\metatable