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

[Merged by Bors] - feat(category_theory/enriched): abstract enriched categories #7175

Closed
wants to merge 37 commits into from

Conversation

semorrison
Copy link
Collaborator

@semorrison semorrison commented Apr 13, 2021

Enriched categories

We set up the basic theory of V-enriched categories,
for V an arbitrary monoidal category.

We do not assume here that V is a concrete category,
so there does not need to be a "honest" underlying category!

Use X ⟶[V] Y to obtain the V object of morphisms from X to Y.

This file contains the definitions of V-enriched categories and
V-functors.

We don't yet define the V-object of natural transformations
between a pair of V-functors (this requires limits in V),
but we do provide a presheaf isomorphic to the Yoneda embedding of this object.

We verify that when V = Type v, all these notion reduce to the usual ones.


Note that this is not an attempt to make enriched categories that "stack" with existing categories, and interact well with existing algebraic structures, etc. It's just the abstract theory. Hopefully we'll be able to work out a different enriched_over typeclass that is a mixin for category, and from which an "abstract" enriched category can be extracted.

Open in Gitpod

@semorrison semorrison requested a review from b-mehta April 13, 2021 10:18
@semorrison semorrison added the awaiting-review The author would like community review of the PR label Apr 13, 2021
@b-mehta
Copy link
Collaborator

b-mehta commented Apr 13, 2021

I'm a little confused about why we can't do enriched natural transformations: It seems to me that the definition here works in Lean...

structure enriched_nat_trans (F G : enriched_functor V C D) :=
(app : Π (X : C), 𝟙_ V ⟶ (F.obj X ⟶[V] G.obj X))
(naturality' : ∀ (X Y : C), (λ_ _).inv ≫ (app _ ⊗ G.map X Y) ≫ e_comp V _ _ _ = (ρ_ _).inv ≫ (F.map X Y ⊗ app _) ≫ e_comp V _ _ _)

@b-mehta
Copy link
Collaborator

b-mehta commented Apr 13, 2021

Ah, unless you're saying that we can't make the morphisms in the V-enriched functor category without ends

@semorrison
Copy link
Collaborator Author

Yes, the definition on ncatlab is what I've called a graded_nat_trans (𝟙_ V). I guess I was distracted by the fact that in places IRL I've used enriched categories, I needed to either care about other gradings, or the V-object of natural transformations.

The (𝟙_ V) graded natural transformations probably deserve their own definition -- this can be done without assuming a grading, but then it can't be done as a specialisation of the general case. Not sure what to do there. I guess the general case could be done for any A : V with a lift to the center...

@b-mehta
Copy link
Collaborator

b-mehta commented Apr 13, 2021

Yes, the definition on ncatlab is what I've called a graded_nat_trans (𝟙_ V). I guess I was distracted by the fact that in places IRL I've used enriched categories, I needed to either care about other gradings, or the V-object of natural transformations.

The (𝟙_ V) graded natural transformations probably deserve their own definition -- this can be done without assuming a grading, but then it can't be done as a specialisation of the general case. Not sure what to do there. I guess the general case could be done for any A : V with a lift to the center...

From my understanding what you called the "graded_nat_trans" is referred to as the enriched natural transformations - which may not be the most helpful in general but still allows us to form the non-enriched category of enriched functors. And as you say the V-object is usually more helpful but we can't do it yet - does there need to be an explicit specialisation?

@semorrison
Copy link
Collaborator Author

I think the discrepancy is that my graded_nat_trans is slightly more general than "enriched natural transformation" on n-lab. graded_nat_trans is parametrised by an object A, and an "enriched natural transformation" is the case A := 𝟙_ V.

Unfortunately the general case away from 𝟙_ V can't be stated without the category being braided (or A lifting to the center), and this where I was sad about not being able to easily say the specialisation.

@semorrison semorrison added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Apr 16, 2021
@semorrison semorrison added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Apr 17, 2021
@github-actions github-actions bot added merge-conflict Please `git merge origin/master` then a bot will remove this label. and removed blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. labels Apr 21, 2021
@github-actions
Copy link

🎉 Great news! Looks like all the dependencies have been resolved:

💡 To add or remove a dependency please update this issue/PR description.

Brought to you by Dependent Issues (:robot: ). Happy coding!

@github-actions github-actions bot removed the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Apr 21, 2021
Copy link
Collaborator

@adamtopaz adamtopaz left a comment

Choose a reason for hiding this comment

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

A couple of minor comments/questions, but otherwise LGTM!

src/category_theory/enriched/basic.lean Show resolved Hide resolved
src/category_theory/enriched/basic.lean Show resolved Hide resolved
@b-mehta
Copy link
Collaborator

b-mehta commented Apr 30, 2021

Thanks!

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Apr 30, 2021
bors bot pushed a commit that referenced this pull request Apr 30, 2021
# Enriched categories

We set up the basic theory of `V`-enriched categories,
for `V` an arbitrary monoidal category.

We do not assume here that `V` is a concrete category,
so there does not need to be a "honest" underlying category!

Use `X ⟶[V] Y` to obtain the `V` object of morphisms from `X` to `Y`.

This file contains the definitions of `V`-enriched categories and
`V`-functors.

We don't yet define the `V`-object of natural transformations
between a pair of `V`-functors (this requires limits in `V`),
but we do provide a presheaf isomorphic to the Yoneda embedding of this object.

We verify that when `V = Type v`, all these notion reduce to the usual ones.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@bors
Copy link

bors bot commented Apr 30, 2021

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request May 1, 2021
# Enriched categories

We set up the basic theory of `V`-enriched categories,
for `V` an arbitrary monoidal category.

We do not assume here that `V` is a concrete category,
so there does not need to be a "honest" underlying category!

Use `X ⟶[V] Y` to obtain the `V` object of morphisms from `X` to `Y`.

This file contains the definitions of `V`-enriched categories and
`V`-functors.

We don't yet define the `V`-object of natural transformations
between a pair of `V`-functors (this requires limits in `V`),
but we do provide a presheaf isomorphic to the Yoneda embedding of this object.

We verify that when `V = Type v`, all these notion reduce to the usual ones.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@bors
Copy link

bors bot commented May 1, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(category_theory/enriched): abstract enriched categories [Merged by Bors] - feat(category_theory/enriched): abstract enriched categories May 1, 2021
@bors bors bot closed this May 1, 2021
@bors bors bot deleted the abstract_enriched branch May 1, 2021 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants