-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - feat(algebra/floor): notation for nat_floor and nat_ceil #8526
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think it might be a good idea to add a reference from the module docstring here to the nnnorm notation and vice versa just so the reader understands the precedent that's set.
bors d+
✌️ sgouezel can now approve this pull request. To approve and merge a pull request, simply reply with |
src/algebra/floor.lean
Outdated
@@ -347,23 +351,25 @@ end | |||
It is equal to `⌈q⌉` when `q ≥ 0`, and is `0` otherwise. -/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should mention the new notation in this docstring.
src/algebra/floor.lean
Outdated
@@ -271,72 +273,74 @@ variables {a : α} {n : ℕ} | |||
It is equal to `⌊q⌋` when `q ≥ 0`, and is `0` otherwise. -/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly with this one, `nat_floor x` (notation `⌊x⌋₊`)
or similar would be good on the line above this one.
bors r+ |
We introduce the notations ` ⌊a⌋₊` for `nat_floor a` and `⌈a⌉₊` for `nat_ceil a`, mimicking the existing notations for `floor` and `ceil` (with the `+` corresponding to the recent notation for `nnnorm`).
Pull request successfully merged into master. Build succeeded: |
We introduce the notations
⌊a⌋₊
fornat_floor a
and⌈a⌉₊
fornat_ceil a
, mimicking the existing notations forfloor
andceil
(with the+
corresponding to the recent notation fornnnorm
).