feat(LinearAlgebra/DirectSum/Finsupp) : tensor products of finsupp functions#10824
feat(LinearAlgebra/DirectSum/Finsupp) : tensor products of finsupp functions#10824AntoineChambert-Loir wants to merge 68 commits intomasterfrom
Conversation
| variable {ι : Type*} [DecidableEq ι] | ||
|
|
||
| /-- The tensor product of `i →₀ M` and `N` is linearly equivalent to `i →₀ M ⊗[R] N` -/ | ||
| noncomputable def Finsupp.rTensor : |
There was a problem hiding this comment.
Arguably this should be called TensorProduct.finsuppLeft for consistency with TensorProduct.directSumLeft and TensorProduct.prodLeft, and similarly for Right
There was a problem hiding this comment.
(I had to check for the actual meaning of “Arguably” ! — it doesn't mean one can argue, and indeed, i won't…)
There was a problem hiding this comment.
In the initial file, finsuppTensorProductFinsupp is in the root name space. Is this reasonable? (but I don't want to have to track at all instances…)
|
I am presently trying to prove the multiplicativity. |
Change i to iota Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
|
!bench |
|
Here are the benchmark results for commit cfa238f. Benchmark Metric Change
================================================================
- ~Mathlib.LinearAlgebra.DirectSum.Finsupp instructions 243.8% |
|
Is it possible to split the changes in |
|
Not it's not really possible, that's the whole goal of having these results |
It's best if the changes in |
…supp sums (#11635) ## Modules * `TensorProduct.finsuppLeft`, the tensor product of `ι →₀ M` and `N` is linearly equivalent to `ι →₀ M ⊗[R] N` * `TensorProduct.finsuppScalarLeft`, the tensor product of `ι →₀ R` and `N` is linearly equivalent to `ι →₀ N` * `TensorProduct.finsuppRight`, the tensor product of `M` and `ι →₀ N` is linearly equivalent to `ι →₀ M ⊗[R] N` * `TensorProduct.finsuppLeft'`, if `M` is an `S`-module, then the tensor product of `ι →₀ M` and `N` is `S`-linearly equivalent to `ι →₀ M ⊗[R] N` This is the first part of PR #10824 which contains three applications of these functions to monoid algebras, polynomials and multivariate polynomials. It has been split because this part is reasonably sound, while the three other files are more like propositions.
…supp sums (#11635) ## Modules * `TensorProduct.finsuppLeft`, the tensor product of `ι →₀ M` and `N` is linearly equivalent to `ι →₀ M ⊗[R] N` * `TensorProduct.finsuppScalarLeft`, the tensor product of `ι →₀ R` and `N` is linearly equivalent to `ι →₀ N` * `TensorProduct.finsuppRight`, the tensor product of `M` and `ι →₀ N` is linearly equivalent to `ι →₀ M ⊗[R] N` * `TensorProduct.finsuppLeft'`, if `M` is an `S`-module, then the tensor product of `ι →₀ M` and `N` is `S`-linearly equivalent to `ι →₀ M ⊗[R] N` This is the first part of PR #10824 which contains three applications of these functions to monoid algebras, polynomials and multivariate polynomials. It has been split because this part is reasonably sound, while the three other files are more like propositions.
…supp sums (#11635) ## Modules * `TensorProduct.finsuppLeft`, the tensor product of `ι →₀ M` and `N` is linearly equivalent to `ι →₀ M ⊗[R] N` * `TensorProduct.finsuppScalarLeft`, the tensor product of `ι →₀ R` and `N` is linearly equivalent to `ι →₀ N` * `TensorProduct.finsuppRight`, the tensor product of `M` and `ι →₀ N` is linearly equivalent to `ι →₀ M ⊗[R] N` * `TensorProduct.finsuppLeft'`, if `M` is an `S`-module, then the tensor product of `ι →₀ M` and `N` is `S`-linearly equivalent to `ι →₀ M ⊗[R] N` This is the first part of PR #10824 which contains three applications of these functions to monoid algebras, polynomials and multivariate polynomials. It has been split because this part is reasonably sound, while the three other files are more like propositions.
…supp sums (#11635) ## Modules * `TensorProduct.finsuppLeft`, the tensor product of `ι →₀ M` and `N` is linearly equivalent to `ι →₀ M ⊗[R] N` * `TensorProduct.finsuppScalarLeft`, the tensor product of `ι →₀ R` and `N` is linearly equivalent to `ι →₀ N` * `TensorProduct.finsuppRight`, the tensor product of `M` and `ι →₀ N` is linearly equivalent to `ι →₀ M ⊗[R] N` * `TensorProduct.finsuppLeft'`, if `M` is an `S`-module, then the tensor product of `ι →₀ M` and `N` is `S`-linearly equivalent to `ι →₀ M ⊗[R] N` This is the first part of PR #10824 which contains three applications of these functions to monoid algebras, polynomials and multivariate polynomials. It has been split because this part is reasonably sound, while the three other files are more like propositions.
| /- | ||
| lemma TensorProduct.map_isLinearMap' | ||
| [Module S M] [IsScalarTower R S M] [Module S N] [IsScalarTower R S N] | ||
| {P : Type*} [AddCommMonoid P] [Module R P] | ||
| {Q : Type*} [AddCommMonoid Q] [Module R Q] | ||
| (e : M →ₗ[S] N) (f : P →ₗ[R] Q) : | ||
| IsLinearMap S (TensorProduct.map (e.restrictScalars R) f) where | ||
| map_add := LinearMap.map_add _ | ||
| map_smul := fun s t ↦ by | ||
| induction t using TensorProduct.induction_on with | ||
| | zero => simp | ||
| | add x y hx hy => | ||
| simp only [smul_add, map_add] at hx hy ⊢ | ||
| simp only [hx, hy] | ||
| | tmul m p => | ||
| rw [smul_tmul'] | ||
| simp only [map_tmul, coe_restrictScalars, map_smul] | ||
| rfl | ||
| -/ | ||
|
|
||
| /- lemma TensorProduct.congr_isLinearMap' | ||
| [Module S M] [IsScalarTower R S M] [Module S N] [IsScalarTower R S N] | ||
| {P : Type*} [AddCommMonoid P] [Module R P] | ||
| {Q : Type*} [AddCommMonoid Q] [Module R Q] | ||
| (e : M ≃ₗ[S] N) (f : P ≃ₗ[R] Q) : | ||
| IsLinearMap S (TensorProduct.congr (e.restrictScalars R) f) := | ||
| TensorProduct.map_isLinearMap' e.toLinearMap f.toLinearMap -/ | ||
|
|
||
| /- | ||
| lemma LinearEquiv.rTensor_isLinearMap' | ||
| [Module S M] [IsScalarTower R S M] [Module S N] [IsScalarTower R S N] | ||
| (P : Type*) [AddCommMonoid P] [Module R P] (e : M ≃ₗ[S] N) : | ||
| IsLinearMap S (LinearEquiv.rTensor P (e.restrictScalars R)) := | ||
| TensorProduct.map_isLinearMap' e.toLinearMap _ | ||
| -/ |
There was a problem hiding this comment.
Are these supposed to be here?
And is it possible to split the PR into three, considering there are three new files added?
There was a problem hiding this comment.
I'll do that.
There was a problem hiding this comment.
I suppose this PR can be closed now.
…supp sums (#11635) ## Modules * `TensorProduct.finsuppLeft`, the tensor product of `ι →₀ M` and `N` is linearly equivalent to `ι →₀ M ⊗[R] N` * `TensorProduct.finsuppScalarLeft`, the tensor product of `ι →₀ R` and `N` is linearly equivalent to `ι →₀ N` * `TensorProduct.finsuppRight`, the tensor product of `M` and `ι →₀ N` is linearly equivalent to `ι →₀ M ⊗[R] N` * `TensorProduct.finsuppLeft'`, if `M` is an `S`-module, then the tensor product of `ι →₀ M` and `N` is `S`-linearly equivalent to `ι →₀ M ⊗[R] N` This is the first part of PR #10824 which contains three applications of these functions to monoid algebras, polynomials and multivariate polynomials. It has been split because this part is reasonably sound, while the three other files are more like propositions.
Modules
TensorProduct.finsuppLeft, the tensor product ofι →₀ MandNis linearly equivalent toι →₀ M ⊗[R] NTensorProduct.finsuppScalarLeft, the tensor product ofι →₀ RandNis linearly equivalent toι →₀ NTensorProduct.finsuppRight, the tensor product ofMandι →₀ Nis linearly equivalent toι →₀ M ⊗[R] NTensorProduct.finsuppLeft', ifMis anS-module, then the tensor product ofι →₀ MandNisS-linearly equivalent toι →₀ M ⊗[R] NMonoid algebras
MonoidAlgebra.rTensorAlgEquiv: the tensor product ofMonoidAlgebra M αwithNisR-linearly equivalent toMonoidAlgebra (M ⊗[R] N) αMonoidAlgebra.scalarRTensorAlgEquiv, the tensor product ofMonoidAlgebra R αwithNisR-linearly equivalent toMonoidAlgebra N αCase of MvPolynomial
These functions apply to
MvPolynomial, one can defineA proposition in this direction is given in
LinearAlgebra/TensorProduct/MvPolynomialCase of
PolynomialPolynomialis a structure containing aFinsupp, so these functionscan't be applied directly to
Polynomial.Some linear equivs need to be added to mathlib for that.
A proposition in this direction is given in
LinearAlgebra.TensorProduct.PolynomialTODO
reprove
TensorProduct.finsuppLeft'using existing heterobasic version ofTensorProduct.congralign what has been done for monoid agebras with what is missing for MvPolynomial or Polynomial