Tableaux per la Logica del Primo Ordine
Domenico Cantone
Dipartimento di Matematica e Informatica
Università di Catania
Logica Computazionale, A.A. 2006/07
Syntax and Semantics A tableau calculus for first-order logic
Outline
1 Syntax and Semantics
Syntax
Semantics
2 A tableau calculus for first-order logic
The calculus
Soundness
Completeness
Hintikka sets
Tableaux construction rules and saturation strategies
Applications to the decision problem
Variants of the first-order tableau calculus
Tableaux with equality
Handling logical consequence
Free-variable tableaux
Syntax and Semantics A tableau calculus for first-order logic
Outline
1 Syntax and Semantics
Syntax
Semantics
2 A tableau calculus for first-order logic
The calculus
Soundness
Completeness
Hintikka sets
Tableaux construction rules and saturation strategies
Applications to the decision problem
Variants of the first-order tableau calculus
Tableaux with equality
Handling logical consequence
Free-variable tableaux
Syntax and Semantics A tableau calculus for first-order logic
Syntax
Let LΣ be the first-order language over the signature
Σ = { F, P } ,
where
F is a finite or countable set of function symbols of given
finite arities, and
P is a finite or countable set of relation symbols, or
predicate symbols, of given finite arities.
Terms, atomic formulas, literals, and formulas of LΣ are
defined in the standard way.
Our main purpose is to present a tableau calculus which
derives exactly the valid sentences of LΣ .
Syntax and Semantics A tableau calculus for first-order logic
Syntax
Following Smullyan’s unifying notation, we divide the quantified
sentences in γ- and δ-sentences, according to the table below.
A handy notation is also given for the instances of their
matrices where there is a term t in place of the free variable.
In the following, it should be understood that by α, β, γ, and δ
we denote an α-, β-, γ-, and δ-sentence, respectively.
γ γ(t) δ δ(t)
(∀ x) ϕ ϕxt (∃ x) ϕ ϕxt
¬(∃ x) ϕ ¬ϕxt ¬(∀ x) ϕ ¬ϕxt
Table: γ- and δ-sentences
Syntax and Semantics A tableau calculus for first-order logic
Syntax
We also extend the signature Σ with a denumerable set sko of
new constant symbols, called parameters, such that
sko ∩ F = ∅.
We put Σsko = Σ ∪ sko and we denote by Lsko the first-order
language over the signature Σsko .
Syntax and Semantics A tableau calculus for first-order logic
Semantics
First-order semantics can be defined in the standard way, by
means of models M = hD, =i of LΣ , with D a nonempty
domain and = an interpretation of the symbols of LΣ , using
also the usual notion of assignments.
Syntax and Semantics A tableau calculus for first-order logic
Outline
1 Syntax and Semantics
Syntax
Semantics
2 A tableau calculus for first-order logic
The calculus
Soundness
Completeness
Hintikka sets
Tableaux construction rules and saturation strategies
Applications to the decision problem
Variants of the first-order tableau calculus
Tableaux with equality
Handling logical consequence
Free-variable tableaux
Syntax and Semantics A tableau calculus for first-order logic
The calculus
The rules of the tableau calculus for the first-order language LΣ
are the following.
α β
(α-rule) (β-rule)
α1 β1 β2
[α2 ]
γ δ (δ-rule)
(γ-rule) δ(p)
γ(t)
(p can be any new parameter in
(t can be any ground
sko not already present on the
term of Lsko )
branch to which the rule is ap-
plied)
Table: Tableau calculus for first-order logic
Syntax and Semantics A tableau calculus for first-order logic
The calculus
First-order tableaux for LΣ -sentences can be constructed much
in the same way as propositional tableaux.
The expansion rule, though, must also consider the case in
which the nonliteral sentence selected for expanding a branch
ϑ is a γ- or a δ-sentence:
in the case of a sentence γ, the branch ϑ can be
prolonged with any instance γ(t), for any ground term t of
Lsko , whereas
in the case of a sentence δ, the branch ϑ can be
prolonged with any instance δ(p), where p is a parameter
in sko not already occurring in ϑ.
Notice that symbols in sko are used as temporary objects and
therefore are allowed in sentences labeling internal tableau
nodes only.
The definitions of closed/open branches, closed/open tableaux,
tableau theorems, and tableau proofs are the same as in the
propositional case.
Syntax and Semantics A tableau calculus for first-order logic
Soundness
Soundness of the tableau calculus just outlined is based
mainly on the properties below, which express the correctness
of the γ- and δ-rules. We introduce first the following
terminology, to state such properties conveniently.
Definition
Let = be an interpretation of Lsko and let ξ ∈ P ∪ F ∪ sko. An
interpretation =0 of Lsko is a ξ-variant of =, if it coincides with
= on all symbols of Lsko with ξ the only possible exception.
Then we have:
Lemma (Exercise)
Let = be an interpretation of Lsko .
(A) If γ = = t, then γ(t)= = t, for every ground term t of Lsko .
(B) If δ = = t, then for every parameter p ∈ sko not occurring
0
in δ there exists a p-variant =0 of = such that δ(p)= = t.
Syntax and Semantics A tableau calculus for first-order logic
Soundness
Theorem (Soundness of first-order tableaux (Exercise))
Every theorem of our tableau calculus for first-order logic is a
valid sentence.
Proof
Let ϕ be a sentence of LΣ having a tableau proof and let T be
a closed tableau for ¬ϕ.
If ϕ were not valid, then there would exist an interpretation =
such that ϕ= = f.
It can be shown by induction that T must have a branch ϑ
whose sentences are made true by an interpretation =0 which
differs from = only in the evaluation of at most finitely many
parameters in sko.
Hence ϑ cannot be closed, which is a contradiction.
Syntax and Semantics A tableau calculus for first-order logic
Completeness
The completeness proof for first-order tableaux can be carried
out along much the same lines as in the propositional case.
Particular care must be taken in the tableau saturation process,
since, according to Church’s result on the undecidability of
first-order logic, saturation need not necessarily terminate.
Thus, it is an important issue to assure that selections of the
branches and sentences to be expanded obey a fairness
criterion.
Syntax and Semantics A tableau calculus for first-order logic
Completeness
The notion of saturation strategies is better formulated in terms
of first-order Hintikka sets.
Definition (First-order Hintikka set)
Let H be a set of sentences of a first-order language LΣ and let
CH and FH be, respectively, the set of constants and of functors
of positive degree occurring in the sentences of H. Then H is a
first-order Hintikka set (relative to LΣ ) provided that
(a) CH is non-null;
(b) f ∈
/ H, ¬t ∈
/ H, and H contains no complementary literals;
(c) if α is in H, then H contains all α-components of α;
(d) if β is in H, then H contains at least one β-component of β;
(e) if γ is in H, then H contains all instances γ(t) of γ, for t
ranging over the Herbrand universe H(CH , FH );
(f) if δ is in H, then H contains at least one instance δ(t) of δ,
with t a ground term in H(CH , FH ).
Syntax and Semantics A tableau calculus for first-order logic
Completeness
What is particularly important about Hintikka sets is that they
are always satisfiable, as the following lemma shows.
Lemma (Hintikka)
Let H be a first-order Hintikka set relative to LΣ . Then H is
satisfiable.
Proof
Let CH , FH , and PH be respectively the set of constants, of
functors of positive degree, and of relators occurring in the
sentences of H. We first define a Herbrand interpretation H of
LPH ; CH ∪FH by putting:
DH = H(CH , FH );
t H = t, for every t ∈ H(CH , FH );
Q(t1 , . . . , tn )H = t iff Q(t1 , . . . , tn ) ∈ H, for every n-ary
relator Q ∈ PH and t1 , . . . , tn ∈ H(CH , FH ). ./.
Syntax and Semantics A tableau calculus for first-order logic
Completeness
Proof (cntd.)
By structural induction, it can easily be shown that the
interpretation H satisfies H. Plainly, any interpretation = of the
language LΣ , which extends H, satisfies H too.
Exercise
Provide the missing details of the proof of Hintikka’s Lemma.
Exercise
Let H be a first-order Hintikka set relative to a first-order
language L and let ϕ be a sentence of L.
Show that if ϕ ∈ H then ¬ϕ ∈ / H.
Syntax and Semantics A tableau calculus for first-order logic
Completeness
We are now ready to introduce the abstract concept of
saturation strategies for first-order tableaux.
Definition
A construction rule for first-order tableaux is a procedure R
which for any given sentence ϕ allows us to construct a
possibly infinite sequence T0 , T1 , T2 , . . . of tableaux for ϕ,
called tableau R-sequence for ϕ, such that
T0 is the initial tableau for ϕ, and
Ti+1 is obtained from Ti by a legal application of a tableau
expansion rule, for each i less than the length of the
R-sequence.
A construction rule S is a saturation strategy for first-order
tableaux such that for any sentence ϕ, if we denote by T the
limit of the tableau S-sequence for ϕ, then either T is a closed
tableau or it has a branch ϑ whose sentences form a first-order
Hintikka set.
Syntax and Semantics A tableau calculus for first-order logic
Completeness
The existence of a saturation strategy S for first-order tableaux
promptly entails the completeness of our first-order
tableau calculus .
Indeed, let ϕ be a valid sentence of LΣ and let T be the limit of
the tableau S-sequence for ¬ϕ.
If T were not a closed tableau, then it would have a branch ϑ
whose sentences form a first-order Hintikka set H.
Hence, by Hintikka’s lemma, H would be satisfiable, and so
would ¬ϕ ∈ H, contradicting the validity of ϕ.
Syntax and Semantics A tableau calculus for first-order logic
Completeness
Below we outline the definition of a saturation strategy S for
first-order tableaux.
We notice that for a construction rule R to be a saturation
strategy, it must be the case that
R tries to build first-order Hintikka sets on all open branches,
since it is not known in advance which branch, if any, will turn
out to be satisfiable.
Thus, it is necessary that:
(i) S can select each open branch for expansion infinitely
often;
(ii) each occurrence of a γ-sentence on a given branch is
selected by S for expansion infinitely often.
Syntax and Semantics A tableau calculus for first-order logic
Completeness
Requirement (i) is achieved by keeping all open branches in a
queue Qopen in such a way that
branches to be expanded are selected (and popped out)
from one side of Qopen , whereas
new branches are enqueued in Qopen from the other side.
Concerning (ii), it is enough to maintain a queue Qϑ for each
open branch ϑ of the tableau.
The queue Qϑ keeps all sentences in ϑ which still need to be
expanded.
Syntax and Semantics A tableau calculus for first-order logic
Completeness
It is helpful to assume that we have fixed
an enumeration σ of the parameters in sko
an enumeration τ of the ground terms of the first-order
language Lsko .
Then, once a branch ϑ is selected,
the sentence ϕ with highest priority in the queue Qϑ is
selected for expansion,
ϕ is popped out from Qϑ
the appropriate tableau rule is applied to ϕ.
Syntax and Semantics A tableau calculus for first-order logic
Completeness
In particular,
if S selects a δ-sentence, then the δ-rule is applied to it
with the first parameter in the enumeration σ which has not
yet been used on ϑ;
if S selects a γ-sentence γ, then we put
UnusedTerms(ϑ, γ) =
{t ∈ H(Cϑ , Fϑ ) : γ(t) does not occur in ϑ} ,
where Cϑ and Fϑ are respectively the constant symbols
and the functors of positive arity in ϑ, and we distinguish
the following three cases:
if UnusedTerms(ϑ, γ) 6= ∅, then the γ-rule is applied to γ
with the first term t ∈ UnusedTerms(ϑ, γ) in the
enumeration τ ; or else
if Cϑ = ∅ then the γ-rule is applied to γ with the first
unused parameter in the enumeration σ; or else
no application of the γ-rule takes place at this step.
Syntax and Semantics A tableau calculus for first-order logic
Completeness
In all cases, the sentences which are added to the branch ϑ as
a result of the application of one of the tableau rules are
entered in the queue associated with ϑ (or with the new sibling
of ϑ, in case ϑ has been split out by the β-rule).
In addition, if the selected sentence is a γ-sentence, it is
re-entered in the queue:
this is the reason for possible nontermination of the tableau
construction process.
Syntax and Semantics A tableau calculus for first-order logic
Completeness
Termination condition
The tableau construction stops when either
all branches of the tableau are closed, or
the tableau has an open branch which cannot be further
expanded by the rule S.
In the former case, the initial sentence is clearly unsatisfiable,
whereas in the latter case or in the case of nontermination it
can be shown that the initial sentence is satisfiable.
Exercise
Verify that the construction rule S outlined above is a saturation
strategy for first-order tableaux.
Syntax and Semantics A tableau calculus for first-order logic
Completeness
From the previous discussion, we can immediately conclude:
Theorem (Completeness of first-order tableaux)
Our tableau calculus for first-order logic is complete.
Syntax and Semantics A tableau calculus for first-order logic
Applications to the decision problem
According to the above termination condition for the
saturation strategy S, in some favorable cases the
saturation process can terminate even for satisfiable
sentences.
It is therefore interesting to single out those collections of
sentences for which S can work as a decision procedure.
Syntax and Semantics A tableau calculus for first-order logic
Applications to the decision problem
A first condition which is plainly sufficient for termination is that
during the tableau construction by S, no γ-sentence is ever
generated (condition C0 ).
Another more interesting case arises when γ-sentences can be
generated during the tableau construction. In such a case,
termination is enforced provided that
no functor of positive degree occurs in the initial sentence;
and
there exists an upper bound k ∈ N such that |Cϑ | ≤ k
holds, for each branch ϑ, during the tableau construction
by S.
(Condition C1 )
Syntax and Semantics A tableau calculus for first-order logic
Applications to the decision problem
Let us put:
L0 : collection of sentences of LΣ for which condition C0
holds;
L1 : collection of sentences of LΣ for which condition C1
holds.
Then, we plainly have that S is a decision procedure for the
satisfiability problem for L0 and L1 .
Syntax and Semantics A tableau calculus for first-order logic
Applications to the decision problem
The preceding results, though, are quite unsatisfactory, since
we do not have a syntactic characterization of L0 and L1 .
We content ourselves with the following syntactic
characterizations of proper subsets of L0 and L1 .
Let us first define the concept of essentially universal and
essentially existential subformulas.
For the sake of simplicity, we will assume that the propositional
connectives of our first-order language LΣ are just ¬, ∧, and
∨, though the definition below can easily be adapted to the
more general cases in which other connectives are present.
Syntax and Semantics A tableau calculus for first-order logic
Applications to the decision problem
Definition
Let ϕ be a sentence of LΣ . An occurrence of a subformula of ϕ
is positive if it falls within the scope of an even number of the
negation symbol ¬, otherwise it is negative.
An occurrence of a quantified subformula of ϕ is essentially
existential if either
it occurs positively in ϕ and has the form (∃x)ψ, or
it occurs negatively in ϕ and has the form (∀x)ψ.
An occurrence of a quantified subformula of ϕ which is not
essentially existential is essentially universal.
Syntax and Semantics A tableau calculus for first-order logic
Applications to the decision problem
Let
L00 : collection of sentences of LΣ with no occurrence of
essentially existential subformulas
Example: (∀x)P(x) ∧ ¬(∃x)R(x)
L01 : collection of sentences ϕ of LΣ such that
ϕ involves no functor of positive degree;
no essentially universal quantifier falls within the scope of
an essentially existential quantifier in ϕ.
Example: (∀x1 )(∀x2 )(∃x3 )(∃x4 )R(x1 , x2 , x3 , x4 )
Then we have L00 ⊂ L0 and L01 ⊂ L1 .
Exercise
Show that S is a decision procedure for the validity problem for
L00 and L01 .
Also prove the inclusions L00 ⊂ L0 and L01 ⊂ L1 .
Syntax and Semantics A tableau calculus for first-order logic
Applications to the decision problem
Example (∀∗ -sentences)
L00
0 : collection of sentences of LΣ of the form
(∀x1 )(∀x2 ) · · · (∀xn )ψ
where ψ does not contain any quantifier.
Then L00 0
0 ⊂ L0 .
Example (∀∗ ∃∗ -sentences)
L00
1 : collection of sentences of LΣ of the form
(∀x1 )(∀x2 ) · · · (∀xn )(∃y1 )(∃y2 ) · · · (∃ym )ψ
where ψ is unquantified and does involve any functor of
positive arity.
Then L00 0
1 ⊂ L1 .
Syntax and Semantics A tableau calculus for first-order logic
Variants of the first-order tableau calculus
For the sake of simplicity, in the preceding section we limited
ourselves to the discussion of an elementary version of a
tableau calculus for first-order logic.
Among the several variants existing in the literature, we will
briefly sketch three of them:
tableaux with equality,
tableaux for handling logical consequences, and
tableaux with free variables.
Though such variants are presented separately, they could be
merged into a single tableau calculus.
Syntax and Semantics A tableau calculus for first-order logic
Variants of the first-order tableau calculus
To handle equality, our tableau calculus can be supplemented
with the two rules below, where t and u stand for ground terms
of Lsko .
t =u
ϕ
(reflexivity rule) (replacement rule)
t =t ϕtu
Table: Tableau equality rules
Notice that the reflexivity rule has no premiss. This means that
at any time during the tableau construction it is possible to add
an equality of type t = t.
Syntax and Semantics A tableau calculus for first-order logic
Variants of the first-order tableau calculus
To show whether a first-order sentence ϕ is a logical
consequence of a set of sentences Φ, one can build a closed
tableau for ¬ϕ by means of the extension of our
tableau calculus with the following Φ-introduction rule:
at any time during the tableau construction it is possible to add
any sentence in Φ.
Syntax and Semantics A tableau calculus for first-order logic
Variants of the first-order tableau calculus
Our tableau calculus is not very well suited for automation,
since in most cases when the γ-rule is applied on a branch,
one does not have enough information for choosing the right
instance, namely an instance which will contribute to an earlier
closure of the branch.
A solution to this problem consists in allowing free variables in
γ-instances, which later, when enough information becomes
available, can be opportunely instantiated to close a branch by
means of a unification algorithm.
Also, to cope with the presence of free variables, a different
variant of the δ-rule must be used.
γ δ (δ-rule)
(γ-rule) δ(f (x1 , . . . , xn ))
γ(x)
(x1 , . . . , xn are all the free vari-
(x is a free variable)
ables of δ and f is a new n-ary
functor)