Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(CategoryTheory/Monoidal): make ofTensorHom the default constructor #7277

Closed
wants to merge 3 commits into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Sep 20, 2023

It seems all the downstream call sites wish they had this constructor anyway, so lets just make it the default.

This partially reverts #6420 (Zulip discussion); the new data fields are good, but the defaults were backwards based on how the constructor is used.


Open in Gitpod

…structor

It seems all the users wish they had this constructor anyway, so lets just make it the default.
@@ -41,6 +41,7 @@ instance (X : C) : MonoidalCategory (EndMonoidal X) where
tensorObj f g := f ≫ g
whiskerLeft {f g h} η := f ◁ η
whiskerRight {f g} η h := η ▷ h
tensorHom {X₁ Y₁ X₂ Y₂} f g := (f ▷ X₂) ≫ (Y₁ ◁ g)
Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is the only place that actually benefitted from the old constructor, and obvious the benefit was pretty marginal!

Copy link
Collaborator

Choose a reason for hiding this comment

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

With the previous API, there was not even a chance to use the old constructor! I would suggest not merging this PR, as it goes in the other direction as @yuma-mizuno's planned refactor.

Copy link
Member Author

@eric-wieser eric-wieser Oct 6, 2023

Choose a reason for hiding this comment

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

I'm in no rush to get this in, so am happy for it to sit around until @yuma-mizuno gets back to their refactor. My impression though is that tensorHom is the operation we actually have available in (almost) all the concrete cases, and is therefore the more convenient constructor; and was that @yuma-mizuno's refactor is motivated by tensorHom being a bad simp-normal form, which is possibly orthogonal to whether it should be a constructor argument.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-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 Oct 9, 2023
@eric-wieser
Copy link
Member Author

Closing, this has grown too many conflicts, and I no longer need it anyway. Hopefully at some point #6307 is revived and this becomes even more moot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-category-theory Category theory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants