-
Notifications
You must be signed in to change notification settings - Fork 172
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
Basic definitions and constructions for enriched category theory #1453
Basic definitions and constructions for enriched category theory #1453
Conversation
change-of-base construction, and opposite construction
I have converted this PR from "draft" to "ready for review", so that I and others are able to comment. |
use make_enriched_precat. | ||
- use make_enriched_precat_data. | ||
+ exact A. | ||
+ intros x y. | ||
exact (F (enriched_cat_mor x y)). | ||
+ intro x. | ||
exact (lax_monoidal_functor_ϵ F · #F (enriched_cat_id _)). | ||
+ intros x y z. | ||
exact (lax_monoidal_functor_μ F (_, _) · #F (enriched_cat_comp _ y _)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part of the construction should be split out into a separate definition. The proof of the axioms can then be made opaque using Qed.
instead of Defined.
.
- use make_enriched_functor_data. | ||
+ exact G. | ||
+ intros x y. | ||
exact (#F (enriched_functor_on_morphisms G _ _)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part of the construction should be split out into a separate definition. The proof of the axioms can then be made opaque using Qed.
instead of Defined.
.
- intros x y. | ||
cbn. | ||
rewrite <- lax_monoidal_functor_on_postcompose_underlying_morphism. | ||
rewrite <- lax_monoidal_functor_on_precompose_underlying_morphism. | ||
rewrite <- !(functor_comp F). | ||
apply maponpaths. | ||
apply enriched_nat_trans_ax. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proof of naturality should probably be made opaque, using abstract(...)
.
- intros x y. | ||
rewrite postcompose_underlying_morphism_composite. | ||
rewrite assoc. | ||
rewrite enriched_nat_trans_ax. | ||
rewrite assoc'. | ||
rewrite pre_post_compose_commute. | ||
rewrite assoc. | ||
rewrite enriched_nat_trans_ax. | ||
rewrite precompose_underlying_morphism_composite. | ||
apply assoc'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be useful to make this part of the construction opaque.
A suggestion (relating to Benedikt's comments): to make these changes easier, the definition |
apply assoc. | ||
Defined. | ||
|
||
Definition enriched_functor_category (A B : enriched_precat) : category. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be useful to make part of the construction opaque.
Let tensor : Mon_V ⊠ Mon_V ⟶ Mon_V := monoidal_cat_tensor Mon_V. | ||
Let α : associator tensor := monoidal_cat_associator Mon_V. | ||
Let l_unitor : left_unitor tensor I := monoidal_cat_left_unitor Mon_V. | ||
Let r_unitor : right_unitor tensor I := monoidal_cat_right_unitor Mon_V. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there should be a global discussion about the respective advantages of "Local Definition" and "Let". What is the reason for the change in this place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intended to use these names as aliases that are not visible outside the section at all. However, I found that the name of Local Definition tensor
is visible as MonoidalCategories.tensor
when we use a lemma like tensor_comp_left
. I think that there should not be names like MonoidalCategories.tensor
because these are just accessor functions applied to Mon_V
.
I have been asked by @benediktahrens to provide a review for this PR. My feeling is that this changes the status of the development of enriched category theory in UniMath (which I welcome in principle), which therefore also requires a more rigorous review of the already existing code. Anyway, The PR proposes more coercions and many more lines of verification, but still no validation w.r.t to the UniMath environment. I think that the problems at the base should be addressed at the same time and not later when there is much more code to "tame". |
Is our composition operator in categories backwards? If so, I forgot. By the way, the phrase "diagrammatic order" is ambiguous, because diagrams can also be drawn with leftward pointing arrows. |
I cite from By the way, it could be worth defining enrichment over bicategories instead of the special case of over monoidal categories. |
@rmatthes : Thanks a lot for forming and sharing thoughts about this PR and the state of enriched categories in UniMath.
@umedaikiti : in case you are interested in working on enriched categories in UniMath, and in case you are willing to spend a little bit of effort on getting the basic definitions into shape, I am very happy to help. I have already given feedback to your code - in case you have questions or comments, please let me know! |
Thanks for the reviews. Yes, I am happy to work on the improvement.
|
Defined -> Qed Co-authored-by: Benedikt Ahrens <benedikt.ahrens@gmail.com>
I only comment on the last point about the order of composition. I did not find it easy to read the UniMath library with the compositions turned around. I had to accept this decision by those who created the library. But the library does not deviate from standard mathematical notions. Even if left and right whiskering are rather called pre_whisker and post_whisker, respectively (which is even more suggestive as notation), they properly map to lwhisker and rwhisker in the notion of bicategories. Regardless of composition order or other notational/presentational devices, no one would exchange the notions of left and right adjoint either. In the development of monads, there is the file The grep output is not vast at all and also shows uses of □ for different purposes. So, it should at least be very easy to remove this identified (legacy) inconsistency in notation. And no new one should enter, and as I argued before, the "lonesome" file |
@umedaikiti : Thanks a lot for implementing the suggestions! For me, this PR represents a definite improvement, even though it does not yet fix all the problems identified by @rmatthes. Hence, I am very happy to merge this PR if @umedaikiti agrees - recall that this PR was marked as "draft" by @umedaikiti, and I only marked it as "ready for review" to be able to comment on it. |
I have no objection to merging this PR. I will probably prove the equivalence between ordinary and Set-enriched categories later, but this can be discussed as a separate issue or PR. |
Thanks a lot for your contribution to UniMath! |
…ry-theory Basic definitions and constructions for enriched category theory
…ry-theory Basic definitions and constructions for enriched category theory
I added the following.