Skip to content

feat(CategoryTheory/Monoidal): added CocartesianMonoidalCategory - #30260

Open
imbrem wants to merge 14 commits into
leanprover-community:masterfrom
imbrem:cocartesian-add-monoidal
Open

imbrem wants to merge 14 commits into
leanprover-community:masterfrom
imbrem:cocartesian-add-monoidal

Conversation

@imbrem

@imbrem imbrem commented Oct 6, 2025

Copy link
Copy Markdown
Contributor

As discussed in #21603 and #28718; this implements chosen finite coproducts on top of AddMonoidalCategory as defined in #30150

@github-actions github-actions Bot added new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! large-import Automatically added label for PRs with a significant increase in transitive imports labels Oct 6, 2025
@github-actions

github-actions Bot commented Oct 6, 2025

Copy link
Copy Markdown

PR summary 010a30cd89

Import changes exceeding 2%

% File
+3.22% Mathlib.CategoryTheory.Monoidal.Category

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.CategoryTheory.Monoidal.Category 342 353 +11 (+3.22%)
Import changes for all files
Files Import difference
11 files Mathlib.CategoryTheory.Bicategory.End Mathlib.CategoryTheory.Monoidal.Action.Basic Mathlib.CategoryTheory.Monoidal.Action.LinearFunctor Mathlib.CategoryTheory.Monoidal.Category Mathlib.CategoryTheory.Monoidal.CoherenceLemmas Mathlib.Tactic.CategoryTheory.Monoidal.Basic Mathlib.Tactic.CategoryTheory.Monoidal.Datatypes Mathlib.Tactic.CategoryTheory.Monoidal.Normalize Mathlib.Tactic.CategoryTheory.Monoidal.PureCoherence Mathlib.Tactic.CategoryTheory.MonoidalComp Mathlib.Tactic.Widget.StringDiagram
11
Mathlib.CategoryTheory.Monoidal.Cocartesian.Basic (new file) 651

Declarations diff

+ AddMonoidalCategory
+ AddMonoidalCategoryStruct
+ CocartesianMonoidalCategory
+ Discrete.addMonoidal
+ Discrete.addMonoidalFunctor
+ Discrete.addMonoidalFunctorComp
+ Discrete.addMonoidalFunctorComp_isMonoidal
+ Discrete.addMonoidalFunctorMonoidal
+ Discrete.addMonoidalFunctor_obj
+ Discrete.addMonoidalFunctor_δ
+ Discrete.addMonoidalFunctor_ε
+ Discrete.addMonoidalFunctor_η
+ Discrete.addMonoidalFunctor_μ
+ Discrete.addMonoidal_tensorUnit_as
+ addHom
+ addHom_comp_addHom
+ addLeftUnitor_inv
+ addObj
+ addRightUnitor_inv
+ comp_lift
+ default_eq_fromUnit
+ desc
+ desc_comp_inl_comp_inr
+ desc_inl_inr
+ desc_inl_inr_comp
+ epi_desc_of_epi_left
+ epi_desc_of_epi_right
+ fromUnit
+ fromUnit_comp
+ fromUnit_unique
+ fromUnit_unit
+ fullSubcategory
+ homEquivToProd
+ hom_ext
+ id_addHom_id
+ inl_addHom
+ inl_addWhiskerLeft
+ inl_addWhiskerRight
+ inl_desc
+ inl_leftUnitor_hom
+ inl_rightUnitor_hom
+ inr_addHom
+ inr_addWhiskerLeft
+ inr_desc
+ inr_leftUnitor_hom
+ inr_rightUnitor_hom
+ inr_whiskerRight
+ instance (X : C) : Unique (𝟘_ C ⟶ X) := isInitialEquivUnique _ _ isInitialAddUnit _
+ instance (priority := 100) : Limits.HasFiniteCoproducts C
+ map_desc
+ whiskerRight_desc

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

@imbrem

imbrem commented Oct 6, 2025 •

Copy link
Copy Markdown
Contributor Author

I've commented out a few lemmas about whiskering and associators I haven't translated from the corresponding product version yet; I'll go do those soon, but they're just the obvious things, and I wanted to get this out there.

Also, is there a way to get this to show only the changes over #30150?

@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 Oct 6, 2025
@mathlib4-dependent-issues-bot

Copy link
Copy Markdown

This PR/issue depends on:

@mathlib4-merge-conflict-bot mathlib4-merge-conflict-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 Nov 13, 2025
@mathlib4-merge-conflict-bot

Copy link
Copy Markdown

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

@joneugster joneugster added the t-category-theory Category theory label Feb 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) large-import Automatically added label for PRs with a significant increase in transitive imports merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-category-theory Category theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants