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

[Merged by Bors] - feat: norm_num ext for Int.floor #13647

Closed
wants to merge 4 commits into from

Conversation

eric-wieser
Copy link
Member

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

I tried this a while ago in leanprover-community/mathlib3#16502; this is now just one of the handlers from that PR.


Open in Gitpod

Some questions:

  • Should these be in the NormNum/ directory?
  • Are the isFoo lemmas supposed to be in the Mathlib.Meta.NormNum namespace?
  • Is there any point in the isNat and isInt handlers, since simp can already deal with these?
  • Do I really need CharZero?

Copy link

github-actions bot commented Jun 8, 2024

PR summary ddb5680aa4

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ evalIntFloor
+ isInt_intFloor
+ isInt_intFloor_ofIsRat
+ isNat_intFloor

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 the t-meta Tactics, attributes or user commands label Jun 8, 2024
test/norm_num_ext.lean Outdated Show resolved Hide resolved
Mathlib/Data/Rat/Floor.lean Show resolved Hide resolved
theorem isInt_intFloor {R} [LinearOrderedRing R] [FloorRing R] (r : R) (m : ℤ) :
IsInt r m → IsInt ⌊r⌋ m := by rintro ⟨⟨⟩⟩; exact ⟨by simp⟩

theorem isInt_intFloor_ofIsRat [CharZero α] (r : α) (n : ℤ) (d : ℕ) :
Copy link
Collaborator

Choose a reason for hiding this comment

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

As mentioned on Zulip, this CharZero requirement comes for free once you import Algebra.Order.Ring.CharZero. I really dislike for basic inheritance typeclasses to be hidden in obscure files, so I have opened #13654.

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 merge master now that #13654 has landed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@fpvandoorn
Copy link
Member

Marking as awaiting-author. Please replace that label with awaiting-review if appropriate.

@fpvandoorn fpvandoorn added the awaiting-author A reviewer has asked the author a question or requested changes label Jul 8, 2024
@eric-wieser eric-wieser force-pushed the eric-wieser/floor-normnum branch from c56c329 to ddb5680 Compare August 6, 2024 22:02
@eric-wieser eric-wieser removed the awaiting-author A reviewer has asked the author a question or requested changes label Aug 6, 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.

Looking good!

maintainer merge

Copy link

github-actions bot commented Aug 7, 2024

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

@fpvandoorn
Copy link
Member

Thanks!

bors merge

The versions for ceiling and nat-floor/nat-ceil would also be great!

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Aug 7, 2024
mathlib-bors bot pushed a commit that referenced this pull request Aug 7, 2024
I tried this a while ago in leanprover-community/mathlib3#16502; this is now just one of the handlers from that PR.
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Aug 7, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: norm_num ext for Int.floor [Merged by Bors] - feat: norm_num ext for Int.floor Aug 7, 2024
@mathlib-bors mathlib-bors bot closed this Aug 7, 2024
@mathlib-bors mathlib-bors bot deleted the eric-wieser/floor-normnum branch August 7, 2024 08:49
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 9, 2024
I tried this a while ago in leanprover-community/mathlib3#16502; this is now just one of the handlers from that PR.
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 9, 2024
I tried this a while ago in leanprover-community/mathlib3#16502; this is now just one of the handlers from that PR.
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 12, 2024
I tried this a while ago in leanprover-community/mathlib3#16502; this is now just one of the handlers from that PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer-merge ready-to-merge This PR has been sent to bors. t-meta Tactics, attributes or user commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants