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

feat(FiberedCategory/HasFibers): define HasFibers class #13611

Open
wants to merge 238 commits into
base: master
Choose a base branch
from

Conversation

callesonne
Copy link
Collaborator

@callesonne callesonne commented Jun 7, 2024

We define a class HasFibers p for a given functor p : 𝒳 ⥤ 𝒮. The point of this is to give the user the option to supply their own fiber categories, as often the standard fibers will not be definitionally the same as the (equivalent) categories one is interested in.

Co-authored-by: Paul Lezeau [email protected]


This is the final PR in a sequence of PRs developing the theory of fibered categories that I will make for now. I will wait for the reviewing to catch up before I start working on more of these again, so as to not create too big of a backlog.

Open in Gitpod

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 3, 2024
@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 30, 2024
@joelriou
Copy link
Collaborator

joelriou commented Oct 8, 2024

The HasFibers class looks good to me. However, for the future API, it would be nice to introduce also a typeclass HasPullbacks which would be the data of pullback functors (when be category is prefibered) between the categories given by the HasFibers class, along with the universal property each of these functors should satisfy. HasPullbacks may extend HasFibers.
Then, under HasPullbacks, one may define the composition morphisms (for the pullback by a composition of maps in the base), which are isomorphisms in case of fibered categories.
(The idea is that if we have a pseudofunctor, there will be an obvious HasFibers instance attached to the associated fibered category functor, and also an obvious HasPullbacks instance, with very good definitional properties. Then, there may not be good definitional properties for the composition (iso)morphisms, but still they shall be equal to those that are part of the structure of a pseudofunctor.)
(I hope this makes sense. I am not sure we discussed these details already.)

@joelriou joelriou added the awaiting-author A reviewer has asked the author a question or requested changes label Oct 8, 2024
@callesonne
Copy link
Collaborator Author

The HasFibers class looks good to me. However, for the future API, it would be nice to introduce also a typeclass HasPullbacks which would be the data of pullback functors (when be category is prefibered) between the categories given by the HasFibers class, along with the universal property each of these functors should satisfy. HasPullbacks may extend HasFibers. Then, under HasPullbacks, one may define the composition morphisms (for the pullback by a composition of maps in the base), which are isomorphisms in case of fibered categories. (The idea is that if we have a pseudofunctor, there will be an obvious HasFibers instance attached to the associated fibered category functor, and also an obvious HasPullbacks instance, with very good definitional properties. Then, there may not be good definitional properties for the composition (iso)morphisms, but still they shall be equal to those that are part of the structure of a pseudofunctor.) (I hope this makes sense. I am not sure we discussed these details already.)

This is what a clivage is right? If so I think we have discussed it. I think the name HasPullbacks is better than HasClivage so maybe we can go for that one. I think that @Paul-Lez has started writing some stuff related to this, and we definitely want to PR this in the future!

@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) label Oct 19, 2024
@leanprover-community-bot-assistant leanprover-community-bot-assistant removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 20, 2024
@callesonne callesonne removed the awaiting-author A reviewer has asked the author a question or requested changes label Oct 27, 2024
@callesonne
Copy link
Collaborator Author

I've removed awaiting-author for now, or do you mean that I should add HasPullbacks already to this PR? @joelriou

Comment on lines 79 to 80
@[default_instance]
instance canonical (p : 𝒳 ⥤ 𝒮) : HasFibers p where
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this should not be an instance, only a def.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Then will it still work as a "default instance"?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure exactly what default_instance do. I think we should remove it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

My opinion is that I would not like to have default instances flying around... If we need a HasFibers instance in order to prove a statement (which does not already involve a HasFibers), then we may invoke this canonical in order to make the argument work. Otherwise, [HasFibers p] should be a variable.

@joelriou
Copy link
Collaborator

I've removed awaiting-author for now, or do you mean that I should add HasPullbacks already to this PR? @joelriou

This PR is already long enough :-)

@joelriou joelriou added the awaiting-author A reviewer has asked the author a question or requested changes label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-author A reviewer has asked the author a question or requested changes t-category-theory Category theory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants