Abstract
Abstract
Fold–unfold lemmas complement the rewrite tactic in the Coq Proof Assistant to reason about recursive functions, be they defined locally or globally. Each of the structural cases gives rise to a fold–unfold lemma that equates a call to this function in that case with the corresponding case branch. As such, they are “boilerplate” and can be generated mechanically, though stating them by hand is a learning experience for a beginner, to say nothing about explaining them. Their proof is generic. Their use is precise (e.g., in terms with multiple calls) and they scale seamlessly (e.g., to continuation-passing style and to various patterns of recursion), be the reasoning equational or relational. In the author’s experience, they prove effective in the classroom, considering the clarity of discourse in the subsequent term reports and oral exams, and beyond the classroom, considering their subsequent use when continuing to work with the Coq Proof Assistant. Fold–unfold lemmas also provide a measure of understanding as well as of control about what is cut short when one uses a shortcut, i.e., an automated simplification tactic. Since Version 8.0, the functional-induction plugin provides them for functions that are defined globally, i.e., recursive equations, and so does the Equations plugin now, both for global and for local declarations, a precious help for advanced users.
Publisher
Cambridge University Press (CUP)
Reference26 articles.
1. Burstall, R. M. & Landin, P. J. (1969) Programs and their proofs: An algebraic approach. In Machine Intelligence, Meltzer, B. & Michie, D. (eds), vol. 4. Edinburgh University Press, pp. 17–43.
2. Danvy, O. & Goldberg, M. (2005) There and back again. Fundamenta Informaticae 66(4), 397–413. A preliminary version was presented at the 2002 ACM SIGPLAN International Conference on Functional Programming (ICFP 2002).
3. Gowers, T. (2000) The two cultures of mathematics. In Mathematics: Frontiers and Perspectives. AMS.
4. Certified Programming with Dependent Types
5. Rota, G.-C. (1996) Indiscrete Thoughts. Birkhaüser.
Cited by
2 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献