Skip to content
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

feat: add a FloorSemiring instance to NNRat #13548

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Jun 6, 2024

Also some missing norm_cast lemmas for inequalities of casts between different types.


Open in Gitpod

@eric-wieser eric-wieser added awaiting-author A reviewer has asked the author a question or requested changes t-order Order theory labels Jun 6, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) and removed blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) labels Jun 6, 2024
@leanprover-community-mathlib4-bot
Copy link
Collaborator

This PR/issue depends on:

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jun 9, 2024
Copy link

github-actions bot commented Jun 9, 2024

PR summary 6d6f59bbac

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Data.NNRat.Floor 586

Declarations diff

+ cast_le_intCast
+ cast_lt_intCast
+ ceil_cast
+ ceil_coe
+ coe_ceil
+ coe_floor
+ den_one
+ den_zero
+ floor_cast
+ floor_coe
+ floor_def
+ floor_intCast_div_natCast
+ instance : FloorSemiring ℚ≥0
+ intCast_le_cast
+ intCast_lt_cast
+ intCeil_cast
+ intFloor_cast
+ natFloor_natCast_div_natCast
+ num_one
+ num_zero
++ cast_le_natCast
++ cast_lt_natCast
++ floor_natCast_div_natCast
++ natCast_le_cast
++ natCast_lt_cast

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.

@eric-wieser eric-wieser added awaiting-review and removed awaiting-author A reviewer has asked the author a question or requested changes merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Jun 9, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jun 9, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jul 22, 2024
@eric-wieser eric-wieser added the t-algebra Algebra (groups, rings, fields, etc) label Jul 22, 2024
Mathlib/Data/NNRat/Floor.lean Outdated Show resolved Hide resolved

We define the `FloorSemiring` instance on `ℚ≥0`, and relate it's operators to `NNRat.cast`.

Note that we cannot talk about `Int.fract`, which currently only works for rings.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't that mean we are missing Nat.fract with the obvious definition?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but adding new definitions seems out of scope for a PR that adds new instances.

Mathlib/Data/NNRat/Floor.lean Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the same lemmas comparing Nat.cast and Int.cast? (I think they are also missing?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to declare this out of scope for a PR about NNRat.

@Ruben-VandeVelde Ruben-VandeVelde changed the title feat: add a FloorSemiring instance to nnrat feat: add a FloorSemiring instance to NNRat Jul 28, 2024
@Ruben-VandeVelde Ruben-VandeVelde added the awaiting-author A reviewer has asked the author a question or requested changes label Jul 28, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 7, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 18, 2024
@eric-wieser eric-wieser removed the awaiting-author A reviewer has asked the author a question or requested changes label Aug 29, 2024
Copy link
Collaborator

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

maintainer merge

Copy link

🚀 Pull request has been placed on the maintainer queue by YaelDillies.

@urkud
Copy link
Member

urkud commented Aug 31, 2024

Otherwise LGTM. Thanks!
bors d+

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Aug 31, 2024

✌️ eric-wieser can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the ready-to-merge This PR has been sent to bors. label Oct 8, 2024
mathlib-bors bot pushed a commit that referenced this pull request Oct 8, 2024
Also some missing `norm_cast` lemmas for inequalities of casts between different types.
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Oct 8, 2024

Build failed (retrying...):

@sgouezel
Copy link
Contributor

sgouezel commented Oct 8, 2024

bors r-

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Oct 8, 2024

Canceled.

@sgouezel
Copy link
Contributor

sgouezel commented Oct 8, 2024

Can you merge master, fix the build, and send it back to bors?
bors d+

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Oct 8, 2024

✌️ eric-wieser can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@github-actions github-actions bot added the t-data Data (lists, quotients, numbers, etc) label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc) t-data Data (lists, quotients, numbers, etc) t-order Order theory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants