Skip to content

feat(LinearAlgebra/{ExteriorPower,LinearIndependent,TensorPower}): define the exterior powers of a module and prove some of their basic properties#10654

Closed
smorel394 wants to merge 29 commits intomasterfrom
SM.ExteriorPower
Closed

feat(LinearAlgebra/{ExteriorPower,LinearIndependent,TensorPower}): define the exterior powers of a module and prove some of their basic properties#10654
smorel394 wants to merge 29 commits intomasterfrom
SM.ExteriorPower

Conversation

@smorel394
Copy link
Copy Markdown
Collaborator

@smorel394 smorel394 commented Feb 17, 2024

This introduces the exterior powers of a module and proves some of their basic properties, in LinearAlgebra/ExteriorPower/Basic.lean and LinearAlgebra/ExteriorPower/Generators.lean. It also adds a lemma in LinearAlgebra/LinearIndependent.lean (linearIndependent_of_dualFamily : if a family of vectors admits a "dual" family of linear forms, then it is linearly independent) and a construction in LinearAlgebra/TensorPower.lean (linearFormOfFamily : the linear form on the tensor power of M obtained by multiplying a family of linear forms on M).

Main definitions

In LinearAlgebra/ExteriorPower/Basic.lean:

  • ExteriorPower R n M is the nth exterior power of a R-module M, defined as LinearMap.range (ExteriorAlgebra.ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n. We also introduce the notation Λ[R]^n M for ExteriorPower R n M.

  • ExteriorPower.ιMulti is the canonical alternating map on M with values in Λ[R]^n M.

  • ExteriorPower.map: functoriality of exterior powers with respect to linear maps between modules.

  • ExteriorPower.toTensorPower: linear map from the nth exterior power to the nth
    tensor power (coming from MultilinearMap.alternatization via the universal property of
    exterior powers).

In LinearAlgebra/ExteriorPower/Generators.lean:

  • ExteriorPower.BasisOfBasis: If b is a basis of M (indexed by a linearly ordered type),
    the basis of the nth exterior power of M formed by the n-fold exterior products of elements
    of b.

Main theorems

In LinearAlgebra/ExteriorPower/Basic.lean:

  • The image of ExteriorPower.ιMulti spans Λ[R]^n M.

  • ExteriorPower.liftAlternatingEquiv (universal property of the nth exterior power of M):
    the linear equivalence between linear maps from Λ[R]^n M to a module N and n-fold
    alternating maps from M to N.

  • ExteriorPower.map_injective_field: If f : M →ₗ[R] N is injective and R is a field, then
    ExteriorPower.map n f is injective.

  • ExteriorPower.map_surjective: If f : M →ₗ[R] N is surjective, then ExteriorPower.map n f
    is surjective.

  • ExteriorPower.mem_exteriorPower_is_mem_finite: Every element of Λ[R]^n M is in the image of
    Λ[R]^n P for some finitely generated submodule P of M.

In LinearAlgebra/ExteriorPower/Generators.lean:

  • ExteriorPower.Finite: The nth exterior power of a finite module is a finite module.

  • ExteriorPower.span_top_of_span_top and ExteriorPower.span_top_of_span_top': If a family of
    vectors spans M, then the family of its n-fold exterior products spans Λ[R]^n M. (We give
    versions in the exterior algebra and in the exterior power.)

  • ExteriorPower.FreeOfFree: If M is a free module, then so is its nth exterior power.

  • ExteriorPower.FinrankOfFiniteFree: If R satisfies the strong rank condition and M is
    finite free of rank r, then the nth exterior power of M is of finrank Nat.choose r n.

  • ExteriorPower.ιMulti_family_linearIndependent_field: If R is a field, and if v is a
    linearly independent family of vectors (indexed by a linearly ordered type), then the family of
    its n-fold exterior products is also linearly independent.


Open in Gitpod

@smorel394 smorel394 added awaiting-review t-algebra Algebra (groups, rings, fields, etc) labels Feb 17, 2024
@smorel394 smorel394 changed the title feat(LinearAlgebra/{ExteriorPower,LinearIndependent,TensorPower}): definition and basic properties of the exterior powers of a module feat(LinearAlgebra/{ExteriorPower,LinearIndependent,TensorPower}): define the exterior powers of a module and prove some of their basic properties Feb 17, 2024
@eric-wieser eric-wieser self-assigned this Feb 17, 2024
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Comment on lines +65 to +70
`Λ[R]^n M` for `ExteriorPower R n M`. -/
@[reducible]
def ExteriorPower := (LinearMap.range (ExteriorAlgebra.ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n)

@[inherit_doc]
notation:100 "Λ[" R "]^" n:arg => ExteriorPower R n
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think (LinearMap.range (ExteriorAlgebra.ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n) is already used quite a lot throughout mathlib; can you split out a PR that just adds this new def and notation, and replaces all the existing uses with the new notation?

Copy link
Copy Markdown
Collaborator Author

@smorel394 smorel394 Feb 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can do. Given that this expression already appears in LinearAlgebra/ExteriorAlgebra/Basic.lean, I guess it would make sense to introduce ExteriorPower there.

Copy link
Copy Markdown
Member

@eric-wieser eric-wieser Feb 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's maybe worth waiting to see what Zulip says about the type of this expression, Right now Lean is inferring this as Submodule R (ExteriorAlgebra R M)

Suggested change
[R]^n M` for `ExteriorPower R n M`. -/
@[reducible]
def ExteriorPower := (LinearMap.range (ExteriorAlgebra.ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n)
@[inherit_doc]
notation:100 "Λ[" R "]^" n:arg => ExteriorPower R n
[R]^n M` for `ExteriorPower R n M`. -/
@[reducible]
def ExteriorPower : Submodule R (ExteriorAlgebra R M) :=
(LinearMap.range (ExteriorAlgebra.ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n)
@[inherit_doc]
notation:100 "Λ[" R "]^" n:arg => ExteriorPower R n

but this goes against the naming convention, since ExteriorPower is not a type.

Either we should make it a type (in which case it won't actually work as a substitute in a handful of places), or we should rename it to exteriorPower.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I am actually using that it's a submodule of the exterior algebra in a few places. Anyway, I started a new branch that defined ExteriorPower earlier and started substituting it there, and it's creating timeouts in ExteriorAlgebra/Grading.lean. I need to play around with it more to see if I can figure out what happened.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I changed all the ExteriorPowers to exteriorPowers and created PR #10744 to introduce the definition and notation. (But it does have that annoying instance synthesization problem.)

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
@mattrobball
Copy link
Copy Markdown
Contributor

!bench

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit 3c3d7f9.
There were no significant changes against commit 29c27c3.

eric-wieser and others added 5 commits February 18, 2024 16:42
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
@smorel394 smorel394 added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Feb 26, 2024
mathlib-bors bot pushed a commit that referenced this pull request Feb 29, 2024
…tion and notation for the exterior powers of a module (#10744)

This is split off from PR #10654 (that actually proves some properties of the exterior powers). It introduces the reducible definition `exteriorPower R n M` for the `n`th exterior power of the `R`-module `M`; this is of type `Submodule R (ExteriorAlgebra R M)` and defined as `LinearMap.range (ExteriorAlgebra.ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n`. 
It also introduces the notation `Λ[R]^n M` for `exteriorPower R n M`.

Note: for a reason that I don't understand, Lean becomes unable to synthesize the `SetLike.GradedMonoid` instance on `fun (i : ℕ) ↦ (Λ[R]^i) M`, so I added it manually in `ExteriorAlgebra/Graded.lean`. I am far from sure that this is the correct solution.



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Richard Copley <buster@buster.me.uk>
@ghost ghost removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Feb 29, 2024
dagurtomas pushed a commit that referenced this pull request Mar 22, 2024
…tion and notation for the exterior powers of a module (#10744)

This is split off from PR #10654 (that actually proves some properties of the exterior powers). It introduces the reducible definition `exteriorPower R n M` for the `n`th exterior power of the `R`-module `M`; this is of type `Submodule R (ExteriorAlgebra R M)` and defined as `LinearMap.range (ExteriorAlgebra.ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n`. 
It also introduces the notation `Λ[R]^n M` for `exteriorPower R n M`.

Note: for a reason that I don't understand, Lean becomes unable to synthesize the `SetLike.GradedMonoid` instance on `fun (i : ℕ) ↦ (Λ[R]^i) M`, so I added it manually in `ExteriorAlgebra/Graded.lean`. I am far from sure that this is the correct solution.



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Richard Copley <buster@buster.me.uk>
utensil pushed a commit that referenced this pull request Mar 26, 2024
…tion and notation for the exterior powers of a module (#10744)

This is split off from PR #10654 (that actually proves some properties of the exterior powers). It introduces the reducible definition `exteriorPower R n M` for the `n`th exterior power of the `R`-module `M`; this is of type `Submodule R (ExteriorAlgebra R M)` and defined as `LinearMap.range (ExteriorAlgebra.ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n`. 
It also introduces the notation `Λ[R]^n M` for `exteriorPower R n M`.

Note: for a reason that I don't understand, Lean becomes unable to synthesize the `SetLike.GradedMonoid` instance on `fun (i : ℕ) ↦ (Λ[R]^i) M`, so I added it manually in `ExteriorAlgebra/Graded.lean`. I am far from sure that this is the correct solution.



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Richard Copley <buster@buster.me.uk>
xgenereux pushed a commit that referenced this pull request Apr 15, 2024
…tion and notation for the exterior powers of a module (#10744)

This is split off from PR #10654 (that actually proves some properties of the exterior powers). It introduces the reducible definition `exteriorPower R n M` for the `n`th exterior power of the `R`-module `M`; this is of type `Submodule R (ExteriorAlgebra R M)` and defined as `LinearMap.range (ExteriorAlgebra.ι R : M →ₗ[R] ExteriorAlgebra R M) ^ n`. 
It also introduces the notation `Λ[R]^n M` for `exteriorPower R n M`.

Note: for a reason that I don't understand, Lean becomes unable to synthesize the `SetLike.GradedMonoid` instance on `fun (i : ℕ) ↦ (Λ[R]^i) M`, so I added it manually in `ExteriorAlgebra/Graded.lean`. I am far from sure that this is the correct solution.



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Richard Copley <buster@buster.me.uk>
@ghost ghost added the blocked-by-other-PR label May 27, 2024
@ghost ghost added the blocked-by-other-PR label May 28, 2024
@smorel394 smorel394 added the please-adopt Inactive PR (would be valuable to adopt) label Jul 16, 2024
@github-actions github-actions bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Nov 3, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 3, 2024

PR summary 504113759a

Import changes exceeding 2%

% File
+46.06% Mathlib.LinearAlgebra.TensorPower

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.LinearAlgebra.TensorPower 888 1297 +409 (+46.06%)
Import changes for all files
Files Import difference
Mathlib.LinearAlgebra.TensorAlgebra.ToTensorPower Mathlib.LinearAlgebra.FreeProduct.Basic 345
Mathlib.LinearAlgebra.TensorPower 409
Mathlib.LinearAlgebra.ExteriorPower.Basic 1341
Mathlib.LinearAlgebra.ExteriorPower.Generators 1344

Declarations diff

+ _root_.Basis.exteriorPower
+ alternatingFormOfFamily
+ alternatingFormOfFamily_apply
+ basis_apply
+ basis_coord
+ coe_basis
+ finrank_eq
+ instFinite
+ instFree
+ instNonempty
+ lhom_ext
+ liftAlternating
+ liftAlternatingEquiv
+ liftAlternatingEquiv_apply
+ liftAlternatingEquiv_symm_apply
+ liftAlternating_apply_ιMulti
+ liftAlternating_comp
+ liftAlternating_comp_ιMulti
+ liftAlternating_ιMulti
+ linearFormOfBasis
+ linearFormOfBasis_apply_diag
+ linearFormOfBasis_apply_nondiag
+ linearFormOfBasis_apply_nondiag_aux
+ linearFormOfBasis_apply_ιMulti
+ linearFormOfFamily_apply
+ linearFormOfFamily_apply_tprod
+ linearFormOfFamily_apply_ιMulti
+ linearFormOfFamily_comp_map
+ linearFormOfFamily_comp_map_apply
+ linearIndependent_of_dualFamily
+ map
+ map_apply_ιMulti
+ map_comp_map
+ map_comp_ιMulti
+ map_id
+ map_injective
+ map_injective_field
+ map_surjective
+ map_ιMulti_family
+ mem_exteriorPower_is_mem_finite
+ span_of_span
+ span_top_of_span_top
+ span_top_of_span_top'
+ sum_range_map
+ toTensorPower
+ toTensorPower_apply_ιMulti
+ ιMulti
+ ιMulti_apply
+ ιMulti_family
+ ιMulti_family_coe
+ ιMulti_family_linearIndependent_field
+ ιMulti_family_linearIndependent_ofBasis
+ ιMulti_span
+ ιMulti_span_fixedDegree
++ linearFormOfFamily

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.

@joelriou
Copy link
Copy Markdown
Contributor

joelriou commented Nov 3, 2024

I have started a new PR #18590 with the results in the beginning of ExteriorPower.Basic, until the universal property of the exterior power. Then, I intend to two a second PR (#18596) for the following section on functoriality (and defining functors ModuleCat R ⥤ ModuleCat R).

@joelriou
Copy link
Copy Markdown
Contributor

joelriou commented Nov 4, 2024

In the branch https://github.com/leanprover-community/mathlib4/tree/SM.ExteriorPower_jriou I have merged this with master and the two new PRs #18590 and #18596. If there is no objection, I could merge SM.ExteriorPower_jriou into this branch SM.ExteriorPower.

@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Dec 4, 2024
mathlib-bors bot pushed a commit that referenced this pull request Feb 5, 2025
…roduct of a family of vectors (#21397)

This splits the definition of `ιMulti_family` from PR #10654 along with a few basic lemmas that do not rely on other parts of the PR. The `ιMulti_family` definition allows taking the product of a subset of a family of vectors, which is useful when the number of vectors is different from the degree of the exterior power. In particular, this is useful for working with a collection of basis or spanning vectors.
pfaffelh pushed a commit that referenced this pull request Feb 7, 2025
…roduct of a family of vectors (#21397)

This splits the definition of `ιMulti_family` from PR #10654 along with a few basic lemmas that do not rely on other parts of the PR. The `ιMulti_family` definition allows taking the product of a subset of a family of vectors, which is useful when the number of vectors is different from the degree of the exterior power. In particular, this is useful for working with a collection of basis or spanning vectors.
@pink10000
Copy link
Copy Markdown

Any updates on this? My team and I are looking to use finrank_eq for our project.

@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Dec 21, 2025
@ocfnash
Copy link
Copy Markdown
Contributor

ocfnash commented Feb 16, 2026

Thanks to a series of PRs from @morrison-daniel ending with #32708 I believe we now have all of the material from this PR in master 🎉

@ocfnash ocfnash closed this Feb 16, 2026
@YaelDillies YaelDillies deleted the SM.ExteriorPower branch March 29, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

large-import Automatically added label for PRs with a significant increase in transitive imports merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) please-adopt Inactive PR (would be valuable to adopt) t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.