449 research outputs found
Nested Term Graphs (Work In Progress)
We report on work in progress on 'nested term graphs' for formalizing
higher-order terms (e.g. finite or infinite lambda-terms), including those
expressing recursion (e.g. terms in the lambda-calculus with letrec). The idea
is to represent the nested scope structure of a higher-order term by a nested
structure of term graphs.
Based on a signature that is partitioned into atomic and nested function
symbols, we define nested term graphs both in a functional representation, as
tree-like recursive graph specifications that associate nested symbols with
usual term graphs, and in a structural representation, as enriched term graph
structures. These definitions induce corresponding notions of bisimulation
between nested term graphs. Our main result states that nested term graphs can
be implemented faithfully by first-order term graphs.
keywords: higher-order term graphs, context-free grammars, cyclic
lambda-terms, higher-order rewrite systemsComment: In Proceedings TERMGRAPH 2014, arXiv:1505.0681
Term Graph Representations for Cyclic Lambda-Terms
We study various representations for cyclic lambda-terms as higher-order or
as first-order term graphs. We focus on the relation between
`lambda-higher-order term graphs' (lambda-ho-term-graphs), which are
first-order term graphs endowed with a well-behaved scope function, and their
representations as `lambda-term-graphs', which are plain first-order term
graphs with scope-delimiter vertices that meet certain scoping requirements.
Specifically we tackle the question: Which class of first-order term graphs
admits a faithful embedding of lambda-ho-term-graphs in the sense that: (i) the
homomorphism-based sharing-order on lambda-ho-term-graphs is preserved and
reflected, and (ii) the image of the embedding corresponds closely to a natural
class (of lambda-term-graphs) that is closed under homomorphism?
We systematically examine whether a number of classes of lambda-term-graphs
have this property, and we find a particular class of lambda-term-graphs that
satisfies this criterion. Term graphs of this class are built from application,
abstraction, variable, and scope-delimiter vertices, and have the
characteristic feature that the latter two kinds of vertices have back-links to
the corresponding abstraction.
This result puts a handle on the concept of subterm sharing for higher-order
term graphs, both theoretically and algorithmically: We obtain an easily
implementable method for obtaining the maximally shared form of
lambda-ho-term-graphs. Also, we open up the possibility to pull back properties
from first-order term graphs to lambda-ho-term-graphs. In fact we prove this
for the property of the sharing-order successors of a given term graph to be a
complete lattice with respect to the sharing order.
This report extends the paper with the same title
(http://arxiv.org/abs/1302.6338v1) in the proceedings of the workshop TERMGRAPH
2013.Comment: 35 pages. report extending proceedings article on arXiv:1302.6338
(changes with respect to version v2: added section 8, modified Proposition
2.4, added Remark 2.5, added Corollary 7.11, modified figures in the
conclusion
A HOL basis for reasoning about functional programs
Domain theory is the mathematical theory underlying denotational semantics. This thesis presents a formalization of domain theory in the Higher Order Logic (HOL) theorem proving system along with a mechanization of proof functions and other tools to support reasoning about the denotations of functional programs. By providing a fixed point operator for functions on certain domains which have a special undefined (bottom) element, this extension of HOL supports the definition of recursive functions which are not also primitive recursive. Thus, it provides an approach to the long-standing and important problem of defining non-primitive recursive functions in the HOL system. Our philosophy is that there must be a direct correspondence between elements of complete partial orders (domains) and elements of HOL types, in order to allow the reuse of higher order logic and proof infrastructure already available in the HOL system. Hence, we are able to mix domain theoretic reasoning with reasoning in the set theoretic HOL world to advantage, exploiting HOL types and tools directly. Moreover, by mixing domain and set theoretic reasoning, we are able to eliminate almost all reasoning about the bottom element of complete partial orders that makes the LCF theorem prover, which supports a first order logic of domain theory, difficult and tedious to use. A thorough comparison with LCF is provided. The advantages of combining the best of the domain and set theoretic worlds in the same system are demonstrated in a larger example, showing the correctness of a unification algorithm. A major part of the proof is conducted in the set theoretic setting of higher order logic, and only at a late stage of the proof domain theory is introduced to give a recursive definition of the algorithm, which is not primitive recursive. Furthermore, a total well-founded recursive unification function can be defined easily in pure HOL by proving that the unification algorithm (defined in domain theory) always terminates; this proof is conducted by a non-trivial well-founded induction. In such applications, where non-primitive recursive HOL functions are defined via domain theory and a proof of termination, domain theory constructs only appear temporarily
A Bi-Directional Refinement Algorithm for the Calculus of (Co)Inductive Constructions
The paper describes the refinement algorithm for the Calculus of
(Co)Inductive Constructions (CIC) implemented in the interactive theorem prover
Matita. The refinement algorithm is in charge of giving a meaning to the terms,
types and proof terms directly written by the user or generated by using
tactics, decision procedures or general automation. The terms are written in an
"external syntax" meant to be user friendly that allows omission of
information, untyped binders and a certain liberal use of user defined
sub-typing. The refiner modifies the terms to obtain related well typed terms
in the internal syntax understood by the kernel of the ITP. In particular, it
acts as a type inference algorithm when all the binders are untyped. The
proposed algorithm is bi-directional: given a term in external syntax and a
type expected for the term, it propagates as much typing information as
possible towards the leaves of the term. Traditional mono-directional
algorithms, instead, proceed in a bottom-up way by inferring the type of a
sub-term and comparing (unifying) it with the type expected by its context only
at the end. We propose some novel bi-directional rules for CIC that are
particularly effective. Among the benefits of bi-directionality we have better
error message reporting and better inference of dependent types. Moreover,
thanks to bi-directionality, the coercion system for sub-typing is more
effective and type inference generates simpler unification problems that are
more likely to be solved by the inherently incomplete higher order unification
algorithms implemented. Finally we introduce in the external syntax the notion
of vector of placeholders that enables to omit at once an arbitrary number of
arguments. Vectors of placeholders allow a trivial implementation of implicit
arguments and greatly simplify the implementation of primitive and simple
tactics
Formalizing the Metatheory of Logical Calculi and Automatic Provers in Isabelle/HOL (Invited Talk)
International audienceIsaFoL (Isabelle Formalization of Logic) is an undertaking that aims at developing formal theories about logics, proof systems, and automatic provers, using Isabelle/HOL. At the heart of the project is the conviction that proof assistants have become mature enough to actually help researchers in automated reasoning when they develop new calculi and tools. In this paper, I describe and reflect on three verification subprojects to which I contributed: a first-order resolution prover, an imperative SAT solver, and generalized term orders for λ-free higher-order logic
- …