ModelIntersection Problems and Their Solution Schema Based on Equivalent Transformation
Abstract
Modelintersection (MI) problems are a very large class of logical problems that includes many useful problem classes, such as proof problems on firstorder logic and queryanswering (QA) problems in pure Prolog and deductive databases. We propose a general schema for solving MI problems by equivalent transformation (ET), where problems are solved by repeated simplification. The correctness of this solution schema is shown. This general schema is specialized for formalizing solution schemas for QA problems and proof problems. The notion of a target mapping is introduced for generation of ET rules, allowing many possible computation procedures, for instance, computation procedures based on resolution and unfolding. This theory is useful for inventing solutions for many classes of logical problems.
Keywords
Modelintersection problem Queryanswering problem Equivalent transformation Problem solving1 Introduction
This paper introduces a modelintersection problem (MI problem), which is a pair \(\langle \textit{Cs}, \varphi \rangle \), where \(\textit{Cs}\) is a set of clauses and \(\varphi \) is a mapping, called an exit mapping, used for constructing the output answer from the intersection of all models of \(\textit{Cs}\). More formally, the answer to a MI problem \(\langle \textit{Cs}, \varphi \rangle \) is \(\varphi (\bigcap \textit{Models}(\textit{Cs}))\), where \(\textit{Models}(\textit{Cs})\) is the set of all models of \(\textit{Cs}\). The set of all MI problems constitutes a very large class of problems and is of great importance.
MI problems includes as an important subclass queryanswering problems (QA problems), each of which is a pair \(\langle \textit{Cs}, a \rangle \), where \(\textit{Cs}\) is a set of clauses and a is a userdefined query atom. The answer to a QA problem \(\langle \textit{Cs}, a \rangle \) is defined as the set of all ground instances of a that are logical consequences of \(\textit{Cs}\). Characteristically, a QA problem is an “allanswers finding” problem, i.e., all ground instances of a given query atom satisfying the requirement above are to be found. Many logic programming languages, including Datalog, Prolog, and other extensions of Prolog, deal with specific subclasses of QA problems.
The class of proof problems is also a subclass of MI problems. In contrast to a QA problem, a proof problem, is a “yes/no” problem; it is concerned with checking whether or not one given logical formula is a logical consequence of another given logical formula. Formally, a proof problem is a pair \(\langle E_1, E_2 \rangle \), where \(E_1\) and \(E_2\) are firstorder formulas, and the answer to this problem is defined to be “yes” if \(E_2\) is a logical consequence of \(E_1\), and it is defined to be “no” otherwise.
Historically, among these three kinds of problems, proof problems were first solved, e.g., the tableaux method [8] and the resolution method [12] have been long well known. After that, QA problems on pure Prolog were solved based on the resolution principle. The theory of SLDresolution was used for the correctness of Prolog computation. So it has been believed that Prolog computation is an inference process. This approach can be called a proofcentered approach. Many solutions proposed so far for some other classes of logical problems are also basically proofcentered.
MI problems are axiomatically constructed on an abstract structure, called a specialization system. It consists of abstract atoms and abstract operations (extensions of variablesubstitution operations) on atoms, called specializations. These abstract components can be any arbitrary mathematical objects as long as they satisfy given axioms. Abstract clauses can be built on abstract atoms. This is a sharp contrast to most of the conventional theories in logic programming, where concrete syntax is usually used. In Prolog, for example, usual firstorder atoms and substitutions with concrete syntax are used, and there is no way to give a foundation for other forms of extended atoms and for various specialization operations other than the usual variablesubstitution operation.
An axiomatic theory enables us to develop a very general theory. By instantiating a specialization system to a specific domain and by imposing certain restrictions on clauses, our theory can be applied to many subclasses of MI problems.
We propose a general schema for solving MI problems by equivalent transformation (ET), where problems are solved by repeated simplification. We introduce the concept of target mapping and propose three target mappings. Since transformation preserving a target mapping is ET, target mappings provide a strong foundation for inventing many ET rules for solving MI problems on clauses.
An ETbased solution consists of the following steps: (i) formalize an initial MI problem on some specialization system, (ii) prepare ET rules, (iii) construct an ET sequence, and (iv) compute an answer mapping for deriving a solution.
To begin with, Sect. 2 recalls the concept of specialization system and formalizes MI problems on a specialization system. QA problems and proof problems are embedded into the class of all MI problems. Section 3 defines the notions of a target mapping and an answer mapping, and introduces a schema for solving MI problems based on ET preserving answers/target mappings. The correctness of this solution schema is shown. Section 4 introduces three target mappings for clause sets. Among them, \(\mathbb {MM}\) is a target mapping that associates with each clause set a collection of its specific models computed in a bottomup manner. Section 5 presents solution schemas for QA problems and proof problems based on the solution schema for MI problems in Sect. 3. Section 6 shows examples of solutions of a QA problem and a proof problem based on the solution schemas in Sect. 5. Section 7 concludes the paper.
The notation that follows holds thereafter. Given a set A, \(\textit{pow}({A})\) denotes the power set of A and \(\textit{partialMap}(A)\) the set of all partial mappings on A (i.e., from A to A). For any partial mapping f from a set A to a set B, \(\textit{dom}(f)\) denotes the domain of f, i.e., \( \textit{dom}(f) = \{ a \mid (a \in A) \ \& \ (f(a)\text { is defined}) \}\).
2 Clauses and ModelIntersection Problems
2.1 Specialization Systems
A substitution \(\{ X/f(a), Y/g(z) \}\) changes an atom p(X, 5, Y) in the term domain into p(f(a), 5, g(z)). Generally, a substitution in firstorder logic defines a total mapping on the set of all atoms in the term domain. Composition of such mappings is also realized by some substitution. There is a substitution that does not change any atom (i.e., the empty substitution). A ground atom in the term domain is a variablefree atom.
Likewise, in the string domain, substitutions for strings are used. A substitution \(\{ X/\mathrm{``}aYbc\text {''}, Y/\mathrm{``}xyz\text {''} \}\) changes an atom \(p(\mathrm{``}X5Y\text {''})\) into \(p(\mathrm{``}aYbc5xyz\text {''})\). Such a substitution for strings defines a total mapping on the set of all atoms that may include string variables. Composition of such mappings is also realized by some string substitution. There is a string substitution that does not change any atom (i.e., the empty substitution). A ground atom in the string domain is a variablefree atom.
A similar operation can be considered in the classvariable domain. Consider, for example, an atom \(p(X:\textit{animal}, Y:\textit{dog}, Z:\textit{cat})\) in this domain, where \(X:\textit{animal}\), \(Y:\textit{dog}\), and \(Z:\textit{cat}\) represent an animal object, a dog object, and a cat object, respectively. When we obtain additional information that X is a dog, we can restrict \(X:\textit{animal}\) into \(X:\textit{dog}\) and the atom \(p(X:\textit{animal}, Y:\textit{dog}, Z:\textit{cat})\) into \(p(X:\textit{dog}, Y:\textit{dog}, Z:\textit{cat})\). By contrast, with new information that Z is a dog, we cannot restrict \(Z:\textit{cat}\) and the above atom since Z cannot be a dog and a cat at the same time. More generally, such a restriction operation may not be applicable to some atoms, i.e., it defines a partial mapping on the set of all atoms. Composition of such partial mappings is also a partial mapping, and we can determine some composition operation corresponding to it. An empty substitution that does not change any atom can be introduced. A ground atom in the classvariable domain is a variablefree atom.
In order to capture the common properties of such operations on atoms, the notion of a specialization system was introduced around 1990.
Definition 1
 1.
\((\forall s^{\prime },s^{\prime \prime }\in \mathcal{S}) (\exists s\in \mathcal{S}): \mu (s)=\mu (s^{\prime }) \circ \mu (s^{\prime \prime })\).
 2.
\((\exists s\in \mathcal{S})(\forall a\in \mathcal{A}): \mu (s)(a)=a\).
 3.
\(\mathcal{G}\subseteq \mathcal{A}\).
Elements of \(\mathcal{A}\), \(\mathcal{G}\), and \(\mathcal{S}\) are called atoms, ground atoms, and specializations, respectively. The mapping \(\mu \) is called the specialization operator of \(\varGamma \). A specialization \(s\in \mathcal{S}\) is said to be applicable to \(a\in \mathcal{A}\) iff \(a\in \textit{dom}(\mu (s))\). \(\square \)
Assume that a specialization system \(\varGamma = \langle \mathcal{A}, \mathcal{G}, \mathcal{S}, \mu \rangle \) is given. A specialization in \(\mathcal{S}\) will often be denoted by a Greek letter such as \(\theta \). A specialization \(\theta \in \mathcal{S}\) will be identified with the partial mapping \(\mu (\theta )\) and used as a postfix unary (partial) operator on \(\mathcal{A}\) (e.g., \(\mu (\theta )(a) = a\theta \)), provided that no confusion is caused. Let \(\epsilon \) denote the identity specialization in \(\mathcal{S}\), i.e., \(a\epsilon = a\) for any \(a \in \mathcal{A}\). For any \(\theta , \sigma \in \mathcal{S}\), let \(\theta \circ \sigma \) denote a specialization \(\rho \in \mathcal{S}\) such that \(\mu (\rho ) = \mu (\sigma ) \circ \mu (\theta )\), i.e., \(a(\theta \circ \sigma ) = (a\theta )\sigma \) for any \(a \in \mathcal{A}\).
2.2 UserDefined Atoms, Constraint Atoms, and Clauses
Let \(\varGamma _\mathrm{u} = \langle \mathcal{A}_\mathrm{u}, \mathcal{G}_\mathrm{u}, \mathcal{S}_\mathrm{u}, \mu _\mathrm{u} \rangle \) and \(\varGamma _\mathrm{c} = \langle \mathcal{A}_\mathrm{c}, \mathcal{G}_\mathrm{c}, \mathcal{S}_\mathrm{c}, \mu _\mathrm{c} \rangle \) be specialization systems such that \(\mathcal{S}_\mathrm{u} = \mathcal{S}_\mathrm{c}\). Elements of \(\mathcal{A}_\mathrm{u}\) are called userdefined atoms and those of \(\mathcal{G}_\mathrm{u}\) are called ground userdefined atoms. Elements of \(\mathcal{A}_\mathrm{c}\) are called constraint atoms and those of \(\mathcal{G}_\mathrm{c}\) are called ground constraint atoms. Hereinafter, assume that \(\mathcal{S}= \mathcal{S}_\mathrm{u} = \mathcal{S}_\mathrm{c}\). Elements of \(\mathcal{S}\) are called specializations. Let TCon denote the set of all true ground constraint atoms.
2.3 Interpretations and Models
An interpretation is a subset of \(\mathcal{G}_\mathrm{u}\). Unlike ground userdefined atoms, the truth values of ground constraint atoms are predetermined by TCon (cf. Sect. 2.2) independently of interpretations. A ground constraint atom g is true iff \(g \in \text {TC}\textsc {on}\). It is false otherwise.
 1.
There exists \(i \in \{ 1, \ldots , m \}\) such that \(a_i \in G \cup \text {TC}\textsc {on}\).
 2.
There exists \(j \in \{ 1, \ldots , n \}\) such that \(b_j \notin G \cup \text {TC}\textsc {on}\).
A clause C is true with respect to an interpretation \(G \subseteq \mathcal{G}_\mathrm{u}\) (in other words, G satisfies C) iff for any specialization \(\theta \) such that \(C\theta \) is ground, \(C\theta \) is true with respect to G. A model of a clause set \(\textit{Cs}\subseteq \text {C}\textsc {ls}\) is an interpretation that satisfies every clause in \(\textit{Cs}\).
Note that the standard semantics is taken in this paper, i.e., all models of a formula are considered instead of specific ones, such as those considered in the minimal model semantics [6, 11] (i.e., the semantics underlying logic programming) and those considered in stable model semantics [9, 10] (i.e., the semantics underlying answer set programming).
2.4 ModelIntersection (MI) Problems
Let Models be a mapping that associates with each clause set the set of all of its models, i.e., Models \((\textit{Cs})\) is the set of all models of \(\textit{Cs}\) for any \(\textit{Cs}\subseteq \text {C}\textsc {ls}\).
Assume that a person A and a person B are interested in knowing which atoms in \(\mathcal{G}_\mathrm{u}\) are true and which atoms in \(\mathcal{G}_\mathrm{u}\) are false. They want to know the unknown set G of all true ground atoms. Due to shortage of knowledge, A still cannot determine one unique true subset of \(\mathcal{G}_\mathrm{u}\). The person A can only limit possible subsets of true atoms by specifying a subset Gs of \(\textit{pow}({\mathcal{G}_\mathrm{u}})\). The unknown set G of all true atoms belongs to \(\textit{Gs}\). One way for A to inform this knowledge to B compactly is to send to B a clause set \(\textit{Cs}\) such that \(\textit{Gs} \subseteq \textit{Models}(\textit{Cs})\). Receiving \(\textit{Cs}\), B knows that \(\textit{Models}(\textit{Cs})\) includes all possible intended sets of ground atoms, i.e., \(G \in \textit{Models}(\textit{Cs})\). As such, B can know that each ground atom outside \(\bigcup \textit{Models}(\textit{Cs})\) is false, i.e., for any \(g \in \mathcal{G}_\mathrm{u}\), if \(g \notin \bigcup \textit{Models}(\textit{Cs})\), then \(g \notin G\). The person B can also know that each ground atom in \(\bigcap \textit{Models}(\textit{Cs})\) is true, i.e., for any \(g \in \mathcal{G}_\mathrm{u}\), if \(g \in \bigcap \textit{Models}(\textit{Cs})\), then \(g \in G\). This shows the importance of calculating \(\bigcap \textit{Models}(\textit{Cs})\).
2.5 QueryAnswering (QA) Problems
Let \(\textit{Cs}\subseteq \text {C}\textsc {ls}\). For any \(\textit{Cs}^\prime \subseteq \text {C}\textsc {ls}\), \(\textit{Cs}^\prime \) is a logical consequence of \(\textit{Cs}\), denoted by \(\textit{Cs}\models \textit{Cs}^\prime \), iff every model of \(\textit{Cs}\) is also a model of \(\textit{Cs}^\prime \). For any \(a \in \mathcal{A}_\mathrm{u}\), a is a logical consequence of \(\textit{Cs}\), denoted by \(\textit{Cs}\models a\), iff \(\textit{Cs}\models \{ (a \leftarrow ) \}\).
Theorem 1
Proof:
Theorem 1 shows the importance of the intersection of all models of a clause set. By this theorem, the answer to a QA problem can be rewritten as follows:
Theorem 2
Let \(\textit{Cs}\subseteq \mathrm{C}\textsc {ls}\) and \(a \in \mathcal{A}_\mathrm{u}\). Then \(\textit{ans}_\mathrm{QA}(\textit{Cs}, a) = \textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi _1)\), where for any \(G \subseteq \mathcal{G}_\mathrm{u}\), \(\varphi _1(G) = \textit{rep}(a) \cap G\).
Proof:
It follows from Theorem 1 and the definition of \(\varphi _1\) that \(\textit{ans}_\mathrm{QA}(\textit{Cs}, a) = \varphi _1(\bigcap \textit{Models}(\textit{Cs})) = \textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi _1)\). \(\square \)
This is one way to regard a QA problem as a MI problem, which can be understood as follows: The set \(\bigcap \textit{Models}(\textit{Cs})\) often contains too many ground atoms. The set \(\textit{rep}(a)\) specifies a range of interest in the set \(\mathcal{G}_\mathrm{u}\). The exit mapping \(\varphi _1\) focuses attention on the part \(\textit{rep}(a)\) by making intersection with it.
Theorem 3 below shows another way to formalize a QA problem as a MI problem.
Theorem 3
Proof:
In logic programming [11], a problem represented by a pair of a set of definite clauses and a query atom has been intensively discussed. In the description logic (DL) community [4], a class of problems formulated as conjunctions of DLbased axioms and assertions together with query atoms has been discussed [13]. These two problem classes can be formalized as subclasses of QA problems considered in this paper.
2.6 Proof Problems
Theorem 4
Proof:
Let b be a ground userdefined atom that is not an instance of any userdefined atom occurring in \(\textit{Cs}\). If m is a model of \(\textit{Cs}\), then \(m  \{ b \}\) is also a model of \(\textit{Cs}\). Obviously, \(m  \{ b \} \ne \mathcal{G}_\mathrm{u}\). Therefore, (i) if \(\textit{Models}(\textit{Cs}) \ne \emptyset \), then \(\bigcap \textit{Models}(\textit{Cs}) \ne \mathcal{G}_\mathrm{u}\), and (ii) if \(\textit{Models}(\textit{Cs}) = \emptyset \), then \(\bigcap \textit{Models}(\textit{Cs}) = \bigcap \{\} = \mathcal{G}_\mathrm{u}\). Hence \(\textit{ans}_\mathrm{Pr}(E_1, E_2) = \textit{ans}_\mathrm{MI}(\textit{Cs},\varphi _3)\). \(\square \)
3 Solving MI Problems by Equivalent Transformation
A general schema for solving MI problems based on equivalent transformation is formulated and its correctness is shown (Theorem 9).
3.1 Preservation of Partial Mappings and Equivalent Transformation
Terminologies such as preservation of partial mappings and equivalent transformation are defined in general below. They will be used with a specific class of partial mappings called target mappings, which will be introduced in Sect. 3.2.
Assume that X and Y are sets and f is a partial mapping from X to Y. For any \(x, x^\prime \in \textit{dom}(f)\), transformation of x into \(x^\prime \) is said to preserve f iff \(f(x) = f(x^\prime )\). For any \(x, x^\prime \in \textit{dom}(f)\), transformation of x into \(x^\prime \) is called equivalent transformation (ET) with respect to f iff the transformation preserves f, i.e., \(f(x) = f(x^\prime )\).
Let \(\mathbb {F}\) be a set of partial mappings from a set X to a set Y. Given \(x, x^\prime \in X\), transformation of x into \(x^\prime \) is called equivalent transformation (ET) with respect to \(\mathbb {F}\) iff there exists \(f \in \mathbb {F}\) such that the transformation preserves f. A sequence \([x_0, x_1, \ldots , x_n]\) of elements in X is called an equivalent transformation sequence (ET sequence) with respect to \(\mathbb {F}\) iff for any \(i \in \{ 0, 1, \ldots , n1 \}\), transformation of \(x_i\) into \(x_{i+1}\) is ET with respect to \(\mathbb {F}\). When emphasis is placed on the initial element \(x_0\) and the final element \(x_n\), this sequence is also referred to as an ET sequence from \(x_0\) to \(x_n\).
3.2 Target Mappings and Answer Mappings
Given a MI problem \(\langle \textit{Cs}, \varphi \rangle \), since \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = \varphi (\bigcap \textit{Models}(\textit{Cs}))\), the answer to this MI problem is determined uniquely by \(\textit{Models}(\textit{Cs})\) and \(\varphi \). As a result, we can equivalently consider a new MI problem with the same answer by switching from \(\textit{Cs}\) to another clause set \(\textit{Cs}^\prime \) if \(\textit{Models}(\textit{Cs}) = \textit{Models}(\textit{Cs}^\prime )\). According to the general terminologies defined in Sect. 3.1, on condition that \(\textit{Models}(\textit{Cs}) = \textit{Models}(\textit{Cs}^\prime )\), transformation from \(x = \textit{Cs}\) into \(x^\prime = \textit{Cs}^\prime \) preserves \(f = \textit{Models}\) and is called ET with respect to \(f = \textit{Models}\), where (i) \(x, x^\prime \in \textit{pow}({\text {C}\textsc {ls}})\) and (ii) \(\textit{Models}(x), \textit{Models}(x^\prime ) \in \textit{pow}({\textit{pow}({\mathcal{G}_\mathrm{u}})})\). We can also consider an ET sequence \([ \textit{Cs}_0, \textit{Cs}_1, \ldots , \textit{Cs}_n ]\) of elements in \(\textit{pow}({\text {C}\textsc {ls}})\) with respect to a singleton set \(\{ \textit{Models} \}\). MI problems can be transformed into simpler forms by ET preserving \(\textit{Models}\).
In order to use more partial mappings for simplification of MI problems, we extend our consideration from the specific mapping \(\textit{Models}\) to a class of partial mappings, called GSetMap, defined below.
Definition 2
GSetMap is the set of all partial mappings from \(\textit{pow}({\text {C}\textsc {ls}})\) to \(\textit{pow}({\textit{pow}({\mathcal{G}_\mathrm{u}})})\). \(\square \)
As defined in Sect. 2.4, \(\textit{Models}(\textit{Cs})\) is the set of all models of \(\textit{Cs}\) for any \(\textit{Cs}\subseteq \text {C}\textsc {ls}\). Since a model is a subset of \(\mathcal{G}_\mathrm{u}\), \(\textit{Models}\) is regarded as a total mapping from \(\textit{pow}({\text {C}\textsc {ls}})\) to \(\textit{pow}({\textit{pow}({\mathcal{G}_\mathrm{u}})})\). Since a total mapping is also a partial mapping, the mapping \(\textit{Models}\) is a partial mapping from \(\textit{pow}({\text {C}\textsc {ls}})\) to \(\textit{pow}({\textit{pow}({\mathcal{G}_\mathrm{u}})})\), i.e., it is an element of GSetMap.
A partial mapping M in GSetMap is of particular interest if \(\bigcap M(\textit{Cs}) = \bigcap \textit{Models}(\textit{Cs})\) for any \(\textit{Cs}\in \textit{dom}(M)\). Such a partial mapping is called a target mapping.
Definition 3
A partial mapping \(M \in \text {GS}\textsc {et}\text {M}\textsc {ap}\) is a target mapping iff for any \(\textit{Cs}\in \textit{dom}(M)\), \(\bigcap M(\textit{Cs}) = \bigcap \textit{Models}(\textit{Cs})\). \(\square \)
It is obvious that:
Theorem 5
The mapping Models is a target mapping. \(\square \)
The next theorem provides a sufficient condition for a mapping in GSetMap to be a target mapping.
Theorem 6
 1.
\(M(\textit{Cs}) \subseteq \textit{Models}(\textit{Cs})\) for any \(\textit{Cs}\in \textit{dom}(M)\).
 2.
For any \(\textit{Cs}\in \textit{dom}(M)\) and any \(m_2 \in \textit{Models}(\textit{Cs})\), there exists \(m_1 \in M(\textit{Cs})\) such that \(m_1 \subseteq m_2\).
Proof:
Assume that Conditions 1 and 2 above hold. Let \(\textit{Cs}\in \textit{dom}(M)\). By Condition 1, \(\bigcap M(\textit{Cs}) \supseteq \bigcap \textit{Models}(\textit{Cs})\). We show that \(\bigcap M(\textit{Cs}) \subseteq \bigcap \textit{Models}(\textit{Cs})\) as follows: Assume that \(g \in \bigcap M(\textit{Cs})\). Let \(m_2 \in \textit{Models}(\textit{Cs})\). By Condition 2, there exists \(m_1 \in M(\textit{Cs})\) such that \(m_1 \subseteq m_2\). Since \(g \in \bigcap M(\textit{Cs})\), g belongs to \(m_1\). So \(g \in m_2\). Since \(m_2\) is any arbitrary element of \(\textit{Models}(\textit{Cs})\), g belongs to \(\bigcap \textit{Models}(\textit{Cs})\). It follows that \(\bigcap M(\textit{Cs}) = \bigcap \textit{Models}(\textit{Cs})\). Hence M is a target mapping. \(\square \)
Definition 4
A partial mapping A from \(\textit{pow}({\text {C}\textsc {ls}})\) to a set W is an answer mapping with respect to an exit mapping \(\varphi \) iff for any \(\textit{Cs}\in \textit{dom}(A)\), \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = A(\textit{Cs})\). \(\square \)
If M is a target mapping, then M can be used for computing the answers to MI problems. More precisely:
Theorem 7
Let M be a target mapping and \(\varphi \) an exit mapping. Suppose that A is a partial mapping such that \(\textit{dom}(A) = \textit{dom}(M)\) and for any \(\textit{Cs}\in \textit{dom}(M)\), \(A(\textit{Cs}) = \varphi (\bigcap M(\textit{Cs}))\). Then A is an answer mapping with respect to \(\varphi \).
Proof:
Let \(\textit{Cs}\in \textit{dom}(A)\). Since \(\textit{dom}(A) = \textit{dom}(M)\), \(\textit{Cs}\) belongs to \(\textit{dom}(M)\). Since M is a target mapping, \(\bigcap M(\textit{Cs}) = \bigcap \textit{Models}(\textit{Cs})\). Thus \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = \varphi (\bigcap \textit{Models}(\textit{Cs})) = \varphi (\bigcap M(\textit{Cs})) = A(\textit{Cs})\). So A is an answer mapping with respect to \(\varphi \). \(\square \)
3.3 ET Steps and ET Rules
Next, a schema for solving MI problems based on equivalent transformation (ET) preserving answers is formulated. The notions of preservation of answers/target mappings, ET with respect to answers/target mappings, and an ET sequence are obtained by specializing the general definitions in Sect. 3.1.
Let \(\pi \) be a mapping, called state mapping, from a given set State to the set of all MI problems. Elements of State are called states.
Definition 5
Let \(\langle S,S^\prime \rangle \in \text {S}\textsc {tate} \times \text {S}\textsc {tate}\). \(\langle S,S^\prime \rangle \) is an ET step with respect to \(\pi \) iff if \(\pi (S)= \langle \textit{Cs}, \varphi \rangle \) and \(\pi (S^\prime ) = \langle \textit{Cs}^\prime , \varphi ^\prime \rangle \), then \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = \textit{ans}_\mathrm{MI}(\textit{Cs}^\prime , \varphi ^\prime )\).
\(\square \)
Definition 6
A sequence \([S_0, S_1, \ldots , S_n]\) of elements of State is an ET sequence with respect to \(\pi \) iff for any \(i \in \{ 0,1, \ldots , n1 \}\), \(\langle S_i, S_{i+1} \rangle \) is an ET step with respect to \(\pi \). \(\square \)
The role of ET computation constructing \([S_0, S_1, \ldots , S_n]\) is to start with \(S_0\) and to reach \(S_n\) from which the answer to the given problem can be easily computed.
The concept of ET rule on State is defined by:
Definition 7
An ET rule r on State with respect to \(\pi \) is a partial mapping from State to State such that for any \(S \in \textit{dom}(r)\), \(\langle S, r(S) \rangle \) is an ET step with respect to \(\pi \). \(\square \)
We also define ET rules on \(\textit{pow}({\textsc {Cls}})\) as follows:
Definition 8
An ET rule r with respect to a target mapping M is a partial mapping from \(\textit{pow}({\text {C}\textsc {ls}})\) to \(\textit{pow}({\text {C}\textsc {ls}})\) such that for any \(\textit{Cs}\in \textit{dom}(r)\), \(M(\textit{Cs}) = M(r(\textit{Cs}))\). \(\square \)
We can construct an ET rule on State based on target mappings.
Theorem 8
Assume that M is a target mapping and r is a partial mapping from \(\textit{pow}({\mathrm{C}\textsc {ls}})\) to \(\textit{pow}({\mathrm{C}\textsc {ls}})\). Let \(\bar{r}\) be defined as a partial mapping from \(\mathrm{S}\textsc {tate}\) to \(\mathrm{S}\textsc {tate}\) such that for any \(S \in \mathrm{S}\textsc {tate}\), if \(\pi (S) = \langle \textit{Cs}, \varphi \rangle \), then \(\pi (\bar{r}(S)) = \langle r(\textit{Cs}), \varphi \rangle \). If r is an ET rule with respect to M, then \(\bar{r}\) is an ET rule on \(\mathrm{S}\textsc {tate}\).
Proof:
3.4 Correct Solutions Based on ET Rules

\(\varphi \) is an exit mapping,

\(\text {P}\textsc {rob} = \textit{pow}({\text {C}\textsc {ls}}) \times \{ \varphi \}\),

\(\text {S}\textsc {tate}\) is a set of states and \(\pi \) is a state mapping for \(\text {S}\textsc {tate}\) such that for any \(S \in \text {S}\textsc {tate}\), the second component of \(\pi (S)\) is \(\varphi \), and

A is an answer mapping with respect to \(\varphi \).
 1.
Assume that a MI problem \(\langle \textit{Cs}, \varphi \rangle \) in \(\text {P}\textsc {rob}\) is given as an input problem.
 2.
Prepare a set R of ET rules on \(\text {S}\textsc {tate}\) with respect to \(\pi \).
 3.
Take \(S_0\) such that \(\pi (S_0) = \langle \textit{Cs}, \varphi \rangle \) to start computation from \(S_0\).
 4.
Construct an ET sequence \([ S_0, \ldots , S_n ]\) by applying ET rules in R, i.e., for each \(i \in \{ 0, 1, \ldots , n1 \}\), \(S_{i+1}\) is obtained from \(S_i\) by selecting and applying \(r_i \in R\) such that \(S_i \in \textit{dom}(r_i)\) and \(r_i(S_i) = S_{i+1}\).
 5.
Assume that \(\pi (S_n) = \langle \textit{Cs}_n, \varphi \rangle \). If the computation reaches the domain of A, i.e., \(\textit{Cs}_n \in \textit{dom}(A)\), then compute the answer by using the answer mapping A, i.e., output \(A(\textit{Cs}_n)\).
Given a set \(\textit{Cs}\) of clauses and an exit mapping \(\varphi \), the answer to the MI problem \(\langle \textit{Cs}, \varphi \rangle \), i.e., \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = \varphi (\bigcap \textit{Models}(\textit{Cs}))\), can be directly obtained by the computation shown in the leftmost path in Fig. 1. Instead of taking this computation path, the above solution takes a different one, i.e., the lowest path (from \(\textit{Cs}\) to \(\textit{Cs}^\prime \)) followed by the rightmost path (through A) in Fig. 1.
The selection of \(r_i\) in R at Step 4 is nondeterministic and there may be many possible computation paths for each MI problem. Every output computed by using any arbitrary computation path is correct. When the set R gives at least one correct computation path for each MI problem in \(\text {P}\textsc {rob}\), R can be regarded as an algorithm for \(\text {P}\textsc {rob}\).
Theorem 9
The above procedure gives the correct answer to \(\langle \textit{Cs}, \varphi \rangle \).
Proof
Since \([ S_0, \ldots , S_n ]\) is an ET sequence, \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = \textit{ans}_\mathrm{MI}(\textit{Cs}_n, \varphi )\). Since A is an answer mapping with respect to \(\varphi \), \(\textit{ans}_\mathrm{MI}(\textit{Cs}_n, \varphi ) = A(\textit{Cs}_n)\). Hence \(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = A(\textit{Cs}_n)\). \(\square \)
3.5 Computation Cost for Solving MI Problems

For any S, \(S^\prime \in \text {S}\textsc {tate}\), let \(\textit{trans}(S, S^\prime )\) denote the transformation of S into \(S^\prime \), and \(\textit{time}(\textit{trans}(S, S^\prime ))\) denote the computation time required for this transformation step.

Let \(\pi \) be a state mapping. For any answer mapping A and \(S \in \text {S}\textsc {tate}\), let \(\textit{comp}(A, S)\) denote the computation of \(A(\textit{Cs})\), where \(\pi (S) = \langle \textit{Cs}, \varphi \rangle \), and let \(\textit{time}(\textit{comp}(A, S))\) denote the amount of time required for this computation.
4 Target Mappings for Clauses
Next, three target mappings are introduced, i.e., \(\tau _1\) for sets of positive unit clauses, \(\tau _2\) for sets of definite clauses, and \(\mathbb {MM}\) for sets of arbitrary clauses.
4.1 A Target Mapping for Sets of Positive Unit Clauses
 1.For any \(F \subseteq \text {PU}\textsc {cl}\), \(\tau _1(F)\) is the singleton set \(\{ m_F \}\), where$$ \begin{aligned} m_F = \{ a \theta \mid&((a \leftarrow b_1, \ldots , b_n) \in F) \ \& \ (\theta \in \mathcal{S}) \ \& \\&(a\theta \in \mathcal{G}_\mathrm{u}) \ \& \ (\{ b_1\theta , \ldots , b_n\theta \} \subseteq \text {TC}\textsc {on}) \}. \end{aligned}$$
 2.
For any \(\textit{Cs}\subseteq \text {C}\textsc {ls}\) such that \(\textit{Cs}\not \subseteq \text {PU}\textsc {cl}\), \(\tau _1(\textit{Cs})\) is undefined.
Theorem 10
\(\tau _1\) is a target mapping.
Proof:
Assume that \(F \subseteq \text {PU}\textsc {cl}\). Let \(\tau _1(F) = \{ m_F \}\). Obviously, \(m_F\) is a model of F. Hence \(\tau _1(F) = \{ m_F \} \subseteq \textit{Models}(F)\). So the first condition of Theorem 6 is satisfied for \(\tau _1\).
Now assume that \(F \subseteq \text {PU}\textsc {cl}\) and \(m \in \textit{Models}(F)\). Let \(\tau _1(F) = \{ m_F \}\). Then \(m_F \in \tau _1(F)\) and \(m_F \subseteq m\). So the second condition of Theorem 6 is also satisfied for \(\tau _1\). Thus \(\tau _1\) is a target mapping by Theorem 6. \(\square \)
4.2 A Target Mapping for Sets of Definite Clauses
 1.A mapping \(T_D\) on \(\textit{pow}({\mathcal{G}})\) is defined by: for any set \(G \subseteq \mathcal{G}\), \(T_D(G)\) is the set$$ \begin{aligned} \{ \textit{head}(C\theta ) \mid&(C \in D) \ \& \ (\theta \in \mathcal{S}) \ \& \\&(\text {each userdefined atom in }\textit{body}(C\theta ) \text { is in }G) \ \& \\&(\text {each constraint atom in }\textit{body}(C\theta ) \text { is true}) \}. \end{aligned}$$
 2.
\(\mathcal{M}(D)\) is then defined as the set \(\bigcup ^{\infty }_{n=1}T^n_D(\emptyset )\), where \(T^1_D(\emptyset ) = T_D(\emptyset )\) and for each \(n > 1\), \(T^n_D(\emptyset ) = T_D(T^{n1}_D(\emptyset ))\).
Then a partial mapping \(\tau _2 \in \text {GS}\textsc {et}\text {M}\textsc {ap}\) is defined below.
 1.
For any \(D \subseteq \text {D}\textsc {cl}\), \(\tau _2(D)\) is the singleton set \(\{ \mathcal{M}(D) \}\).
 2.
For any \(\textit{Cs}\subseteq \text {C}\textsc {ls}\) such that \(\textit{Cs}\not \subseteq \text {D}\textsc {cl}\), \(\tau _2(\textit{Cs})\) is undefined.
Theorem 11
\(\tau _2\) is a target mapping.
Proof:
Let \(D \subseteq \text {D}\textsc {cl}\). Since \(\mathcal{M}(D)\) is a model of D, \(\tau _2(D) = \{ \mathcal{M}(D) \} \subseteq \textit{Models}(D)\). So the first condition of Theorem 6 is satisfied for \(\tau _2\). Let \(m \in \textit{Models}(D)\). Since \(\mathcal{M}(D)\) is the least model of D, \(\mathcal{M}(D) \subseteq m\). So the second condition of Theorem 6 is satisfied for \(\tau _2\). By Theorem 6, \(\tau _2\) is a target mapping.
\(\square \)
Theorem 12
For any \(F \subseteq \mathrm{PU}\textsc {cl}\), \(\tau _2(F) = \tau _1(F)\).
Proof:
For any \(F \subseteq \text {PU}\textsc {cl}\), \(\tau _2(F) = \{ \mathcal{M}(F) \} = \{ m_F \} = \tau _1(F)\). \(\square \)
4.3 A Target Mapping for All Clause Sets
Given a clause C, the set of all userdefined atoms and constraint atoms in the lefthand side of C is denoted by \(\textit{lhs}(C)\) and the set of all those in the righthand side of C is denoted by \(\textit{rhs}(C)\). A clause is said to be positive if there is at least one userdefined atom in its lefthand side; it is said to be negative otherwise.
It is assumed henceforth that (i) for any constraint atom c, not(c) is a constraint atom; (ii) for any constraint atom c and any specialization \(\theta \), \(not(c)\theta = not(c\theta )\); and (iii) for any ground constraint atom c, c is true iff not(c) is not true.
The following notation is used for defining a target mapping \(\mathbb {MM}\) for arbitrary clauses in Cls (Definition 9).
 1.
Let \(\textit{Cs}\) be a set of clauses possibly with constraint atoms. \(\textsc {mv}\mathrm{R}\textsc {hs}(\textit{Cs})\) is defined as the set \(\{ \textsc {mv}\mathrm{R}\textsc {hs}(C) \mid C \in \textit{Cs}\}\), where for any clause \(C \in \textit{Cs}\), \(\textsc {mv}\mathrm{R}\textsc {hs}(C)\) is the clause obtained from C as follows: For each constraint atom c in \(\textit{lhs}(C)\), remove c from \(\textit{lhs}(C)\) and add not(c) to \(\textit{rhs}(C)\).
 2.Let \(\textit{Cs}\) be a set of clauses with no constraint atom in their lefthand sides. For any \(G \subseteq \mathcal{G}\), \(\mathrm{G}\textsc {inst}(\textit{Cs}, G)\) is defined as the setwhere for any clause \(C^\prime \), \(\textsc {rm}\mathrm{C}\textsc {on}(C^\prime )\) is the clause obtained from \(C^\prime \) by removing all constraint atoms from it.$$ \begin{aligned} \{ \textsc {rm}\mathrm{C}\textsc {on}(C\theta ) \mid&(C \in \textit{Cs}) \ \& \ (\theta \in \mathcal{S}) \ \& \\&(\text {each userdefined atom in }C\theta \text { is in } G) \ \& \\&(\text {each constraint atom in }\textit{rhs}(C\theta ) \text { is true}) \}, \end{aligned}$$
 3.Let \(\textit{Cs}\) be a set of clauses possibly with constraint atoms. For any \(G \subseteq \mathcal{G}\), \(\mathrm{I}\textsc {nst}(\textit{Cs}, G)\) is defined by$$ \mathrm{I}\textsc {nst}(\textit{Cs}, G) = \mathrm{G}\textsc {inst}(\textsc {mv}\mathrm{R}\textsc {hs}(\textit{Cs}), G). $$
 4.Let \(\textit{Cs}\) be a set of ground clauses with no constraint atom. We can construct a set of definite clauses from \(\textit{Cs}\) as follows: For each clause \(C \in \textit{Cs}\),

if \(\textit{lhs}(C) = \emptyset \), then construct a definite clause the head of which is \(\bot \) and the body of which is \(\textit{rhs}(C)\), where \(\bot \) is a special symbol not occurring in \(\textit{Cs}\);

if \(\textit{lhs}(C) \ne \emptyset \), then (i) select one arbitrary atom a from \(\textit{lhs}(C)\), and (ii) construct a definite clause the head of which is a and the body of which is \(\textit{rhs}(C)\).
Let \(\mathrm{D}\textsc {c}(\textit{Cs})\) denote the set of all definiteclause sets possibly constructed from \(\textit{Cs}\) in the above way.

Proposition 1
Let \(\textit{Cs}\subseteq \mathrm{C}\textsc {ls}\). For any \(m \subseteq \mathcal{G}\), m is a model of \(\textit{Cs}\) iff m is a model of \(\mathrm{I}\textsc {nst}(\textit{Cs}, \mathcal{G})\).
Proof:
\(\mathrm{I}\textsc {nst}(\textit{Cs}, \mathcal{G})\) is obtained from \(\textit{Cs}\) by (i) moving constraint atoms in the lefthand sides of clauses into their righthand sides, (ii) instantiation of variables into ground terms, (iii) removal of clauses containing false constraint atoms in their righthand sides, and (iv) removal of true constraint atoms from the remaining clauses. Each of the operations (i), (ii), (iii), and (iv) preserves models. \(\square \)
A mapping \(\mathbb {MM}\) is defined below.
Definition 9
Theorem 13
\(\mathbb {MM}\) is a target mapping.
Proof:

Let \(C_P\) be a positive clause in \(\textit{Cs}^\prime \). Since \(D \in \mathrm{D}\textsc {c}(\textit{Cs}^\prime )\), there exists \(C \in D\) such that \(\textit{head}(C) \in \textit{lhs}(C_P)\) and \(\textit{body}(C) = \textit{rhs}(C_P)\). Since m satisfies C, m also satisfies \(C_P\). Hence m satisfies every positive clause in \(\textit{Cs}^\prime \).

Let \(C_N\) be a negative clause in \(\textit{Cs}^\prime \). Since \(D \in \mathrm{D}\textsc {c}(\textit{Cs}^\prime )\), there exists \(C^\prime \in D\) such that \(\textit{head}(C^\prime ) = \bot \) and \(\textit{body}(C^\prime ) = \textit{rhs}(C_N)\). Since \(\bot \notin \mathcal{M}(D)\), m does not include \(\textit{body}(C^\prime )\). So \(\textit{rhs}(C_N) \not \subseteq m\), whence m satisfies \(C_N\). Hence m satisfies every negative clause in \(\textit{Cs}^\prime \).
So m is a model of \(\textit{Cs}^\prime \). By Proposition 1, m is a model of \(\textit{Cs}\), i.e., \(m \in \textit{Models}(\textit{Cs})\).
 1.Select an atom a from \(\textit{lhs}(C)\) as follows:
 (a)
If \(\textit{rhs}(C) \subseteq m^\prime \), then select an atom \(a \in \textit{lhs}(C) \cap m^\prime \).
 (b)
If \(\textit{rhs}(C) \not \subseteq m^\prime \), then select an arbitrary atom \(a \in \textit{lhs}(C)\).
 (a)
 2.
Construct \(C^\prime \) as a definite clause such that \(\textit{head}(C^\prime ) = a\) and \(\textit{body}(C^\prime ) = \textit{rhs}(C)\).
It is obvious that \(m^\prime \) is a model of D. Let \(m^{\prime \prime } = \mathcal{M}(D)\). Since \(m^{\prime \prime }\) is the least model of D, \(m^{\prime \prime } \subseteq m^\prime \). Since \(m^\prime \) is a model of \(\textit{Cs}^\prime \), \(m^\prime \) satisfies all negative clauses in \(\textit{Cs}^\prime \). Since \(m^{\prime \prime } \subseteq m^\prime \), \(m^{\prime \prime }\) also satisfies all negative clauses in \(\textit{Cs}^\prime \). It follows that \(\bot \notin \mathcal{M}(D)\). Hence \(m^{\prime \prime } \in \mathbb {MM}(\textit{Cs})\).
So \(\mathbb {MM}\) is a target mapping by Theorem 6. \(\square \)
Theorem 14
For any \(D \subseteq \mathrm{D}\textsc {cl}\), \(\mathbb {MM}(D) = \tau _2(D)\).
Proof:
5 Solutions for QA Problems/Proof Problems
ET solutions for QA problems/proof problems on clauses are given by specializing the solution schema of Sect. 3.
5.1 A Solution for QA Problems
First, we solve a QA problem by using an answer mapping that is determined by the target mapping \(\tau _1\) given in Sect. 4.1 (i.e., \(\tau _1(F) = \{ m_F \}\) for any \(F \subseteq \text {PU}\textsc {cl}\)).
 1.
Assume that a QA problem \(\langle \textit{Cs}, a \rangle \) is given.
 2.
Transform \(\langle \textit{Cs}, a \rangle \) into a MI problem \(\langle \textit{Cs}\cup \{ (p(x_1, \ldots , x_n) \leftarrow a) \}, \varphi _2 \rangle \), where p is a predicate that appears in neither \(\textit{Cs}\) nor a, the arguments \(x_1, \ldots , x_n\) are all the mutually different variables occurring in a, and \(\varphi _2\) is the exit mapping defined in Sect. 2.5, i.e., for any \(G \subseteq \mathcal{G}_\mathrm{u}\), \( \varphi _2(G) = \{ a\theta \mid (\theta \in \mathcal{S})\ \& \ (p(x_1, \ldots , x_n)\theta \in G) \}\).
 3.
Prepare a set R of ET rules to transform MI problems preserving their answers. For simplicity, we only use rules that do not change the second argument of a state (i.e., do not change the exit mapping).
 4.
Transform \(\langle \textit{Cs}\cup \{ (p(x_1, \ldots , x_n) \leftarrow a) \}, \varphi _2 \rangle \) equivalently by using ET rules in R.
 5.
If the transformation sequence reaches a MI problem of the form \(\langle F, \varphi _2 \rangle \), where F is a set of positive unit clauses with patoms in their heads, then the answer \(\varphi _2( m_F )\) is obtained.
5.2 A Solution for Proof Problems
Next, we apply the solution schema of Sect. 3 to proof problems. Since for any clause set \(\textit{Cs}\), \(\textit{Models}(\textit{Cs}) = \emptyset \) iff \(\bigcap \textit{Models}(\textit{Cs}) = \mathcal{G}_\mathrm{u}\) by the proof of Theorem 4, we use here an answer mapping that maps obviously unsatisfiable clause sets to “yes” and maps obviously satisfiable ones to “no”.
 1.
Assume that a proof problem \(\langle E_1, E_2 \rangle \) is given.
 2.
Transform \(E_1 \wedge \lnot E_2\) into a conjunctive normal form \(\textit{Cs}\) in order to obtain a MI problem \(\langle \textit{Cs}, \varphi _3 \rangle \), where \(\varphi _3\) is the exit mapping defined in Sect. 2.6, i.e., for any \(G \subseteq \mathcal{G}_\mathrm{u}\), \(\varphi _3(G) = \mathrm{``}\text {yes''}\) if \(G =\mathcal{G}_\mathrm{u}\), and \(\varphi _3(G) = \mathrm{``}\text {no''}\) otherwise.
 3.
Prepare a set R of ET rules to transform MI problems preserving their answers. For simplicity, we only use rules that do not change the second argument of a state (i.e., do not change the exit mapping).
 4.
Transform \(\langle \textit{Cs}, \varphi _3 \rangle \) equivalently by using ET rules in R.
 5.
If the transformation sequence reaches a MI problem of the form \(\langle \textit{Cs}^\prime , \varphi _3 \rangle \), where \(\textit{Cs}^\prime \) is a clause set that contains the empty clause, then the answer is “yes”. If the transformation sequence reaches a MI problem of the form \(\langle \textit{Cs}^\prime , \varphi _3 \rangle \), where \(\textit{Cs}^\prime \) is a set of positive clauses, then the answer is “no”.
For transformation to a conjunctive normal form at Step 2, the usual Skolemization [5] is used. Since resolution and factoring are ET rules [1], the solution for proof problems here includes the usual proof method using resolution. More precisely, for any computation path by the “resolution” proof method using the resolution and factoring inference rules, there is a corresponding MIbased computation path using resolution and factoring ET rules. We may find a better computation path by using other sets of ET rules. For instance, one disadvantage of using inference rules is an increase in the number of clauses, and this disadvantage can be solved by the use of unfolding and definiteclause removal ET rules.
6 Example
6.1 Problem Description
Let \(\textit{Cs}\) be the set consisting of the clauses \(C_1\)–\(C_{27}\) in Fig. 2. These clauses are obtained from the \(\textit{mayDoThesis}\) problem given in [7] with some modification.^{1} All atoms appearing in Fig. 2 belong to \(\mathcal{A}_\mathrm{u}\). The unary predicates NFP, FP, FM, Co, AC, BC, St, and Tp denote “nonteaching full professor,” “full professor,” “faculty member,” “course,” “advanced course,” “basic course,” “student,” and “topic,” respectively. The clauses \(C_9\)–\(C_{11}\) together provide the conditions for a student to do his/her thesis with a professor, where \(\textit{mayDoThesis}(s, p)\), \(\textit{curr}(s, t)\), \(\textit{expert}(p, t)\), \(\textit{exam}(s, c)\), and \(\textit{subject}(c, t)\) are intended to mean “s may do his/her thesis with p,” “s studied t in his/her curriculum,” “p is an expert in t,” “s passed the exam of c,” and “c covers t,” respectively, for any student s, any professor p, any topic t, and any course c.
6.2 Unfolding Operation

\(\textit{Cs}\subseteq \text {C}\textsc {ls}\).

D is a set of definite clauses in Cls.

\(\textit{occ}\) is an occurrence of an atom b in the righthand side of a clause C in \(\textit{Cs}\).
 1.
If b and \(\textit{head}(C^\prime \rho )\) are not unifiable, then \(\textit{resolvent}(C, C^\prime , b) = \emptyset \).
 2.If they are unifiable, then \(\textit{resolvent}(C, C^\prime , b) = \{C^{\prime \prime }\}\), where \(C^{\prime \prime }\) is the clause obtained from C and \(C^\prime \rho \) as follows, assuming that \(\theta \) is the most general unifier of b and \(\textit{head}(C^\prime \rho )\):
 (a)
\(\textit{lhs}(C^{\prime \prime }) = \textit{lhs}(C\theta )\)
 (b)
\(\textit{rhs}(C^{\prime \prime }) = (\textit{rhs}(C\theta )  \{ b\theta \}) \cup \textit{body}(C^\prime \rho \theta )\)
 (a)
The resulting clause set is denoted by \(\text {U}\textsc {nfold}(\textit{Cs}, D, \textit{occ})\).
Theorem 15
 1.
\(\textit{Cs}\subseteq \mathrm{C}\textsc {ls}\).
 2.
D is a set of definite clauses in \(\textit{Cs}\).
 3.
\(\textit{occ}\) is an occurrence of an atom in the righthand side of a clause in \(\textit{Cs} D\).
 4.
\(\varphi \) is an exit mapping.

\(\mathbb {MM}(\textit{Cs}) = \mathbb {MM}(\mathrm{U}\textsc {nfold}(\textit{Cs}, D, \textit{occ}))\), and

\(\textit{ans}_\mathrm{MI}(\textit{Cs}, \varphi ) = \textit{ans}_\mathrm{MI}(\mathrm{U}\textsc {nfold}(\textit{Cs}, D, \textit{occ}), \varphi )\). \(\square \)
6.3 Other Transformations
DefiniteClause Removal. Assume that (i) D is a set of definite clauses in \(\textit{Cs}\), (ii) the heads of all definite clauses in D are atoms with the same predicate symbol, say p, (iii) no patom appears in any clause in \(\textit{Cs} D\), and (iv) \(\varphi \) only refers to qatoms, where \(q \ne p\). Then \(\textit{Cs}\) can be transformed into \(\textit{Cs} D\).
Elimination of Subsumed Clauses and Elimination of Valid Clauses. A clause \(C_1\) is said to subsume a clause \(C_2\) iff there exists a substitution \(\theta \) for usual variables such that \(\textit{lhs}(C_1)\theta \subseteq \textit{lhs}(C_2)\) and \(\textit{rhs}(C_1)\theta \subseteq \textit{rhs}(C_2)\). If a clause set \(\textit{Cs}\) contains clauses \(C_1\) and \(C_2\) such that \(C_1\) subsumes \(C_2\), then \(\textit{Cs}\) can be transformed into \(\textit{Cs} \{ C_2 \}\).
A clause is valid iff all of its ground instances are true. Given a clause C, if some atom in \(\textit{rhs}(C)\) belongs to \(\textit{lhs}(C)\), then C is valid. A valid clause can be removed.
SideChange Transformation. Assume that p is a predicate occurring in a clause set \(\textit{Cs}\) and p does not appear in a query atom under consideration. The clause set \(\textit{Cs}\) can be transformed by changing the clause sides of patoms as follows: First, determine a new predicate notp for p. Next, move all patoms in each clause to their opposite side in the same clause (i.e., from the lefthand side to the righthand side and vice versa) with their predicates being changed from p to notp.
6.4 ET Computation

By (i) unfolding using the definitions of the predicates \(\textit{mayDoThesis}\), \(\textit{FP}\), \(\textit{Tp}\), \(\textit{curr}\), \(\textit{subject}\), \(\textit{expert}\), \(\textit{St}\), \(\textit{exam}\), \(\textit{funcf}_0\), and \(\textit{FM}\), (ii) removing these definitions using definiteclause removal, and (iii) removal of valid clauses, the clauses \(C_0\)–\(C_{27}\) are transformed into the clauses \(C_{28}\)–\(C_{42}\) in Fig. 3.

Sidechange transformation for \(\textit{NFP}\) enables (i) unfolding using the definitions of \(\textit{teach}\), \(\textit{Co}\), and \(\textit{AC}\), (ii) elimination of these definitions using definiteclause removal, (iii) removal of valid clauses, and (iv) elimination of subsumed clauses. By such sidechange transformation followed by transformation of these four types, \(C_{28}\)–\(C_{42}\) are transformed into the clauses \(C_{43}\)–\(C_{46}\) in Fig. 4.

Sidechange transformation for \(\textit{notNFP}\) enables unfolding using the definitions of \(\textit{BC}\) and \(\textit{NFP}\). By unfolding and definiteclause removal, \(C_{43}\)–\(C_{46}\) are transformed into \(C_{45}\), i.e., \((ans(\textit{john}) \leftarrow )\).
6.5 A Proof Problem and Its Solution
By modifying the QA problem in Sect. 6.1, we have a proof problem that determines whether there is a student who may do his/her thesis with \(\textit{paul}\).
This proof problem is formalized as a MI problem \(\langle \textit{Cs}\cup \{ C_0 \} \cup \{ C_{neg} \}, \varphi \rangle \), where \(C_{neg}\) is the negative clause \((\leftarrow ans(x))\) and for any \(G \subseteq \mathcal{G}_\mathrm{u}\), \(\varphi (G) = \mathrm{``}\text {yes''}\) if \(G = \mathcal{G}_\mathrm{u}\), and \(\varphi (G) = \mathrm{``}\text {no''}\) otherwise.
7 Conclusions
A modelintersection problem (MI problem) is a pair \(\langle \textit{Cs}, \varphi \rangle \), where \(\textit{Cs}\) is a set of clauses and \(\varphi \) is an exit mapping used for constructing the output answer from the intersection of all models of \(\textit{Cs}\). The class of MI problems considered in this paper has many parameters, such as abstract atoms, specializations, restriction on forms of clauses, etc. By instantiating these parameters, we can obtain theories for subclasses of QA and proof problems corresponding to conventional clausebased theories, such as datalog, Prolog, and many other extensions of Prolog.
The proposed solution schema for MI problems comprises the following steps: (i) formalize a given problem as an MI problem on some specialization system, (ii) prepare ET rules from answers/target mappings, (iii) construct an ET sequence preserving answers/target mappings, and (iv) compute the answer by using some answer mapping (possibly constructed on some target mapping).
We introduced the concept of target mapping and proposed three target mappings, i.e., \(\tau _1\) for sets of positive unit clauses, \(\tau _2\) for sets of definite clauses, and \(\mathbb {MM}\) for arbitrary sets of clauses. These target mappings provide a strong foundation for inventing many ET rules for solving MI problems on clauses. Many kinds of ET rules, including the resolution and factoring ET rules, are realized by transformations that preserve these target mappings. For instance, a proof based on the resolution principle can be regarded as ET computation using the resolution and factoring ET rules. By introducing new ET rules, we can devise a new proof method [2]. By inventing additional ET rules, we have been successful in solving a large class of QA problems [3].
By instantiation, the class of MI problems on specialization systems produces, among others, one of the largest classes of logical problems with firstorder atoms and substitutions. The ET solution has been proved to be very general and fundamental since its correctness for such a large class of problems has been shown in this paper. By its generality, the theory developed in this paper makes clear the fundamental and central structure of representation and computation for logical problem solving.
Footnotes
 1.
To represent the original \(\textit{mayDoThesis}\) problem in a clausal form, extended clauses with function variables are used. To change atoms with function variables into userdefined atoms, the \(\textit{funcf}_0\) predicate is used in the clauses \(C_{24}\)–\(C_{27}\).
Notes
Acknowledgments
This research was partially supported by JSPS KAKENHI Grant Numbers 25280078 and 26540110.
References
 1.Akama, K., Nantajeewarawat, E.: Proving theorems based on equivalent transformation using resolution and factoring. In: Proceedings of the Second World Congress on Information and Communication Technologies, WICT 2012, Trivandrum, India, pp. 7–12 (2012)Google Scholar
 2.Akama, K., Nantajeewarawat, E.: Embedding proof problems into queryanswering problems and problem solving by equivalent transformation. In: Proceedings of the 5th International Conference on Knowledge Engineering and Ontology Development, Vilamoura, Portugal, pp. 253–260 (2013)Google Scholar
 3.Akama, K., Nantajeewarawat, E.: Equivalent transformation in an extended space for solving queryanswering problems. In: Nguyen, N.T., Attachoo, B., Trawiński, B., Somboonviwat, K. (eds.) ACIIDS 2014. LNCS (LNAI), vol. 8397, pp. 232–241. Springer, Heidelberg (2014). doi: 10.1007/9783319054766_24 CrossRefGoogle Scholar
 4.Baader, F., Calvanese, D., McGuinness, D.L., Nardi, D., PatelSchneider, P.F. (eds.): The Description Logic Handbook, 2nd edn. Cambridge University Press, Cambridge (2007)Google Scholar
 5.Chang, C.L., Lee, R.C.T.: Symbolic Logic and Mechanical Theorem Proving. Academic Press, Cambridge (1973)MATHGoogle Scholar
 6.Clark, K.L.: Negation as failure. In: Gallaire, H., Minker, J. (eds.) Logic and Data Bases, pp. 293–322. Plenum Press, New York (1978)CrossRefGoogle Scholar
 7.Donini, F.M., Lenzerini, M., Nardi, D., Schaerf, A.: \({\cal{A}}{\cal{L}}\)log: integrating datalog and description logics. J. Intell. Inf. Syst. 16, 227–252 (1998)CrossRefGoogle Scholar
 8.Fitting, M.: FirstOrder Logic and Automated Theorem Proving, 2nd edn. Springer, Berlin (1996)CrossRefMATHGoogle Scholar
 9.Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. In: Proceedings of International Logic Programming Conference and Symposium, pp. 1070–1080. MIT Press (1988)Google Scholar
 10.Gelfond, M., Lifschitz, V.: Classical negation in logic programs and disjunctive databases. New Gener. Comput. 9, 365–386 (1991)CrossRefMATHGoogle Scholar
 11.Lloyd, J.W.: Foundations of Logic Programming, 2nd edn. Springer, Berlin (1987)CrossRefMATHGoogle Scholar
 12.Robinson, J.A.: A machineoriented logic based on the resolution principle. J. ACM 12, 23–41 (1965)MathSciNetCrossRefMATHGoogle Scholar
 13.Tessaris, S.: Questions and answers: reasoning and querying in description logic. Ph.D. thesis, Department of Computer Science, The University of Manchester, UK (2001)Google Scholar