You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.
I am really interested about dependent types. However most of this still goes over my head.
Mixing up terms and types would need some sort of an explanation.
A good example is the space of parameters for the type of (ordinary, geometric) shapes.
For c=Circle: Shape
, we might have , corresponding to center and radius, while for another element s=Square: Shape
it could be for center, side length & orientation.
With dependent types, we can talk about a (type-safe) function that turns parameterized shapes into, e.g., svg code
Then we could write a function that takes a list of shapes and a default assignment of parameters for each shape, and use this to construct a larger SVG
I mean that the theory goes over my head. I can use dependent types and understand your example very well. The problems come when it comes to theory.
For instance. How do fibrations exactly model the dependent types? Or if we take presheaves how do those work?
the "basic" theory of dependent types isn't in any way linked to category theory, at least in the way it's usually presented. It's basically a multi-sorted algebraic theory! You can use some very categorical formulations of what those theories look like, through categories with families or even Awodey's natural models (the most concise formulation yet imho). The concept of fibrations is disjoint from the general theory of dependent types, but they provide a very important class of examples of such theories. The natural models paper is structured that way: first define what a dependent type theory is, then show that fibrations (or display maps) provide such a class of examples with such and such properties.
I personally look at it the other way around: dependent type theory is a language that you can use to reason about a bunch of different things, and fibrations are one of them! So if you are interested in fibrations, DTT lets you work with them syntactically.
Or, turning it around, anything that models dependent types behaves like a notion of "fibration"!
Part of why I'm attracted to trying to understand some model for dependent types comes from universal constructions such as products and exponentials. How the reduction rules simply fall out from the definitions there.
I agree I probably won't need one if I just started using dependent types. I had not seen Awodey's natural models yet though.
What kind of background are you coming from?
Hobbyist programmer for 25 years. I've used tons of different programming languages.
Do you understand categorical semantics of simple type theory?
Unless I miss something, I do think so.
Good. I generally think it's best to start out thinking of dependent types as arbitrary maps, and then later observe that in the presence of higher identity types one wants them to be fibrations. We think of a dependent type as a family of objects , and represent it by the coproduct with its projection down to . Conversely, any map can be thought of as representing the family of all its fibers , since .
I wrote a bit of an introduction to categorical semantics of dependent type theory in section 2 of the logic of space.
regarding what I was saying above, I think it's better to only talk only about display maps first: they single out in the categorical model what arrows should model a proper type-on-type dependency through their fibers. In the case of a basic set model of let's say MLTT, seeing all arrows as defining dependent types works well enough, so you don't need to single out such a class. But if your intended semantics are groupoids, or spaces, etc., then you cannot just take all arrows: take , . There is an inclusion map , but you can see that the fiber-wise dependency on is not well-behaved when considering identity types: you cannot continuously transport elements over to elements over ! This means that you need a specific class of display maps, and here they would be Kan fibrations.
While trying to answer some tricky questions like this recently, I realised I don't know how to motivate Grothendieck fibrations specifically to someone coming from dependent type theory. It makes sense to me that dependent types behave like fibrations of spaces or groupoids or whatever undirected thing. Is there a neat way to motivate Grothendieck fibrations this way, or is that where the analogy stops?
There are directed type theories, with hom types (directed-path types), where dependent types behave like fibrations of (infinity-)categories. As I understand, these were specifically designed to be a language for such things, so the motivation usually goes the other way round. But given some motivation for generalising identity types to hom types (which I'm sure one could find), this could motivate the generalisation of fibrations of groupoids to fibrations of categories.
Maybe if I take a simple example, I may finally understand it: If I take a type (2 -> set), I could treat it as a type (A+B) with a fiber (A+B -> 2), with a limitation that I cannot directly access either A or B.
Now I could only pullback with either Inl or Inr. Consider pullback with Inl. It would 'select' A and bring the fiber (A -> 1), giving the access to A.
Ok, now I read the dao of FP again and see if I get further with it.
Another way I can start to unravel this is to consider (a : set) -> a as a fibration.
I think I'm on the edge of understanding this. I need to understand base change functor, a bit about slice categories and pullbacks.
The a:set - case brings up an universe level, so it's probably not a good starting point. But the simple a+b case seem to work.
Henri Tuhola said:
Another way I can start to unravel this is to consider (a : set) -> a as a fibration.
Yes, this is the universal fibration. If you want to see the semantics a bit more clearly, you need to use Tarski-style universes, so the function type is actually (a : Set) → El a, which is given by a universe in the semantics . -small types are exactly those whose name come from , ie. pullbacks of the universe fibration. The example is not great imo, as is not directly a dependent type, just a sum of two closed types. Maybe you would want to consider as a simple example instead, or to make a definition of your example more explicit you could define by and , and then you do have the dependent type you're looking for
16731929930417209198029531058890.jpg
It almost makes sense. There are things that confuse me though.
I tried to draw the adjunctions for dependent product and sum. I should get Unit and counit right? I am confused what the signature of counit turns out to be in product.
I would draw that diagram as this:
The details of the conventions that I use are here:
http://angg.twu.net/math-b.html#2022-md
Take a look at its section 8.12! =)
28 messages were moved here from #general > learning CT by Matteo Capucci (he/him).
In pullback/base change, is 'f' in itself a fiber/bundle? If so then that'd make a lots of sense.
It can be, but not necessarily. It's better to think of f
as a term that is being substituted into the definition of the dependent type.
But why it ends up being defined before there is anything to substitute? In the introduction of the dependent function?
I'm reading through "Topoi, the Categorial Analysis of Logic." it has helped me to understand these concepts.
But had to take a break. Maybe I'll just be silent until I've read through.
This is the picture that helped me
PXL_20230110_131528353~2.jpg
But the picture on the right is just an elaborate way to construct a commutative triangle
PXL_20230110_131918726~2.jpg
Spencer Breiner said:
This is the picture that helped me
PXL_20230110_131528353~2.jpg
what do those things correspond to? is this a construction, if so, of what starting from what?
On the left we have three declarations, and on the right the associated categorical structure. In particular, the pullback is used to interpret the substitution of f
into A
, which is needed to give the type of a
.
From the diagrammatic perspective it's a bit roundabout because it's not easy to talk about a term that depends on one context in a type that depends on another. For me, it's easier to think about the partial section directly, and the (total) section of the pullback is just a device to fit it into type theory.
Obviously a very important device...
I finished with reading the book but didn't gain more insight into base change functor & it's adjoints. I guess I'm stuck with partial understanding. I've moved on... For now.