Skip to content

[Merged by Bors] - feat(Mathlib/LinearAlgebra): embeddings of free modules#37919

Closed
artie2000 wants to merge 8 commits intoleanprover-community:masterfrom
artie2000:embed-submodule
Closed

[Merged by Bors] - feat(Mathlib/LinearAlgebra): embeddings of free modules#37919
artie2000 wants to merge 8 commits intoleanprover-community:masterfrom
artie2000:embed-submodule

Conversation

@artie2000
Copy link
Copy Markdown
Collaborator

@artie2000 artie2000 commented Apr 11, 2026

  • A free module embeds linearly into any module of strictly greater rank
  • A free module embeds linearly into another free module iff the other one has greater rank

The proofs have been generalised as much as possible.

Co-authored-by: Aaron Liu aaronliu2008@outlook.com


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 11, 2026

PR summary 09037d340e

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ exists_linearMap_injective_of_lift_rank_lt
+ exists_linearMap_injective_of_linearIndependent_of_lift_rank_le
+ exists_linearMap_injective_of_linearIndependent_of_rank_le
+ exists_linearMap_injective_of_rank_lt
+ exists_set_linearIndependent_of_lt_lift_rank
+ finrank_le_iff_exists_linearMap
+ injective_constr_of_linearIndependent
+ lift_rank_le_iff_exists_linearMap
+ rank_le_iff_exists_linearMap
+-+ exists_set_linearIndependent_of_lt_rank

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

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

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


No changes to technical debt.

You can run this locally as

./scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions bot added the t-algebra Algebra (groups, rings, fields, etc) label Apr 11, 2026
Comment thread Mathlib/LinearAlgebra/Dimension/Free.lean Outdated
Copy link
Copy Markdown
Member

@riccardobrasca riccardobrasca left a comment

Choose a reason for hiding this comment

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

There the comment by Eric, but otherwise LGTM, thanks!

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Apr 13, 2026

✌️ artie2000 can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@mathlib-triage mathlib-triage bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Apr 13, 2026
variable [Semiring R] [AddCommMonoid M] [Module R M] [Nontrivial R]
variable [Semiring R] [AddCommMonoid M] [Module R M]

theorem exists_set_of_lt_lift_rank {α : Cardinal.{w}}
Copy link
Copy Markdown
Member

@eric-wieser eric-wieser Apr 13, 2026

Choose a reason for hiding this comment

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

Suggested change
theorem exists_set_of_lt_lift_rank {α : Cardinal.{w}}
theorem exists_linearIndepOn_of_lt_lift_rank {α : Cardinal.{w}}

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.

going with exists_set_linearIndependent_of_lt_lift_rank by analogy with existing exists_set_linearIndependent_of_lt_rank

Comment thread Mathlib/LinearAlgebra/Dimension/Basic.lean Outdated
Comment thread Mathlib/LinearAlgebra/Dimension/Basic.lean Outdated
Comment thread Mathlib/LinearAlgebra/Dimension/Free.lean Outdated
@artie2000
Copy link
Copy Markdown
Collaborator Author

How do I un-delegate?

@riccardobrasca
Copy link
Copy Markdown
Member

bors d-

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Apr 13, 2026

🚫 All delegations have been removed from this PR. To re-add a delegation, reply with bors d+ (to delegate the PR author) or bors d=list,of,github,usernames to delegate multiple users.

@mathlib-triage mathlib-triage bot removed the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Apr 13, 2026
Comment thread Mathlib/LinearAlgebra/Dimension/Basic.lean Outdated
Comment thread Mathlib/LinearAlgebra/Dimension/Basic.lean Outdated
Comment thread Mathlib/LinearAlgebra/Dimension/Basic.lean Outdated
artie2000 and others added 3 commits April 13, 2026 22:01
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends Mathlib’s dimension theory for free modules by proving existence/characterization results for injective linear maps (linear embeddings) between free modules in terms of Module.rank/finrank, with universe-polymorphic (“lift”) statements where appropriate.

Changes:

  • Add existence theorems producing injective linear maps M →ₗ[R] N from rank inequalities, and rank/finrank characterizations via existence of an injective linear map.
  • Generalize/move “existence of a linearly independent set of prescribed cardinality below rank” into Dimension/Basic.lean, and deprecate the old lemma location/name in Dimension/Finite.lean.
  • Add a new basis lemma showing Basis.constr is injective when its images of basis vectors are linearly independent (used to build embeddings).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
Mathlib/LinearAlgebra/Dimension/Free.lean Adds rank-/lift-rank-based existence of injective linear maps and rank ≤ / finrank ≤ iff-exists-injective-linear-map lemmas (under StrongRankCondition where needed).
Mathlib/LinearAlgebra/Dimension/Finite.lean Removes the old exists_set_linearIndependent_of_lt_rank lemma and replaces it with a deprecated alias to the new canonical lemma in Module.
Mathlib/LinearAlgebra/Dimension/Basic.lean Introduces Module.exists_set_linearIndependent_of_lt_lift_rank and Module.exists_set_linearIndependent_of_lt_rank, making the construction available in the core dimension file.
Mathlib/LinearAlgebra/Basis/Basic.lean Adds Module.Basis.injective_constr_of_linearIndependent, enabling injectivity of Basis.constr from linear independence of assigned vectors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Mathlib/LinearAlgebra/Dimension/Basic.lean Outdated
Comment thread Mathlib/LinearAlgebra/Dimension/Free.lean
@riccardobrasca
Copy link
Copy Markdown
Member

@eric-wieser are you happy with this?

Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com>
@artie2000 artie2000 added awaiting-author A reviewer has asked the author a question or requested changes. and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Apr 14, 2026
@riccardobrasca
Copy link
Copy Markdown
Member

LGTM. @eric-wieser can you have another quick look? Thanks!

@eric-wieser
Copy link
Copy Markdown
Member

bors merge

Thanks!

mathlib-bors bot pushed a commit that referenced this pull request Apr 15, 2026
* A free module embeds linearly into any module of strictly greater rank
* A free module embeds linearly into another free module iff the other one has greater rank

The proofs have been generalised as much as possible.

Co-authored-by: Aaron Liu <aaronliu2008@outlook.com>
@mathlib-triage mathlib-triage bot added the ready-to-merge This PR has been sent to bors. label Apr 15, 2026
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Apr 15, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Mathlib/LinearAlgebra): embeddings of free modules [Merged by Bors] - feat(Mathlib/LinearAlgebra): embeddings of free modules Apr 15, 2026
@mathlib-bors mathlib-bors bot closed this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants