skip to main content
research-article

Proving the unique fixed-point principle correct: an adventure with category theory

Published:19 September 2011Publication History
Skip Abstract Section

Abstract

Say you want to prove something about an infinite data-structure, such as a stream or an infinite tree, but you would rather not subject yourself to coinduction. The unique fixed-point principle is an easy-to-use, calculational alternative. The proof technique rests on the fact that certain recursion equations have unique solutions; if two elements of a coinductive type satisfy the same equation of this kind, then they are equal. In this paper we precisely characterize the conditions that guarantee a unique solution. Significantly, we do so not with a syntactic criterion, but with a semantic one that stems from the categorical notion of naturality. Our development is based on distributive laws and bialgebras, and draws heavily on Turi and Plotkin's pioneering work on mathematical operational semantics. Along the way, we break down the design space in two dimensions, leading to a total of nine points. Each gives rise to varying degrees of expressiveness, and we will discuss three in depth. Furthermore, our development is generic in the syntax of equations and in the behaviour they encode - we are not caged in the world of streams.

Skip Supplemental Material Section

Supplemental Material

_talk8.mp4

References

  1. A. Abel. MiniAgda: Integrating Sized and Dependent Types. Electronic Proceedings in Theoretical Computer Science, 43: 14--28, 2010.Google ScholarGoogle ScholarCross RefCross Ref
  2. A. Abel and T. Altenkirch. A predicative analysis of structural recursion. JFP, 12 (1): 1--41, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. H. Applegate. Acyclic models and resolvent functors. PhD thesis, Columbia University, 1965.Google ScholarGoogle Scholar
  4. F. Bartels. Generalised coinduction. Mathematical Structures in Computer Science, 13 (2): 321--348, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. R. S. Bird and O. De Moor. Algebra of Programming, volume 100 of International Series in Computing Science. Prentice Hall, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. E. W. Dijkstra. Hamming's exercise in SASL. Personal Note EWD792, 1981.Google ScholarGoogle Scholar
  7. J. Endrullis, C. Grabmayer, and D. Hendriks. Data-oblivious stream productivity. In Logic for Programming, Artificial Intelligence, and Reasoning, volume 5330 of LNCS, pages 79--96. Springer, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. E. Giménez. Codifying guarded definitions with recursive schemes. In Types for Proofs and Programs, volume 996 of LNCS, pages 39--59. Springer, 1995. Google ScholarGoogle ScholarCross RefCross Ref
  9. R. Hinze. The Bird tree. JFP, 19 (5): 491--508, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. Hinze. Concrete stream calculus - an extended study. JFP, 20 (5-6): 463--535, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. R. Hinze and D. W. H. James. Proving the Unique-Fixed Point Principle Correct. Technical Report RR-11-03, Department of Computer Science, University of Oxford, 2011.Google ScholarGoogle Scholar
  12. J. Hughes, L. Pareto, and A. Sabry. Proving the correctness of reactive systems using sized types. In POPL, pages 410--423. ACM, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Lenisa, J. Power, and H. Watanabe. Distributivity for endofunctors, pointed and co-pointed endofunctors, monads and comonads. Electronic Notes in Theoretical Computer Science, 33: 230--260, 2000.Google ScholarGoogle ScholarCross RefCross Ref
  14. C. McBride and R. Paterson. Applicative programming with effects. JFP, 18 (1): 1--13, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. K. Mehltretter. Termination checking for a dependently typed language. Master's thesis, LMU Munich, 2007.Google ScholarGoogle Scholar
  16. M. Niqui and J. J. M. M. Rutten. Sampling, splitting and merging in coinductive stream calculus. In MPC, volume 6120 of LNCS, pages 310--330. Springer, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. J. J. M. M. Rutten. Fundamental study: Behavioural differential equations: A coinductive calculus of streams, automata, and power series. Theoretical Computer Science, 308: 1--53, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. B. A. Sijtsma. On the productivity of recursive list definitions. ACM Trans. Program. Lang. Syst., 11 (4): 633--649, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. A. Silva and J. J. M. M. Rutten. A coinductive calculus of binary trees. Information and Computation, 208: 578--593, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. W. Swierstra. Data types à la carte. JFP, 18 (04): 423--436, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. D. Turi and G. Plotkin. Towards a mathematical operational semantics. In Logic in Computer Science, pages 280--291. IEEE, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. H. Zantema. Well-definedness of streams by transformation and termination. Logical Methods in Computer Science, 6 (3:21), 2010.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Proving the unique fixed-point principle correct: an adventure with category theory

            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 46, Issue 9
              ICFP '11
              September 2011
              456 pages
              ISSN:0362-1340
              EISSN:1558-1160
              DOI:10.1145/2034574
              Issue’s Table of Contents
              • cover image ACM Conferences
                ICFP '11: Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
                September 2011
                470 pages
                ISBN:9781450308656
                DOI:10.1145/2034773

              Copyright © 2011 ACM

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 19 September 2011

              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!