This is an old revision of the document!
Intuition for Higher-Order Logic
In first, order logic, formulas contain
- variables
- function symbols
- predicate symbols
First-order logic (FOL) is called 'first-order' because we can only quantify over variables, which are elements of the domain. We cannot quantify over interpretations of function symbols or relation symbols. In higher-order logic (HOL) we can quantify over functions and relations as well.
In FOL, we ask for satisfiability of a FOL formula, we are asking if there exist some interpretations of functions and relations for which formula evaluates to true. For example, formula \[
\forall x. \lnot R(x,f(x))
\]
is satisfiable iff there exist a relation interpreting and a function interpreting
such that for all
the pair
does not belong to interpretation. Informally, we could therefore describe satisfiability of the above formula as
\[
\exists R. \exists f. \forall x. \lnot R(x,f(x))
\] Dually, validity of the formula would correspond to the statement \[
\forall R. \forall f. \forall x. \lnot R(x,f(x))
\] The last two formulas cannot be written in FOL, because they involve quantification over functions and relations. However, these formulas can be written in HOL. Moreover, in HOL we can write more complex conditions that cannot be described directly in terms of validity or satisfiability, such as \[
\forall R. \exists f. \forall x. \lnot R(x,f(x))
\] Clearly, there are differences between functions, relations, and individuals in terms of how we can use them. For example, predicates return truth values, whereas functions return values of the domain. HOL uses a type system, similar to one in programming languages, to ensure that we construct only sensible formulas.
Multisorted FOL
A related notion to FOL and HOL is multisorted FOL, which is a FOL where variables and terms have types. The most popular version has disjoint types, given by some set of types. These types are often called sorts. Each function symbol
has arity, but the arity is not just a number, but a list of argument types and result types, that is, an expression of the form
\[
\tau_1 \times \ldots \times \tau_n \to \tau_0
\]
where are types. Similarly, each predicate symbol of
arguments has a type of the form
\[
\tau_1 \times \ldots \times \tau_n
\] We build expressions using natural typing rules, allowing application only if the types match.
Interpretation of multisorted FOL, instead of having one domain has one domain
for each type
and we typically require sets
for different
to be disjoint. Interpretation function
maps function symbol of arity
into a function
\[
D_{\tau_1} \times \ldots \times D_{\tau_n} \to D_{\tau_0}
\]
and relation symbol of sort into a subset of
\[
D_{\tau_1} \times \ldots \times D_{\tau_n}
\]
In multisorted FOL, we have disjoint countable sets of variables for each sort. We interpreted as bounded quantification
.
Relation to standard FOL:
Multisorted FOL can be represented as the standard FOL by using unary predicate for each sort
, adding axioms that these predicate interpretations are disjoint, and replacing quantification such as
with bounded quantification
\[
\forall x. P_\tau(x) \rightarrow F(x)
\]
In multisorted logic with equality, we can introduce one binary equality symbol for each sort
, whose signature is
.
In HOL we generalize the type system to have function types. This idea build on simply typed lambda calculus.