Zulip Chat Archive
Stream: maths
Topic: locally cartesian closed categories
Sina Hazratpour 𓃵 (Aug 03 2024 at 18:26):
The polynomial functor project includes a formalization of locally cartesian closed categories (lccc). In the next week, I am going to PR some code from the polynomial functors project to mathlib.
Where would be a good place in mathlib for lcccs? Closed.LocallyCartesian is one candidate. Another option would be to have a separate subdir LocallyCartesianClosed in CategoryTheory.
Mario Carneiro (Aug 03 2024 at 20:34):
BTW, can we agree that LCCC has 3 C's in it?
Adam Topaz (Aug 03 2024 at 23:32):
I think we should rather have a Cartesian subdirectory in CategoryTheory where stuff like this should go. But that would involve some reorganizing of existing files, so it’s probably worth adding LCCCs and only later doing the reorganization
Robin Carlier (Sep 08 2025 at 12:24):
@Sina Hazratpour Locally cartesian closed categories were mentioned in #28908, where @Joël Riou essentially proves that Type _ is locally cartesian closed.
Do you still plan to upstream this work?
Sina Hazratpour (Sep 08 2025 at 13:05):
yes, i plan to. They are currently in the mathlib PR queue, and there is a merge conflict that needs to be resolved. But I can do it this week.
Sina Hazratpour (Sep 08 2025 at 13:06):
I also have proved the locally cartesian closedness of Type in the Poly repo mentioned above. The strategy is as follows: I showed that in the category of types the slices are the same as functor categories which is shown to be cartesian closed in mathlib
Sina Hazratpour (Sep 08 2025 at 13:08):
We then obtain the explicit right adjoints to the pullback functor from the definition of locally cartesian closed.
Robin Carlier (Sep 08 2025 at 13:09):
#21525 for reference.
Do you also plan on upstreaming cartesian closedness of Type? I believe @Joël Riou is a bit in a hurry to have that the base change functors preserve colimits for his applications.
Sina Hazratpour (Sep 08 2025 at 13:09):
i feel this proof is better than constructing the right adjoints explicitly, since it uses the bundle classifier pointed Types to Types and this kind of proofs scale better
Sina Hazratpour (Sep 08 2025 at 13:10):
i will upstream both lccc and the cartesian closedness of Type. I also have the preservation of colimits.
Sina Hazratpour (Sep 08 2025 at 13:11):
ok, let me see if i can finish this tonight.
Joël Riou (Sep 08 2025 at 13:11):
No, no, I am not at all in a hurry. This will be used in some of the last steps on the construction of the Quillen model category structure on simplicial sets, which shall need 35k extra lines of code.
Robin Carlier (Sep 08 2025 at 13:12):
Oh, then we have time! Then no hurry @Sina Hazratpour
Robin Carlier (Sep 08 2025 at 13:13):
(sorry to have assumed the hurry!)
Sina Hazratpour (Sep 08 2025 at 13:13):
no problem, i think i will do it tonight anyway, it's a good excuse to get this past the PR queue.
Robin Carlier (Sep 08 2025 at 13:14):
Feel free to assign it (and related PRs) on GitHub when they're ready!
Sina Hazratpour (Oct 09 2025 at 21:04):
@Robin Carlier @Joël Riou
Coming back to this, I have started to push LCCC work to mathlib. Since the write-access thing on mathlib has changed, and one needs to PR from a fork of mathlib, I am opening new PRs from my fork of mathlib than using the ones with merge conflict from back in February. It seems cleaner this way. I have so far pushed lccc-prelim (#30366), lccc-section (#30373) and lccc-basic (#30375), each depending on the previous one. lccc-basic defines locally cartesian closed categories. Then there will be lccc-types, lccc-presheaf, lccc-beck-chevalley. I will however only open PRs for the last three ones once the first three PRs get merged (though all six of them are on my fork of mathlib), since otherwise i would create a lot more extra work with merge, rebase, etc during the review process. Does this sound good to you? Let me know if you have suggestions.
Last updated: Dec 20 2025 at 21:32 UTC