scholarly journals A HOL Basis for Reasoning about Functional Programs

1994 ◽  
Vol 1 (44) ◽  
Author(s):  
Sten Agerholm

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.<br /> <br />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.<br /> <br />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.

1995 ◽  
Vol 2 (36) ◽  
Author(s):  
Sten Agerholm

This paper presents an approach to the problem of introducing<br />non-primitive recursive function definitions in higher order logic. A<br />recursive specification is translated into a domain theory version, where<br />the recursive calls are treated as potentially non-terminating. Once we<br />have proved termination, the original specification can be derived easily.<br />A collection of algorithms are presented which hide the domain theory<br />from a user. Hence, the derivation of a domain theory specification<br />has been automated completely, and for well-founded recursive function<br />specifications the process of deriving the original specification from the<br />domain theory one has been automated as well, though a user must<br />supply a well-founded relation and prove certain termination properties<br />of the specification. There are constructions for building well-founded<br />relations easily.


10.29007/6shf ◽  
2018 ◽  
Author(s):  
Jasmin Christian Blanchette

Nitpick is a counterexample generator for Isabelle/HOL that builds on Kodkod, a SAT-based first-order relational model finder. Nitpick supports unbounded quantification, (co)inductive predicates and datatypes, and (co)recursive functions. Fundamentally a finite model finder, it approximates infinite types by finite subsets. Our experimental results on Isabelle theories and the TPTP library indicate that Nitpick generates more counterexamples than other model finders for higher-order logic, without restrictions on the form of the formulas to falsify.


10.29007/zpg2 ◽  
2018 ◽  
Author(s):  
Alexander Leitsch ◽  
Tomer Libal

The efficiency of the first-order resolution calculus is impaired when lifting it to higher-order logic. The main reason for that is the semi-decidability and infinitary natureof higher-order unification algorithms, which requires the integration of unification within the calculus and results in a non-efficient search for refutations.We present a modification of the constrained resolution calculus (Huet'72) which uses an eager unification algorithm while retaining completeness. Thealgorithm is complete with regard to bounded unification only, which for many cases, does not pose a problem in practice.


2016 ◽  
Vol 27 (8) ◽  
pp. 1364-1385
Author(s):  
ULRICH BERGER ◽  
TIE HOU

We give a realizability interpretation of an intuitionistic version of Church's Simple Theory of Types (CST) which can be viewed as a formalization of intuitionistic higher-order logic. Although definable in CST we include operators for monotone induction and coinduction and provide simple realizers for them. Realizers are formally represented in an untyped lambda–calculus with pairing and case-construct. The purpose of this interpretation is to provide a foundation for the extraction of verified programs from formal proofs as an alternative to type-theoretic systems. The advantages of our approach are that (a) induction and coinduction are not restricted to the strictly positive case, (b) abstract mathematical structures and results may be imported, (c) the formalization is technically simpler than in other systems, for example, regarding the definition of realizability, which is a simple syntactical substitution, and the treatment of nested and simultaneous (co)inductive definitions.


2018 ◽  
Vol 47 (3) ◽  
Author(s):  
María Manzano ◽  
Manuel Crescencio Moreno

This article is a continuation of our promenade along the winding roads of identity, equality, nameability and completeness. We continue looking for a place where all these concepts converge. We assume that identity is a binary relation between objects while equality is a symbolic relation between terms. Identity plays a central role in logic and we have looked at it from two different points of view. In one case, identity is a notion which has to be defined and, in the other case, identity is a notion used to define other logical concepts. In our previous paper, [16], we investigated whether identity can be introduced by definition arriving to the conclusion that only in full higher-order logic with standard semantics a reliable definition of identity is possible. In the present study we have moved to modal logic and realized that here we can distinguish in the formal language between two different equality symbols, the first one shall be interpreted as extensional genuine identity and only applies for objects, the second one applies for non rigid terms and has the characteristic of synonymy. We have also analyzed the hybrid modal logic where we can introduce rigid terms by definition and can express that two worlds are identical by using the nominals and the @ operator. We finish our paper in the kingdom of identity where the only primitives are lambda and equality. Here we show how other logical concepts can be defined in terms of the identity relation. We have found at the end of our walk a possible point of convergence in the logic Equational Hybrid Propositional Type Theory (EHPTT), [14] and [15].


1993 ◽  
Vol 3 (2) ◽  
pp. 123-152 ◽  
Author(s):  
John Hannan

AbstractWe extend the definition of natural semantics to include simply typed λ-terms, instead of first-order terms, for representing programs, and to include inference rules for the introduction and discharge of hypotheses and eigenvariables. This extension, which we call extended natural semantics, affords a higher-level notion of abstract syntax for representing programs and suitable mechanisms for manipulating this syntax. We present several examples of semantic specifications for a simple functional programming language and demonstrate how we achieve simple and elegant manipulations of bound variables in functional programs. All the examples have been implemented and tested in λProlog, a higher-order logic programming language that supports all of the features of extended natural semantics.


Sign in / Sign up

Export Citation Format

Share Document