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(CategoryTheory/Limits): Sifted categories #17554

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

Conversation

robin-carlier
Copy link
Collaborator

Introduce the class of sifted categories. A category IsSifted if it is nonempty and the diagonal functor is a final functor.

  • Show that sifted categories are stable under equivalences of categories.
  • Characterize sifted categories as those for which the Type-valued colimit functor preserves finite products.
  • Show that filtered categories are sifted.
  • Show that categories admitting a final functor from sifted categories are also sifted.

The proof of the main part (showing the characterization in term of the colimit functor) relies on a computation that rewrites the colimit-to-limit comparison for the product as a composite of "Fubini"-type isomorphisms and of colimit.pre for the diagonal functor. I marked the definition and lemmas for this computation as private, because I don’t think they would be useful as standalone lemmas.

I also went with the "Monoidal" notations coming from ChosenFiniteProduct instances for the computation, because it seemed to work better for the back-and-forth between presheaves and types, but this require introducing an isomorphism that compares it to the usual product, that I also marked as private since it is auxiliary to the computation here.

Sadly, I had to prove by hand that tensoring on the left/right preserves colimits (also marked private). This should normally come from the fact that the monoidal structure on types is cartesian closed, but the CartesianClosed instance defined in CategoryTheory/Closed/Types is actually about a different monoidal structure than the one defined in CategoryTheory/Monoidal/Types/Basic (the former is the one coming from monoidalOfHasFiniteProducts, while the latter is the one from monoidalOChosenFiniteProducts). If this gets changed then this should trim a bit of noise from the proof.

Open in Gitpod

@github-actions github-actions bot added the new-contributor This PR was made by a contributor with fewer than 5 merged PRs. Welcome to the community! label Oct 8, 2024
Copy link

github-actions bot commented Oct 8, 2024

PR summary 5f9bb4611b

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.CategoryTheory.Limits.Sifted 616

Declarations diff

+ IsSifted
+ IsSifted.IsSiftedOfFinalFunctorFromSifted
+ IsSiftedOfColimitPreservesFiniteProducts
+ IsSiftedOfEquiv
+ IsSiftedOfFinalFunctorFromSifted'
+ IsSiftedOfHasBinaryCoproductsAndNonempty
+ IsSiftedOfIsFiltered
+ IsSiftedOrEmpty
+ IsSiftedOrEmptyOfColimitPreservesBinaryProducts
+ IsSiftedOrEmptyOfColimitPreservesFiniteProducts
+ IsSifted_iff_asSmallIsSifted
+ NonemptyOfColimitPreservesLimitsOfShapeFinZero
+ colimPreservesBinaryProductsOfIsSifted
+ colimPreservesFiniteProductsOfIsSifted
+ colimPreservesLimitsOfPairsOfIsSifted
+ colimPreservesLimitsOfShapePEmtyOfIsSifted
+ colimPreservesTerminalObjectOfIsSifted
+ instance : IsIso (prodComparison colim X Y) := by
+ instance [HasBinaryCoproducts C] : IsSiftedOrEmpty C := by
+ instance [IsSifted C]: IsConnected C

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 8, 2024
@robin-carlier robin-carlier added the RFC Request for comment label Oct 8, 2024
@robin-carlier robin-carlier marked this pull request as draft October 8, 2024 21:30
@robin-carlier robin-carlier marked this pull request as ready for review October 8, 2024 21:46
@joelriou
Copy link
Collaborator

joelriou commented Oct 9, 2024

Could you add a ## References section to the docstring of the file?

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

Could you add a ## References section to the docstring of the file?

I added the n-lab as well as Adámek-Rosický-Vitale’s Algebraic theories. Note that both references take preservations of finite products for the colimit functor as the definition.

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 new-contributor This PR was made by a contributor with fewer than 5 merged PRs. Welcome to the community! RFC Request for comment t-category-theory Category theory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants