Abstract
This paper presents a formalized framework for defining corecursive functions safely in a total setting, based on corecursion up-to and relational parametricity. The end product is a general corecursor that allows corecursive (and even recursive) calls under "friendly" operations, including constructors. Friendly corecursive functions can be registered as such, thereby increasing the corecursor's expressiveness. The metatheory is formalized in the Isabelle proof assistant and forms the core of a prototype tool. The corecursor is derived from first principles, without requiring new axioms or extensions of the logic.
- M. Abbott, T. Altenkirch, and N. Ghani. Containers: Constructing strictly positive types. Theor. Comput. Sci., 342(1):3–27, 2005. Google Scholar
Digital Library
- A. Abel. Termination checking with types. RAIRO—Theor. Inf. Appl., 38(4):277–319, 2004.Google Scholar
- A. Abel. MiniAgda: Integrating sized and dependent types. In A. Bove, E. Komendantskaya, and M. Niqui, eds., PAR 2010, vol. 43 of EPTCS, pp. 14–28, 2010.Google Scholar
- A. Abel. Re: {Coq-Club} Propositional extensionality is inconsistent in Coq, 2013. Archived at https://sympa.inria.fr/sympa/arc/ coq-club/2013-12/msg00147.html.Google Scholar
- A. Abel and B. Pientka. Wellfounded recursion with copatterns: A unified approach to termination and productivity. In G. Morrisett and T. Uustalu, eds., ICFP ’13, pp. 185–196. ACM, 2013. Google Scholar
Digital Library
- A. Abel, B. Pientka, D. Thibodeau, and A. Setzer. Copatterns: Programming infinite structures by observations. In R. Giacobazzi and R. Cousot, eds., POPL 2013, pp. 27–38, 2013. Google Scholar
Digital Library
- A. Asperti, W. Ricciotti, C. S. Coen, and E. Tassi. The Matita interactive theorem prover. In N. Bjørner and V. Sofronie-Stokkermans, eds., CADE-23, vol. 6803 of LNCS, pp. 64–69. Springer, 2011. Google Scholar
Digital Library
- R. Atkey and C. McBride. Productive coprogramming with guarded recursion. In G. Morrisett and T. Uustalu, eds., ICFP ’13, pp. 197–208. ACM, 2013. Google Scholar
Digital Library
- F. Bartels. Generalised coinduction. Math. Struct. Comp. Sci., 13(2):321–348, 2003. Google Scholar
Digital Library
- F. Bartels. On Generalised Coinduction and Probabilistic Specification Formats: Distributive Laws in Coalgebraic Modelling. Ph.D. thesis, Vrije Universiteit Amsterdam, 2004.Google Scholar
- N. Benton. The proof assistant as an integrated development environment. In C.-c. Shan, ed., APLAS 2013, vol. 8301 of LNCS, pp. 307–314. Springer, 2013. Google Scholar
Digital Library
- J.-P. Bernardy, P. Jansson, and R. Paterson. Proofs for free: Parametricity for dependent types. J. Funct. Program., 22(2):107–152, 2012. Google Scholar
Digital Library
- Y. Bertot and P. Castéran. Interactive Theorem Proving and Program Development—Coq’Art: The Calculus of Inductive Constructions. Texts in Theoretical Computer Science. Springer, 2004. Google Scholar
Digital Library
- J. C. Blanchette, J. Hölzl, A. Lochbihler, L. Panny, A. Popescu, and D. Traytel. Truly modular (co)datatypes for Isabelle/HOL. In G. Klein and R. Gamboa, eds., ITP 2014, vol. 8558 of LNCS, pp. 93–110. Springer, 2014.Google Scholar
- J. C. Blanchette, A. Popescu, and D. Traytel. Unified classical logic completeness: A coinductive pearl. In S. Demri, D. Kapur, and C. Weidenbach, eds., IJCAR 2014, vol. 8562 of LNCS, pp. 46–60. Springer, 2014.Google Scholar
- J. C. Blanchette, A. Popescu, and D. Traytel. Formalization associated with this paper. https://github.com/dtraytel/fouco, 2015.Google Scholar
- J. C. Blanchette, A. Popescu, and D. Traytel. Witnessing (co)datatypes. In J. Vitek, ed., ESOP 2015, vol. 9032 of LNCS, pp. 359–382. Springer, 2015.Google Scholar
- A. Bove, P. Dybjer, and U. Norell. A brief overview of Agda—A functional language with dependent types. In S. Berghofer, T. Nipkow, C. Urban, and M. Wenzel, eds., TPHOLs 2009, vol. 5674 of LNCS, pp. 73–78. Springer, 2009. Google Scholar
Digital Library
- A. Cave, F. Ferreira, P. Panangaden, and B. Pientka. Fair reactive programming. In S. Jagannathan and P. Sewell, eds., POPL ’14, pp. 361–372. ACM, 2014. Google Scholar
Digital Library
- R. Clouston, A. Bizjak, H. B. Grathwohl, and L. Birkedal. Programming and reasoning with guarded recursion for coinductive types. In A. M. Pitts, ed., FoSSaCS 2015, vol. 9034 of LNCS, pp. 407–421. Springer, 2015.Google Scholar
- J. Crow, S. Owre, J. Rushby, N. Shankar, and M. Srivas. A tutorial introduction to PVS. WIFT ’95, 1995.Google Scholar
- M. Dénès. {Coq-Club} Propositional extensionality is inconsistent in Coq, 2013. Archived at https://sympa.inria.fr/sympa/arc/ coq-club/2013-12/msg00119.html.Google Scholar
- P. Di Gianantonio and M. Miculan. A unifying approach to recursive and co-recursive definitions. In H. Geuvers and F. Wiedijk, eds., TYPES 2002, vol. 2646 of LNCS, pp. 148–161. Springer, 2003. Google Scholar
Digital Library
- C. Elliott and P. Hudak. Functional reactive animation. In S. L. P. Jones, M. Tofte, and A. M. Berman, eds., ICFP ’97, pp. 263–273. ACM, 1997. Google Scholar
Digital Library
- J. Endrullis, D. Hendriks, and M. Bodin. Circular coinduction in Coq using bisimulation-up-to techniques. In S. Blazy, C. Paulin-Mohring, and D. Pichardie, eds., ITP 2013, vol. 7998 of LNCS, pp. 354–369. Springer, 2013. Google Scholar
Digital Library
- U. Hensel and B. Jacobs. Proof principles for datatypes with iterated recursion. In E. Moggi and G. Rosolini, eds., CTCS ’97, vol. 1290 of LNCS, pp. 220–241. Springer, 1997. Google Scholar
Digital Library
- J. Heras, E. Komendantskaya, and M. Schmidt. (Co)recursion in logic programming: Lazy vs eager. Theor. Pract. Log. Prog., 14(4-5), 2014.Google Scholar
- Supplementary material.Google Scholar
- R. Hinze. Concrete stream calculus—An extended study. J. Funct. Program., 20:463–535, 2010. Google Scholar
Digital Library
- R. Hinze and D. W. H. James. Proving the unique fixed-point principle correct—An adventure with category theory. In ICFP ’11, pp. 359–371, 2011. Extended version available at http://www.cs.ox. ac.uk/people/daniel.james/unique/unique-tech.pdf. Google Scholar
Digital Library
- B. Huffman. A purely definitional universal domain. In S. Berghofer, T. Nipkow, C. Urban, and M. Wenzel, eds., TPHOLs 2009, vol. 5674 of LNCS, pp. 260–275. Springer, 2009. Google Scholar
Digital Library
- B. Huffman and O. Kunˇcar. Lifting and Transfer: A modular design for quotients in Isabelle/HOL. In G. Gonthier and M. Norrish, eds., CPP 2013, vol. 8307 of LNCS, pp. 131–146. Springer, 2013. Google Scholar
Digital Library
- C.-K. Hur, G. Neis, D. Dreyer, and V. Vafeiadis. The power of parameterization in coinductive proof. In R. Giacobazzi and R. Cousot, eds., POPL ’13, pp. 193–206. ACM, 2013. Google Scholar
Digital Library
- B. Jacobs. Distributive laws for the coinductive solution of recursive equations. Inf. Comput., 204(4):561–587, 2006. Google Scholar
Digital Library
- C. Keller and M. Lasson. Parametricity in an impredicative sort. In P. Cégielski and A. Durand, eds., CSL 2012, vol. 16 of LIPIcs, pp. 381–395. Schloss Dagstuhl, 2012.Google Scholar
- B. Klin. Bialgebras for structural operational semantics: An introduction. Theor. Comput. Sci., 412(38):5043–5069, 2011.Google Scholar
Digital Library
- A. Krauss. Partial recursive functions in higher-order logic. In U. Furbach and N. Shankar, eds., IJCAR 2006, vol. 4130 of LNCS, pp. 589–603. Springer, 2006. Google Scholar
Digital Library
- N. R. Krishnaswami and N. Benton. Ultrametric semantics of reactive programs. In LICS 2011, pp. 257–266. IEEE, 2011. Google Scholar
Digital Library
- O. Kunˇcar. Correctness of Isabelle’s cyclicity checker—Implementability of overloading in proof assistants. In X. Leroy and A. Tiu, eds., CPP 2015, pp. 85–94. ACM, 2015. Google Scholar
Digital Library
- O. Kunˇcar and A. Popescu. A consistent foundation for Isabelle/HOL. In C. Urban and X. Zhang, eds., ITP 2015, LNCS. Springer, 2015.Google Scholar
- K. R. M. Leino and M. Moskal. Co-induction simply—Automatic co-inductive proofs in a program verifier. In C. B. Jones, P. Pihlajasaari, and J. Sun, eds., FM 2014, vol. 8442 of LNCS, pp. 382–398. Springer, 2014.Google Scholar
- X. Leroy. A formally verified compiler back-end. J. Autom. Reasoning, 43(4):363–446, 2009. Google Scholar
Digital Library
- A. Lochbihler. Verifying a compiler for Java threads. In A. D. Gordon, ed., ESOP 2010, vol. 6012 of LNCS, pp. 427–447. Springer, 2010. Google Scholar
Digital Library
- A. Lochbihler. Making the Java memory model safe. ACM Trans. Program. Lang. Syst., 35(4):12:1–65, 2014. Google Scholar
Digital Library
- A. Lochbihler and J. Hölzl. Recursive functions on lazy lists via domains and topologies. In G. Klein and R. Gamboa, eds., ITP 2014, vol. 8558 of LNCS, pp. 341–357. Springer, 2014.Google Scholar
- J. Matthews. Recursive function definition over coinductive types. In Y. Bertot, G. Dowek, A. Hirschowitz, C. Paulin, and L. Théry, eds., TPHOLs ’99, vol. 1690 of LNCS, pp. 73–90. Springer, 1999. Google Scholar
Digital Library
- S. Milius, L. S. Moss, and D. Schwencke. Abstract GSOS rules and a modular treatment of recursive definitions. Log. Meth. Comput. Sci., 9(3), 2013.Google Scholar
- L. S. Moss. Parametric corecursion. Theor. Comput. Sci., 260(1-2):139–163, 2001. Google Scholar
Digital Library
- T. Nipkow, L. C. Paulson, and M. Wenzel. Isabelle/HOL: A Proof Assistant for Higher-Order Logic. Springer, 2002. Google Scholar
Digital Library
- L. C. Paulson. Set theory for verification: I. From foundations to functions. J. Autom. Reasoning, 11(3):353–389, 1993. Google Scholar
Digital Library
- L. C. Paulson. Set theory for verification: II. Induction and recursion. J. Autom. Reasoning, 15(2):167–215, 1995.Google Scholar
Cross Ref
- A. Popescu and E. L. Gunter. Incremental pattern-based coinduction for process algebra and its Isabelle formalization. In C.-H. L. Ong, ed., FoSSaCS 2010, vol. 6014 of LNCS, pp. 109–127. Springer, 2010. Google Scholar
Digital Library
- J. C. Reynolds. Types, abstraction and parametric polymorphism. In IFIP ’83, pp. 513–523, 1983.Google Scholar
- G. Ro¸su and D. Lucanu. Circular coinduction—A proof theoretical foundation. In A. Kurz, M. Lenisa, and A. Tarlecki, eds., CALCO 2009, vol. 5728 of LNCS, pp. 127–144. Springer, 2009. Google Scholar
Digital Library
- J. Rot, M. M. Bonsangue, and J. J. M. M. Rutten. Coalgebraic bisimulation-up-to. In P. van Emde Boas, F. C. A. Groen, G. F. Italiano, J. R. Nawrocki, and H. Sack, eds., SOFSEM 2013, vol. 7741 of LNCS, pp. 369–381. Springer, 2013.Google Scholar
- J. J. M. M. Rutten. Processes as terms: Non-well-founded models for bisimulation. Math. Struct. Comp. Sci., 2(3):257–275, 1992.Google Scholar
Cross Ref
- J. J. M. M. Rutten. Universal coalgebra: A theory of systems. Theor. Comput. Sci., 249:3–80, 2000. Google Scholar
Digital Library
- J. J. M. M. Rutten. A coinductive calculus of streams. Math. Struct. Comp. Sci., 15(1):93–147, 2005. Google Scholar
Digital Library
- D. Sangiorgi. On the bisimulation proof method. Math. Struct. Comp. Sci., 8(5):447–479, 1998. Google Scholar
Digital Library
- D. Traytel. {Agda} Agda’s copatterns incompatible with initial algebras, 2014. Archived at https: //lists.chalmers.se/pipermail/agda/2014/006759.html.Google Scholar
- D. Traytel, A. Popescu, and J. C. Blanchette. Foundational, compositional (co)datatypes for higher-order logic—Category theory applied to theorem proving. In LICS 2012, pp. 596–605. IEEE, 2012. Google Scholar
Digital Library
- D. Turi and G. Plotkin. Towards a mathematical operational semantics. In LICS 1997, pp. 280–291. IEEE, 1997. Google Scholar
Digital Library
- D. A. Turner. Elementary strong functional programming. In P. H. Hartel and M. J. Plasmeijer, eds., FPLE ’95, vol. 1022 of LNCS, pp. 1–13. Springer, 1995. Google Scholar
Digital Library
- P. Wadler. Theorems for free! In FPCA ’89, pp. 347–359. ACM, 1989. Google Scholar
Digital Library
- G. Winskel. A note on model checking the modal ν-calculus. Theor. Comput. Sci., 83(1):157–167, 1991. Google Scholar
Digital Library
Index Terms
Foundational extensible corecursion: a proof assistant perspective
Recommendations
Foundational extensible corecursion: a proof assistant perspective
ICFP 2015: Proceedings of the 20th ACM SIGPLAN International Conference on Functional ProgrammingThis paper presents a formalized framework for defining corecursive functions safely in a total setting, based on corecursion up-to and relational parametricity. The end product is a general corecursor that allows corecursive (and even recursive) calls ...
A Formalization and Proof Checker for Isabelle’s Metalogic
AbstractIsabelle is a generic theorem prover with a fragment of higher-order logic as a metalogic for defining object logics. Isabelle also provides proof terms. We formalize this metalogic and the language of proof terms in Isabelle/HOL, define an ...
Mechanised Assessment of Complex Natural-Language Arguments Using Expressive Logic Combinations
Frontiers of Combining SystemsAbstractWe present and illustrate an approach to combining logics based on shallow semantical embeddings, a technique that harnesses the high expressive power of classical higher-order logic (HOL) as a meta-language in order to embed the syntax and ...






Comments