Skip to content

[Merged by Bors] - chore(RingTheory/Flat): split CharacterModule results from Flat/Basic.lean - #29808

Closed
Vierkantor wants to merge 3 commits into
leanprover-community:masterfrom
Vierkantor:split-RingTheory.Flat.Basic
Closed

Vierkantor wants to merge 3 commits into
leanprover-community:masterfrom
Vierkantor:split-RingTheory.Flat.Basic

Conversation

@Vierkantor

@Vierkantor Vierkantor commented Sep 19, 2025 •

Copy link
Copy Markdown
Contributor

The results requiring character modules require importing a whole set of topological definitions, via AddCircle. This creates a big topological dependency tree for theory that otherwise lives neatly in algebra. As we can see by looking at the 50 or so files losing hundreds of dependencies each!

I spotted this as I tried to reduce the amount of analysis and topology imported into the LinearAlgebra folder.


Not sure about the naming of the file, other suggestions are welcome!

Open in Gitpod

@github-actions

github-actions Bot commented Sep 19, 2025 •

Copy link
Copy Markdown

PR summary 432a037a7f

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.RingTheory.Flat.Basic 1755 1368 -387 (-22.05%)
Mathlib.Algebra.Category.Grp.Injective 1573 1286 -287 (-18.25%)
Mathlib.Algebra.Lie.Weights.Chain 2034 1722 -312 (-15.34%)
Mathlib.AlgebraicGeometry.ProjectiveSpectrum.Proper 2286 2215 -71 (-3.11%)
Import changes for all files
Files Import difference
Mathlib.RingTheory.Flat.Basic Mathlib.RingTheory.Flat.Equalizer -387
Mathlib.Algebra.Central.TensorProduct Mathlib.LinearAlgebra.LinearDisjoint -386
Mathlib.RingTheory.Flat.FaithfullyFlat.Basic Mathlib.RingTheory.Flat.Stability -385
Mathlib.RingTheory.Flat.Localization Mathlib.RingTheory.TensorProduct.Nontrivial -384
Mathlib.RingTheory.Flat.Domain -383
4 files Mathlib.Algebra.Lie.Character Mathlib.Algebra.Lie.Semisimple.Basic Mathlib.Algebra.Lie.Semisimple.Defs Mathlib.Algebra.Lie.Solvable
-378
Mathlib.Algebra.Lie.InvariantForm -372
Mathlib.RingTheory.Flat.FaithfullyFlat.Algebra -355
4 files Mathlib.Algebra.Lie.CartanSubalgebra Mathlib.Algebra.Lie.EngelSubalgebra Mathlib.Algebra.Lie.Engel Mathlib.Algebra.Lie.Nilpotent
-354
3 files Mathlib.Algebra.Lie.CartanExists Mathlib.Algebra.Lie.Rank Mathlib.RingTheory.LinearDisjoint
-318
7 files Mathlib.Algebra.Lie.Killing Mathlib.Algebra.Lie.LieTheorem Mathlib.Algebra.Lie.Semisimple.Lemmas Mathlib.Algebra.Lie.TraceForm Mathlib.Algebra.Lie.Weights.Basic Mathlib.Algebra.Lie.Weights.Cartan Mathlib.Algebra.Lie.Weights.Linear
-317
Mathlib.Algebra.Lie.Derivation.Killing -316
Mathlib.FieldTheory.LinearDisjoint Mathlib.FieldTheory.PurelyInseparable.Tower -314
Mathlib.Algebra.Lie.Weights.Chain -312
Mathlib.RingTheory.Regular.IsSMulRegular -307
Mathlib.RingTheory.Etale.Kaehler Mathlib.RingTheory.Unramified.Finite -305
Mathlib.RingTheory.Regular.RegularSequence -301
Mathlib.RingTheory.Regular.Flat -300
3 files Mathlib.LinearAlgebra.RootSystem.GeckConstruction.Basic Mathlib.LinearAlgebra.RootSystem.GeckConstruction.Relations Mathlib.LinearAlgebra.RootSystem.GeckConstruction.Semisimple
-298
Mathlib.Algebra.Lie.Weights.Killing Mathlib.Algebra.Lie.Weights.RootSystem -294
Mathlib.Algebra.Category.Grp.Injective -287
Mathlib.RingTheory.Ideal.GoingDown -250
Mathlib.RingTheory.Flat.CategoryTheory -248
Mathlib.Algebra.Category.Ring.LinearAlgebra Mathlib.RingTheory.Spectrum.Prime.Chevalley -238
Mathlib.RingTheory.Spectrum.Prime.Homeomorph -233
Mathlib.RingTheory.Regular.Depth -185
Mathlib.RingTheory.Etale.Field Mathlib.RingTheory.Unramified.Field -175
Mathlib.RingTheory.RingHom.FaithfullyFlat Mathlib.RingTheory.RingHom.Flat -130
Mathlib.Algebra.Category.Ring.Under.Limits -126
Mathlib.RingTheory.RingHom.Unramified Mathlib.RingTheory.Unramified.Locus -102
Mathlib.RingTheory.Frobenius -101
19 files Mathlib.AlgebraicGeometry.AffineSpace Mathlib.AlgebraicGeometry.AffineTransitionLimit Mathlib.AlgebraicGeometry.Cover.Directed Mathlib.AlgebraicGeometry.Fiber Mathlib.AlgebraicGeometry.IdealSheaf.Functorial Mathlib.AlgebraicGeometry.Morphisms.FinitePresentation Mathlib.AlgebraicGeometry.Morphisms.Finite Mathlib.AlgebraicGeometry.Morphisms.Flat Mathlib.AlgebraicGeometry.Morphisms.Immersion Mathlib.AlgebraicGeometry.Morphisms.Integral Mathlib.AlgebraicGeometry.Morphisms.Proper Mathlib.AlgebraicGeometry.Morphisms.Separated Mathlib.AlgebraicGeometry.Morphisms.UniversallyClosed Mathlib.AlgebraicGeometry.Morphisms.UniversallyInjective Mathlib.AlgebraicGeometry.Morphisms.UniversallyOpen Mathlib.AlgebraicGeometry.PointsPi Mathlib.AlgebraicGeometry.PullbackCarrier Mathlib.AlgebraicGeometry.RationalMap Mathlib.AlgebraicGeometry.ValuativeCriterion
-74
Mathlib.AlgebraicGeometry.ProjectiveSpectrum.Proper -71
4 files Mathlib.AlgebraicGeometry.Morphisms.Etale Mathlib.AlgebraicGeometry.Morphisms.FormallyUnramified Mathlib.AlgebraicGeometry.Morphisms.Smooth Mathlib.AlgebraicGeometry.Sites.Etale
-59
15 files Mathlib.NumberTheory.NumberField.Discriminant.Different Mathlib.NumberTheory.RamificationInertia.Unramified Mathlib.RingTheory.AdicCompletion.AsTensorProduct Mathlib.RingTheory.DedekindDomain.Different Mathlib.RingTheory.Flat.EquationalCriterion Mathlib.RingTheory.Flat.TorsionFree Mathlib.RingTheory.Grassmannian Mathlib.RingTheory.LocalRing.Module Mathlib.RingTheory.PicardGroup Mathlib.RingTheory.RingHom.Etale Mathlib.RingTheory.RingHom.Smooth Mathlib.RingTheory.Smooth.Local Mathlib.RingTheory.Smooth.Locus Mathlib.RingTheory.Spectrum.Prime.FreeLocus Mathlib.RingTheory.Unramified.LocalRing
1
Mathlib.RingTheory.Flat.Tensor (new file) 1756

Declarations diff

+ AddCommGrp.injective_ratCircle
- injective_ratCircle

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.


No changes to technical debt.

You can run this locally as

./scripts/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 file-removed A Lean module was (re)moved without a `deprecated_module` annotation label Sep 19, 2025
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Sep 19, 2025
Vierkantor added a commit to Vierkantor/mathlib4 that referenced this pull request Sep 19, 2025
…ean`

The file `Grp/Injective.lean` contained an injectivity result for `AddCircle`, but this is immediately derived from existing instances. It used to have a much more complex proof. Since `AddCircle` brings with it a whole bunch of analysis and topology imports that we don't need for this algebraic theory, this might save us a couple hundred transitive imports downstream.

I have moved the instance to a test file, to ensure it remains accessible even after future refactors.

This import was spotted in the same PR run as leanprover-community#29808, but does not change the top-level directory import structure in the same way.
@grunweg

grunweg commented Sep 20, 2025

Copy link
Copy Markdown
Contributor

I suppose this depends on #29811, right? Let me add this out of suspicion; feel free to remove if that's not the case.

mathlib-bors Bot pushed a commit that referenced this pull request Sep 22, 2025
…ean` (#29811)

The file `Grp/Injective.lean` contained an injectivity result for `AddCircle`, but this is immediately derived from existing instances. It used to have a much more complex proof. Since `AddCircle` brings with it a whole bunch of analysis and topology imports that we don't need for this algebraic theory, this saves us a couple hundred transitive imports.

Also, clean up the module docs to reflect the current situation.

I have moved the instance to a test file, to ensure it remains accessible even after future refactors.

This import was spotted in the same PR run as #29808, but does not change the top-level directory import structure in the same way.

Co-authored-by: Anne C.A. Baanen <[email protected]>
@Vierkantor

Copy link
Copy Markdown
Contributor Author

They are in fact independent, I just happened to come across them simultaneously. Doesn't matter so much since the dependencies are (being) merged anyway :)

…ean`

The file `Grp/Injective.lean` contained an injectivity result for `AddCircle`, but this is immediately derived from existing instances. It used to have a much more complex proof. Since `AddCircle` brings with it a whole bunch of analysis and topology imports that we don't need for this algebraic theory, this might save us a couple hundred transitive imports downstream.

I have moved the instance to a test file, to ensure it remains accessible even after future refactors.

This import was spotted in the same PR run as leanprover-community#29808, but does not change the top-level directory import structure in the same way.
…sic.lean`

The results requiring character modules require importing a whole set of topological definitions, via `AddCircle`. This creates a big topological dependency tree for theory that otherwise lives neatly in algebra.

I spotted this as I tried to reduce the amount of analysis and topology imported into the LinearAlgebra folder.
@Vierkantor
Vierkantor force-pushed the split-RingTheory.Flat.Basic branch from 63e59cb to b57e3cb Compare September 22, 2025 08:20
@github-actions github-actions Bot removed the file-removed A Lean module was (re)moved without a `deprecated_module` annotation label Sep 22, 2025
mathlib-bors Bot pushed a commit that referenced this pull request Sep 22, 2025
…ean` (#29811)

The file `Grp/Injective.lean` contained an injectivity result for `AddCircle`, but this is immediately derived from existing instances. It used to have a much more complex proof. Since `AddCircle` brings with it a whole bunch of analysis and topology imports that we don't need for this algebraic theory, this saves us a couple hundred transitive imports.

Also, clean up the module docs to reflect the current situation.

I have moved the instance to a test file, to ensure it remains accessible even after future refactors.

This import was spotted in the same PR run as #29808, but does not change the top-level directory import structure in the same way.

Co-authored-by: Anne C.A. Baanen <[email protected]>
@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 Sep 22, 2025
@Vierkantor Vierkantor added the t-ring-theory Ring theory label Sep 25, 2025

@Ruben-VandeVelde Ruben-VandeVelde left a comment

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.

maintainer merge

@github-actions

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by Ruben-VandeVelde.

@ghost ghost added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Sep 28, 2025
@riccardobrasca

Copy link
Copy Markdown
Member

Very nice, thanks!

bors merge

@ghost ghost added ready-to-merge This PR has been sent to bors. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Sep 28, 2025
mathlib-bors Bot pushed a commit that referenced this pull request Sep 28, 2025
…c.lean` (#29808)

The results requiring character modules require importing a whole set of topological definitions, via `AddCircle`. This creates a big topological dependency tree for theory that otherwise lives neatly in algebra. As we can see by looking at the 50 or so files losing hundreds of dependencies each!

I spotted this as I tried to reduce the amount of analysis and topology imported into the LinearAlgebra folder.

Co-authored-by: Anne C.A. Baanen <[email protected]>
@mathlib-bors

mathlib-bors Bot commented Sep 28, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title chore(RingTheory/Flat): split CharacterModule results from Flat/Basic.lean [Merged by Bors] - chore(RingTheory/Flat): split CharacterModule results from Flat/Basic.lean Sep 28, 2025
@mathlib-bors mathlib-bors Bot closed this Sep 28, 2025
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Oct 2, 2025
…ean` (leanprover-community#29811)

The file `Grp/Injective.lean` contained an injectivity result for `AddCircle`, but this is immediately derived from existing instances. It used to have a much more complex proof. Since `AddCircle` brings with it a whole bunch of analysis and topology imports that we don't need for this algebraic theory, this saves us a couple hundred transitive imports.

Also, clean up the module docs to reflect the current situation.

I have moved the instance to a test file, to ensure it remains accessible even after future refactors.

This import was spotted in the same PR run as leanprover-community#29808, but does not change the top-level directory import structure in the same way.

Co-authored-by: Anne C.A. Baanen <[email protected]>
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Oct 2, 2025
…c.lean` (leanprover-community#29808)

The results requiring character modules require importing a whole set of topological definitions, via `AddCircle`. This creates a big topological dependency tree for theory that otherwise lives neatly in algebra. As we can see by looking at the 50 or so files losing hundreds of dependencies each!

I spotted this as I tried to reduce the amount of analysis and topology imported into the LinearAlgebra folder.

Co-authored-by: Anne C.A. Baanen <[email protected]>
zhuyizheng pushed a commit to zhuyizheng/mathlib4 that referenced this pull request Oct 2, 2025
…ean` (leanprover-community#29811)

The file `Grp/Injective.lean` contained an injectivity result for `AddCircle`, but this is immediately derived from existing instances. It used to have a much more complex proof. Since `AddCircle` brings with it a whole bunch of analysis and topology imports that we don't need for this algebraic theory, this saves us a couple hundred transitive imports.

Also, clean up the module docs to reflect the current situation.

I have moved the instance to a test file, to ensure it remains accessible even after future refactors.

This import was spotted in the same PR run as leanprover-community#29808, but does not change the top-level directory import structure in the same way.

Co-authored-by: Anne C.A. Baanen <[email protected]>
mitchell-horner pushed a commit to mitchell-horner/mathlib4 that referenced this pull request Oct 6, 2025
…c.lean` (leanprover-community#29808)

The results requiring character modules require importing a whole set of topological definitions, via `AddCircle`. This creates a big topological dependency tree for theory that otherwise lives neatly in algebra. As we can see by looking at the 50 or so files losing hundreds of dependencies each!

I spotted this as I tried to reduce the amount of analysis and topology imported into the LinearAlgebra folder.

Co-authored-by: Anne C.A. Baanen <[email protected]>
BeibeiX0 pushed a commit to BeibeiX0/mathlib4 that referenced this pull request Nov 7, 2025
…c.lean` (leanprover-community#29808)

The results requiring character modules require importing a whole set of topological definitions, via `AddCircle`. This creates a big topological dependency tree for theory that otherwise lives neatly in algebra. As we can see by looking at the 50 or so files losing hundreds of dependencies each!

I spotted this as I tried to reduce the amount of analysis and topology imported into the LinearAlgebra folder.

Co-authored-by: Anne C.A. Baanen <[email protected]>
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-ring-theory Ring theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants