7.7 Modalities

7.7 Modalities

Nearly all of the theory of

n

-types and connectedness can be done in much greater generality.
This

section

will not be used in the rest of the book.

Our first thought regarding generalizing the theory of

n

-types might be to take

\autoref

thm:trunc-reflective as a definition.

Definition 7.7.1

.

A

reflective subuniverse

is a

predicate

P

:

U

→

Prop

such that
for every

A

:

U

we have a type

\ocircle

⁢

A

such that

P

⁢

(

\ocircle

⁢

A

)

and a map

η

A

:

A

→

\ocircle

⁢

A

, with the property that for every

B

:

U

with

P

⁢

(

B

)

, the following map is an

equivalence

:

{

(

\ocircle

⁢

A

→

B

)

⟶

(

A

→

B

)

f

⟼

f

∘

η

A

.

We write

¶

:

≡

\setof

A

:

𝒰

|

P

(

A

)

, so

A

:

¶

means that

A

:

𝒰

and we have

P

⁢

(

A

)

.
We also write

𝗋𝖾𝖼

\ocircle

for the

quasi-inverse

of the above map.
The notation

\ocircle

may seem slightly odd, but it will make more sense soon.

For any reflective subuniverse, we can prove all the familiar facts about

reflective subcategories

from

category theory

, in the usual way.
For

instance

, we have:

•

A type

A

lies in

¶

if and only if

η

A

:

A

→

\ocircle

⁢

A

is an equivalence.

•

¶

is

closed under

retracts

.
In particular,

A

lies in

¶

as soon as

η

A

admits a

retraction

.

•

The

operation

\ocircle

is a

functor

in a suitable up-to-coherent-homotopy sense, which we can make precise at as high levels as necessary.

•

The types in

¶

are closed under all limits such as

products

and

pullbacks

.
In particular, for any

A

:

¶

and

x

,

y

:

A

, the identity type

(

x

=

A

y

)

is also in

¶

, since it is a pullback of two

functions

𝟏

→

A

.

•

Colimits

in

¶

can be constructed by applying

\ocircle

to ordinary colimits of types.

Importantly,

closure

under products extends also to “infinite products”, i.e. dependent function types.

Theorem 7.7.2

.

If

B

:

A

→

¶

is any family of types in a reflective subuniverse ¶, then

∏

(

x

:

A

)

B

⁢

(

x

)

is also in ¶.

Proof.

For any

x

:

A

, consider the function

𝖾𝗏

x

:

(

∏

(

x

:

A

)

B

⁢

(

x

)

)

→

B

⁢

(

x

)

defined by

𝖾𝗏

x

(

f

)

:

≡

f

(

x

)

.
Since

B

⁢

(

x

)

lies in

P

, this extends to a function

𝗋𝖾𝖼

\ocircle

⁢

(

𝖾𝗏

x

)

:

\ocircle

⁢

(

∏

x

:

A

B

⁢

(

x

)

)

→

B

⁢

(

x

)

.

Thus we can define

h

:

\ocircle

⁢

(

∏

(

x

:

A

)

B

⁢

(

x

)

)

→

∏

(

x

:

A

)

B

⁢

(

x

)

by

h

(

z

)

(

x

)

:

≡

𝗋𝖾𝖼

\ocircle

(

𝖾𝗏

x

)

(

z

)

.
Then

h

is a retraction of

η

∏

(

x

:

A

)

B

⁢

(

x

)

, so that

∏

(

x

:

A

)

B

⁢

(

x

)

is in

¶

.
∎

In particular, if

B

:

¶

and

A

is any type, then

(

A

→

B

)

is in ¶.
In

categorical

language

, this means that any reflective subuniverse is an

exponential ideal

.
This, in turn, implies by a standard

argument

that the reflector preserves finite products.

Corollary 7.7.3

.

For any types

A

and

B

and any reflective subuniverse, the

induced map

\ocircle

⁢

(

A

×

B

)

→

\ocircle

⁢

(

A

)

×

\ocircle

⁢

(

B

)

is an equivalence.

Proof.

It suffices to show that

\ocircle

⁢

(

A

)

×

\ocircle

⁢

(

B

)

has the same

universal property

as

\ocircle

⁢

(

A

×

B

)

.
Thus, let

C

:

¶

; we have

(

\ocircle

⁢

(

A

)

×

\ocircle

⁢

(

B

)

→

C

)

=

(

\ocircle

(

A

)

→

(

\ocircle

(

B

)

→

C

)

)

=

(

\ocircle

(

A

)

→

(

B

→

C

)

)

=

(

A

→

(

B

→

C

)

)

=

(

A

×

B

→

C

)

using the universal properties of

\ocircle

⁢

(

B

)

and

\ocircle

⁢

(

A

)

, along with the fact that

B

→

C

is in ¶since

C

is.
It is straightforward to verify that this equivalence is given by composing with

η

A

×

η

B

, as needed.
∎

It may seem odd that every reflective subcategory of types is automatically an exponential ideal, with a product-preserving reflector.
However, this is also the case classically in the

category

of

sets

, for the same reasons.
It’s just that this fact is not usually remarked on, since the classical

category of sets

—in contrast to the category of

homotopy
types

—does not have many interesting reflective subcategories.

Two basic properties of

n

-types are

not

shared by general reflective subuniverses:

\autoref

thm:ntypes-sigma (closure under

Σ

-types) and

\autoref

thm:truncn-ind (truncation

induction

).
However, the analogues of these two properties are

equivalent

to each other.

Theorem 7.7.4

.

For a reflective subuniverse ¶, the following are

logically equivalent

.

1.

If

A

:

¶

and

B

:

A

→

¶

, then

∑

(

x

:

A

)

B

⁢

(

x

)

is in ¶.

2.

for every

A

:

𝒰

, type family

B

:

\ocircle

⁢

A

→

¶

, and map

g

:

∏

(

a

:

A

)

B

⁢

(

η

⁢

(

a

)

)

, there exists

f

:

∏

(

z

:

\ocircle

A

)

B

⁢

(

z

)

such that

f

⁢

(

η

⁢

(

a

)

)

=

g

⁢

(

a

)

for all

a

:

A

.

Proof.

Suppose

1

.
Then in the situation of

2

, the type

∑

(

z

:

\ocircle

A

)

B

⁢

(

z

)

lies in

¶

, and we have

g

′

:

A

→

∑

(

z

:

\ocircle

A

)

B

⁢

(

z

)

defined by

g

′

(

a

)

:

≡

(

η

(

a

)

,

g

(

a

)

)

.
Thus, we have

𝗋𝖾𝖼

\ocircle

⁢

(

g

′

)

:

\ocircle

⁢

A

→

∑

(

z

:

\ocircle

A

)

B

⁢

(

z

)

such that

𝗋𝖾𝖼

\ocircle

⁢

(

g

′

)

⁢

(

η

⁢

(

a

)

)

=

(

η

⁢

(

a

)

,

g

⁢

(

a

)

)

.

Now consider the functions

𝗉𝗋

2

∘

𝗋𝖾𝖼

\ocircle

⁢

(

g

′

)

:

\ocircle

⁢

A

→

\ocircle

⁢

A

and

𝗂𝖽

\ocircle

⁢

A

.
By

assumption

, these become equal when precomposed with

η

.
Thus, by the universal property of

\ocircle

, they are equal already, i.e. we have

p

z

:

𝗉𝗋

2

⁢

(

𝗋𝖾𝖼

\ocircle

⁢

(

g

′

)

⁢

(

z

)

)

=

z

for all

z

.
Now we can define

f

(

z

)

:

≡

p

z

*

(

𝗉𝗋

2

(

𝗋𝖾𝖼

\ocircle

(

g

′

)

(

z

)

)

)

,

and the second

component

of

𝗋𝖾𝖼

\ocircle

⁢

(

g

′

)

⁢

(

η

⁢

(

a

)

)

=

(

η

⁢

(

a

)

,

g

⁢

(

a

)

)

yields

f

⁢

(

η

⁢

(

a

)

)

=

g

⁢

(

a

)

.

Conversely

, suppose

2

, and that

A

:

¶

and

B

:

A

→

¶

.
Let

h

be the composite

\ocircle

⁢

(

∑

x

:

A

B

⁢

(

x

)

)

→

\ocircle

⁢

(

𝗉𝗋

1

)

\ocircle

⁢

A

→

(

η

A

)

-

1

A

.

Then for

z

:

∑

(

x

:

A

)

B

⁢

(

x

)

we have

h

⁢

(

η

⁢

(

z

)

)

=

η

-

1

⁢

(

\ocircle

⁢

(

𝗉𝗋

1

)

⁢

(

η

⁢

(

z

)

)

)

=

η

-

1

⁢

(

η

⁢

(

𝗉𝗋

1

⁢

(

z

)

)

)

=

𝗉𝗋

1

⁢

(

z

)

.

Denote this path by

p

z

.
Now if we define

C

:

\ocircle

⁢

(

∑

(

x

:

A

)

B

⁢

(

x

)

)

→

𝒰

by

C

(

w

)

:

≡

B

(

h

(

w

)

)

, we have

g

:

≡

λ

z

.

p

z

*

(

𝗉𝗋

2

(

z

)

)

:

∏

z

:

∑

(

x

:

A

)

B

⁢

(

x

)

C

(

η

(

z

)

)

.

Thus, the assumption yields

f

:

∏

(

w

:

\ocircle

(

∑

(

x

:

A

)

B

(

x

)

)

)

C

⁢

(

w

)

such that

f

⁢

(

η

⁢

(

z

)

)

=

g

⁢

(

z

)

.
Together,

h

and

f

give a function

k

:

\ocircle

⁢

(

∑

(

x

:

A

)

B

⁢

(

x

)

)

→

∑

(

x

:

A

)

B

⁢

(

x

)

defined by

k

(

w

)

:

≡

(

h

(

w

)

,

f

(

w

)

)

, while

p

z

and the

equality

f

⁢

(

η

⁢

(

z

)

)

=

g

⁢

(

z

)

show that

k

is a retraction of

η

∑

(

x

:

A

)

B

⁢

(

x

)

.
Therefore,

∑

(

x

:

A

)

B

⁢

(

x

)

is in ¶.
∎

Note the similarity to the discussion in

\autoref

sec:htpy-inductive.
The universal property of the reflector of a reflective subuniverse is like a

recursion

principle with its uniqueness property, while

\autoref

thm:modal-char

2

is like the corresponding induction principle.
Unlike in

\autoref

sec:htpy-inductive, the two are not equivalent here, because of the

restriction

that we can only eliminate into types that lie in

¶

.
Condition

1

of

\autoref

thm:modal-char is what fixes the disconnect.

Unsurprisingly, of course, if we have the induction principle, then we can derive the recursion principle.
We can also derive its uniqueness property, as long as we allow ourselves to eliminate into path types.
This suggests the following definition.
Note that any reflective subuniverse can be characterized by the operation

\ocircle

:

𝒰

→

𝒰

and the functions

η

A

:

A

→

\ocircle

⁢

A

, since we have

P

⁢

(

A

)

=

𝗂𝗌𝖾𝗊𝗎𝗂𝗏

⁢

(

η

A

)

.

Definition 7.7.5

.

A

modality

is an operation

\ocircle

:

U

→

U

for which there are

1.

functions

η

A

\ocircle

:

A

→

\ocircle

⁢

(

A

)

for every type

A

.

2.

for every

A

:

𝒰

and every type family

B

:

\ocircle

⁢

(

A

)

→

𝒰

, a function

𝗂𝗇𝖽

\ocircle

:

(

∏

a

:

A

\ocircle

⁢

(

B

⁢

(

η

A

\ocircle

⁢

(

a

)

)

)

)

→

∏

z

:

\ocircle

⁢

(

A

)

\ocircle

⁢

(

B

⁢

(

z

)

)

.

3.

A path

𝗂𝗇𝖽

\ocircle

⁢

(

f

)

⁢

(

η

A

\ocircle

⁢

(

a

)

)

=

f

⁢

(

a

)

for each

f

:

∏

(

a

:

A

)

\ocircle

⁢

(

B

⁢

(

η

A

\ocircle

⁢

(

a

)

)

)

.

4.

For any

z

,

z

′

:

\ocircle

⁢

(

A

)

, the function

η

z

=

z

′

\ocircle

:

(

z

=

z

′

)

→

\ocircle

(

z

=

z

′

)

is an equivalence.

We say that

A

is

modal

for

\ocircle

if

η

A

\ocircle

:

A

→

\ocircle

⁢

(

A

)

is an equivalence, and we write

𝒰

\ocircle

:

≡

\setof

X

:

𝒰

|

X

is

\ocircle

-modal

(7.7.5)

for the type of modal types.

Conditions

2

and

3

are very similar to

\autoref

thm:modal-char

2

, but phrased using

\ocircle

⁢

B

⁢

(

z

)

rather than assuming

B

to be valued in

¶

.
This allows us to state the condition purely in terms of the operation

\ocircle

, rather than requiring the predicate

P

:

𝒰

→

𝖯𝗋𝗈𝗉

to be given in advance.
(It is not entirely satisfactory, since we still have to refer to

P

not-so-subtly in clause

4

.
We do not know whether

4

follows from

1

–

3

.)
However, the stronger-looking property of

\autoref

thm:modal-char

2

follows from

\autoref

defn:modality

2

and

3

, since for any

C

:

\ocircle

⁢

A

→

𝒰

\ocircle

we have

C

⁢

(

z

)

≃

\ocircle

⁢

C

⁢

(

z

)

, and we can pass back across this equivalence.

As with other induction principles, this implies a universal property.

Theorem 7.7.7

.

Let

A

be a type and let

B

:

\ocircle

⁢

(

A

)

→

U

\ocircle

. Then the function

(

–

∘

η

A

\ocircle

)

:

(

∏

z

:

\ocircle

⁢

(

A

)

B

⁢

(

z

)

)

→

(

∏

a

:

A

B

⁢

(

η

A

\ocircle

⁢

(

a

)

)

)

is an equivalence.

Proof.

By definition, the operation

𝗂𝗇𝖽

\ocircle

is a

right inverse

to

(

–

∘

η

A

\ocircle

)

.
Thus, we only need to find a

homotopy

∏

z

:

\ocircle

⁢

(

A

)

s

⁢

(

z

)

=

𝗂𝗇𝖽

\ocircle

⁢

(

s

∘

η

A

\ocircle

)

⁢

(

z

)

for each

s

:

∏

(

z

:

\ocircle

(

A

)

)

B

⁢

(

z

)

, exhibiting it as a

left inverse

as well.
By assumption, each

B

⁢

(

z

)

is modal, and hence each type

s

⁢

(

z

)

=

R

X

\ocircle

⁢

(

s

∘

η

A

\ocircle

)

⁢

(

z

)

is also modal.
Thus, it suffices to find a function of type

∏

a

:

A

s

⁢

(

η

A

\ocircle

⁢

(

a

)

)

=

𝗂𝗇𝖽

\ocircle

⁢

(

s

∘

η

A

\ocircle

)

⁢

(

η

A

\ocircle

⁢

(

a

)

)

.

which follows from

\autoref

defn:modality

3

.
∎

In particular, for every type

A

and every modal type

B

, we have an equivalence

(

\ocircle

A

→

B

)

≃

(

A

→

B

)

.

Corollary 7.7.8

.

For any modality

\ocircle

, the

\ocircle

-modal types form a reflective subuniverse satisfying the equivalent conditions of

\autoref

thm:modal-char.

Thus, modalities can be identified with reflective subuniverses closed under

Σ

-types.
The name

modality

comes, of course, from

modal logic

, which studies logic where we can form statements such as “possibly

A

” (usually written

⋄

A

) or “necessarily

A

” (usually written

□

⁢

A

).
The symbol

\ocircle

is somewhat common for an arbitrary modal operator. Under the propositions-as-types principle, a modality in the sense of modal logic corresponds to an operation on

types

, and

\autoref

defn:modality seems a reasonable candidate for how such an operation should be defined.
(More precisely, we should perhaps call these

idempotent

,

monadic

modalities; see the Notes.)
As mentioned in

\autoref

subsec:when-trunc, we may in general use adverbs to speak informally about such modalities, such as “merely” for the propositional truncation and “purely” for the

identity

modality
(i.e. the one defined by

\ocircle

A

:

≡

A

).

For any modality

\ocircle

, we define a map

f

:

A

→

B

to be

\ocircle

-

connected

if

\ocircle

⁢

(

𝖿𝗂𝖻

f

⁢

(

b

)

)

is

contractible

for all

b

:

B

, and to be

\ocircle

-truncated

if

𝖿𝗂𝖻

f

⁢

(

b

)

is modal for all

b

:

B

.
All of the theory of

\autoref

sec:connectivity,

\autoref

sec:image-factorization which doesn’t involve relating

n

-types for different values of

n

applies verbatim in this generality.
In particular, we have an orthogonal factorization system.

An important class of modalities which does

not

include the

n

-truncations is the

left exact

modalities: those for which the functor

\ocircle

preserves pullbacks as well as finite products.
These are a categorification of “Lawvere-Tierney topologies” in

elementary topos

theory,
and correspond in higher-categorical

semantics

to sub-

(

∞

,

1

)

-toposes.
However, this is beyond the scope of this book.

Some particular examples of modalities other than

n

-truncation can be found in the exercises.

Title

7.7 Modalities

\metatable

Generated on Thu Feb 8 19:40:08 2018 by

LaTeXML