Changing Data Structures in Type Theory: A Study of Natural Numbers

  • Nicolas Magaud
  • Yves Bertot
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2277)


In type-theory based proof systems that provide inductive structures, computation tools are automatically associated to inductive definitions. Choosing a particular representation for a given concept has a strong influence on proof structure. We propose a method to make the change from one representation to another easier, by systematically translating proofs from one context to another. We show how this method works by using it on natural numbers, for which a unary representation (based on Peano axioms) and a binary representation are available. This method leads to an automatic translation tool that we have implemented in Coq and successfully applied to several arithmetical theorems.


Type Theory Binary Representation Recursion Operator Inductive Type Induction Principle 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Penny Anderson. Representing proof transformations for program optimization. In International Conference on Automated Deduction, LNAI 814, Springer-Verlag, 1994.Google Scholar
  2. 2.
    Antonia Balaa and Yves Bertot. Fix-point equations for well-founded recursion in type theory. In Harrison and Aagaard [9], pages 1–16.Google Scholar
  3. 3.
    B. Barras, S. Boutin, C. Cornes, J. Courant, J.C. Filliâtre, E. Giménez, H. Herbelin, G. Huet, C. Muñoz, C. Murthy, C. Parent, C. Paulin, A. Saϊbi, and B. Werner. The Coq Proof Assistant Reference Manual-Version V6.1. Technical Report 0203, INRIA, August 1997. revised version distributed with Coq.Google Scholar
  4. 4.
    S. Boutin. Using reflection to build efficient and certified decision procedures. In Martin Abadi and Takahashi Ito, editors, TACS’97, LNCS 1281, Springer-Verlag, 1997.Google Scholar
  5. 5.
    Yann Coscoy. A natural language explanation for formal proofs. In Christian Rétoré, editor, Logical Aspects of Computational Linguistics, LNAI 1328, Springer-Verlag, 1996.Google Scholar
  6. 6.
    Ewen Denney. A prototype proof translator from HOL to Coq. In Harrison and Aagaard [9], pages 108–125.Google Scholar
  7. 7.
    Amy P. Felty and Douglas J. Howe. Hybrid interactive theorem proving using nuprl and hol. In International Conference on Automated Deduction, number 1249 in LNAI. Springer-Verlag, 1997.Google Scholar
  8. 8.
    H. Geuvers, F. Wiedijk, and J. Zwanenburg. Equational reasoning via partial reflection. In Harrison and Aagaard [9], pages 163–179.Google Scholar
  9. 9.
    J. Harrison and M. Aagaard, editors. Theorem Proving in Higher Order Logics: 13th International Conference, TPHOLs 2000, LNCS 1869, Springer-Verlag, 2000.Google Scholar
  10. 10.
    Peter Madden. The specialization and transformation of constructive existence proofs. In N.S. Sridharan, editor, Proceedings of the Eleventh International Joint Conference on Artificial Intelligence, pages 131–148. Morgan Kaufmann, 1989.Google Scholar
  11. 11.
    Lena Magnusson. The Implementation of ALF-a Proof Editor based on Martin-Löf’ s Monomorphic Type Theory with Explicit Substitutions. PhD thesis, Chalmers University of Technology / Göteborg University, 1995.Google Scholar
  12. 12.
    Conor McBride. Dependently Typed Functional Programs and their Proofs. PhD thesis, University of Edinburgh, 1999.Google Scholar
  13. 13.
    Erica Melis and Jon Whittle. Analogy in inductive theorem proving. Journal of Automated Reasoning, 22:117–147, 1999.zbMATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    Christine Paulin-Mohring. Inductive Definitions in the System Coq-Rules and Properties. In M. Bezem and J.-F. Groote, editors, Proceedings of the conference Typed Lambda Calculi and Applications, LNCS 664, Springer-Verlag, 1993. LIP research report 92–49.Google Scholar
  15. 15.
    Julian Richardson. Automating changes of data type in functional programs. In Proceedings of KBSE-95. IEEE Computer Society, 1995.Google Scholar
  16. 16.
    Simon Thompson. Type Theory and functional Programming. Addison-Wesley, 1991.Google Scholar
  17. 17.
    Philip Wadler. Views: A way for pattern matching to cohabit with data abstraction. In Proceedings, 14th Symposium on Principles of Programming Languages POPL’87. ACM, 1987.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2002

Authors and Affiliations

  • Nicolas Magaud
    • 1
  • Yves Bertot
    • 1
  1. 1.INRIA Sophia AntipolisFrance

Personalised recommendations