# QPC: QJ-based proof compiler -simple examples and analysis-

## Abstract

This paper presents a formulation of program extraction system from constructive proofs. It is designed as a simple system and is very similar to the ordinary Gentzen style of natural deduction as compared to other constructive logics to clarify the relationship between constructive proofs and programs. Proofs and λ-expressions are regarded as different things, and they are linked by the notion of proof compilation based on realizability.

The program extraction algorithm is given explicitly, and two simple examples, simulation of course of value induction by mathematical induction and, by using this as a user-defined rule of inference, extraction of a gcd program, are investigated to check how the well known method of proof normalisation works as an optimisation technique and what kinds of inefficiency remain after the proof normalisation. Subtle points about the execution of extracted codes are also discussed. Finally, modified V-code is introduced as an easy but powerful optimisation technique,

## References

- [Constable 86]Constable, R. L. et al., “
*Implementing Mathematics with the Nuprl Proof Development System*”, Prentice-Hall, 1986Google Scholar - [Coquand 85]Coquand. T, and Huet. G, “Constructions: A Higher Order Proof System for Mechanizing Mathematics”,
*EUROCAL*85, Linz, Austria, 1985Google Scholar - [Hayashi 87]Hayashi, S. and Nakano, H., “
**PX**:*A Computational Logic*”, RIMS-573, Research Institute for Mathematical Sciences, Kyoto University, 1987Google Scholar - [Martin-Löf 84]Martin-Löf, P., “
*Intuitionistic Type Theory*”, Bibliopolis, Napoli, 1984Google Scholar - [Prawitz 65]Prawitz, D., “
*Natural Deduction*”, Almqvist & Wiksell, 1965Google Scholar - [Sato 85]Sato, M., “
*Typed Logical Calculus*”, TR-85-13, Department of Computer Science, University of Tokyo, 1985Google Scholar - [Sato 87]Sato, M., “
**Quty**: A Concurrent Language Based on Logic and Function”,*Proceedings of the Fourth International Conference on Logic Programming*, Melbourne, 1987Google Scholar - [Troelstra 73]A. S. Troelstra, “Mathematical Investigation of Intuitionistic Arithmetic and Analysis”,
*Lecture Notes in Mathematics Vol*. 344, Springer-Verlag, 1973Google Scholar