Skip to main content Accessibility help
×
Home

Well-founded recursion with copatterns and sized types

  • ANDREAS ABEL (a1) and BRIGITTE PIENTKA (a2)

Abstract

In this paper, we study strong normalization of a core language based on System ${\mathsf{F}_\omega}$ which supports programming with finite and infinite structures. Finite data such as finite lists and trees is defined via constructors and manipulated via pattern matching, while infinite data such as streams and infinite trees is defined by observations and synthesized via copattern matching. Taking a type-based approach to strong normalization, we track size information about finite and infinite data in the type. We exploit the duality of pattern and copatterns to give a unifying semantic framework which allows us to elegantly and uniformly support both well-founded induction and coinduction by rewriting. The strong normalization proof is structured around Girard's reducibility candidates. As such, our system allows for non-determinism and does not rely on coverage. Since System ${\mathsf{F}_\omega}$ is general enough that it can be the target of compilation for the Calculus of Constructions, this work is a significant step towards representing observation-based infinite data in proof assistants such as Coq and Agda.

    • Send article to Kindle

      To send this article to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about sending to your Kindle. Find out more about sending to your Kindle.

      Note you can select to send to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be sent to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

      Find out more about the Kindle Personal Document Service.

      Well-founded recursion with copatterns and sized types
      Available formats
      ×

      Send article to Dropbox

      To send this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Dropbox.

      Well-founded recursion with copatterns and sized types
      Available formats
      ×

      Send article to Google Drive

      To send this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Google Drive.

      Well-founded recursion with copatterns and sized types
      Available formats
      ×

Copyright

References

Hide All
Abel, A. (2006) A Polymorphic Lambda-Calculus with Sized Higher-Order Types. Ph.D. thesis, Ludwig-Maximilians-Universität München.
Abel, A. (2008a) Polarized subtyping for sized types. Math. Struct. Comput. Sci. 18 (5), 797822.
Abel, A. (2008b) Semi-continuous sized types and termination. Logical Meth. Comput. Sci. 4 (2:3), 133.
Abel, A. (2010) MiniAgda: Integrating sized and dependent types. In (Bove et al., 2010).
Abel, A. (2012) Type-based termination, inflationary fixed-points, and mixed inductive-coinductive types. In Proceedings of the 8th Wksh. on Fixed Points in Comp. Sci. (FICS 2012), Miller, D. & Ésik, Z. (eds), Electr. Proc. in Theor. Comp. Sci., vol. 77 pp. 1–11.
Abel, A., Pientka, B., Thibodeau, D. & Setzer, A. (2013) Copatterns: Programming infinite structures by observations. In Proceedings of the 40th ACM Symp. on Principles of Programming Languages, POPL 2013, Giacobazzi, R. & Cousot, R. (eds), ACM Press, pp. 2738.
AgdaTeam. (2015) The Agda Wiki.
Altenkirch, T. & Danielsson, N. A. (2012) Termination checking in the presence of nested inductive and coinductive types. In Wksh. on Partiality And Recursion in Interactive Theorem Provers, PAR 2010, Bove, A., Komendantskaya, E. & Niqui, M. (eds), EPiC Series in Comput. Sci., vol. 5. EasyChair, pp. 101106.
Amadio, R. M. & Coupet-Grimal, S. (1998) Analysis of a guard condition in type theory (extended abstract) In Proceedings of the 1st International Conference on Foundations of Software Science and Computation Structure, FoSSaCS'98, Nivat, M. (ed), Lect. Notes in Comput. Sci., vol. 1378. Springer, pp. 4862.
Barthe, G., Frade, M. J., Giménez, E., Pinto, L. & Uustalu, T. (2004) Type-based termination of recursive definitions. Math. Struct. Comput. Sci. 14 (1), 97141.
Barthe, G., Grégoire, B. & Pastawski, F. (2005) Practical inference for type-based termination in a polymorphic setting. In Proceedings of the 7th International Conference on Typed Lambda Calculi and Applications, TLCA 2005, Urzyczyn, P. (ed), Lect. Notes in Comput. Sci., vol. 3461. Springer, pp. 7185.
Barthe, G., Grégoire, B. & Riba, C. (2008) Type-based termination with sized products. In Computer Science Logic, 22nd Int. Wksh., CSL 2008, 17th Annual Conf. of the EACSL, Kaminski, M. & Martini, S. (eds), Lect. Notes in Comput. Sci., vol. 5213. Springer, pp. 493507.
Blanqui, F. (2004) A type-based termination criterion for dependently-typed higher-order rewrite systems. In Rewriting Techniques and Applications, RTA 2004, Aachen, Germany, van Oostrom, V. (ed), Lect. Notes in Comput. Sci., vol. 3091. Springer, pp. 2439.
Blanqui, F. & Riba, C. (2006) Combining typing and size constraints for checking the termination of higher-order conditional rewrite systems. In Proceedings of the 13th Int. Conf. on Logic for Programming, Artificial Intelligence, and Reasoning, LPAR 2006, Hermann, M. & Voronkov, A. (eds), Lect. Notes in Comput. Sci., vol. 4246. Springer, pp. 105119.
Bove, A., Komendantskaya, E. & Niqui, M. (eds). (2010) Wksh. on Partiality and Recursion in Interactive Theorem Provers, PAR 2010. Electr. Proc. in Theor. Comp. Sci., vol. 43.
Coquand, T. (1994) Infinite objects in type theory. In Types for Proofs and Programs, Int. Wksh., TYPES'93, Barendregt, H. & Nipkow, T. (eds), Lect. Notes in Comput. Sci., vol. 806. Springer, pp. 6278.
Danielsson, N. A. (2010) Beating the productivity checker using embedded languages. In (Bove et al., 2010).
Dybjer, P. (2000) A general formulation of simultaneous inductive-recursive definitions in type theory. J. Symb. Logic 65 (2), 525549.
Ghani, N., Hancock, P. & Pattinson, D. (2009) Representations of stream processors using nested fixed points. Logical Meth. Comput. Sci. 5 (3:9)
Giménez, E. (1996) Un calcul de constructions infinies et son application a la vérification de systèmes communicants. Ph.D. thesis, Ecole Normale Supérieure de Lyon.
Girard, J.-Y., Lafont, Y. & Taylor, P. (1989) Proofs and Types. Cambridge Tracts in Theoret. Comput. Sci., vol. 7. Cambridge University Press.
Hughes, J., Pareto, L. & Sabry, A. (1996) Proving the correctness of reactive systems using sized types. In Proceedings of the 23rd ACM Symposium on Principles of Programming Languages, POPL'96, pp. 410423.
INRIA. (2012) The Coq Proof Assistant Reference Manual. Version 8.4 edn. INRIA.
Jones, G. & Gibbons, J. (1993) Linear-Time Breadth-fFrst Tree Algorithms: An Exercise in the Arithmetic of Folds and Zips. Technical Report, University of Auckland.
Mendler, N. P. (1987) Recursive types and type constraints in second-order lambda calculus. In Proceedings of the 2nd IEEE Symp. on Logic in Computer Science (LICS'87). IEEE Computer Soc. Press, pp. 3036.
Oury, N. (2008) Coinductive Types and Type Preservation. Message on the Coq-club mailing list on 6 June 2008.
Pareto, L. (2000) Types for Crash Prevention. PhD Thesis, Chalmers University of Technology.
Reihl, F. (2013) Solving Size Constraints using Graph Representation. Bachelor's Thesis, Institut für Informatik, Ludwig-Maximilians-Universität München.
Sacchini, J. L. (2011) On Type-Based Termination and Pattern Matching in the Calculus of Inductive Constructions. PhD Thesis, INRIA Sophia-Antipolis and École des Mines de Paris.
Sacchini, J. L. (2013) Type-based productivity of stream definitions in the calculus of constructions. In Proceedings of the 28th IEEE Symposium on Logic in Computer Science (LICS'13). IEEE Computer Soc. Press, pp. 233242.
Sijtsma, B. A. (1989) On the productivity of recursive list definitions. ACM Trans. Program. Lang. Syst. 11 (4), 633649.
Sprenger, C. & Dam, M. (2003) On the structure of inductive reasoning: Circular and tree-shaped proofs in the μ-calculus. In Proceedings of the 6th International Conference on Foundations of Software Science and Computational Structures, FoSSaCS 2003, Gordon, A. D. (ed), Lect. Notes in Comput. Sci., vol. 2620. Springer, pp. 425440.
Steffen, M. (1998) Polarized Higher-Order Subtyping. PhD Thesis, Technische Fakultät, Universität Erlangen.
Taylor, P. (1996) Intuitionistic sets and ordinals. J. Symb. Logic 61 (3), 705744.
Vouillon, J. & Melliès, P.-A. (2004) Semantic types: A fresh look at the ideal model for types. In Proceedings of the 31st ACM Symp. on Principles of Programming Languages, POPL 2004. ACM Press, pp. 5263.
Watkins, K., Cervesato, I., Pfenning, F. & Walker, D. (2003) A Concurrent Logical Framework I: Judgements and Properties. Technical Report. School of Computer Science, Carnegie Mellon University, Pittsburgh.
Xi, H. (2002) Dependent types for program termination verification. J. Higher-Order and Symb. Comput. 15 (1), 91131.

Metrics

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed

Well-founded recursion with copatterns and sized types

  • ANDREAS ABEL (a1) and BRIGITTE PIENTKA (a2)
Submit a response

Discussions

No Discussions have been published for this article.

×

Reply to: Submit a response


Your details


Conflicting interests

Do you have any conflicting interests? *