11.2 Dedekind reals
Let us first recall the basic idea of Dedekind’s construction. We use twosided Dedekind cuts, as opposed to an often used onesided version, because the symmetry makes constructions more elegant, and it works constructively as well as classically. A Dedekind cut consists of a pair $(L,U)$ of subsets $L,U\subseteq \mathbb{Q}$, called the lower and upper cut respectively, which are:

1.
inhabited: there are $q\in L$ and $r\in U$,

2.
rounded: $$ and $$,

3.
disjoint: $\mathrm{\neg}(q\in L\wedge q\in U)$, and

4.
located: $$.
Reading the roundedness condition from left to right tells us that cuts are open, and from right to left that they are lower, respectively upper, sets. The locatedness condition states that there is no large gap between $L$ and $U$. Because cuts are always open, they never include the “point in between”, even when it is rational. A typical Dedekind cut looks like this:
{tikzpicture}[x=] \draw[¡),line width=0.75pt] (0,0) – (0.297,0) node[anchor=south east]$L$; \draw[(¿,line width=0.75pt] (0.300, 0) node[anchor=south west]$U$ – (0.9, 0) ;
We might naively translate the informal definition into type theory^{} by saying that a cut is a pair of maps $L,U:\mathbb{Q}\to \mathrm{\U0001d5af\U0001d5cb\U0001d5c8\U0001d5c9}$. But we saw in \autorefsubsec:propsubsets that $\mathrm{\U0001d5af\U0001d5cb\U0001d5c8\U0001d5c9}$ is an ambiguous notation for ${\mathrm{\U0001d5af\U0001d5cb\U0001d5c8\U0001d5c9}}_{{\mathcal{U}}_{i}}$ where ${\mathcal{U}}_{i}$ is a universe^{}. Once we use a particular ${\mathcal{U}}_{i}$ to define cuts, the type of reals will reside in the next universe ${\mathcal{U}}_{i+1}$, a property of reals two levels higher in ${\mathcal{U}}_{i+2}$, a property of subsets of reals in ${\mathcal{U}}_{i+3}$, etc. In principle we should be able to keep track of the universe levels, especially with the help of a proof assistant, but doing so here would just burden us with bureaucracy that we prefer to avoid. We shall therefore make a simplifying assumption^{} that a single type of propositions $\mathrm{\Omega}$ is sufficient for all our purposes.
In fact, the construction of the Dedekind reals is quite resilient to logical manipulations. There are several ways in which we can make sense of using a single type $\mathrm{\Omega}$:

1.
We could identify $\mathrm{\Omega}$ with the ambiguous $\mathrm{\U0001d5af\U0001d5cb\U0001d5c8\U0001d5c9}$ and track all the universes that appear in definitions and constructions.

2.
We could assume the propositional resizing axiom, as in \autorefsubsec:propsubsets, which essentially collapses the ${\mathrm{\U0001d5af\U0001d5cb\U0001d5c8\U0001d5c9}}_{{\mathcal{U}}_{i}}$’s to the lowest level, which we call $\mathrm{\Omega}$.

3.
A classical mathematician who is not interested in the intricacies of typetheoretic universes or computation may simply assume the law of excluded middle^{} (LABEL:eq:lem) for mere propositions so that $\mathrm{\Omega}\equiv \mathrm{\U0001d7d0}$. This not only eradicates questions about levels of $\mathrm{\U0001d5af\U0001d5cb\U0001d5c8\U0001d5c9}$, but also turns everything we do into the standard classical construction of real numbers.

4.
On the other end of the spectrum one might ask for a minimal^{} requirement that makes the constructions work. The condition that a mere predicate^{} be a Dedekind cut is expressible using only conjunctions^{}, disjunctions^{}, and existential quantifiers^{} over $\mathbb{Q}$, which is a countable set. Thus we could take $\mathrm{\Omega}$ to be the initial $\sigma $frame, i.e., a lattice^{} with countable^{} joins in which binary meets distribute over countable joins. (The initial $\sigma $frame cannot be the twopoint lattice $\mathrm{\U0001d7d0}$ because $\mathrm{\U0001d7d0}$ is not closed under^{} countable joins, unless we assume excluded middle.) This would lead to a construction of $\mathrm{\Omega}$ as a higher inductiveinductive type, but one experiment of this kind in \autorefsec:cauchyreals is enough.
In all of the above cases $\mathrm{\Omega}$ is a set. Without further ado, we translate the informal definition into type theory. Throughout this chapter, we use the logical notation from \autorefdefn:logicalnotation.
Definition 11.2.1.
A Dedekind cut is a pair $\mathrm{(}L\mathrm{,}U\mathrm{)}$ of mere predicates $L\mathrm{:}\mathrm{Q}\mathrm{\to}\mathrm{\Omega}$ and $U\mathrm{:}\mathrm{Q}\mathrm{\to}\mathrm{\Omega}$ which is:

1.
inhabited: $\exists (q:\mathbb{Q}).L(q)$ and $\exists (r:Q).U(r)$,

2.
rounded: for all $q,r:\mathbb{Q}$,
$L(q)$ $$ $U(r)$ $$ 
3.
disjoint: $\mathrm{\neg}(L(q)\wedge U(q))$ for all $q:\mathbb{Q}$,

4.
located: $$ for all $q,r:\mathbb{Q}$.
We let $\mathrm{isCut}\mathit{}\mathrm{(}L\mathrm{,}U\mathrm{)}$ denote the conjunction of these conditions. The type of Dedekind reals is
$${\mathbb{R}}_{\U0001d5bd}:\equiv \text{setof}(L,U):(\mathbb{Q}\to \mathrm{\Omega})\times (\mathbb{Q}\to \mathrm{\Omega})\mathrm{\U0001d5c2\U0001d5cc\U0001d5a2\U0001d5ce\U0001d5cd}(L,U).$$ 
It is apparent that $\mathrm{\U0001d5c2\U0001d5cc\U0001d5a2\U0001d5ce\U0001d5cd}(L,U)$ is a mere proposition, and since $\mathbb{Q}\to \mathrm{\Omega}$ is a set the Dedekind reals form a set too. See \autorefex:RDextendedreals,ex:RDlowercuts,ex:RDintervalarithmetic for variants of Dedekind cuts which lead to extended reals, lower and upper reals, and the interval domain.
There is an embedding^{} $\mathbb{Q}\to {\mathbb{R}}_{\U0001d5bd}$ which associates with each rational $q:\mathbb{Q}$ the cut $({L}_{q},{U}_{q})$ where
$$ 
We shall simply write $q$ for the cut $({L}_{q},{U}_{q})$ associated with a rational number.
Title  11.2 Dedekind reals 

\metatable 