Skip to content

[Merged by Bors] - chore(Algebra/Category/Grp): don't import AddCircle in Injective.lean - #29811

Closed
Vierkantor wants to merge 1 commit into
leanprover-community:masterfrom
Vierkantor:unimport-AddCircle-in-Grp.Injective
Closed

Vierkantor wants to merge 1 commit into
leanprover-community:masterfrom
Vierkantor:unimport-AddCircle-in-Grp.Injective

Conversation

@Vierkantor

@Vierkantor Vierkantor commented Sep 19, 2025 •

Copy link
Copy Markdown
Contributor

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.


Open in Gitpod

@Vierkantor Vierkantor added the t-algebra Algebra (groups, rings, fields, etc) label Sep 19, 2025
@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.Algebra.Category.Grp.Injective 1573 1286 -287 (-18.25%)
Import changes for all files
Files Import difference
Mathlib.Algebra.Category.Grp.Injective -287

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).

@grunweg grunweg 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.

Thanks!
maintainer delegate

Given an abelian group `A`, then `i : A ⟶ ∏_{A⋆} ℚ ⧸ ℤ` defined by `i : a ↦ c ↦ c a` is an
injective presentation for `A`, hence category of abelian groups has enough injectives.

## Main results

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.

For other reviewers: these results were already there; this corrects a pre-existing issue by moving the relevant documentation to its proper place.

@github-actions

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by grunweg.

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

Copy link
Copy Markdown
Member

Thanks!

bors d+

@mathlib-bors

mathlib-bors Bot commented Sep 20, 2025

Copy link
Copy Markdown
Contributor

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

@ghost ghost added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Sep 20, 2025
@Vierkantor

Copy link
Copy Markdown
Contributor Author

bors r+

@ghost ghost added the ready-to-merge This PR has been sent to bors. 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]>
@mathlib-bors

mathlib-bors Bot commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

Build failed:

  • CI Success

…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.
@Vierkantor
Vierkantor force-pushed the unimport-AddCircle-in-Grp.Injective branch from 31bf8aa to 7080338 Compare September 22, 2025 08:19
@Vierkantor

Copy link
Copy Markdown
Contributor Author

Bors seems to be borsing again so:

bors r+

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]>
@mathlib-bors

mathlib-bors Bot commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title chore(Algebra/Category/Grp): don't import AddCircle in Injective.lean [Merged by Bors] - chore(Algebra/Category/Grp): don't import AddCircle in Injective.lean Sep 22, 2025
@mathlib-bors mathlib-bors Bot closed this Sep 22, 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]>
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). 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.

3 participants