Abstract
We propose a new approach to the computer-assisted verification of functional programs. We work in first order theories of functional programs which are obtained by extending Aczel’s first order theory of combinatory formal arithmetic with positive inductive and coinductive predicates. Rather than building a special purpose system we implement our theories in Agda, a proof assistant for dependent type theory which can be used as a generic theorem prover. Agda provides support for interactive reasoning by encoding first order theories using the formulae-as-types principle. Further support is provided by off-the-shelf automatic theorem provers for first order logic which can be called by a program which translates Agda representations of first order formulae into the TPTP language understood by the provers. We show some examples where we combine interactive and automatic reasoning, covering both proof by induction and coinduction.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Abel, A., Coquand, T., Norell, U.: Connecting a Logical Framework to a First-Order Logic Prover. In: Gramlich, B. (ed.) FroCos 2005. LNCS (LNAI), vol. 3717, pp. 285–301. Springer, Heidelberg (2005)
Aczel, P.: An introduction to inductive definitions. In: Barwise, J. (ed.) Handbook of Mathematical Logic, pp. 739–782. North-Holland Publishing Company (1977)
Aczel, P.: The strength of Martin-Löf’s intuitionistic type theory with one universe. In: Miettinen, S., Väänanen, J. (eds.) Proc. of the Symposium on Mathematical Logic (Oulu, 1974). Report No. 2, Department of Philosopy, pp. 1–32. University of Helsinki, Helsinki (1977)
Aczel, P.: Frege structures and the notions of proposition, truth and set. In: Barwise, J., et al. (eds.) The Kleene Symposium, pp. 31–59. North-Holland, Amsterdan (1980)
Benl, H., et al.: Proof theory at work: Program development in the Minlog system. In: Bibel, W., et al. (eds.) Automated Deduction, vol. II, pp. 41–71. Kluwer Academic Publishers (1998)
Bove, A., Capretta, V.: Modelling general recursion in type theory. Math. Struct. in Comp. Science 15, 671–708 (2005)
Bove, A., Dybjer, P., Sicard-Ramírez, A.: Embedding a Logical Theory of Constructions in Agda. In: PLPV 2009, pp. 59–66 (2009)
Boyer, R.S., Kaufmann, M., Moore, J.S.: The Boyer-Moore theorem prover and its interactive enhancement. Computers & Mathematics with Applications 29(2), 27–62 (1995)
Dybjer, P.: Program Verification in a Logical Theory of Constructions. In: Jouannaud, J.-P. (ed.) FPCA 1985. LNCS, vol. 201, pp. 334–349. Springer, Heidelberg (1985)
Dybjer, P.: Comparing integrated and external logics of functional programs. Science of Computer Programming 14, 59–79 (1990)
Dybjer, P., Sander, H.P.: A functional programming approach to the specification and verification of concurrent systems. Formal Aspects of Computing 1, 303–319 (1989)
Gardner, P.: Representing Logics in Type Theory. Ph.D. thesis. University of Edinburgh, Department of Computer Science (1992)
Gordon, M., Wadsworth, C.P., Milner, R.: Edinburgh LCF. LNCS, vol. 78. Springer, Heidelberg (1979)
Harper, R., Honsell, F., Plotkin, G.: A framework for defining logics. JACM 40(1), 143–184 (1993)
Harrison, W.L., Kieburtz, R.B.: The logic of demand in Haskell. Journal of Functional Programming 15(6), 837–891 (2005)
Krauss, A.: Partial and nested recursive function definitions in higher-order logic. Journal of Automated Reasoning 44(4), 303–336 (2010)
Lindblad, F., Benke, M.: A Tool for Automated Theorem Proving in Agda. In: Filliâtre, J.-C., Paulin-Mohring, C., Werner, B. (eds.) TYPES 2004. LNCS, vol. 3839, pp. 154–169. Springer, Heidelberg (2006)
Martin-Löf, P.: Hauptsatz for the intuitionistic theory of iterated inductive definitions. In: Fenstad, J.E. (ed.) Proceedings of the Second Scandinavian Logic Symposium, pp. 179–216. North-Holland Publishing Company (1971)
Meng, J., Quigley, C., Paulson, L.C.: Automation for interactive proof: First prototype. Information and Computation 204(10), 1575–1596 (2006)
de Mol, M., van Eekelen, M., Plasmeijer, R.: Theorem Proving for Functional Programmers. Sparkle: A Functional Theorem Prover. In: Arts, T., Mohnen, M. (eds.) IFL 2001. LNCS, vol. 2312, pp. 55–71. Springer, Heidelberg (2002)
Park, D.: Finitess is mu-ineffable. Theoretical Computer Science 3, 173–181 (1976)
Paulson, L.C.: Isabelle. A Generic Theorem Prover. LNCS, vol. 828. Springer, Heidelberg (1994) (With a contribution by T. Nipkow)
Peyton Jones, S. (ed.): Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press (2003)
Plotkin, G.: LCF considered as a programming language. Theoretical Computer Science 5(3), 223–255 (1997)
Smith, J.: An interpretation of Martin-Löf’s type theory in a type-free theory of propositions. The Journal of Symbolic Logic 49(3), 730–753 (1984)
Sutcliffe, G.: The TPTP problem library and associated infrastructure. The FOT and CNF parts, v.3.5.0. Journal of Automated Reasoning 43(4), 337–362 (2009)
Tammet, T., Smith, J.M.: Optimized Encodings of Fragments of Type Theory in First Order Logic. In: Berardi, S., Coppo, M. (eds.) TYPES 1995. LNCS, vol. 1158, pp. 265–287. Springer, Heidelberg (1996)
The Agda development team: The Agda Wiki (2011), http://wiki.portal.chalmers.se/agda
The Nuprl development team: PRL Project (2011), http://www.cs.cornell.edu/info/projects/nuprl/
Turner, D.: An overview of Miranda. SIGPLAN Notices 21, 158–166 (1986)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bove, A., Dybjer, P., Sicard-Ramírez, A. (2012). Combining Interactive and Automatic Reasoning in First Order Theories of Functional Programs. In: Birkedal, L. (eds) Foundations of Software Science and Computational Structures. FoSSaCS 2012. Lecture Notes in Computer Science, vol 7213. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-28729-9_7
Download citation
DOI: https://doi.org/10.1007/978-3-642-28729-9_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-28728-2
Online ISBN: 978-3-642-28729-9
eBook Packages: Computer ScienceComputer Science (R0)