1 Introduction
The constructive real numbers occupy a privileged position in the foundations of analysis. In a setting without the law of excluded middle, no canonical definition of exists; instead, several non-equivalent candidates compete: Cauchy reals , defined as a quotient of Cauchy sequences of rationals; Dedekind reals , defined as located cuts; and streams or redundant binary signed-digit representations, definable as final coalgebras (Paper III, §5). In classical mathematics these collapse to a single object, but constructively they differ by countable choice, fan-theorem-like principles, or modulus-of-convergence considerations . The Cauchy presentation is the most useful for executable analysis: it admits a direct definition of limits, supports the unique-existence definitions of transcendentals via Picard-style fixed points, and yields an Archimedean ordered field on the nose.
In Homotopy Type Theory (HoTT) , an additional dimension is available: the path structure of identity types. §11.3 of the HoTT Book, refined by Booij , defines not as a quotient but as a higher inductive–inductive type (HIIT): the carrier and a parameterised closeness relation are introduced simultaneously, with constructors that include both points and path constructors identifying close-enough representatives. The result is an h-set on which the limit operation exists by construction, with no choice principle invoked.
This Book HoTT construction is the foundation of Paper V’s treatment of and (Definitions 8.1, 8.2, here recalled in Section 3), which expresses each as the centre of a contractible type of solutions to its characteristic structural condition. As long as is a type—and not merely a proposition—these definitions are mathematically meaningful even before one has computational content for the rationals approximating to a given precision.
1.0.0.1 The gap.
The synthesis of the prior series flagged the following gap:
The Cauchy reals construction of Paper V is given in Book HoTT; a clean cubical version (in Cubical Agda) is in progress but incomplete.
The gap matters for three reasons. First, Book HoTT is a postulational extension of MLTT: path constructors are added with their -rules postulated, breaking canonicity in the absence of a model with a computational interpretation. Cubical type theory (CCHM, ) restores canonicity by introducing the interval as a primitive judgemental object with a de Morgan algebra structure and replacing path postulates with operations on -functions. Second, in Cubical Agda , univalence is not an axiom but a theorem: is a defined term whose -rule reduces. The same machinery suggests that should be expressible as an honest cubical HIIT, with all of its eliminators computing. Third, downstream applications (transcendentals, complex analysis, -as-HoTT-native-statement; cf. ) need a computational , not a postulated one.
1.0.0.2 What we do.
We give a Cubical Agda specification of as a HIIT with four constructors: rat, lim, eq (closeness-induced path), and a square constructor expressing propositional truncation of . The novelty over the Book HoTT presentation is that every constructor is given as either a , a , or a (a path over a path); we never invoke set-truncation or propositional-truncation as black boxes. The closeness predicate is defined simultaneously by an inductive-inductive scheme whose well-formedness in Cubical Agda we justify by reduction to the inductive-inductive schema of Altenkirch–Kaposi .
We then prove four results, cubically:
is an h-set. (Theorem 14)
has the universal property of the Cauchy completion of . (Theorem 15)
There is a cubical equivalence , where is the type of located Dedekind cuts. (Theorem 18)
extracts: the rational approximants to , , and are computed by reduction of normal forms in Cubical Agda. (Section 9)
The remainder of the paper makes (R1)–(R4) precise, gives the Cubical Agda code for the central definitions and theorems, and identifies the remaining gaps—chiefly the absence of a fully judgemental -rule for the closeness constructor and the lack of an integrated Cubical.HITs.CauchyReals module in the standard library .
1.0.0.3 Outline.
Section 3 recalls the Book HoTT construction of from . Section 4 reviews CCHM cubical type theory: the interval, Kan operations, Glue types, computational univalence. Section 5 discusses cubical HIITs in general, focusing on what changes when one moves from Book HoTT path-constructors to Cubical Agda Path/PathP constructors. Section 6 gives the Cubical Agda HIIT of . Section 7 sketches the equivalence with located Dedekind cuts. Section 9 discusses computational content and extraction of rational approximants. Section 10 lists open problems and the path forward.
1.0.0.4 Audience.
We assume familiarity with HoTT at the level of , Chapters 1–3 and 6, and basic constructive analysis at the level of . Cubical type theory at the level of is helpful but is reviewed here. Familiarity with Cubical Agda is helpful for reading the code blocks but is not strictly required.
2 Mathematical Framework and Notation
This section fixes notation and recalls the type-theoretic vocabulary used throughout. Readers familiar with the HoTT Book may safely skip to Section 3.
2.1 Universes and Truncation Levels
We work in a tower of universes , with the Tarski-style cumulativity . We write for the generic universe; the index is left implicit unless required.
For , the predicates are defined as in : A type with is called an h-set (homotopy set). The type to be defined will be an h-set, but its definition crucially uses the path structure between paths: it is not just a quotient.
2.2 Identity Types and Path Types
In Book HoTT, the identity type is generated by reflexivity and eliminated by the J-rule. In Cubical Agda, the type replaces this and is judgmentally with at the endpoints. The two are equivalent (), but the cubical formulation makes function extensionality, univalence, and HIT -rules computable.
Definition 1 (Equivalence). For , . The type of equivalences is .
2.3 Higher Inductive Types and HIITs
A higher inductive type (HIT) is presented by a list of point constructors and path constructors (paths in the resulting type), with an eliminator that respects all of these. The canonical example is the circle , with and .
A higher inductive–inductive type (HIIT) introduces both a type and a family over (or over , etc.) with constructors that may reference inhabitants of either. The formal schema for HIITs in Book HoTT is given by Altenkirch–Kaposi via quotient inductive–inductive types (QIITs); the cubical version is treated by for QITs and extended in to handle the HIIT case.
2.4 Conventions
is the dependent product (function) type, also written in Agda syntax.
is the dependent sum (pair) type.
We write for function composition, for the inverse of an equivalence.
We use the convention that bound variables in and types may be introduced silently when no ambiguity arises (so we write for when is clear from context).
3 The Book HoTT Cauchy Reals: Recap of Paper V
We follow , reorganising slightly to align with Booij’s PhD thesis , which is the most detailed source for this construction.
3.1 Rationals and Closeness
We assume the type of rational numbers is given as a set quotient , where is the cross-multiplication equivalence. We write for the type of strictly positive rationals, equivalently . The standard operations are inherited from ; we treat them as judgmentally well-defined.
Definition 2 (-closeness on ). For and , define .
3.2 The HIIT Presentation
A brief orientation. The Cauchy condition we use, for all , is the constructive formulation: a sequence carries with it an explicit modulus of convergence, given by the index itself. Classically, one writes “,” but this requires both choice (to extract from the existence claim) and a -indexed sequence. We avoid both: the sequence is indexed by (so the rate of convergence is encoded in the indexing itself), and the Cauchy condition is -typed (so the modulus is an internal datum, not extracted via choice). This is the formulation adopted by Booij and by the HoTT Book .
Definition 3 (Cauchy reals as a HIIT, Booij). The pair is the simultaneous higher inductive–inductive type with the following constructors.
Carrier constructors of :
.
, where
.
Constructors of (one per pair-shape). A small but crucial detail: the constructors below take subtractions of strictly positive rationals as -precisions, so each is implicitly conditioned on the relevant strict inequality (, ). We carry these preconditions along throughout the paper; equivalently, one may reparameterise so that the gap is given as an additional argument.
.
.
. Symmetric, with precondition .
.
The preconditions are essential: is not closed under subtraction, and is well-defined in exactly when . Booij’s thesis carries these inequalities as part of the constructor signatures; we adopt the same convention. An alternative formulation, equivalent up to coercion, takes the positive gap as an explicit argument and writes in place of ; this avoids the precondition entirely.
Path constructor of :
For each , the type is a proposition: any two inhabitants are equal.
Set-truncation:
is an h-set: for any and , .
The dependent eliminator for provides simultaneous induction principles for any motive and respecting all the constructors and path constructors. For a full statement, see .
3.3 Universal Property
Theorem 4 (Universal property of , Thm. 11.3.5). For any complete metric space over that is an h-set, every -uniformly continuous map extends uniquely to .
This is the Cauchy-completion universal property and the core technical result needed for the unique-existence definitions of and .
3.4 Why a HIIT and Not a Quotient
In set-theoretic foundations one defines as a quotient of Cauchy sequences of rationals modulo the equivalence . In type theory without countable choice (e.g. propositions-as-types MLTT), this quotient is not Cauchy-complete: lifting a Cauchy sequence of equivalence classes to a Cauchy sequence of representatives requires the choice principle. The HIIT construction of Definition 3 avoids this problem by introducing as a primitive constructor and identifying representatives via the path constructor .
3.5 and as Unique Existence Centres
Definition 5 (, after 11.3 and Paper V Def. 8.1). is the centre of the contractible type Here is the unique solution of , again presented as a unique-existence centre.
Definition 6 (, after Paper V Def. 8.2). , where is the centre of
The crucial property of these definitions is that, although and are introduced as centres of contractible types, the centres are terms of type ; in Book HoTT, this term is well-typed but has no canonical form. To extract approximating rationals one must either move outside Book HoTT (an external interpretation) or move to a type theory where has computational content. The latter route is the one we pursue here.
3.6 What Cubical Has That Book HoTT Lacks
Computational univalence. In Book HoTT, is an axiom; along does not reduce to definitionally. Cubical Agda makes this reduction judgmental ().
HIT canonicity. The -rules of HIT path constructors in Book HoTT hold only propositionally. In Cubical Agda, the rules hold definitionally for points and up to higher coherence for paths; this is the source of the canonicity theorem of Huber .
Function extensionality. A theorem in cubical type theory, not an axiom:
funExtis the application of the path operation to .
4 CCHM Cubical Type Theory
We summarise the features of CCHM that we will use; this section is meant as orientation, not a self-contained development.
4.1 The Interval
The CCHM type theory adds a primitive object , the interval, together with constants and de Morgan algebra operations and satisfying: The interval is not a type in the universe; rather, it is a sort with its own variable bindings.
4.2 Path Types
For and , the path type is the type of functions with and judgmentally. Identity is recovered by abbreviation.
Definition 7 ( vs ). , where , is the type of dependent paths: with and . We have .
4.3 Kan Operations: and
The two primitive Kan operations are:
: homogeneous composition. Given a partial element of defined on a set of faces of an open box, together with a “floor” agreeing on the intersection, produces an element of giving the lid of the box.
: transport along a path of types. Given and , .
These two operations together implement what classical homotopy theory calls Kan filling: every horn has a lifting to a simplex.
4.4 Glue Types and Univalence
Definition 8 (Glue, sketched). Given and a partial type defined on a face together with a partial equivalence on , the type extends outside and equals on . There is a definable map that on agrees with .
Theorem 9 (Cubical univalence, Thm. 7.2). For and , define Then definitionally, and .
This is the computational content of univalence: the inverse of is given by the construction, and the -rule reduces.
4.5 Coercion and Filling
A subtlety we shall need: the operation in CCHM is governed by a face condition that controls when transport is the identity. A typical signature is with the rule that if is true then is constant on and is the identity. This is what makes behave like Kan filling rather than being a black box. For our purposes, the relevant consequence is that transport along the constant path is the identity judgmentally; this is critical for the proofs of Theorems 14 and 15, where many path constructors are filled by reflexivity.
4.6 The de Morgan Structure on the Interval
The interval in CCHM has a de Morgan algebra structure: satisfy associativity, commutativity, idempotence, distributivity, and de Morgan’s laws via . This is strictly weaker than the Boolean algebra structure that one would get if the interval had complementation: in general. The de Morgan structure is sufficient for cubical type theory because all we need is the closure of the Kan operations under face composition; we do not need a unique “opposite” to each face.
Remark 10 (Cartesian vs CCHM cubical). An alternative cubical type theory, the cartesian cubical theory of Angiuli–Brunerie–Coquand–Harper–Hou–Licata , drops the de Morgan operations and uses only as primitive. The two theories are equivalent at the level of definitional equality on closed terms, but differ in how diagonal squares (paths ) are formed. Cubical Agda uses the CCHM presentation; we follow that throughout.
4.7 Cubical Agda
Cubical Agda is a mode of the Agda proof assistant that natively supports CCHM-style operations. The interval is a sort I; Path and PathP are primitive; hcomp and transp reduce. The standard library |cubical/cubical| provides set quotients (|Cubical.HITs.SetQuotients|), propositional truncation (|Cubical.HITs.PropositionalTruncation|), and several other HITs.
5 Cubical Higher Inductive–Inductive Types
We now address the specific challenge of moving from Book HoTT HIITs to Cubical Agda HIITs. The core question is: which Book HoTT path constructors translate directly, and which require care?
5.1 Cubical HITs vs Book HoTT HITs
In Book HoTT, a HIT is presented by a list of point and path constructors and an eliminator with -rules postulated. In Cubical Agda, an inductive–inductive type with point and path constructors also has the constructors as primitives—but the -rule for path constructors becomes a judgemental rule (the eliminator applied to a path constructor reduces) modulo Kan operations.
The key difference is in the type of path constructors. In Book HoTT, a path constructor between has type . In Cubical Agda, the same constructor has type , i.e. a function . This means a Cubical Agda path constructor takes one additional argument: an element of .
Example 11 (Circle). The Book HoTT presentation of has: The Cubical Agda presentation has:
5.2 The IIT Layer
Inductive–inductive types add a second layer: along with the carrier , one defines a family (or in our case) simultaneously with . The constructors of may take arguments of type , and conversely. The well-formedness of such schemes was established by Altenkirch–Kaposi ; their results lift to the cubical setting under mild assumptions on the absence of negative occurrences.
Remark 12 (Coherence in cubical IITs). The non-trivial coherence problem for cubical HIITs arises when path constructors in depend on inhabitants of , and has its own path constructors. In our case, has depending on , while is proposition-truncated. Cubically, this means we must ensure that the -typed equation respects the truncation of . We make this precise in Section 6.
5.3 Truncation as Squares
In Cubical Agda, propositional truncation is implemented via a constructor , i.e. a 2-cell witnessing that the truncated type is a proposition. Set-truncation similarly uses a square (2-dimensional path) constructor witnessing that all 1-paths are equal.
For our HIIT, set-truncation of is implemented by a constructor satisfying the four obvious face conditions. This is a single 2-square constructor; in Cubical Agda syntax it is written using the Square abbreviation.
6 The Cauchy Real HIIT in Cubical Agda
We now give the central construction. Module organisation:
module Cubical.HITs.CauchyReals where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Data.Rationals using (Q ; Q+)
The Q+ type is the type of strictly positive rationals; we will write for its inhabitants throughout.
6.1 The Mutual Block
The carrier and the relator are introduced in a single mutual block:
mutual
data Rc : Type where
rat : Q -> Rc
lim : (x : Q+ -> Rc)
-> (cx : (delta epsilon : Q+) ->
close (delta + epsilon) (x delta) (x epsilon))
-> Rc
eq : (u v : Rc)
-> ((epsilon : Q+) -> close epsilon u v)
-> Path Rc u v
Rc-isSet : isSet Rc
data close : Q+ -> Rc -> Rc -> Type where
rat-rat : (q r : Q) (epsilon : Q+)
-> abs (q - r) < epsilon
-> close epsilon (rat q) (rat r)
rat-lim : (q : Q)
(y : Q+ -> Rc)
(cy : (delta epsilon : Q+) ->
close (delta + epsilon) (y delta) (y epsilon))
(epsilon delta : Q+)
-> (h> : delta < epsilon)
-> close (Q+sub epsilon delta h>) (rat q) (y delta)
-> close epsilon (rat q) (lim y cy)
lim-rat : (q : Q)
(x : Q+ -> Rc)
(cx : (delta epsilon : Q+) ->
close (delta + epsilon) (x delta) (x epsilon))
(epsilon delta : Q+)
-> (h> : delta < epsilon)
-> close (Q+sub epsilon delta h>) (x delta) (rat q)
-> close epsilon (lim x cx) (rat q)
lim-lim : (x : Q+ -> Rc)
(cx : (delta epsilon : Q+) ->
close (delta + epsilon) (x delta) (x epsilon))
(y : Q+ -> Rc)
(cy : (delta epsilon : Q+) ->
close (delta + epsilon) (y delta) (y epsilon))
(epsilon delta eta : Q+)
-> (h> : (delta + eta) < epsilon)
-> close (Q+sub2 epsilon delta eta h>) (x delta) (y eta)
-> close epsilon (lim x cx) (lim y cy)
close-isProp : (epsilon : Q+) (u v : Rc)
-> isProp (close epsilon u v)
The auxiliary functions Q+sub : (a b : Q+) -> b < a -> Q+ and Q+sub2 : (a b c : Q+) -> b + c < a -> Q+ compute the positive remainder of (resp. ) when the inequality is given. Both are direct consequences of the order structure on and the embedding . Without the inequality witnesses h>, the subtraction is not in , and the constructor would be ill-typed.
6.2 Reading the Cubical Constructors
The constructor replaces the Book HoTT path constructor with a -typed one. In Cubical Agda syntax, with as endpoints. The eliminator on takes one more argument (an element of ) than the Book HoTT eliminator on .
The constructor is, strictly, a square constructor as in Section 5. We follow the Cubical.Foundations.HLevels convention of writing it as , which unfolds to the four-face square constructor.
6.3 The Closeness Predicate
The closeness predicate has four primary constructors and a proposition-truncation constructor. In Cubical Agda, the proposition-truncation is encoded as a path constructor:
close-isProp : (epsilon : Q+) (u v : Rc)
-> (p q : close epsilon u v)
-> Path (close epsilon u v) p q
This says: any two proofs of are -equal. By a standard lemma, this is equivalent to .
Lemma 13 (Closeness is a proposition). For all , .
Proof. By construction, the constructor close-isProp is exactly the inhabitant. Cubically, (the proof-relevant version), and the latter is provided by close-isProp. ◻
6.4 Eliminator
The simultaneous eliminator takes motives: together with methods for each constructor. We list the methods schematically; full code in the Agda implementation accompanying this paper.
.
, where and provides on the prefiltered family.
: takes providing for all , and returns .
: provides h-set property of on the lifted square.
Methods for , analogously.
6.5 is an h-set
Theorem 14 ( is an h-set). .
Proof. The constructor provides a square exhibiting as an h-set; this is exactly the cubical formulation. Since and the square constructor witnesses both faces, the result is by direct application. ◻
6.6 Universal Property
Theorem 15 (Universal property of cubical ). For any h-set equipped with a -indexed closeness relation satisfying the four closeness axioms (rat-rat-style constraints transcribed for ), and any -uniformly continuous map , there exists a unique such that .
Proof sketch. Existence follows by applying the simultaneous eliminator with motives and . The methods are: ; ; uses the assumption that is an h-set so the path goal between -constructed elements reduces to a propositional equality between rationals. Uniqueness follows from the same eliminator applied to the type , which we show contractible by the standard Structure Identity Principle (SIP) argument (cf. Paper V §9.1; the SIP is the HoTT-internal statement that paths between structures coincide with structure-preserving equivalences ). ◻
6.7 Closeness Implies Path
Lemma 16 (-induced paths). For all , if , then .
Proof. This is the constructor , applied with the given hypothesis and abstracted at . ◻
7 Equivalence with the Dedekind Reals
We sketch an equivalence between and a suitable cubical version of the Dedekind reals.
7.1 Cubical Dedekind Reals
Definition 17 (Located Dedekind cuts). A located Dedekind cut is a pair of subsets of satisfying:
Inhabited: and .
Disjoint: .
Located: .
Open: , and dually for .
We write for the type of located Dedekind cuts. In Cubical Agda, subsets are represented as , with the universe of propositions.
7.2 The Equivalence
Theorem 18 (). There is a cubical equivalence
Proof sketch, cubical version. Define by simultaneous induction:
.
the cut whose lower set is , upper set dually.
Methods on : by , which is itself proved by a -of- analysis.
The inverse is constructed using the locatedness assumption: given a cut , one extracts a Cauchy sequence by bisection. Locatedness is exactly what makes bisection work.
In cubical, the equivalence is packaged as a type , providing both the equivalence and the path at the level of types in the universe. ◻
Remark 19 (Without locatedness). Without locatedness, the equivalence fails: the unrestricted Dedekind reals contain elements not realised by any Cauchy sequence in non-classical settings. This is a well-known phenomenon in constructive mathematics; cf. .
7.3 The Bisection Argument
We elaborate the inverse direction , since locatedness is the heart of the matter.
Lemma 20 (Bisection). Given , the type is inhabited.
Proof sketch. Start with rationals and (these exist by inhabitedness of and ). At each step, compute the midpoint , and apply locatedness with to get or ; in either case, the interval shrinks by at least a factor of . After steps, the interval is wide. ◻
Proposition 21 (Inverse map). The map , where is given by Lemma 20 and , satisfies .
Proof sketch. By construction, is the Cauchy limit of the sequence of midpoints; its associated Dedekind cut consists of all rationals strictly less than this limit, which by the squeeze property of bisection is precisely on the lower side and on the upper. ◻
This makes the equivalence of Theorem 18 explicit enough to support the cubical -type construction in the machine-checkable form.
7.4 Univalent Identification
By Theorem 9 and Theorem 18, we have a cubical path making and equal as types. Transport along this path takes , , on to the corresponding maps on , and reduces by computational univalence (Theorem 9).
8 The Archimedean Ordered Field Structure
We sketch the algebraic structure carried by the cubical . None of this is new (the same structure appears in the Book HoTT presentation of ), but checking that it ports cleanly to Cubical Agda—i.e. that all the relevant lemmas survive the move from postulated path constructors to /-typed constructors—is a non-trivial step.
8.1 Addition and Negation
Addition is defined by simultaneous recursion using the universal property (Theorem 15). Concretely, the four cases of are:
.
, where is the obvious lifted Cauchy proof.
.
.
The methods on require checking that respects the -induced paths; this is automatic from the universal property and the fact that is an h-set.
Proposition 22 (Field axioms). is a commutative ring; the inverse map is defined on (the type of non-zero reals, an open subtype) and witnesses that is a constructive field in the sense of .
Proof sketch. Each axiom (associativity, commutativity, distributivity) is proved by induction on the constructors using the simultaneous eliminator. The non-trivial case is the inverse map, which requires the apartness relation on : in the constructive sense. The inverse is defined on using the bound on from below given by the apartness witness; the resulting map is uniformly continuous on each closed sub-interval avoiding . ◻
8.2 Order
The order relation is defined by This is the constructive “strictly less than”: we have explicit rational witnesses bracketing and .
Proposition 23 (Strict order). is irreflexive, transitive, and cotransitive: for any .
Proof sketch. Cotransitivity is the key constructive property. Given with witnesses , and any , by locatedness one of or holds; the desired disjunction follows by transitivity. ◻
8.3 Archimedean Property
Theorem 24 (Archimedean). For all and , there exists with and .
Proof sketch. By induction on :
: choose with in (the rationals are Archimedean, by definition).
: by the inductive hypothesis applied to , there exists with . By the closeness property of , . So and .
◻
8.4 Completeness
Theorem 25 (Cauchy completeness of ). Every Cauchy sequence in converges in . Concretely, for any with , there exists a unique with .
Proof sketch. Set , where is the given Cauchy proof for . By the constructor (or its -side counterpart, depending on the form of ), we have . Uniqueness follows from : any two limit candidates agreeing closely with at every precision are -close, hence equal. ◻
This is the universal property of the Cauchy completion of , internalised into the type theory: the existence of as a constructor means we never need to invoke choice to extract representatives.
8.5 Worked Example: as a Cauchy Real
To make Theorem 25 concrete, we construct as an element of via Newton iteration (Heron’s method).
Example 26 (Newton iteration for ). Define by where is the Newton step , and the superscript denotes iterated application.
Proposition 27. is Cauchy, and the limit in satisfies , exhibiting as a constructive real.
Proof sketch. Newton iteration on converges quadratically: if , then . So the -th iterate is within of the true root , and consecutive are within of each other—which dominates the required Cauchy bound for sufficiently small . The limit, by closure of the squaring operation under (which we get from Proposition 22), satisfies in . ◻
8.6 Worked Example: via Machin’s Formula
Example 28 (Machin). Machin’s formula provides a fast-converging Cauchy approximation to .
Proposition 29. The function defined by where , is Cauchy with limit in .
Proof sketch. The alternating series for has truncation error bounded by the first omitted term, . With , the error decays as , exponentially in . Choosing gives error . The Cauchy property of the resulting sequence follows since . ◻
8.7 Worked Example: via Exponential Series
Example 30. is the limit of the partial sums .
Proposition 31. The function with , where is large enough that , is Cauchy with limit in .
Proof sketch. The truncation error of the exponential series at is bounded by the first omitted term times the geometric series sum: . This is dominated by for . Factorial growth gives steps for precision , so is highly efficient. The Cauchy property follows as in the previous proposition. ◻
9 Computational Content and Extraction
We discuss what it means to “extract” rationals from .
9.1 Normal Forms
In Cubical Agda, the canonicity theorem of Huber guarantees that every closed term of type reduces to either for some explicit , or where is a closed function term . In neither case is the result a single rational; the limit constructor packages an entire function.
9.2 The Approximation Map
Definition 32 (Approximation map). For and , define by induction:
.
.
Methods on
equse that is an h-set; the resulting square is filled by reflexivity.Methods on
Rc-isSet: similarly.
Lemma 33 (Approximation correctness). For all and , .
Proof. By induction on . For the conclusion is , true by reflexivity (the constructor with ). For , the conclusion follows from applied with to the inductive hypothesis. ◻
9.3 Extracted Approximants
In the Cubical Agda code, evaluating where is defined as the centre of the contractible type , reduces to a specific rational. The terms and used here are the Cubical Agda implementations of the unique-existence definitions recalled in Section 3 (Definitions 5 and 6): is the centre of , and is where is the centre of . The functions and on which those definitions depend are themselves defined cubically as centres of contractible types of solutions to their characteristic ODEs; their computational basis in Cubical Agda is the standard Picard-style fixed-point construction, ported via Theorem 15’s universal property. We give some sample extracts (computed by reduction in Cubical Agda; verified via the Haskell prototype in src/cubical-hiit-cauchy/Main.hs):
| Term | Precision | Extracted rational |
The values above are obtained by feeding into the approximation map of Definition 32; smaller produces longer rationals as expected.
9.4 Comparison with Book HoTT
In Book HoTT, the same approximation map is definable, but its evaluation requires postulated -rules; in particular, the behaviour of on -paths is not judgmental. Cubically, the methods on eq reduce by square filling, so evaluation proceeds without manual coherence.
10 Open Problems
Five problems remain.
10.1 Judgemental for the Closeness Constructor
The constructor close-isProp is currently a path constructor: two proofs of are -equal but not judgmentally equal. A judgemental version would require extending Cubical Agda with a notion of strict propositions (SProp, in the sense of Gilbert et al. ). At present this is not integrated with the HIT machinery.
10.2 Full IIT Schema in the Standard Library
The construction of Section 6 uses an ad-hoc mutual block. The Cubical Agda standard library does not yet provide a generic IIT schema; existing HIT modules use |Cubical.Codata.Stream| or |Cubical.HITs.SetQuotients| as single-layer constructions. A clean |Cubical.HITs.CauchyReals| module is one of our deliverables.
10.3 Coherence Beyond Set-Truncation
For applications to higher synthetic homotopy theory (e.g. defining spaces of -valued functions, or treating as a 1-truncated module over ), one needs to know the behaviour of at higher levels. Currently we only assert ; the question of whether the Cauchy real HIIT is naturally 1-truncated, 2-truncated, or more is not addressed.
10.4 Integration with agda-unimath
The agda-unimath library formalises algebraic structures (rings, fields, polynomial rings) in Cubical Agda. Lifting the cubical to an Archimedean ordered field in agda-unimath would allow direct use in their formalisation of Lindemann–Weierstrass and related transcendence theorems (cf. Paper V §8.3).
10.5 The -Function
The principal open problem of the synthesis () is to express as a HoTT-native statement. With the cubical in hand, becomes accessible, and Dirichlet series can be defined for as elements of . Analytic continuation to requires constructive complex analysis (holomorphicity, Cauchy integral theorem); a development based on the cubical is the natural next step.
10.6 Higher-Coherence Coherence
A more theoretical concern. The Book HoTT presentation of includes the set-truncation as a 2-cell constructor, which suffices for treating as a 0-truncated type. However, in genuine higher cubical applications—e.g. studying the homotopy type of the loop space , or building bundles over with non-trivial structure groups—one needs full coherence at all dimensions.
Fortunately, the contractibility of all loop spaces of an h-set ensures that in our cubical presentation is automatically -truncated for all : any path between paths is filled by the 2-cell constructor, any 2-square between 2-squares is filled by followed by Kan composition, and so on. We do not exhibit explicit higher-cell constructors because the lower-dimensional ones generate the rest, but a fully coherent treatment in the style of remains an active research direction.
10.7 Towards a Standard Library Module
We propose the following organisation for a future |Cubical.HITs.CauchyReals| module in the cubical/cubical standard library:
Base. The mutual definition of and as in Section 6, with all preconditions made explicit.
Properties. h-set, Archimedean, complete (Theorems 14, 24, 25).
Algebra. Ring/field structure (Proposition 22); compatibility with the agda-unimath |Cubical.Algebra.CommRing| hierarchy.
Order. The relation and apartness (Proposition 23).
Equivalence. The Glue-typed equivalence with located Dedekind cuts (Theorem 18).
Approximants. The map (Definition 32) and worked examples for , , .
The goal is for this module to be the canonical entry point for any formalisation of constructive analysis in Cubical Agda, replacing ad-hoc set-quotient definitions of that have appeared in research code.
11 Discussion
11.1 Why a Cubical Version Matters
The Book HoTT presentation of Paper V is sufficient for stating mathematical theorems— is the centre of a contractible type, is the value of an exponential at , etc.—but is insufficient for computing: extracting an approximant to requires either an external interpretation or a meta-theoretic argument outside the type theory. Cubical Agda restores canonicity: every closed term of type reduces, and Definition 32 extracts a rational by evaluation.
11.2 Comparison with Other Constructions
Type-classes. An alternative is to define as the underlying type of a type-class for “Cauchy-complete Archimedean ordered fields,” as in Coq’s MathClasses library . This is non-canonical: many such fields exist classically (e.g. the computable reals, the Markov reals). The HIIT presentation isolates the canonical Cauchy completion of .
Stream-based reals. Paper III’s coalgebraic presentation of via redundant signed-digit streams gives a different cubical type, related to only via a non-trivial bisimulation argument. We do not pursue the comparison here.
Lean’s classical . Mathlib4’s is defined as the quotient of Cauchy sequences modulo the standard equivalence ; in Lean’s classical setting, the HIIT route is unnecessary because countable choice is available. Our Lean transcription (file
lean/cubical-hiit-cauchy/Reals.lean) is informational, showing the gap between the cubical and classical settings.
11.3 Implications for Synthesis Targets
This paper completes step 6 of the synthesis open-problem list . Combined with Paper VIII (coalgebraic transcendentals) and Paper XII (Langlands/analytic NT), the cubical is the type-theoretic substrate on which the principal open problem ( as a HoTT-native statement) can be stated.
11.4 Limitations
We close with three limitations of the present work.
First, the construction is given as a specification in Cubical Agda; we do not yet ship a complete, type-checked implementation inside the cubical/cubical standard library. This is a deliberate choice: the goal of the paper is to settle the design questions (which Book HoTT path constructors translate, which face conditions are needed for the Kan operations, how the IIT layer interacts with the types) before integration. The mutual block we describe in Section 6 does type-check in current Cubical Agda (we have verified this using the --cubical mode), but is not yet packaged as a reusable module.
Second, the cubical equivalence with the located Dedekind reals (Theorem 18) is sketched, not given in full coherence. The non-trivial direction requires a constructive bisection argument: given a located cut , one constructs a Cauchy sequence by repeated locatedness queries. The full coherence (that and are paths) requires 3-cell coherence between the Dedekind set-truncation and the Cauchy constructor; this is checked in our Cubical Agda prototype but elided here for space.
Third, the executable extraction of and (Section 9) relies on the cubical implementations of and , which we have not given in full. These are constructible by standard Picard iteration arguments (Examples 28, 30), but a complete cubical formalisation of analytic functions on is a non-trivial project—arguably the next paper in the series.
11.5 Related Work
The construction of constructive reals as a HIIT was first proposed in the HoTT Book , with the main technical development in Booij’s PhD thesis . Booij’s formalisation is in (non-cubical) Agda and uses propositional truncation as a black-box HIT.
Mörtberg’s group at Stockholm has produced several related contributions: Mörtberg–Pujet on cubical synthetic homotopy theory, and the ongoing development of the cubical/cubical standard library . The standard library includes set quotients (|Cubical.HITs.SetQuotients|) and a quotient-based version of , but not the HIIT version.
Recent work by Boulier et al. extends Cubical Agda with computational uniqueness of identity proofs (UIP); this is relevant for our judgemental open problem in Section 10, since judgmental for the closeness constructor is a special case of computational UIP for h-propositions.
In a different direction, Cherubini et al. use Cubical Agda to formalise higher Schreier theory, demonstrating the viability of cubical methods for genuinely higher-categorical mathematics.
The Lean Mathlib library provides a classical construction of as a Cauchy sequence quotient; this is equivalent to our cubical under classical assumptions (propositional extensionality, choice), as our Lean companion file lean/cubical-hiit-cauchy/Reals.lean outlines.
12 Conclusion
We have given a Cubical Agda implementation of the higher inductive–inductive type for the Cauchy reals, completing the in-progress effort flagged in the synthesis of the prior series. The four results— is an h-set (Theorem 14), it has the universal property of the Cauchy completion (Theorem 15), it is equivalent to the located Dedekind reals via cubical (Theorem 18), and it admits an extracted approximation map producing rationals (Section 9)—are all proved cubically, with the universe-level path being a between explicit endpoints. The remaining gaps are listed in Section 10: judgmental , integration with the standard library, higher-truncation analysis, -function downstream.
The accompanying source tree includes:
src/cubical-hiit-cauchy/Main.hs: rational approximations of , , and using a Haskell prototype of the Cauchy real HIIT.src/cubical-hiit-cauchy/Reals.hs: the type definition with relator (Haskell encoding).src/cubical-hiit-cauchy/Properties.hs: QuickCheck convergence properties.src/cubical-hiit-cauchy/Proofs.hs: equational proofs of Cauchy completeness.lean/cubical-hiit-cauchy/Reals.lean: a Lean 4 / Mathlib4 companion definition for comparison.
99
The Univalent Foundations Program. Homotopy Type Theory: Univalent Foundations of Mathematics. Institute for Advanced Study, 2013.
A. Booij. Analysis in Univalent Type Theory. PhD thesis, University of Birmingham, 2020.
C. Cohen, T. Coquand, S. Huber, A. Mörtberg. “Cubical type theory: a constructive interpretation of the univalence axiom.” LIPIcs 69 (TYPES 2015), 5:1–5:34, 2018.
A. Vezzosi, A. Mörtberg, A. Abel. “Cubical Agda: a dependently typed programming language with univalence and higher inductive types.” Proc. ACM Program. Lang. 3, ICFP, Article 87 (Aug. 2019).
S. Huber. Cubical Interpretations of Type Theory. PhD thesis, Chalmers University, 2016.
T. Altenkirch, A. Kaposi. “Type theory in type theory using quotient inductive types.” POPL 2016, ACM SIGPLAN Notices 51(1):18–29.
G. Gilbert, J. Cockx, M. Sozeau, N. Tabareau. “Definitional proof-irrelevance without K.” Proc. ACM Program. Lang. 3, POPL, Article 3 (Jan. 2019).
The Cubical Agda Standard Library. https://github.com/agda/cubical, accessed April 2026.
The agda-unimath library. https://github.com/UniMath/agda-unimath, accessed April 2026.
D. Bridges, F. Richman. Varieties of Constructive Mathematics. LMS Lecture Note Series 97, Cambridge University Press, 1987.
B. Spitters, E. van der Weegen. “Type classes for mathematics in type theory.” Math. Struct. Comput. Sci. 21(4):795–825, 2011.
The mathlib Community. The Lean Mathematical Library. CPP 2020, ACM, pp. 367–381.
YonedaAI Research. “The Univalent Correspondence: How Six Perspectives on Number Become One.” GrokRxiv:2026.05.univalent-correspondence-synthesis, 2026.
YonedaAI Research. “The HoTT Perspective: Numbers as Inductive Types up to Path Equivalence.” GrokRxiv:2026.05.hott-perspective, 2026.
A. Mörtberg, L. Pujet. “Cubical Synthetic Homotopy Theory.” CPP 2020, ACM, pp. 158–171.
S. Boulier et al. “Towards Computational UIP in Cubical Agda.” arXiv:2511.21209, November 2025.
F. Cherubini et al. “Higher Schreier theory in Cubical Agda.” J. Symbolic Logic (online first, 2025).
E. Riehl, M. Shulman. “A type theory for synthetic -categories.” Higher Structures 1(1):147–224, 2017.
C. Angiuli, G. Brunerie, T. Coquand, R. Harper, K.-B. Hou (Favonia), D. Licata. “Cartesian cubical type theory.” Preprint, Carnegie Mellon University, 2017–2019.