Combining Interactive and Automatic Reasoning in First Order Theories of Functional Programs

  • Ana Bove
  • Peter Dybjer
  • Andrés Sicard-Ramírez
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7213)


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.


Theorem Prover Type Theory Order Logic Order Theory Proof Assistant 
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.


  1. 1.
    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)CrossRefGoogle Scholar
  2. 2.
    Aczel, P.: An introduction to inductive definitions. In: Barwise, J. (ed.) Handbook of Mathematical Logic, pp. 739–782. North-Holland Publishing Company (1977)Google Scholar
  3. 3.
    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)Google Scholar
  4. 4.
    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)CrossRefGoogle Scholar
  5. 5.
    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)Google Scholar
  6. 6.
    Bove, A., Capretta, V.: Modelling general recursion in type theory. Math. Struct. in Comp. Science 15, 671–708 (2005)MathSciNetzbMATHCrossRefGoogle Scholar
  7. 7.
    Bove, A., Dybjer, P., Sicard-Ramírez, A.: Embedding a Logical Theory of Constructions in Agda. In: PLPV 2009, pp. 59–66 (2009)Google Scholar
  8. 8.
    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)MathSciNetCrossRefGoogle Scholar
  9. 9.
    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)CrossRefGoogle Scholar
  10. 10.
    Dybjer, P.: Comparing integrated and external logics of functional programs. Science of Computer Programming 14, 59–79 (1990)MathSciNetzbMATHCrossRefGoogle Scholar
  11. 11.
    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)CrossRefGoogle Scholar
  12. 12.
    Gardner, P.: Representing Logics in Type Theory. Ph.D. thesis. University of Edinburgh, Department of Computer Science (1992)Google Scholar
  13. 13.
    Gordon, M., Wadsworth, C.P., Milner, R.: Edinburgh LCF. LNCS, vol. 78. Springer, Heidelberg (1979)zbMATHCrossRefGoogle Scholar
  14. 14.
    Harper, R., Honsell, F., Plotkin, G.: A framework for defining logics. JACM 40(1), 143–184 (1993)MathSciNetzbMATHCrossRefGoogle Scholar
  15. 15.
    Harrison, W.L., Kieburtz, R.B.: The logic of demand in Haskell. Journal of Functional Programming 15(6), 837–891 (2005)MathSciNetzbMATHCrossRefGoogle Scholar
  16. 16.
    Krauss, A.: Partial and nested recursive function definitions in higher-order logic. Journal of Automated Reasoning 44(4), 303–336 (2010)MathSciNetzbMATHCrossRefGoogle Scholar
  17. 17.
    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)CrossRefGoogle Scholar
  18. 18.
    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)Google Scholar
  19. 19.
    Meng, J., Quigley, C., Paulson, L.C.: Automation for interactive proof: First prototype. Information and Computation 204(10), 1575–1596 (2006)MathSciNetzbMATHCrossRefGoogle Scholar
  20. 20.
    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)CrossRefGoogle Scholar
  21. 21.
    Park, D.: Finitess is mu-ineffable. Theoretical Computer Science 3, 173–181 (1976)MathSciNetCrossRefGoogle Scholar
  22. 22.
    Paulson, L.C.: Isabelle. A Generic Theorem Prover. LNCS, vol. 828. Springer, Heidelberg (1994) (With a contribution by T. Nipkow)zbMATHGoogle Scholar
  23. 23.
    Peyton Jones, S. (ed.): Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press (2003)Google Scholar
  24. 24.
    Plotkin, G.: LCF considered as a programming language. Theoretical Computer Science 5(3), 223–255 (1997)MathSciNetCrossRefGoogle Scholar
  25. 25.
    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)MathSciNetzbMATHCrossRefGoogle Scholar
  26. 26.
    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)zbMATHCrossRefGoogle Scholar
  27. 27.
    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)CrossRefGoogle Scholar
  28. 28.
    The Agda development team: The Agda Wiki (2011),
  29. 29.
    The Nuprl development team: PRL Project (2011),
  30. 30.
    Turner, D.: An overview of Miranda. SIGPLAN Notices 21, 158–166 (1986)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Ana Bove
    • 1
  • Peter Dybjer
    • 1
  • Andrés Sicard-Ramírez
    • 2
  1. 1.Chalmers University of TechnologyGothenburgSweden
  2. 2.EAFIT UniversityMedellínColombia

Personalised recommendations