The category of lambda calculus with products and coproducts
Normal Forms and Cut-Free Proofs as
Natural Transformations by Girard, Scedrov and Scott seems to have what I have been looking for. My interpretation: (simply typed) Lambda calculus with products can be expressed as natural deductions (with parcels and products) via the Curry-Howard isomorphism. Natural deductions can in turn be expressed by left sequent logic (with products). Sequent logic can always be rewritten in a way that is cut free. The main result of the paper is that all rules in left sequent logic (with products), except the cut rule, can be interpreted in any Cartesian closed category. Further, these interpretations can be inductively proven to be dinatural.
I think cut free left sequent logic corresponds to simply typed lambda calculus in normal form where all free variables in all subexpressions have been bound and uncurried, so the passive context of the sequent represents a tuple with the needed unbound variables in the subexpression.
Notably, they have been kind enough to leave the low hanging(?) fruit of coproduct types. I will try to find or make a solution for this hole.
I believe that, once coproducts have been added, the resulting category will be optimal for describing all computable functions, and replace Set as the preferred category to define the semantics of computer science, in general.
It seems we must allow lambda expressions of infinite length. I don't know how nontermination will be handled. The fixed point operator can then be defined by the infinite lambda expression f . f•f•f•… It might turn out that all arrows of Set will be preserved, due to coproducts, but I believe this new category will be small; the collection of all its objects will form a Set.
Kommentarer
Skicka en kommentar