Elaboration and Erasure in Type Theory (original) (raw)

Partiality and recursion in interactive theorem provers – an overview

Mathematical Structures in Computer Science, 2014

The use of interactive theorem provers to establish the correctness of critical parts of a software development or for formalizing mathematics is becoming more common and feasible in practice. However, most mature theorem provers lack a direct treatment of partial and general recursive functions; overcoming this weakness has been the objective of intensive research during the last decades. In this article, we review several techniques that have been proposed in the literature to simplify the formalization of partial and general recursive functions in interactive theorem provers. Moreover, we classify the techniques according to their theoretical basis and their practical use. This uniform presentation of the different techniques facilitates the comparison and highlights their commonalities and differences, as well as their relative advantages and limitations. We focus on theorem provers based on constructive type theory (in particular, Agda and Coq) and higher-order logic (in partic...

A Generic Theorem Prover Construction Framework

Formal software engineering methodologies provide a vast array of languages for specifying correctness properties and associated tools for property verification. Unfortunately, the implementation of each verification tool requires an early commitment to a particular methodology and language, in terms of both high-level semantic concerns and low-level syntactic representation of properties and proofs. In this paper, we present Prufrock, a novel approach to constructing automated reasoning systems, which abstracts semantic concerns over entire classes of potential object languages. Prufrock is a modular, generic prover framework written in Haskell taking advantage of its type class system. It consists of a set of independent logic modules defining the semantics required for proof over entire classes of abstract syntaxes using generic programming techniques. The fundamental contribution of Prufrock is that any object language may be used for specifying and verifying properties, as long as it provides a semantics consistent with the logic modules required for a proof. The implementation details of the reasoning system thus remain independent from the structure of the specification language. This facilitates large-scale reuse of logics as well as tacticals and proofs themselves when constructing or retargeting automated reasoning tools. At the same time, Prufrock aids in closing the gap between an object language and verification of objects written in it by operating on its abstract syntax directly rather than transforming it into a separate theorem proving language. * This material is based upon work supported by the United States National Science Foundation under Grant Nos. 0209193 and 0350425 † This work was completed while a student in the System-Level Design Group at The University of Kansas properties, and axioms used in the verification process. Inference and proof are carried out by manipulating this syntax in a logically sound fashion. Unfortunately, this approach can be a serious hindrance to modularity and reuse due to the tight coupling between abstract syntax and the proof techniques used to manipulate it.

A Generic Modular Data Structure for Proof Attempts Alternating on Ideas and Granularity

2005

A practically useful mathematical assistant system requires the sophisticated combination of interaction and automation. Central in such a system is the proof data structure, which has to maintain the current proof state and which has to allow the flexible interplay of various components including the human user. We describe a parameterized proof data structure for the management of proofs, which includes our experience with the development of two proof assistants. It supports and bridges the gap between abstract level proof explanation and low-level proof verification. The proof data structure enables, in particular, the flexible handling of lemmas, the maintenance of different proof alternatives, and the representation of different granularities of proof attempts.

On the Proof Theory of Program Transformations

Logic Journal of IGPL, 1995

We provide an intensional semantics for certain elementary program transformations by describing a translation from these transformations to the derivations of a simple theory of operations and types and we show that this semantics is intensionally faithful. Our objective is to understand more precisely the intensional structure of a class of semi-formal program derivations.

An Emacs-Interface for Type-Directed Support for Constructing Proofs and Programs.

ENTCS, 2006

This paper presents an emacs interface for an interactive editor for proofs and programs. The interface allows for editing proofs in the same way as we write programs, but in addition offers commands that help term construction. It differs from most other proof editors for its support for direct construction of terms rather than tactics for building them.

Programming with proofs and explicit contexts

Proceedings of the 10th international ACM SIGPLAN symposium on Principles and practice of declarative programming - PPDP '08, 2008

This paper explores a new point in the design space of functional programming: functional programming with dependently-typed higher-order data structures described in the logical framework LF. This allows us to program with proofs as higher-order data. We present a decidable bidirectional type system that distinguishes between dependentlytyped data and computations. To support reasoning about open data, our foundation makes contexts explicit. This provides us with a concise characterization of open data, which is crucial to elegantly describe proofs. In addition, we present an operational semantics for this language based on higher-order pattern matching for dependently typed objects. Based on this development, we prove progress and preservation.

Eliminating Proofs from Programs

Electronic Notes in Theoretical Computer Science, 2002

This paper presents a step in the development of an operational approach to program extraction in type theory. In order to get a program from a lambda term, the logical parts need to be removed. This is done by a reduction relation →. We study the combination of β-reduction and-reduction, both in the setting of simply typed lambda calculus and for pure type systems. In the general setting the properties confluence, subject reduction, and strong normalization are studied.

Taclets: A new paradigm for constructing interactive theorem provers

2004

Frameworks for interactive theorem proving give the user explicit control over the construction of proofs based on meta languages that contain dedicated control structures for describing proof construction. Such languages are not easy to master and thus contribute to the already long list of skills required by prospective users of interactive theorem provers. Most users, however, only need a convenient formalism that allows to introduce new rules with minimal overhead. On the the other hand, rules of calculi have not only purely logical content, but contain restrictions on the expected context of rule applications and heuristic information. We suggest a new and minimalist concept for implementing interactive theorem provers called taclet. Their usage can be mastered in a matter of hours, and they are efficiently compiled into the GUI of a prover. We implemented the KeY system, an interactive theorem prover for the full JAVA CARD language based on taclets.

An Evaluation Based Theorem Prover

IEEE Transactions on Pattern Analysis and Machine Intelligence, 2000

A noninductive method for mechanical theorem proving is presented, which deals with a recursive class of theorems involving iterative functions and predicates. The method is based on the symbolic evaluation of the formula to be proved and requires no inductive step. Induction is avoided since a metatheorem is proved which establishes the conditions on the evaluation of any formula which are sufficient to assure that the formula actually holds. The proof of a supposed theorem consists in evaluating the formula and checking the conditions. The method applies to assertions that involve element-byelement checking of typed homogeneous sequences which are hierarchically constructed out of the primitive type consisting of the truth values. The sequences can be computed by means of iterative and "accumulator" functions. The paper includes the definition of a simple typed iterative language in which both predicates and functions are expressed. The language precisely defines the scope of the proof method. The method proves a wide variety of theorem$ about iterative functions on sequences, including that which states that REVERSE is its own inverse, and that it can be inversely distributed on APPEND, that FLATTEN can be distributed on APPEND and that each element of any sequence is a MEMBER of the sequence itself. Although the method is not complete, it does provide the basis for an extremely efficient tool to be used in a complete mechanical theorem prover. Index Terms-Function behavior estimate, hierarchical lemma generation, inductionless proofs, iterative functions, mechanical theorem proving, program properties, symbolic computation.