-
Notifications
You must be signed in to change notification settings - Fork 247
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: more NNRat lemmas #12586
Conversation
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`.
…fScientific-lemma
…fScientific-lemma
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.
maintainer merge
🚀 Pull request has been placed on the maintainer queue by Ruben-VandeVelde. |
🚀 Pull request has been placed on the maintainer queue by Ruben-VandeVelde. |
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.
Sorry I didn't see earlier!
Mathlib/Data/NNRat/Defs.lean
Outdated
@@ -367,6 +367,7 @@ theorem natAbs_num_coe : (q : ℚ).num.natAbs = q.num := rfl | |||
|
|||
lemma coprime_num_den (q : ℚ≥0) : q.num.Coprime q.den := by simpa [num, den] using Rat.reduced _ | |||
|
|||
-- TODO: Rename `Rat.coe_nat_num`, `Rat.intCast_den`, `Rat.ofNat_num`, `Rat.ofNat_den` to match |
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.
Can you take the updated version I gave instead? Rat.coe_nat_num
has already been renamed.
Back on the queue, then. maintainer merge |
🚀 Pull request has been placed on the maintainer queue by Ruben-VandeVelde. |
bors r+ |
Note that the previous version of `Rat.ofScientific_eq_ofScientific` was not well-formed, as it did not include the necessary `ofNat`s. Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
Pull request successfully merged into master. Build succeeded: |
Note that the previous version of `Rat.ofScientific_eq_ofScientific` was not well-formed, as it did not include the necessary `ofNat`s. Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
Note that the previous version of `Rat.ofScientific_eq_ofScientific` was not well-formed, as it did not include the necessary `ofNat`s. Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
Note that the previous version of
Rat.ofScientific_eq_ofScientific
was not well-formed, as it did not include the necessaryofNat
s.Some steps towards