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.
@Jules Hedges i'm gonna reply to this here https://twitter.com/_julesh_/status/1246528993903497222
@sarah_zrf A bit... at least I read a bunch of Jacobs' book and I'm generally intimidated and confused by the whole thing, but I know at least some of the basics
- julesh (@_julesh_)basically the idea is like
if you're interpreting your type theory in a category , and you have a typing judgment , then you should of course have an object to act as its semantics
but say you have a judgment , and your language is dependently typed, so that may well appear free in —we don't just want an object of
rather, the semantics of should be a family of objects of , parameterized by
that's an object of the slice category !
sarahzrf said:
Jules Hedges i'm gonna reply to this here https://twitter.com/_julesh_/status/1246528993903497222
What's the context on this? I'm a big Bart Jacobs fan myself!
click thru & see
anyway tho, in general if we have a context , that determines an object in some category, and then determines an object in the slice category over
and then if you write a term , that gives a global element of
so, something that i was tweeting about the other day with like 4am brain and which finally clicked for me was like...
sarahzrf said:
click thru & see
I tried but the thread is not visible in either profile :/.
you should be able to click the twitter link itself, not our @
but i can screenshot it if you want, one sec
I still think we're talking at cross purposes..... the idea behind what I originally said is that the syntax of languages ought to reflect the categorical semantics
Inspired by mixed linear-nonlinear logic, really
and im claiming that it does :>
in this case
Hm, I don't see that
it was a bit tongue in cheek, but i actually kinda like this viewpoint
lemme continue
if you have —i.e., is a variable of —then that's still a global element in a slice category
a slice category over is the category where there is a global parameter of
Jules Hedges said:
I still think we're talking at cross purposes..... the idea behind what I originally said is that the syntax of languages ought to reflect the categorical semantics
What exactly do you mean by "reflect"?
so 's categorical semantics is "one of the components of the global parameter"
i contend, at least semiseriously and for the purpose of this conversation, that having free variables at all is a syntax that reflects working in a slice category!
Ok, I can buy that
whenever you add a free variable, you move up a slice, or at least base change
and whenever you bind a variable, you're applying an adjunction
Then I need to refine what I said a bit. We have lexical scoping (??) for slice categories, and then another example is how do-notation drops you into the internal syntax of a kleisli category.... but my crazy idea is that all these things should be programmer-definable instead of having a fixed-for-all-time collection of adjunctions provided by the language
yeah that would be sick as hell
but i just mean like
the story behind that tweet was basically just
Another example that was really the motivating one is the language based on call by push value, where you have a strict language and a lazy language and operators that go between them
One of my zen principles is that if you make your language strict you went wrong, and if you make it lazy you went wrong, the only true path is to put them on exactly equal footing with neither preferred
i had a shower thought like "hmm... modalities are [co]monads b/c youre, like, really talking about something in another category thru the lens of this one, so ur moving thru an adjunction... what if u had a type constructor that really was an adjoint instead of a monad... wait a second, didnt jules tweet something like that before... wait a second, ... lmao im gonna tweet this"
All the things I've seen that do that have a lot of extra boilerplate.
Ah, I get it
And yeah. I guess nobody knows how to make it work, otherwise someone would have done it already
By the way, have you read Compiling with Classical Connectives?
nope, whats it about
I don't know CBPV very well, but CwCC seems like it's probably that on steroids.
It kind of has a bunch of somewhat different ideas crammed into one paper, but they're all cool.
CwCC looks like an emoticon
The thing that really started me on that train of thought was linear-nonlinear logic. So you start with linear logic, where the ! modality looks like a comonad. Then in the categorical semantics it really is a comonad, but after a lot of work in the 90s everyone agreed that the "right" categorical semantics of linear logic is a "linear-nonlinear adjunction" between a *-autonomous category and a cartesian category, where ! gets decomposed. And then Benton invented linear-nonlinear logic, which is a syntactic reformulation of linear logic that directly reflects the categorical semantics
waittttt i thought the "right" categorical semantics was a comonad :cold_sweat:
"seely comonad" or sth
i havent looked into categorical semantics of linear logic much
I kinda cut my teeth in category theory reading "categorical semantics of linear logic" by Melliès, so I always take his word on this
Anyhow, one of the things in CwCC is a type theory that's like sequent calculus, with multiple consequents. It has all the linear connectives, but I think the sequents are not linear.
Instead the connectives are distinguished by their inherent polarity, which maps to an evaluation strategy that makes the reduction deterministic, and you can shift between them.
I don't think I read that paper, but I love this stuff.... if I wasn't doing game theory I'd like to be a French logician
be a french PL theorist instead
So is a positive connective whose values are a choice of two positive values, and is a negative connective whose covalues are pairs of two negative covalues.
well, is there a difference
French programming languages = French logic + naming things to make English speakers uncomfortable
have you seen abramsky's ?
Positive values are built out of constructors, and negative covalues are built out of projections. Negative values are built by copattern matching and positive covalues are built by pattern matching.
its what im most familiar with, given that ive been working with it for my degree project
But, it also has semantics for call-by-need, and call-by-coneed. The latter avoids duplicate work when capturing continuations.
hmmmm that sounds like the dual calculus :thinking:
Then in a later section it also shows how to have arbitrary (co)data definitions whose constructors/projections are specified by sequents.
And how to compile it back to the linear logic set of connectives.
Ok, I'd like to know what "coneed" is, but I'd like to go to bed even more
imagine going to bed at only 10pm
when there is PL to be done
I'm normally more of a night person, but I'm living with my dad who is a morning person with far more determination than me. And also I don't have enough enthusiasm to work on weekends
the week is a principal homogeneous space for the action of
at least, when i'm at home and lying in bed all day :disappointed:
do-notation drops you into the internal syntax of a kleisli category.... but my crazy idea is that all these things should be programmer-definable
isn't this the idea behind embedded domain specific languages?
Racket is particularly big on this
I have a couple of cool demos that might be relevant to this discussion, I'll probably show them soon-ish. Just have to do a bit more polish first...
I've been trying to wrap my head around Sigma and Pi types for a while now. I find that the hardest part is understanding how the type level and value level interact in a kind of zigzagging way. I finally think I understand, and I drew this diagram to try to make it clear what is going on. Would be happy to hear if I'm on the right track.
https://drive.google.com/file/d/19qfBnTk0e7AxMBCGGi9QEZ_ZXjAPpQ80/view?usp=drivesdk
That looks right.