Mathematical Studies of Information Processing pp 576-629 | Cite as

# Recursive programs as functions in a first order theory

## Abstract

Pure Lisp style recursive function programs are represented in a new way by sentences and schemata of first order logic. This permits easy and natural proofs of extensional properties of such programs by methods that generalize structural induction. It also systematizes known methods such as *recursion induction, subgoal induction, inductive assertions* by interpreting them as first order axiom schemata. We discuss the metatheorems justifying the representation and techniques for proving facts about specific programs. We also give a simpler version of the Gödel-Kleene way of representing computable functions by first order sentences.

Robert Cartwright's current address is Department of Computer Science, Upson Hall, Cornell University, Ithaca, NY 14853. John McCarthy's current address is Department of Computer Science, Stanford University, Stanford, CA 94305.

## Keywords

Order Logic Extensional Property Data Domain Axiom Schema Conditional Expression## Preview

Unable to display preview. Download preview PDF.

## 14. References

- Bochvar, D.A. (1938): "On a three-valued logical calculus and its application to the analysis of contradictions",
*Recueil Mathematique*, N.S. 4 pp. 287–308.Google Scholar - Bochvar, D.A. (1943): "On the consistency of a three-valued logical calculus",
*Recueil Mathematique*, N.S. 12, pp. 353–369.Google Scholar - The above Russian language papers by Bochvar are available in English translation asGoogle Scholar
- Bochvar, D.A. (1972):
*Two papers on partial predicate calculus*, Stanford Artificial Intelligence Memo 165, Computer Science Department, Stanford University, Stanford, CA 94305. (Also available from NTIS).Google Scholar - Cartwright, R.S. (1976):
*A Practical Formal Semantic Definition and Verification System for Typed Lisp*, Ph.D. Thesis, Computer Science Department, Stanford University, Stanford, California.Google Scholar - Cartwright, R. (1978):
*First Order Semantics: A Natural Programming Logic for Recursively Defined Functions*, Cornell University Computer Science Department Technical Report TR 78-339, Ithaca, New York.Google Scholar - Cartwright, Robert and John McCarthy (1979): "First Order Programming Logic", paper presented at the sixth annual ACM Symposium on Principles of Programming Languages (POPL), San Antonio, Texas. Available from ACM.Google Scholar
- Cohen, Paul (1966):
*Set Theory and the Continuum Hypothesis*, W.A. Benjamin Inc.Google Scholar - Cooper, D.C. (1969): "Program Scheme Equivalences and Second-order Logic", in B. Meltzer and D. Michie (eds.),
*Machine Intelligence*, Vol. 4, pp. 3–15, Edinburgh University Press, Edinburgh.Google Scholar - Friedman, Daniel and David Wise (1976): "Cons should not Evaluate Its Arguments", in
*Proc. 3rd Intl. Colloq. on Automata, Languages and Programming*, Edinburgh Univ. Press, Edinburgh.Google Scholar - Hitchcock, P. and D. Park (1973): "Induction Rules and Proofs of Program Termination, in M. Nivat (ed.),
*Automata, Languages and Programming*, pp. 225–251, North-Holland, Amsterdam.Google Scholar - Kleene, S.C. (1952):
*Introduction to Metamathematics*, Van Nostrand, New York.Google Scholar - Luckham, D.C., D.M.R. Park, and M.S. Paterson (1970): "On Formalized Computer Programs",
*J. CSS*, 4(3): 220–249 (June).Google Scholar - Manna, Zohar and Amir Pnueli (1970): "Formalization of the Properties of Functional Programs",
*J. ACM*, 17(3): 555–569.Google Scholar - Manna, Zohar (1974):
*Mathematical Theory of Computation*, McGraw-Hill.Google Scholar - Manna, Zohar, Stephen Ness and Jean Vuillemin (1973): "Inductive Methods for Proving Properties of Programs",
*Comm. ACM*, 16(8): 491–502 (August).Google Scholar - McCarthy, John (1963): "A Basis for a Mathematical Theory of Computation", in P. Braffort and D. Hirschberg (eds.),
*Computer Programming and Formal Systems*, pp. 33–70. North-Holland Publishing Company, Amsterdam.Google Scholar - McCarthy, John (1964):
*Predicate Calculus with "Undefined" as a Truth Value*, Stanford Artificial Intelligence Memo 1, Computer Science Department, Stanford University.Google Scholar - McCarthy, John (1978): "Representation of Recursive Programs in First Order Logic", in E.K. Blum and S. Takasu (eds.)
*Proceedings of The International Conference on Mathematical Studies of Information Processing*, Kyoto. (a preliminary and superseded version of this paper)Google Scholar - McCarthy, John and Carolyn Talcott (1979):
*LISP: Programming and Proving*, (in preparation)Google Scholar - Morris, James H. (1968):
*Lambda Calculus Models of Programming Languages*. Ph.D. Thesis, M.I.T., Cambridge, Mass.Google Scholar - Morris, James H., and Ben Wegbreit (1977): "Program Verification by Subgoal Induction",
*Comm. ACM*, 20(4): 209–222 (April).Google Scholar - Oppen, Derek (1978):
*Reasoning about Recursively Defined Data Structures*, Stanford Artificial Intelligence Memo 314, Computer Science Department, Stanford University.Google Scholar - Paris, Jeff and Leo Harrington (1977): "A Mathematical Incompleteness in Peano Arithmetic", in Jon Barwise (ed.),
*Handbook of Mathematical Logic*, pp. 1133–1142. North-Holland Publishing Company, Amsterdam.Google Scholar - Park, David (1970): Fixpoint Induction and Proofs of Program Properties", in
*Machine Intelligence*5, pp. 59–78, Edinburgh University Press, Edinburgh.Google Scholar - Scott, Dana (1970):
*Outline of a Mathematical Theory of Computation*. Programming Research Group Monograph No. 2, Oxford.Google Scholar - Takeuchi, I. (1978): Personal Communication.Google Scholar
- Vuillemin, J. (1973):
*Proof Techniques for Recursive Programs*, Ph.D. Thesis, Stanford University, Stanford, Calif.Google Scholar