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.
Hey @Mike Shulman i just realized you're here & i wanted to ask you about some of the 2-topos stuff on your sub-nlab, if you'd be willing to answer my questions? I've been periodically coming back around lately to thinking about what a dependent type theory for interpretation in PreOrd—i.e., (0, 1)-Cat—would look like, and while I've only nibbled around the edges of the 2-topos stuff, the little I've managed to understand has definitely been a big help in figuring out which direction is probably the right way to go (say, the fact that I probably want to use fibrational slices rather than full slices). (I guess if (0, 0)-Cat is a 1-topos and (1, 1)-Cat should be a 2-topos, then (0, 1)-Cat should probably be a (1, 2)-topos?)
i think the main things bugging me are like
if you do work in Opf(C) (for C a preordered set), then that's the same as working in [C, PreOrd], right? But a global element of the constant functor at some D is then gonna correspond to just an element of D, as far as I can tell, not to a monotone function C → D, and that is an identification that I would very much expect to hold if I want to be able to get such a function as the semantics of a term . If I use lax natural transformations as morphisms, it seems to work, but I have no idea what other consequences that might have???
something seems really fishy about the Hom type constructor. I should take another look at how it was set up on the page for the internal language, but if types are supposed to be functorial in their free variables, then shouldn't the first argument have to have type C^op rather than C? i've thought much more about my case, anyway, which is having ≤ as a proposition constructor, and i'm almost certain that just typing it as is gonna be a problem. but if i keep C^op and C as completely separate types, and type ≤ as such, then how on earth do i type reflexivity and transitivity?!
anyway, i welcome anyone else's input too!!
@sarahzrf Right, these are some of the main issues with internal logic of categories with directed 2-cells. My opinion is that while you may want syntactic restrictions to isolate classes of dependent types corresponding to fibrations and opfibrations, the terms in such types should not be required to be morphisms of such (to preserve cartesian arrows). This solves your (1) because a term is a section of the projection , and if it's not required to be a morphism of opfibrations then this is really just a map . For your (2) I think that the basic hom-type should depend on two copies of , perhaps one marked as contravariant and one as covariant (if you like); then you can type reflexivity and transitivity (and even symmetry) without a problem since they are also not required to be maps of (op)fibrations.
ok :)
although, uh
oh right, ok, fibrations are stable under arbitrary pullback right, ok
hmmmm, i'm not quite seeing what you mean about (2)—what exactly do you mean about "two copies of "?
i was actually playing around a bit with maybe doing stuff over a twisted arrow category (or rather, the corresponding notion in PreOrd) so that i could talk about a "covariant component" and "contravariant component" of each free variable, but
is that similar to what you're talking about?
(i was thinking maybe it'd mean that quantifiers could correspond to ends/coends—cant remember whether it ended up working out, I hadn't touched this in a little while)
I just mean : there are two variables.
oh
well, the issue i had in mind was—
reflexivity is gonna be something like
except that that's ill-typed if one side is supposed to be
but if i do go with both being , then is not a fibration
...i think. more to the point, we lose the ability to transport by , which corresponds to being a fibration iirc
since is contravariant in its first argument
I realise I'm missing a lot of the context here, so apologies if this is a naïve question, but rather than having as a type constructor (à la directed type theory), is it possible a type theory with rewriting (where is essentially a different kind) could be suitable?
I think you don't have the same issues with variance in type theories with rewriting
(on the other hand, it might be totally unsuitable for the problems you're interested in)
i don't know anything about type theories with rewriting—never even heard the term :sweat_smile:
can you tell me about em?
the idea is that they give a nice internal language for things like poset-enriched categories and 2-categories — instead of having equalities between terms (e.g. for - and -rules), you instead have directed rewrites
it's a more computational approach to the typical computation rules
do you have a source i can check out?
let me find a good reference
haha, jinx
anyway though, it does seem to me like it should be possible for this to be a bona fide proposition
I think the classical reference is Seely's Modelling computations: A 2-categorical framework (http://www.math.mcgill.ca/rags/WkAdj/LICS.pdf)
because this should be some kind of truncation of a 2-topos type theory, and hopefully 2-topoi should have a type theory
a more recent reference is Fiore–Saville's A type theory for cartesian closed bicategories (https://arxiv.org/pdf/1904.06538.pdf)
awww the typesetting is unpleasant :(
oh that's nicer
which has more pleasant type setting :big_smile:
yes, I would have imagined it would be possible in the directed type theory style too
(and there's often value in different syntaxes for the same theory, which emphasise different perspectives)
but depending on what you want to use the type theory for, maybe rewrites could provide a different starting point too
:thumbs_up:
(I'm biased because I really don't like seeing "op" in type theories, which seems to be quite common in directed type theories — I personally think variance should be entirely implicit in the syntax)
you mean like having another arrow?
I mean, take the simply-typed -calculus as an example: the function type constructor is contravariant in its first argument, but the variance is entirely encoded in the introduction/elimination rules, etc.
the variance is a sort of side-effect of the other rules; it doesn't need to be explicit
similarly for rewriting, where you're talking about homs, but variance is never explicit in the syntax
i feel like that's a different Kind Of Thing but i'd have to really chew on it to articulate why >.>
Going back to the original conversation... that's right, is not a fibration of the same variance in both its variables, so when you substitute the diagonal into it, you get something that's not a fibration at all. Ergo, if you want reflexivity (and presumably you do), you have to allow dependent types that aren't fibrations (of any variance). You can still transport by in types that are fibrations, it's just that not all types are fibrations. See for instance https://arxiv.org/abs/1705.07442 for a type theory in which not all types are fibrations, but there is an internal characterization of those that are.
I think STLC is at a different level than what we're talking about here. STLC is the internal language of a CCC, and there are type constructors such as the function-type that are contravariant on some of their arguments. But the question here is about the internal language of a 2-category with an "opposite" operation on its objects, and in which some type families and terms are contravariant in their arguments. I don't know of any way to make that "implicit", although you can represent the "opposite" modality judgmentally.
dualising objects does make quite a difference, yes — what formal categorical structure does this correspond to?
every category, or in my case every preordered set, has an opposite
if you like, it probably corresponds to being autonomous
ah, so you want a type theory for the category , rather than a type theory for arbitrary (structured) preorder-enriched categories?
:point_up: see the first post
ah, I misread the post — that makes perfect sense
that is a little different from the focus of the rewriting theories, then
sorry for sending you down an unrelated rabbit hole :sweat_smile:
oh wait, I had read
Right, these are some of the main issues with internal logic of categories with directed 2-cells.
which is relevant (but I misinterpreted that as being the main focus)
it's cool!
Some families on the universe are co/contravariant with respect to function spaces in relatively ordinary type theory, and that's implicit.
You don't need to talk about and , although perhaps it would be convenient to be able to do that rather than carrying around proofs of variance.
Although the 'win' with identities/paths is that everything respects them, so you don't need to carry around anything. If not everything respects directed maps in the same way, I'm unclear what the win is on carrying around the information in one way or another.
@sarahzrf 2-categories such as Cat and Preord are not autonomous; the duality is just a "2-contravariant involution". You can make it an autonomous duality if you move to the bicategory Prof instead, or a star-autonomous duality if you use multivariable adjunctions, but the internal languages of those cases are even murkier.
ah
@Dan Doel You can make it implicit there because the universe doesn't carry within it the notion of "morphism": it's only an -groupoid, not a category structure of any sort. It just so happens that there is a type constructor that can be used to make into a category, but there are also other choices of ways to make into a category.
You can get plenty of win from knowing that some things respect morphisms, even if you don't know that everything does, as long as you have sensible and useful rules for deducing which things respect morphisms.