-
Notifications
You must be signed in to change notification settings - Fork 367
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] - refactor(LinearAlgebra) : Remove unused commutativity hypothesis #9475
Conversation
If you don't want to do this, can you add a comment to this effect? maintainer merge |
🚀 Pull request has been placed on the maintainer queue by ericrbg. |
Co-authored-by: Eric Wieser <[email protected]>
Done. |
!bench |
Here are the benchmark results for commit ab9623c. |
bors merge |
Remove unused commutativity hypothesis: * Removes the requirement for the Semirings to be commutative in `LinearMap.ext_basis` and `LinearMap.sum_repr_mul_repr_mulₛₗ` in `LinearAlgebra/Basis/Bilinear` * Remove the requirement for some Semirings to be commutative in `AuxToLinearMap`, `CommSemiring` and `CommRing` in `LinearAlgebra/Matrix/SesquilinearForm` * In addition, the rings in `CommRing` can just be `Semiring` No changes to the proofs are required. It would also be possible to weaken commutativity from `Rₗ` in `LinearMap.sum_repr_mul_repr_mul` to `[SMulCommClass Rₗ Rₗ Pₗ]` in order to make `sum_repr_mul_repr_mulₛₗ` and `sum_repr_mul_repr_mul` consistent, but I have not done that in this PR because there might be a performance impact (see #7538 (review)). Co-authored-by: Christopher Hoskin <[email protected]> Co-authored-by: Christopher Hoskin <[email protected]>
Pull request successfully merged into master. Build succeeded: |
…lts from SesquilinearForm (#9485) Give definitions in `LinearAlgebra/Matrix/BilinearForm` in terms of the equivalent definitions in `LinearAlgebra/Matrix/SesquilinearForm` and derive the `BilinearForm` results as effectively special cases of the equivalent results in `SesquilinearForm`. This reduces the length of `LinearAlgebra/Matrix/BilinearForm` by over 100 lines. The aim is to: * Clarify how results in `BilinearForm` relate to results in `SesquilinearForm` * Reduce duplication of argument between the two files * Validate that the results in `SesquilinearForm` are sufficiently general to provide the results in `BilinearForm` in their existing form - in fact, some loosening of the hypothesis in `SesquilinearForm` is required. Further loosening was already applied in #9475 Co-authored-by: Christopher Hoskin <[email protected]> Co-authored-by: Christopher Hoskin <[email protected]>
Remove unused commutativity hypothesis:
LinearMap.ext_basis
andLinearMap.sum_repr_mul_repr_mulₛₗ
inLinearAlgebra/Basis/Bilinear
AuxToLinearMap
,CommSemiring
andCommRing
inLinearAlgebra/Matrix/SesquilinearForm
CommRing
can just beSemiring
No changes to the proofs are required.
It would also be possible to weaken commutativity from
Rₗ
inLinearMap.sum_repr_mul_repr_mul
to[SMulCommClass Rₗ Rₗ Pₗ]
in order to makesum_repr_mul_repr_mulₛₗ
andsum_repr_mul_repr_mul
consistent, but I have not done that in this PR because there might be a performance impact (see #7538 (review)).Used in #9334