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 thought that coproducts are just Inl : a -> a+b, Inr : b -> a+b. With match: (a -> c) -> (b -> c) -> a+b -> c. Now I realised it's not precise.
Lambda calculus maps into cartesian closed category. The transform makes the scope explicit. Coproducts do not have input for the scope though.
What am I missing?
Do I understand the question right that you're trying to reconcile the standard definition of a coproduct in a category with the syntactic constructs a λ-calculus with coproducts gives you? And which of these do you understand better?
I understand both to some extent.
You answered James' second question but not his first. (I'm always fascinated by how people don't answer questions, and how that makes communication harder - it's a bit of an obsession of mine.)
It sounds like right description for these things. From now on I'll try to be more explicit with the limited knowledge I have.
So you're trying to reconcile the standard definition of a coproduct in a category with the syntactic constructs a λ-calculus with coproducts gives you?
Yes. On one side we get the morphisms (a -> a+b, b -> a+b) and the unique morphism (a+b->c) that can be constructed from morphisms (a->c, b->c).
On the other side we got (Inl, Inr) and match. This reconciles except that inside 'match' you have scope of variables.
You're saying that inside a match expression, you can access other variables bound in scope, but you don't see how that works categorically? I think it's just that if your scope consists of variables of types , instead of (the goal type) you can consider to be the new goal type, and now you have access to those variables in the match cases: and . Technically this needs to be the internal hom, not an actual morphism in the category: . And typically we like to think of the bound context as represented by a product type , to make it easier to work with as a single entity, instead of currying it like I did above. But I think that's the basic idea you are after.
It's true that type-theoretic sums have a stronger universal property than coproducts in a plain category. If the category has finite products, then this stronger universal property can be expressed by saying that it is a [[distributive category]]. Verity's argument explains why a cartesian closed category with coproducts is automatically distributive. Going the other way, you can express the stronger universal property in the absence even of finite products by working in a [[cartesian multicategory]].
John Baez said:
You answered James' second question but not his first. (I'm always fascinated by how people don't answer questions, and how that makes communication harder - it's a bit of an obsession of mine.)
Indeed, this is why I try to never ask two questions in a row without some sort of delimiter like bullet points!
https://motd.ambians.com/quotes.php/name/freebsd_fortunes_5/toc_id/1-0-6/s/597
Never ask two questions in a business letter. The reply will discuss the one you are least interested, and say nothing about the other.
Coincidentally, a similar technique is also used by lawyers when taking the deposition of evasive witnesses!
Yes, I've been in a jury and seen that!