Computing with semirings and weak rig groupoids

J Carette, A Sabry - European Symposium on Programming, 2016 - Springer
European Symposium on Programming, 2016Springer
The original formulation of the Curry–Howard correspondence relates propositional logic to
the simply-typed λ λ-calculus at three levels: the syntax of propositions corresponds to the
syntax of types; the proofs of propositions correspond to programs of the corresponding
types; and the normalization of proofs corresponds to the evaluation of programs. This rich
correspondence has inspired our community for half a century and has been generalized to
deal with more advanced logics and programming models. We propose a variant of this …
Abstract
The original formulation of the Curry–Howard correspondence relates propositional logic to the simply-typed -calculus at three levels: the syntax of propositions corresponds to the syntax of types; the proofs of propositions correspond to programs of the corresponding types; and the normalization of proofs corresponds to the evaluation of programs. This rich correspondence has inspired our community for half a century and has been generalized to deal with more advanced logics and programming models. We propose a variant of this correspondence which is inspired by conservation of information and recent homotopy theoretic approaches to type theory.
Our proposed correspondence naturally relates semirings to reversible programming languages: the syntax of semiring elements corresponds to the syntax of types; the proofs of semiring identities correspond to (reversible) programs of the corresponding types; and equivalences between algebraic proofs correspond to meaning-preserving program transformations and optimizations. These latter equivalences are not ad hoc: the same way semirings arise naturally out of the structure of types, a categorical look at the structure of proof terms gives rise to (at least) a weak rig groupoid structure, and the coherence laws are exactly the program transformations we seek. Thus it is algebra, rather than logic, which finally leads us to our correspondence.
Springer