Skip to content

[Merged by Bors] - feat(CategoryTheory/Closed/Enrichment): a closed monoidal category is enriched in itself - #17326

Closed
daniel-carranza wants to merge 41 commits into
masterfrom
enriched_from_closed
Closed

daniel-carranza wants to merge 41 commits into
masterfrom
enriched_from_closed

Conversation

@daniel-carranza

Copy link
Copy Markdown
Collaborator

From a monoidal closed category V, construct an instance of EnrichedCategory V on V where the hom-objects are given by the internal homs of the closed structure.


First time contributor. I am still new to formalization, so I am open any and all suggestions! In particular, the proofs here are a bit long compared to most proofs I see in the library, and I'm not sure if it's couth to use the @[simp] attribute for some equalities here.

Remark: As I understand, the type of simplicial sets SSet.{v} also has an instance of EnrichedCategory SSet.{v} constructed in AlgebraicTopology/SimplicialCategory/SimplicialObject. This enrichment comes from viewing SSet.{v} as a category of simplicial objects, rather than as a closed monoidal category. I'm still a beginner, but could this cause any issues if a file imports both instances?

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 Oct 1, 2024
@github-actions

github-actions Bot commented Oct 1, 2024 •

Copy link
Copy Markdown

PR summary ee837dfade

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.CategoryTheory.Closed.Enrichment 574

Declarations diff

+ assoc
+ comp
+ compTranspose
+ compTranspose_eq
+ comp_eq
+ comp_id
+ id
+ id_comp
+ id_eq

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.

@github-actions github-actions Bot added the t-category-theory Category theory label Oct 1, 2024

@b-mehta b-mehta 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.

This is in pretty good shape already for a first contribution! I've left a couple of style comments.
Note that the title of your PR shouldn't be capitalised, see https://leanprover-community.github.io/contribute/commit.html

rw [uncurry_curry, uncurry_curry]; dsimp
rw [associator_inv_naturality_middle_assoc]
rw [← comp_whiskerRight_assoc]
rw [← uncurry_eq, uncurry_curry]

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.

Hmm, I notice you use this particular pair of rewrites pretty often, and I'm guessing it does something like

(A ◁ curry g) ≫ (ihom.ev A).app X = g

Is there a reason the left-hand-side of this is appearing so often? I somewhat expect there's a cleaner way of going about this proof, although I can't be sure

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Indeed, this pair of rewrites is exactly that equality. The current proof is the best I could come up with in terms of cleaning on my end, but my hope is also that there should be a cleaner proof!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I experimented (locally on my machine) with making this a separate lemma inside the CategoryTheory/Closed/Monoidal.lean file with the simp attribute. The proof now goes through using a single simp wherever these two rewrites originally occurred. Is this a good candidate simp lemma to be added to the CategoryTheory/Closed/Monoidal file? (Posted on Zulip as well)

@daniel-carranza daniel-carranza changed the title feat(CategoryTheory/Closed/Enrichment): A closed monoidal category is enriched in itself feat(CategoryTheory/Closed/Enrichment): a closed monoidal category is enriched in itself Oct 1, 2024

@emilyriehl emilyriehl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@b-mehta is a way more expert reviewer than me. I'm curious about the answer to the dual instance question you raised. Maybe ask it on the zulip of @mckoen who provided the other instance (iirc)?

@b-mehta

b-mehta commented Oct 1, 2024

Copy link
Copy Markdown
Contributor

I think the dual instance could cause issues, but I don't know enough about the context of this to know what the correct solution is. I'd guess we'd like to only have one of them actually active on SSet, prove that they're the same or make the constructions so they're definitionally the same. But I don't know the maths here well enough to be sure (are they even the same, informally?). Asking on the zulip is definitely the correct thing to do.

@joelriou

joelriou commented Oct 1, 2024

Copy link
Copy Markdown
Contributor

About the dual instance issue, I would suggest making the new instance in this PR a local or a scoped instance.

@daniel-carranza

daniel-carranza commented Oct 1, 2024 •

Copy link
Copy Markdown
Collaborator Author

I've implemented Joel's suggestion in the current version, but I created a Zulip chat to discuss this PR in the Infinity-Cosmos channel

@daniel-carranza

Copy link
Copy Markdown
Collaborator Author

@b-mehta @joelriou Sorry for the ping! I'm wondering if anyone could take another look at this PR for suggestions/how to move towards merging the changes - thank you in advance!

@b-mehta b-mehta 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.

Sorry for the delay on this. It's in very good shape overall, I made a few readability suggestions and optional alternate proofs.

@joelriou joelriou added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Oct 17, 2024
@joelriou

Copy link
Copy Markdown
Contributor

Most of the definitions and compatibilities in this PR could be phrased under the slightly weaker condition that only a few Closed X assumptions hold. Then, I believe that the definitions and lemmas should be moved to the file Closed.Monoidal along with the other compatibilities which were already obtained. Then, Closed.Enrichment should become a very short file which applies this API when MonoidalClosed holds.

@joelriou

joelriou commented Oct 24, 2024 •

Copy link
Copy Markdown
Contributor

After the kind of style suggestions are taken care of, I think this PR shall be ready.

@joelriou joelriou added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Oct 24, 2024
@daniel-carranza

Copy link
Copy Markdown
Collaborator Author

Thank you!

@daniel-carranza daniel-carranza removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Oct 24, 2024
@joelriou

Copy link
Copy Markdown
Contributor

Thanks!

bors merge

@github-actions github-actions Bot added the ready-to-merge This PR has been sent to bors. label Oct 24, 2024
mathlib-bors Bot pushed a commit that referenced this pull request Oct 24, 2024
… enriched in itself (#17326)

From a monoidal closed category V, construct an instance of `EnrichedCategory V` on V where the hom-objects are given by the internal homs of the closed structure.



Co-authored-by: Joël Riou <[email protected]>
Co-authored-by: daniel-carranza <[email protected]>
@mathlib-bors

mathlib-bors Bot commented Oct 24, 2024

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(CategoryTheory/Closed/Enrichment): a closed monoidal category is enriched in itself [Merged by Bors] - feat(CategoryTheory/Closed/Enrichment): a closed monoidal category is enriched in itself Oct 24, 2024
@mathlib-bors mathlib-bors Bot closed this Oct 24, 2024
@mathlib-bors
mathlib-bors Bot deleted the enriched_from_closed branch October 24, 2024 22:20
mathlib-bors Bot pushed a commit that referenced this pull request Nov 17, 2024
Let `C` be a category that is enriched over a monoidal category `V` in such a way that the category structure and the enriched category structure are compatible. Then, if `J` is a category and that `V` has certain limits, then the functor category `J ⥤ C` is also enriched over `V`.

(Plan: using #17326, we may use this for `C := C` closed monoidal in order to show that a category of functors `J ⥤ C` to a monoidal category is enriched over `C`, and, by applying this to all `Under X` categories for `X : C`, it should follow that `J ⥤ C` is also closed monoidal. This should give a more explicit approach as compared to  #16067.)



Co-authored-by: Joël Riou <[email protected]>
TobiasLeichtfried pushed a commit that referenced this pull request Nov 21, 2024
Let `C` be a category that is enriched over a monoidal category `V` in such a way that the category structure and the enriched category structure are compatible. Then, if `J` is a category and that `V` has certain limits, then the functor category `J ⥤ C` is also enriched over `V`.

(Plan: using #17326, we may use this for `C := C` closed monoidal in order to show that a category of functors `J ⥤ C` to a monoidal category is enriched over `C`, and, by applying this to all `Under X` categories for `X : C`, it should follow that `J ⥤ C` is also closed monoidal. This should give a more explicit approach as compared to  #16067.)



Co-authored-by: Joël Riou <[email protected]>
mathlib-bors Bot pushed a commit that referenced this pull request Feb 6, 2025
…hed category over itself (#21436)

Let `C` be a closed monoidal category. It was previously shown (#17326) that `C` is enriched over itself. In this PR, we show that the category structure on `C` is determined by this enriched category structure, i.e. `EnrichedOrdinaryCategory C C` holds.
pfaffelh pushed a commit that referenced this pull request Feb 7, 2025
…hed category over itself (#21436)

Let `C` be a closed monoidal category. It was previously shown (#17326) that `C` is enriched over itself. In this PR, we show that the category structure on `C` is determined by this enriched category structure, i.e. `EnrichedOrdinaryCategory C C` holds.
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! ready-to-merge This PR has been sent to bors. t-category-theory Category theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants