skip to main content
research-article

Contextual isomorphisms

Published:01 January 2017Publication History
Skip Abstract Section

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.

References

  1. M. Barr and C. Wells. Toposes, Triples and Theories. Springer-Verlag, Berlin, 1985.Google ScholarGoogle ScholarCross RefCross Ref
  2. N. Benton and A. Kennedy. Exceptional syntax. Journal of Functional Programming, 11(4):395–410, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. de Lataillade. Second-order type isomorphisms through game semantics. Annals of Pure and Applied Logic, 151(2-3):115–150, 2008.Google ScholarGoogle ScholarCross RefCross Ref
  5. R. Di Cosmo. Isomorphisms of types: from lambda-calculus to information retrieval and language design. Progress in Theoretical Computer Science. Birkhäuser, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle Scholar
  8. 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 ScholarGoogle Scholar
  9. J. Lambek and P. Scott. Introduction to Higher Order Categorical Logic. Cambridge University Press, Cambridge, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. O. Laurent. Classical isomorphisms of types. Mathematical Structures in Computer Science, 15(5):969–1004, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarCross RefCross Ref
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. E. Moggi. Computational lambda-calculus and monads. LFCS Report ECS-LFCS-88-66, University of Edinburgh, Oct. 1988.Google ScholarGoogle Scholar
  14. E. Moggi. Notions of computation and monads. Information and Computation, 93, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle Scholar
  16. 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 ScholarGoogle Scholar
  17. 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 ScholarGoogle Scholar
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. E. P. Robinson. Parametricity as isomorphism. Theoretical Computer Science, 136(1):163–181, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. P.. Selinger. Control categories and duality: On the categorical semantics of the λµ-calculus. Mathematical Structures in Computer Science, 11(2): 207–260, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. S. Soloviev and R. Di Cosmo, editors. Isomorphism of Types, volume 15(5) of Mathematical Structures in Computer Science. Cambridge University Press, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Contextual isomorphisms

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 52, Issue 1
      POPL '17
      January 2017
      901 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/3093333
      Issue’s Table of Contents
      • cover image ACM Conferences
        POPL '17: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages
        January 2017
        901 pages
        ISBN:9781450346603
        DOI:10.1145/3009837

      Copyright © 2017 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 January 2017

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!