Conversation

I'm messing around with a polarized sequent calculus thing and wanted to index (co)terms by polarity… just one bit of information! just the one! and I crashed headlong into a wall.
1
4
My advice is to never, ever use multiple environments. Instead use a single environment where each member has additional info (is this a positive/negative variable? a value/continuation?).
1
2
I mean, agreed, but the problem moves around, e.g. the variable is negative but the value at that index is positive. Resolvable, but still, ew. (Counter to what I just said, I pretty strongly prefer leaving Γ and Δ separate. Would love to know more about why you'd combine them!)
2
1
McBride and Atkey's QTT stuff merged the linear and unrestricted contexts to make dependently typed linearity less terrible (I think the issue was to do with when types might depend on linear things?). No clue if that applies here though.
1
1
Replying to and
This is also the direction the Graded Types folks have gone in. I find it makes everything simpler - metatheory, implementation, datatypes. I would be interested to see an example where a unified context *isn't* simpler to deal with.
1
3
Interleaving in/out contexts seems to necessitate indexing, or another source of partiality, or merging (co)term representations (and thus another source of partiality), tho. It’d make fresh variable selection easier, true, but I think most of the rest harder?
1
3
Show replies