Abstract
What is the right notion of "isomorphism" between types, in a simple type theory? The traditional answer is: a pair of terms that are inverse up to a specified congruence. We firstly argue that, in the presence of effects, this answer is too liberal and needs to be restricted, using Führmann's notion of thunkability in the case of value types (as in call-by-value), or using Munch-Maccagnoni's notion of linearity in the case of computation types (as in call-by-name). Yet that leaves us with different notions of isomorphism for different kinds of type.
This situation is resolved by means of a new notion of "contextual" isomorphism (or morphism), analogous at the level of types to contextual equivalence of terms. A contextual morphism is a way of replacing one type with the other wherever it may occur in a judgement, in a way that is preserved by the action of any term with holes. For types of pure λ-calculus, we show that a contextual morphism corresponds to a traditional isomorphism. For value types, a contextual morphism corresponds to a thunkable isomorphism, and for computation types, to a linear isomorphism.
- M. Barr and C. Wells. Toposes, Triples and Theories. Springer-Verlag, Berlin, 1985.Google Scholar
Cross Ref
- N. Benton and A. Kennedy. Exceptional syntax. Journal of Functional Programming, 11(4):395–410, 2001. Google Scholar
Digital Library
- P. Clairambault. Isomorphisms of types in the presence of higher-order references. In Twenty-Sixth Annual IEEE Symposium on Logic In Computer Science, 2011. Google Scholar
Digital Library
- J. de Lataillade. Second-order type isomorphisms through game semantics. Annals of Pure and Applied Logic, 151(2-3):115–150, 2008.Google Scholar
Cross Ref
- R. Di Cosmo. Isomorphisms of types: from lambda-calculus to information retrieval and language design. Progress in Theoretical Computer Science. Birkhäuser, 1995. Google Scholar
Digital Library
- M. Fiore, R. Di Cosmo, and V. Balat. Remarks on isomorphisms in typed lambda calculi with empty and sum types. In Proceedings of the 17th IEEE Symposium on Logic in Computer Science (LICS-02)), pages 147– 158, Los Alamitos, July 22–25 2002. IEEE Computer Society. Google Scholar
Digital Library
- P. J. Freyd, E. P. Robinson, and G. Rosolini. Functorial parametricity. In A. Scedrov, editor, Proceedings of the 7th Annual IEEE Symposium on Logic in Computer Science, pages 444–452, Santa Cruz, CA, June 1992.Google Scholar
- IEEE Computer Society Press. ISBN 0-8186-2734-2. C. Führmann. Direct models for the computational λ-calculus. In S. Brookes, A. Jung, M. Mislove, and A. Scedrov, editors, Proceedings of the 15th Conference in Mathematical Foundations of Programming Semantics, New Orleans, volume 20 of ENTCS, pages 147–172, 1999.Google Scholar
- J. Lambek and P. Scott. Introduction to Higher Order Categorical Logic. Cambridge University Press, Cambridge, 1986. Google Scholar
Digital Library
- O. Laurent. Classical isomorphisms of types. Mathematical Structures in Computer Science, 15(5):969–1004, 2005. Google Scholar
Digital Library
- O. Laurent, M. Quatrini, and L. Tortora de Falco. Polarized and focalized linear and classical proofs. Annals of Pure and Applied Logic, 134(2–3): 217–264, July 2005.Google Scholar
Cross Ref
- P. B. Levy. Monads and adjunctions for global exceptions. In Proceedings, 22nd Conference on the Mathematical Foundations of Programming Semantics, volume 158 of ENTCS, 2006a. P. B. Levy. Jumbo λ-calculus. In Proc., 33rd International Colloquium on Automata, Languages and Programming, volume 4052 of LNCS. Springer, 2006b. P. B. Levy. Call-By-Push-Value. A Functional/Imperative Synthesis. Semantic Structures in Computation. Springer, 2004. Google Scholar
Digital Library
- E. Moggi. Computational lambda-calculus and monads. LFCS Report ECS-LFCS-88-66, University of Edinburgh, Oct. 1988.Google Scholar
- E. Moggi. Notions of computation and monads. Information and Computation, 93, 1991. Google Scholar
Digital Library
- J. H. Morris, Jr. Lambda-Calculus Models of Programming Languages. Ph. D. dissertation, MIT, Dec. 1968. Report No. MAC–TR–57. G. Munch-Maccagnoni. Syntaxe et modèles d’une composition nonassociative des programmes et des preuves. PhD thesis, Université Paris-Diderot - Paris VII, Dec. 10 2013.Google Scholar
- G. Munch-Maccagnoni. Models of a non-associative composition. In A. Muscholl, editor, Foundations of Software Science and Computation Structures - 17th International Conference, Proceedings, volume 8412 of Lecture Notes in Computer Science, pages 396–410. Springer, 2014.Google Scholar
- A. M. Pitts. Operationally-based theories of program equivalence. In P. Dybjer and A. M. Pitts, editors, Semantics and Logics of Computation, Publications of the Newton Institute, pages 241–298. Cambridge University Press, 1997.Google Scholar
- G. Plotkin and J. Power. Notions of computation determine monads. In Proceedings, Foundations of Software Science and Computation Structures, 2002, volume 2303 of LNCS, pages 342–356. Springer, 2002. Google Scholar
Digital Library
- A. J. Power and E. P. Robinson. Premonoidal categories and notions of computation. Mathematical Structures in Computer Science, 7(5):453– 468, Oct. 1997. Google Scholar
Digital Library
- E. P. Robinson. Parametricity as isomorphism. Theoretical Computer Science, 136(1):163–181, 1994. Google Scholar
Digital Library
- P.. Selinger. Control categories and duality: On the categorical semantics of the λµ-calculus. Mathematical Structures in Computer Science, 11(2): 207–260, 2001. Google Scholar
Digital Library
- S. Soloviev and R. Di Cosmo, editors. Isomorphism of Types, volume 15(5) of Mathematical Structures in Computer Science. Cambridge University Press, 2005. Google Scholar
Digital Library
Index Terms
Contextual isomorphisms
Recommendations
Contextual isomorphisms
POPL '17: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming LanguagesWhat is the right notion of "isomorphism" between types, in a simple type theory? The traditional answer is: a pair of terms that are inverse up to a specified congruence. We firstly argue that, in the presence of effects, this answer is too liberal and ...
Observationally-induced Effect Monads: Upper and Lower Powerspace Constructions
Alex Simpson has suggested to use an observationally-induced approach towards modelling computational effects in denotational semantics. The principal idea is that a single observation algebra is used for defining the computational type structure. He ...
Coproducts of Monads on Set
LICS '12: Proceedings of the 2012 27th Annual IEEE/ACM Symposium on Logic in Computer ScienceCoproducts of monads on $\Set$ have arisen in both the study of computational effects and universal algebra. We describe coproducts of consistent monads on $\Set$ by an initial algebra formula, and prove also the converse: if the coproduct exists, so do ...







Comments