Modalities in Homotopy Type Theory: E-Mail Address
Modalities in Homotopy Type Theory: E-Mail Address
Volume 16, Issue 1, 2020, pp. 2:1–2:79 Submitted Aug. 01, 2017
https://lmcs.episciences.org/ Published Jan. 08, 2020
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
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.
prop. nullifications
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.
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
#A B.
f˜
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
η η
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.
#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 )
#(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.
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).
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
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
' # (w:fibf (b)) (u:P (pr1 (w))) gpr1 w (u) = pr2 (w)−1 ∗ (v)
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.
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
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
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
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 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.
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].
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 ).
C(a) Y
R(f,f 0 )
∼
(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
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.
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 )
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.
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)
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
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))))
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
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
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.
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
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
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
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
– ∧♦
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
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
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
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
(# ∨ ♦)(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
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)
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.
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 : A ` B type
Γ` : isModal(A) Γ, a : A ` : isModal(B)
P
Γ` : isModal( (a:A) B)
Γ ` A type P
Γ, x : A ` B type Γ` : iscontr(#A) Γ` : iscontr(#( (x:A) B)) Γ`a:A
Γ` : iscontr(#B)
Γ ` X type
Q
Γ` : isModal(X) ' (a:A) isequiv(λ(g : C(a) → X). g ◦ F (a))
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.
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
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)
Γ 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
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.
`
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
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