3.8 The axiom of choice

3.8 The axiom of choice

We can now properly formulate the

axiom of choice

in

homotopy type theory

.
Assume a type

X

and type families

A

:

X

→

𝒰

and

P

:

∏

x

:

X

A

⁢

(

x

)

→

𝒰

,

and moreover that

•

X

is a set,

•

A

⁢

(

x

)

is a set for all

x

:

X

, and

•

P

⁢

(

x

,

a

)

is a mere proposition for all

x

:

X

and

a

:

A

⁢

(

x

)

.

The

axiom of choice

𝖠𝖢

asserts that under these

assumptions

,

(

∏

x

:

X

∥

∑

a

:

A

⁢

(

x

)

P

⁢

(

x

,

a

)

∥

)

→

∥

∑

(

g

:

∏

(

x

:

X

)

A

(

x

)

)

∏

(

x

:

X

)

P

⁢

(

x

,

g

⁢

(

x

)

)

∥

.

(3.8.1)

Of course, this is a direct translation of (3.2.1) (

http://planetmath.org/32propositionsastypes#S0.E1

) where we read “there exists

x

:

A

such that

B

⁢

(

x

)

” as

∥

∑

(

x

:

A

)

B

⁢

(

x

)

∥

, so we could have written the statement in the familiar logical notation as

(

∀

(

x

:

X

)

.

∃

(

a

:

A

(

x

)

)

.

P

(

x

,

a

)

)

⇒

(

∃

(

g

:

∏

(

x

:

X

)

A

(

x

)

)

.

∀

(

x

:

X

)

.

P

(

x

,

g

(

x

)

)

)

.

In particular, note that the propositional truncation appears twice.
The truncation in the domain means we assume that for every

x

there exists some

a

:

A

⁢

(

x

)

such that

P

⁢

(

x

,

a

)

, but that these values are not chosen or specified in any known way.
The truncation in the

codomain

means we conclude that there exists some function

g

, but this function is not determined or specified in any known way.

In fact, because of

Theorem

2.15.7 (

http://planetmath.org/215universalproperties#Thmprethm3

), this axiom can also be expressed in a simpler form.

Lemma 3.8.2

.

The axiom of choice (

3.8.1

) is

equivalent

to the statement that for any set

X

and any

Y

:

X

→

U

such that each

Y

⁢

(

x

)

is a set, we have

(

∏

x

:

X

∥

Y

⁢

(

x

)

∥

)

→

∥

∏

x

:

X

Y

⁢

(

x

)

∥

.

(3.8.2)

This corresponds to a well-known equivalent form of the classical axiom of choice, namely “the

cartesian product

of a family of

nonempty sets

is nonempty.”

Proof.

By Theorem 2.15.7 (

http://planetmath.org/215universalproperties#Thmprethm3

), the codomain of (

3.8.1

) is equivalent to

∥

∏

(

x

:

X

)

∑

(

a

:

A

(

x

)

)

P

⁢

(

x

,

a

)

∥

.

Thus, (

3.8.1

) is equivalent to the

instance

of (

3.8.2

) where

Y

(

x

)

:

≡

∑

(

a

:

A

(

x

)

)

P

(

x

,

a

)

.

Conversely

, (

3.8.2

) is equivalent to the instance of (

3.8.1

) where

A

(

x

)

:

≡

Y

(

x

)

and

P

(

x

,

a

)

:

≡

𝟏

.
Thus, the two are

logically equivalent

.
Since both are mere propositions, by Lemma 3.3.3 (

http://planetmath.org/33merepropositions#Thmprelem2

) they are equivalent types.
∎

As with

𝖫𝖤𝖬

, the equivalent forms (

3.8.1

) and (

3.8.2

) are not a

consequence

of our basic

type theory

, but they may consistently be assumed as axioms.

Remark 3.8.4

.

It is easy to show that the right side of (

3.8.2

) always implies the left.
Since both are mere propositions, by Lemma 3.3.3 (

http://planetmath.org/33merepropositions#Thmprelem2

) the axiom of choice is also equivalent to asking for an equivalence

(

∏

x

:

X

∥

Y

⁢

(

x

)

∥

)

≃

∥

∏

x

:

X

Y

⁢

(

x

)

∥

This illustrates a common pitfall: although dependent function types preserve mere propositions (Example 3.6.2 (

http://planetmath.org/36thelogicofmerepropositions#Thmpreeg2

)), they do not commute with truncation:

∥

∏

(

x

:

A

)

P

⁢

(

x

)

∥

is not generally equivalent to

∏

(

x

:

A

)

∥

P

(

x

)

∥

.
The axiom of choice, if we assume it, says that this is true

for sets

; as we will see below, it fails in general.

The

restriction

in the axiom of choice to types that are sets can be relaxed to a certain extent.
For instance, we may allow

A

and

P

in (

3.8.1

), or

Y

in (

3.8.2

), to be arbitrary type families; this results in a seemingly

stronger

statement that is equally

consistent

.
We may also replace the propositional truncation by the more general

n

-truncations to be considered in

http://planetmath.org/node/87580

Chapter 7, obtaining a spectrum of axioms

𝖠𝖢

n

interpolating between (

3.8.1

), which we call simply

𝖠𝖢

(or

𝖠𝖢

-

1

for emphasis), and Theorem 0.3 (

http://planetmath.org/215universalproperties#S0.Thmthm3

), which we shall call

𝖠𝖢

∞

.
See also

http://planetmath.org/node/87816

Exercise 7.8,

http://planetmath.org/node/87863

Exercise 7.10.
However, observe that we cannot relax the requirement that

X

be a set.

Lemma 3.8.5

.

There exists a type

X

and a family

Y

:

X

→

U

such that each

Y

⁢

(

x

)

is a set, but such that (

3.8.2

) is false.

Proof.

Define

X

:

≡

∑

(

A

:

𝒰

)

∥

𝟐

=

A

∥

, and let

x

0

:

≡

(

𝟐

,

|

𝗋𝖾𝖿𝗅

𝟐

|

)

:

X

.
Then by the identification of paths in

Σ

-types, the fact that

∥

A

=

𝟐

∥

is a mere proposition, and univalence, for any

(

A

,

p

)

,

(

B

,

q

)

:

X

we have

(

(

A

,

p

)

=

X

(

B

,

q

)

)

≃

(

A

≃

B

)

.
In particular,

(

x

0

=

X

x

0

)

≃

(

𝟐

≃

𝟐

)

, so as in Example 3.1.9 (

http://planetmath.org/31setsandntypes#Thmpreeg6

),

X

is not a set.

On the other hand, if

(

A

,

p

)

:

X

, then

A

is a set; this follows by

induction

on truncation for

p

:

∥

𝟐

=

A

∥

and the fact that

𝟐

is a set.
Since

A

≃

B

is a set whenever

A

and

B

are, it follows that

x

1

=

X

x

2

is a set for any

x

1

,

x

2

:

X

, i.e.

X

is a 1-type.
In particular, if we define

Y

:

X

→

𝒰

by

Y

(

x

)

:

≡

(

x

0

=

x

)

, then each

Y

⁢

(

x

)

is a set.

Now by definition, for any

(

A

,

p

)

:

X

we have

∥

𝟐

=

A

∥

, and hence

∥

x

0

=

(

A

,

p

)

∥

.
Thus, we have

∏

(

x

:

X

)

∥

Y

(

x

)

∥

.
If (

3.8.2

) held for this

X

and

Y

, then we would also have

∥

∏

(

x

:

X

)

Y

⁢

(

x

)

∥

.
Since we are trying to derive a

contradiction

(

𝟎

), which is a mere proposition, we may assume

∏

(

x

:

X

)

Y

⁢

(

x

)

, i.e. that

∏

(

x

:

X

)

(

x

0

=

x

)

.
But this implies

X

is a mere proposition, and hence a set, which is a contradiction.
∎

Title

3.8 The axiom of choice

\metatable

Generated on Thu Feb 8 19:35:16 2018 by

LaTeXML