11.6 The surreal numbers

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

𝖭𝗈

of

surreal numbers

[

conway:onag

]

.
The surreal numbers are the natural common

generalization

of the (Dedekind)

real numbers

(

\autoref

sec:dedekind-reals) and the

ordinal numbers

(

\autoref

sec:

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

|

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

𝖭𝗈

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

∼

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

∼

.

Moreover, we will define strict inequality

<

and non-strict inequality

≤

for surreals separately (and mutually inductively).
Conway defines

<

in terms of

≤

, 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

\autoref

sec:strictly-positive).

Secondly, Conway says that

L

and

R

in

{

L

|

R

}

should be “sets of surreal numbers”, but the naive meaning of this as a

predicate

𝖭𝗈

→

𝖯𝗋𝗈𝗉

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

𝖭𝗈

.
In

type theory

, this means that

𝖭𝗈

will be defined relative to a

universe

𝒰

, but will itself belong to the next higher universe

𝒰

′

, like the sets

𝖮𝗋𝖽

and

𝖢𝖺𝗋𝖽

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

𝒰

-small, and so it is natural to

represent

them by

families

of surreals

indexed by

some

𝒰

-small type.
(This is all exactly the same as what we did with the cumulative hierarchy in

\autoref

sec:cumulative-hierarchy.)
That is, the constructor of surreals will have type

∏

ℒ

,

ℛ

:

𝒰

(

ℒ

→

𝖭𝗈

)

→

(

ℛ

→

𝖭𝗈

)

→

(

some condition

)

→

𝖭𝗈

which is indeed strictly positive.

Finally, after giving the mutual definitions of

𝖭𝗈

and its

ordering

, Conway declares two surreal numbers

x

and

y

to be

equal

if

x

≤

y

and

y

≤

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

|

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

No

of

surreal numbers

,
along with the relations

<

:

No

→

No

→

U

and

≤

:

No

→

No

→

U

, are defined higher inductive-inductively as follows.
The type

No

has the following constructors.

•

For any

ℒ

,

ℛ

:

𝒰

and

functions

ℒ

→

𝖭𝗈

and

ℛ

→

𝖭𝗈

, whose values we write as

x

L

and

x

R

for

L

:

ℒ

and

R

:

ℛ

respectively, if

∀

(

L

:

ℒ

)

.

∀

(

R

:

ℛ

)

.

x

L

<

x

R

, then there is a surreal number

x

.

•

For any

x

,

y

:

𝖭𝗈

such that

x

≤

y

and

y

≤

x

, we have

𝖾𝗊

𝖭𝗈

⁢

(

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

:

L

, and similarly

x

R

will assume

R

:

R

.
In this way we can usually avoid naming the indexing types

L

and

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

≤

has the following constructors.

•

Given cuts defining two surreal numbers

x

and

y

, if

x

L

<

y

for all

L

, and

x

<

y

R

for all

R

, then

x

≤

y

.

•

Propositional

truncation

:
for any

x

,

y

:

𝖭𝗈

, if

p

,

q

:

x

≤

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

≤

y

L

, then

x

<

y

.

•

Given cuts defining two surreal numbers

x

and

y

, if there is an

R

such that

x

R

≤

y

, then

x

<

y

.

•

Propositional truncation: for any

x

,

y

:

𝖭𝗈

, if

p

,

q

:

x

<

y

, 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

≥

any member of

R

, then there is a number

{

L

|

R

}

.
All numbers are constructed in this way.

-

x

≥

y

iff (no

x

R

≤

y

and

x

≤

no

y

L

).

-

x

=

y

iff (

x

≥

y

and

y

≥

x

).

-

x

>

y

iff (

x

≥

y

and

y

≱

x

).

The

inclusion

of

x

≥

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

≥

, so that his condition for

{

L

|

R

}

to be a surreal is the same as ours.
Negating Conway’s

≤

and canceling double negations, we arrive at our definition of

<

, and we can then reformulate his

≤

in terms of

<

without negations.

We can immediately populate

𝖭𝗈

with many surreal numbers.
Like Conway, we write

{

x

,

y

,

z

,

…

|

u

,

v

,

w

,

…

}

for the surreal number defined by a cut where

ℒ

→

𝖭𝗈

and

ℛ

→

𝖭𝗈

are families described by

x

,

y

,

z

,

…

and

u

,

v

,

w

,

…

.
Of course, if

ℒ

or

ℛ

are

𝟎

, 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

ι

ℕ

:

ℕ

→

𝖭𝗈

recursively by

ι

ℕ

⁢

(

0

)

:

≡

{

|

}

,

ι

ℕ

⁢

(

𝗌𝗎𝖼𝖼

⁢

(

n

)

)

:

≡

{

ι

ℕ

(

n

)

|

}

.

That is,

ι

ℕ

⁢

(

0

)

is defined by the cut consisting of

𝟎

→

𝖭𝗈

and

𝟎

→

𝖭𝗈

.
Similarly,

ι

ℕ

⁢

(

𝗌𝗎𝖼𝖼

⁢

(

n

)

)

is defined by

𝟏

→

𝖭𝗈

(picking out

ι

ℕ

⁢

(

n

)

) and

𝟎

→

𝖭𝗈

.

•

Similarly, we define

ι

ℤ

:

ℤ

→

𝖭𝗈

using the sign-case

recursion

principle (

\autoref

thm:sign-induction):

ι

ℤ

⁢

(

0

)

:

≡

{

|

}

,

ι

ℤ

⁢

(

n

+

1

)

:

≡

{

ι

ℤ

(

n

)

|

}

n

≥

0

,

ι

ℤ

⁢

(

n

-

1

)

:

≡

{

|

ι

ℤ

(

n

)

}

n

≤

0

.

•

By a

dyadic rational

we mean a pair

(

a

,

n

)

where

a

:

ℤ

and

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

ℚ

D

denotes the set of dyadic rationals, we define

ι

ℚ

D

:

ℚ

D

→

𝖭𝗈

by

induction

on

n

:

ι

ℚ

D

⁢

(

a

/

2

0

)

:

≡

ι

ℤ

(

a

)

,

ι

ℚ

D

⁢

(

a

/

2

n

)

:

≡

{

a

/

2

n

-

1

/

2

n

|

a

/

2

n

+

1

/

2

n

}

,

for

n

>

0

.

Here we use the fact that if

n

>

0

and

a

is odd, then

a

/

2

n

±

1

/

2

n

is a dyadic rational with a smaller denominator than

a

/

2

n

.

•

We define

ι

ℝ

𝖽

:

ℝ

𝖽

→

𝖭𝗈

, where

ℝ

𝖽

is (any version of) the Dedekind reals from

\autoref

sec:dedekind-reals, by

ι

ℝ

𝖽

⁢

(

x

)

:

≡

{

q

∈

ℚ

D

such that

q

<

x

|

q

∈

ℚ

D

such that

x

<

q

}

.

Unlike in the previous cases, it is not

obvious

that this extends

ι

ℚ

D

when we regard dyadic rationals as Dedekind reals.
This follows from the simplicity

theorem

(

\autoref

thm:NO-simplicity).

•

Recall the type

𝖮𝗋𝖽

of

ordinals

from

\autoref

sec:ordinals, which is

well-ordered

by the relation

<

, where

A

<

B

means that

A

=

B

/

b

for some

b

:

B

.
We define

ι

𝖮𝗋𝖽

:

𝖮𝗋𝖽

→

𝖭𝗈

by

well-founded recursion

(

\autoref

thm:wfrec) on

𝖮𝗋𝖽

:

ι

𝖮𝗋𝖽

(

A

)

:

≡

{

ι

𝖮𝗋𝖽

(

A

/

a

)

for all

a

:

A

|

}

.

It will also follow from the simplicity theorem that

ι

𝖮𝗋𝖽

restricted to finite ordinals agrees with

ι

ℕ

.

•

A few more interesting examples taken from Conway:

ω

:

≡

{

0

,

1

,

2

,

3

,

…

|

}

(also an ordinal)

-

ω

:

≡

{

|

…

,

-

3

,

-

2

,

-

1

,

0

}

1

/

ω

:

≡

{

0

|

1

,

1

2

,

1

4

,

1

8

,

…

}

ω

-

1

:

≡

{

0

,

1

,

2

,

3

,

…

|

ω

}

ω

/

2

:

≡

{

0

,

1

,

2

,

3

,

…

|

…

,

ω

-

2

,

ω

-

1

,

ω

}

.

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

<

z

<

x

R

for all

L

and

R

.

•

For every left option

z

L

of

z

, there exists a left option

x

L

′

with

z

L

≤

x

L

′

.

•

For every right option

z

R

of

z

, there exists a right option

x

R

′

with

x

R

′

≤

z

R

.

Then

x

=

z

.

Proof.

Applying the path constructor of

𝖭𝗈

, we must show

x

≤

z

and

z

≤

x

.
The first entails showing

x

L

<

z

for all

L

, which we assumed, and

x

<

z

R

for all

R

.
But by

assumption

, for any

z

R

there is an

x

R

′

with

x

R

′

≤

z

R

hence

x

<

z

R

as desired.
Thus

x

≤

z

; the proof of

z

≤

x

is

symmetric

.
∎

In order to say much more about surreal numbers, however, we need their induction principle.
The mutual induction principle for

(

𝖭𝗈

,

≤

,

<

)

applies to three families of types:

A

:

𝖭𝗈

→

𝒰

B

:

∏

(

x

,

y

:

𝖭𝗈

)

∏

(

a

:

A

(

x

)

)

∏

(

b

:

A

(

y

)

)

(

x

≤

y

)

→

𝒰

C

:

∏

(

x

,

y

:

𝖭𝗈

)

∏

(

a

:

A

(

x

)

)

∏

(

b

:

A

(

y

)

)

(

x

<

y

)

→

𝒰

.

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

,

ξ

)

as

(

x

,

a

)

⁢

\trianglelefteqslant

ξ

⁢

(

y

,

b

)

and

C

⁢

(

x

,

y

,

a

,

b

,

ξ

)

as

(

x

,

a

)

⁢

⊲

ξ

⁢

(

y

,

b

)

.
Similarly, we usually omit the

ξ

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

⁢

⊲

⁢

b

.
With these notations, the hypotheses of the induction principle are the following.

•

For any cut defining a surreal number

x

, together with

(a)

for each

L

, an

element

a

L

:

A

⁢

(

x

L

)

, and

(b)

for each

R

, an element

a

R

:

A

⁢

(

x

R

)

, such that

(c)

for all

L

and

R

we have

(

x

L

,

a

L

)

⁢

⊲

⁢

(

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

:

𝖭𝗈

with

a

:

A

⁢

(

x

)

and

b

:

A

⁢

(

y

)

, if

x

≤

y

and

y

≤

x

and also

(

x

,

a

)

⁢

\trianglelefteqslant

⁢

(

y

,

b

)

and

(

y

,

b

)

⁢

\trianglelefteqslant

⁢

(

x

,

a

)

,
then

a

=

𝖾𝗊

𝖭𝗈

A

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

<

y

and

(

x

L

,

a

L

)

⁢

⊲

⁢

(

y

,

f

b

)

,
and for all

R

we have

x

<

y

R

and

(

x

,

f

a

)

⁢

⊲

⁢

(

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

≤

y

L

0

and

(

x

,

f

a

)

⁢

\trianglelefteqslant

⁢

(

y

L

0

,

b

L

0

)

,
we have

(

x

,

f

a

)

⁢

⊲

⁢

(

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

≤

y

together with

(

x

R

0

,

a

R

0

)

,

\trianglelefteqslant

⁢

(

y

,

f

b

)

,
we have

(

x

,

f

a

)

⁢

⊲

⁢

(

y

,

f

b

)

.

•

⊲

takes values in mere propositions.

Under these hypotheses we deduce a function

f

:

∏

(

x

:

𝖭𝗈

)

A

⁢

(

x

)

such that

f

⁢

(

x

)

≡

f

f

⁢

[

x

]

(11.6.3)

(

x

≤

y

)

⇒

(

x

,

f

⁢

(

x

)

)

⁢

\trianglelefteqslant

⁢

(

y

,

f

⁢

(

y

)

)

(

x

<

y

)

⇒

(

x

,

f

⁢

(

x

)

)

⁢

⊲

⁢

(

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

⊲

).
As usual, we will generally use pattern-matching notation, where the definition of

f

on a cut

{

x

L

|

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

⊲

.
Taking

\trianglelefteqslant

and

⊲

to be

constant

at

𝟏

, we have

𝖭𝗈

-induction

, which for simplicity we state only for mere properties:

•

Given

P

:

𝖭𝗈

→

𝖯𝗋𝗈𝗉

, 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

:

𝖭𝗈

.

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

𝖭𝗈

-induction, we can prove

Theorem 11.6.3

(Conway’s Theorem 0).

1.

For any

x

:

𝖭𝗈

, we have

x

≤

x

.

2.

For any

x

:

𝖭𝗈

defined by a cut, we have

x

L

<

x

and

x

<

x

R

for all

L

and

R

.

Proof.

Note first that if

x

≤

x

, then whenever

x

occurs as a left option of some cut

y

, we have

x

<

y

by the first constructor of

<

, and similarly whenever

x

occurs as a right option of a cut

y

, we have

y

<

x

by the second constructor of

<

.
In particular,

1

⇒

2

.

We prove

1

by

𝖭𝗈

-induction on

x

.
Thus, assume

x

is defined by a cut such that

x

L

≤

x

L

and

x

R

≤

x

R

for all

L

and

R

.
But by our observation above, these assumptions imply

x

L

<

x

and

x

<

x

R

for all

L

and

R

, yielding

x

≤

x

by the constructor of

≤

.
∎

Corollary 11.6.4

.

𝖭𝗈

is a 0-type.

Proof.

The mere relation

R

(

x

,

y

)

:

≡

(

x

≤

y

)

∧

(

y

≤

x

)

implies

identity

by the path constructor of

𝖭𝗈

, and contains the diagonal by

\autoref

thm:NO-refl-opt

1

.
Thus,

\autoref

thm:h-set-refrel-in-paths-sets applies.
∎

By contrast, Conway’s Theorem 1 (

transitivity

of

≤

) is somewhat harder to establish with our definition; see

\autoref

thm:NO-unstrict-transitive.

We will also need the joint recursion principle,

(

𝖭𝗈

,

≤

,

<

)

-recursion

, which it is convenient to state as follows.
Suppose

A

is a type equipped with relations

\trianglelefteqslant

:

A

→

A

→

𝖯𝗋𝗈𝗉

and

⊲

:

A

→

A

→

𝖯𝗋𝗈𝗉

.
Then we can define

f

:

𝖭𝗈

→

A

by doing the following.

1.

For any

x

defined by a cut, assuming

f

⁢

(

x

L

)

and

f

⁢

(

x

R

)

to be defined such that

f

⁢

(

x

L

)

⁢

⊲

⁢

f

⁢

(

x

R

)

for all

L

and

R

, we must define

f

⁢

(

x

)

. (We call this the

primary

clause

of the recursion.)

2.

Prove that

\trianglelefteqslant

is

antisymmetric

: if

a

⁢

\trianglelefteqslant

⁢

b

and

b

⁢

\trianglelefteqslant

⁢

a

, then

a

=

b

.

3.

For

x

,

y

defined by cuts such that

x

L

<

y

for all

L

and

x

<

y

R

for all

R

, and assuming inductively that

f

⁢

(

x

L

)

⁢

⊲

⁢

f

⁢

(

y

)

for all

L

,

f

⁢

(

x

)

⁢

⊲

⁢

f

⁢

(

y

R

)

for all

R

, and also that

f

⁢

(

x

L

)

⁢

⊲

⁢

f

⁢

(

x

R

)

and

f

⁢

(

y

L

)

⁢

⊲

⁢

f

⁢

(

y

R

)

for all

L

and

R

, we must prove

f

⁢

(

x

)

⁢

\trianglelefteqslant

⁢

f

⁢

(

y

)

.

4.

For

x

,

y

defined by cuts and an

L

0

such that

x

≤

y

L

0

, and assuming inductively that

f

⁢

(

x

)

⁢

\trianglelefteqslant

⁢

f

⁢

(

y

L

0

)

, and also that

f

⁢

(

x

L

)

⁢

⊲

⁢

f

⁢

(

x

R

)

and

f

⁢

(

y

L

)

⁢

⊲

⁢

f

⁢

(

y

R

)

for all

L

and

R

, we must prove

f

⁢

(

x

)

⁢

⊲

⁢

f

⁢

(

y

)

.

5.

For

x

,

y

defined by cuts and an

R

0

such that

x

R

0

≤

y

, and assuming inductively that

f

⁢

(

x

R

0

)

⁢

\trianglelefteqslant

⁢

f

⁢

(

y

)

, and also that

f

⁢

(

x

L

)

⁢

⊲

⁢

f

⁢

(

x

R

)

and

f

⁢

(

y

L

)

⁢

⊲

⁢

f

⁢

(

y

R

)

for all

L

and

R

, we must prove

f

⁢

(

x

)

⁢

⊲

⁢

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

≤

to

\trianglelefteqslant

and

<

to

⊲

.
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

≤

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

1

–

5

above, then we obtain

f

:

𝖭𝗈

→

A

, which computes on cuts as specified by

1

, and which preserves all inequalities:

∀

(

x

,

y

:

𝖭𝗈

)

.

(

(

x

≤

y

)

→

(

f

(

x

)

\trianglelefteqslant

f

(

y

)

)

)

∧

(

(

x

<

y

)

→

(

f

(

x

)

⊲

f

(

y

)

)

)

.

Like

(

ℝ

𝖼

,

∼

)

-recursion for the Cauchy reals, this recursion principle is essential for defining functions on

𝖭𝗈

, 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

No

→

No

.
We apply the joint recursion principle with

A

:

≡

No

, with

(

x

\trianglelefteqslant

y

)

:

≡

(

y

≤

x

)

, and

(

x

⊲

y

)

:

≡

(

y

<

x

)

.
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

⁢

⊲

-

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

|

-

x

L

}

.
This notation, which follows Conway, refers to the cut whose left options are indexed by the type

R

indexing the right options of

x

, and whose right options are indexed by the type

L

indexing the left options of

x

, with the corresponding families

R

→

No

and

L

→

No

defined by composing those for

x

with negation.

We now have to verify that

f

preserves inequalities.

•

For

x

≤

y

, we may assume

x

L

<

y

for all

L

and

x

<

y

R

for all

R

, and show

-

y

≤

-

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

≤

.

•

For

x

<

y

, in the first case when it arises from some

x

≤

y

L

0

, we may inductively assume

-

y

L

0

≤

-

x

, in which case

-

y

<

-

x

follows by the constructor of

<

.

•

Similarly, if

x

<

y

arises from

x

R

0

≤

y

, the

inductive hypothesis

is

-

y

≤

-

x

R

, yielding

-

y

<

-

x

again.

To do much more than this, however, we will need to characterize the relations

≤

and

<

more explicitly, as we did for the Cauchy reals in

\autoref

thm: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

⪯

:

No

→

No

→

Prop

and

≺

:

No

→

No

→

Prop

such that if

x

and

y

are surreals defined by cuts, then

(

x

⪯

y

)

:

≡

(

∀

(

L

)

.

x

L

≺

y

)

∧

(

∀

(

R

)

.

x

≺

y

R

)

(

x

≺

y

)

:

≡

(

∃

(

L

)

.

x

⪯

y

L

)

∨

(

∃

(

R

)

.

x

R

⪯

y

)

.

Moreover, we have

(

x

≺

y

)

→

(

x

⪯

y

)

(11.6.6)

and all the reasonable transitivity properties making

≺

and

⪯

into a “bimodule” over

≤

and

<

:

(

x

≤

y

)

→

(

y

⪯

z

)

→

(

x

⪯

z

)

(

x

⪯

y

)

→

(

y

≤

z

)

→

(

x

⪯

z

)

(

x

≤

y

)

→

(

y

≺

z

)

→

(

x

≺

z

)

(

x

⪯

y

)

→

(

y

<

z

)

→

(

x

≺

z

)

(

x

<

y

)

→

(

y

⪯

z

)

→

(

x

≺

z

)

(

x

≺

y

)

→

(

y

≤

z

)

→

(

x

≺

z

)

.

(11.6.7)

Proof.

We define

⪯

and

≺

by double

(

𝖭𝗈

,

≤

,

<

)

-induction on

x

,

y

.
The first induction is a simple recursion, whose codomain is the subset

A

of

(

𝖭𝗈

→

𝖯𝗋𝗈𝗉

)

×

(

𝖭𝗈

→

𝖯𝗋𝗈𝗉

)

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

⪯

–

)

and

(

x

≺

–

)

replaced by the two given predicates.
As in the proof of

\autoref

defn:RC-approx, we regard these predicates as half of

binary relations

, writing them as

y

↦

(

♢

⪯

y

)

and

y

↦

(

♢

≺

y

)

, with

♢

denoting the pair of relations.
We equip

A

with the following two relations:

(

♢

⁢

\trianglelefteqslant

⁢

♡

)

:

≡

∀

(

y

:

𝖭𝗈

)

.

(

(

♡

⪯

y

)

→

(

♢

⪯

y

)

)

∧

(

(

♡

≺

y

)

→

(

♢

≺

y

)

)

,

(

♢

⁢

⊲

⁢

♡

)

:

≡

∀

(

y

:

𝖭𝗈

)

.

(

(

♡

⪯

y

)

→

(

♢

≺

y

)

)

.

Note that

\trianglelefteqslant

is antisymmetric, since if

♢

⁢

\trianglelefteqslant

⁢

♡

and

♡

⁢

\trianglelefteqslant

⁢

♢

, then

(

♡

⪯

y

)

⇔

(

♢

⪯

y

)

and

(

♡

≺

y

)

⇔

(

♢

≺

y

)

for all

y

, hence

♢

=

♡

by univalence for mere propositions and function extensionality.
Moreover, to say that a function

𝖭𝗈

→

A

preserves inequalities is exactly to say that, when regarded as a pair of binary relations on

𝖭𝗈

, 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

≺

–

)

,

(

x

R

≺

–

)

,

(

x

L

⪯

–

)

, and

(

x

R

⪯

–

)

for all

L

and

R

, of which the strict ones imply the non-strict ones, which satisfy transitivity on the right, and such that

∀

(

L

,

R

)

.

∀

(

y

:

𝖭𝗈

)

.

(

(

x

R

⪯

y

)

→

(

x

L

≺

y

)

)

.

(11.6.9)

We now have to define

(

x

≺

y

)

and

(

x

⪯

y

)

for all

y

.
Here in contrast to

\autoref

defn: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

<

x

and

x

<

x

R

.
Define

A

′

:

𝖭𝗈

→

𝒰

by taking

A

′

⁢

(

y

)

to be the subset

A

′

of

𝖯𝗋𝗈𝗉

×

𝖯𝗋𝗈𝗉

consisting of two mere propositions, denoted

△

⪯

y

and

△

≺

y

(with

△

:

A

′

⁢

(

y

)

), such that

(

△

≺

y

)

→

(

△

⪯

y

)

(11.6.10)

∀

(

L

)

.

(

△

⪯

y

)

→

(

x

L

≺

y

)

(11.6.10)

∀

(

R

)

.

(

x

R

⪯

y

)

→

(

△

≺

y

)

.

(11.6.10)

Using notation analogous to

\trianglelefteqslant

and

⊲

, we equip

A

′

with the two relations defined for

△

:

A

′

⁢

(

y

)

and

□

:

A

′

⁢

(

z

)

by

(

△

⊑

□

)

:

≡

(

(

△

⪯

y

)

→

(

□

⪯

z

)

)

∧

(

(

△

≺

y

)

→

(

□

≺

z

)

)

(

△

⊏

□

)

:

≡

(

(

△

⪯

y

)

→

(

□

≺

z

)

)

.

Again,

⊑

is evidently antisymmetric in the appropriate sense.
Moreover, a function

∏

(

y

:

𝖭𝗈

)

A

′

⁢

(

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

<

x

and

x

<

x

R

.
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

≺

y

L

)

,

(

x

≺

y

R

)

,

(

x

⪯

y

L

)

, and

(

x

⪯

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

<

x

and

x

<

x

R

, and on the right with respect to

y

L

<

y

R

.
We can now give the definitions specified in the theorem statement:

(

x

⪯

y

)

:

≡

(

∀

(

L

)

.

x

L

≺

y

)

∧

(

∀

(

R

)

.

x

≺

y

R

)

,

(11.6.10)

(

x

≺

y

)

:

≡

(

∃

(

L

)

.

x

⪯

y

L

)

∨

(

∃

(

R

)

.

x

R

⪯

y

)

.

(11.6.10)

For this to define an element of

A

′

⁢

(

y

)

, we must show first that

(

x

≺

y

)

→

(

x

⪯

y

)

.
The assumption

x

≺

y

has two cases.
On one hand, if there is

L

0

with

x

⪯

y

L

0

, then by transitivity on the right with respect to

y

L

0

<

y

R

, we have

x

≺

y

R

for all

R

.
Moreover, by transitivity on the left with respect to

x

L

<

x

, we have

x

L

≺

y

L

0

for any

L

, hence

x

L

≺

y

by transitivity on the right.
Thus,

x

⪯

y

.

On the other hand, if there is

R

0

with

x

R

0

⪯

y

, then by transitivity on the left with respect to

x

L

<

x

R

0

we have

x

L

≺

y

for all

L

.
And by transitivity on the left and right with respect to

x

<

x

R

0

and

y

<

y

R

, we have

x

≺

y

R

for any

R

.
Thus,

x

⪯

y

.

We also need to show that these definitions are

transitive

on the left with respect to

x

L

<

x

and

x

<

x

R

.
But if

x

⪯

y

, then

x

L

≺

y

for all

L

by definition; while if

x

R

⪯

y

, then

x

≺

y

also by definition.

Thus, (

11.6.10

) and (

11.6.10

) do define an element of

A

′

⁢

(

y

)

.
We now have to verify that this definition preserves inequalities, as a dependent function into

A

′

, 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

⪯

y

and

y

≤

z

, the latter arising from

y

L

<

z

and

y

<

z

R

for all

L

and

R

.
Then the inductive hypothesis (of the inner recursion) applied to

y

<

z

R

yields

x

≺

z

R

for any

R

.
Moreover, by definition

x

⪯

y

implies that

x

L

≺

y

for any

L

, so by the inductive hypothesis of the outer recursion we have

x

L

≺

z

.
Thus,

x

⪯

z

.

•

Suppose

x

⪯

y

and

y

<

z

.
First, suppose

y

<

z

arises from

y

≤

z

L

0

.
Then the inner inductive hypothesis applied to

y

≤

z

L

0

yields

x

⪯

z

L

0

, hence

x

≺

z

.

Second, suppose

y

<

z

arises from

y

R

0

≤

z

.
Then by definition,

x

⪯

y

implies

x

≺

y

R

0

, and then the inner inductive hypothesis for

y

R

0

≤

z

yields

x

≺

z

.

•

Suppose

x

≺

y

and

y

≤

z

, the latter arising from

y

L

<

z

and

y

<

z

R

for all

L

and

R

.
By definition,

x

≺

y

implies there merely exists

R

0

with

x

R

0

⪯

y

or

L

0

with

x

⪯

y

L

0

.
If

x

R

0

⪯

y

, then the outer inductive hypothesis yields

x

R

0

⪯

z

, hence

x

≺

z

.
If

x

⪯

y

L

0

, then the inner inductive hypothesis for

y

L

0

<

z

(which holds by the constructor of

y

≤

z

) yields

x

≺

z

.

This completes the inner induction.
Thus, for any

x

defined by a cut, we have

(

x

≺

–

)

and

(

x

⪯

–

)

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

𝖭𝗈

-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

:

No

we have

(

x

<

y

)

=

(

x

≺

y

)

and

(

x

≤

y

)

=

(

x

⪯

y

)

.

Proof.

From left to right, we use

(

𝖭𝗈

,

≤

,

<

)

-induction where

A

(

x

)

:

≡

𝟏

, with

⪯

and

≺

supplying the relations

\trianglelefteqslant

and

⊲

.
In all the constructor cases,

x

and

y

are defined by cuts, so the definitions of

⪯

and

≺

evaluate, and the inductive hypotheses apply.

From right to left, we use

𝖭𝗈

-induction to assume that

x

and

y

are defined by cuts.
But now the definitions of

⪯

and

≺

, and the inductive hypotheses, supply exactly the data required for the relevant constructors of

≤

and

<

.
∎

Corollary 11.6.11

.

The relations

≤

and

<

on

No

satisfy

∀

(

x

,

y

:

𝖭𝗈

)

.

(

x

<

y

)

→

(

x

≤

y

)

and are transitive:

(

x

≤

y

)

→

(

y

≤

z

)

→

(

x

≤

z

)

(

x

≤

y

)

→

(

y

<

z

)

→

(

x

<

z

)

(

x

<

y

)

→

(

y

≤

z

)

→

(

x

<

z

)

.

As with the Cauchy reals, the joint

(

𝖭𝗈

,

≤

,

<

)

-recursion principle remains essential when defining all

operations

on

𝖭𝗈

.

Example 11.6.12

.

We define

+

:

No

→

No

→

No

by a double recursion.
For the outer recursion, we take the codomain to be the subset of

No

→

No

consisting of functions

g

such that

(

x

<

y

)

→

(

g

(

x

)

<

g

(

x

)

)

and

(

x

≤

y

)

→

(

g

(

x

)

≤

g

(

y

)

)

for all

x

,

y

.
For such

g

,

h

we define

(

g

\trianglelefteqslant

h

)

:

≡

∀

(

x

:

No

)

.

g

(

x

)

≤

h

(

x

)

and

(

g

⊲

h

)

:

≡

∀

(

x

:

No

)

.

g

(

x

)

<

h

(

x

)

.
Clearly

\trianglelefteqslant

is antisymmetric.

For the primary clause of the recursion, we suppose

x

defined by a cut, and we define

(

x

+

–

)

by an inner recursion on

No

with codomain

No

, with relations

⊑

and

⊏

coinciding with

≤

and

<

.
For the primary clause of the inner recursion, we suppose also

y

defined by a cut, and give Conway’s definition:

x

+

y

:

≡

{

x

L

+

y

,

x

+

y

L

|

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

≤

z

arises from knowing that

y

L

<

z

and

y

<

z

R

for all

L

and

R

, then the inner inductive hypothesis gives

x

+

y

L

<

x

+

z

and

x

+

y

<

x

+

z

R

, while the outer inductive hypotheses give

x

L

+

y

<

x

L

+

z

and

x

R

+

y

<

x

R

+

z

.
And since each

x

L

+

z

is by definition a left option of

x

+

z

, we have

x

L

+

z

<

x

+

z

, and similarly

x

+

y

<

x

R

+

y

.

Thus, using transitivity,

x

L

+

y

<

x

+

z

and

x

+

y

<

x

R

+

z

, and so we may conclude

x

+

y

≤

x

+

z

by the constructor of

≤

.

•

If

y

<

z

arises from an

L

0

with

y

≤

z

L

0

, then inductively

x

+

y

≤

x

+

z

L

0

, hence

x

+

y

<

x

+

z

since

x

+

z

L

0

is a right option of

x

+

z

.

•

Similarly, if

y

<

z

arises from

y

R

0

≤

z

, then

x

+

y

<

x

+

z

since

x

+

y

R

0

≤

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

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.

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

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

\autoref

sec:strictly-positive,

\autoref

sec: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

ℕ

and

ℕ

′

in

\autoref

sec:appetizer-univalence, if we wrote down an identical definition to the

cartesian product

type

A

×

B

, we would obtain a distinct product type

A

×

′

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

\autoref

sec: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

(

\autoref

sec:free-algebras), such as a constructive theory of Cauchy completion (

\autoref

sec:cauchy-reals).
But most importantly, the potential to model

homotopy theory

and

category theory

directly in the foundational system (

\autoref

cha:

homotopy

,

\autoref

cha:category-theory) gives univalent foundations an advantage which no set-theoretic

foundation

can match.

Title

11.6 The surreal numbers

\metatable

Generated on Thu Feb 8 19:32:04 2018 by

LaTeXML