Skip to content

[Merged by Bors] - feat(Algebra/Category): symmetric monoidal structure on SemimoduleCat#30638

Closed
alreadydone wants to merge 4 commits intoleanprover-community:masterfrom
alreadydone:PicSemiring
Closed

[Merged by Bors] - feat(Algebra/Category): symmetric monoidal structure on SemimoduleCat#30638
alreadydone wants to merge 4 commits intoleanprover-community:masterfrom
alreadydone:PicSemiring

Conversation

@alreadydone
Copy link
Copy Markdown
Contributor

@alreadydone alreadydone commented Oct 17, 2025

  • Construct the symmetric monoidal structure on SemimoduleCat, and transport it to the same structure on ModuleCat (in a way preserving pre-existing defeqs) using the equivalence ModuleCat.equivalenceSemimoduleCat between the categories. Just a few proofs in the Representation library need to be fixed (in a straightforward way). Public API for ModuleCat is duplicated to SemimoduleCat.

Open in Gitpod

@alreadydone alreadydone requested a review from joelriou October 17, 2025 21:47
@alreadydone alreadydone added t-category-theory Category theory t-algebra Algebra (groups, rings, fields, etc) awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. labels Oct 17, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 17, 2025

PR summary eaf3ffb2d4

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic 1008 1010 +2 (+0.20%)
Mathlib.Algebra.Category.ModuleCat.Monoidal.Symmetric 1022 1023 +1 (+0.10%)
Import changes for all files
Files Import difference
21 files Mathlib.Algebra.Category.ModuleCat.Adjunctions Mathlib.Algebra.Category.ModuleCat.Monoidal.Closed Mathlib.Algebra.Category.ModuleCat.Monoidal.Symmetric Mathlib.Algebra.Category.ModuleCat.Presheaf.Free Mathlib.Algebra.Category.ModuleCat.Presheaf.Generator Mathlib.Algebra.Category.ModuleCat.Presheaf.Pullback Mathlib.Algebra.Category.ModuleCat.Sheaf.PullbackContinuous Mathlib.CategoryTheory.Monoidal.Internal.Module Mathlib.Condensed.AB Mathlib.Condensed.Discrete.Characterization Mathlib.Condensed.Discrete.Module Mathlib.Condensed.Epi Mathlib.Condensed.Explicit Mathlib.Condensed.Light.AB Mathlib.Condensed.Light.Epi Mathlib.Condensed.Light.Explicit Mathlib.Condensed.Light.Limits Mathlib.Condensed.Light.Module Mathlib.Condensed.Limits Mathlib.Condensed.Module Mathlib.Condensed.Solid
1
3 files Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic Mathlib.Algebra.Category.ModuleCat.Presheaf.Monoidal Mathlib.RingTheory.Flat.CategoryTheory
2

Declarations diff

+ MonoidalCategory.instMonoidalCategoryStruct
+ associator_hom_apply
+ associator_inv_apply
+ braiding_hom_apply
+ braiding_inv_apply
+ hom_hom_associator
+ hom_hom_leftUnitor
+ hom_hom_rightUnitor
+ hom_inv_associator
+ hom_inv_leftUnitor
+ hom_inv_rightUnitor
+ hom_tensorHom
+ hom_whiskerLeft
+ hom_whiskerRight
+ instance : BraidedCategory (ModuleCat.{u} R)
+ instance : CommSemiring ((𝟙_ (SemimoduleCat.{u} R) : SemimoduleCat.{u} R) : Type u)
+ instance : equivalenceSemimoduleCat (R := R).functor.Braided
+ leftUnitor_hom_apply
+ leftUnitor_inv_apply
+ rightUnitor_hom_apply
+ rightUnitor_inv_apply
+ tensorHom_tmul
+ tensorLift
+ tensorLift_tmul
+ tensor_ext
+ tensor_ext₃
+ tensor_ext₃'
+ tensorμ_apply
+ tensorμ_eq_tensorTensorTensorComm
+ whiskerLeft_apply
+ whiskerRight_apply
+-+ symmetricCategory
-++ monoidalCategory

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

@jcommelin
Copy link
Copy Markdown
Member

Have you considered generalizing ModuleCat to only require Semiring R in the definition? So that there is only one definition instead of two?

@jcommelin jcommelin added the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 28, 2025
@alreadydone
Copy link
Copy Markdown
Contributor Author

This approach was pursued in #30636 but defeq issues with the forgetful functor to AddCommGrp is hard to fix.

@alreadydone alreadydone removed the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 28, 2025
@jcommelin
Copy link
Copy Markdown
Member

Aha, that makes a lot of sense. Could you please mention that in the implementation notes?

Besides that, this PR is doing quite a lot. It adds a large new file. It adds new material in other files. And it generalizes existing material to the new setting.
I think it should be straightforward to decouple these into 3 PRs that are much more atomic. Could you do that?

@jcommelin jcommelin added the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 28, 2025
@alreadydone alreadydone changed the title feat(Algebra): SemimoduleCat, category of modules over semiring feat(Algebra/Category): symmetric monoidal structure on SemimoduleCat Oct 28, 2025
@alreadydone
Copy link
Copy Markdown
Contributor Author

Split off #31022 (not a dependency) and #31023

@alreadydone alreadydone added blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Oct 28, 2025
@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 Oct 28, 2025
@mathlib4-dependent-issues-bot
Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Oct 29, 2025
…t` (#30638)

+ Construct the symmetric monoidal structure on SemimoduleCat, and transport it to the same structure on ModuleCat (in a way preserving pre-existing defeqs) using the equivalence `ModuleCat.equivalenceSemimoduleCat` between the categories. Just a few proofs in the Representation library need to be fixed (in a straightforward way). Public API for ModuleCat is duplicated to SemimoduleCat.
@ghost ghost added the ready-to-merge This PR has been sent to bors. label Oct 29, 2025
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 29, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Algebra/Category): symmetric monoidal structure on SemimoduleCat [Merged by Bors] - feat(Algebra/Category): symmetric monoidal structure on SemimoduleCat Oct 29, 2025
@mathlib-bors mathlib-bors bot closed this Oct 29, 2025
@alreadydone alreadydone deleted the PicSemiring branch November 6, 2025 20:03
BeibeiX0 pushed a commit to BeibeiX0/mathlib4 that referenced this pull request Nov 7, 2025
…t` (leanprover-community#30638)

+ Construct the symmetric monoidal structure on SemimoduleCat, and transport it to the same structure on ModuleCat (in a way preserving pre-existing defeqs) using the equivalence `ModuleCat.equivalenceSemimoduleCat` between the categories. Just a few proofs in the Representation library need to be fixed (in a straightforward way). Public API for ModuleCat is duplicated to SemimoduleCat.
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) t-category-theory Category theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants