Skip to content

feat(LinearAlgebra/Dimension): tower law for algebraic extensions - #40448

Open
ChiCubed wants to merge 16 commits into
leanprover-community:masterfrom
ChiCubed:x3/algebraic-tower-law
Open

ChiCubed wants to merge 16 commits into
leanprover-community:masterfrom
ChiCubed:x3/algebraic-tower-law

Conversation

@ChiCubed

Copy link
Copy Markdown
Contributor

We generalise the tower law for Module.rank to the situation of a module over an algebraic extension of domains.


See the Zulip thread for some associated discussion.

I am not sure about in which file these results should live, or what their names should be. For the file I have gone with LinearAlgebra/Dimension/Algebraic.lean for now, because these feel more like dimension theorems than Algebra.IsAlgebraic theorems, and IMO do not logically fit into the other existing files in LinearAlgebra/Dimension.

Open in Gitpod

@github-actions github-actions Bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Jun 10, 2026
@github-actions

Copy link
Copy Markdown

Welcome new contributor!

Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests.

We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the awaiting-author tag, or another reason described in the Lifecycle of a PR. The review dashboard has a dedicated webpage which shows whether your PR is on the review queue, and (if not), why.

If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR.

Thank you again for joining our community.

@github-actions github-actions Bot added the t-algebra Algebra (groups, rings, fields, etc) label Jun 10, 2026
@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

PR summary c323074686

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.LinearAlgebra.Dimension.Domain (new file) 1806

Declarations diff (regex)

+ IsTorsionFree.erank_mul_erank
+ IsTorsionFree.finrank_mul_finrank
+ finrank_mul_finrank
+ finrank_mul_finrank_of_field_isLocalization
+ finrank_mul_finrank_of_isFractionRing_isLocalization
+ lift_rank_mul_lift_rank
+ lift_rank_mul_lift_rank_of_field_isLocalization
+ lift_rank_mul_lift_rank_of_isFractionRing_isLocalization
+ of_semifield_isLocalization
+ rank_mul_rank
+ rank_mul_rank_of_field_isLocalization
+ rank_mul_rank_of_isFractionRing_isLocalization

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

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

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean -- stale, waiting for the new build)

Lean-aware diff — post-build, computed from the Lean environment (commit 0702c32).

  • +12 new declarations
  • −0 removed declarations
+Algebra.IsAlgebraic.finrank_mul_finrank
+Algebra.IsAlgebraic.lift_rank_mul_lift_rank
+Algebra.IsAlgebraic.rank_mul_rank
+IsFractionRing.of_semifield_isLocalization
+Module.IsTorsionFree.erank_mul_erank
+Module.IsTorsionFree.finrank_mul_finrank
+Module.finrank_mul_finrank_of_field_isLocalization
+Module.finrank_mul_finrank_of_isFractionRing_isLocalization
+Module.lift_rank_mul_lift_rank_of_field_isLocalization
+Module.lift_rank_mul_lift_rank_of_isFractionRing_isLocalization
+Module.rank_mul_rank_of_field_isLocalization
+Module.rank_mul_rank_of_isFractionRing_isLocalization

No changes to strong technical debt.
No changes to weak technical debt.

Current commit c323074686
Reference commit dec5b2b780

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py 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).

Comment thread Mathlib/LinearAlgebra/Dimension/Algebraic.lean Outdated
Comment thread Mathlib/LinearAlgebra/Dimension/Algebraic.lean Outdated
ChiCubed and others added 2 commits July 10, 2026 04:59
Co-authored-by: Monica Omar <23701951+themathqueen@users.noreply.github.com>
@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jul 30, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@github-actions github-actions Bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 2, 2026
@ChiCubed

ChiCubed commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

I noticed some improvements are possible to #41614 when merging but it'll be a nontrivial amount of code so I'll make it a different PR

@themathqueen

Copy link
Copy Markdown
Member

I noticed some improvements are possible to #41614 when merging but it'll be a nontrivial amount of code so I'll make it a different PR

I think it would be better if you merge master and just do it now.

@themathqueen themathqueen added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Aug 3, 2026
@ChiCubed

ChiCubed commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

OK. Let me know if you want me to split it up after all, the diff ended up a bit bigger than I was expecting.
My new definition of Module.finrank_mul_finrank' is technically not strictly more general, but the (bad) difference comes from what was a golfed-away IsDomain S assumption that just follows immediately from FaithfulSMul S T. So it should be better for all practical purposes.

@ChiCubed

ChiCubed commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Aug 4, 2026
Comment thread Mathlib/LinearAlgebra/Dimension/Domain.lean Outdated
Comment thread Mathlib/LinearAlgebra/Dimension/Domain.lean Outdated
Comment thread Mathlib/LinearAlgebra/Dimension/Domain.lean Outdated
@joneugster joneugster removed their assignment Sep 4, 2026
Comment on lines +261 to +262
theorem finrank_mul_finrank :
finrank R S * finrank S M = finrank R M :=

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No need for some of these newlines.

Suggested change
theorem finrank_mul_finrank :
finrank R S * finrank S M = finrank R M :=
theorem finrank_mul_finrank : finrank R S * finrank S M = finrank R M :=

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I edited the two near that but left others unchanged despite being able to fit on one line within col limit (since I find that for long theorem names it makes it hard to tell what the type is at a glance)

Comment thread Mathlib/LinearAlgebra/Dimension/Domain.lean Outdated
Comment thread Mathlib/LinearAlgebra/Dimension/Domain.lean Outdated
Comment thread Mathlib/LinearAlgebra/Dimension/Domain.lean Outdated
@tb65536 tb65536 added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Sep 18, 2026
@ChiCubed

Copy link
Copy Markdown
Contributor Author

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Sep 18, 2026
Comment thread Mathlib/LinearAlgebra/Dimension/Domain.lean Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants