Zulip Chat Archive

Stream: Is there code for X?

Topic: Category of Families Set^X


Max New (Jun 19 2025 at 02:19):

For any set XX there is a category SetX\textrm{Set}^X whose objects are families A:XSetA : X \to \textrm{Set} and morphisms from AA to BB are families of functions x.AxBx\forall x. A x \to B x . I haven't found this definition. Is this implemented somewhere in mathlib that I can't find?

Max New (Jun 19 2025 at 02:22):

It's equivalent to presheaves over the discrete category generated by X but that includes a lot of trivial data and some constructions have simpler definitions (like if X is a monoid that SetX\textrm{Set}^X is a monoidal category is much simpler than the Day convolution which involves coends)

Robert Maxton (Jun 19 2025 at 02:43):

There's a namespace FunctorToType, and there's a few things about presheaves, but to my knowledge that's about it.

Robin Carlier (Jun 19 2025 at 08:24):

Isn't this CategoryTheory.pi?

Robin Carlier (Jun 19 2025 at 08:24):

(deleted)

Max New (Jun 19 2025 at 09:05):

Thank you, yes this is an instance of pi. pi (fun _ => Type) That should save at least some work

Robin Carlier (Jun 19 2025 at 09:09):

Since pi is an instance I think the inferred category instance of X → Type u will be the one you want, as long as you have file#Mathlib.CategoryTheory.Pi.Basic in your import graph.


Last updated: Dec 20 2025 at 21:32 UTC