0% found this document useful (0 votes)
13 views79 pages

Modalities in Homotopy Type Theory: E-Mail Address

This paper develops the theory of modalities in homotopy type theory, focusing on idempotent monadic modalities and their applications in mathematics and computer science. It introduces concepts such as reflective subuniverses, factorization systems, and localization, providing a framework for understanding higher modalities and their semantics. The authors also explore the relationship between modalities and subtoposes, concluding with a fracture and gluing theorem related to these structures.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views79 pages

Modalities in Homotopy Type Theory: E-Mail Address

This paper develops the theory of modalities in homotopy type theory, focusing on idempotent monadic modalities and their applications in mathematics and computer science. It introduces concepts such as reflective subuniverses, factorization systems, and localization, providing a framework for understanding higher modalities and their semantics. The authors also explore the relationship between modalities and subtoposes, concluding with a fracture and gluing theorem related to these structures.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 79

Logical Methods in Computer Science

Volume 16, Issue 1, 2020, pp. 2:1–2:79 Submitted Aug. 01, 2017
https://lmcs.episciences.org/ Published Jan. 08, 2020

MODALITIES IN HOMOTOPY TYPE THEORY

EGBERT RIJKE a , MICHAEL SHULMAN b , AND BAS SPITTERS c

a
University of Ljubljana, Ljubljana, Slovenia
e-mail address: [email protected]
b
University of San Diego, San Diego, CA
e-mail address: [email protected]
c
Aarhus University, Aarhus, Denmark
e-mail address: [email protected]

Abstract. Univalent homotopy type theory (HoTT) may be seen as a language for the
category of ∞-groupoids. It is being developed as a new foundation for mathematics and as
an internal language for (elementary) higher toposes. We develop the theory of factorization
systems, reflective subuniverses, and modalities in homotopy type theory, including their
construction using a “localization” higher inductive type. This produces in particular
the (n-connected, n-truncated) factorization system as well as internal presentations of
subtoposes, through lex modalities. We also develop the semantics of these constructions.

Contents
Introduction 2
1. Modalities, reflective subuniverses and factorization systems 6
1.1. Higher modalities 10
1.2. Uniquely eliminating modalities 11
1.3. Σ-closed reflective subuniverses 13
1.4. Stable orthogonal factorization systems 24
2. Localization 30
2.1. Local types and null types 31
2.2. Localizing at a family of maps 32
Received by the editors January 8, 2020.
This material is based on research sponsored by The United States Air Force Research Laboratory under
agreement number FA9550–15–1–0053. The U.S. Government is authorized to reproduce and distribute
reprints for Governmental purposes notwithstanding any copyright notation thereon. The views and con-
clusions contained herein are those of the author and should not be interpreted as necessarily representing
the official policies or endorsements, either expressed or implied, of the United States Air Force Research
Laboratory, the U.S. Government, or Carnegie Mellon University.
Partially funded by the Guarded homotopy type theory project (12386) of the Villum Foundation.

l LOGICAL METHODS
IN COMPUTER SCIENCE DOI:10.23638/LMCS-16(1:2)2020
c
CC
Egbert Rijke, Michael Shulman, and Bas Spitters
Creative Commons
2:2 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

2.3. Nullification and accessibility 36


2.4. Non-stable factorization systems 39
3. Left exact modalities 44
3.1. Lex, topological, and cotopological modalities 44
3.2. Meets and joins of modalities 53
3.3. Lawvere-Tierney operators 56
3.4. A fracture and gluing theorem 59
4. Conclusion and outlook 63
Appendix A. Semantics 64
A.1. Judgmental modalities 64
A.2. Modalities in model categories 67
A.3. Modalities in syntactic categories 70
A.4. Localizations in model categories 71
References 77

Introduction
In traditional modal logic, a modality is a unary operation on propositions. The classical
examples are 2 (“it is necessary that”) and ♦ (“it is possible that”). In type theory and
particularly dependent type theory, such as homotopy type theory, where propositions are
regarded as certain types, it is natural to extend the notion of modality to a unary operation
on types. For emphasis we may call this a “typal modality”, or a “higher modality” since
it acts on the “higher types” available in homotopy type theory (not just “sets” but types
containing higher homotopy).
There are many kinds of propositional modalities, but many of them are either monads
or comonads. Monads and comonads on a poset (such as the poset of propositions) are also
automatically idempotent, but this is no longer true for more general monads and comonads.
Thus there are many possible varieties of typal and higher modalities.
Typal modalities in non-dependent type theory have a wide range of applications
in computer science. In particular, following the pioneering work of [Mog91], monadic
typal modalities are commonly used to model effects in programming languages. Non-
dependent modal type theory is now a flourishing field with this and many other applications;
see [dPGM04] for an overview.
In this paper we take a first step towards the study of higher modalities in homotopy
type theory, restricting our attention to idempotent, monadic ones. These are especially
convenient for a number of reasons. One is that in homotopy type theory, as in higher
category theory, we expect a general monad (or comonad) to require infinitely many higher
coherence conditions, which we don’t know how to express in the finite syntax of type
theory; whereas an idempotent one can instead be described using the universal property of a
reflector into a subcategory. (We can still use particular non-idempotent monadic modalities,
such as the “partial elements” monad of [ADK17, EK17], without making all this coherence
explicit, but it is harder to develop a general theory of them.)
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:3

Another is that in good situations, an idempotent monad can be extended to all slice
categories consistently, and thereby represented “fully internally” in type theory as an
operation # : U → U on a type universe. Idempotent comonadic modalities have also been
considered in dependent type theory and homotopy type theory (see for instance [NPP05,
dPR16, SS12, Shu18]), but they generally require modifying the judgmental structure of
type theory. By contrast, our theory of modalities can be (and has been) formalized in
existing proof assistants without modifying the underlying type theory.
Idempotent monadic modalities also include many very important examples. The (−1)-
truncation in homotopy type theory is a higher-dimensional version of the bracket modality,
which in 1-category theory characterizes regular categories [AB04]. More generally, the
n-truncation modalities are prominent examples of modalities; indeed almost all of the
theory of truncation and connectedness in [Uni13, Chapter 7] is just a specialization of the
theory of a general modality. More generally, we can produce idempotent monadic modalities
by localization or nullification at small families, using a higher inductive type. Finally,
among idempotent monadic modalities we also find the left exact ones, which correspond
semantically to subtoposes.
For the rest of this paper we will say simply modality to mean an idempotent monadic
modality. However, this should be regarded as only a local definition; in more general
contexts the word “modality” should continue to encompass comonadic modalities and other
sorts.
In fact, our use of the word “modality” will be a little more specific even than this. If we
express internally the most naı̈ve notion of “idempotent monad on U”, we obtain a notion
that we call a reflective subuniverse. However, many reflective subuniverses that arise in
practice, including truncation and left exact modalities (and, in fact, all concrete examples
we will consider in this paper), satisfy the further property of being closed under Σ-types; it
is these that we will call modalities. We emphasize this property not just because it holds in
many examples, but because it can be equivalently expressed by giving the modal operator
a dependent elimination principle analogous to that of an inductive type. This is a very
natural thing to ask for when generalizing propositional modalities to typal operations.
The naturalness of this notion of modality is further supported by the fact that it has
many equivalent characterizations. In addition to a reflective subuniverse closed under
Σ-types and a modal operator with a dependent eliminator, a modality can be defined using
a “dependent universal property”, and more interestingly as a stable orthogonal factorization
system. The right class of maps in the factorization system consists of those whose fibers
belong to the subuniverse (“modal maps”), while the left class consists of those whose fibers
have contractible reflection into the subuniverse (“connected maps”). The internal nature of
the definition means that a stable factorization system is entirely determined by the fibers of
its right class, which form a modality.1 We prove the equivalence of all these definitions in
§1, developing along the way some basic theory of reflective subuniverses, connected maps,
and factorization systems.
In unaugmented Martin-Löf type theory we can define a few particular modalities, such
as the double-negation modality, and the “open modality” associated to any mere proposition.
1Non-stable factorization systems are not so determined, although they do have an underlying reflective
subuniverse, and most reflective subuniverses can be extended to factorization systems.
2:4 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

However, most interesting modalities require higher inductive types for their construction,
including the n-truncations and the dual “closed modality” associated to a proposition. In
§2 we give a general construction
Q of modalities using a higher inductive localization type:
given a family of maps F : (a:A) B(a) → C(a), a type X is F -local if the precomposition
map (C(a) → X) → (B(a) → X) is an equivalence for all a : A, and the F -localization LF X
is the universal F -local type admitting a map from X. We call a modality accessible if it
can be generated by localization; this is inspired by the corresponding notion in category
theory. Accessible modalities include the n-truncation and open and closed modalities, as
well as many examples from homotopy theory, where localization is a standard technique;
thus we expect them to be a useful tool in the synthetic development of homotopy theory
inside type theory.2
In general, localization at a family of maps produces a reflective subuniverse (and, in
fact, an orthogonal factorization system), but not necessarily a modality. However, there is
a simple condition which ensures that we do get a modality, namely that C(a) = 1 for all
a : A. In this case the local types are those for which “every map B(a) → X is uniquely
constant”; following standard terminology in homotopy theory we call them B-null and the
corresponding localization B-nullification. Any accessible modality can be presented as a
nullification.
A very important class of modalities that excludes the n-truncations are the left exact,
or lex, ones, which we study in §3. These have many equivalent characterizations, but the
most intuitive is simply that the reflector preserves finite limits. When homotopy type
theory is regarded as an internal language for higher toposes, lex modalities correspond to
subtoposes. In the traditional internal logic of 1-toposes, subtoposes are represented by
Lawvere-Tierney operators on the subobject classifier, which generate a subtopos by internal
sheafification. Goldblatt [Gol10] provides an overview of the modal logic perspective on
these operators on propositions. Dependent type theory allows us to speak directly about
the subtopos as an operation on a type universe (the lex modality), and show internally that
any Lawvere-Tierney operator on the universe of propositions gives rise to a lex modality.
There is an additional subtlety here that only arises for ∞-toposes and homotopy type
theory. In 1-topos theory, and indeed in n-topos theory for any n < ∞, every lex modality
(subtopos) arises from a Lawvere-Tierney operator; but in ∞-topos theory this is no longer
true. The subtoposes that are determined by their behavior on propositions are called
topological in [Lur09], and we appropriate this name for lex modalities of this sort as well.
The dual cotopological sort of lex modalities, including the hypercompletion, are harder to
construct in type theory, but we can at least show that insofar as they exist they behave
like their ∞-categorical analogues.
When this paper was written, we did not know any condition on a type family B
that ensured that B-nullification is lex and such that any accessible lex modality can be
presented by such a B. But as we were preparing it for final publication, [ABFJ19] found
such a condition: that B is closed under taking path spaces. In this case we may refer to
B-nullification as a lex nullification.
2Our notion of localization, being internal, is a little stronger than the standard sort of localization in
homotopy theory; but in many cases it is equivalent. The higher inductive construction of localization, when
interpreted model-categorically according to the semantics of [LS19], also appears to be new and may be of
independent interest in homotopy theory.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:5

reflective subuniverses

accessible

n-truncation
modalities
nullifications
double neg.

localizations lex nullifications


lex
topological hypercompletion?
open closed

prop. nullifications

Figure 1. Modalities and related structures

Figure 1 displays in a Venn diagram all the different structures discussed above. Lex
modalities are a subclass of modalities, which are a subclass of reflective subuniverses. In
principle all three structures can be either accessible or non-accessible, although in practice
non-accessible ones are very hard to come by; with topological modalities a subclass of the
accessible lex ones. Individual examples are displayed in single boxes, while general classes
of examples (obtained by localization and restricted classes thereof) are displayed in double
boxes.
Viewing accessible lex modalities as subtoposes, we naturally expect that the subtopos
should support its own internal language. This is true, although we do not prove it precisely;
we simply observe that the universe of modal types is closed under many type constructors
and admits its own versions of all the others. In particular, the universe of modal types
for an accessible lex modality is itself a modal type for the same modality (in fact, this
characterizes lex modalities among accessible ones). Since any ∞-topos arises as a subtopos
of a presheaf ∞-topos, we can essentially reduce the problem of finding univalent internal
languages for ∞-toposes to that of finding them for presheaf ∞-toposes (and of finding
universes closed under accessible lex modalities; see Remark 3.24 and Appendix A). A similar
argument, using judgementally strict idempotent monads, has already been used in the
so-called “cubical stack” models of type theory [CMR17, Coq17] (which do not actually in
general lie in ∞-stack toposes) to prove independence results for homotopy type theory.
We end the main part of the paper with a general “fracture and gluing” theorem about
modalities: if # is any modality and ♦ is a lex modality that is “strongly disjoint” from #,
then the join ♦ ∨ # in the poset of modalities can be constructed using a “pullback fracture
square”. When applied to the open and closed modalities associated to a proposition, this
specializes to an internal viewpoint on Artin gluing. We call it a “fracture theorem” since
2:6 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

the pullback squares appear formally analogous to the fracture squares in the classical theory
of localization and completion at primes, though we do not know of a precise relationship.
In the final part of the paper, Appendix A, we sketch a semantic interpretation of our
theory in terms of comprehension categories and (∞, 1)-toposes. In particular, we show
that well-behaved reflective subcategories of (∞, 1)-toposes give rise to modalities in their
internal languages, while dually modalities give rise to reflective subcategories of syntactic
(∞, 1)-categories. In this discussion we ignore the issue of universes, which it is not known
how to model semantically in general (∞, 1)-toposes (except in a weak sense).
We will freely use the results and the notations from [Uni13]. In fact, parts of this
work have already appeared as [Uni13, sec 7.6–7]. We generalize much of this section 7.6 to
general modalities in our §1, which also sharpens the results in [Uni13, sec 7.7]. In particular,
we will freely use function extensionality and the univalence axiom, often without comment.
Finally, we note that many of the results in this paper have been formalized in the
Coq proof assistant [BGL+ 17]. However, the organization of results in the library is rather
different than in this paper. A rough correspondence is as follows; unless otherwise noted all
files are in the Modalities/ directory.
Sections Library files
§1.3 ReflectiveSubuniverse.v and Modality.v
Examples (§1.1) Identity.v, Notnot.v, Open.v, Closed.v,
and ../HIT/Truncations.v
§1.4.1 ../Factorization.v
§1.4.2 Modality.v
§§2.1 and 2.2 Localization.v
§2.3 Nullification.v and Accessible.v
§3.1 Lex.v and Topological.v
§3.4 Fracture.v
There are also some differences in the proof techniques used in the library and in this paper.
In the library, localizations are constructed using “∞-extendability” as a characterization of
equivalences to avoid function extensionality hypotheses, as described in [Shu14]. In addition,
much attention is paid to ensuring appropriate universe polymorphism with parametrized
modules; this is described in [BGL+ 17, §5]. We will not discuss these issues further here;
see the cited references and the comments in the library for more information.

1. Modalities, reflective subuniverses and factorization systems


In this section we will introduce the following four notions of modality and prove that they
are all equivalent:
(i) Higher modalities
(ii) Uniquely eliminating modalities
(iii) Σ-closed reflective subuniverses
(iv) Stable orthogonal factorization systems
After their equivalence has been established, we will call all of them simply modalities.
The first three definitions have the following data in common: by a modal operator
we mean a function # : U → U, and by a modal unit we mean a family of functions
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:7

η # : {A:U} A → #A.3 Given these data, we say a type X is modal if ηX : X → #X is


Q
P
an equivalence, and we write U# :≡ (X:U) isModal(X) for the subuniverse of modal
types. PMore generally, if M : U → Prop is any predicate on the universe, we write
UM :≡ (X:U) M(X).
Definition 1.1. A higher modality consists of a modal operator and modal unit together
with
(i) for every A : U and every dependent type P : #A → U, a function
ind#
Q  Q
A : (a:A) #(P (η(a))) → (z:#A) #(P (z)).
(ii) An identification
comp# #
A (f, x) : indA (f )(η(x)) = f (x)
Q
for each f : (x:A) #(P (η(x))) and x : A.
(iii) For any x, y : #A the modal unit η(x=y) : x = y → #(x = y) is an equivalence.
One might think of eliminating into a P : #A → U# directly rather than into # ◦ P for
a P : #A → U, but in that case we would be unable to show that #A is a modal type
(Lemma 1.11).
Definition 1.2. A uniquely eliminating modality consists of a modal operator and
modal unit such that the function
Q Q
λf. f ◦ ηA : ( (z:#A) #(P (z))) → ( (x:A) #(P (ηA (x))))
is an equivalence for any A and any P : #A → U.
Definition 1.3. A reflective subuniverse is a family isModal : U → Prop, together with
a modal operator and modal unit such that isModal(#A) for every A : U, and for every
B : U satisfying isModal(B), the function
λf. f ◦ ηA : (#A → B) → (A → B)
is an equivalence. A reflective subuniversePis Σ-closed if whenever isModal(X) and
isModal(P (x)) for all x : X, we have isModal( (x:X) P (x)).
Note that unlike Definitions 1.1 and 1.2, in Definition 1.3 the notion of “modal type” is
part of the data. However, we will show in Lemma 1.19 that isModal(A) if and only if ηA is
an equivalence.
Definition
Q 1.4. An orthogonal factorization system consists of predicates L, R :
{A,B:U} (A → B) → Prop such that
(i) L and R are closed under composition and contain all identities (i.e. they are subcate-
gories of the category of types that contain all the objects), and
(ii) the type factL,R (f ) of factorizations
f
A B
fL fR
imL,R (f )

3In general we write f : Q Q


{x:A} B(x) instead of f : (x:A) B(x) to indicate that the argument x of f is
implicit.
2:8 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

of f , with fL in L and fR in R, is contractible.


More precisely, the type factL,R (f ) is defined to be the type of tuples
(imL,R (f ), (fL , p), (fR , q), h)
consisting of a type imL,R (f ), a function fL : A → imL,R (f ) with p : L(fL ), a function
fR : imL,R (f ) → B with q : R(fR ), and an identification h : f = fR ◦ fL . The type imL,R (f )
is called the (L, R)-image of f .
A type X is said to be (L, R)-modal if the map ! : X → 1 is in R (and hence !L is an
equivalence).
An orthogonal factorization system is said to be stable if the class L is stable under
pullbacks (By Lemma 1.48, R is always stable under pullbacks).
Remark 1.5. By univalence, the fact that L and R contain all identities implies that they
each contain all equivalences. Conversely, if f ∈ L ∩ R, then (id, f ) and (f, id) are both
(L, R)-factorizations of f , and hence equal; which implies that f is an equivalence. Thus,
L ∩ R consists exactly of the equivalences.
We now consider a few examples. Since we will eventually prove all the definitions to be
equivalent, we can use any one of them to describe any particular example.
Example 1.6. The prime example is the n-truncation modality k–kn as studied in [Uni13,
Chapter 7], which we also denote Trn . This can be given as a higher modality, using its
induction principle and the fact that kAkn is an n-type and the identity types of an n-type
are again n-types (indeed, (n − 1)-types). The corresponding stable orthogonal factorization
system, consisting of n-connected and n-truncated maps, is also constructed in [Uni13,
Chapter 7]; our construction in Theorem 1.34 will be a generalization of this.
Example 1.7. Let Q be a mere proposition. The open modality determined by Q is
defined by OpQ A = (Q → A), with unit ηA (x) = λ . x : A → (Q → A). (We call it “open”
because semantically, it generalizes the open subtopos associated to a subterminal object of
a topos, which in turn is so named because in the case of sheaves on a topological space X
it specializes to the open subspacesQof X.) To show that this is a higher modality, suppose
we have P : (Q → A) → U and f : (a:A) Q → P (λ . a). Then for any z : Q → A and q : Q
we have f (z(q), q) : P (λ . z(q)). And since Q is a mere proposition, we have z(q) = z(q 0 ) for
any q 0 : Q, hence e(z, q) : (λ . z(q)) = z by function extensionality. This gives
Q
λz. λq. e(z, q)∗ ((f (z(q), q))) : (z:Q→A) Q → P (z).
For the computation rule, we have
(λz. λq. e(z, q)∗ ((f (z(q), q))))(λ . a) = λq. e(λ . a, q)∗ ((f (a, q)))
= λq. f (a, q) = f (a)

Q function extensionality, since e(λ . a, q) = refl. Finally, if x, y : Q → A, then (x = y) '


by
(q:Q) x(q) = y(q), and the map
Q   Q 
(q:Q) x(q) = y(q) → Q → (q:Q) x(q) = y(q)
is (by currying) essentially precomposition with a product projection Q × Q → Q, and that
is an equivalence since Q is a mere proposition.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:9

Example 1.8. Again, let Q be a mere proposition. The closed modality determined by
Q is defined by ClQ A = Q ∗ A, the join of Q and A (the pushout of Q and A under
Q × A). (As for open modalities, closed modalities generalize closed subtoposes, which in
turn generalize closed subspaces of topological spaces.) We show that this is a Σ-closed
reflective subuniverse. Define a type B to be modal if Q → isContr(B), and note that it
is indeed the case that Q → isContr(Q ∗ A), for any type A. By the universal property of
pushouts, a map Q ∗ A → B consists of a map f : A → B and a map g : Q → B and for any
a : A and q : Q an identification p : f (a) = g(q). But if Q → isContr(B), then g and p are
uniquely determined, so this is just a map A → B. Thus (ClQ A → B) → (A → B) is an
equivalence, so we have a reflective subuniverse. It is Σ-closed since the dependent sum of a
contractible family of types over a contractible base is contractible.
Example 1.9. The double negation modality is defined by A 7→ ¬¬A, i.e. (A → 0) →
0, with η(a) = λg. g(a). We show that this is a uniquely eliminating modality. Since
the map λf. f ◦ ηA that must be an equivalence has mere propositions as domain and
codomain,
Q it suffices to give a map in the other direction. Thus, let P : ¬¬A → U and
f : (a:A) ¬¬P (λg. g(a)); given z : ¬¬A we must derive a contradiction from g : ¬P (z).
Since we are proving a contradiction, we can strip the double negation from z and assume
given an a : A. And since ¬¬A is a mere proposition, we have z = λg. g(a), so that we can
transport f (a) to get an element of ¬¬P (z), contradicting g.
Example 1.10. The trivial modality is the identity function on U. It coincides with Op>
and with Cl⊥ .
Dually, the zero modality sends all types to 1. It is equivalently the (−2)-truncation,
and coincides with Op⊥ and with Cl> .

Summary. In each of Definitions 1.1 to 1.4 we have defined what it means for a type to be
modal. In each case, being modal is a family of mere propositions indexed by the universe,
i.e. a subuniverse. We will show in Theorems 1.12, 1.15, 1.18 and 1.53 that each kind of
structure is completely determined by this subuniverse. (Theorem 1.18 is more general, not
requiring Σ-closedness.)
It follows that the type of all modalities of each kind is a subset of the set U → Prop of all
subuniverses, and in particular is a set. This makes it easier to establish the equivalences of
the different kinds of modalities. It suffices to show that any modality of one kind determines
a modality of the next kind with the same modal types, which we will do as follows:
Theorem 1.54 higher modality Theorem 1.13

stable uniquely
factorization eliminating
system modality

Theorem 1.34
Σ-closed reflective Theorem 1.16
subuniverse
2:10 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Before Theorem 1.34 we take the opportunity to develop a bit more theory of reflective
subuniverses, including closure under identity types (Lemma 1.25) and dependent products
(Lemma 1.26), along with several equivalent characterizations of Σ-closedness (Theorem 1.32).
Of these equivalences, the most surprising is that a stable factorization system is
uniquely determined by its underlying reflective subuniverse of types. This is false for stable
factorization systems on arbitrary categories. However, an analogous fact is true in classical
set-based mathematics for stable factorization systems on the category of sets (although in
that case there are much fewer interesting examples). It is this fact about the category of
sets which is analogous to the statement we prove in type theory about factorization systems
on the category of types.
We will also see in Appendix A that when type theory is interpreted in a higher category,
the data of a reflective subuniverse or modality has to be interpreted “fiberwise”, giving a
richer structure than a single reflective subcategory.

1.1. Higher modalities. We start by showing that a higher modality is determined by its
modal types, and gives rise to a uniquely eliminating modality.
Lemma 1.11. If # is a higher modality, then any type of the form #X is modal.
Proof. We want to show that the modal unit η#X : #X → ##X is an equivalence. By
the induction principle and the computation rule for higher modalities, we find a function
f : ##X → #X with the property that f ◦ η#X ∼ id#X . We wish to show that we also
have η#X ◦ f ∼ id. Since identity types of types of the form #Y are declared to be modal,
it is equivalent to find a term of type
Q
(z:##X) #(η#X (f (z)) = z).
Now we are in the position to use the induction principle of higher modalites again, so it
suffices to show that η(f (η(z))) = η(z) for any z : #X. This follows from the fact that
f ◦ η = id.
Theorem 1.12. The data of two higher modalites # and #0 are identical if and only if they
have the same modal types.
Proof. Another way of stating this is that the function from the type of all modalities on
U to the type U → Prop of predicates on U, given by mapping a modality to the predicate
isModal, is an embedding. Thus, we need to show that for any predicate M : U → Prop, we
can find at most one modality for which M is the class of modal types.
To be precise, consider for any M : U → Prop and X : U, the type of tuples (Y, p, π, I, C)
such that
• Y is a type.
• p : M(Y ).
• π : XQ →Y. Q
• IP : ( (x:X) P (π(x))) → ( (y:Y ) P (y)) for any P : Y → UM .
• C witnesses that each IP is a right inverse of precomposing with π.
We will show that this type is a mere proposition. First, we show that the type of pairs
(I, C), with I and C of the indicated types, is a mere proposition for any (Y, p, π). After
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:11

that, we show that the type of triples (Y, p, π) is also a mere proposition. These two facts
combined prove the statement.
Consider a type Y satisfying M, and a function π : X → Y , and let (I, C) and (I 0 , C 0 ) be
two terms witnessing that Y satisfies an induction principle with a computation rule. We want
to show that (I, C) = (I 0 , C 0 ), Q
and of course it suffices to show that (I(s), C(s)) = (I 0 (s), C(s))
for any P : Y → UM and s : (x:X) P (π(x)).
To show that I(s, y) = I 0 (s, y) for any y : Y , we use the induction principle (I, C).
So it suffices to show that I(s, π(x)) = I 0 (s, π(x)). Both of these terms are equal to
s(x). Thus, we obtain a proof J(s, y) that I(s, y) = I 0 (s, y), with the property that
J(s, π(x)) = C(s, x)  C 0 (s, x)−1 . Now we need to show that J(s)∗ (C(s)) = C 0 (s), which
is equivalent to the property we just stated. This finishes the proof that the type of the
induction principle and computation rule is a mere proposition.
It remains to show that (Y, π) = (Y 0 , π 0 ), provided that Y and Y 0 are both in M, and
that both sides satisfy the induction principle and computation rule. It suffices to find an
equivalence f : Y → Y 0 such that f ◦ π = π 0 .
From the induction principles of Y resp. Y 0 , we obtain a function f : Y → Y 0 with the
property that f ◦ π = π 0 , and a function f 0 : Y 0 → Y with the property that f 0 ◦ π 0 = π. To
show that f 0 ◦ f = id we use the induction principle of Y . Since the type f 0 (f (y)) = y is
in M, it suffices to show that f 0 (f (π(y))) = π(y). This readily follows from the defining
properties of f and f 0 . Similarly, we have f ◦ f 0 = id.
Theorem 1.13. A higher modality is a uniquely eliminating modality, with the same modal
types.
Proof. Let # be a modality with modal units ηA . Our goal is to show that the pre-composition
map Q Q
λs. s ◦ ηA : ( (z:#A) #(P (z))) → ( (a:A) #(P (ηA (a))))
is an equivalence for each A : U and P : #A → U. By the given induction principle and
computation rule, we obtain a right inverse ind# A of –Q◦ ηA .
To show that it is a left inverse, consider s : (z:#A) #(P (z)). We need to find a
homotopy Q #
(z:#A) s(z) = indA (s ◦ η A )(z).
By assumption we have that P (x) is modal for each z : #A and hence it follows that
s(x) = ind#
A (s ◦ η A )(x) is modal for each x. Hence it suffices to find a function of type
Q #
(a:A) s(η A (a)) = indA (s ◦ η A )(η A (a)).
This follows straight from the computation rule of higher modalities.

1.2. Uniquely eliminating modalities. Next, we show that a uniquely eliminating modal-
ity is determined by its modal types, and gives rise to a Σ-closed reflective subuniverse.
Lemma 1.14. Given a uniquely eliminating modality, #X is modal for any type X.
Proof. Using the elimination principle of ##X, we find a function f : ##X → #X and an
identification f ◦ η#X = id#X . By uniqueness, the function
(##X → ##X) → (#X → ##X)
2:12 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

is an equivalence, and hence its fiber over η#X :


P
(g:##X→##X) g ◦ η#X = η#X
is contractible. Since both id##X and η#X ◦ f are in this type (with suitable identifications),
we find that f is also the right inverse of η#X . This shows that η#X is an equivalence, so
#X is modal.
Theorem 1.15. The data of two uniquely eliminating modalities # and #0 are equivalent
if and only if both have the same modal types.
Proof. We need to show that the type of uniquely eliminating modalities with a given class
M : U → Prop of modal types is a mere proposition. Since the types of the form #X are
modal, it suffices to show that for any class M : U → Prop and any type X, the type of
tuples (Y, p, π, H) is a mere proposition, where:
• Y : U.
• p : M(Y ).
• π :X →Y.
• For each P , HP witnesses that the function
Q Q
(λs. s ◦ π) : ( (y:Y ) #(P (y))) → ( (x:X) #(P (π(x))))
is an equivalence.
Let (Y, p, π, H) and (Y 0 , p0 , π 0 , H 0 ) be such tuples. To show that they are equal, it suffices to
show that (Y, π) = (Y 0 , π 0 ) because the other things in the list are terms of mere propositions.
Furthermore, showing that (Y, π) = (Y 0 , π 0 ) is equivalent to finding an equivalence f : Y ' Y 0
with the property that f ◦ π = π 0 . By H, there is such a function, and by H 0 there is a
function f 0 : Y 0 → Y such that f 0 ◦ π 0 = π. Now the uniqueness gives that f 0 ◦ f is the only
function from Y to Y such that f 0 ◦ f ◦ π = π and of course idY is another such function.
Therefore it follows that f 0 ◦ f = id, and similarly it follows that f ◦ f 0 = id.
Theorem 1.16. Any uniquely eliminating modality determines a Σ-closed reflective subuni-
verse with the same modal types.
Proof. It is immediate from the definition of uniquely eliminating modalities that every map
f : A → B into a modal type B has a homotopy unique extension to #A along the modal
unit:
A
f
ηA

#A B.

Since the types of thePform #X are modal, we obtain a reflective subuniverse. It remains to
verify that the type (z:#X) #(P (z)) is modal for any type X and P : X → U. We have
the function
P P
ϕ :≡ λm. (f (m), g(m)) : #( (z:#X) #(P (z))) → (z:#X) #(P (z)),
where
P
f :≡ ind# (λx. λu. x) : #( (z:#X) #(P (z))) → #X
Q
g :≡ ind# (λx. λu. u) : (w:#(P #(P (z)))) #(P (f (w))).
(z:#X)
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:13

Our goal is to show that ϕ is an inverse to the modal unit.


Note that
ϕ(η(x, y)) ≡ (f (η(x, y)), g(η(x, y))) ≡ (x, y),
so we see immediately that ϕ is a left inverse of η.
To show that ϕ is a right inverse of η, note that the type of functions h fitting in a
commuting triangle of the fom
#( (z:#X) #(P (z))) h #( (z:#X) #(P (z)))
P P

η η
P
(z:#X) #(P (z))

is a fiber over η of a precomposition equivalence, and hence contractible. Since this type
also contains the identity function, it suffices to show that (η ◦ ϕ) ◦ η = η; but this follows
from the fact that ϕ is a left inverse of the modal unit.

1.3. Σ-closed reflective subuniverses. Now we study reflective subuniverses in a bit


more detail, and end by showing that Σ-closed ones give rise to stable factorization systems.
Σ-closure is used in Theorem 1.34 to show that left maps and right maps are closed under
composition.

1.3.1. Properties of reflective subuniverses.


Lemma 1.17. For any M : U → Prop and any type X, the type of triples (Y, f, I) consisting
of
• Y : UM ,
• f :QX → Y , and
• I : (Z:UM ) isEquiv(λg. g ◦ f : (Y → Z) → (X → Z))
is a mere proposition.
Proof. Consider (Y, f, I) and (Y 0 , f 0 , I 0 ) of the described type. Since I and I 0 are terms of a
mere proposition, it suffices to show that (Y, f ) = (Y 0 , f 0 ). In other words, we have to find
an equivalence g : Y → Y 0 such that g ◦ f 0 = f .
By I(Y 0 ), the type of pairs (g, h) consisting of a function g : Y → Y 0 such that
h : g ◦ f = f 0 is contractible. By I 0 (Y ), the type of pairs (g 0 , h0 ) consisting of a function
g 0 : Y 0 → Y such that h0 : g 0 ◦ f 0 = f is contractible.
Now g 0 ◦ g is a function such that g 0 ◦ g ◦ f = g 0 ◦ f 0 = f , as is idY . By contractibility, it
follows that g 0 ◦ g = idY . Similarly, g ◦ g 0 = idY 0 .
Theorem 1.18. The data of any two reflective subuniverses with the same modal types are
the same.
Proof. Given the modal types, the rest of the data of a reflective subuniverse consists of, for
each type X, a triple (Y, f, I) as in Lemma 1.17. Thus, by Lemma 1.17, these data form a
mere proposition.
2:14 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Lemma 1.19. Given a reflective subuniverse, a type X is modal if and only if ηX is an


equivalence.
Proof. Certainly if ηX is an equivalence, then X is modal since it is equivalent to the modal
type #X. Conversely, if X is modal then we have a triple (X, idX , ) inhabiting the type
from Lemma 1.17, which also contains (#X, ηX , ). Since this type is a mere proposition,
these two elements are equal; hence ηX is, like idX , an equivalence.
Lemma 1.20. Given a reflective subuniverse, if a modal unit ηX has a left inverse (i.e. a
retraction), then it is an equivalence, and hence X is modal.
Proof. Suppose f is a left inverse of ηX , i.e. f ◦ ηX = idX . Then ηX ◦ f ◦ ηX = ηX , so ηX ◦ f
is a factorization of ηX through itself. By uniqueness of such factorizations, ηX ◦ f = id#X .
Thus f is also a right inverse of ηX , hence ηX is an equivalence.
In the following lemma we show that any reflective subuniverse is a ‘a functor up to
homotopy’, i.e. that the localization operation has an action on morphisms which preserves
composition and identities.
Lemma 1.21. Given f : A → B we have an induced map #f : #A → #B, preserving
identities and composition up to homotopy. Moreover, for any f the naturality square
f
A B
η η

#A #f
#B
commutes.
Proof. Define #f to be the unique function such that #f ◦ ηA = ηB ◦ f , using the universal
property of ηA . The rest is easy to check using further universal properties.
Lemma 1.22. Given a reflective subuniverse and any type X, the map #ηX : #X → ##X
is an equivalence.
Proof. By naturality, we have #ηX ◦ ηX = η#X ◦ ηX . Hence #ηX = η#X by the universal
property of ηX , but η#X is an equivalence by Lemma 1.19.
Lemma 1.23. Given a reflective subuniverse, a type X is modal if and only if (– ◦ f ) :
(B → X) → (A → X) is an equivalence for any function f : A → B such that #f is an
equivalence.
Proof. If #f is an equivalence and X is modal, then by the universal property of η, we have
a commutative square
– ◦f
(B → X) (A → X)
– ◦ηB – ◦ηA

(#B → X) – ◦#f
(#A → X)
in which all but the top map are equivalences; thus so is the top map.
Conversely, since #ηX is an equivalence, the hypothesis implies that (– ◦ ηX ) : (#X →
X) → (X → X) is an equivalence. In particular, its fiber over idX is inhabited, i.e. ηX has
a retraction; hence X is modal.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:15

Lemma 1.24. Consider a reflective subuniverse with modal operator #, and let P : X → U
for some type X : U. Then the unique map for which the triangle
P
(x:X) P (x)
λ(x,y). η(x,η(y))
η
P P
#( (x:X) P (x)) #( (x:X) #(P (x)))

commutes, is an equivalence.
Proof. Since both codomains are modal, it suffices toPshow that λ(x, y). η(x, η(y)) has the
universal property of ηP(x:X) P (x) , i.e. that any map ( (x:X) P (x)) → Y , where Y is modal,
P
extends uniquely to #( (x:X) #(P (x))). But we have
P Q
(( (x:X) P (x)) → Y ) ' (x:X) P (x) → Y
Q
' (x:X) #(P (x)) → Y
P
' ( (x:X) #(P (x))) → Y
P
' #( (x:X) #(P (x))) → Y
and it is easy to see that this is the desired precomposition map.
Lemma 1.25. For any reflective subuniverse, if X is modal, then so is the identity type
x = y for any x, y : X.
Proof. Let X be a modal type, and let x, y : X. We have a map #(x = y) → 1. The outer
square in the diagram
#(x = y)

(x = y) 1
y x

1 y X
commutes, because both maps extend the map (x = y) → X along η, and such extensions
are unique because X is assumed to be modal. Hence the universal property of the pullback
gives a left inverse of η : (x = y) → #(x = y), so by Lemma 1.20 (x = y) is modal.
Lemma
Q 1.26. Given a reflective subuniverse, if P (x) is modal for all x : X, then so is
(x:X) P (x).
Q
Proof. By Lemma 1.20, it suffices to define a left inverse of the modal unit η : ( (x:A) P (x)) →
Q
#( (x:A) P (x)). By the universal property of dependent product, extending
Q id Q
(x:A) P (x) (a:A) P (a)
η ψ :≡ λf. λa. ηP (a) (f (a))
Q Q
#( (x:A) P (x)) (a:A) #(P (a))
2:16 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

is equivalent to extending
Q eva
(x:A) P (x) P (a)
η η
Q
#( (x:A) P (x)) #(P (a))
#(eva )

for any a : A. Thus, we find


Q Q
f :≡ λm. λa. #(eva )(m) : #( (x:A) P (x)) → (a:A) P (a)
as the solution to the first extension problem. In the first extension problem, the function ψ
is an equivalence by the assumption that each P (a) is modal, so we obtain a retraction of
the modal unit.
Taking X = 1 + 1, so that P : X → U is just a pair of types, we conclude that if A and
B are modal then so is A × B. Moreover, we have:
Lemma 1.27. Given any reflective subuniverse, the modal operator # preserves finite
cartesian products (including the unit type).
Proof. In the nullary case, the statement is that the unit type 1 is modal, which follows
directly from Lemma 1.20. In the binary case, we have to show that the modal extension
X ×Y
λ(x,y). (ηX (x),ηY (y))
ηX×Y

#(X × Y ) #X × #Y
is an equivalence. But (#(X × Y ), ηX×Y , ) inhabits the type from Lemma 1.17, so if we
can show that (#X × #Y, λ(x, y). (ηX (x), ηY (y))) also extends to an inhabitant of that type,
then they will be equal, inducing an equivalence that by uniqueness must be the map above.
To show this, first note that #X × #Y is modal, as remarked above. And for any modal
type Z we have
(X × Y → Z) ' X → (Y → Z)
' X → (#Y → Z)
' #X → (#Y → Z)
' #X × #Y → Z
given by precomposition as desired. Here in the penultimate step we use the fact that the
function type #Y → Z is modal since Z is, by Lemma 1.26.
Lemma 1.28. Given any reflective subuniverse, the modal operator preserves mere proposi-
tions.
Proof. A type P is a mere proposition if and only if the diagonal P → P ×P is an equivalence.
The result then follows from Lemma 1.27.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:17

By contrast, even modalities do not generally preserve n-types for any n ≥ 0. For
instance, the “shape” modality of [Shu18] takes the topological circle, which is a 0-type,
to the homotopical circle, which is a 1-type, and the topological 2-sphere, which is also a
0-type, to the homotopical 2-sphere, which is (conjecturally) not an n-type for any finite n.
However, we will see in Corollary 3.9 that lex modalities do preserve n-types for all n.
Remark 1.29. The basic properties of types and maps in homotopy type theory, such as
being contractible, being a proposition, being an n-type, being an equivalence, and so on,
are all constructed (perhaps inductively) out of identity types and Σ- and Π-types. Thus,
a Σ-closed reflective subuniverse is closed under them as well. That is, if A and B are
modal and f : A → B, then the propositions “A is contractible”, “A is an n-type”, “f is an
equivalence”, and so on, are all modal as well.

1.3.2. Σ-closed reflective subuniverses.


Definition 1.30. Let M : U → Prop be a reflective subuniverse with modal operator #.
We say that a type X is #-connected if #X is contractible, and we say that a function
f : X → Y is #-connected if each of its fibers is. Similarly, we say that f is modal if each
of its fibers is.
Note that a type X is modal or #-connected just when the map X → 1 is.
Example 1.31. Recall from Example 1.7 that the open modality associated to a proposition
Q is defined by OpQ (A) :≡ (Q → A). We claim that A is OpQ -connected if and only if
Q → isContr(A). In other words, (Q → isContr(A)) ' isContr(Q → A). For on the one hand,
if Q → isContr(A), then Q → A; while any two f, g : Q → A can be shown equal by function
extensionality, since if Q then A is contractible. But on the other hand, if isContr(Q → A)
and Q, then (Q → A) ' A, hence isContr(A).
Note that Q → isContr(A) is also the defining condition for the ClQ -modal types from
Example 1.8. That is, the OpQ -connected types coincide with the ClQ -modal types. We will
come back to this relationship in Example 3.55.
The following theorem combines Lemma 7.5.7 and Theorem 7.7.4 of [Uni13].
Theorem 1.32. Given a reflective universe with modal operator #, the following are
equivalent:
(i) It is Σ-closed.
(ii) It is uniquely eliminating.
(iii) The modal units are #-connected.
Proof. To show (i)⇔(ii), let Y be modal and P : Y → U U# , and consider for any X the
following commuting square:
 P   P 
#X → (y:Y ) P (y) X → (y:Y ) P (y)

P Q P Q
(g:#X→Y ) (z:#X) P (g(z)) (f :X→Y ) (x:X) P (f (x))
2:18 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

The vertical maps are equivalences, so for any X, Y, P the top map is an equivalence if and
only if the bottom is.
If (i) holds, the top P
map is an equivalence for all X, Y, P . But the converse is also true,
since we can take X :≡ (y:Y ) P (y) to obtain a retraction for its unit.
The bottom map is induced by the map (#X → Y ) → (X → Y ), which is an equivalence
since Y is modal, and the family of maps
Q  Q 
(z:#X) P (g(z)) → (x:X) P (g(η X (x)))
for all g : #X → Y ; thus it is an equivalence just when each of these maps is. If (ii) holds,
then this is true for all X, Y, P, g. But the converse is also true, since we can take Y :≡ #X
and g :≡ id#X . This completes the proof of (i)⇔(ii).
To show (ii)⇒(iii), we want a term of type
Q
(z:#X) isContr(#(fibη (z))).
Q
Using the dependent eliminators, it is easy to find a term s : (z:#X) #(fibη (z)) with the
property that s ◦ η(x) = η(x, reflη(x) ). Now we need to show that
Q Q
(z:#X) (w:#(fibη (z))) w = s(z).

Since the type w = s(z) is modal, this is equivalent to


Q Q Q
(z:#X) (x:X) (p:η(x)=z) η(x, p) = s(z).
P
Moreover, the type (z:#X) η(x) = z is contractible, so this is equivalent to
Q
(x:X) η(x, reflη(x) ) = s(η(x)),
of which we have a term by the defining property of s.
Finally, to show (iii)⇒(ii) we show that for any #-connected map f : X → Y and any
family P : Y → U# of modal types of Y , the precomposition map
Q  Q 
(y:Y ) P (y) → (x:X) P (f (x))
is an equivalence. This is because we have a commuting square
Q   Q  
(y:Y ) #(fibf (y)) → P (y) (y:Y ) fibf (y) → P (y)

Q Q
(y:Y ) P (y) (x:X) P (f (x))

In this square the map on the left is an equivalence by the contractibility of #(fibf (y)); the
map on the right is an equivalence by the dependent universal property of identity types;
and the top map is an equivalence by the universal property of modalities. Therefore the
bottom map is an equivalence.
Lemma 1.33. Given f : A → B and g : B → C and a reflective subuniverse #, if f is
#-connected, then g is #-connected if and only if g ◦ f is #-connected. That is, #-connected
maps are closed under composition and right cancellable.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:19

P
Proof. Recall that for f : X → Y and g : Y → Z, one has fibg◦f (z) = (p:fibg (z)) fibf (pr1 (p)).
Thus, for any z : C we have
P
#(fibg◦f (z)) ' #( (p:fibg (z)) fibf (pr1 (p)))
P
' #( (p:fibg (z)) #(fibf (pr1 (p)))) (by Lemma 1.24)
P
' #( (p:fibg (z)) 1)
' #fibg (z)
using the fact that f is #-connected. Thus, one is contractible if and only if the other is.
In general it is not true that if g and g ◦ f are #-connected then f is; this is one of the
equivalent characterizations of lex modalities (Theorem 3.1).
Theorem 1.34. A Σ-closed reflective subuniverse determines a stable orthogonal factoriza-
tion system with the same modal types.
Proof. Define L to be the class of #-connected maps and R to be the the class of modal
maps.
P We first show that both L and R are closed under composition. Since fibg◦f (z) =
(p:fibg (z)) fibf (pr1 (p)), by Σ-closedness if f and g are both in R then so is g ◦ f . Thus R is
closed under composition; while Lemma 1.33 implies that L is closed under composition.
And since the fibers of an identity map are contractible, and contractible types are both
modal and #-connected, both L and R contain all identities.
To obtain a factorization system, it remains to show that the type of (L, R)-factorizations
of any function f : X → Y is contractible. Since
P
(X, f ) =(P(Z:U) Z→Y ) ( (y:Y ) fibf (y), pr1 ),
P
it is sufficient to show that factL,R (pr1 ) is contractible for any pr1 : (y:Y ) P (y) → Y . But
pr1 factors as
P pL P pR
(y:Y ) P (y) (y:Y ) #(P (y)) Y
where pL :≡ total(ηP ( – ) ) and pR :≡ pr1 . The fibers of pR are #(P (–)), so it follows
immediately that pR is in R. Moreover, since fibtotal(η) ((y, u)) ' fibηP (y) (u) and each η is
#-connected, it follows that pL is in L. P
Now consider any other factorization (I, g, h, H) of pr1 into an L-map g : ( (y:Y ) P (y)) →
P
I followed by an R-map h : I → Y . Since I = (y:Y ) fibh (y), we have a commuting square
P g
(y:Y ) P (y) I
total(γ) h
P
(y:Y ) fibh (y) pr1 Y

in which γ(y, u) :≡ (g(y, u), H(y, u)). It follows that


P 
(I, g, h, H) = (y:Y ) fibh (y), total(γ), pr 1 , .
2:20 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Thus it suffices to show that there is a commuting triangle


P (y)
η γy

#(P (y)) fibh (y)


for all y : Y . We will do this using Lemma 1.17, by showing that γy has the same universal
property as ηP (y) . This follows from the following calculation:
P
(fibh (y) → Z) ' (( (w:fibh (y)) #(fibg (pr1 (w)))) → Z)
P
' (( (w:fibh (y)) fibg (pr1 (w))) → Z)
' (fibh◦g (y) → Z)
' (P (y) → Z),
which we can verify is given by precomposition with γy .
It remains to show that our orthogonal factorization system is stable. Consider a
pullback diagram
f
A0 A
k l

B0 g B
in which l is in L. By the pasting lemma for pullbacks, it follows that fibk (b) = fibl (g(b)) for
each b : B 0 . Thus, it follows that k is in L.

1.3.3. Connected maps. The #-connected maps introduced in Definition 1.30 have a number
of other useful properties. Most of these are stated in [Uni13, §7.5] for the special case of
the n-truncation modality, but essentially the same proofs work for any modality.
In fact, most of these properties are true about an arbitrary reflective subuniverse,
although a few of the proofs must be different. Thus, for this subsection, let # be a reflective
subuniverse, not in general Σ-closed.
Lemma 1.35. If f : A → B is #-connected, then it induces an equivalence #f : #A ' #B.
Proof. To define an inverse g : #B → #A, by the universal property of #B, it suffices
to define a map B → #A. But given b : B, we have a map pr1 : fibf (b) → A, hence
#pr1 : #fibf (b) → #A. And #fibf (b) is contractible since f is #-connected, so it has a point
cb , and we define g(ηB (b)) = #pr1 (cb ).
Now by the universal property of #A and #B, it suffices to show that the composites
g ◦ #f ◦ ηA and #f ◦ g ◦ ηB are equal to ηA and ηB respectively. In the first case, for a : A
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:21

we have
g(#f (ηA (a))) = g(ηB (f (a)))
= #pr1 (cf (a) )
= #pr1 (ηfibf (b) (a, reflf (a) ))
= ηA (pr1 (a, reflf (a) ))
= ηA (a),
using in the third line the fact that #(fibf (b)) is contractible. And in the second case, for
b : B we have
#f (g(ηB (b))) = #f (#pr1 (cb ))
= #(f ◦ pr1 )(cb )
= #(λ(u : fibf (b)). b)(cb )
= #(λ(u : 1). b)(η1 (?))
= ηB (b)
where in the last two lines we use the commutativity of the following diagram:
λ(u : fibf (b)). b

b
fibf (b) 1 B
cb η1 ηB

#(fibf (b)) #1 #B

#(λ(u : fibf (b)). b)

and the fact that #1 is contractible.


The converse of Lemma 1.35 is false in general, even for modalities; we will see in
Theorem 3.1 that it holds exactly when # is lex.
P Recall that U# denotes the universe of modal types. Note that the projection pr1 :
( (x:A) P (x)) → A is #-modal if and only if P factors through U# . The following generalizes
the unique elimination property of η to arbitrary #-connected maps.
Lemma 1.36. For f : A → B and P : B → U# , consider the following function:
Q  Q 
λs. s ◦ f : (b:B) P (b) → (a:A) P (f (a)) .
For a fixed f , the following are equivalent.
(i) f is #-connected.
(ii) For every P : B → U# , the map λs. s ◦ f is an equivalence.
(iii) For every P : B → U# , the map λs. s ◦ f has a section.
2:22 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Proof. First suppose f is #-connected and let P : B → U# . Then:


Q Q  
(b:B) P (b) ' (b:B) #fibf (b) → P (b) (since #fibf (b) is contractible)
Q  
' (b:B) fibf (b) → P (b) (since P (b) is modal)
Q Q Q
' (b:B) (a:A) (p:f (a)=b) P (b)
Q
' (a:A) P (f (a))
and the composite equivalence is indeed composition with f . Thus, (i)⇒(ii), Q and clearly
(ii)⇒(iii). To show (iii)⇒(i), let P (b) :≡ #fibf (b). Then (iii) yields a map c : (b:B) #fibf (b)
with c(f (a)) = η(a, reflf (a) ). To show that each #fibf (b) is contractible, we will show that
c(b) = w for any b : B and w : #fibf (b). In other words, we must show that the identity
function #fibf (b) → #fibf (b) is equal to the constant function at c(b). By the universal
property of #fibf (b), it suffices to show that they become equal when precomposed with
ηfibf (b) , i.e. we may assume that w = η(a, p) for some a : A and p : f (a) = b. But now path
induction on p reduces our goal to the given c(f (a)) = η(a, reflf (a) ).
Corollary 1.37. A type A is #-connected if and only if the “constant functions” map
B → (A → B) is an equivalence for every modal type B.
Dually, we will prove in Corollary 1.51 that when # is a modality, if this holds for all
#-connected A then B is modal.
Lemma 1.38. Let B be a modal type and let f : A → B be a function. If f is #-connected,
then the induced function g : #A → B is an equivalence; the converse holds if # is Σ-closed.
Proof. By Lemma 1.35, if f is #-connected then #f is an equivalence. But g is the composite
ηB −1 ◦ #f , hence also an equivalence.
Conversely, by Theorem 1.32, η is #-connected. Thus, since f = g ◦ ηA , if g is an
equivalence then f is also #-connected.
Lemma 1.39. Let Q f : A → B be a function and P : A → U and Q : B → U be type families.
Suppose that g : (a:A) P (a) → Q(f (a)) is a family of #-connected functions. If f is also
#-connected, then so is the function
P  P 
ϕ: (a:A) P (a) → (b:B) Q(b)

ϕ(a, u) :≡ (f (a), ga (u)).


Conversely, if ϕ and each ga are #-connected, and moreover Q is fiberwise merely inhabited
(i.e. we have kQ(b)k for all b : B), then f is #-connected.
Proof. For any b : B and v : Q(b) we have
P P P
#fibϕ ((b, v)) ' # (a:A) (u:P (a)) (p:f (a)=b) p∗ (ga (u)) = v

' # (w:fibf (b)) (u:P (pr1 (w))) gpr1 w (u) = pr2 (w)−1 ∗ (v)
P P

' # (w:fibf (b)) fibg(pr1 w) (pr2 (w)−1 ∗ (v))


P
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:23

' # (w:fibf (b)) #fibg(pr1 w) (pr2 (w)−1 ∗ (v))


P

' #fibf (b)


where the transportations along f (p) and f (p)−1 are with respect to Q, and we use
Lemma 1.24 on the penultimate line. Therefore, if either of #fibϕ ((b, v)) or #fibf (b) is
contractible, so is the other.
In particular, if f is #-connected,
P then #fibf (b) is contractible for all b : B, and hence
so is #fibϕ ((b, v)) for all (b, v) : (b:B) Q(b). On the other hand, if ϕ is #-connected, then
#fibϕ ((b, v)) is contractible for all (b, v), hence so is #fibf (b) for any b : B such that there
exists some v : Q(b). Finally, since contractibility is a mere proposition, it suffices to merely
have such a v.
Q  
Lemma 1.40. Let P, Q : A → U be type families and f : (a:A) P (a) → Q(a) . Then
P P
total(f ) : (a:A) P (a) → (a:A) Q(a) is #-connected if and only if each f (a) is #-connected.
Proof. We have fibtotal(f ) ((x, v)) ' fibf (x) (v) for each x : A and v : Q(x). Hence
#fibtotal(f ) ((x, v))
is contractible if and only if #fibf (x) (v) is contractible.
Of course, the “if” direction of Lemma 1.40 is a special case of Lemma 1.39. This
suggests a similar generalization of the “only if” direction of Lemma 1.40, which would
be a version of Lemma 1.39 asserting that if f and ϕ are #-connected then so is each ga .
However, this is not true in general; we will see in Theorem 3.1 that it holds if and only if
the modality is lex.
Finally, we note that the #-modal and #-connected maps are classified. More generally,
we prove the following generalization of [RS15, Thm 3.31].
P
Theorem 1.41. Let P : U → Prop be a predicate on the universe, let UP :≡ (X:U) P (x)
P
and (UP )• :≡ (X:UP ) X. The projection pr1 : (UP )• → UP classifies the maps whose fibers
satisfy P , in the sense that these are exactly the maps that occur as pullbacks of it.
Proof. The fiber of pr1 : (UP )• → UP over X : UP is X, which satisfies P by definition.
Thus all fibers of this map satisfy P , hence so do all fibers of any of its pullbacks.
Conversely, let f : Y → X be any map into X. Then fibf : Q X → U factors through UP
if and only if all the fibers of f satisfy P . Let us write P (f ) for (x:X) P (fibf (x)). Then we
see that the equivalence χ of Theorem 4.8.3 of [Uni13] restricts to an equivalence
χP : ( (Y :U) (f :Y →X) P (f )) → (X → UP ).
P P

Now observe that the outer square and the square on the right in the diagram
λy. (fibf (f (y)), – ,(y,reflf (y) ))
Y (UP )• U•
f

X fibf
UP U

are pullback squares. Hence the square on the left is a pullback square.
2:24 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Corollary 1.42. The #-modal maps are classified by the universe of #-modal types, and
the #-connected maps are classified by the universe of #-connected types.

1.4. Stable orthogonal factorization systems. To complete §1, we will show that stable
orthogonal factorization systems are also determined by their modal types, and give rise to
higher modalities.

1.4.1. Orthogonal factorization systems. In classical category theory, orthogonal factorization


systems are equivalently characterized by a unique lifting property. We begin with the
analogue of this in our context.
Definition 1.43. Let (L, R) be an orthogonal factorization system, and consider a commu-
tative square
f
A X
l S r

B g Y
(i.e. paths S : r ◦ f = g ◦ l) for which l is in L and r is in R. We define fill(S) to be the type
of diagonal fillers of the above diagram, i.e. the type of tuples (j, Hf , Hg , K) consisting of
j : B → X, Hf : j ◦ l = f and Hg : r ◦ j = g and an equality K : r ◦ Hf = S  (Hg ◦ l).
The equality K is required because of homotopy coherence: the commutativity of the
given square and of the two triangles are not mere propositions but data consisting of
homotopies inhabiting those squares and triangles, so to actually have a “filler” in the
homotopy coherent sense we need to know that the “pasting composite” of the two triangles
is the given square.
Lemma 1.44. Let (L, R) be an orthogonal factorization system, and consider a commutative
square
f
A X
l S r

B g Y
for which l is in L and r is in R. Then the type fill(S) of diagonal fillers is contractible.
Proof. By the fact that every morphism factors uniquely as a left map followed by a right
map, we may factorize f and g in (L, R) as Hf : f = fR ◦ fL and Hg : g = gR ◦ gL , obtaining
the diagram
fL fR
A im(f ) X
l r

B gL im(g) gR Y.
Now both (r ◦ fR ) ◦ fL and gR ◦ (gL ◦ l) are factorizations of the same function r ◦ f : A → Y .
Since factL,R (r ◦ f ) is contractible, so is its identity type
(im(f ), fL , r ◦ fR , r ◦ Hf ) = (im(g), gL ◦ l, gR , S  (Hg ◦ l)).
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:25

This identity type is equivalent to


P P P
(e:im(f )'im(g)) (HL :gL ◦l=e◦fL ) (HR :r◦fR =gR ◦e)
((r ◦ Hf )  (HR ◦ fL ) = S  (Hg ◦ l)  (gR ◦ HL ))
Now since factL,R (f ) and factL,R (g) are also contractible, we can sum over them to get that
the following type is contractible:
P P P P
(im(f ):U) (fL :A→im(f )) (fR :im(f )→X) (Hf :f =fR ◦fL )
P P P P
(im(g):U) (gL :B→im(g)) (gR :im(g)→Y ) (Hg :g=gR ◦gL )
P P P
(e:im(f )'im(g)) (HL :gL ◦l=e◦fL ) (HR :r◦fR =gR ◦e)
((r ◦ Hf )  (HR ◦ fL ) = S  (Hg ◦ l)  (gR ◦ HL ))

P that fL , gL ∈ L and fR , gR ∈ R). Reassociating and removing


(omitting the hypotheses
the contractible type (im(g):U) (im(f ) ' im(g)), and renaming im(f ) as simply I, this is
equivalent to
P P P P
(I:U) (fL :A→I) (fR :I→X) (Hf :f =fR ◦fL )
P P P P P
(gL :B→I) (gR :I→Y ) (Hg :g=gR ◦gL ) (HL :gL ◦l=fL ) (HR :r◦fR =gR )
((r ◦ Hf )  (HR ◦ fL ) = S  (Hg ◦ l)  (gR ◦ HL ))
P P
Removing the contractible (fL :A→I) (gL ◦ l = fL ) and (gR :I→Y ) (r ◦ fR = gR ), this
becomes

P P P P P
(I:U) (fR :I→X) (gL :B→I) (Hf :f =fR ◦gL ◦l) (Hg :g=r◦fR ◦gL ) (r ◦ Hf = S (Hg ◦ l))
P
Inserting a contractible (j:B→X) (fR ◦ gL = j), and reassociating some more, we get
P P P P P
(j:B→X) (I:U) (fR :I→X) (gL :B→I) (Hj :fR ◦gL =j)
◦ Hf = S  (Hg ◦ l))
P P
(Hf :f =fR ◦gL ◦l) (Hg :g=r◦fR ◦gL ) (r
P P P P
But now (I:U) (fR :I→X) (gL :B→I) (Hj :fR ◦gL =j) is just factL,R (j), hence contractible.
Removing it, we get

P P P
(j:B→X) (Hf :f =j◦l) (Hg :g=r◦j) (r ◦ Hf = S (Hg ◦ l))

which is just fill(S). Therefore, this is also contractible.


Q
Definition 1.45. For any class C : {A,B:U} (A → B) → Prop of maps, we define
(i) ⊥Cto be the class of maps with (unique) left lifting property with respect to all
maps in C: the mere proposition (⊥ C)(l) asserts that for every commutative square
f
A X
l S r

B g Y
with r in C, the type fill(S) of diagonal fillers is contractible.
(ii) C ⊥ to be the class of maps with the dual (unique) right lifting property with
respect to all maps in C.
2:26 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

(iii) l ⊥ r to mean r ∈ {l}⊥ (equivalently, l ∈ ⊥ {r}).


Lemma 1.46. In an orthogonal factorization system (L, R), one has L = ⊥ R and L⊥ = R.
Proof. We first show that L = ⊥ R, i.e. we show that L(f ) ↔ ⊥ R(f ) for any map f . Note
that the implication L(f ) → ⊥ R(f ) follows from Lemma 1.44.
Let f : A → B be a map in ⊥ R. We wish to show that L(f ). Consider the factorization
(fL , fR ) of f . Then the square
fL
A imL,R (f )
f fR

B id
B
commutes. Since f has the left lifting property, the type of diagonal fillers of this square is
contractible. Thus we have a section j of fR . The map j ◦ fR is then a diagonal filler of the
square
fL
A imL,R (f )
fL fR

imL,R (f ) fR
B.
Of course, the identity map idimL,R (f ) is also a diagonal filler for this square, so the fact that
the type of such diagonal fillers is contractible implies that j ◦ fR = id. Thus, j and fR are
inverse equivalences, and so the pair (B, f ) is equal to the pair (imL,R (f ), fL ). Hence f , like
fL , is in L.
Similarly, Lemma 1.44 also implies that R(f ) → L⊥ (f ) for any map f , while we can
prove L⊥ (f ) → R(f ) analogously to ⊥ R(f ) → L(f ).
Corollary 1.47. The data of two orthogonal factorization systems (L, R) and (L0 , R0 ) are
identical if and only if R = R0 .
Proof. “Only if” is obvious. Conversely, if R = R0 , then by Lemma 1.46 we have L = L0 ,
and the remaining data of an orthogonal factorization system is a mere proposition.
Lemma 1.48. Let (L, R) be an orthogonal factorization system. Then the class R is stable
under pullbacks.
Proof. Consider a pullback diagram
g
A X
k h

B f
Y

where h : X → Y is assumed to be in R, and let k = kR ◦ kL be a factorization of k. Then


the outer rectangle in the diagram
g
A A X
kL k h

imL,R (k) kR
B f
Y
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:27

commutes, so by Lemma 1.44 there is a diagonal lift j : imL,R (k) → X with i ◦ kL = g and
h◦i = f ◦kR . Then by the universal property of pullbacks, we obtain a map j : imL,R (k) → A
with g ◦ j = i and k ◦ j = kR . And since g ◦ j ◦ kL = i ◦ kL = g and k ◦ j ◦ kL = kR ◦ kL = k
(by homotopies coherent with the pullback square), the uniqueness aspect of the pullback
gives j ◦ kL = id.
It suffices to show that kL is an equivalence, and since we already have that j ◦ kL = id
we only need to show that kL ◦ j = id. We do this using the contractibility of the type of
diagonal fillers. Consider the square
kL
A imL,R (k)
kL kR

imL,R (k) kR
B,

for which id : imL,R (k) → imL,R (k) (with the trivial homotopies) is a diagonal filler. However,
we also have the homotopies kL ◦ j ◦ kL ∼ kL and kR ◦ kL ◦ j ∼ k ◦ j ∼ kR . This shows that
we have a second diagonal filler, of which the underlying map is kL ◦ j. Since the type of
diagonal fillers is contractible, it follows that kL ◦ j = id, as desired.

1.4.2. Stable orthogonal factorization systems.


Lemma 1.49. Given l, r, f, g and a homotopy S : r ◦ f = g ◦ l, consider as b : B varies all
the diagrams of the form
pr1 f
fibl (b) A X
! l S r

1 b
B g Y
and write Sb : r ◦ (f ◦ pr1 ) = (g ◦ b) ◦ ! for the induced commutative square. Then the map
Q
fill(S) → (b:B) fill(Sb ),
defined by precomposition with b, is an equivalence.
Proof. The domain and codomain of the map in question are by definition

P P P
(j:B→X) (Hf :j◦l=f ) (Hg :r◦j=g) r ◦ Hf = S (Hg ◦ l)
and
◦ Hf,b = Sb  (Hg,b ◦ !).
Q P P P
(b:B) (jb :1→X) (Hf,b :jb ◦!=f ◦pr1 ) (Hg,b :r◦jb =g◦b) r
The latter is equivalent (using function extensionality and contractibility of 1) to
Q P P Q
P
(b:B) (jb :X) (Hf,b : (u:fibl (b)) jb =f (pr1 (u))) (Hg,b :r(jb )=g(b))

= Sb  Hg,b .
Q
(u:fibl (b)) r(Hf,b (u))
and thereby to
P P Q Q
P Q
(j:B→X) (Hf : (b:B) (u:fibl (b)) j(b)=f (pr1 (u))) (Hg : (b:B) r(j(b))=g(b))

= Sb  Hg (b).
Q Q
(b:B) (u:fibl (b)) r(Hf (b, u))
2:28 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Modulo these equivalences, the desired map acts as the identity on j : B → X. Moreover,
its action on the remaining parts is given by the equivalences
Q
(j ◦ l = f ) ' (a:A) j(l(a)) = f (a)
Q Q Q
' (a:A) (b:B) (p:l(a)=b) j(l(a)) = f (a)
Q Q Q
' (b:B) (a:A) (p:l(a)=b) j(b) = f (a)
Q Q
' (b:B) (u:fibl (b)) j(b) = f (pr1 (u))
and Q
(r ◦ j = g) ' (b:B) r(j(b)) = g(b)
and
(r ◦ Hf = S  (Hg ◦ l)) ' = S(a)  Hg (l(a))
Q
(a:A) r(Hf (a))

= S(a)  Hg (l(a))
Q Q Q
' (a:A) (b:B) (p:l(a)=b) r(Hf (a))

= S(a)  Hg (b)
Q Q Q
' (b:B) (a:A) (p:l(a)=b) r(Hf (a))

= Sb  Hg (b)
Q Q
' (b:B) (u:fibl (b)) r(Hf (b, u))
hence the whole thing is an equivalence.
Corollary 1.50. In any orthogonal factorization system (L, R), if l : A → B is a map such
that fibl (b) → 1 is in L for each b : B, then also l itself is in L.
Proof. By Lemma 1.46, l is in L iff fill(S) is contractible for each r ∈ R and S as in
Lemma 1.49, while similarly fibl (b) → 1 is in L iff fill(Sb ) is contractible. But the product of
contractible types is contractible.
Corollary 1.51. In any stable orthogonal factorization system, if l ⊥ r for all maps l ∈ L
of the form l : A → 1, then r ∈ R. In particular, for any modality #, if X → (A → X) is
an equivalence for all #-connected types A, then X is modal.
Proof. By Q Lemma 1.49, for any l ∈ L and commutative square S from l to r, we have
fill(S) ' (b:B) fill(Sb ). Since (L, R) is stable, each map !b : fibl (b) → 1 is also in L, so that
!b ⊥ r by assumption. Thus fill(Sb ) is contractible for all b, hence so is fill(S).
For the second statement, the type A → X is equivalent to the type of commutative
squares
f
A X

1 1
and the type of fillers for such a square is equivalent to the type of x : X such that f (a) = x
for all a : A, i.e. the fiber of X → (A → X) over f . Thus, the assumption ensures that
all such types of fillers are contractible, i.e. l ⊥ r for all #-connected maps of the form
l : A → 1, so the first statement applies.
Lemma 1.52. Let (L, R) be a stable orthogonal factorization system. Then a map r : X → Y
is in R if and only if fibr (y) is (L, R)-modal for each y : Y .
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:29

Proof. The class of right maps is stable under pullbacks by Lemma 1.48, so it suffices to
show that any map with modal fibers is in R.
Let r : X → Y be a map with modal fibers. Our goal is to show that r is in R. By
Lemma 1.46 it suffices to show that r has the right lifting property with respect to the left
maps. Consider a diagram of the form
f
A X
l r

B g Y
in which l is a map in L. We wish to show that the type of diagonal fillers is contractible. By
Lemma 1.49, the type of diagonal fillers of the above diagram is equivalent to the dependent
product of the types of fillers of
f ◦ib
fibl (b) X
r

1 Y
g(b)
indexed by b : B. Thus, it suffices that the type of diagonal fillers for this square is
contractible for each b : B. Since any filler factors uniquely through the pullback 1 ×Y X,
which is fibr (g(b)), the type of diagonal fillers of the above square is equivalent to the type
of diagonal fillers of the square
fibl (b) fibr (g(b))

1 1
where the dotted map is the uniqe map into the pullback fibr (g(b)). In this square, the left
map is in L because L is assumed to be stable under pullbacks, and the right map is in R
by assumption, so the type of diagonal fillers is contractible.
Theorem 1.53. Any two stable orthogonal factorization systems with the same modal types
are equal.
Proof. By Corollary 1.47 it follows that any orthogonal factorization system is completely
determined by the class of right maps. By Lemma 1.52 it follows that in a stable orthogonal
factorization system, the class of right maps is completely determined by the modal types.
Theorem 1.54. Any stable orthogonal factorization system determines a higher modality
with the same modal types.
Proof. For every type X we have the (L, R)-factorization X → #X → 1 of the unique map
X → 1. This determines the modal unit η : X → #X which is in L, and the unique map
#X → 1 is in R, i.e. #X is (L, R)-modal.
2:30 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Q
To show the induction principle, let P : #X → U and f : (x:X) #(P (η(x))). Then we
have a (judgmentally) commutative square
f P
X (z:#X) #(P (z))
η pr1

#X #X.
P
Note that by Lemma 1.52, the projection pr1 : ( (z:#X) #(P (z))) → #X is in R because
its fibers are modal. Also, the modal unit η : X → #X is in L. Thus, by Definition 1.45,
the type of fillers of this square is contractible. Such a filler consists of a function s and
homotopies filling the two triangles
f P
X (z:#X) #(P (z))
η pr1

#X #X
whose composite is reflexivity, i.e. the type
P P
P Q P Q
(s:#X→ (z:#X) #(P (z))) (H: (z:#X) pr1 (s(z))=z) (K: (x:X) s(η(x))=f (x))
Q
(x:X) pr1 (K(x)) = H(η(x)).
If we decompose s, f , and K by their components, we get
P P Q P Q
(s1 :#X→#X) (s2 : (z:#X) #(P (s1 (z)))) (H: (z:#X) s1 (z)=z)
P Q
P Q
(K1 : (x:X) s1 (η(x))=f1 (x)) (K2 : (x:X) s2 (η(x))=K1 (x) f2 (x))
Q
(x:X) K1 (x) = H(η(x)).
Now we can contract s1 and H, and also K1 with the final unnamed homotopy, to get
P Q Q
(s2 : #(P (z))) (x:X) s2 (η(x)) = f2 (x).
(z:#X)

But this is just the type of extensions of f along η, i.e. the fiber of precomposition by η.
Thus, precomposition by η is an equivalence, so in fact we have a uniquely eliminating
modality. By Lemma 1.25, the identity types of #X are modal, so we have a higher modality
as well.

2. Localization
Localization is the process of inverting a specified class of maps. In category theory, the
localization of a category C at a family of maps F is obtained by adding formal inverses to
those maps freely, obtaining a category C[F −1 ] with a universal functor C → C[F −1 ] sending
each map in F to an isomorphism. In good situations, this universal functor is equivalent
to the reflection onto a reflective subcategory of C, which consists of the F -local objects:
those that “see each map in F as an isomorphism”. We will not be concerned here with
the universal property of the localized category; instead we are interested in constructing
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:31

reflective subcategories of local objects. We can do this with a higher inductive type, giving
a general construction of reflective subuniverses and modalities.

2.1. Local types and null types.


Q
Definition 2.1. Consider a family F : (a:A) B(a) → C(a) of maps. We say that a type
X is F -local if the function
λg. g ◦ Fa : (C(a) → X) → (B(a) → X)
is an equivalence for each a : A.
In other words, X is F -local if every f : B(a) → X extends uniquely to a map
f¯ : C(a) → X, along the map Fa : B(a) → C(a), as indicated in the diagram
f
B(a) X.
Fa

C(a)
Thus, one might say that a type X is F -local if it is (right) orthogonal to the maps Fa , or
that it “thinks each map Fa is an equivalence”. In Theorem 2.18 we will see that the F -local
types determine a reflective subuniverse.
In most of our examples C will be the constant family 1, giving the following specializa-
tion.
Definition 2.2. Let B : A → U be a type family. A type X is said to be B-null if the map
λx. λb. x : X → (B(a) → X)
is an equivalence for each a : A.
In other words, X is B-null if and only if any map f : B(a) → X has a unique extension
to a map 1 → X, as indicated in the diagram
f
B(a) X.

1
Thus, a type X is B-null if it is (right) orthogonal to the types B(a), or that it “thinks each
type B(a) is contractible”. In Theorem 2.19 we will see that the B-null types determine a
modality.
Examples 2.3.
(i) The unit type is local for any family of maps.
(ii) Since 0 → X is contractible for any type X, a type is 0-null if and only if it is
contractible.
(iii) Any type is 1-null.
2:32 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

(iv) A type X is 2-null if and only if X is a mere proposition. To see this, recall that a
mere proposition is a type for which any two points can be identified. A map of type
2 → X is equivalently specified by two points in X. If X is assumed to be 2-null, and
x, y : X are points in X, then it follows that there is a (unique) point z : X such that
x = z and y = z. In particular it follows that x = y, so we conclude that X is a mere
proposition.
(v) More generally, a type is Sn+1 -null if and only if it is n-truncated. This follows
from [Uni13, Theorem 7.2.9 and Lemma 6.5.4].
(vi) If Q is a mere proposition, then the Q-null types are exactly the OpQ -modal types
(see Example 1.7).
Remark 2.4. We choose to consider the notion
P of being local at a family of maps, rather
than as a class of maps (i.e. a subtype of (X,Y :U) X → Y ). A family of maps (indexed by
a type A in U) is intrinsically small with respect to U, whereas a class is not. By localizing
at a small family of maps, we obtain a small type constructor. Nevertheless, one can show
that for any family F of maps, a type is FP -local if and only if it is local at the class im(F ),
when im(F ) is regarded as a subtype of (X,Y :U) X → Y . A similar relation holds for
set-quotients in [RS15].

2.2. Localizing at a family of maps. In this subsection we introduce the localization


operation and show that it determines a reflective subuniverse, which is a modality in the
case of nullification. We define a modal operator LF : U → U called localization at F , via a
construction involving higher inductive types. The idea is that one of the point constructors
will be the modal unit ηX and the other constructors build in exactly the data making each
λg. g ◦ Fa an equivalence.
For this to be homotopically well-behaved, we have to choose a “good” notion of
equivalence such as those in [Uni13, Chapter 4]. Any such choice is possible, but some
are easier than others. Of those in [Uni13], “bi-invertibility” is easiest because it allows us
to avoid 2-path constructors. However, the following notion of equivalence, which doesn’t
appear in [Uni13], is easier still. As we will see, this is because although it does include
2-path constructors, the four data it comprises can be broken into two pairs that can be
treated “uniformly” despite occuring at “different dimensions”; thus we only need to deal
explicitly with one point constructor and one path constructor (and no 2-path constructors).
For f : A → B we write
P
rinv(f ) :≡ (g:B→A) (f ◦ g = idB )
and for x, y : A we write apx,y
f : (x = y) → (f x = f y) for the action of f on identities.

Definition 2.5. We say that f is path-split if we have an inhabitant of the following type:
pathsplit(f ) :≡ rinv(f ) × (x,y:A) rinv(apx,y
Q
f ).

Theorem 2.6. For any f we have pathsplit(f ) ' isEquiv(f ).


Proof. If f is path-split, to show that it is an equivalence it suffices to show that its right
inverse g is also a left inverse, i.e. that gf x = x for all x : A. But f gf x = f x since f ◦g = idB ,
and apf : (gf x = x) → (f gf x = f x) has a right inverse, so gf x = x.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:33

This gives a map pathsplit(f ) → isEquiv(f ); to show that it is an equivalence, we may


assume that its codomain is inhabited. But if f is an equivalence, then so is apx,y
f , and hence
x,y
rinv(f ) and rinv(apf ) are both contractible. So in this case pathsplit(f ) and isEquiv(f ) are
both contractible, hence equivalent.
Q
Now let F : (a:A) B(a) → C(a) be a family of functions and X : U. As a “first
approximation” to the localization LF (X), let JF (X) be the higher inductive type with the
following constructors:
• αX : Q X → JF (X)
• ext : Q Q → JF (X)) →
{a:A} (B(a) Q(C(a) → JF (X))
• isext : {a:A} (f :B(a)→JF (X)) (b:B(a)) ext(f )(Fa (b)) = f (b).
The induction principle of JF (X) is that for any type family P : JF (X) → U0 , if there are
terms
Q
N: (x:X) P (αX (x))
Q Q Q Q
R: {a:A} ( (b:B(a)) P (f (b))) → (c:C(a)) P (ext(f, c))
(f :B(a)→JF (X))
Q Q Q Q 0 P 0
S : {a:A} (f :B(a)→JF (X)) (f 0 :Q P (f (b))) (b:B(a)) R(f )(Fa (b)) =isext(f,b) f (b),
(b:B(a))
Q
then there is a section s : (x:JF (X)) P (x) such that s ◦ αX = N . (The section s also
computes on ext and isext, but we will not need those rules.) Note that the family P does
not have to land in the same universe U that contains our types A, B, C, X; this will be
important in §2.3.
This approximation JF (X) behaves like we expect LF (X) to behave when mapping
into local types:
Lemma 2.7. If Y is F -local (and X is arbitrary), then precomposition with αX
(− ◦ αX ) : (JF (X) → Y ) → (X → Y )
is an equivalence.
Proof. We will show that this map is path-split.
First we have to construct a right inverse to it, i.e. given g : X → Y we must extend it
to JF (X). We will apply the induction principle using the constant family Y over JF (X)
and N :≡ g, so that the computation rule shows that what we get is an extension of g. To
construct the cases of R and S, let f : B(a) → JF (X), and let f 0 : B(a) → Y . Our goal is
to construct R(f, f 0 ) : C(a) → Y together with a witness S(f, f 0 ) that the triangle
B(a)
f0
Fa

C(a) Y
R(f,f 0 )

commutes. But Y is F -local, so the map


(− ◦ Fa ) : (C(a) → Y ) → (B(a) → Y )
is an equivalence, and hence in particular has a right inverse; applying this right inverse to
f 0 gives R and S.
2:34 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Second, we must suppose given g, h : JF (X) → Y and construct a right inverse to


ap(−◦αX ) : (g = h) → (g ◦ αX = h ◦ αX ).
Q
Thus, suppose we have K : (x:X) g(αX (x)) = h(αX (x)); we must extend K to a homotopy
Q
K̃ : (z:JF (X)) g(z) = h(z) such that K̃(αX (x)) = K(x). We will apply the induction
principle using the family P : JF (X) → U defined by P (z) :≡ (g(z) Q = h(z)), and N
:≡ K.
To construct the cases of R and S, let f : B(a) → JF (X) and f 0 : (b:B(a)) gf b = hf b. Our
goal is to construct R(f, f 0 ) : (c:C(a)) g(ext(f, c)) = h(ext(f, c)) together with a witness
Q

S(f, f 0 ) that for any b : B(a) we have


R(f, f 0 )(Fa (b)) = g(isext(f, b))  f 0 (b)  h(isext(f, b))−1 . (2.8)
However, once again, since Y is F -local, the map
(− ◦ Fa ) : (C(a) → Y ) → (B(a) → Y )
is an equivalence, and hence in particular
ap(−◦Fa ) : (g ◦ ext(f ) = h ◦ ext(f )) → (g ◦ ext(f ) ◦ Fa = h ◦ ext(f ) ◦ Fa ) (2.9)
has a right inverse. But the right-hand side of (2.8) inhabits the codomain of (2.9), so
applying this right inverse gives R and S.
In general, JF (X) is not F -local: its constructors only ensure that each map
(− ◦ Fa ) : (C(a) → JF (X)) → (B(a) → JF (X))
has a right inverse, not that it is an equivalence. (In fact, JF (X) is the “free algebraically
F -injective type on X”, cf. [Bou18].)
Remark 2.10. However, it does happen in many common cases that JF (X) is already F -local
(and hence the F -localization of X). Specifically, this happens whenever each (−◦Fa ) already
has a left inverse, which happens whenever each Fa : B(a) → C(a) has a right inverse. For
instance, if C(a) :≡ 1 for all a (so that we are talking about B-nullification),
Q then this
happens whenever all the types B(a) are inhabited (i.e. we have (a:A) B(a)); cf. [Shu18,
Lemma 8.7].
In particular, this occurs for Sn+1 -nullification for n ≥ −1, which as we saw in Exam-
ples 2.3 coincides with n-truncation. In this case JF (X) essentially reduces to the “hub and
spoke” construction of truncations from [Uni13, §7.3].
A concrete example where JF (X) is not yet F -local is ∅-nullification, where JF (X) =
X + 1, but only contractible types are ∅-null. Note that ∅ = S−1 , so this is equivalently
(−2)-truncation.
To modify JF (X) to become F -local using bi-invertibility or half-adjoint equivalences,
we would need to add two more constructors to JF (X) corresponding to the additional two
pieces of data in those definitions of equivalence, and then add two more cases to the proof
of Lemma 2.7 to deal with those constructors. Moreover, these additional cases are rather
more difficult than the ones we gave, since they involve homotopies “on the other side”.
Fortunately, with path-splitness, we can instead use a simple trick. Given any map
f : B → C, let ∆f : B → B ×C B be its diagonal and ∇f : C +B C → C its codiagonal.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:35

Lemma 2.11. For any f : B → C and any X, we have a commuting triangle


(C → X)
(−◦∇f ) ∆(−◦f )


(C +B C → X) (C → X) ×(B→X) (C → X)
in which the bottom map is an equivalence.
Proof. By the universal property of the pushout.
Lemma 2.12. For any f : B → C, we have
pathsplit(f ) ' rinv(f ) × rinv(∆f ).
Proof. Decomposing B ×C B and its identity types into Σ-types, we have
rinv(∆f ) ' (x,y:B) (p:f x=f y) (z:B) (q:x=z) (r:z=y) apx,z  z,y
Q Q P P P
f (q) apf (r) = p

' (x,y:B) (p:f x=f y) (r:x=y) apx,y


Q Q P
f (r) = p

' (x,y:B) rinv(apx,y


Q
f ).

Lemma 2.13. For f : B → C, a type X is f -local if and only if both maps


(− ◦ f ) : (C → X) → (B → X)
(− ◦ ∇f ) : (C → X) → (C +B C → X)
have right inverses, and if and only if both of these maps are equivalences.
Proof. By Lemma 2.12, X is f -local if and only if (− ◦ f ) and ∆(−◦f ) have right inverses,
but by Lemma 2.11 the latter is equivalent to (− ◦ ∇f ). The second statement follows since
the diagonal of an equivalence is an equivalence.
Lemma 2.13 implies that for F -locality it suffices for precomposition with each Fa and
∇Fa to have right inverses. But JF (X) is the universal way to make precomposition with
each Fa have right inverses, so to localize we just need to add all the morphisms ∇Fa to F .
Q
Specifically, for any F : (a:A) B(a) → C(a), define B̂, Ĉ : A + A → U and a family
Q
F̂ : (a:A+A) B̂(a) → Ĉ(a) by
B̂(inl(a)) :≡ B(a) Ĉ(inl(a)) :≡ C(a) F̂ (inl(a)) :≡ Fa
B̂(inr(a)) :≡ C(a) +B(a) C(a) Ĉ(inr(a)) :≡ C(a) F̂ (inr(a)) :≡ ∇Fa .
Definition 2.14. For any X : U, the localization of X at F is LF (X) :≡ JF̂ (X), and
F̂ .
ηX : X → LF (X) is αX
Example 2.15. As noted in Remark 2.10, a simple example where JF (X) is not yet F -local
is ∅-nullification, where F is the single map ∅ → 1. In this case F̂ consists of ∅ → 1 and the
fold map ∇ : 1 + 1 → 1. The constructors of JF̂ (X) corresponding to the former give it a
point, and those corresponding to the latter make it a mere proposition (in fact they are
the constructors of (−1)-truncation, i.e. S0 -nullification). Thus, JF̂ (X) is contractible, i.e.
∅-local.
2:36 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Q
Lemma 2.16. For any F : (a:A) B(a) → C(a), the type LF (X) is F -local.
Proof. The constructors of LF (X) as JF̂ (X) say that the precomposition maps
(− ◦ F̂a ) : (Ĉ(a) → JF̂ (X)) → (B̂(a) → JF̂ (X))
have right inverses for all a : A + A. But by definition of F̂ , these maps consist of
precomposition with each Fa and ∇Fa . Thus, by Lemma 2.13, JF̂ (X) is F -local.
Lemma 2.17. If Y is F -local (and X is arbitrary), then precomposition with ηX
(− ◦ ηX ) : (LF (X) → Y ) → (X → Y )
is an equivalence.
Proof. By the second clause of Lemma 2.13, any F -local type is also F̂ -local; so this follows
from Lemma 2.7.
Theorem 2.18. The subuniverse of F -local types in U is a reflective subuniverse, with
modal operator LF .
Proof. By Lemmas 2.16 and 2.17.

2.3. Nullification and accessibility. A general localization is only a reflective subuniverse,


but there is a convenient sufficient condition for it to be a modality: if each C(a) = 1. A
localization modality of this sort is called nullification.
Q
Theorem 2.19. If F : (a:A) B(a) → C(a) is such that each C(a) = 1, then localization at
F is a modality, called nullification at B.
Proof. It suffices to show that for any B : A → U, the B-null types are Σ-closed. Thus, let
X : U and Y : X → U be such that X and each Y (x) are B-null. Then for any a : A we have
P P Q
(B(a) → (x:X) Y (x)) ' (g:B(a)→X) (b:B(a)) Y (g(b))
P
' (x:X) B(a) → Y (x)
P
' (x:X) Y (x)
P
with the inverse equivalence being given by constant maps. Thus, (x:X) Y (x) is B-null.
Of course, it might happen that LF is a modality even if QF doesn’t satisfy the condition
of Theorem 2.19. For instance, if B : A → U has a section s : (a:A) B(a), then localizing at
the family s0 : (a:A) 1 → B(a) is equivalent to nullifying at B, since in a section-retraction
Q

pair the section is an equivalence if and only if the retraction is. However, we can say the
following.
Q
Lemma 2.20. If F : (a:A) B(a) → C(a) is such that LF is a modality, then there exists a
family E : D → U such that LF coincides with nullification at E.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:37

P
Proof. Write # :≡ LF and η for its modal unit. Define D = (a:A) (#(B(a)) + #(C(a))),
and E : D → U by
E(a, inl(b)) :≡ fibηB(a) (b)
E(a, inr(c)) :≡ fibηC(a) (c).
Then since η is #-connected, each E(d) is #-connected, and hence every F -local type is
E-null.
On the other hand, suppose X is an E-null type. Each ηB(a) and ηC(a) is LE -connected,
since their fibers are LE -connected (by definition); thus X is also ηB(a) -local and ηC(a) -local.
But we have the following commutative square:
ηB(a)
B(a) #(B(a))
Fa #(Fa )

C(a) ηC(a) #(C(a))

and #(Fa ) is an equivalence; thus X is also Fa -local. So the F -local types coincide with the
E-null types.
This shows that the following pair of definitions are consistent.
Definition 2.21. A reflective subuniverse on U is said to be accessible if it is the localization
at a family of maps in U, indexed by a type in U. Similarly, a modality # on U is said to be
accessible if it is the nullification at a family of types in U, indexed by a type in U.
Explicitly,
Q a presentation of a reflective subuniverse # of U consists of a family of
maps F : (a:A) B(a) → C(a), where A : U and B, C : A → U, such that # = LF . Similarly,
a presentation of a modality # consists of a family of types B : A → U, where A : U, such
that # = Lλa. B(a)→1 .
Remark 2.22. Note that being accessible is structure; different families can present the same
reflective subuniverse or modality. As a trivial example, note that localizing at the empty
type, and localizing at the type family on 2 defined by 02 7→ 0 and 12 7→ 1 both map all
types to contractible types.
However, we are usually only interested in properties of presentations insofar as they
determine properties of subuniverses. For instance, by Lemma 2.20, a reflective subuniverse
is a modality exactly when it has a presentation in which each C(a) = 1. Similarly, in §3.1
we will define a modality to be “topological” if it has a presentation in which each C(a) = 1
and each B(a) is a mere proposition.
Example 2.23. The trivial modality k–k(−2) is presented by 0, while the propositional
truncation modality k–k(−1) is presented by 2. More generally, the n-truncation modality
k–kn is presented by the (n + 1)-sphere Sn+1 .
Example 2.24. For every mere proposition P , the open modality OpP (X) :≡ (P → X)
from Example 1.7 is presented by the singleton type family P . To see this, note that
ηX : X → (P → X) is the same as the map in the definition of locality, so that X is modal
for the open modality on P if and only if it is P -null. (If P is not a mere proposition,
2:38 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

however, then X 7→ (P → X) is not a modality, and in particular does not coincide with
localization at P .)
Example 2.25. The closed modality ClP from Example 1.8 associated to a mere proposition
P is presented by the type family λx. 0 : P → U. For by definition, A is null for this
family if and only if for any p : P the map A → (0 → A) is an equivalence. But 0 → P is
contractible, so this says that P → isContr(A), which was the definition of ClP -modal types
from Example 1.8.
One of the main uses of accessibility is when passing between universes. Our definitions
of reflective subuniverses and modalities are relative to a particular universe U, but most
examples are “uniform” or “polymorphic” and apply to types in all universes (or all sufficiently
large universes) simultaneously. Accessibility is one technical condition which ensures that
this holds and that moreover these modal operators on different universes “fit together” in a
convenient way. For instance, we have:
Lemma 2.26. If # is an accessible reflective subuniverse on a universe U, and U0 is a
larger universe containing U, then there is a reflective subuniverse #0 on U0 such that:
(i) If # is a modality, so is #0 .
(ii) A type X : U is #0 -modal if and only if it is #-modal.
(iii) For X : U, the induced map #0 X → #X is an equivalence.
(iv) A type X : U0 is #0 -modal if and only if (– ◦ f ) : (B → X) → (A → X) is an
equivalence for any map f : A → B in U such that #(f ) is an equivalence.
(v) #0 depends only on #, not on a choice of presentation for it.
Q
Proof. Since # is accessible, it is generated by some family F : (a:A) B(a) → C(a). Define
#0 : U0 → U0 to be the higher inductive localization at the same family F , which lives in U0
as well since U0 is larger than U. If # is a modality, we can take each C(a) = 1 so that #0 is
also a modality, giving (i).
The notion of F -locality for a type X is independent of what universe X lives in,
giving (ii). Moreover, because the induction principle for a higher inductive localization
allows us to eliminate into any type in any universe, Lemma 2.17 applies no matter what
universe the target lives in. Thus, if X : U then #X and #0 X have the same universal
property, hence are canonically equivalent, giving (iii).
To prove (iv), note first that certainly each #(Fa ) is an equivalence, so any type
with the stated property is F -local. Conversely, if X is F -local, hence #0 -modal, then
(B → X) → (A → X) is certainly an equivalence for any map f such that #0 (f ) is an
equivalence; but #0 and # coincide on U. Thus (iv) holds; and this implies (v) since a
reflective subuniverse is determined by its modal types.
We refer to the #0 constructed in Lemma 2.26 as the canonical accessible extension
of # to U0 .
Examples 2.27. Our characterizations of the truncation and open and closed modalities
in Examples 2.23 to 2.25 made no reference to the ambient universe. Thus, when these
modalities are defined in the standard ways on U and U0 respectively, their U0 -version is the
canonical accessible extension of their U-version.
Example 2.28. By contrast, the double-negation modality ¬¬ is defined in a polymorphic
way on all universes, but in general there seems no reason for it to be accessible on any of
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:39

them. However, if propositional resizing holds, then it is the nullification at 2 together with
all propositions P such that ¬¬P holds, and hence accessible.
Whether or not any inaccessible modalities remain after imposing propositional resizing
may depend on large-cardinal principles. It is shown in [CSS05] that this is the case
for the analogous question about reflective sub-(∞, 1)-categories of the (∞, 1)-category of
∞-groupoids.
Example 2.29. Suppose that all types in U are 0-types. We have tacitly assumed that all
universes are closed under all higher inductive types, so (assuming univalence) this is not
actually possible, but to get a feeling for what else could in principle go wrong suppose we
drop that assumption. Then if F is a family such that the higher inductive type LF does
not preserve 0-types, we might (depending on what we assume about closure under higher
inductive types) still be able to define a modality on U by #X = kLF Xk0 . But if U0 is a
larger universe containing non-0-types, then this # would not eliminate into types in U0 ,
and if we define #0 by localizing at F in U0 then the canonical map #0 X → #X would be
the 0-truncation rather than an equivalence. So Lemma 2.26 is not as trivial as it may seem.
Remark 2.30. It is tempting to think that any reflective subuniverse # on U could be
extended to an accessible one on U0 by localizing at the family of all functions in U that
are inverted by # (or nullifying at the family of all #-connected types in U, in the case of
modalities), which is a U0 -small family though not a U-small one. This does produce an
accessible reflective subuniverse #0 of U0 such that the #0 -modal types in U coincide with
the #-modal ones, but there seems no reason why the modal operators #0 and # should
agree on types in U.
Remark 2.31. Reflective subuniverses and modalities defined by localization have another
convenient property: their eliminators have a strict judgmental computation rule (assuming
that our higher inductive localization type has a judgmental computation rule on point-
constructors, which is usually assumed). This will be useful in Remark 3.24.

2.4. Non-stable factorization systems. We have seen in §1 that Σ-closed reflective


subuniverses are equivalent to stable orthogonal factorization systems. Without Σ-closedness
and stability, this equivalence fails. However, we can still say:
Lemma 2.32. Any orthogonal factorization system has an underlying reflective subuniverse,
consisting of those types X such that X → 1 is in R.
Proof. If Y is modal in this sense, then by applying orthogonality to squares of the form
A Y
f

B 1
we see that if f : A → B lies in L, then precomposition
(− ◦ f ) : (B → Y ) → (A → Y )
is an equivalence. Thus, it suffices to show that for every X there is an L-map X → #X
where #X → 1 is in R; but this is just an (L, R)-factorization of the map X → 1.
2:40 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Conversely, in classical category theory there are various ways of extending a reflective
subcategory to a factorization system. One canonical one is considered in [CHK85], but this
is harder to reproduce homotopy-theoretically. (It is possible in what is there called the
“simple” case, hence also the “semi-left-exact” case — which includes all modalities, as the
case of “stable units” — but we will not investigate that construction here.) Instead, if we
have an accessible reflective subuniverse presented by localization at a family of maps, we
can generalize the construction of localization to produce a factorization system (though
in general the result will depend on the choice of presentation, not just on the reflective
subuniverse we started with).
To avoid too much wrangling with witnesses of commutative squares, we will factorize
dependent types rather than functions. In this case, right orthogonality (Definition 1.45)
can be expressed in the following way.
Definition
Q 2.33. Given l : A → B and X : Y → U, and functions g : B → Y and
f : (a:A) X(g(l(a))) forming a judgmentally commutative square
(g◦l,f ) P
A (y:Y ) X(y)
l pr1 (2.34)

B g Y
Q
a dependent filler in this square consists of a morphism j : (b:B) X(g(b)) and a homotopy
j ◦ l ∼ f . That is, the type of dependent fillers is
P Q
dfill(l, X, g, f ) :≡ (j:Q X(g(b))) (a:A) j(l(a)) = f (a). (2.35)
(b:B)

Recall that for a map f : B → C, we denote by ∆f : B → B ×C B its diagonal and


∇f : C +B C → C its codiagonal. We have the following dependent generalization of
Lemma 2.11:
Lemma 2.36. Let f : B → C and X : Y → U and g : C → Y ; then we have a commuting
triangle
Q
(c:C) X(g(c))
(−◦∇f )
∆(−◦f )
Q  Q 
X(g 0 (z))
Q
(z:C+B C) ∼ (c:C) X(g(c)) ×(Q(b:B) X(g(f (b)))) (c:C) X(g(c))

where g 0 : C +B C → Y is induced by g on both copies of C, and the bottom map is an


equivalence.
Proof. Like the non-dependent case Lemma 2.11, this follows from the universal property of
the pushout.
And similarly for Lemma 2.13:
Lemma 2.37. For l : B → C and X : Y → U, the following are equivalent.
P
(i) The map pr1 : ( (y:Y ) X(y)) Q → Y is right orthogonal to l.
(ii) For every g : C → Y and f : (b:B) X(g(l(b))), the type dfill(l, X, g, f ) of dependent
fillers in (2.34) is contractible.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:41

(iii) For every g : C → Y , the precomposition map


Q  Q 
(− ◦ l) : (c:C) X(g(c)) → (b:B) X(g(l(b))) (2.38)
is an equivalence.
(iv) For every g : C → Y , the precomposition maps
Q  Q 
(− ◦ l) : (c:C) X(g(c)) → (b:B) X(g(l(b)))
Q  Q 
0
(− ◦ ∇l ) : (c:C) X(g(c)) → (z:C+B C) X(g (z))
have right inverses.
(v) For every g : C → Y , the maps in (iv) are equivalences.
Proof. The equivalence of (ii) and (iii) is immediate, since dfill(l, X, g, f ) is the fiber of (2.38)
over f . And as in Lemma 2.13, (iii) is equivalent to (iv) and (v) using Lemmas 2.12 and 2.36.
Finally, regarding (i), if we have any commutative square
f0 P
B (y:Y ) X(y)

l S pr1

C g Y
witnessed by S : pr1 ◦ f 0 = g ◦ l, we can define f (b) :≡ S(b)∗ (pr2 (f 0 (b))) to get an equivalent
and judgmentally commutative square as in (2.34). Thus, (i) is equivalent to its restriction to
such squares. But given such a square, the type of ordinary diagonal fillers (Definition 1.43)
is equivalent to
P P P
(Hg :pr1 ◦j=g) pr1 ◦ Hf = Hg ◦ l
P
(j:C→ X(y)) (Hf :j◦l=(g◦l,f ))
(y:Y )

and thereby to
P P Q
(j1 :C→Y ) (j2 : (c:C) X(j1 (c)))
P P P
(Hf 1 :j1 ◦l=g◦l) (Hf 2 :j2 ◦l=X f) (Hg :j1 =g) Hf 1 = Hg ◦ l.
H
f1

But now we can contract two based path spaces (combining j1 with Hg , and Hf 1 with the
final unnamed equality Hf 1 = Hg ◦ l) to get the type (2.35) of dependent fillers.
Q
Let F : (a:A) B(a) → C(a) and let X : Y → U be a type family. We define an indexed
higher inductive type JFY (X) : Y → U by the following constructors:
βX : (y:Y ) X(y) → JFY (X)(y)
Q
Q Q Q Q Y
lift : {a:A} (g:C(a)→Y ) (f :Q
(b:B(a)) J Y (X)(g(F (b))))
F a (c:C(a)) JF (X)(g(c))
Q Q Q Q
islift : {a:A} (g:C(a)→Y ) (f :Q J Y (X)(g(Fa (b)))) (b:B(a))
(b:B(a)) F

lift(g, f, Fa (b)) = f (b).


2:42 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Diagrammatically, lift and islift comprise a specified dependent filler for any judgmentally
commutative square as follows:
f P Y
B(a) (y:Y ) JF (X)(y)

Fa pr1

C(a) g Y.

The induction principle of JFY (X) says that for any P : (y:Y ) JFY (X)(y) → U with
Q
Q Q
N : (y:Y ) (x:X(y)) P (y, βX (y, x))
Q Q Q
R : (a:A) (g:C(a)→Y ) (f :Q Y
(b:B(a)) JF (X)(g(Fa (b))))
Q Q Q
(f 0 : (b:B(a)) P (g(Fa (b)),f (b))) (c:C(a)) P (g(c), lift(g, f, c))
Q Q Q
S : (a:A) (g:C(a)→Y ) (f :Q Y
(b:B(a)) JF (X)(g(Fa (b))))
Q Q Q 0 P 0
(f 0 : (b:B(a)) P (g(Fa (b)),f (b))) (b:B(a)) R(g, f, f , Fa (b)) =islift(g,f,b) f (b)
Q Q
there is a section s : (y:Y ) (w:J Y (X)(y)) P (y, w) such that s ◦ βX = N (plus two more
F
computation rules we ignore). Note that by transporting along islift, the types of R and S
are equivalent to
R0 : (a:A) (g:C(a)→Y ) (f :Q
Q Q Q
Y
Q Q (b:B(a)) JF (X)(g(F
Q a (b))))

(f 0 : (b:B(a)) P (g(Fa (b)),lift(g,f,Fa (b)))) (c:C(a)) P (g(c), lift(g, f, c))

S 0 : (a:A) (g:C(a)→Y ) (f :Q
Q Q Q
Y
(b:B(a)) JF (X)(g(F a (b))))
Q Q Q 0 0
0
(f : (b:B(a)) P (g(Fa (b)),lift(g,f,Fa (b)))) (b:B(a)) R(g, f, f , Fa (b)) = f (b).

With this modification, the inputs of the induction principle are a judgmentally commutative
square
P N P P
(y:Y ) X(y) (y:Y ) (w:J Y (X)(y)) P (y, w)
F

(idY ,βX ) pr1 (2.39)

JFY (X)(y) JFY (X)(y)


P P
(y:Y ) (y:Y )

together with a specified dependent filler for each judgmentally commutative square of the
form
(g◦Fa ,lift(g,f,Fa (−)),f 0 ) P P
B(a) (y:Y ) (w:J Y (X)(y)) P (y, w)
F

Fa pr1

JFY (X)(y),
P
C(a) (y:Y )
(g,lift(g,f,−))
while the output of the induction principle is a dependent filler in (2.39).
Lemma 2.40. If P : (y:Y ) JFY (X)(y) → U is such that
Q

pr1 : ( (y:Y ) (w:J Y (X)) P (y, w)) → (y:Y ) JFY (X)


P P P
F
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:43

is right orthogonal to F , then


Q Q  Q Q 
(− ◦ βX ) : (y:Y ) Y
(w:J (X)(y)) P (y, w) → (y:Y ) (x:X(y)) P (y, β X (x))
F

is an equivalence.
Proof. As in Lemma 2.7, we will show that it is path-split using the induction principle of
JFY (X). Q Q
First, given h : (y:Y ) (x:X(y)) P (y, βX (x)), we take P (y, w) :≡ P (y, w) and N :≡ h.
To give the remaining data R, S, suppose given
f : (b:B(a)) JFY (X)(g(Fa (b))) f 0 : (b:B(a)) P (g(Fa (b)), f (b))
Q Q
a:A g : C(a) → Y
Now we can apply Lemma 2.37 with l :≡ Fa and f :≡ f 0 : an inhabitant of (2.35) consists
exactly of the desired R and
Q S.
Second, given h, k : (y:Y ) (JFY (X)(y) → P (y)) and p : h ◦ βX = k ◦ βX , we take
P (y, :≡ (h(y, x) = k(y, x)) and N :≡ p. To give R, S, suppose given a : A, g : C(a) → Y ,
Qx)
f : (b:B(a)) JFY (X)(g(Fa (b))), and
f 0 : (b:B(a)) h(g(Fa (b)), f (b)) = k(g(Fa (b)), f (b)).
Q

Define
j(c) :≡ h(g(c), lift(g, f, c))
j 0 (c) :≡ k(g(c), lift(g, f, c))
q(b) :≡ k(g(Fa (b)), f (b)).
Then we can apply Lemma 2.37 to the square
q P
B(a) (y:Y ) P (y)

Fa pr1

C(a) g Y.
We have
j 0 (Fa (b)) ≡ k(g(Fa (b)), lift(g, f, Fa (b))) = k(g(Fa (b)), f (b)) ≡ q(b)
and
p
j(Fa (b)) ≡ h(g(Fa (b)), lift(g, f, Fa (b))) = h(g(Fa (b)), f (b)) = k(g(Fa (b)), f (b)) ≡ q(b),
giving two inhabitants (j, ) and (j 0 , ) of (2.35), which are therefore equal. This equality
consists of an equality j = j 0 , which gives precisely R, and an equality between the above
two paths, which gives precisely S.
Theorem 2.41. Given F : (a:A) B(a) → C(a), define R = F ⊥ and L = ⊥ R, and let F̂ be
Q

as in §2.2 and JF̂Y (X) constructed as above for F̂ . Then for any X : Y → U, the composite
P  P 
Y
(y:Y ) X(y) → J
(y:Y ) F̂ (X)(y) →Y
is an (L, R)-factorization. Therefore, (L, R) is an orthogonal factorization system.
2:44 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Proof. By Lemma 2.36, if pr1 is right orthogonal to F , then it is also right orthogonal to F̂ .
Since every function is equivalent to one of the form pr1 , we have F ⊥ = F̂ ⊥ . Thus, since
applying Lemma 2.40 to F̂ shows that the first factor of this factorization is in ⊥ (F̂ ⊥ ), it is
also in ⊥ (F ⊥ ) = L.
P On theY other hand, the constructors lift and islift show that the second factor pr1 :
J
(y:Y ) F̂ (X)(y) → Y of this factorization satisfies Lemma 2.37(iv) for F , since the
fibers of these maps are the types of dependent fillers against morphisms in F̂ . Thus, this
second factor is in R.
Finally, in §1 we defined orthogonal factorization systems by the uniqueness of factoriza-
tions and proved from this the orthogonality of the two classes of maps; but it is easy to show
that, as in classical category theory, orthogonality implies the uniqueness of factorizations
when they exist, since any two factorizations must lift uniquely against each other.

3. Left exact modalities


We have seen that the modal operator of any reflective subuniverse preserves products, but
even for a modality it does not generally preserve pullbacks. If it does, we call the modality
“left exact” or just “lex”.
In higher topos theory, lex modalities coincide with reflective sub-toposes. We can
construct them by nullifying any family of propositions (Corollary 3.12); these correspond
categorically to the “topological” localizations (in 1-topos theory, every subtopos is topologi-
cal).

3.1. Lex, topological, and cotopological modalities.


Theorem 3.1. For a modality #, the following are equivalent.
(i) If A is #-connected,
P then so is (x = y) for any x, y : A.
(ii) Whenever A and (x:A) B(x) are #-connected, then so is B(x) for all x : A.
(iii) Any map between #-connected types is #-connected.
(iv) Any #-modal function between #-connected
Q types is an equivalence.
(v) If f : A → B is #-connected, and g : (a:A) P (a) → Q(f (a)) is such that total(g) :
P P
( (x:A) P (x)) → ( (y:B) Q(y)) is #-connected, then ga : P (a) → Q(f a) is also
#-connected for each a : A.
(vi) Given a commutative square
h
B A
g f (3.2)
D k
C
in which f and g are #-connected, then for any a : A the induced map fibh (a) →
fibk (f (a)) is #-connected.
(vii) Any commutative square (3.2) in which f and g are #-connected and h and k are
#-modal is a pullback.
(viii) For any f : A → B and b : B, the evident map fibf (b) → fib#f (ηb) is #-connected.
(ix) For any A and x, y : A, the induced map #(x = y) → (ηA (x) = ηA (y)) is an
equivalence.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:45

The functor # preserves pullbacks.


(x)
#-connected maps satisfy the 2-out-of-3 property.
(xi)
If #f : #A → #B is an equivalence, then f is #-connected.
(xii)
For any #-connected type A and any P : A → U# , there is a Q : U# such that
(xiii)
P (a) ' Q for all a : A.
When they hold, we say that # is lex.
Proof. The equivalence (ii)⇔(iii) is easy, using the definition of #-connected maps and the
fact that any function is equivalent to a fibration. And (i)⇒(iii) since
P
fibf (b) ≡ (a:A) (f (a) = b)
and #-connected types are closed under Σ (since #-connected maps are closed under
composition, being the left class of a factorization system).
Condition (iv) is a special case of (iii), since a function that is both modal and connected
is an equivalence. But assuming (iv), if f : A → B is any function between #-connected
e m
types, then in its (L, R)-factorization A → − I −→ B the type I is also connected by right
cancellation. Thus (iv) implies that m is an equivalence; thus f , like e, is #-connected,
giving (iii).
Assuming (iii), in the situation of (v) the 3 × 3 lemma for fiber sequences allows us to
identify the fiber of ga over q : Q(f (a)) with the fiber over (a, reflf (a) ) of the induced map
fibtotal(g) ((f (a), q)) → fibf (f (a)):

• P (a) Q(f (a))

total(g)
(3.3)
P P
fibtotal(g) ((f (a), q)) (x:A) P (x) (y:B) Q(y)
pr1 pr1

fibf (f (a)) A f
B.

Since f and total(g) are #-connected by assumption, their fibers are #-connected, and hence
by (iii) so is this fiber; thus (v) holds.
Now assuming (v), we can deduce (vi) by replacing the maps h and k by equivalent
dependent projections. If in addition h and k are #-modal, then fibh (a) → fibk (f a) is a
function between #-modal types, hence itself #-modal as well as #-connected and thus an
equivalence; thus (vi)⇒(vii). On the other hand, the special case of (vii) in which f and g
have codomain 1 reduces to (iv).
Applying (vi) instead to the commutative square
ηA
A #(A)
f #(f ) (3.4)

B ηB #(B)
for any f : A → B yields (viii). And as a special case of (viii), if A :≡ 1 and B is #-connected,
we find that apη is #-connected. Since #-connected maps are inverted by #, this implies (ix).
Conversely, if (ix) holds, if A is #-connected then (η(x) = η(y)) is contractible, hence (x = y)
is #-connected, giving (i). Thus (i) through (ix) are equivalent.
2:46 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

f g
Assuming these equivalent conditions, for a cospan A − →C← − B the map of pullbacks
P P P P
(a:A) (b:B) (f a = gb) −→ (x:#A) (y:#B) ((#f )(x) = (#g)(y)) (3.5)
is equivalent to the map on total spaces induced by ηA : A → #A and the fiberwise
transformation Q
h : (a:A) (fibg (f a) → fib#g ((#f )(ηa))) .
But since (#f )(ηa) = η(f a), by (viii) each ha is #-connected. Since ηA is also #-connected,
by Lemma 1.39 so is (3.5). Hence the induced map
P P  P P
# (a:A) (b:B) (f a = gb) −→ (x:#A) (y:#B) ((#f )(x) = (#g)(y))
(which exists since the codomain is #-modal) is an equivalence, yielding (x).
On the other hand, if (x), then # preserves any pullback
(x = y) 1
x (3.6)

1 y A
yielding (ix).
For (xi), two-thirds of the 2-out-of-3 property holds for any modality, so it remains to
show that for f : A → B and g : B → C, if g ◦ f and g are #-connected, so is f . However,
the unstable octahedral axiom ([Uni13, ex4.4]) implies that for any b : B, the fiber fibf (b)
is equivalent to the fiber of the induced map fibg◦f (gb) → fibg (gb). These two types are
#-connected since g ◦ f and g are; thus (iii)⇒(xi). Conversely, (iii) is clearly a special case
of (xi).
Since ηA : A → #A is #-connected, easily (xi)⇒(xii). On the other hand, if g ◦ f and g
are #-connected, then they are both inverted by #, and hence so is f ; thus (xii)⇒(xi).
Next we assume (xi) and show (xiii). Suppose A is #-connected and P : A → U# , and
define P 
Q :≡ # (a:A) P (a) ,
Q
and g : (a:A) P (a) → Q by g(a, u) :≡ η(a, u). We will show g to be a family of equivalences.
Since P (a) and Q are both #-modal, for ga to be an equivalence, it suffices
P for it to be
#-connected. We will prove this by showing that the induced map total(g) : ( (a:A) P (a)) →
P
( (a:A) Q) is #-connected. By the assumed 2-out-of-3 property, for this it suffices to show
that the other two maps in the following commutative triangle are #-connected:
P total(g) P
(a:A) P (a) (a:A) Q ≡ A × Q

pr2 (3.7)
η
Q
But the right-hand vertical map is #-connected since its fiber is the #-connected type A, and
the diagonal map is #-connected since it is simply η. This completes the proof of (xi)⇒(xiii).
Finally, we prove (xiii)⇒(i). Suppose A is #-connected and x : A. Then λy. #(x =
y) : A → U# so there is a Qx : U# such that #(x = y) ' Qx for all y : A. It follows that
transport in the type family λy. #(x = y) is constant, i.e. if p, q : y = z and u : #(x = y)
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:47

then p∗ (u) = q∗ (u). Now for any p : x = y, we have p∗ (η(reflx )) = η(p); hence for any
p, q : x = y we have η(p) = η(q). By ind# , it follows that for any u, v : #(x = y) we have
u = v, i.e. #(x = y) is a mere proposition. But #(x = x) is inhabited by η(reflx ), hence Qx
is also inhabited, and thus so is #(x = y) for all y; thus it is contractible.
Note that (viii) and (x) both imply that a lex modality preserves fibers: given f : A → B
and b : B, the map #(fibf (b)) → fib#f (ηb) is an equivalence. In fact, this property (and
hence also (x)) characterizes lex modalities even among reflective subuniverses.
Theorem 3.8. If # is a reflective subuniverse such that for any f : A → B and b : B, the
map #(fibf (b)) → fib#f (ηb) is an equivalence, then # is Σ-closed (and hence a lex modality).
Proof. Suppose A and each B(a) are #-modal. We have a commutative square
P η P
(a:A) B(a) #( (a:A) B(a))
pr1 #pr1

A η #A
in which the bottom map is an equivalence. Thus, to show that the top map is an
equivalence it suffices to show that the induced map on each fiber B(a) → fib#pr1 (ηa) is
an equivalence. But this map factors through the equivalence B(a) ' #B(a) by the map
#B(a) → fib#pr1 (ηa), which is an equivalence by assumption.
A particularly useful corollary of Theorem 3.1 is the following.
Corollary 3.9. A lex modality preserves n-truncated maps for all n.
Proof. We first argue by induction on n that a lex modality # preserves n-types for all
n. The base case is Lemma 1.28. For the inductive step, suppose # is lex and preserves
n-types, and A is an (n + 1)-type. Then for u, v : #A the proposition that u = v is an
n-type is #-modal, since it is constructed inductively using Σ, Π, and identity types. Thus,
we can prove it by #-induction on u, v. But for x, y : A the type η(x) = η(y) is equivalent
to #(x = y) by Theorem 3.1(ix), hence is an n-type by the inductive hypothesis.
Now if f : A → B is n-truncated, to show that #f is n-truncated we must show that
fib#f (y) is an n-type for all y : #B. Again, by #-induction we can reduce to the case y :≡ η(b)
for some b : B, in which case Theorem 3.1(viii) implies that fib#f (η(b)) ' #(fibf (b)), which
is an n-type since f is n-truncated and # preserves n-types.
Not every modality satisfying Corollary 3.9 is lex. For instance, the m-truncation
modality preserves n-types for all n, but is not lex for m ≥ −1. (To see that it is not lex,
consider an Eilenberg–MacLane space K(G, m + 1) [LF14]; this is m-connected, but its
loop space is K(G, m) which is not m-connected. Alternatively, we can use Theorem 3.11
below together with the fact that the universe of m-types in the mth universe is not an
m-type [KS15].)
We do know at least one example of a lex modality.
Example 3.10. For any mere proposition P , the open modality OpP :≡ λX. (P → X) is
lex. This is easy to see since mapping out of P is a right adjoint, hence preserves all limits,
including pullbacks.
2:48 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

However, constructing lex modalities in general, such as by localization, is somewhat


tricky. Unlike the characterization of modalities as Σ-closed reflective subuniverses, which
refers only to the modal types and hence was easy to prove in Theorem 2.19, all the
characterizations of lex-ness refer explicitly or implicitly to the modal operator #, and not
just by way of its “mapping out” universal property but saying something about its identity
types. In general, saying anything about the identity types of a higher inductive type (such
as localization) requires some amount of univalence, and the present case is no exception
(although we do not need a full “encode-decode” type argument).
Theorem 3.11. Let # be an accessible modality; the following are equivalent.
(i) # is lex.
(ii) # has a presentation B : A → U such that for any a : A and any P : B(a) → U# ,
there is a Q : U# such that P (b) ' Q for all b : B(a).
(iii) The universe U# :≡ { A : U | A is #-modal } of modal types is #0 -modal, where #0 is
the canonical accessible extension of # to a universe U0 containing U, as in Lemma 2.26.
Proof. Assuming (i), condition (ii) holds for any presentation: it is just a special case of
Theorem 3.1(xiii), since each B(a) is #-connected.
Now assume (ii) for some presentation B : A → U. By definition of #0 , it suffices to
show that U# is B(a)-null for all a : A, i.e. that the “constant functions” map
U# → (B(a) → U# )
is an equivalence for all a : A. The assumption (ii) says that this map has a section, and
hence in particular is surjective. Thus, it suffices to show it is an embedding, i.e. that for
any X, Y : U# the map
(X = Y ) → ((λb. X) = (λb. Y ))
is an equivalence. But by univalence and function extensionality, this map is equivalent to
(X ' Y ) → (B(a) → (X ' Y )),
which is an equivalence by Corollary 1.37 since X ' Y is #-modal and B(a) is #-connected.
Finally, if we assume (iii), then for any #-connected type A : U the map
U# → (A → U# )
is an equivalence. In particular, it has a section, proving Theorem 3.1(xiii).
In particular, we have the following general result.
Corollary 3.12. Let B : A → Prop be a family of mere propositions. Then nullification at
B is a lex modality.
Proof.
Q We prove condition (ii) of Theorem 3.11. Given P : B(a) → U# , define Q :≡
(b:B(a)) P (b). This lies in U# since modal types are always closed under dependent function
types. And if we have any b : B(a), then B(a) is an inhabited proposition and hence
contractible, and a product over a contractible type is equivalent to any of the fibers.
Definition 3.13. A (necessarily lex) modality that can be presented by nullification at a
family of mere propositions is called topological.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:49

The term “topological” is from [Lur09]. Presumably it comes from the fact that
by [Lur09, Proposition 6.2.2.17], topological localizations of a presheaf ∞-topos correspond
to “Grothendieck topologies” on the domain, as defined there.
Example 3.14. For any mere proposition Q, the closed modality ClQ :≡ λX. Q ∗ X is
topological, since it is presented by the family λ(x : P ). 0. Thus, by Corollary 3.12, it is lex.
Topological modalities may seem very special, since very few types are mere propositions.
But in fact, if we allow ourselves to assume rather than conclude lex-ness, then it doesn’t
matter what truncation level we take the generating family at, as long as it is finite:
Theorem 3.15. If # is an accessible lex modality with a presentation B : A → U for which
each B(a) is an n-type (for some fixed n independent of a), then # is topological.
Proof. We will prove that under the given hypotheses, if n ≥ 0 then # also has a presentation
D : C → U for which each D(c) is an (n − 1)-type. By induction, this will prove the theorem.
The argument is aP modification of [Uni13, Lemma 7.5.11].
Let C :≡ A + (a:A) B(a) × B(a), and define
D(inl(a)) :≡ kB(a)k−1
D(inr(a, x, y)) :≡ (x =B(a) y).
Clearly each D(c) is an (n − 1)-type (here is where we use the assumption n ≥ 0). Since #
is lex and each B(a) is #-connected, each D(inr(a, x, y)) is also #-connected. To show that
D(inl(a)) is also #-connected, since # preserves mere propositions, the proof of Lemma 1.36
implies that it suffices to show that Z → (kB(a)k → Z) is an equivalence for any #-modal
mere proposition Z. But in this case (kB(a)k → Z) ' (B(a) → Z), and the latter is
equivalent to Z since B(a) is #-connected and Z is #-modal.
Thus each type D(c) is #-connected, so every #-modal type is D-null. For the converse,
suppose X is D-null and let a : A. We want to show that X is B(a)-null, i.e. that the
“constant functions” map c : X → (B(a) → X) is an equivalence. Let f : B(a) → X; we will
show that fibc (f ) is contractible.
Now X and B(a) → X are both D-null, hence so is fibc (f ), and hence so is the
proposition “fibc (f ) is contractible”. Thus, we may assume in proving it that we have
kB(a)k. But it is also a proposition, so we may furthermore assume that we have some
b : B(a).
If we also write b for the induced map 1 → B(a), then for any u : B(a) we have
fibb (u) ' (b = u), which belongs to D. Thus b : 1 → B(a) is D-connected.
We construct a point in fibc (f ) by taking f (b) and constructing a path
Q
p : (u:B(a)) f (u) = f (b).
To give p, note that since X is D-modal, so is the type f (u) = f (b). Thus, by Lemma 1.36,
since b : 1 → B(a) is D-connected, it suffices to prove f (b) = f (b), which is of course trivial.
Q Finally, suppose we have some other point (x, q) : fibc (f ), i.e. an x : X with q :
(u:B(a)) f (u) = x. Then qb : f (b) = x, so it remains to show that for any u : B(a) we have
qb = p−1
u
 qu . But since this is an iterated equality type in X, it is D-modal, so using again
the fact that b : 1 → B(a) is D-connected it suffices to prove it when u = b. But pb = reflf (b)
by definition, so in this case the goal reduces to qb = qb , which is trivial.
2:50 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Thus, a topological modality could equivalently be defined as a lex modality that admits
a generating family of bounded homotopy type. Moreover, every lex modality is “almost
topological” in the following sense.
Theorem 3.16. If # is a lex modality and A is an n-type for n < ∞, then A is #-modal if
and only if it is P -null for any #-connected mere proposition P .
Proof. “Only if” is trivial, so we prove the converse. By induction on n. The base case
n = −2 is trivial. Thus, suppose A is an (n + 1)-type that is P -null for every #-connected
proposition P . Then for any x, y : A, we have a commutative triangle
x=y

(P → (x = y)) (λ . x =P →A λ . y)
in which the bottom map is an equivalence by function extensionality, and the right-
hand diagonal map is an equivalence since it is the action on equalities of the equivalence
A ' (P → A). Thus, the left-hand diagonal map is also an equivalence, so (x = y) is also P -
null. By the inductive hypothesis, therefore, (x = y) is #-modal. Hence by Theorem 3.1(ix),
the map ηA : A → #A is an embedding; thus it suffices to show that it is surjective.
Now given z : #A, since ηA is an embedding, its fiber fibηA (z) is a mere proposition;
and it is #-connected since ηA is connected. Thus, by assumption A → (fibηA (z) → A) is an
equivalence. But we have pr1 : fibηA (z) → A, so there exists an x : A such that pr1 = λ . x,
i.e. for any y : A with η(y) = z we have y = x.
We claim that η(x) = z. This is a modal type, since it is an equality in #A. Thus, since
fibηA (z) is #-connected, when proving η(x) = z we may assume that fibηA (z), i.e. we have
y : A with η(y) = z. But then y = x as shown above, so that η(x) = z as well.
Thus, if an accessible lex modality is not topological, it must be generated by a family
including n-types for arbitrarily high n (or else at least one type that is not an n-type for
any finite n), and moreover its failure to be topological will only be visible to types that
are not n-types for any finite n. This means that it is rather hard to give examples of lex
modalities that are not topological.
Semantically, it is known that not all subtoposes of (∞, 1)-toposes are topological, so by
the results of Appendix A non-topological lex modalities do exist in some models. The basic
example is the hypercompletion. We do not know how to construct hypercompletion inside
type theory, but we can show that if it exists then it is lex, and not topological unless it is
trivial. We begin with definitions.
Definition 3.17. A type A or a function f : A → B is ∞-connected if it is n-connected
for all n.
Recall that if f is n-connected for fixed n, then kf kn is an equivalence, but the converse
may not hold. However, kf kn+1 being an equivalence is sufficient for f to be n-connected,
and so f is ∞-connected if and only if kf kn is an equivalence for all n. Similarly, a type
A is ∞-connected if and only if kAkn is contractible for all n. Note that since a map is
n-connected if and only if all its fibers are, a map is likewise ∞-connected if and only if all
its fibers are.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:51

Definition 3.18. A type Z is U-∞-truncated or U-hypercomplete if it is local with


respect to all ∞-connected maps in U, i.e. if (– ◦ f ) : (C → Z) → (B → Z) is an equivalence
whenever f : B → C is ∞-connected with B, C : U.
In general, it is not clear to what extent the notion of U-∞-truncatedness depends on
U. However, if Z is an n-type for some n < ∞, then (– ◦ f ) is equivalent to (– ◦ kf kn ),
which is an equivalence if f is ∞-connected. Thus, any n-type is ∞-truncated independent
of universe level. In particular, this implies:
Lemma 3.19. Given B, C : U and f : B → C, the following are equivalent.
(i) f is ∞-connected.
(ii) (− ◦ f ) : (C → Z) → (B → Z) is an equivalence for all U-∞-truncated Z : U.
(iii) (− ◦ f ) : (C → Z) → (B → Z) is an equivalence for all n-types Z : U.
Proof. We have (i)⇒(ii) by definition of “U-∞-truncated”, and (ii)⇒(iii) by the above
remarks. Now assuming (iii), the universal property of n-truncation tells us that
(– ◦ kf kn ) : (kCkn → Z) → (kBkn → Z)
is an equivalence for any n-type Z. By the Yoneda lemma, this implies that kf kn is an
equivalence for all n; hence f is ∞-connected.
The closure of ∞-connectedness under fibers also implies:
Lemma 3.20. A type Z is U-∞-truncated if and only if it is null with respect to all ∞-
connected types in U, i.e. if Z → (B → Z) is an equivalence whenever B : U is ∞-connected.
Proof. “Only if” is clear, so suppose the given condition holds and let f : A → B be
∞-connected with A, B : U. Then we have
P
(A → Z) ' ( (b:B) fibf (b)) → Z
Q
' (b:B) (fibf (b) → Z)
Q
' (b:B) Z
≡ (B → Z).
Now, we can certainly localize at all the ∞-connected maps in U to obtain a reflective
subuniverse of any larger universe U0 whose modal types are the U-∞-truncated ones.
However, hypercompletion should really be a modality on U itself whose modal types are
the U-∞-truncated ones. A local presentability argument in [Lur09, Prop. 6.5.2.8] shows
that in any Grothendieck ∞-topos there exists a small family that generates such a modality
by localization. But in type theory, the best we can do at present is show that if such a
modality exists, then it behaves as expected.
Theorem 3.21. Suppose # is a reflective subuniverse on U whose modal types are precisely
the U-∞-truncated ones. Then:
(i) # is a lex modality.
(ii) The #-connected maps are precisely the ∞-connected ones.
(iii) # is topological if and only if every type is #-modal, i.e. every type is U-∞-truncated,
i.e. “Whitehead’s principle” [Uni13, §8.6] holds for U.
If such a modality exists, we call it hypercompletion.
2:52 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Proof. The proof of Theorem 2.19 shows that the B-null types for any type family B are
Σ-closed, regardless of whether or not B is small. Thus, Lemma 3.20 shows that the
U-∞-truncated types are Σ-closed, hence # is a modality.
Next we prove (ii). By Lemma 3.19, any #-connected map is ∞-connected. Conversely,
if f : A → B is ∞-connected, then any fiber fibf (b) is also ∞-connected. Thus for any
#-modal type Z we have Z ' (fibf (b) → Z); hence fibf (b) is #-connected, and thus so is f .
This shows (ii). Now the lex-ness of # follows from the fact that ∞-connected maps
satisfy the 2-out-of-3 property, since f is ∞-connected if and only if each kf kn is an
equivalence, and equivalences satisfy the 2-out-of-3 property.
Finally, if # is topological, then there is a family B : A → Prop of mere propositions
that generates it. In particular, each B(a) must then be #-connected, and hence ∞-
connected. But a mere proposition is a (−1)-type, hence also ∞-truncated. Thus each B(a)
is contractible, so that every type is #-modal.
More generally, we have the following analogue of [Lur09, Proposition 6.5.2.16]:
Theorem 3.22. For a lex modality #, the following are equivalent:
(i) Every #-connected mere proposition is contractible.
(ii) Every #-connected map is ∞-connected.
(iii) Every U-∞-truncated type is #-modal.
In this case we say # is cotopological.
Proof. Using Lemma 3.19, we have (ii)⇔(iii). And an ∞-connected mere proposition is
contractible, so (ii)⇒(i). Conversely, assuming (i), by Theorem 3.16 every n-type is #-modal;
hence Lemma 3.19 yields (ii).
Remark 3.23. At the time this paper was written, we did not know any “small” condition
on a family B : A → U ensuring that the modality it generates is lex and such that every
lex modality can be generated by such a family. (Theorem 3.11(ii) is not “small” because
it refers to arbitrary families of modal types.) However, as we were preparing it for final
publication, [ABFJ19] found two such conditions:
(a) For all a : A and x, y : B(a) the type x = y is #-connected (a relative version of
Theorem 3.1(i)).
(b) For all a : A and x, y : B(a) there is an a0 : A with B(a0 ) ' (x = y).
Clearly (b) implies (a), while any B satisfying (a) can be enhanced to one satisfying (b)
by closing it up under path spaces. The nontrivial part is showing that (a) implies Theo-
rem 3.11(ii).
In particular, this characterization implies that if # is an accessible lex modality on
U, then its canonical accessible extension #0 to a larger universe U0 from Lemma 2.26 is
again lex, since whether a generating family satisfies (a)–(b) is independent of universe level.
Without such a characterization, we could only conclude this when # is topological.
Remark 3.24. The modal types for an accessible lex modality are closed under identity types
(by Lemma 1.25), Π-types (by Lemma 1.26), Σ-types (since it is a modality), and universes
(by Theorem 3.11). Thus, they are in their own right a model of the fragment of homotopy
type theory containing only these type operations (the internal language of a subtopos).
The modal types are not closed under other type formers like 0, A + B, the natural
numbers, and more general inductive and higher inductive types. However, if F is a
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:53

presentation of #, then we can construct a version of any higher inductive type H that
is #-modal and satisfies the induction principle with respect to other modal types, by
adding the second two constructors of LF to the given constructors of H, yielding a new
higher inductive type that is “F -local by definition”. (This is a sort of internal version of
the algebraic fibrant replacement used semantically in [LS19].) The fact that localization
modalities have judgmental computation rules ensures that these “local higher inductive
types” do too. Thus, the subtopos model inherits higher inductive types as well.
In principle, this sort of construction could reduce the problem of modeling homotopy
type theory with strict univalent universes in all (∞, 1)-toposes to the problem of modeling
it in presheaf (∞, 1)-toposes, since every (∞, 1)-topos is (by one definition) an accessible
left exact localization of a presheaf (∞, 1)-topos. However, in order for this to work we need
strict univalent universes that are strictly closed under the modality, and in general we do
not know how to ensure this semantically; see Remark A.29. A similar construction of a
subtopos model, but using a strict monad, can be found in [CMR17, Coq17].

3.2. Meets and joins of modalities. Let RSUU denote the type of reflective subuniverses
of a universe U, and similarly MdlU , LexU , and TopU the types of modalities, lex modalities,
and topological modalities, while AccRSUU , AccMdlU , and AccLexU consist of accessible ones.
Each of these is partially ordered by inclusion, i.e. # ≤ ♦ means that every #-modal type is
♦-modal, and we have full inclusions
TopU AccLexU AccMdlU AccRSUU

LexU MdlU RSUU .


The poset RSUU has both a bottom element (the zero modality, for which only 1 is modal)
and a top element (the trivial modality, for which all types are modal), which both happen
to lie in TopU and hence all of these other posets. It is natural to wonder whether these
posets have other lattice structure. We do not have a complete answer, but there are some
things we can say.
Theorem 3.25. Suppose given any family #i of reflective subuniverses.
(i) If there is a reflective subuniverse ♦ such V that a type is ♦-modal if and only if it
is #i -modal for all i, then ♦ is the meet i #i in RSUU . Moreover, if each #i is a
modality, then so is ♦, and it is also the meet in MdlU .
(ii) If each #i is a modality, and there is a modality ♦ such thatW a type is ♦-connected if
and only if it is #i -connected for all i, then ♦ is the join i #i in MdlU .
(iii) If there is a reflective subuniverse ♦ such that for any function f : A → B, we have
) is an equivalence if and only if #i (f ) is an equivalence for all i, then ♦ is
that ♦(f W
the join i #i in RSUU .
Proof. The first part of statement (i) follows from the fact that the ordering on reflective
subuniverses is determined by inclusion of the universes of modal types. The second follows
since Σ-closure of such universes is inherited by intersections.
The other two statements are instances of a general fact about Galois connections.
Suppose G : B op  A : H is a contravariant adjunction between posets, i.e. G and H are
2:54 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

contravariant functors and b ≤ Ga ⇐⇒ a ≤ Hb. Then (G, H) restricts to a contravariant


isomorphism between the posets of fixed points AGH and B HG for the monads GH and HG.
op
Moreover, any meets in B are inherited by B HG , hence also by (AGH ) , i.e. are joins in
AGH .
In the simpler case of (ii), let A and B both be the set U → Prop of subtypes of the
universe, let G(E) be the set of types A such that A → (B → A) is an equivalence for
all B ∈ E, and likewise let H(M) be the set of types B such that A → (B → A) is an
equivalence for all A ∈ M. Then by Corollaries 1.37 and 1.51, the #-modal types for any
modality are a fixed point of GH, and the #-connected types are the corresponding fixed
point of HG. Not every such fixed point is a modality, but it does follow that if a meet in
AHG , i.e. an intersection of the universes of #i -connected types, is the ♦-connected types
for some modality ♦, then it is a join in the dual poset of modalities. Q
Case (iii) is similar, using the same A but taking B to be the set (X,Y :U) (X → Y ) →
Prop of subtypes of the type of all functions in the universe, letting G(E) be the set of types
X such that (– ◦ f ) : (B → X) → (A → X) is an equivalence for all f : A → B in E, and
dually H(M) the set of functions f : A → B such that (– ◦ f ) : (B → X) → (A → X) is an
equivalence for all X ∈ M. Then the #-modal types for any reflective subuniverse are a fixed
point of GH, since the universal property of # tells us that (– ◦ f ) : (B → X) → (A → X)
is an equivalence for all modal X if and only if #f is an equivalence, and Lemma 1.23 tells
us that we can detect modal types by mapping out of such functions. The same argument
then applies to the dual classes of #-inverted functions.
When the conditions of Theorem 3.25(i) hold, we say that ♦ is the canonical meet of
the #i ’s, and dually in cases (ii) and (iii) we say that ♦ is their canonical join. We have
no reason to believe that all meets and joins in RSUU and MdlU are canonical, but we do
not know of any that are not.
Example 3.26. If P and Q are two propositions, we claim that OpP ×Q is the canonical meet
of OpP and OpQ . To prove this, note that (P × Q → X) ' (P → (Q → X)), and we have a
commutative square
X P →X

Q→X P → (Q → X).
If X is OpP -modal, then the top function is an equivalence, and if X is OpQ -modal, then
the left-hand function is an equivalence, hence so is the right-hand one. Thus, in this
case the diagonal is also an equivalence, so X is OpP ×Q -modal. Conversely, since the unit
X → (P × Q → X) factors through P → X and Q → X, if it has a retraction then so do
they; thus if X is OpP ×Q -modal it is both OpP -modal and OpQ -modal. In other words, the
operation Op : PropU → LexU preserves finite meets (it obviously preserves the top element).
Example 3.27. Suppose P : A → PropU is a family of propositions indexed by a type A : U,
P
and let Q :≡ (a:A) P (a) . Then Q is the join (i.e. disjunction) of all the P (a)’s in PropU .
Now recall from Example 1.8 that a type X is ClQ -modal if and only if Q → isContr(X),
and note that Q
(Q → isContr(X)) ' (a:A) (P (a) → isContr(X)).
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:55

Thus, X is ClQ -modal if and only if it is ClP (a) -modal for all a : A, and hence ClQ is the
canonical meet of the ClP (a) ’s.
We saw in Example 1.31 that the same condition Q → isContr(X) also characterizes the
OpQ -connected types; thus OpQ is the canonical join of the OpP (a) ’s. In other words, the
operation Op : PropU → LexU preserves joins (indexed by types in U).
Example
W 3.28. The hypercompletion modality from Theorem 3.21, if it exists, is the canonical
join n Trn of all the n-truncation modalities Trn .
We can construct meets in a fair amount of generality:
Theorem 3.29. Any family (#i )i:I of accessible reflective subuniverses (indexed by a type
I in U) has a canonical meet, which is again accessible, and is a modality or topological if
each #i is.
Proof. By a “family of accessible
Q Qreflective subuniverses” we mean that we have a family
of generating families F : (i:I) (a:Ai ) Bi (a) → Ci (a). Uncurrying F , we obtain a family
Q P
F : ((i,a):P Bi (a) → Ci (a) indexed by A :≡ (i:I) Ai , such that a type is F -local
(i:I) Ai )
if and only if it is Fi -local for all i. Thus, LF is the canonical meet. In the topological
case we can take the Fi to be topological generators with each Ci (a) = 1 and each Bi (a) a
proposition, so that F is also a topological generator.
Thus, the posets TopU , AccMdlU , and AccRSUU have meets indexed by any type in U.
Using the result of [ABFJ19], as in Remark 3.23, we can show that AccLexU likewise has
canonical meets.
However, these posets are not “complete lattices” as usually understood, since in general
they are themselves large (i.e. not types in U), so we cannot use the usual argument to
construct arbitrary joins from arbitrary meets.
There are also some cases in which we can identify the modal operator of a meet more
explicitly:
Theorem 3.30. Let # and ♦ be reflective subuniverses, and assume that # preserves ♦-
modal types. Then # and ♦ have a canonical meet in RSUU , which is a modality, accessible,
lex, or topological if # and ♦ are.
Proof. If Y is both #-modal and ♦-modal, for any X we have
(X → Y ) ' (♦X → Y ) ' (#♦X → Y )
and #♦X is both #-modal and ♦-modal. Thus, the composite # ◦ ♦ : U → U is the
modal operator for a canonical meet of # and ♦. Preservation of modalities follows from
Theorem 3.25, preservation of accessibility and topologicality follows from Theorem 3.29
(using the different construction given there), while if # and ♦ are both lex then so is their
composite # ◦ ♦.
Example 3.31. By Corollary 3.9, if # is lex then it preserves n-types. Thus the composite
# ◦ Trn is the meet # ∧ Trn of # and the n-truncation modality Trn .
Example 3.32. If every ♦-modal type is #-connected, then # preserves ♦-modal types since
it takes them all to 1. Thus, the composite #♦, which is the bottom element of RSUU , is
also the meet # ∧ ♦. In this case we say that # is strongly disjoint from ♦ (note that
this is an asymmetric relation). We will study this case further in §3.4.
2:56 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Example 3.33. One special case in which Theorem 3.30 applies is if #♦ ' ♦#, since in
that case for ♦-modal X we have #X ' #♦X ' ♦#X, so that #X is also ♦-modal. For
instance, Example 3.26 is an instance of this, since (P → (Q → X)) ' (Q → (P → X)). So
is the binary case of Example 3.27, since join is associative and commutative: P ∗ (Q ∗ X) '
(P ∗ Q) ∗ X ' (Q ∗ P ) ∗ X ' Q ∗ (P ∗ X).

3.3. Lawvere-Tierney operators. For any modality ♦, the slice poset RSUU /♦ consists
of the reflective subuniverses contained in U♦ . In other words, we have
RSUU /♦ ' RSUU♦ .
Composing this with the universal property of meets, we obtain a partial adjunction
– ∧♦

RSUU > RSUU /♦ RSUU♦

in which the right adjoint – ∧ ♦ is only known to be defined under the restrictions in
Theorem 3.29.
One situation in which this is automatic is when ♦ is Tr−1 , since every reflective
subuniverse preserves mere propositions. Thus we have a totally defined adjunction
– ∧Tr−1

RSUU > RSUU /Tr−1 RSUProp . (3.34)

A reflective subuniverse of Prop, or more generally any universe Ω of mere propositions,


is known as a Lawvere-Tierney operator or local operator. It can equivalently be
defined as a map j : Ω → Ω which is idempotent and preserves finite meets (including the
top element):
j(>) = > j(j(P )) = j(P ) j(P ∧ Q) = j(P ) ∧ j(Q).
This is equivalent to j being order-preserving, inflationary, and idempotent:
(P → Q) ⇒ (j(P ) → j(Q)) P → j(P ) j(j(P )) = j(P )
and also to its being a monad on the poset Ω.
In particular, such a monad automatically preserves meets, for the same reason that
any modality preserves products; but since Ω is a poset, this makes it automatically left
exact. Moreover, we have:
Lemma 3.35. Every reflective subuniverse of a universe Ω of mere propositions is a lex
modality.
Proof. If P = j(PP ) and Q : P → Ω is such that Q(x)P = j(Q(x)) for any x : P , then the
projection pr1 : ( (x:P ) Q(x)) → P induces a map j( (x:P ) Q(x)) → j(P ) = P . But as
P P
soon as we have p : P then ( (x:P ) Q(x)) ' Q(p) and so j( (x:P ) Q(x)) → j(Q(p)) = Q(p),
P P
hence j( (x:P ) Q(x)) → ( (x:P ) Q(x)). Thus it is Σ-closed, hence a modality, and hence
(as observed above) a lex modality.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:57

In other words, when Ω is a universe of mere propositions, we have


RSUΩ = MdlΩ = LexΩ .
In general, the equivalence RSUU /♦ ' RSUU♦ preserves Σ-closedness, since it preserves
the modal types. Thus the reflective subuniverse on U corresponding to a Lawvere-Tierney
operator j, which is defined by A 7→ jkAk, is always a modality. However, it is not lex; in
particular, Tr−1 itself is not lex.
A somewhat similar situation is when we have two universes U : U0 . Let RSUU0 /U be the
poset of pairs of reflective subuniverses #0 and # on the universes U0 and U, respectively,
such that a type in U is #-modal if and only if it is #0 -modal, and moreover for any X : U
the induced map #0 X → #X is an equivalence. There is an evident restriction functor
RSUU0 /U → RSUU , and similarly for the other posets.
Theorem 3.36. The following functors have fully faithful right adjoints:
AccRSUU0 /U → AccRSUU AccMdlU0 /U → AccMdlU TopU0 /U → TopU
Proof. Given an accessible reflective subuniverse # on U, we define #0 to be its canonical
accessible extension to U0 . As shown in Lemma 2.26, this is a modality or topological if #
is, and it restricts to # on U, so that (#0 , #) : AccRSUU0 /U .
We also need to show that this operation is functorial on RSUU . If #1 ≤ #2 , so that
every #1 -modal type is #2 -modal, then the functor #1 factors through the functor #2 , so
that if #2 f is an equivalence then so is #1 f . Therefore, by Lemma 2.26(iv) every #01 -modal
type is #02 -modal.
The restriction of (#0 , #) to U is certainly #, so to have an adjunction it remains to show
that for any (#0 , #) : RSUU0 /U , the reflective subuniverse #0 is contained in the canonical
accessible extension of # to U0 . But since #0 restricts to # on U, it also inverts every map
in U inverted by #, so this follows from Lemma 2.26(iv).
Using the result of [ABFJ19], we can construct a similar adjoint to AccLexU0 /U →
AccLexU as in Remark 3.23.
In general, we also do not know how to do without accessibility; the obvious thing to do
is localize U0 at the class of all maps in U inverted by #, but as noted in Remark 2.30 there
seems no reason why the resulting #0 would agree with # on U. However, there is one case
in which this does work.
Theorem 3.37. If propositional resizing holds for U, so that there is a universe Ω of mere
propositions such that Ω : U and every mere proposition in U is equivalent to one in Ω, then
the restriction functor
RSUU → RSUΩ (3.38)
has a right adjoint Sh, which lands inside TopU/Ω and induces an equivalence
TopU ' RSUΩ .
Proof. The restriction functor is defined on all of RSUU since any modal operator preserves
mere propositions. Now given a reflective subuniverse of Ω, i.e. a Lawvere-Tierney operator
j : Ω → Ω, we define Shj to be the nullification of U at all j-connected propositions (which
are also called j-dense). Because any modality preserves mere propositions, if P : Ω then
Shj (P ) is again a mere proposition, hence equivalent to some type in Ω. Thus the universal
2:58 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

properties of j and Shj do coincide for mapping into types in Ω, so that j(P ) ' Shj (P ).
The rest of Lemma 2.26 and Theorem 3.36 goes through without difficulty.
Of course Shj is topological by definition. Moreover, if # is any topological modality on
U, its generating family is equivalent to one lying in Ω, hence contained in the family of all
j# -dense propositions (where j# is the restriction of # to Ω). Thus # = Shj# , giving the
stated equivalence.
Note that the left adjoint (3.38) coincides with the right adjoint in (3.34). That is,
assuming propositional resizing, the forgetful operation RSUU → RSUΩ has both adjoints:
its left adjoint sends j to j ◦ k–k−1 , while its right adjoint is Shj . The Shj -modal types
are also called j-sheaves, with Shj being j-sheafification. (We remarked above that the
j-connected propositions are called j-dense; the j-modal propositions are called j-closed.)
Example 3.39. For a proposition P , the open Lawvere-Tierney operator is defined by
oP (Q) = P ⇒ Q. This is the restriction to Ω of the open modality OpP , which is topological;
hence ShoP = OpP .
Example 3.40. For a proposition P , the closed Lawvere-Tierney operator is defined by
cP (Q) = P ∨ Q. Since P ∨ Q is equivalently the join P ∗ Q (see [Rij17, Lemma 2.4]), this is
the restriction to Ω of the closed modality ClP , which is topological; hence ShcP = ClP .
Example 3.41. If j = ¬¬ is the double negation operator, then by the usual arguments, the
lattice of ¬¬-closed elements of Ω is a Boolean algebra. Thus, the logic of the subtopos
determined by Sh¬¬ is Boolean. The Sh¬¬ -modal types are called double-negation
sheaves.
For a general reflective subuniverse #, the sheafification modality Shj# is far from
equivalent to #. We showed in Theorem 3.37 that this is the case if # is topological. In
classical 1-topos theory every lex modality is topological; in higher topos theory this is not
the case, and # can disagree with Shj# even when # is lex, but at least we can say the
following.
Theorem 3.42. Assuming propositional resizing, the map Shj# A → #A is an equivalence
whenever A is an n-type with n < ∞.
Proof. By Theorem 3.16, A is #-modal if and only if it is P -null for any #-connected mere
proposition P . But the latter condition exactly characterizes the Shj# -modal types.
At the other extreme, if # is cotopological, then Shj# is the trivial modality. For a
general lex #, the restriction of # to Shj# is cotopological, in the sense that any #-connected
Shj# -modal mere proposition is contractible. That is, any lex modality “decomposes” into a
topological part and a cotopological part, as in [Lur09, Proposition 6.5.2.19].
Theorem 3.37 also supplies additional structure on TopU ; the following proof is that
of [Wil94], as reproduced in [Joh02, C1.1.15].
Corollary 3.43. Assuming propositional resizing, TopU is a coframe, i.e. a complete lattice
in which finite joins distribute over arbitrary meets.
Proof. Since TopU has canonical meets, the corresponding meets in RSUΩ are also canonical,
i.e. given by taking intersections of the sets of j-closed propositions. On the other hand,
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:59

the ordering on modalities in Ω is the reverse of the pointwise ordering on Lawvere-Tierney


operators j : Ω → Ω, and any pointwise meet of Lawvere-Tierney operators is again a
Lawvere-Tierney operator. V
Now suppose j and (ki )i:I are Lawvere-Tierney operators, and suppose P is a i (j ∨ ki )-
closed proposition This means that P is (j ∨ ki )-closed for each i, so that we have P =
j(P ) ∧ ki (P ). Now
(j(P ) → P ) = (j(P ) → j(P ) ∧ ki (P )) = (j(P ) → ki (P )).
V
Hence j(P ) → P is ki -closed for every
V i, so it is i ki -closed. Taking Q :≡ j(P ) and
R :≡ (j(P ) → P ), and writing k :≡ i ki , we have
(j ∨ k)(Q ∧ R) = j(Q ∧ R) ∧ k(Q ∧ R) = j(Q) ∧ j(R) ∧ k(Q) ∧ k(R)
= Q ∧ k(Q) ∧ R ∧ j(R) = Q ∧ R
V
so that Q ∧ R is (j ∨ i ki )-closed. But Q ∧ R = (j(P ) ∧ (j(P ) → P )) = P .
However, there seems no particular reason for the inclusions TopU → LexU or TopU →
MdlU to preserve joins, and joins in LexU and MdlU in general seem difficult to construct.
In the next section we will consider one situation in which such joins can be constructed
explicitly.

3.4. A fracture and gluing theorem. We end the paper by proving a general “fracture
and gluing” theorem for a pair of modalities (Corollary 3.52), which has as a special case
the “Artin gluing” of a complementary closed and open subtopos.
Definition 3.44. Let # and ♦ be two modalities on a universe U. A (♦, #)-fracture
square consists of the following.
• An arbitrary type A : U.
• A #-modal type B : U# .
• A ♦-modal type C : U♦ .
• Functions f : A → B and l : A → C and g : C → ♦B.
• A commutative square
f
A B
l η♦
B

C g ♦B.
For any type A, the canonical fracture square associated to A is the naturality square
for η ♦ at η #
A:
η#
A
A #A
η♦
A η♦
#A
(3.45)
♦A ♦#A.
♦η #
A

Given an arbitrary fracture square, we say it is canonical if it is equal to a canonical one


in the type of fracture squares.
2:60 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Lemma 3.46. A fracture square is canonical if and only if f is #-connected and l is


♦-connected.
Proof. “Only if” is clear, so suppose f is #-connected and l is ♦-connected. Then by
Lemma 1.17, we have (B, f ) = (#A, η # ♦
A ) and (C, l) = (♦A, η A ). And modulo these equiv-
alences, g and the commutative square are a factorization of η ♦#A ◦ η # ♦
A through η A , hence
inhabit a contractible type of which (3.45) is another element.
Theorem 3.47. If ♦ is lex, then the canonical fracture square associated to A is a pullback
square if and only if η #
A is ♦-modal.

Proof. The maps η ♦A and η ♦#A are always ♦-connected, while ♦η #A is a map between ♦-
modal types and hence ♦-modal. Thus, if η # A is ♦-modal then the square is a pullback
#
by Theorem 3.1(vii). Conversely, if the square is a pullback then η A is a pullback of the
♦-modal map ♦η #
A and hence ♦-modal.

Corollary 3.48. If ♦ is lex and every #-connected type is ♦-modal, then every canonical
fracture square is a pullback.
Proof. The map η #
A is always #-connected, so the hypothesis ensures it is ♦-modal.

Recall from Example 3.32 that we say # is strongly disjoint from ♦ if every ♦-modal
type is #-connected.
Theorem 3.49. If # is strongly disjoint from ♦, then every fracture square that is a pullback
is canonical.
Proof. If a fracture square is a pullback, then l must be ♦-connected since it is a pullback of
η ♦#A , and similarly f must be ♦-modal since it is a pullback of g. The assumption therefore
ensures that f is #-connected, so that Lemma 3.46 applies.
Putting together Theorems 3.47 and 3.49 we can construct certain joins of modalities.
Theorem 3.50. If ♦ is a lex modality and # is a modality is strongly disjoint from ♦, then
the canonical join # ∨ ♦ exists in RSUU . Moreover, the following are equivalent:
(i) A is (# ∨ ♦)-modal.
(ii) η #
A : A → #A is ♦-modal.
(iii) The canonical fracture square of A is a pullback.
And we have an equivalence of universes
P P
U#∨♦ ' (B:U# ) (C:U♦ ) (C → ♦B). (3.51)
Finally, if # is also lex, then # ∨ ♦ is a lex modality, and hence is the join in LexU .
Proof. The equivalence (ii)⇔(iii) is by Theorem 3.47, so we must show that such types
form a reflective subuniverse. Given A : U, we define (# ∨ ♦)(A) to be the pullback of its
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:61

canonical fracture square:


η#
A
A
η #∨♦
A

(# ∨ ♦)(A) #A
η♦ y η♦
A #A

♦A ♦#A.
♦η #
A

By Theorem 3.49 this pullback square is a canonical fracture square, and thus (# ∨ ♦)(A)
satisfies (ii) and (iii). Now suppose we have some other B satisfying (ii) and (iii), hence a
canonical fracture square that is a pullback:
B #B
y
η♦
#B

♦B ♦#B.
♦η #
B

Then we have equivalences


(A → B) ' (A → #B) ×(A→♦#B) (A → ♦B)
' (#A → #B) ×(♦A→♦#B) (♦A → ♦B)
in which the final pullback is of the two maps
(♦η #
B ◦ –) : (♦A → ♦B) → (♦A → ♦#B)
(λh. ♦h ◦ ♦η #
A ) : (#A → #B) → (♦A → ♦#B).
However, since the canonical fracture square of A is also the canonical fracture square of
(# ∨ ♦)(A), we also have
((# ∨ ♦)(A) → B) ' (#A → #B) ×(♦A→♦#B) (♦A → ♦B)
and hence
(A → B) ' ((# ∨ ♦)(A) → B)
giving the desired universal property.
To see that # ∨ ♦ is the canonical join of # and ♦, first note that if A is #-modal, then
η#A and hence ♦η #
A are equivalences, so that its canonical fracture square is a pullback and
so A is (# ∨ ♦)-modal. On the other hand, if A is ♦-modal, then η ♦A is an equivalence, while
(since ♦ is strongly disjoint from #) #A and hence ♦#A are contractible; thus the canonical
fracture square is again a pullback and so A is (# ∨ ♦)-modal. That is, any #-modal or
♦-modal type is (# ∨ ♦)-modal, and hence any (# ∨ ♦)-connected type is #-connected
and ♦-connected. On the other hand, if A is both #-connected and ♦-connected, then
(# ∨ ♦)(A) is a pullback of a square of contractible types, hence contractible, so A is also
(# ∨ ♦)-connected.
As for (3.51), the left-to-right map sends A to the bottom morphism in its canonical
fracture square; while the right-to-left map sends (B, C, g) to the pullback of g and η ♦B ,
i.e. the vertex of the pullback fracture square with g on the bottom. The two round-trip
2:62 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

composites are the identity because a fracture square with (# ∨ ♦)-modal vertex is a pullback
if and only if it is canonical.
Finally, suppose # is also lex. To show that # ∨ ♦ is a lex modality, by Theorem 3.8 it
suffices to show that # ∨ ♦ preserves pullbacks. However, this follows from its construction
as the pullback of the canonical fracture square, since ♦ and # preserve pullbacks, and
pullbacks commute with pullbacks. In somewhat more detail, given a cospan B → C ← D,
we have a 3 × 3-diagram
#B #C #D #(B ×C D)

♦#B ♦#C ♦#D ♦#(B ×C D)

♦B ♦C ♦D ♦(B ×C D)

(# ∨ ♦)(B) (# ∨ ♦)(C) (# ∨ ♦)(D)


in which the limit of the rows gives the canonical fracture cospan for B ×C D, whose pullback
is (# ∨ ♦)(B ×C D), whereas the limit of the columns gives # ∨ ♦ of the given cospan. Thus,
these two pullbacks agree, so # ∨ ♦ preserves pullbacks, and hence is a lex modality.
Corollary 3.52. If ♦ is a lex modality, and # a modality such that the ♦-modal types
coincide with the #-connected types, then ♦ ∨ # is the top element of LexU (the trivial
modality), and every canonical fracture square is a pullback. Moreover, we have an induced
equivalence P P
U ' (B:U# ) (C:U♦ ) (C → ♦B). (3.53)
Proof. The additional assumption that #-connected types are ♦-modal means that a (# ∨ ♦)-
connected type must be both ♦-modal and ♦-connected, hence contractible. Thus, every
type is (# ∨ ♦)-modal, i.e. (# ∨ ♦) is the maximal modality. The equivalence (3.53) is just a
specialization of (3.51).
Remark 3.54. We call Corollary 3.52 a “fracture theorem” because it appears formally
analogous to the fracture theorems for localization and completion at primes in classical
homotopy theory [MP12], or more generally for localization at complementary generalized
homology theories [Bau11]. However, we do not know a precise relationship, because the
classical fracture theorems either apply only to spectra (which do not form an ∞-topos) or
to spaces with restrictions (such as nilpotence), and moreover the localizations appearing
therein are not generally left exact (though they do often have some limit-preservation
properties).
The equivalence (3.53) says informally that the universe of all types is equivalent to
the “comma category” or “gluing” of the #-modal types with the ♦-modal types along the
functor ♦ : U# → U♦ , as in the “Artin gluing” construction for toposes. The paradigmatic
example is the following.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:63

Example 3.55. Let Q be a mere proposition. We have seen that both open and closed
modalities OpQ and ClQ are lex, and in Example 1.31 we noted that the OpQ -connected
types coincide with the ClQ -modal ones. Thus, these modalities satisfy the hypotheses of
Corollary 3.52. In particular, for any type A we have a pullback square
A Q→A
(3.56)
Q∗A Q ∗ (Q → A).
To understand this better internally, suppose Q is decidable, i.e. we have Q + ¬Q. Then we
claim that Q ∗ A ' ¬Q → A. For if Q, then both are contractible, while if ¬Q, then both
are equivalent to A. In particular, when Q is decidable, (Q ∗ (Q → A)) ' (¬Q ∧ Q → A)
and hence is contractible; so our above pullback square becomes
A Q→A

¬Q → A 1.
This is just the equivalence
A ' ((Q + ¬Q) → A) ' (Q → A) × (¬Q → A)
that allows us to do case analysis on Q to construct an element of any type A.
Thus, the fracture square (3.56) can be viewed as a sort of “constructive case analysis”:
even if Q is not decidable, we can construct an element of any type A by constructing
an element of A assuming Q, then constructing an element of Q ∗ A (a sort of “positive
replacement” for ¬Q → A), then checking that they agree in Q ∗ (Q → A). If A is also a
mere proposition, then Q ∗ A = Q ∨ A, so this reduces to the intuitionistic tautology
A ↔ (Q ∨ A) ∧ (Q → A).
It is unclear to us whether the more general version has any applications.

4. Conclusion and outlook


The theory of lex and topological modalities can be viewed as a contribution to the program
of giving an elementary (first order) definition of an ∞-topos as a purported model of
homotopy type theory. Specifically, lex and topological modalities are a higher-categorical
analogue of the standard theory of Lawvere-Tierney operators in 1-topos theory, which are
the usual way to internalize the notion of subtopos. We thus expect that lex and topological
modalities on universe objects will play a similar role in the theory of elementary ∞-toposes.
As mentioned in §3.4, our fracture theorem can be viewed as an internal perspective on
the gluing of higher toposes; an external perspective on gluing can be found in [Shu15b].
We hope and expect that other topos-theoretic constructions, such as realizability, can also
be extended to homotopy type theory.
The analogues of non-lex modalities and reflective subuniverses are not well-studied in
1-topos theory, perhaps because in the absence of a universe they cannot be internalized:
as we have seen, any modality on a subobject classifier Ω is automatically lex. However,
2:64 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

the reflector into the quasitopos of separated objects for a Lawvere-Tierney topology is an
external analogue of a non-lex modality in our sense. Notions of “∞-quasitopos” relative to
a factorization system are studied in [GK17]; we expect there to be an internal analogue of
this theory using modalities.
Localizations are, however, much better-studied in classical homotopy theory. Modern
calculational homotopy theory very often works in subuniverses that are localized at a prime
number or a cohomology theory. We therefore expect the theory of modalities and reflective
subuniverses to be useful in extending such results to the synthetic setting of homotopy type
theory, and thereby internalizing them in higher toposes. Moreover, the homotopy-type-
theoretic notion of modality has already proven fruitful in higher topos theory: in addition
to the theory of (∞, 1)-quasitoposes in [GK17], a reworking of the synthetic Blakers–Massey
theorem [FFLL16] using general modalities in place of n-truncations has led to a new
topos-theoretic generalization in [ABFJ17], with applications to Goodwillie calculus.

Acknowledgments. This work was initiated when we were at the Institute for Advanced
Study for the special year on Univalent Foundations. We are thankful for the pleasant and
active atmosphere during that year.

Appendix A. Semantics
We now sketch something of how our syntactic description of modalities corresponds to
semantic structures in higher category theory. In the rest of the paper we used type universes,
and some of our results require a universe; however strict universes are difficult to produce
in categorical semantics, so for maximum generality here we consider modalities without
universes. Also, we will not concern ourselves with initiality theorems for syntax, instead
working at the level of comprehension categories and their corresponding model categories.
Finally, in the interests of conciseness we will be sketchy about coherence theorems, although
we expect that the methods of [LW15] will apply.

A.1. Judgmental modalities. To avoid universes, in this appendix we will work with
“judgmentally specified” modalities. A judgmental modality acts on all types, not just those
belonging to some universe, and makes sense even if there are no universes. If our type
theory does have universes, then to obtain a judgmental modality in this sense we need
a consistent “polymorphic” family of modalities, one on each universe (or at least on all
large enough universes). But we have seen that practically any modality can be defined
polymorphically, particularly those obtained by localization and nullification, so there is
little loss of generality.
Figure 2 shows the judgmental rules for a reflective subuniverse, Figure 3 augments
it to a modality (a Σ-closed reflective subuniverse), and Figure 4 to a lex modality (using
Theorem 3.1(ii)), while Figure 5 asserts that it is generated by a given family of maps.
Note that we have included an explicit rule that the predicate isModal is invariant under
equivalence; this is automatic if we have a univalent universe, but in general we should
assert it explicitly. Similar “univalence-reductions” must be made in various other places
in the paper to work with judgmental modalities, manually replacing equalities between
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:65

Γ ` A type Γ ` A type Γ ` A type


Γ ` isModal(A) type Γ` : isprop(isModal(A)) Γ ` #A type

Γ ` A type Γ ` A type Γ`a:A


Γ` : isModal(#A) Γ ` ηA (a) : #A

Γ ` A type Γ ` B type Γ` : isModal(B)


Γ` : isequiv(λ(f : #A → B). f ◦ ηA )

Γ ` A type Γ ` B type Γ`f :A'B Γ` : isModal(A)


Γ` : isModal(B)

Figure 2. A judgmental reflective subuniverse

Γ ` A type Γ, a : A ` B type
Γ` : isModal(A) Γ, a : A ` : isModal(B)
P
Γ` : isModal( (a:A) B)

Figure 3. Judgmental Σ-closedness

Γ ` A type P
Γ, x : A ` B type Γ` : iscontr(#A) Γ` : iscontr(#( (x:A) B)) Γ`a:A
Γ` : iscontr(#B)

Figure 4. Judgmental lexness

(For some fixed a : A ` F (a) : B → C)

Γ ` X type
Q
Γ` : isModal(X) ' (a:A) isequiv(λ(g : C(a) → X). g ◦ F (a))

Figure 5. Judgmental generation

types by equivalences. The only truly unavoidable use of univalence is in Theorem 3.11
and Corollary 3.12.
The corresponding definitions for comprehension categories are the following. We state
them in the “weak stability” style of [LW15] so that the “local universes” coherence method
can be applied, although we will not write out the details of the coherence theorems. We also
2:66 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

simplify the definitions somewhat because we don’t care about the identity of inhabitants of
mere propositions, so we assume that any such inhabitant is “good”, hence automatically
weakly stable.
Definition A.1. A comprehension category (C, T ) with weakly stable Π-types and identity
types is equipped with a weakly stable reflective subuniverse if it has:
• For any A ∈ T (Γ) a family of “good” mere propositions isModal(A) ∈ T (Γ), weakly stable
in that the reindexing of any such is another such.
• For any A ∈ T (Γ) a family of “good” reflections consisting of a type #A ∈ T (Γ) and
a unit ηA : Γ.A → Γ.#A over Γ, weakly stable under reindexing, such that every good
isModal(#A) over Γ has a section.
• For any A, B ∈ T (Γ), any section of a good isModal(#B) Q over Γ, any
Q good reflection
(#A, ηA , ) of A, and any good (non-dependent) Π-types (A) B and (#A) B, the map
Q Q
Γ.( (#A) B) → Γ.( (A) B) induced by ηA is an equivalence over Γ.
This is a weakly stable modality if additionally:
• For any A ∈ T (Γ) and B ∈ T (Γ.A), every good isModal(A) with aP section over Γ, and
every good isModal(B) with a section over Γ.A, every good isModal( AB) has a section
over Γ.
It is a weakly stable lex modality if furthermore:
P
• For any A ∈ T (Γ) and B ∈ T (Γ.A), and good reflections #A, #B, and #( (A) B) such
P
that #A and #( (A) B) are contractible over Γ, we have that #B is contractible over
Γ.A.
Finally, if we have A ∈ T () and B, C ∈ T (.A), where  is the terminal object of C,
and F : .A.B → .A.C over .A, we say that a weakly stable reflective subuniverse is
generated by F if
• for any X ∈ T (Γ), every good isModal(X) ∈ T (Γ) is equivalent over Γ to
Q
(a:A) isequiv(λ(g : C(a) → X). g ◦ F (a)).

It is straightforward to see that the syntactic category of a type theory satisfying some or
all of the rules in Figures 3 to 5 has the corresponding weakly stable (indeed, strictly stable)
structure. A suitable initiality theorem would imply (together with the local universes
coherence theorem to strictify weakly stable structure) that such a type theory can then be
interpreted into any model with weakly stable structure.
In the remaining sections of this appendix we will show that the above weakly stable
structures correspond to well-known ∞-category-theoretic notions. However, it is worth
noting first of all one important example that doesn’t require any ∞-categorical machinery.
Example A.2. A “type-theoretic fibration category” in the sense of [Shu15b] is a particular
sort of presentation of a comprehension category. It is shown in [Shu15b] (see also [Shu17])
that if F : C → D is a “strong fibration functor” between type-theoretic fibration categories,
then the “fibrant gluing category” (D ↓ F )f is again a type-theoretic fibration category.
The objects of (D ↓ F )f consist of an object Γ0 ∈ C and a display map F (Γ0 ).Γ1 → F (Γ0 )
in D, while its types in such a context are pairs of a type A0 ∈ TC (Γ0 ) and a type
A1 ∈ TD (F (Γ0 ).Γ1 .F (A0 )).
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:67

We claim there are two canonical lex modalities on (D ↓ F )f , representing the canonical
open and closed subtoposes of a glued topos. The “gluing proposition” Q in the empty
context (, ) has Q0 = 1 and Q1 = 0. Since (D ↓ F )f inherits type-theoretic strurcture,
including Π-types, we can use the internal construction of the open modality OpQ as
OpQ (A) = (Q → A). Note that this automatically restricts to any universe.
The second lex modality is supposed to be the closed one ClQ . If we knew that
(D ↓ F )f had higher inductive pushouts, then we could use the internal definition of ClQ
as ClQ (A) = Q ∗ A. However, with the concrete construction ofP(D ↓ F )f we also have a
concrete construction of ClQ , which takes a type (A0 , A1 ) to (1, (F A0 ) A1 ). This has the
advantage that it manifestly restricts to any universe in (D ↓ F )f determined by universes
U0 in C and U1 in D such that F takes U0 -small types to U1 -small ones.

A.2. Modalities in model categories. Let M be a type-theoretic model category in the


sense of [Shu15b]: right proper, with cofibrations closed under limits, and with right adjoints
f∗ to pullback along fibrations. Then there is a comprehension category (Mf , Ff ), in which
Mf is the category of fibrant objects in M and Ff is the category of fibrations with fibrant
codomain, and which has sufficient (weakly stable) structure to model type theory with Σ,
Π, and identity types. (If M is sufficiently nice, then it also models various higher inductive
types, including localizations; see [LS19] and Appendix A.4.)
Let hM be the homotopy (∞, 1)-category of M. Then the slice model categories M/Γ
present the slice (∞, 1)-categories hM/Γ . Moreover, for any fibration f , the adjunction
f ∗ a f∗ is a Quillen adjunction, hence descends to homotopy categories; this shows that hM
is locally cartesian closed.
Definition A.3. A reflective subfibration of an (∞, 1)-category C with finite limits
consists of:
(i) For every object x ∈ C, a reflective full sub-(∞, 1)-category Dx of the slice C/x , with
reflector #x .
(ii) Each pullback functor f ∗ : C/y → C/x restricts to a functor Dy → Dx .
(iii) For any z ∈ C/y , the induced map #x (f ∗ z) → f ∗ (#y z) is an equivalence.
Theorem A.4. If M is a type-theoretic model category equipped with a reflective subfibration
of hM, then (Mf , Ff ) has a weakly stable reflective subuniverse.
Proof. Given a fibration Γ.A  Γ, we define a map ηA : Γ.A → Γ.#A of fibrations over Γ to
be a good reflection if the map it presents in hM/Γ has the universal property of a reflection
into DΓ . That is, if the fibration Γ.#A  Γ presents an object of DΓ , and precomposition
with ηA induces an equivalence of mapping spaces into any object of DΓ .
We define the good fibrations Γ.isModal(A)  Γ to be those that are equivalent to
isEquiv(ηA ). This implies that isModal(A) is a mere proposition over Γ, since isEquiv(ηA ) is,
and is independent of the chosen ηA since they are all equivalent. Since isEquiv(ηA ) has a
section if and only if ηA is actually an equivalence over Γ, it follows that any isModal(A)
has a section if and only if Γ.A actually lies in DΓ . In particular, isModal(#A) always has a
section.
These definitions are weakly stable because the subcategories Dx and reflectors #x are
assumed to be stable under (∞, 1)-categorical pullback in hM, and pullback of fibrations in
2:68 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

M presents the latter. It remains to show that for any fibrations Γ.A  Γ and Γ.B  Γ,
with the latter in DΓ , precomposition with any ηA induces an equivalence B #A → B A of
local exponentials in M/Γ (which represent the non-dependent Π-types in (Mf , Ff )). Now
these local exponentials do present the (∞, 1)-categorical local exponentials in hM, and by
assumption we have an induced equivalence of hom-spaces (i.e. hom-∞-groupoids)

hM/Γ (#A, B) −
→ hM/Γ (A, B).
By assumed pullback-stability, for any fibration p : Γ.C  Γ we also have

hM/Γ.C (p∗ (#A), p∗ B) −
→ hM/Γ.C (p∗ A, p∗ B)
or equivalently

hM/Γ (C ×Γ #A, B) − → hM/Γ (C ×Γ A, B).
Now the local exponential adjunction gives

hM/Γ (C, B #A ) −
→ hM/Γ (C, B A )

and hence B #A −
→ B A by the (∞, 1)-categorical Yoneda lemma.
Admittedly, reflective subfibrations are not an especially familiar object in category
theory. However, in Appendix A.4 we will see that often they can be constructed from
ordinary reflective subcategories. For now, we move on to consider the analogous structure
for modalities.
Definition A.5. A reflective subfibration D of an (∞, 1)-category C is composing if
whenever f : y → x lies in Dx and g : z → y lies in Dy , the composite f g : z → x lies in Dx .
Theorem A.6. If M is a type-theoretic model category equipped with a composing reflective
subfibration of hM, then (Mf , Ff ) has a weakly stable modality.
Proof. Type-theoretic Σ-types are presented by composites of fibrations.
Inside type theory, we proved in §1 that modalities, i.e. Σ-closed reflective subuni-
verses, are equivalent to stable orthogonal factorization systems. The analogous “external”
categorical fact is:
Theorem A.7. A composing reflective subfibration of an (∞, 1)-category C is the same as
a stable orthogonal factorization system (L, R) on C, where R is the class of maps f : y → x
that lie in Dx .
Proof. A proof for 1-categories can be found in [CJKP97, 2.12], and essentially the same
proof works as well for (∞, 1)-categories. More generally, it is shown there that a composing
fiberwise-reflective subfibration (satisfying Definition A.3 (i) and (ii) but not necessarily (iii))
is the same as a not-necessarily-stable orthogonal factorization system.
Stable orthogonal factorization systems on (∞, 1)-categories are also studied in [GK17].
In particular, their Theorem 4.10 that the right class of such a factorization system is “local”
is an (∞, 1)-categorical analogue of our Theorem 1.53 that a stable factorization system is
determined by its modal types.
Factorization systems are more familiar categorically than reflective subfibrations. But in
Appendix A.4 we will see that they can also be often constructed from reflective subcategories,
which are even more familiar.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:69

However, in the lex case, we can go right to the reflective subcategories:


Definition A.8. A lex reflective subcategory of an (∞, 1)-category C with finite limits
is a full reflective subcategory D whose reflector # preserves finite limits (equivalently,
pullbacks, since any reflector preserves the terminal object).
Theorem A.9. A lex reflective subcategory of C induces a stable factorization system (L, R)
of C, where R consists of the morphisms f : y → x such that the naturality square of the
reflector is a pullback:
ηy
y #y
f #f

x ηx #x
and L consists of the morphisms f such that #f is an equivalence. Moreover, this sets up a
bijection between lex reflective subcategories of C and stable factorization systems (L, R) such
that L satisfies the 2-out-of-3 property (the nontrivial part of this being left cancellation: if
gf ∈ L and g ∈ L then f ∈ L).
Proof. Proofs for 1-categories can be found in [CHK85, Theorems 4.7 and 2.3], and essentially
the same proofs work as well for (∞, 1)-categories.
Theorem A.10. If M is a type-theoretic model category equipped with a lex reflective
subcategory of hM, then (Mf , Ff ) has a weakly stable lex modality.
Proof. It suffices to show that if a stable factorization system satisfies 2-out-of-3, then the
weakly stable modality constructed in Theorem A.6 is lex. Now a fibration Γ.A  Γ is
contractible over Γ just when it is an acyclic fibration, and Σ-types are given by composition
of fibrations. Now, given fibrations f : Γ.A.B  Γ.A and g : Γ.A  Γ, by construction of
the factorization system we have the following homotopy pullback squares, where for clarity
we write r for the (∞, 1)-categorical reflector:
P
Γ.A.#B Γ.#( (A) B) r(Γ.A.B)

Γ.A Γ.#A r(Γ.A)

Γ rΓ.
P
In particular, therefore, if Γ.#A → Γ and Γ.#( (A) B) → Γ are acyclic, then by 2-out-of-3
and pullback so is Γ.A.#B → Γ.A, as desired.
Example A.11. In Example A.2 we saw that when a gluing construction is performed at the
fibration-category level, the corresponding open and closed modalities can be constructed
at the same level. However, these modalities are still present even if the gluing happens
only at the ∞-categorical level. Suppose F : C → D is a finite-limit-preserving functor of
(∞, 1)-categories with finite limits and colimits. Then the comma (∞, 1)-category (D ↓ F ),
whose objects are triples (x ∈ C, y ∈ D, f : y → F x), includes C and D as full subcategories:
x ∈ C is identified with (x, F x, 1F x ) while y ∈ D is identified with (1, y, !). The forgetful
2:70 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

functors (D ↓ F ) → C and (D ↓ F ) → D are left exact left adjoints to these inclusions, so


we have two lex reflective subcategories. Hence, if (D ↓ F ) = hM, we have two induced lex
modalities on (Mf , Ff ), which we can identify internally with the open and closed modalities
associated to Q = (1, 0, !).

A.3. Modalities in syntactic categories. We now ask the opposite question: does our
syntactic kind of modality induce a higher-categorical structure? For this the basic tool
is [Kap17], which shows that given any contextual category C with Σ-types, Π-types, and
identity types, the (∞, 1)-category hC obtained by localizing C at its type-theoretically
defined equivalences is locally cartesian closed. Moreover, the fibrant slice C//X (consisting of
the fibrations, i.e. composites of dependent projections, with codomain X) similarly localizes
to the slice (∞, 1)-category hC/X , and the Π-types in C present the dependent exponentials
in hC.
A contextual category is not quite the same as a comprehension category. However,
every contextual category has a canonical split comprehension category structure, while
every split comprehension category has a “contextual core” obtained by repeatedly extending
the terminal object by type comprehensions. Moreover, in the case of the syntactic category,
and also in the case of (Mf , Ff ), these two operations preserve the base category up to
equivalence (though not isomorphism) of 1-categories.
In particular, once we apply the coherence theorem of [LW15] to (Mf , Ff ) to get a split
comprehension category and hence a contextual category, the equivalences therein coincide
with the model-categorical right homotopy equivalences between fibrant objects in M. If
all objects of M are cofibrant, as is usually the case in type-theoretic model categories,
then these are also the model-categorical weak equivalences, and so the contextual-category
localization of [Kap17] coincides with the model-categorical localization of M.
We now proceed to consider modalities and their kin.
Theorem A.12. If C is a contextual category with a (strictly stable) reflective subuniverse,
then hC has a reflective subfibration.
Proof. For Γ ∈ C, define DΓ to be the full subcategory of hC/Γ on the morphisms presented
(up to equivalence) by the comprehensions Γ.A → Γ such that isModal(A) has a section over
Γ. The reflectors are given by the type operations # and η, which are pullback-stable in
hC since the type operations on C are reindexing-stable. For the universal property, if A is
arbitrary and B is modal over Γ, then we have
Q Q
hC/Γ (A, B) ' hC/Γ (1, (A) B) ' hC/Γ (1, (#A) B) ' hC/Γ (#A, B)
Q
since by assumption, precomposition with η induces an internal equivalence (#A) B '
Q
(A) B, which is therefore also an external equivalence of local exponentials in hC.

Theorem A.13. If C is a contextual category with a (strictly stable) modality, then hC has
a stable orthogonal factorization system.
Proof. It suffices to show that the reflective subfibration of Theorem A.12 is composing.
Suppose Y → Γ and Z → Y are in DΓ and DY respectively. As a special case of [Kap17,
Theorem 3.1] (along with the existence of Σ-types), every object of hC/Γ is equivalent to
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:71

one of the form Γ.A → Γ for a type A in context Γ. Thus we have Y ' Γ.A over Γ, and
A is modal. Similarly, pulling back Z → Y to an object of hC/Γ.A and applying the same
fact, we get that it is equivalent to a P
modal type B in context Γ.A. Now the composite
Γ.A.B → Γ.A → Γ is isomorphic to Γ. (A) B → Γ, which is modal by assumption. Thus,
the equivalent composite Z → Y → Γ is also modal.
Theorem A.14. If C is a contextual category with a (strictly stable) lex modality, then hC
has a lex reflective subcategory.
Proof. It suffices to show that the L-maps in hC are left cancellable. As in Theorem A.13,
we may assume our maps are of the form Γ.A → Γ and Γ.A.B → Γ.A, with Γ.A → Γ and
the composite Γ.A.B → Γ.A → Γ being L-maps. Now the P L-maps are those whose fiberwise
reflection is terminal, which is to say that #A and #( (A) B) are contractible in context
Γ. By assumption, therefore #(B) is contractible in context Γ.A, which is to say that
Γ.A.B → Γ.A is an L-map.
It is straightforward to check that if we start from a reflective subfibration of a type-
theoretic model category M, construct a reflective subuniverse on (Mf , Ff ), and then pass
back to h(Mf , Ff ), which is equivalent to M, we get the same subfibration we started with.

A.4. Localizations in model categories. Now suppose M is an excellent model category


in the sense of [LS19], i.e. in addition to being type-theoretic, it is locally presentable, cofi-
brantly generated, simplicial, simplicially locally cartesian closed, and every monomorphism
is a cofibration (and in particular, every object is cofibrant). This implies that hM is a
locally presentable locally cartesian closed (∞, 1)-category; and conversely every locally
presentable locally cartesian closed (∞, 1)-category arises as hM for some excellent model
category M. Moreover, by the methods of [LS19], (Mf , Ff ) also models a localization higher
inductive type as in §2.4 Thus we have:
Theorem A.15. For any excellent model category M, and any map F between fibrations
over a fibrant object, the comprehension category (Mf , Ff ) has a weakly stable reflective
subuniverse that is generated by F .
Proof. We define isModal(X) to make Figure 5 true, and construct the rest of the structure
from the higher inductive localization as in §2.2.
On the other hand, a full subcategory D of a (usually locally presentable) (∞, 1)-category
C is said to be accessible if there is a family F of maps in C such that X ∈ D if and only if
C(f,X)
the map on hom-spaces C(C, X) −−−−→ C(B, X) is an equivalence for each (f : B → C) ∈ F .
Local presentability of C implies that any accessible subcategory is reflective.
4Specifically [LS19, Example 12.21] discusses localization using bi-invertibility instead of path-splitness;
our JF X can be obtained by simply dropping the extra two constructors. Pushouts are constructed in [LS19,
§4–6], which we can then combine with JF X to give our LF X.
2:72 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Now, if we have an accessible subcategory D of hM, generated by a family of maps


{fi : Bi → Ci }∈I , we can form their coproduct in hM:
`
` i fi `
i Bi i Ci

`
i1

and represent this by a map between fibrations over fibrant objects in M. Type-theoretically
this represents a family of maps a : A ` Fa : B(a) → C(a), so we can localize at it to obtain
a reflective subuniverse, corresponding to a reflective subfibration of hM.
Of course, the fiber over 1 of a reflective subfibration is a reflective subcategory; but
in general this fiber will not be the same as the accessible subcategory D generated by
localizing at F in the usual (∞, 1)-categorical sense. The issue is that our higher inductive
localization is an internal localization: the local types are those for which precomposition
induces equivalences on internal exponential objects, not just external hom-spaces. To see
that this makes a difference, note that we showed in §1.3 that the reflector of any reflective
subuniverse preserves products; but there are certainly accessible reflective subcategories
whose reflectors do not preserve products.
However, if our original accessible subcategory does have this property, and moreover
hM is extensive (so that maps over coproducts faithfully represent external families of maps),
then we can show that the two subcategories do coincide. First we need some lemmas.
Lemma A.16. For a reflective subcategory D of a cartesian closed (∞, 1)-category C, the
following are equivalent:
(i) The reflector C → D preserves finite (equivalently, binary) products.
(ii) D is an exponential ideal, i.e. if X ∈ D and Y ∈ C then X Y ∈ D.
Proof. This is a standard result for 1-categories (see [Joh02, A4.3.1]), and the same proof
applies to (∞, 1)-categories.
We say that an (∞, 1)-category is (infinitary) extensive [CLW93] if it has small
coproducts that are disjoint and pullback-stable. This is equivalent to saying that the
functor Y
C / `i A i → C/Ai ,
i
induced by pullback along the coproduct injections, is an equivalence of (∞, 1)-categories.
In particular, for any family of maps fi : Ai → Bi we have pullback squares
`
Ai i Ai
`
fi i fi
`
Bi i Bi .

Any ∞-topos in the sense of [Lur09] is extensive (this is a special case of descent for colimits).
Lemma A.17. Let X be an object and F = {fi : Bi → Ci }i∈I a family of maps in an
extensive and locally cartesian closed (∞, 1)-category C. Then the following are equivalent:
(i) For any i ∈ I, the map X Ci → X Bi of exponential objects is an equivalence in C.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:73

` ` `
(ii) If we let A = i 1 and B = i Bi and C = i Ci , with an induced map F : B → C
over A, then the induced map (A∗ X)C → (A∗ X)B of local exponential objects in C/A
is an equivalence.
(A∗ X)C → (A∗ X)B is an equivalence if and only if its pullback along
Proof. By extensivity, `
each injection i : 1 → i 1 = A is an equivalence. Since local exponentials are preserved by
∗ ∗
pullback, these pullbacks are the exponentials (i∗ A∗ X)i C → (i∗ A∗ X)i B . But i∗ A∗ X = X,
while by extensivity again we have i∗ C = Ci and i∗ B = Bi .
If C = hM, then we can represent the map F : B → C in C/A above by a map between
fibrations over a fibrant object A:
B C

A.
We call this a fibrant localizing representative of F .
Theorem A.18. Let M be an excellent model category such that hM is extensive, and let
D be an accessible exponential ideal in hM generated by some family of maps F . Then the
fiber over 1 of the reflective subfibration generated by the higher inductive localization at a
fibrant localizing representative of F coincides with D.
Proof.`Let F : B → C be a map of fibrations over a fibrant object A representing the
map i fi in hM as above. By definition, a fibrant object X is internally F -local if
A∗ isequiv(− ◦ F ) has a global section, or equivalently if isequiv(− ◦ F ) has a section over A,
or equivalently if the map of local exponentials
(− ◦ F ) : (A∗ X)C → (A∗ X)B (A.19)
is an equivalence over A. Since these 1-categorical local exponentials in M/A are between
fibrations, they present (∞, 1)-categorical exponentials in hM/A . Thus, by Lemma A.17,
this is equivalent to saying that each map X Ci → X Bi is an equivalence.
This certainly implies that X ∈ D, i.e. that it is F -local in the external sense, since
hM(Bi , X) ' hM(1, X Bi ) and similarly. Conversely, if X ∈ D, then to show that X Ci →
X Bi is an equivalence, by the Yoneda lemma it suffices to show that the induced map on
hom-spaces hM(Y, X Ci ) → hM(Y, X Bi ) is an equivalence for any Y ∈ hM. But this is
equivalent to hM(Ci , X Y ) → hM(Bi , X Y ), which is an equivalence since X Y ∈ D, as D is
an exponential ideal.
In particular, any accessible exponential ideal in an ∞-topos C can be extended to a
reflective subfibration, which in turn can be represented by a reflective subuniverse in a
type theory that interprets into (a model category presenting) C. In the other direction, we
observe that any internally accessible localization is externally accessible as well:
Theorem A.20. Suppose C is a contextual category with an accessible reflective subuniverse
D, such that hC is a locally presentable (∞, 1)-category. Then the corresponding reflective
subcategory D1 of hC is accessible.
2:74 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

Q
Proof. By definition, X ∈ hC lies in D1 just when (a:A) isequiv(λ(g : C(a) → X). g ◦ F (a))
has a global element, which is to say that isequiv(λ(g : C(a) → X). g ◦ F (a)) has a section
over A, or equivalently that the induced map (–)F : (A∗ X)C → (A∗ X)B is an equivalence
over A. Thus, D1 is the (∞, 1)-categorical pullback
D1 hC/A

hC A∗
hC/A (hC/A )2 .
( – )F

Since all of the functors involved are left or right adjoints between accessible (∞, 1)-categories,
they are also accessible; thus D1 is also accessible.
In general, it seems that a reflective subfibration need not be uniquely determined by its
fiber over 1. Different choices of generating families F in the above theorem could produce
different reflective subfibrations.
Of these, it might happen that some are composing and some are not. However, we can
give a necessary and sufficient condition for there to exist some extension of an accessible
exponential ideal to a composing reflective subfibration, i.e. a stable factorization system.
Lemma A.21. Let C be a locally cartesian closed (∞, 1)-category and D a reflective subcat-
egory of it, with reflection units ηx : x → #x. The following are equivalent; when they hold
we say that D has stable units [CHK85].
(i) For every x ∈ D, the reflective subcategory D/x of C/x is an exponential ideal.
(ii) The reflector # preserves all pullbacks over an object of D.
(iii) The reflector # inverts any pullback of any ηx .
Proof. Since the reflection of C/x into D/x (when x ∈ D) is essentially just # itself, con-
dition (ii) says that this reflector always preserves finite products. Thus, (i)⇔(ii) by
Lemma A.16. And (ii)⇒ (iii) since ηx is inverted by # and #x ∈ D. Finally, if (iii) then we
can factor any pullback over an x ∈ D as follows:
w • y
y y
w y ηy
y = • #y
y
z x
z ηz #z x.
The lower-right square is a pullback of objects in D, hence its vertex is also in D and it
is preserved by #. The other two squares are pullbacks of some η, hence preserved by #
by (iii). Thus, # preserves the whole pullback, so we have (ii).
If a reflective subfibration is composing, then for any x ∈ D1 we have Dx = (D1 )/x as
subcategories of C/x . Since Dx is always an exponential ideal in C/x (for the same reasons
that D1 is an exponential ideal in C), it follows that so is (D1 )/x , hence by Lemma A.21(i) D1
has stable units. In other words, having stable units is a necessary condition for a reflective
subcategory to underlie some stable factorization system.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:75

We now show that in good cases this is also sufficient. The idea is similar to that
of Theorem A.18, but using nullification at the fibers (§2.3) instead of localization, as in
Lemma 2.20. We start with an analogue of Lemma A.17.
Lemma A.22. Let X be an object and F = {fi : Bi → Ai }i∈I a family of maps in an
extensive and locally cartesian closed (∞, 1)-category C. Then the following are equivalent:
(i) For any i ∈ I, the induced “constant functions” map A∗i X → (A∗x X)Bi into the local
exponential in C`
/Ai is an equivalence.
`
(ii) If we let A = i Ai and B = i Bi , with an induced map F : B → A, then the
constant functions map A∗ X → (A∗ X)B in C/A is an equivalence.
Proof. As in Lemma A.17, A∗ X → (A∗ X)B is an equivalence
` if and only if it becomes so
upon pullback along each coproduct injection Ai → i Ai = A, and these pullbacks take it
to A∗i X → (A∗x X)Bi .
`
If C = hM in Lemma A.22, then the map i fi can be further represented by a fibration
F : B  A with fibrant codomain in M. We call this a fibrant nullifying representative
of F .
Theorem A.23. Let M be an excellent model category such that hM is extensive, let D be
an accessible reflective subcategory of hM, and let F a family of maps generating D with the
property that any pullback of any map in F is inverted by the reflector of D. (Note that the
existence of such a family is an extra condition on D.) Then higher inductive nullification
at a fibrant nullifying representative of F is a stable factorization system whose fiber over 1
coincides with D.
Proof. By definition, a fibrant object X is internally F -null just when Lemma A.22(ii) holds,
hence when (i) holds. By the Yoneda lemma in hM/Ai , this is equivalent to saying that for
any map Y → Ai in hM, the induced map
hM/Ai (Y, A∗i X) → hM/Ai (Y, (A∗i X)Bi )
is an equivalence. But this is equivalent to
hM/Ai (Y, A∗i X) → hM/Ai (Y ×Ai Bi , A∗i X)
and thus to
hM(Y, X) → hM(Y ×Ai Bi , X). (A.24)
If (A.24) is an equivalence for all i and Y , then taking Y = Ai we see that X is fi -local
for all i, hence X ∈ D. Conversely, if X ∈ D, then since the projection Y ×Ai Bi → Y is a
pullback of fi , it is inverted by the reflector of D and hence is seen by X as an equivalence;
thus (A.24) is an equivalence.
Corollary A.25. Let M be an excellent model category such that hM is extensive, and let
D be an accessible reflective subcategory of hM with stable units. Then there is a fibration
F : B  A with fibrant codomain in M such that the fiber over 1 of the stable factorization
system generated by higher inductive nullification at F coincides with D.
Proof. This is a categorical version of Lemma 2.20. Let G = {gi : Ci → Di }i∈I be any set of
maps in hM generating D, and let F be a fibrant nullifying representative of
` ` ` ` ` `
( i ηCi ) t ( i ηDi ) : ( i Ci ) t ( i Di ) → ( i #Ci ) t ( i #Di ). (A.26)
2:76 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

By extensivity, any pullback of (A.26) is a coproduct of pullbacks of the units ηCi and ηDi .
Since D has stable units, any pullback of these units is inverted by its reflector, and the class
of maps inverted by any reflector is stable under coproducts. Thus, by Theorem A.23 it
suffices to show that D is generated by the units ηCi and ηDi themselves. But these units are
certainly inverted by the reflector of D, so that every object of D is ηCi -local and ηDi -local;
while if an object is ηCi -local and ηDi -local then by 2-out-of-3 it is also gi -local and hence
belongs to D.
In particular, any accessible reflective subcategory with stable units in an ∞-topos C can
be extended to a stable orthogonal factorization system, which in turn can be represented
by a modality in a type theory that interprets into (a model category presenting) C.
Finally, in the left exact case, we already know from Theorem A.10 that any lex reflective
subcategory D of hM can be extended to a lex modality. We can show that if the former is
topological, then so is the latter.
Theorem A.27. Let M be an excellent model category such that hM is an ∞-topos, and let
D be a topological localization of hM in the sense of [Lur09, Definition 6.2.1.4]. Suppose also
that there exist arbitrarily large inaccessible cardinals. Then there is a fibration F : B  A
with fibrant codomain in M such that the higher inductive nullification at F generates a
topological lex modality whose fiber over 1 is D.
Proof. By [Lur09, Proposition 6.2.1.5], there exists a family of monomorphisms F in hM
generating D and such that any pullback of a morphism in F is inverted by the reflector of D.
Thus, by Theorem A.23, higher inductive nullification at a fibrant nullifying representative
of F is a modality whose fiber over 1 coincides with D. Moreover, since F consists of
monomorphisms, its coproduct is also a monomorphism, and thus any fibrant nullifying
representative of it represents a family of mere propositions.
We would like to conclude by applying Corollary 3.12 internally to conclude that this
topological modality is lex. However, the proof of Corollary 3.12 used univalence unavoidably,
whereas in this appendix we are not assuming that our type theory has any universes. But
we have assumed in this theorem that hM is an ∞-topos and hence has object classifiers,
the ∞-categorical analogue of univalent universes.
Our map F must be κ-compact for some inaccessible κ; let U be an object classifier
for κ-compact morphisms. Then repeating the proofs of Theorem 3.11 and Corollary 3.12
categorically, we can show that F -nullification satisfies Theorem 3.1(xiii), and hence is
lex.
The following converse result shows that our definition of “topological” is essentially
the same as that of [Lur09].
Theorem A.28. Let M be an excellent model category such that hM is an ∞-topos, and
let F be a family of monomorphisms in hM. Then the fiber over 1 of the topological lex
modality generated by higher inductive nullification at a fibrant nullifying representative of
F is a topological localization of hM.
Proof. Let D1 be the fiber in question. By [Lur09, Definition 6.2.1.4], we must show that
the class of all morphism in hM inverted by the reflector of D1 is “generated as a strongly
saturated class” by a class of monomorphisms, and also stable under pullback. Stability
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:77

under pullback follows from the fact that by Theorem A.14, D1 is a lex reflective subcategory
of hM. For the first, we claim that it is generated as a strongly saturated class by the
class S of all pullbacks of morphisms in F , which certainly consists of monomorphisms.
By [Lur09, Proposition 5.5.4.15], it suffices to show that D1 consists precisely of the S-local
objects. But this is essentially what we showed in Theorem A.23.
Using [ABFJ19] and Remark 3.23, we can extend Theorem A.27 to arbitrary accessible
lex localizations by a similar argument.
An accessible lex reflective subcategory of an ∞-topos is called a subtopos. Theorem A.10
tells us that any subtopos of an ∞-topos C can be represented by a lex modality in a type
theory that interprets into (a model category presenting) C, while the generalization of
Theorem A.27 using [ABFJ19] tells us that this lex modality can be chosen to be accessible
as we have defined it internally, and topological if the original subtopos was topological.
Remark A.29. We end the appendix with a remark about universes. In general, the problem
of modeling homotopy type theory in ∞-toposes with strict univalent universes (i.e. univalent
universes that are strictly closed under the type-forming operations) is an open problem,
although it is known to be possible in a few cases [KL19, Shu15b, Shu15a, Cis14, Shu17]. In
Remark 3.24 we noted that if we have such a model in one ∞-topos, and moreover there are
enough strict univalent universes closed under the reflector for some sub-∞-topos of it, then
we obtain such a model in the sub-∞-topos. In particular, in this way we could in principle
reduce the problem of modeling homotopy type theory in ∞-toposes to that of modeling it
in presheaf ∞-toposes.
However, even in the cases where strict univalent universes are known to exist, it is not
known how to make them closed under such reflectors. In particular, the construction of
higher inductive types in [LS19] does not remain inside any universe, because it does not
preserve fiberwise smallness of fibrations. At present we do not know any extension of the
results of this appendix to type theory with universes.

References
[AB04] S. Awodey and A. Bauer. Propositions as [types]. J. Logic Comput., 14(4):447–471, 2004.
[ABFJ17] Mathieu Anel, Georg Biedermann, Eric Finster, and André Joyal. A generalized Blakers–Massey
theorem. arXiv:1703.09050, 2017.
[ABFJ19] Mathieu Anel, George Biederman, Eric Finster, and André Joyal. New methods for left exact
localisations of topoi. In preparation; slides at http://mathieu.anel.free.fr/mat/doc/
Anel-LexLocalizations.pdf, 2019.
[ADK17] Thorsten Altenkirch, Nils Anders Danielsson, and Nicolai Kraus. Partiality, revisited: The
partiality monad as a quotient inductive-inductive type. FOSSACS 2017, LNCS 10203, pages
534–549, 2017.
[Bau11] Tilman Bauer. Bousfield localization and the Hasse square.
http://math.mit.edu/conferences/talbot/2007/tmfproc/Chapter09/bauer.pdf,
2011.
[BGL+ 17] Andrej Bauer, Jason Gross, Peter LeFanu Lumsdaine, Michael Shulman, Matthieu Sozeau, and
Bas Spitters. The HoTT library: A formalization of homotopy type theory in Coq. In Proceedings
of the 6th ACM SIGPLAN Conference on Certified Programs and Proofs, CPP 2017, pages
164–172. ACM, 2017.
2:78 Egbert Rijke, Michael Shulman, and Bas Spitters Vol. 16:1

[Bou18] John Bourke. Iterated algebraic injectivity and the faithfulness conjecture. arXiv:1811.09532,
2018.
[CHK85] C. Cassidy, M. Hébert, and G. M. Kelly. Reflective subcategories, localizations and factorization
systems. J. Austral. Math. Soc. Ser. A, 38(3):287–329, 1985.
[Cis14] Denis-Charles Cisinski. Univalent universes for elegant models of homotopy types. arXiv:1406.0058,
2014.
[CJKP97] A. Carboni, G. Janelidze, G. M. Kelly, and R. Paré. On localization and stabilization for
factorization systems. Appl. Categ. Structures, 5(1):1–58, 1997.
[CLW93] Aurelio Carboni, Stephen Lack, and R.F.C. Walters. Introduction to extensive and distributive
categories. J. Pure Appl. Algebra, 84(2):145–158, 1993.
[CMR17] Thierry Coquand, Bassel Mannaa, and Fabian Ruch. Stack semantics of type theory. CoRR,
abs/1701.02571, 2017.
[Coq17] Thierry Coquand. Cubical stacks, 2017. http://www.cse.chalmers.se/˜coquand/stack.
pdf.
[CSS05] Carles Casacuberta, Dirk Scevenels, and Jeffrey H. Smith. Implications of large-cardinal principles
in homotopical localization. Adv. Math., 197(1):120–139, 2005.
[dPGM04] Valeria de Paiva, Rajeev Goré, and Michael Mendler. Modalities in constructive logics and type
theories. Journal of Logic and Computation, 14(4):439–446, 2004.
[dPR16] Valeria de Paiva and Eike Ritter. Fibrational modal type theory. Electronic Notes in Theoretical
Computer Science, 323:143 – 161, 2016. Proceedings of the Tenth Workshop on Logical and
Semantic Frameworks, with Applications (LSFA 2015).
[EK17] Martı́n H. Escardó and Cory M. Knapp. Partial Elements and Recursion via Dominances in
Univalent Type Theory. In Valentin Goranko and Mads Dam, editors, 26th EACSL Annual
Conference on Computer Science Logic (CSL 2017), volume 82 of Leibniz International Proceedings
in Informatics (LIPIcs), pages 21:1–21:16, Dagstuhl, Germany, 2017. Schloss Dagstuhl–Leibniz-
Zentrum fuer Informatik.
[FFLL16] Kuen-Bang Hou (Favonia), Eric Finster, Daniel Licata, and Peter LeFanu Lumsdaine. A mech-
anization of the Blakers–Massey connectivity theorem in homotopy type theory. LICS, 2016.
arXiv:1605.03227.
[GK17] David Gepner and Joachim Kock. Univalence in locally cartesian closed ∞-categories. Forum
Math., 29(3):617–652, 2017. arXiv:1208.1749.
[Gol10] Robert Goldblatt. Cover semantics for quantified lax logic. Journal of Logic and Computation,
2010.
[Joh02] P. Johnstone. Sketches of an elephant: A topos theory compendium. Oxford, 2002.
[Kap17] Krzysztof Kapulkin. Locally cartesian closed quasi-categories from type theory. Journal of Topology,
10(4):1029–1049, 2017. arXiv:1507.02648.
[KL19] Chris Kapulkin and Peter LeFanu Lumsdaine. The simplicial model of univalent foundations (after
Voevodsky). Journal of the European Mathematical Society, 2019. To appear. arXiv:1211.2851.
[KS15] Nicolai Kraus and Christian Sattler. Higher homotopies in a hierarchy of univalent universes.
ACM Trans. Comput. Logic, 16(2):18:1–18:12, April 2015.
[LF14] Dan Licata and Eric Finster. Eilenberg–MacLane spaces in homotopy type theory. LICS, 2014.
http://dlicata.web.wesleyan.edu/pubs/lf14em/lf14em.pdf.
[LS19] Peter LeFanu Lumsdaine and Michael Shulman. Semantics of higher inductive types. Mathematical
Proceedings of the Cambridge Philosophical Society, 2019. arXiv:1705.07088.
[Lur09] J. Lurie. Higher topos theory, volume 170. Princeton University Press, 2009.
[LW15] Peter LeFanu Lumsdaine and Michael A. Warren. The local universes model: An overlooked
coherence construction for dependent type theories. ACM Trans. Comput. Logic, 16(3):23:1–23:31,
July 2015. arXiv:1411.1736.
[Mog91] Eugenio Moggi. Notions of computation and monads. Information and Computation, 93(1):55 –
92, 1991. Selections from 1989 IEEE Symposium on Logic in Computer Science.
[MP12] J. P. May and K. Ponto. More concise algebraic topology. Chicago lectures in mathematics.
University of Chicago Press, 2012.
[NPP05] Aleksandar Nanevski, Frank Pfenning, and Brigitte Pientka. Contextual model type theory, 2005.
Vol. 16:1 MODALITIES IN HOMOTOPY TYPE THEORY 2:79

[Rij17] Egbert Rijke. The join construction. arXiv:1701.07538, 2017.


[RS15] Egbert Rijke and Bas Spitters. Sets in homotopy type theory. Mathematical Structures in Computer
Science, 25:1172–1202, 6 2015. arXiv:1305:3835.
[Shu14] Michael Shulman. Universal properties without function extensionality.
https://homotopytypetheory.org/2014/11/02/universal-properties, 2014.
[Shu15a] Michael Shulman. The univalence axiom for elegant Reedy presheaves. Homology, Homotopy, and
Applications, 17(2):81–106, 2015. arXiv:1307.6248.
[Shu15b] Michael Shulman. Univalence for inverse diagrams and homotopy canonicity. Mathematical
Structures in Computer Science, 25:1203–1277, 6 2015. arXiv:1203.3253.
[Shu17] Michael Shulman. Univalence for inverse EI diagrams. Homology, Homotopy and Applications,
19(2):219–249, 2017. arXiv: 1507.03634.
[Shu18] Michael Shulman. Brouwer’s fixed-point theorem in real-cohesive homotopy type theory. Mathe-
matical Structures in Computer Science, 28(6):856–941, 2018. arXiv:1509.07584.
[SS12] U. Schreiber and M. Shulman. Quantum gauge field theory in cohesive homotopy type theory
(extended abstract). In Quantum Physics and Logic 2012, 2012.
[Uni13] The Univalent Foundations Program. Homotopy Type Theory: Univalent Foundations of Mathe-
matics. http://homotopytypetheory.org/book/, first edition, 2013.
[Wil94] J. T. Wilson. The assembly tower and some categorical and algebraic aspects of frame theory.
PhD thesis, Carnegie Mellon University, 1994.

This work is licensed under the Creative Commons Attribution License. To view a copy of this
license, visit https://creativecommons.org/licenses/by/4.0/ or send a letter to
Creative Commons, 171 Second St, Suite 300, San Francisco, CA 94105, USA, or Eisenacher
Strasse 2, 10777 Berlin, Germany

You might also like