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: porting norm_num extensions for Nat.gcd
, Nat.lcm
, Int.gcd
, Int.lcm
, and IsCoprime
#3923
Conversation
@digama0 I figure I'll ping you about these ported norm_num extensions (and feel free to take over if I've done it all wrong). Notes:
|
Can you check if this can replace |
@Ruben-VandeVelde Thanks, I cleaned that up. |
@@ -9,10 +9,10 @@ Authors: Sangwoo Jo (aka Jason), Guy Leroy, Johannes Hölzl, Mario Carneiro | |||
! if you have ported upstream changes. | |||
-/ | |||
import Mathlib.Data.Nat.GCD.Basic | |||
import Mathlib.Algebra.GroupPower.Lemmas |
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.
was this intentional?
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.
Yes, it's the source of Int.natAbs_pow
and isUnit_ofPowEqOne
, and these used to be transitively provided by NormNum
.
Nat.gcd
, Nat.lcm
, Nat.coprime
, Int.gcd
, and Int.lcm
Nat.gcd
, Nat.lcm
, Int.gcd
, and Int.lcm
Nat.gcd
, Nat.lcm
, Int.gcd
, and Int.lcm
Nat.gcd
, Nat.lcm
, Int.gcd
, Int.lcm
, and IsCoprime
I removed the bors r+ |
@digama0 Those |
The intermediate calculations are not in the proof term, I'm not sure what you mean. The proof term contains an occurrence of e.g. It would be nice to find a way to do microbenchmarks on this kind of thing though. It's just a bit hard to measure in most workloads. BTW there is actually a way to remove even the |
Pull request successfully merged into master. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Nat.gcd
, Nat.lcm
, Int.gcd
, Int.lcm
, and IsCoprime
Nat.gcd
, Nat.lcm
, Int.gcd
, Int.lcm
, and IsCoprime
@digama0 Really, I just thought it was neat having the proof terms look like
without needing to feed in the LHS or RHS in the I think my main objection is the commit message classifying changing Thanks for mentioning the |
This completes the porting of these norm_num extensions while adding a new extension for
IsCoprime
overInt
. It also adds the norm_num extension testing file from mathlib3. Closes #3246.