# 10.5 The cumulative hierarchy

We can define a cumulative hierarchy $V$ of all sets in a given universe $\mathcal{U}$ as a higher inductive type, in such a way that $V$ is again a set (in a larger universe $\mathcal{U}^{\prime}$), equipped with a binary “membership” relation $x\in y$ which satisfies the usual laws of set theory.

###### Definition 10.5.1.

The cumulative hierarchy $V$ relative to a type universe $\mathcal{U}$ is the higher inductive type generated by the following constructors.

1. 1.

For every $A:\mathcal{U}$ and $f:A\to V$, there is an element $\mathsf{set}(A,f)$ : V.

2. 2.

For all $A,B:\mathcal{U}$, $f:A\to V$ and $g:B\to V$ such that

 $\big{(}\forall(a:A).\,\exists(b:B).\,f(a)=_{V}g(b)\big{)}\land\big{(}\forall(b% :B).\,\exists(a:A).\,f(a)=_{V}g(b)\big{)}$ (10.5.1)

there is a path $\mathsf{set}(A,f)=_{V}\mathsf{set}(B,g)$.

3. 3.

The 0-truncation constructor: for all $x,y:V$ and $p,q:x=y$, we have $p=q$.

In set-theoretic language, $\mathsf{set}(A,f)$ can be understood as the set (in the sense of classical set theory) that is the image of $A$ under $f$, i.e. $\setof{f(a)|a\in A}$. However, we will avoid this notation, since it would clash with our notation for subtypes (but see (10.5.2) and \autorefdef:TypeOfElements below).

The hierarchy $V$ is bootstrapped from the empty map $\mathsf{rec}_{\mathbf{0}}(V):\mathbf{0}\to V$, which gives the empty set as $\emptyset=\mathsf{set}(\mathbf{0},\mathsf{rec}_{\mathbf{0}}(V))$. Then the singleton $\{\emptyset\}$ enters $V$ through $\mathbf{1}\to V$, defined as $\star\mapsto\emptyset$, and so on. The type $V$ lives in the same universe as the base universe $\mathcal{U}$.

The second constructor of $V$ has a form unlike any we have seen before: it involves not only paths in $V$ (which in \autorefsec:hittruncations we claimed were slightly fishy) but truncations of sums of them. It certainly does not fit the general scheme described in \autorefsec:naturality, and thus it may not be obvious what its induction principle should be. Fortunately, like our first definition of the 0-truncation in \autorefsec:hittruncations, it can be re-expressed using auxiliary higher inductive types. We leave it to the reader to work out the details (see \autorefex:cumhierhit).

At the end of the day, the induction principle for $V$ (written in pattern matching language) says that given $P:V\to\set$, in order to construct $h:\mathchoice{\prod_{x:V}\,}{\mathchoice{{\textstyle\prod_{(x:V)}}}{\prod_{(x:% V)}}{\prod_{(x:V)}}{\prod_{(x:V)}}}{\mathchoice{{\textstyle\prod_{(x:V)}}}{% \prod_{(x:V)}}{\prod_{(x:V)}}{\prod_{(x:V)}}}{\mathchoice{{\textstyle\prod_{(x% :V)}}}{\prod_{(x:V)}}{\prod_{(x:V)}}{\prod_{(x:V)}}}P(x)$, it suffices to give the following.

1. 1.

For any $f:A\to V$, construct $h(\mathsf{set}(A,f))$, assuming as given $h(f(a))$ for all $a:A$.

2. 2.

Verify that if $f:A\to V$ and $g:B\to V$ satisfy (10.5.1), then $h(\mathsf{set}(A,f))=h(\mathsf{set}(B,g))$, assuming inductively that $h(f(a))=h(g(b))$ whenever $f(a)=g(b)$.

The second clause checks that the map being defined must respect the paths introduced in (10.5.1). As usual when we state higher induction principles using pattern matching, it may seem tautologous, but is not. The point is that “$h(f(a))$” is essentially a formal symbol which we cannot peek inside of, which $h(\mathsf{set}(A,f))$ must be defined in terms of. Thus, in the second clause, we assume equality of these formal symbols when appropriate, and verify that the elements resulting from the construction of the first clause are also equal. Of course, if $P$ is a family of mere propositions, then the second clause is automatic.

Observe that, by induction, for each $v:V$ there merely exist $A:\mathcal{U}$ and $f:A\to V$ such that $v=\mathsf{set}(A,f)$. Thus, it is reasonable to try to define the membership relation $x\in v$ on $V$ by setting:

 $(x\in\mathsf{set}(A,f)):\!\!\equiv(\exists(a:A).\,x=f(a)).$

To see that the definition is valid, we must use the recursion principle of $V$. Thus, suppose we have a path $\mathsf{set}(A,f)=\mathsf{set}(B,g)$ constructed through (10.5.1). If $x\in\mathsf{set}(A,f)$ then there merely is $a:A$ such that $x=f(a)$, but by (10.5.1) there merely is $b:B$ such that $f(a)=g(b)$, hence $x=g(b)$ and $x\in\mathsf{set}(B,f)$. The converse is symmetric.

The subset relation $x\subseteq y$ is defined on $V$ as usual by

 $(x\subseteq y):\!\!\equiv\forall(z:V).\,z\in x\Rightarrow z\in y.$

A class may be taken to be a mere predicate on $V$. We can say that a class $C:V\to\mathsf{Prop}$ is a $V$-set if there merely exists $v\in V$ such that

 $\forall(x:V).\,C(x)\Leftrightarrow x\in v.$

We may also use the conventional notation for classes, which matches our standard notation for subtypes:

 $\setof{x|C(x)}:\!\!\equiv{\lambda}x.\,C(x).$ (10.5.2)

A class $C:V\to\mathsf{Prop}$ will be called $\mathcal{U}$-small if all of its values $C(x)$ lie in $\mathcal{U}$, specifically $C:V\to\mathsf{Prop}_{\mathcal{U}}$. Since $V$ lives in the same universe $\mathcal{U}^{\prime}$ as does the base universe $\mathcal{U}$ from which it is built, the same is true for the identity types $v=_{V}w$ for any $v,w:V$. To obtain a well-behaved theory in the absence of propositional resizing, therefore, it will be convenient to have a $\mathcal{U}$-small “resizing” of the identity relation, which we can define by induction as follows.

###### Definition 10.5.3.

Define the bisimulation relation

 $\mathord{\sim}:V\times V\longrightarrow\mathsf{Prop}_{\mathcal{U}}$

by double induction over $V$, where for $\mathsf{set}(A,f)$ and $\mathsf{set}(B,g)$ we let:

 $\mathsf{set}(A,f)\sim\mathsf{set}(B,g):\!\!\equiv\big{(}\forall(a:A).\,\exists% (b:B).\,f(a)\sim g(b)\big{)}\land\big{(}\forall(b:B).\,\exists(a:A).\,f(a)\sim g% (b)\big{)}.$

To verify that the definition is correct, we just need to check that it respects paths $\mathsf{set}(A,f)=\mathsf{set}(B,g)$ constructed through (10.5.1), but this is obvious, and that $\mathsf{Prop}_{\mathcal{U}}$ is a set, which it is. Note that $u\sim v$ is in $\mathsf{Prop}_{\mathcal{U}}$ by construction.

###### Lemma 10.5.4.

For any $u,v:V$ we have $(u=_{V}v)=(u\sim v)$.

###### Proof.

An easy induction shows that $\sim$ is reflexive, so by transport we have $(u=_{V}v)\to(u\sim v)$. Thus, it remains to show that $(u\sim v)\to(u=_{V}v)$. By induction on $u$ and $v$, we may assume they are $\mathsf{set}(A,f)$ and $\mathsf{set}(B,g)$ respectively. Then by definition, $\mathsf{set}(A,f)\sim\mathsf{set}(B,g)$ implies $(\forall(a:A).\,\exists(b:B).\,f(a)\sim g(b))$ and conversely. But the inductive hypothesis then tells us that $(\forall(a:A).\,\exists(b:B).\,f(a)=g(b))$ and conversely. So by the path-constructor for $V$ we have $\mathsf{set}(A,f)=_{V}\mathsf{set}(B,g)$. ∎

Now we can use the resized identity relation to get the following useful principle.

###### Lemma 10.5.5.

For every $u:V$ there is a given $A_{u}:\mathcal{U}$ and monic $m_{u}:A_{u}\rightarrowtail V$ such that $u=\mathsf{set}(A_{u},m_{u})$.

###### Proof.

Take any presentation $u=\mathsf{set}(A,f)$ and factor $f:A\to V$ as a surjection followed by an injection:

 $f=m_{u}\circ e_{u}:A\twoheadrightarrow A_{u}\rightarrowtail V.$

Clearly $u=\mathsf{set}(A_{u},m_{u})$ if only $A_{u}$ is still in $\mathcal{U}$, which holds if the kernel of $e_{u}:A\twoheadrightarrow A_{u}$ is in $\mathcal{U}$. But the kernel of $e_{u}:A\twoheadrightarrow A_{u}$ is the pullback along $f:A\to V$ of the identity on $V$, which we just showed to be $\mathcal{U}$-small, up to equivalence. Now, this construction of the pair $(A_{u},m_{u})$ with $m_{u}:A_{u}\rightarrowtail V$ and $u=\mathsf{set}(A_{u},m_{u})$ from $u:V$ is unique up to equivalence over $V$, and hence up to identity by univalence. Thus by the principle of unique choice (LABEL:cor:UC) there is a map $c:V\to\mathchoice{\sum_{A:\mathcal{U}}\,}{\mathchoice{{\textstyle\sum_{(A:% \mathcal{U})}}}{\sum_{(A:\mathcal{U})}}{\sum_{(A:\mathcal{U})}}{\sum_{(A:% \mathcal{U})}}}{\mathchoice{{\textstyle\sum_{(A:\mathcal{U})}}}{\sum_{(A:% \mathcal{U})}}{\sum_{(A:\mathcal{U})}}{\sum_{(A:\mathcal{U})}}}{\mathchoice{{% \textstyle\sum_{(A:\mathcal{U})}}}{\sum_{(A:\mathcal{U})}}{\sum_{(A:\mathcal{U% })}}{\sum_{(A:\mathcal{U})}}}(A\to V)$ such that $c(u)=(A_{u},m_{u})$, with $m_{u}:A_{u}\rightarrowtail V$ and $u=\mathsf{set}(c(u))$, as claimed. ∎

###### Definition 10.5.6.

For $u:V$, the just constructed monic presentation $m_{u}:A_{u}\rightarrowtail V$ such that $u=\mathsf{set}(A_{u},m_{u})$ may be called the type of members of $u$ and denoted $m_{u}:[u]\rightarrowtail V$, or even $[u]\rightarrowtail V$. We can think of $[u]$ as the “subclass of $V$ consisting of members of $u$”.

###### Theorem 10.5.7.

The following hold for $(V,{\in})$:

1. 1.
 $\forall(x,y:V).\,x\subseteq y\land y\subseteq x\Leftrightarrow x=y.$
2. 2.

empty set: for all $x:V$, we have $\neg(x\in\emptyset)$.

3. 3.

pairing: for all $u,v:V$, the class $u\cup v:\!\!\equiv\setof{x|x=u\vee x=v}$ is a $V$-set.

4. 4.

infinity: there is a $v:V$ with $\emptyset\in v$ and $x\in v$ implies $x\cup\{x\}\in v$.

5. 5.

union: for all $v:V$, the class $\cup v:\!\!\equiv\setof{x|\exists(u:V).\,x\in u\in v}$ is a $V$-set.

6. 6.

function set: for all $u,v:V$, the class $v^{u}:\!\!\equiv\setof{x|x:u\to v}$ is a $V$-set.11Here $x:u\to v$ means that $x$ is an appropriate set of ordered pairs, according to the usual way of encoding functions in set theory.

7. 7.

$\in$-induction: if $C:V\to\mathsf{Prop}$ is a class such that $C(a)$ holds whenever $C(x)$ for all $x\in a$, then $C(v)$ for all $v:V$.

8. 8.

replacement: given any $r:V\to V$ and $a:V$, the class

 $\setof{x|\exists(y:V).\,y\in a\land x=r(y)}$

is a $V$-set.

9. 9.

separation: given any $a:V$ and $\mathcal{U}$-small $C:V\to\mathsf{Prop}_{\mathcal{U}}$, the class

 $\setof{x|x\in a\land C(x)}$

is a $V$-set.

###### Sketch of proof.

1. 1.

Extensionality: if $\mathsf{set}(A,f)\subseteq\mathsf{set}(B,g)$ then $f(a)\in\mathsf{set}(B,g)$ for every $a:A$, therefore for every $a:A$ there merely exists $b:B$ such that $f(a)=g(b)$. The assumption $\mathsf{set}(B,g)\subseteq\mathsf{set}(A,f)$ gives the other half of (10.5.1), therefore $\mathsf{set}(A,f)=\mathsf{set}(B,g)$.

2. 2.

Empty set: suppose $x\in\emptyset=\mathsf{set}(\mathbf{0},\mathsf{rec}_{\mathbf{0}}(V))$. Then $\exists(a:\mathbf{0}).\,x=\,\mathsf{rec}_{\mathbf{0}}(V,a)$, which is absurd.

3. 3.

Pairing: given $u$ and $v$, let $w=\mathsf{set}(\mathbf{2},\mathsf{rec}_{\mathbf{2}}(V,u,v))$.

4. 4.

Infinity: take $w=\mathsf{set}(\mathbb{N},I)$, where $I:\mathbb{N}\to V$ is given by the recursion $I(0):\!\!\equiv\emptyset$ and $I(n+1):\!\!\equiv I(n)\cup\{I(n)\}$.

5. 5.

Union: Take any $v:V$ and any presentation $f:A\to V$ with $v=\mathsf{set}(A,f)$. Then let $\tilde{A}:\!\!\equiv\mathchoice{\sum_{a:A}\,}{\mathchoice{{\textstyle\sum_{(a:% A)}}}{\sum_{(a:A)}}{\sum_{(a:A)}}{\sum_{(a:A)}}}{\mathchoice{{\textstyle\sum_{% (a:A)}}}{\sum_{(a:A)}}{\sum_{(a:A)}}{\sum_{(a:A)}}}{\mathchoice{{\textstyle% \sum_{(a:A)}}}{\sum_{(a:A)}}{\sum_{(a:A)}}{\sum_{(a:A)}}}[fa]$, where $m_{fa}:[fa]\rightarrowtail V$ is the type of members from \autorefdef:TypeOfElements. $\tilde{A}$ is plainly $\mathcal{U}$-small, and we have $\cup v:\!\!\equiv\mathsf{set}(\tilde{A},{\lambda}x.\,m_{f(\mathsf{pr}_{1}(x))}% (\mathsf{pr}_{2}(x)))$.

6. 6.

Function set: given $u,v:V$, take the types of elements $[u]\rightarrowtail V$ and $[u]\rightarrowtail V$, and the function type $[u]\to[v]$. We want to define a map

 $r:([u]\to[v])\ \longrightarrow\ V$

with “$r(f)=\setof{{\mathopen{}(x,f(x))\mathclose{}}|x:[u]}$”, but in order for this to make sense we must first define the ordered pair ${\mathopen{}(x,y)\mathclose{}}$, and then we take the map $r^{\prime}:x\mapsto{\mathopen{}(x,f(x))\mathclose{}}$, and then we can put $r(f):\!\!\equiv\mathsf{set}([u],r^{\prime})$. But the ordered pair can be defined in terms of unordered pairing as usual.

7. 7.

$\in$-induction: let $C:V\to\mathsf{Prop}$ be a class such that $C(a)$ holds whenever $C(x)$ for all $x\in a$, and take any $v=\mathsf{set}(B,g)$. To show that $C(v)$ by induction, assume that $C(g(b))$ for all $b:B$. For every $x\in v$ there merely exists some $b:B$ with $x=g(b)$, and so $C(x)$. Thus $C(v)$.

8. 8.

Replacement: the statement “$C$ is a $V$-set” is a mere proposition, so we may proceed by induction as follows. Supposing $x$ is $\mathsf{set}(A,f)$, we claim that $w:\!\!\equiv\mathsf{set}(A,r\circ f)$ is the set we are looking for. If $C(y)$ then there merely exists $z:V$ and $a:A$ such that $z=f(a)$ and $y=r(z)$, therefore $y\in w$. Conversely, if $y\in w$ then there merely exists $a:A$ such that $y=r(f(a))$, so if we take $z:\!\!\equiv f(a)$ we see that $C(y)$ holds.

9. 9.

Let us say that a class $C:V\to\mathsf{Prop}$ is if for any $a:V$ the class

 $a\cap C:\!\!\equiv\setof{x|x\in a\wedge C(x)}$

is a $V$-set. We need to show that any $\mathcal{U}$-small $C:V\to\mathsf{Prop}_{\mathcal{U}}$ is separable. Indeed, given $a=\mathsf{set}(A,f)$, let $A^{\prime}=\exists(x:A).\,C(fx)$, and take $f^{\prime}=f\circ i$, where $i:A^{\prime}\to A$ is the obvious inclusion. Then we can take $a^{\prime}=\mathsf{set}(A^{\prime},f^{\prime})$ and we have $x\in a\wedge C(x)\Leftrightarrow x\in a^{\prime}$ as claimed. We needed the assumption that $C$ lands in $\mathcal{U}$ in order for $A^{\prime}=\exists(x:A).\,C(fx)$ to be in $\mathcal{U}$.∎

It is also convenient to have a strictly syntactic criterion of separability, so that one can read off from the expression for a class that it produces a $V$-set. One such familiar condition is being “$\Delta_{0}$”, which means that the expression is built up from equality $x=_{V}y$ and membership $x\in y$, using only mere-propositional connectives $\neg$, $\land$, $\lor$, $\Rightarrow$ and quantifiers $\forall$, $\exists$ over particular sets, i.e. of the form $\exists(x\in a)$ and $\forall(y\in b)$ (these are called quantifiers).

###### Corollary 10.5.8.

If the class $C:V\to\mathsf{Prop}$ is $\Delta_{0}$ in the above sense, then it is separable.

###### Proof.

Recall that we have a $\mathcal{U}$-small resizing $x\sim y$ of identity $x=y$. Since $x\in y$ is defined in terms of $x=y$, we also have a $\mathcal{U}$-small resizing of membership

 $x\mathrel{\widetilde{\in}}\mathsf{set}(A,f):\!\!\equiv\exists(a:A).\,x\sim f(a).$

Now, let $\Phi$ be a $\Delta_{0}$ expression for $C$, so that as classes $\Phi=C$ (strictly speaking, we should distinguish expressions from their meanings, but we will blur the difference). Let $\widetilde{\Phi}$ be the result of replacing all occurrences of $=$ and $\in$ by their resized equivalents $\sim$ and $\mathrel{\widetilde{\in}}$. Clearly then $\widetilde{\Phi}$ also expresses $C$, in the sense that for all $x:V$, $\widetilde{\Phi}(x)\Leftrightarrow C(x)$, and hence $\widetilde{\Phi}=C$ by univalence. It now suffices to show that $\widetilde{\Phi}$ is $\mathcal{U}$-small, for then it will be separable by the theorem.

We show that $\widetilde{\Phi}$ is $\mathcal{U}$-small by induction on the construction of the expression. The base cases are $x\sim y$ and $x\mathrel{\widetilde{\in}}y$, which have already been resized into $\mathcal{U}$. It is also clear that $\mathcal{U}$ is closed under the mere-propositional operations (and $(-1)$-truncation), so it just remains to check the bounded quantifiers $\exists(x\in a)$ and $\forall(y\in b)$. By definition,

 $\displaystyle\exists(x\in a)P(x)$ $\displaystyle:\!\!\equiv\Bigl{\|}\mathchoice{\sum_{x:V}\,}{\mathchoice{{% \textstyle\sum_{(x:V)}}}{\sum_{(x:V)}}{\sum_{(x:V)}}{\sum_{(x:V)}}}{% \mathchoice{{\textstyle\sum_{(x:V)}}}{\sum_{(x:V)}}{\sum_{(x:V)}}{\sum_{(x:V)}% }}{\mathchoice{{\textstyle\sum_{(x:V)}}}{\sum_{(x:V)}}{\sum_{(x:V)}}{\sum_{(x:% V)}}}(x\mathrel{\widetilde{\in}}a\land P(x))\Bigr{\|},$ $\displaystyle\forall(y\in b)P(x)$ $\displaystyle:\!\!\equiv\mathchoice{\prod_{x:V}\,}{\mathchoice{{\textstyle% \prod_{(x:V)}}}{\prod_{(x:V)}}{\prod_{(x:V)}}{\prod_{(x:V)}}}{\mathchoice{{% \textstyle\prod_{(x:V)}}}{\prod_{(x:V)}}{\prod_{(x:V)}}{\prod_{(x:V)}}}{% \mathchoice{{\textstyle\prod_{(x:V)}}}{\prod_{(x:V)}}{\prod_{(x:V)}}{\prod_{(x% :V)}}}(x\mathrel{\widetilde{\in}}a\to P(x)).$

Let us consider $\mathopen{}\left\|\mathchoice{\sum_{x:V}\,}{\mathchoice{{\textstyle\sum_{(x:V)% }}}{\sum_{(x:V)}}{\sum_{(x:V)}}{\sum_{(x:V)}}}{\mathchoice{{\textstyle\sum_{(x% :V)}}}{\sum_{(x:V)}}{\sum_{(x:V)}}{\sum_{(x:V)}}}{\mathchoice{{\textstyle\sum_% {(x:V)}}}{\sum_{(x:V)}}{\sum_{(x:V)}}{\sum_{(x:V)}}}(x\mathrel{\widetilde{\in}% }a\land P(x))\right\|\mathclose{}$. Although the body $(x\mathrel{\widetilde{\in}}a\land P(x))$ is $\mathcal{U}$-small since $P(x)$ is so by the inductive hypothesis, the quantification over $V$ need not stay inside $\mathcal{U}$. However, in the present case we can replace this with a quantification over the type $[a]\rightarrowtail V$ of members of $a$, and easily show that

 $\mathchoice{\sum_{x:V}\,}{\mathchoice{{\textstyle\sum_{(x:V)}}}{\sum_{(x:V)}}{% \sum_{(x:V)}}{\sum_{(x:V)}}}{\mathchoice{{\textstyle\sum_{(x:V)}}}{\sum_{(x:V)% }}{\sum_{(x:V)}}{\sum_{(x:V)}}}{\mathchoice{{\textstyle\sum_{(x:V)}}}{\sum_{(x% :V)}}{\sum_{(x:V)}}{\sum_{(x:V)}}}(x\mathrel{\widetilde{\in}}a\land P(x))=% \mathchoice{\sum_{x:[a]}\,}{\mathchoice{{\textstyle\sum_{(x:[a])}}}{\sum_{(x:[% a])}}{\sum_{(x:[a])}}{\sum_{(x:[a])}}}{\mathchoice{{\textstyle\sum_{(x:[a])}}}% {\sum_{(x:[a])}}{\sum_{(x:[a])}}{\sum_{(x:[a])}}}{\mathchoice{{\textstyle\sum_% {(x:[a])}}}{\sum_{(x:[a])}}{\sum_{(x:[a])}}{\sum_{(x:[a])}}}P(x).$

The right-hand side does remain in $\mathcal{U}$, since both $[a]$ and $P(x)$ are in $\mathcal{U}$. The case of $\mathchoice{\prod_{x:V}\,}{\mathchoice{{\textstyle\prod_{(x:V)}}}{\prod_{(x:V)% }}{\prod_{(x:V)}}{\prod_{(x:V)}}}{\mathchoice{{\textstyle\prod_{(x:V)}}}{\prod% _{(x:V)}}{\prod_{(x:V)}}{\prod_{(x:V)}}}{\mathchoice{{\textstyle\prod_{(x:V)}}% }{\prod_{(x:V)}}{\prod_{(x:V)}}{\prod_{(x:V)}}}(x\mathrel{\widetilde{\in}}a\to P% (x))$ is analogous, using $\mathchoice{\prod_{x:V}\,}{\mathchoice{{\textstyle\prod_{(x:V)}}}{\prod_{(x:V)% }}{\prod_{(x:V)}}{\prod_{(x:V)}}}{\mathchoice{{\textstyle\prod_{(x:V)}}}{\prod% _{(x:V)}}{\prod_{(x:V)}}{\prod_{(x:V)}}}{\mathchoice{{\textstyle\prod_{(x:V)}}% }{\prod_{(x:V)}}{\prod_{(x:V)}}{\prod_{(x:V)}}}(x\mathrel{\widetilde{\in}}a\to P% (x))=\mathchoice{\prod_{x:[a]}\,}{\mathchoice{{\textstyle\prod_{(x:[a])}}}{% \prod_{(x:[a])}}{\prod_{(x:[a])}}{\prod_{(x:[a])}}}{\mathchoice{{\textstyle% \prod_{(x:[a])}}}{\prod_{(x:[a])}}{\prod_{(x:[a])}}{\prod_{(x:[a])}}}{% \mathchoice{{\textstyle\prod_{(x:[a])}}}{\prod_{(x:[a])}}{\prod_{(x:[a])}}{% \prod_{(x:[a])}}}P(x)$. ∎

We have shown that in type theory with a universe $\mathcal{U}$, the cumulative hierarchy $V$ is a model of a “constructive set theory” with many of the standard axioms. However, as far as we know, it lacks the strong collection and subset collection axioms which are included in Constructive Zermelo–Fraenkel Set Theory [AczelCZF]. In the usual interpretation of this set theory into type theory, these two axioms are consequences of the setoid-like definition of equality; while in other constructed models of set theory, strong collection may hold for other reasons. We do not know whether either of these axioms holds in our model $(V,\in)$, but it seems unlikely. Since $V$ is a higher inductive type inside the system, rather than being an external construction, it is not surprising that it differs in some ways from prior interpretations.

Finally, consider the result of adding the axiom of choice for sets to our type theory, in the form $\mathsf{AC}$ from \autorefsubsec:emacinsets above. This has the consequence that $\mathsf{LEM}$ then also holds, by \autorefthm:1surj_to_surj_to_pem, and so $\set$ is a topos with subobject classifier $\mathbf{2}$, by \autorefthm:settopos. In this case, we have $\mathsf{Prop}=\mathbf{2}:\mathcal{U}$, and so all classes are separable. Thus we have shown:

###### Lemma 10.5.9.

In type theory with $\mathsf{AC}$, the law of (full) separation holds for $V$: given any class $C:V\to\mathsf{Prop}$ and $a:V$, the class $a\cap C$ is a $V$-set.

###### Theorem 10.5.10.

In type theory with $\mathsf{AC}$ and a universe $\mathcal{U}$, the cumulative hierarchy $V$ is a model of Zermelo–Fraenkel set theory with choice, ZFC.

###### Proof.

We have all the axioms listed in \autorefthm:VisCST, plus full separation, so we just need to show that there are power sets $\mathcal{P}(a):V$ for all $a:V$. But since we have $\mathsf{LEM}$ these are simply function types $\mathcal{P}(a)=(a\to\mathbf{2})$. Thus $V$ is a model of Zermelo–Fraenkel set theory ZF. We leave the verification of the set-theoretic axiom of choice from $\mathsf{AC}$ as an easy exercise. ∎

Title 10.5 The cumulative hierarchy
\metatable