Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an implementation of real numbers as defined in Chapter 11.3: Cauchy Reals of the HoTT Book.
(Note: results 11.3.11 and 11.3.50 are currently missing.)
Modules:
Cubical/HITs/CauchyReals/Base.agda
Cubical/HITs/CauchyReals/Closeness.agda
Cubical/HITs/CauchyReals/Continuous.agda
Cubical/HITs/CauchyReals/Inverse.agda
Cubical/HITs/CauchyReals/Lems.agda
Cubical/HITs/CauchyReals/Lipschitz.agda
Cubical/HITs/CauchyReals/Multiplication.agda
Cubical/HITs/CauchyReals/Order.agda
These modules closely follow the book. However, I had to adjust the order of definitions due to the issue discussed here: HoTT/book#899.
Additionally, the following modules:
Cubical/HITs/CauchyReals/Sequence.agda
Cubical/HITs/CauchyReals/Derivative.agda
are attempts to benchmark the definitions and evaluate their behavior. In
Derivative.agda
, I've managed to derive the Power rule (for natural exponents). InSequence.agda
, I definedexp
(currently only for ℚ₊), allowing the definition ofe
.To implement these properly (assuming we want to continue without countable choice or LEM), I plan to consult some books on constructive analysis. The HoTT Book references "Errett Bishop. Foundations of Constructive Analysis," but I welcome other suggestions.
While the development is not yet up to library standards, everything currently type checks. I will likely split this into smaller PRs. There is one remaining definition,
invℝ
, hidden behindabstract
. However, I have a promising idea based on previous optimizations to expose it (or at least manage its evaluation more controllably by guarding it withlockUnit
).There is some redundancy, as I am still experimenting with different versions of definitions.
TODO:
exp
to all reals and provide a characterizationCommRingSolver
(temporary solution inCubical/HITs/CauchyReals/Lems.agda
)