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/{ExteriorAlgebra,CliffordAlgebra}): Functoriality of the exterior algebra and some lemmas about generation #9718
Conversation
Sorry, I think I missed this one. Can you resolve the merge conflicts? Are all the changes in the conflicting file already merged? |
Sorry, missed your comment (busy week). I'm thinking of just doing a fresh branch and fresh PR at this point, so the conflicts will be easier to solve. |
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
…hlib4 into ExteriorAlgebra
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.
This is looking pretty good now! I suspect this is similar to what I was thinking of when I added MultilinearMap.range
, but I don't think that definition is of any use for this PR.
Its easy enough to prove these by simp, then the bunled versions are trivial. The bundled version of one result can be promoted from a RingHom to an AlgHom.
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.
maintainer merge
I pushed some more small cleanups, and fixed a porting note that was causing you to need erw
. This now looks great! Can you check the commit message reflects what we've ended up at?
/-- Functoriality of `TrivSqZeroExt` when the ring is commutative: a linear map | ||
`f : M →ₗ[R'] N` induces a morphism of `R'`-algebras from `TrivSqZeroExt R' M` to | ||
`TrivSqZeroExt R' N`. | ||
|
||
Note that we cannot neatly state the non-commutative case, as we do not have morphisms of bimodules. | ||
-/ | ||
def map (f : M →ₗ[R'] N) : TrivSqZeroExt R' M →ₐ[R'] TrivSqZeroExt R' N := | ||
liftEquivOfComm ⟨inrHom R' N ∘ₗ f, fun _ _ => inr_mul_inr _ _ _⟩ |
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.
Please mention this in the commit message
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.
I updated the commit message.
🚀 Pull request has been placed on the maintainer queue by eric-wieser. |
1 similar comment
🚀 Pull request has been placed on the maintainer queue by eric-wieser. |
!bench |
Thanks! Functoriality is wonderful. Assuming the profiling comes back ok, I will merge. |
Here are the benchmark results for commit 4fc8304. Benchmark Metric Change
====================================================================
- ~Mathlib.Algebra.TrivSqZeroExt instructions 43.0%
- ~Mathlib.LinearAlgebra.ExteriorAlgebra.Basic instructions 46.7% |
+100 lines or so for +50% in instructions isn't great. These mainly all come from typeclass search. But the problems surfaced are not particular to this file and need to be fixed more generally. bors merge |
Canceled. |
@mattrobball, I tried making some |
!bench |
Here are the benchmark results for commit beb41cd. Benchmark Metric Change
====================================================================
- ~Mathlib.Algebra.TrivSqZeroExt instructions 42.6%
- ~Mathlib.LinearAlgebra.ExteriorAlgebra.Basic instructions 46.7% |
Well, I guess .4% is better than nothing! bors merge |
…of the exterior algebra and some lemmas about generation (#9718) This does a few things: - Define the algebra morphism `TrivSqZeroExt.map f` between trivial square-zero extensions induced by a linear map`f`, and establish some of its basic properties (functoriality, composition with the basic maps to/from `TrivSqZeroExt`). Note that we only consider the case of a commutative base ring, because the case of a general base ring requires morphisms of bimodules, which we do not have. - Define the algebra morphism `ExteriorAlgebra.map f` between exterior algebras induced by a linear map `f`. This is a straightforward application of the similar construction for Clifford algebras, but I think it is still useful to have. Basic properties of this construction are proved: functoriality, composition with `ExteriorAlgebra.ι`, `ExteriorAlgebra.ιInv` (this part uses the first point) and `ExteriorAlgebra.ιMulti`. Then exactness properties of the construction is studied: - If the linear map is surjective, then the map on exterior algebras is also surjective. This actually holds for Clifford algebras, so I added a lemma called `CliffordAlgebra.map_surjective` in `LinearAlgebra/CliffordAlgebra/Basic.lean`. For exterior algebras, the converse holds and is also proved. - If the linear map has a retraction, then the map on exterior algebras is injective. So if the base ring is a field, the map on exterior algebras is injective if the linear map is injective. - Establish some properties of `ExteriorAlgebra.ιMulti`: - `ExteriorAlgebra.ιMulti_range`: The range of `ιMulti R n` is contained in the `n`th exterior power (define here as `LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n`). - `ExteriorAlgebra.ιMulti_span_fixedDegree`: This range spans the `n`th exterior power. - `ExteriorAlgebra.ιMulti_span`: The union over all `n` of the range of `ιMulti R n` spans the whole exterior algebra (this is in `LinearAlgebra/ExteriorAlgebra/Grading.lean` because the proof uses the graded module structure, but it might be possible to do something simpler). - Construct `ExteriorAlgebra.ιMulti_family`: This takes a natural number `n` and a family of vectors `v` indexed by a linearly ordered type `I`, and it returns the family of `n`-fold products of the `v i` in the exterior algebra, indexed by the set of finsets of `I` of cardinality `n`. (The point, to be proved in another PR, is that when `v` is a basis, then `ExteriorAlgebra.ιMulti_family R n v` is a basis of the `n`th exterior power.) Co-authored-by: morel <smorel@math.princeton.edu> Co-authored-by: smorel394 <67864981+smorel394@users.noreply.github.com>
Overall instructions were up by 4B though |
Pull request successfully merged into master. Build succeeded: |
Great, now I can PR the exterior power stuff (after I have checked that it still builds). |
Here it is: #10654 |
…of the exterior algebra and some lemmas about generation (#9718) This does a few things: - Define the algebra morphism `TrivSqZeroExt.map f` between trivial square-zero extensions induced by a linear map`f`, and establish some of its basic properties (functoriality, composition with the basic maps to/from `TrivSqZeroExt`). Note that we only consider the case of a commutative base ring, because the case of a general base ring requires morphisms of bimodules, which we do not have. - Define the algebra morphism `ExteriorAlgebra.map f` between exterior algebras induced by a linear map `f`. This is a straightforward application of the similar construction for Clifford algebras, but I think it is still useful to have. Basic properties of this construction are proved: functoriality, composition with `ExteriorAlgebra.ι`, `ExteriorAlgebra.ιInv` (this part uses the first point) and `ExteriorAlgebra.ιMulti`. Then exactness properties of the construction is studied: - If the linear map is surjective, then the map on exterior algebras is also surjective. This actually holds for Clifford algebras, so I added a lemma called `CliffordAlgebra.map_surjective` in `LinearAlgebra/CliffordAlgebra/Basic.lean`. For exterior algebras, the converse holds and is also proved. - If the linear map has a retraction, then the map on exterior algebras is injective. So if the base ring is a field, the map on exterior algebras is injective if the linear map is injective. - Establish some properties of `ExteriorAlgebra.ιMulti`: - `ExteriorAlgebra.ιMulti_range`: The range of `ιMulti R n` is contained in the `n`th exterior power (define here as `LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n`). - `ExteriorAlgebra.ιMulti_span_fixedDegree`: This range spans the `n`th exterior power. - `ExteriorAlgebra.ιMulti_span`: The union over all `n` of the range of `ιMulti R n` spans the whole exterior algebra (this is in `LinearAlgebra/ExteriorAlgebra/Grading.lean` because the proof uses the graded module structure, but it might be possible to do something simpler). - Construct `ExteriorAlgebra.ιMulti_family`: This takes a natural number `n` and a family of vectors `v` indexed by a linearly ordered type `I`, and it returns the family of `n`-fold products of the `v i` in the exterior algebra, indexed by the set of finsets of `I` of cardinality `n`. (The point, to be proved in another PR, is that when `v` is a basis, then `ExteriorAlgebra.ιMulti_family R n v` is a basis of the `n`th exterior power.) Co-authored-by: morel <smorel@math.princeton.edu> Co-authored-by: smorel394 <67864981+smorel394@users.noreply.github.com>
…of the exterior algebra and some lemmas about generation (#9718) This does a few things: - Define the algebra morphism `TrivSqZeroExt.map f` between trivial square-zero extensions induced by a linear map`f`, and establish some of its basic properties (functoriality, composition with the basic maps to/from `TrivSqZeroExt`). Note that we only consider the case of a commutative base ring, because the case of a general base ring requires morphisms of bimodules, which we do not have. - Define the algebra morphism `ExteriorAlgebra.map f` between exterior algebras induced by a linear map `f`. This is a straightforward application of the similar construction for Clifford algebras, but I think it is still useful to have. Basic properties of this construction are proved: functoriality, composition with `ExteriorAlgebra.ι`, `ExteriorAlgebra.ιInv` (this part uses the first point) and `ExteriorAlgebra.ιMulti`. Then exactness properties of the construction is studied: - If the linear map is surjective, then the map on exterior algebras is also surjective. This actually holds for Clifford algebras, so I added a lemma called `CliffordAlgebra.map_surjective` in `LinearAlgebra/CliffordAlgebra/Basic.lean`. For exterior algebras, the converse holds and is also proved. - If the linear map has a retraction, then the map on exterior algebras is injective. So if the base ring is a field, the map on exterior algebras is injective if the linear map is injective. - Establish some properties of `ExteriorAlgebra.ιMulti`: - `ExteriorAlgebra.ιMulti_range`: The range of `ιMulti R n` is contained in the `n`th exterior power (define here as `LinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n`). - `ExteriorAlgebra.ιMulti_span_fixedDegree`: This range spans the `n`th exterior power. - `ExteriorAlgebra.ιMulti_span`: The union over all `n` of the range of `ιMulti R n` spans the whole exterior algebra (this is in `LinearAlgebra/ExteriorAlgebra/Grading.lean` because the proof uses the graded module structure, but it might be possible to do something simpler). - Construct `ExteriorAlgebra.ιMulti_family`: This takes a natural number `n` and a family of vectors `v` indexed by a linearly ordered type `I`, and it returns the family of `n`-fold products of the `v i` in the exterior algebra, indexed by the set of finsets of `I` of cardinality `n`. (The point, to be proved in another PR, is that when `v` is a basis, then `ExteriorAlgebra.ιMulti_family R n v` is a basis of the `n`th exterior power.) Co-authored-by: morel <smorel@math.princeton.edu> Co-authored-by: smorel394 <67864981+smorel394@users.noreply.github.com>
This does a few things:
Define the algebra morphism
TrivSqZeroExt.map f
between trivial square-zero extensions induced by a linear mapf
, and establish some of its basic properties (functoriality, composition with the basic maps to/fromTrivSqZeroExt
). Note that we only consider the case of a commutative base ring, because the case of a general base ring requires morphisms of bimodules, which we do not have.Define the algebra morphism
ExteriorAlgebra.map f
between exterior algebras induced by a linear mapf
. This is a straightforward application of the similar construction for Clifford algebras, but I think it is still useful to have. Basic properties of this construction are proved: functoriality, composition withExteriorAlgebra.ι
,ExteriorAlgebra.ιInv
(this part uses the first point) andExteriorAlgebra.ιMulti
. Then exactness properties of the construction is studied:CliffordAlgebra.map_surjective
inLinearAlgebra/CliffordAlgebra/Basic.lean
. For exterior algebras, the converse holds and is also proved.Establish some properties of
ExteriorAlgebra.ιMulti
:ExteriorAlgebra.ιMulti_range
: The range ofιMulti R n
is contained in then
th exterior power (define here asLinearMap.range (ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n
).ExteriorAlgebra.ιMulti_span_fixedDegree
: This range spans then
th exterior power.ExteriorAlgebra.ιMulti_span
: The union over alln
of the range ofιMulti R n
spans the whole exterior algebra (this is inLinearAlgebra/ExteriorAlgebra/Grading.lean
because the proof uses the graded module structure, but it might be possible to do something simpler).Construct
ExteriorAlgebra.ιMulti_family
: This takes a natural numbern
and a family of vectorsv
indexed by a linearly ordered typeI
, and it returns the family ofn
-fold products of thev i
in the exterior algebra, indexed by the set of finsets ofI
of cardinalityn
. (The point, to be proved in another PR, is that whenv
is a basis, thenExteriorAlgebra.ιMulti_family R n v
is a basis of then
th exterior power.)