Harrop formula#Hereditary Harrop formulae and logic programming
In intuitionistic logic, the Harrop formulae, named after Ronald Harrop, are the class of formulae inductively defined as follows:{{cite book | last = Dummett | first = Michael | authorlink = Michael Dummett|title = Elements of Intuitionism | publisher = Oxford University Press | edition = 2nd | date = 2000 | page = 227 | isbn = 0-19-850524-8 }}{{cite book |author=A. S. Troelstra |author1link = Anne Troelstra|author2link = Helmut Schwichtenberg|author2=H. Schwichtenberg | title=Basic proof theory | date=27 July 2000 | publisher = Cambridge University Press | isbn = 0-521-77911-1 }}{{cite journal | author = Ronald Harrop | year = 1956 | title = On disjunctions and existential statements in intuitionistic systems of logic | journal = Mathematische Annalen | volume = 132| issue = 4 | pages = 347–361 | doi=10.1007/BF01360048| s2cid = 120620003 }}
- Atomic formulae are Harrop, including falsity (⊥);
- is Harrop provided and are;
- is Harrop for any well-formed formula ;
- is Harrop provided is, and is any well-formed formula;
- is Harrop provided is.
By excluding disjunction and existential quantification (except in the antecedent of implication), non-constructive predicates are avoided, which has benefits for computer implementation.
Discussion
Harrop formulae are "well-behaved" also in a constructive context. For example, in Heyting arithmetic , Harrop formulae satisfy a classical equivalence not generally satisfied in constructive logic:
:
There are however -statements that are -independent, meaning these are simple statements for which excluded middle is not -provable. Indeed, while intuitionistic logic proves for any , the disjunction will not be Harrop.
Hereditary Harrop formulae and logic programming
A more complex definition of hereditary Harrop formulae is used in logic programming as a generalisation of Horn clauses, and forms the basis for the language λProlog. Hereditary Harrop formulae are defined in terms of two (sometimes three) recursive sets of formulae. In one formulation:Dov M. Gabbay, Christopher John Hogger, John Alan Robinson, Handbook of Logic in Artificial Intelligence and Logic Programming: Logic programming, Oxford University Press, 1998, p 575, {{isbn|0-19-853792-1}}
- Rigid atomic formulae, i.e. constants or formulae , are hereditary Harrop;
- is hereditary Harrop provided and are;
- is hereditary Harrop provided is;
- is hereditary Harrop provided is rigidly atomic, and is a G-formula.
G-formulae are defined as follows:
- Atomic formulae are G-formulae, including truth(⊤);
- is a G-formula provided and are;
- is a G-formula provided and are;
- is a G-formula provided is;
- is a G-formula provided is;
- is a G-formula provided is, and is hereditary Harrop.
History
Harrop formulae were introduced around 1956 by Ronald Harrop and independently by Helena Rasiowa. Variations of the fundamental concept are used in different branches of constructive mathematics and logic programming.