-
Notifications
You must be signed in to change notification settings - Fork 386
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: add norm_num
extensions for factorials
#8832
Conversation
876ae67
to
ade78cd
Compare
@sebzim4500 do you want to push this over the finish line, or do you mind if someone else makes the changes to your PR for you? It would be great to have this in mathlib and the comments here are really just trivialities so I would be sad to see this stall forever! |
norm_num
extensions for factorials
f0d58f1
to
b24615f
Compare
PR summary ec497a5d28Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
7d572cc
to
ec497a5
Compare
Is there anything I can do to get this merged? I've resolved all the threads and CI is green. |
maintainer merge |
🚀 Pull request has been placed on the maintainer queue by alexjbest. |
Thanks! I'm not really sure that this divide and conquer strategy would improve performance for the core algorithm itself (it results in large numbers being multiplied together, instead a large number multiplied by a small number, without saving any multiplications, and the latter tends to be faster). However: I think I buy the idea that this could improve the performance for kernel checking (or at least make larger factorials more accessible to the kernel), and I like the fact that it still allows the kernel to reduce 50 steps of ascFactorial on its own. In any case, it looks like it is correctly written, let's merge. bors r+ |
Add `norm_num` extensions to evaluate `Nat.factorial`, `Nat.ascFactorial` and `Nat.descFactorial`. Co-authored-by: Eric Wieser <[email protected]>
Pull request successfully merged into master. Build succeeded: |
norm_num
extensions for factorialsnorm_num
extensions for factorials
I tested it locally and the divide an conquer strategy was significantly faster at calculating e.g. |
Add
norm_num
extensions to evaluateNat.factorial
,Nat.ascFactorial
andNat.descFactorial
.