| | |
Summary: Extracting simple programs from second order proofs
David Albrecht 1 and John N. Crossley 2
fdwa,jncg@cs.monash.edu.au
1 Introduction
This paper forms part of a programme for extracting programs which will actually run from
mathematical proofs as written in a textbook with minimum human interaction.
We are presently concerned with arithmetic equipped with constructive (intuitionist) logic.
However, in this paper, we use second order logic. That is to say we use function variables and
quantifiers over functions.
The techniques we use follow what have become traditional lines; we use proof terms (or
Curry--Howard terms) as our starting point. We follow Crossley and Shepherdson [2] in using
the full range of connectives and rules of conventional logic rather than restricting ourselves to
a limited number of connectives as in [8] or [4].
We use conventional reduction rules for these proofterms but also introduce additional
reductions which lead to our ``simplified proofterms''. The effect of this is a very substantial
reduction in the size of the extracted programs.
As an example we exhibit a proof and the extraction of a program for the factorial function.
This program is approximately one line of characters and clearly close to a natural program for
factorial.
2 Proof terms
|