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(Rat): Numerator and denominator of q ^ n #12506

Closed
wants to merge 9 commits into from

Conversation

YaelDillies
Copy link
Collaborator

Prove (q ^ n).num = q.num ^ n and (q ^ n).den = q.den ^ n by making those defeq. It is somewhat painful. (q ^ n).den = q.den ^ n is also defeq for NNRat, but not (q ^ n).num = q.num ^ n due to the Int.natAbs in the definition of NNRat.num.


Open in Gitpod

Prove `(q ^ n).num = q.num ^ n` and `(q ^ n).den = q.den ^ n` by making those defeq. It is somewhat painful. `(q ^ n).den = q.den ^ n` is also defeq for `NNRat`, but not `(q ^ n).num = q.num ^ n` due to the `Int.natAbs` in the definition of `NNRat.num`.
@YaelDillies YaelDillies added the awaiting-review The author would like community review of the PR label Apr 29, 2024
Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

Nice, this probably makes ^ on Rat computationally faster too.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Apr 29, 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. label Apr 29, 2024
Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

bors d+

Thanks!

Mathlib/Data/Rat/Defs.lean Outdated Show resolved Hide resolved
@mathlib-bors
Copy link

mathlib-bors bot commented Apr 29, 2024

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

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added delegated and removed awaiting-review The author would like community review of the PR labels Apr 29, 2024
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@YaelDillies
Copy link
Collaborator Author

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Apr 29, 2024
Prove `(q ^ n).num = q.num ^ n` and `(q ^ n).den = q.den ^ n` by making those defeq. It is somewhat painful. `(q ^ n).den = q.den ^ n` is also defeq for `NNRat`, but not `(q ^ n).num = q.num ^ n` due to the `Int.natAbs` in the definition of `NNRat.num`.
@mathlib-bors
Copy link

mathlib-bors bot commented Apr 29, 2024

Build failed:

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@YaelDillies
Copy link
Collaborator Author

bors merge

@eric-wieser
Copy link
Member

I think the build is still failing?

bors r-

@mathlib-bors
Copy link

mathlib-bors bot commented Apr 30, 2024

Canceled.

@eric-wieser
Copy link
Member

bors merge

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Apr 30, 2024
@YaelDillies
Copy link
Collaborator Author

Sorry, the mobile app is very limiting in what I can see 🙈

@mathlib-bors
Copy link

mathlib-bors bot commented Apr 30, 2024

Canceled.

@YaelDillies
Copy link
Collaborator Author

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Apr 30, 2024
Prove `(q ^ n).num = q.num ^ n` and `(q ^ n).den = q.den ^ n` by making those defeq. It is somewhat painful. `(q ^ n).den = q.den ^ n` is also defeq for `NNRat`, but not `(q ^ n).num = q.num ^ n` due to the `Int.natAbs` in the definition of `NNRat.num`.




Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@mathlib-bors
Copy link

mathlib-bors bot commented Apr 30, 2024

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Apr 30, 2024
Prove `(q ^ n).num = q.num ^ n` and `(q ^ n).den = q.den ^ n` by making those defeq. It is somewhat painful. `(q ^ n).den = q.den ^ n` is also defeq for `NNRat`, but not `(q ^ n).num = q.num ^ n` due to the `Int.natAbs` in the definition of `NNRat.num`.




Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@mathlib-bors
Copy link

mathlib-bors bot commented Apr 30, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Rat): Numerator and denominator of q ^ n [Merged by Bors] - feat(Rat): Numerator and denominator of q ^ n Apr 30, 2024
@mathlib-bors mathlib-bors bot closed this Apr 30, 2024
@mathlib-bors mathlib-bors bot deleted the rat_num_pow branch April 30, 2024 11:37
apnelson1 pushed a commit that referenced this pull request May 12, 2024
Prove `(q ^ n).num = q.num ^ n` and `(q ^ n).den = q.den ^ n` by making those defeq. It is somewhat painful. `(q ^ n).den = q.den ^ n` is also defeq for `NNRat`, but not `(q ^ n).num = q.num ^ n` due to the `Int.natAbs` in the definition of `NNRat.num`.




Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
callesonne pushed a commit that referenced this pull request May 16, 2024
Prove `(q ^ n).num = q.num ^ n` and `(q ^ n).den = q.den ^ n` by making those defeq. It is somewhat painful. `(q ^ n).den = q.den ^ n` is also defeq for `NNRat`, but not `(q ^ n).num = q.num ^ n` due to the `Int.natAbs` in the definition of `NNRat.num`.




Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants