Uh oh!
There was an error while loading. Please reload this page.
Qround.v: Add more rounding functions - #291
Open
RyanGlScott wants to merge 8 commits into
Open
Conversation
RyanGlScott
commented
Jul 13, 2026
Comment on lines
+457
to
+459
| (** Properties about how [Qfloor] and [Qceiling] interact with [Qplus] *) | ||
| Lemma Qfloor_add_Z_r : forall (x:Q) (z:Z), Qfloor (x + inject_Z z) = (Qfloor x + z)%Z. |
ContributorAuthor
There was a problem hiding this comment.
Note that this property (and the related properties below) are all defined at the bottom of the file so that their proofs can take advantage of Qfloor_comp and Qceiling_comp. If you'd prefer, I can rearrange these proofs, although I may need to inline some of the details of Q{floor,ceiling}_comp to accommodate this.
| now apply (Qplus_le_compat _ _ _ _ (Qle_refl x)). | ||
| Qed. | ||
| Lemma Qround_to_even_resp_le : forall x y, x <= y -> (Qround_to_even x <= Qround_to_even y)%Z. |
ContributorAuthor
There was a problem hiding this comment.
The implementation of this proof is particularly verbose. If you have ideas on how to make this cleaner, I'd love to hear them!
RyanGlScottforce-pushed
the
T283-more-rounding-functions
branch
from
July 15, 2026 19:54
0284b8d to
19b9c4dCompareRyanGlScott
commented
Sep 5, 2026
ContributorAuthor
Would anyone be able to give this a review (@andres-erbsen, perhaps)? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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 adds three additional rounding functions to
Qround.v(Qtruncate,Qround_away, andQround_to_even) to complement the existingQfloorandQceilingfunctions. It also proves some corresponding properties (e.g., that each function respects<=).Fixes#283.