A Formalization of Polytime Functions

  • Sylvain Heraud
  • David Nowak
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6898)


We present a deep embedding of Bellantoni and Cook’s syntactic characterization of polytime functions. We prove formally that it is correct and complete with respect to the original characterization by Cobham that required a bound to be proved manually. Compared to the paper proof by Bellantoni and Cook, we have been careful in making our proof fully contructive so that we obtain more precise bounding polynomials and more efficient translations between the two characterizations. Another difference is that we consider functions on bitstrings instead of functions on positive integers. This latter change is motivated by the application of our formalization in the context of formal security proofs in cryptography. Based on our core formalization, we have started developing a library of polytime functions that can be reused to build more complex ones.


implicit computational complexity cryptography 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Avanzini, M., Moser, G.: Complexity Analysis by Rewriting. In: Garrigue, J., Hermenegildo, M.V. (eds.) FLOPS 2008. LNCS, vol. 4989, pp. 130–146. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  2. 2.
    Arai, T., Eguchi, N.: A new function algebra of EXPTIME functions by safe nested recursion. In: ACM Transactions on Computational Logic, vol. 10(4). ACM, New York (2009)Google Scholar
  3. 3.
    Backes, M., Berg, M., Unruh, D.: A formal language for cryptographic pseudocode. In: Cervesato, I., Veith, H., Voronkov, A. (eds.) LPAR 2008. LNCS (LNAI), vol. 5330, pp. 353–376. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  4. 4.
    Barthe, G., Grégoire, B., Zanella Béguelin, S.: Formal certification of code-based cryptographic proofs. In: Proceedings of the 36th ACM SIGPLAN- SIGACT Symposium on Principles of Programming Languages (POPL 2009), pp. 90–101. ACM, New York (2009)Google Scholar
  5. 5.
    Bellantoni, S.: Predicative Recursion and Computational Complexity. PhD Thesis, University of Toronto (1992)Google Scholar
  6. 6.
    Bellantoni, S., Cook, S.A.: A new recursion-theoretic characterization of the polytime functions. Computational Complexity 2, 97–110 (1992)MathSciNetCrossRefMATHGoogle Scholar
  7. 7.
    Bellare, M., Rogaway, P.: The security of triple encryption and a framework for code-based game-playing proofs. In: Vaudenay, S. (ed.) EUROCRYPT 2006. LNCS, vol. 4004, pp. 409–426. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  8. 8.
    Cobham, A.: The intrinsic computational difficulty of functions. In: Proceedings of the 1964 International Congress for Logic, Methodology, and the Philosophy of Science, pp. 24–30. North-Holland, Amsterdam (1964)Google Scholar
  9. 9.
    Diffie, W., Hellman, M.E.: New directions in cryptography. IEEE Transactions on Information Theory IT 22(6), 644–654 (1976)MathSciNetCrossRefMATHGoogle Scholar
  10. 10.
    Grégoire, B., Mahboubi, A.: Proving Equalities in a Commutative Ring Done Right in Coq. In: Hurd, J., Melham, T. (eds.) TPHOLs 2005. LNCS, vol. 3603, pp. 98–113. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  11. 11.
    Halevi, S.: A plausible approach to computer-aided cryptographic proofs. Cryptology ePrint Archive, Report 2005/181 (2005)Google Scholar
  12. 12.
    Hofmann, M.: Safe recursion with higher types and BCK-algebra. Annals of Pure and Applied Logic 104(1-3), 113–166 (2000)MathSciNetCrossRefMATHGoogle Scholar
  13. 13.
    Leivant, D.: A foundational delineation of computational feasibility. In: Sixth Annual IEEE Symposium on Logic in Computer Science, pp. 2–11. IEEE Computer Society, Los Alamitos (1991)CrossRefGoogle Scholar
  14. 14.
    Mitchell, J.C., Mitchell, M., Scedrov, A.: A linguistic characterization of bounded oracle computation and probabilistic polynomial time. In: Proceedings of the 39th Annual Symposium on Foundations of Computer Science (FOCS 1998), pp. 725–733. IEEE Computer Society, Los Alamitos (1998)Google Scholar
  15. 15.
    Nowak, D.: A framework for game-based security proofs. In: Qing, S., Imai, H., Wang, G. (eds.) ICICS 2007. LNCS, vol. 4861, pp. 319–333. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  16. 16.
    Nowak, D., Zhang, Y.: A calculus for game-based security proofs. In: Heng, S.-H., Kurosawa, K. (eds.) ProvSec 2010. LNCS, vol. 6402, pp. 35–52. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  17. 17.
    Rose, H.E.: Subrecursion: functions and hierarchies. Oxford Logic Guides 9. Clarendon Press, Oxford (1984)Google Scholar
  18. 18.
    Shoup, V.: Sequences of games: A tool for taming complexity in security proofs. Cryptology ePrint Archive, Report 2004/332 (2004)Google Scholar
  19. 19.
    Schürmann, C., Shah, J.: Representing reductions of NP-complete problems in logical frameworks: A case study. In: Proceedings of the Eighth ACM SIGPLAN International Conference on Functional Programming, Workshop on Mechanized reasoning about languages with variable binding (MERLIN 2003). ACM, New York (2003)Google Scholar
  20. 20.
    Schürmann, C., Shah, J.: Identifying Polynomial-Time Recursive Functions. In: Ong, L. (ed.) CSL 2005. LNCS, vol. 3634, pp. 525–540. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  21. 21.
    Tourlakis, G.J.: Computability, Reston (1984)Google Scholar
  22. 22.
    Zhang, Y.: The computational SLR: a logic for reasoning about computational indistinguishability. In: Mathematical Structures in Computer Science, vol. 20, pp. 951–975. Cambridge University Press, Cambridge (2010)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Sylvain Heraud
    • 1
  • David Nowak
    • 2
  1. 1.INRIA Sophia Antipolis - MéditerranéeFrance
  2. 2.IT Strategic Planning GroupITRI, AISTJapan

Personalised recommendations