-
Notifications
You must be signed in to change notification settings - Fork 234
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(LinearAlgebra/TensorProduct): add TensorProduct.map₂
#10986
Conversation
jjaassoonn
commented
Feb 26, 2024
TensorProduct.map2
TensorProduct.map₂
Thanks! bors d+ |
✌️ jjaassoonn can now approve this pull request. To approve and merge a pull request, simply reply with |
Can you use this to golf the |
done |
Once you've added the docstring, please run a benchmark (it will fail at the moment because the missing docstring will cause a linter error) |
!bench |
Here are the benchmark results for commit ef495da. Benchmark Metric Change
===================================================
- ~Mathlib.RingTheory.Kaehler instructions 5.8% |
How do we feel about the benchmark result. Is the slow down statistically insignificant? |
bors merge |
I think it's ok; I tried golfing this a long time ago in #6195 and got a timeout; 5% is a much less bad outcome! |
-/ | ||
def mulAux (a₁ : A) (b₁ : B) : A ⊗[R] B →ₗ[R] A ⊗[R] B := | ||
TensorProduct.map (LinearMap.mulLeft R a₁) (LinearMap.mulLeft R b₁) | ||
#align algebra.tensor_product.mul_aux Algebra.TensorProduct.mulAux |
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.
These should be noalign
ed
bors r-
bors d+
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.
do you mean I should keep these code but just noalign
them? Note that I have added
#noalign algebra.tensor_product.mul_aux
#noalign algebra.tensor_product.mul_aux_apply
✌️ jjaassoonn can now approve this pull request. To approve and merge a pull request, simply reply with |
Canceled. |
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.
bors merge
Pull request successfully merged into master. Build succeeded: |
TensorProduct.map₂
TensorProduct.map₂