MEANING-PRESERVING SKOLEMIZATION
Kiyoshi Akama
1
and Ekawit Nantajeewarawat
2
1
Information Initiative Center, Hokkaido University, Hokkaido, Japan
2
Computer Science, Sirindhorn International Institute of Technology, Thammasat University, Pathumthani, Thailand
Keywords:
Skolemization, Equivalent transformation, Conjunctive normal form, Question-answering problems.
Abstract:
Skolemization is a well-known method for removing existential quantifiers from a logical formula. Although
it always yields a satisfiability-preserving transformation step, classical Skolemization in general does not
preserve the logical meaning of a source formula. We develop in this paper a theory for extending a space of
logical formulas by incorporation of function variables and show how meaning-preserving Skolemization can
be achieved in an obtained extended space. A procedure for converting a logical formula into an equivalent
one in an extended conjunctive normal form on the extended space is described. This work lays a theoretical
foundation for solving logical problems involving existential quantifications based on meaning-preserving
formula transformation.
1 INTRODUCTION
Conversion of a given formula into a conjunction of
clauses, called a conjunctive normal form (CNF) or a
clausal normal form, is a normalization process com-
monly used in automated reasoning. Such conver-
sion involves removal of existential quantifications by
Skolemization (named after Thoralf Albert Skolem),
i.e., by replacement of an existentially quantified vari-
able with a Skolem term, which is usually determined
by a relevant part of a formula prenex.
Conversion into CNFs is a basic preparation step
for automated proof by resolution and factoring. Most
theories in logic programming are based on clausal
forms. Recently, question-answering problems (QA
problems) have gain wide attention. A problem in this
class is concerned with finding the set of all ground
instances of a given query atom that are logical conse-
quences of a given formula. Most research works on
solving QA problems are also based on Skolemiza-
tion, including those in systems involving integration
between formal ontological background knowledge
and instance-level rule-oriented components, e.g., in-
teraction between Description Logics and Horn rules
(Donini et al., 1998; Horrocks et al., 2005; Levy and
Rousset, 1998; Motik et al., 2005) in the Semantic
Web’s ontology-based rule layer.
Skolemization, however, does not preserve the
logical meaning of a formula; the formula resulting
from Skolemization is not necessarily equivalent to
the original one. Only the satisfiability property of a
formula is preserved—the resulting formula is equi-
satisfiable with the original formula (Chang and Lee,
1973), i.e., it is satisfiable iff the original formula is.
Equivalent Transformation (ET) of formulas is es-
sential and very useful for solving many kinds of log-
ical problems (Akama and Nantajeewarawat, 2006),
including QA problems. In ET-based problem solv-
ing, a logical formula representing a given problem
is successively transformed into a simpler but logi-
cally equivalent formula. Correctness of computation
is readily guaranteed by any combination of equiva-
lent transformations, which yields many kinds of cor-
rect algorithms for solving logical problems. Since
classical Skolemization does not result in meaning-
preserving transformation, it cannot be used in an ET-
based problem-solving process.
Our primary objective here is to develop a theory
for extending a space of logical formulas by introduc-
tion of function variables and a specialization opera-
tion on them in such a way that “meaning-preserving”
Skolemization can be achieved in an obtained ex-
tended space. Fig. 1 gives a pictorial view of our goal.
Assume that α is a given first-order formula with oc-
currences of existential quantifications. As illustrated
in the figure, suppose that α is converted into a CNF
β by a sequence of transformation steps based on the
usual normalization procedure on the space, say L
1
,
of first-order logic. When classical Skolemization is
used in this conversion, α and β are not necessar-
ily logically equivalent and, thus, β does not always
serve as an intermediate equivalent formula for fur-
322
Akama K. and Nantajeewarawat E..
MEANING-PRESERVING SKOLEMIZATION.
DOI: 10.5220/0003692003220327
In Proceedings of the International Conference on Knowledge Engineering and Ontology Development (KEOD-2011), pages 322-327
ISBN: 978-989-8425-80-5
Copyright
c
2011 SCITEPRESS (Science and Technology Publications, Lda.)
L
1
Clauses
on L
2
L
2
α
β
¯
β
¯γ
Figure 1: ET-based problem solving with meaning-pre-
serving Skolemization.
ther transformation preserving the logical meaning of
α. By contrast, in the expected extended logical struc-
ture, referred to as L
2
, by using meaning-preserving
Skolemization, α is converted into an extended CNF,
say
¯
β, that is logically equivalent to it. Consequently,
α can be further equivalently transformed in the ex-
tended space, for example, by using the meaning-
preserving transformation path from
¯
β to
¯
γ in the fig-
ure. It is expected that our meaning-preserving Skol-
emization framework will provide an important theo-
retical basis for a large class of automated reasoning
tasks.
Section 2 formalizes a class of QA problems and
outlines an ET-based method for solving them. Sec-
tion 3 explains the necessity of meaning-preserving
Skolemization and an extension of a logical space.
After introducing function constants and function
variables, Section 4 formulates an extended logical
space and defines the meanings of extended formu-
las. Section 5 presents an extended conjunctive nor-
mal form, called existentially quantified conjunctive
normal form (ECNF), along with an algorithm for
meaning-preserving conversion of a formula into an
ECNF on the extended logical space. Section 6 con-
cludes the paper.
2 QUESTION-ANSWERING
PROBLEMS AND ET-BASED
SOLUTIONS
To begin with, a question-answering problem is de-
fined. It is followed by a general ET-based solution
scheme.
2.1 Question-Answering (QA) Problems
A question-answering problem (QA problem) is a pair
hK,qi, where K is a logical formula and q is an atomic
formula (atom). The answer to a QA problem hK, qi,
denoted by ans(K,q), is defined by
ans(K,q) = {q
| (q
is a ground instance of q) &
(K |= q
)},
i.e., the set of all ground instances of q that follows
logically from K. When K consists of only definite
clauses, problems in this class are problems that have
been discussed in logic programming (Lloyd, 1987).
When K is a conjunction of axioms and assertions in
Description Logics (Baader et al., 2007), QA prob-
lems are usually called query-answering problems.
2.2 Solving QA Problems by ET
Using the set of all models of K, denoted by
Model(K), the answer to a QA problem hK,qi, can
be equivalently represented as
ans(K,q) = (
\
Model(K)) rep(q),
where
T
Model(K) is the intersection of all models of
K and rep(q) is the set of all ground instances of q.
Calculating
T
Model(K) directly may require high
computation cost. To reduce the cost, K is trans-
formed into a simplified formula K
such that all mod-
els of K is preservedand
T
Model(K
)rep(q) can be
determined at a low cost. Obviously, if Model(K) =
Model(K
), then ans(K,q) = ans(K
,q).
3 NEED FOR
MEANING-PRESERVING
SKOLEMIZATION
3.1 Use of Conjunctive Normal Forms
A conjunctive normal form (CNF) is a set of clauses,
interpreted as a conjunction. Most important meth-
ods for theorem proving deal with logical formulas
in CNFs, using basic operations such as unification,
resolution, unfolding, and factoring. Based on CNFs,
a transformation scheme for solving a QA problem
hK,qi typically consists of two steps:
1. K is converted into a CNF K
.
2. hK
,qi is transformed equivalently into hK
′′
,qi,
where K
is also a CNF.
From hK
′′
,qi, the answer to the problem hK,qi is de-
termined by
ans(K,q) = (
\
Model(K
′′
)) rep(q).
MEANING-PRESERVING SKOLEMIZATION
323
3.2 Traditional Skolemization
For traditional transformation of first order formulas
into CNFs, all transformations are basically equiv-
alent transformation. They include, for example,
the implication law (p q ¬p q), the De mor-
gan’s laws (¬(p q) ¬p ¬q), etc. It is well-
known, however, that traditional Skolemization is not
meaning-preserving. For example, the formula
x,y : p(x, y) (1)
is Skolemized to x : p(x, f(x)), where f is a new
function constant, called a Skolem function. It is ob-
vious that x,y : p(x, y) and x : p(x, f(x)) have dif-
ferent meanings. Given any arbitrary ground term t
x
,
the former formula states the existence of a ground
term t
y
such that p(t
x
,t
y
) is true, while the latter for-
mula states not only the existence of such a ground
term t
y
but also that one such t
y
is f(t
x
). The set
{p(t, 3) | t is a ground term}, for example, is a model
of the former formula but is not a model of the second
one.
3.3 Introduction of Meaning-Preserving
Skolemization
The basic idea of meaning-preserving Skolemization
is to use existentially quantified function variables in-
stead of function constants. For example, Formula (1)
is transformed into
h,x : p(x,h(x)), (2)
where h is a function variable. Intuitively, h is an
unknown function that associates with any arbitrar-
ily given ground term t
x
a ground term h(t
x
) such that
p(t
x
,h(t
x
)) is true. An alternative form of (2) is
h,x,y : (p(x, y) (h(x) 6= y)), (3)
which is intuitively equivalent to (2).
3.4 Need for an Extended Space
Formulas (2) and (3) above both contain a function
variable and a quantification on that function variable,
which are not included in usual first-order formulas.
The use of them leads to an extension of the basic
concepts for the first-order logic. Let L
1
be the space
of all conventional first-order formulas. We need the
following extensions:
An extended space L
2
that includes not only usual
terms, atoms, and formulas in L
1
, but also func-
tion variables, quantifications on function vari-
ables, and formulas containing them.
An extended definition of the truth value of a for-
mula with quantifications on function variables,
which determines the semantics of formulas on
the extended space.
This requirement raises a question: “How to define
the extended space L
2
and the semantics of formulas
thereon? Section 4 provides an answer to this ques-
tion.
4 AN EXTENDED SPACE FOR
SKOLEMIZATION
4.1 Function Constants and Function
Variables
A usual function symbol in first-order logic denotes
an unevaluated function; it is used for constructing a
syntactically new term from existing terms (possibly
recursively) without evaluating those existing terms.
A different class of functions is used in the extended
space L
2
. A function in this class is an actual math-
ematical function; it takes ground terms as input, and
associates with them an output ground term. The in-
put ground terms are evaluated for determining the
output. We called a function in this class a function
constant.
In order to clearly separate function constants and
function variables from usual functions and usual
terms, a new built-in predicate func is introduced.
Given any n-ary function constant or n-ary function
variable
¯
f,
func(
¯
f,t
1
,...,t
n
,t
n+1
),
where the t
i
are usual terms, is considered as an atom
of a new type, called a func-atom. When
¯
f is a func-
tion constant and the t
i
are all ground, the truth value
of this atom is evaluated as follows: it is true iff
¯
f(t
1
,...,t
n
) = t
n+1
.
Accordingly, function constants and function
variables are syntactically differentiated from usual
terms. Function constants and function variables ap-
pear only as the first arguments of func-atoms, while
usual terms appear as other arguments of them. Ar-
guments of usual atoms can only be usual terms. By
such clear-cut separation, we need not consider unifi-
cation of usual terms and function variables/function
constants. This makes a computation process eas-
ier to understand since computation methods simi-
lar to those used in the usual first-order logic can be
adopted.
The space L
1
is then extended into the space L
2
by
inclusion of func-atoms and quantifications on func-
KEOD 2011 - International Conference on Knowledge Engineering and Ontology Development
324
tion variables. There are two disjoint classes of atoms
in L
2
:
func-atoms introduced above;
usual atoms, constructed in the usual way from
ordinary predicates and usual terms.
From these atoms, formulas in L
2
are constructed us-
ing logical connectives (i.e., ¬, , , , and ) and
quantifications in the usual way, except that in ad-
dition to quantifications on usual variables, function
variables are also quantified. Like a quantification on
a usual variable, a quantification on a function vari-
able v
h
is either a universal quantification v
h
or an
existential quantification v
h
.
In the following, let Var denote the set of all
usual variables and FVar the set of all function vari-
ables. For any expression E, any v Var (respec-
tively, any v
h
FVar), and any usual term t (respec-
tively, any function constant f), let E{v/t} (respec-
tively, E{v
h
/ f}) denote the expression obtained from
E by replacing each occurrence of v with t (respec-
tively, each occurrence of v
h
with f).
4.2 Interpretations and Models
Let G be the set of all ground atoms. An interpreta-
tion is a subset of G . Given an interpretation I, the
truth value of a closed formula under I is defined as
follows:
1. For any ground atom g, g is true under I iff g I.
2. For any closed formula α, ¬α is true under I iff α
is false under I.
3. For any closed formulas α and β, α β (respec-
tively, α β, α β, and α β) is true under I
iff α and β are true (respectively, at least one of α
and β is true, at least one of ¬α and β is true, and
α and β have the same truth value) under I.
4. For any v Var, a closed formula v : E is true
under I iff for any ground term t, E{v/t} is true
under I.
5. For any v Var, a closed formula v : E is true
under I iff there exists at least one ground term t
such that E{v/t} is true under I.
6. For any v
h
FVar, a closed formula v
h
: E is true
under I iff for any function constant f , E{v
h
/ f}
is true under I.
7. For any v
h
FVar, a closed formula v
h
: E is
true under I iff there exists at least one function
constant f such that E{v
h
/ f} is true under I.
An interpretation I is a model of a closed formula α
iff α is true under I.
4.3 A Safe Extension into a New Space
The introduction of function variables necessitates the
extension of the original space L
1
into the extended
one L
2
. A solution path for meaning-preserving Sko-
lemization is:
1. First, transform a given formula α on L
1
into the
same formula on L
2
.
2. Next, transform α in the space of L
2
into an ex-
tended conjunctive normal form.
Obviously, L
1
is a subset of L
2
. Moreover, L
2
is a
safe extension of L
1
, i.e.,
any formula on L
1
have the same meaning as
the same formula on L
2
,
the reason being that all formulas on L
1
do not in-
clude function variables and function constants, and
the definitions of the truth values of closed formulas
with quantified function variables under an interpre-
tation do not affect the truth values of formulas on
L
1
. The first step in the solution path above is thus an
equivalent transformation step.
The second step raises another question: “What
are extended conjunctive normal forms?” Section 5
provides an answer to this question along with an al-
gorithm for the second step.
5 AN ALGORITHM FOR
MEANING-PRESERVING
SKOLEMIZATION
Based on the notion of a formula tree, an extended
conjunctive normal form, called an existentially quan-
tified conjunctive normal form (ECNF), is defined.
An algorithm for transforming a formula on L
1
into
an equivalent ECNF on L
2
is then presented.
5.1 Formula Trees
Given a formula α on L
2
, the formula tree of α, de-
noted by FT(α), is a binary tree constructed induc-
tively as follows:
1. If α is an atomic formula, then FT(α) is a one-
vertex binary tree whose root is α.
2. If α = ¬β, then FT(α) is a binary tree such that
root(FT(α)) = ¬, and
root(FT(α)) has only one child, with FT(β) be-
ing the subtree of FT(α) rooted at this child.
3. If α = β γ (respectively, β γ, β γ, β γ),
then FT(α) is a binary tree such that
MEANING-PRESERVING SKOLEMIZATION
325
root(FT(α)) = (respectively, , , ), and
root(FT(α)) has two children, with FT(β) be-
ing the subtree of FT(α) rooted at the left child
and FT(γ) being the subtree of FT(α) rooted at
the right child.
4. If α = v : β (respectively, v : β), where v Var,
then FT(α) is a binary tree such that
root(FT(α)) = v (respectively, v), and
root(FT(α)) has only one child, with FT(β) be-
ing the subtree of FT(α) rooted at this child.
5. If α = v
h
: β (respectively, v
h
: β), where v
h
FVar, then FT(α) is a binary tree such that
root(FT(α)) = v
h
(respectively, v
h
), and
root(FT(α)) has only one child, with FT(β) be-
ing the subtree of FT(α) rooted at this child.
The following notation is used in subsequent text:
For any v Var, a v-vertex and an v-vertex in a
formula tree are also called a Var-vertex and an
Var-vertex, respectively.
For any v
h
FVar, a v
h
-vertex and an v
h
-vertex
in a formula tree are also called a FVar-vertex
and an FVar-vertex, respectively.
5.2 Existentially Quantified
Conjunctive Normal Forms (ECNF)
A formula α on L
2
is said to be in an existentially
quantified conjunctive normal form (ECNF) iff α is a
closed formula and every path from the root to a leaf
of the formula tree of α consists of
1. zero or more FVar-vertices, followed by
2. zero or more -vertices, followed by
3. zero or more Var-vertices, followed by
4. zero or more of -vertices, followed by
5. either (i) a leaf vertex representing a usual atom
or (ii) a ¬-vertex followed by a leaf vertex repre-
senting a usual atom or a func-atom.
A formula in an ECNF is similar to a usual con-
junctive normal form in that it contains a conjunction
of clauses, each of which is a disjunction of literals.
There are, however, two main differences:
1. A formula in an ECNF contains existential quan-
tifications on function variables; it has the form
v
h
1
,...,v
h
n
: β,
where the v
h
i
are function variables and β has the
same form as a usual conjunctivenormal form ex-
cept that the negations of func-atoms may appear
in β, i.e., β is a conjunction of disjunctions of
(i) usual atoms, (ii) negated usual atoms, and (iii)
negated func-atoms.
2. While usual Skolem functions may appear in
usual atoms, function variables can appear only
in func-atoms.
Given usual atoms a
1
,...,a
m
,b
1
,...,b
n
and func-
atoms f
1
,...,f
p
, a disjunction
a
1
··· a
m
¬b
1
··· ¬b
n
¬f
1
··· ¬f
p
contained in an ECNF is often written as
a
1
,...,a
m
b
1
,...b
n
,f
1
,...,f
p
.
5.3 Conversion Algorithm
Assume that
the initial space INI is the set of all formulas on
L
2
that are also formulas on L
1
, and
the target space FIN is the set of all formulas in
ECNFs on L
2
.
Let a formula α in INI be given as input and T =
FT(α). To transform α into a formula in FIN, T is
changed successively by the steps described below.
Fig. 2 depicts an outline of the procedure.
1. Preparation:
(a) Convert and equivalently into ¬, , and
, using the following logical equivalences:
β γ ¬β γ
β γ (¬β γ) (¬γ β)
(b) Rename quantified variables so that for any
two occurrences of quantifications Qv and Q
w,
where v,w Var, v 6= w.
2. Move ¬ inwards: Move ¬ inwards equivalently
until each occurrence of ¬ immediately precedes
an atom, using the following logical equivalences:
¬(¬β) β
¬(β γ) ≡ ¬β ¬γ
¬(β γ) ≡ ¬β ¬γ
¬∀x : α x : ¬α
¬∃x : α x : ¬α
3. Move down -vertices: Repeatedly move down
-vertices in the current state of T through Var-
vertices, Var-vertices, and -vertices as far as
possible using the following logical equivalences:
(x : β) γ ≡ ∃x : (β γ)
(x : β) γ ≡ ∀x : (β γ)
(β γ) δ (β δ) (γ δ)
4. Move up -vertices: Repeatedly move up -
vertices in the current state of T through Var-
vertices as far as possible using the following log-
ical equivalence:
x : (β γ) (x : β) (x : γ)
KEOD 2011 - International Conference on Knowledge Engineering and Ontology Development
326
Figure 2: An overview of the conversion procedure.
5. If T includes an Var-vertex, then:
(a) Skolemization: In T, select a subformula
x
1
,...,x
n
,y : β,
where n 0, such that there is no further uni-
versal quantification over this subformula in T.
Transform this subformula into
h,x
1
,...,x
n
,y :(β¬func(h,x
1
,...,x
n
,y)),
where h FVar such that h has not been used
so far.
(b) Move up an FVar-vertex: Repeatedly move up
the new FVar-vertex (introduced at Step 5a)
through -vertices as far as possible using the
following logical equivalence:
(FVar : β) γ ≡ ∃FVar : (β γ)
(c) Go to Step 3.
6. Stop with the formula represented by the current
state of T as the output formula.
It is shown in (Akama and Nantajeewarawat,
2011) that this algorithm always terminates and yields
an output ECNF in FIN that has the same logical
meaning as the input formula.
6 CONCLUSIONS
ET-based computationoften requires a search in a cer-
tain formula space for a simplified formula that is log-
ically equivalent to an originally given one. Exten-
sion of logical formulas in general enlarges the search
space both for finding a suitable equivalent logical
formula and for finding meaning-preserving formula
transformation sequences, thereby increasing the pos-
sibility of finding efficient computation paths. The
theory for extending a space of formulas by introduc-
tion of function variables presented herein allows one
to use Skolemization as an equivalent transformation
step. It opens up new possibilities for employing ET-
based computation to solve logical problems with un-
restricted use of existential quantifications.
REFERENCES
Akama, K. and Nantajeewarawat, E. (2006). Formaliza-
tion of the Equivalent Transformation Computation
Model. Journal of Advanced Computational Intelli-
gence and Intelligent Informatics, 10(3):245–259.
Akama, K. and Nantajeewarawat, E. (2011). Meaning-
Preserving Skolemization. Technical report, Hokkai-
do University, Sapporo, Japan.
Baader, F., Calvanese, D., McGuinness, D. L., Nardi, D.,
and Patel-Schneider, P. F., editors (2007). The De-
scription Logic Handbook. Cambridge University
Press, second edition.
Chang, C.-L. and Lee, R. C.-T. (1973). Symbolic Logic and
Mechanical Theorem Proving. Academic Press.
Donini, F. M., Lenzerini, M., Nardi, D., and Schaerf, A.
(1998). A L -log: Integrating Datalog and Description
Logics. Journal of Intelligent Information Systems,
16:227–252.
Horrocks, I., Patel-schneider, P. F., Bechhofer, S., and
Tsarkov, D. (2005). OWL Rules: A Proposal and
Prototype Implementation. Journal of Web Semantics,
3(1):23–40.
Levy, A. Y. and Rousset, M.-C. (1998). Combining Horn
Rules and Description Logics in CARIN. Artificial
Intelligence, 104(1–2):165–209.
Lloyd, J. W. (1987). Foundations of Logic Programming.
Springer-Verlag, second, extended edition.
Motik, B., Sattler, U., and Studer, R. (2005). Query An-
swering for OWL-DL with Rules. Journal of Web Se-
mantics, 3(1):41–60.
MEANING-PRESERVING SKOLEMIZATION
327