Skip to content

[Merged by Bors] - refactor: change the proof of Module.Finite.injective_of_surjective_endomorphism and commRing_strongRankCondition#12076

Closed
acmepjz wants to merge 52 commits intomasterfrom
acmepjz_orzech
Closed

[Merged by Bors] - refactor: change the proof of Module.Finite.injective_of_surjective_endomorphism and commRing_strongRankCondition#12076
acmepjz wants to merge 52 commits intomasterfrom
acmepjz_orzech

Conversation

@acmepjz
Copy link
Copy Markdown
Collaborator

@acmepjz acmepjz commented Apr 11, 2024

  • Module.Finite.injective_of_surjective_endomorphism is proved via OrzechProperty.injective_of_surjective_endomorphism since we already proved that commutative rings have OrzechProperty.
  • commRing_strongRankCondition is proved via inferInstance since we know that commutative rings have OrzechProperty, and any nontrivial ring satisfying OrzechProperty also satisfies StrongRankCondition.

Due to the change of proof, some imports in the corresponding files become unnecessary, as reported by shake. This makes the change of imports in a lot of files.

The change of proof also makes LinearMap.tunnel and LinearMap.tailing not used in mathlib anymore.
These are marked as deprecated with no replacements.


NOTE: reason to change the imports to several files:

Warning: ././././Mathlib/RingTheory/FiniteType.lean:7:1: warning: unused import (use `lake exe shake --fix` to fix this, or `lake exe shake --update` to ignore)
././././Mathlib/RingTheory/FiniteType.lean:
  remove #[Mathlib.Algebra.Polynomial.Module.Basic]
  instead
    import [Mathlib.Algebra.Polynomial.Module.Basic] in Mathlib.LinearAlgebra.AnnihilatingPolynomial
Warning: ././././Mathlib/LinearAlgebra/FreeModule/StrongRankCondition.lean:6:1: warning: unused import (use `lake exe shake --fix` to fix this, or `lake exe shake --update` to ignore)
Warning: ././././Mathlib/LinearAlgebra/FreeModule/StrongRankCondition.lean:7:1: warning: import #[Mathlib.RingTheory.FiniteType] instead
././././Mathlib/LinearAlgebra/FreeModule/StrongRankCondition.lean:
  remove #[Mathlib.LinearAlgebra.Charpoly.Basic]
  add #[Mathlib.RingTheory.FiniteType]
  instead
    import [Mathlib.RingTheory.Ideal.LocalRing] in Mathlib.LinearAlgebra.Dual
    import [Mathlib.RingTheory.Ideal.LocalRing] in Mathlib.FieldTheory.Tower
    import [Mathlib.RingTheory.Algebraic, Mathlib.FieldTheory.Minpoly.Basic] in Mathlib.FieldTheory.IntermediateField
    import [Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff] in Mathlib.LinearAlgebra.Trace
    import [Mathlib.RingTheory.Ideal.LocalRing] in Mathlib.Topology.Algebra.Module.FiniteDimension
    import [Mathlib.LinearAlgebra.Dimension.Constructions] in Mathlib.LinearAlgebra.FreeModule.IdealQuotient
    import [Mathlib.LinearAlgebra.Dimension.StrongRankCondition] in Mathlib.LinearAlgebra.FreeAlgebra

Open in Gitpod

discussion: https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/.2312076.20Orzech's.20theorem

@acmepjz acmepjz added awaiting-review awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. t-algebra Algebra (groups, rings, fields, etc) labels Apr 11, 2024
@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Apr 12, 2024
@acmepjz acmepjz added awaiting-author A reviewer has asked the author a question or requested changes. and removed awaiting-review labels Apr 27, 2024
@acmepjz
Copy link
Copy Markdown
Collaborator Author

acmepjz commented Apr 29, 2024

I've checked that IsNoetherian.injective_of_surjective_of_injective could be moved to Mathlib.LinearAlgebra.InvariantBasisNumber, but not Module.Finite.injective_of_surjective_of_injective, since Hilbert basis theorem is not imported by that file.

@AntoineChambert-Loir
Copy link
Copy Markdown
Collaborator

Then it would be nice to have a Orzech file that proves that theorem. It will be small to start with, but additions will be possible.

@acmepjz
Copy link
Copy Markdown
Collaborator Author

acmepjz commented Apr 29, 2024

Then it would be nice to have a Orzech file that proves that theorem. It will be small to start with, but additions will be possible.

My idea is nuke the contents of the file Mathlib.LinearAlgebra.FreeModule.StrongRankCondition, replace commRing_strongRankCondition by commRing_orzechProperty. Combined with strongRankCondition_of_orzechProperty it recovers the original commRing_strongRankCondition.

@acmepjz acmepjz added awaiting-review and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Apr 30, 2024
@ghost
Copy link
Copy Markdown

ghost commented Jun 4, 2024

# Conflicts:
#	Mathlib/RingTheory/FiniteType.lean
#	Mathlib/RingTheory/Noetherian.lean
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jun 4, 2024
@acmepjz acmepjz changed the title feat: add Orzech's theorem (IsNoetherian|Module.Finite).injective_of_surjective_of_injective refactor: change the proof of Module.Finite.injective_of_surjective_endomorphism and commRing_strongRankCondition Jun 4, 2024
callesonne pushed a commit that referenced this pull request Jun 4, 2024
This is part one of #12076.

`OrzechProperty R` is a type class stating that `R` satisfies the following property: for any finitely generated `R`-module `M`, any surjective homomorphism `f : N → M` from a submodule `N` of `M` to `M` is injective.

We stated some basic results about `OrzechProperty` and proved that it implies `StrongRankCondition`.
callesonne pushed a commit that referenced this pull request Jun 4, 2024
…erty` (#13425)

This is part 2 of #12076.

It states that if

- `R` is a ring (not necessarily commutative) and `M` is a Noetherian `R`-module (based on the proof in <https://math.stackexchange.com/a/1066128>), or
- `R` is a commutative ring and `M` is a finitely generated `R`-module (based on the proof in <https://math.stackexchange.com/a/1066110>),

if `N` is a submodule of `M`, `f : N -> M` is a surjective `R`-module homomorphism, then it is also injective.

These results generalize `(IsNoetherian|Module.Finite).injective_of_surjective_endomorphism`.

The proof for Noetherian case uses `LinearMap.iterateMapComap` which is put into `Mathlib/Algebra/Module/Submodule/IterateMapComap.lean`.

The changed proof makes `LinearMap.tunnel` and `LinearMap.tailing` not used in any other parts of mathlib. Remove them or not is leaved for future discussion.
@acmepjz acmepjz added awaiting-review and removed WIP Work in progress labels Jun 5, 2024
@jcommelin
Copy link
Copy Markdown
Member

Thanks 🎉

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Jun 6, 2024
mathlib-bors bot pushed a commit that referenced this pull request Jun 6, 2024
…endomorphism` and `commRing_strongRankCondition` (#12076)

- `Module.Finite.injective_of_surjective_endomorphism` is proved via `OrzechProperty.injective_of_surjective_endomorphism` since we already proved that commutative rings have `OrzechProperty`.
- `commRing_strongRankCondition` is proved via `inferInstance` since we know that commutative rings have `OrzechProperty`, and any nontrivial ring satisfying `OrzechProperty` also satisfies `StrongRankCondition`.

Due to the change of proof, some imports in the corresponding files become unnecessary, as reported by `shake`. This makes the change of imports in a lot of files.

The change of proof also makes `LinearMap.tunnel` and `LinearMap.tailing` not used in mathlib anymore.
These are marked as deprecated with no replacements.



Co-authored-by: Antoine Chambert-Loir <antoine.chambert-loir@u-paris.fr>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jun 6, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title refactor: change the proof of Module.Finite.injective_of_surjective_endomorphism and commRing_strongRankCondition [Merged by Bors] - refactor: change the proof of Module.Finite.injective_of_surjective_endomorphism and commRing_strongRankCondition Jun 6, 2024
@mathlib-bors mathlib-bors bot closed this Jun 6, 2024
@mathlib-bors mathlib-bors bot deleted the acmepjz_orzech branch June 6, 2024 11:50
grunweg pushed a commit that referenced this pull request Jun 7, 2024
…erty` (#13425)

This is part 2 of #12076.

It states that if

- `R` is a ring (not necessarily commutative) and `M` is a Noetherian `R`-module (based on the proof in <https://math.stackexchange.com/a/1066128>), or
- `R` is a commutative ring and `M` is a finitely generated `R`-module (based on the proof in <https://math.stackexchange.com/a/1066110>),

if `N` is a submodule of `M`, `f : N -> M` is a surjective `R`-module homomorphism, then it is also injective.

These results generalize `(IsNoetherian|Module.Finite).injective_of_surjective_endomorphism`.

The proof for Noetherian case uses `LinearMap.iterateMapComap` which is put into `Mathlib/Algebra/Module/Submodule/IterateMapComap.lean`.

The changed proof makes `LinearMap.tunnel` and `LinearMap.tailing` not used in any other parts of mathlib. Remove them or not is leaved for future discussion.
grunweg pushed a commit that referenced this pull request Jun 7, 2024
…endomorphism` and `commRing_strongRankCondition` (#12076)

- `Module.Finite.injective_of_surjective_endomorphism` is proved via `OrzechProperty.injective_of_surjective_endomorphism` since we already proved that commutative rings have `OrzechProperty`.
- `commRing_strongRankCondition` is proved via `inferInstance` since we know that commutative rings have `OrzechProperty`, and any nontrivial ring satisfying `OrzechProperty` also satisfies `StrongRankCondition`.

Due to the change of proof, some imports in the corresponding files become unnecessary, as reported by `shake`. This makes the change of imports in a lot of files.

The change of proof also makes `LinearMap.tunnel` and `LinearMap.tailing` not used in mathlib anymore.
These are marked as deprecated with no replacements.



Co-authored-by: Antoine Chambert-Loir <antoine.chambert-loir@u-paris.fr>
AntoineChambert-Loir pushed a commit that referenced this pull request Jun 20, 2024
…erty` (#13425)

This is part 2 of #12076.

It states that if

- `R` is a ring (not necessarily commutative) and `M` is a Noetherian `R`-module (based on the proof in <https://math.stackexchange.com/a/1066128>), or
- `R` is a commutative ring and `M` is a finitely generated `R`-module (based on the proof in <https://math.stackexchange.com/a/1066110>),

if `N` is a submodule of `M`, `f : N -> M` is a surjective `R`-module homomorphism, then it is also injective.

These results generalize `(IsNoetherian|Module.Finite).injective_of_surjective_endomorphism`.

The proof for Noetherian case uses `LinearMap.iterateMapComap` which is put into `Mathlib/Algebra/Module/Submodule/IterateMapComap.lean`.

The changed proof makes `LinearMap.tunnel` and `LinearMap.tailing` not used in any other parts of mathlib. Remove them or not is leaved for future discussion.
AntoineChambert-Loir added a commit that referenced this pull request Jun 20, 2024
…endomorphism` and `commRing_strongRankCondition` (#12076)

- `Module.Finite.injective_of_surjective_endomorphism` is proved via `OrzechProperty.injective_of_surjective_endomorphism` since we already proved that commutative rings have `OrzechProperty`.
- `commRing_strongRankCondition` is proved via `inferInstance` since we know that commutative rings have `OrzechProperty`, and any nontrivial ring satisfying `OrzechProperty` also satisfies `StrongRankCondition`.

Due to the change of proof, some imports in the corresponding files become unnecessary, as reported by `shake`. This makes the change of imports in a lot of files.

The change of proof also makes `LinearMap.tunnel` and `LinearMap.tailing` not used in mathlib anymore.
These are marked as deprecated with no replacements.



Co-authored-by: Antoine Chambert-Loir <antoine.chambert-loir@u-paris.fr>
mathlib-bors bot pushed a commit that referenced this pull request Dec 19, 2025
Strong rank condition fails for R iff there is a copy of $R^{(\mathbb{N})}$ in some $R^n$, iff some $R^n$ has infinity rank, iff some $R^{n+1}$ has zero `finrank`. As consequences, if all $R^n$ are Noetherian or Artinian, then $R$ satisfies the strong rank condition.

To prove the first equivalence, I redeveloped a version of the ["tunnels and tailings"](leanprover-community/mathlib3@86766851#diff-7829719aad6a9e3e617da2a7cf29dba4d55516b27e18f240eca352f4983d67b7R472-R491) construction @jcommelin and @kim-em contributed to mathlib ~4 years ago and made it work for Semiring/AddCommMonoid. The original construction was deprecated in [#12076](5948566) by @acmepjz and later removed, though some docstrings still remain, and I think it's now time to remove it.

Also add an instance that finite semirings satisfy the Orzech property (and therefore strong rank condition and invariant basis number).
mathlib-bors bot pushed a commit that referenced this pull request Dec 19, 2025
Strong rank condition fails for R iff there is a copy of $R^{(\mathbb{N})}$ in some $R^n$, iff some $R^n$ has infinity rank, iff some $R^{n+1}$ has zero `finrank`. As consequences, if all $R^n$ are Noetherian or Artinian, then $R$ satisfies the strong rank condition.

To prove the first equivalence, I redeveloped a version of the ["tunnels and tailings"](leanprover-community/mathlib3@86766851#diff-7829719aad6a9e3e617da2a7cf29dba4d55516b27e18f240eca352f4983d67b7R472-R491) construction @jcommelin and @kim-em contributed to mathlib ~4 years ago and made it work for Semiring/AddCommMonoid. The original construction was deprecated in [#12076](5948566) by @acmepjz and later removed, though some docstrings still remain, and I think it's now time to remove it.

Also add an instance that finite semirings satisfy the Orzech property (and therefore strong rank condition and invariant basis number).
YuvalFilmus pushed a commit to YuvalFilmus/mathlib4 that referenced this pull request Dec 19, 2025
…y#32194)

Strong rank condition fails for R iff there is a copy of $R^{(\mathbb{N})}$ in some $R^n$, iff some $R^n$ has infinity rank, iff some $R^{n+1}$ has zero `finrank`. As consequences, if all $R^n$ are Noetherian or Artinian, then $R$ satisfies the strong rank condition.

To prove the first equivalence, I redeveloped a version of the ["tunnels and tailings"](leanprover-community/mathlib3@86766851#diff-7829719aad6a9e3e617da2a7cf29dba4d55516b27e18f240eca352f4983d67b7R472-R491) construction @jcommelin and @kim-em contributed to mathlib ~4 years ago and made it work for Semiring/AddCommMonoid. The original construction was deprecated in [leanprover-community#12076](leanprover-community@5948566) by @acmepjz and later removed, though some docstrings still remain, and I think it's now time to remove it.

Also add an instance that finite semirings satisfy the Orzech property (and therefore strong rank condition and invariant basis number).
goliath-klein pushed a commit to PrParadoxy/mathlib4 that referenced this pull request Jan 24, 2026
…y#32194)

Strong rank condition fails for R iff there is a copy of $R^{(\mathbb{N})}$ in some $R^n$, iff some $R^n$ has infinity rank, iff some $R^{n+1}$ has zero `finrank`. As consequences, if all $R^n$ are Noetherian or Artinian, then $R$ satisfies the strong rank condition.

To prove the first equivalence, I redeveloped a version of the ["tunnels and tailings"](leanprover-community/mathlib3@86766851#diff-7829719aad6a9e3e617da2a7cf29dba4d55516b27e18f240eca352f4983d67b7R472-R491) construction @jcommelin and @kim-em contributed to mathlib ~4 years ago and made it work for Semiring/AddCommMonoid. The original construction was deprecated in [leanprover-community#12076](leanprover-community@5948566) by @acmepjz and later removed, though some docstrings still remain, and I think it's now time to remove it.

Also add an instance that finite semirings satisfy the Orzech property (and therefore strong rank condition and invariant basis number).
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.

4 participants