Keywords

1 Introduction

Two main approaches have been explored to deal with inconsistencies. The first approach consists in providing paraconsistent logics with a theory of reasoning for handling inconsistent information. Among these works two widely used are: three valued logic \(\mathcal {LP}\) [14] and its variant \(\mathcal {LP}_m\) [15] focusing on minimally inconsistent models of \(\mathcal {LP}\). The great interest of \(\mathcal {LP}_m\) is to allow classical reasoning on inconsistent information, under some constraints. The second approach consists in measuring the degree of inconsistency of the knowledge base [10]. Inconsistency measures can be used to automatically recover consistent information [8], to determine the reliability assessment of the sources [5] and then help to handle inconsistencies. Numerous measures of inconsistency have been proposed [7, 9, 17]. The contension inconsistency measure \(I_c\) and its normalized version \(I_{LP_m}\) [10, 17] are two popular syntax independent inconsistency measures. \(I_c\) is based on the minimum number of inconsistent atoms in \(\mathcal {LP}_m\) models of the knowledge base K and \(I_{LP_m}\) is the ratio between \(I_c\) and the total number of atoms in K.

Under these considerations, having a decision procedure to produce the \(\mathcal {LP}_m\) models of a set of formulas is of prime interest since these models allow to check the satisfiability of an inconsistent set of formulas using \(\mathcal {LP}_m\) and all the minimal inconsistent models are required to compute syntax independent inconsistency measures such as \(I_c\) and \(I_{LP_m}\). To the best of our knowledge, few existing research addresses enumeration of models of some paraconsistent logic. This paper proposes a tableau-based decision procedure to compute all the \(\mathcal {LP}\) and the \(\mathcal {LP}_m\) models of a set of formulas K, which is sound and complete.

The tableau method, originally designed for classical propositional logic [2, 6, 16], is very intuitive and brings together the proof-theory and the semantic approaches of a logical system. It tries to build models of an input set of formulas by sequentially decomposing formulas according to decomposition rules based on the logical structure of formulas. The decomposition is organized in a tree called tableau. As soon as an inconsistency is found on a branch of this tree, the decomposition of the branch is stopped and the branch is considered as closed. A branch which is decomposed until no more decomposition rule can be applied outputs a set of modelsFootnote 1 of the initial set of formulas. At the end of the process if all the branches are closed, then the set of input formulas is considered as unsatisfiable.

The tableau method has also been used for proof systems using paraconsistent logics [1, 4]. Some work is focussed on paraconsistent logics \(\mathcal {LP}\) and \(\mathcal {LP}_m\) [3, 12]. The main concern is to show good reasoning properties of the underlying paraconsistent logics and/or that proof systems are sound and complete, decidable and can be implemented. Like tableau methods designed for classical propositional logic, theses tableau methods define conditions to close branches of the tableau tree, which are specific to the underlying paraconsistent logic and which are necessary for reasoning. For instance to prove that \(S \models _{\mathcal {LP}_m} A\) one have to show that the tableau of \(S \wedge \lnot A\) is closed [12]. Due to these closing conditions, these tableau methods can not produce all the paraconsistent models of an input set of formulas.

We propose an adaptation of the tableau method to enumerate the 3-valued models of a set of formulas according to the Logic of Paradox \(\mathcal {LP}\) and the Minimally Inconsistent Logic of Paradox \(\mathcal {LP}_m\). When an inconsistency is found in a branch, the corresponding inconsistent symbols are set to a specific valued called Both instead of closing the branch so that the decomposition process can go further. We provide an algorithm of this adaptation of the tableau method and show that it is sound and complete. We also show that, as a result of this algorithm, we can get a set of succinct models which summarizes all the \(\mathcal {LP}\) (respectively \(\mathcal {LP}_m\)) models of the input formulas. For the sake of conciseness and without loss of generality, we assume that the initial set of formulas is represented through propositional statements in NNF, which leads to only use two rules from the classical propositional tableau calculus for computing the paraconsistent models. The adaptation we propose can be extended to other tableau method with more than two rules and which does not require propositional statement to be in NNF.

The rest of the paper is organized as follows. After providing some technical preliminaries and a short introduction to \(\mathcal {LP}\) and \(\mathcal {LP}_m\) in Sect. 2, the proposal and its corresponding algorithms are presented in Sect. 3 while complexity and validity are provided in Sect. 4. Conclusion is given in Sect. 5.

2 Preliminaries

We consider a propositional language \(\mathcal L\) using a finite set of atoms \(P=\{p_1,\) \(p_2,...,p_n\}\) where the formulas are in Negation Normal Form (NNF). A formula \(\phi \) is in NNF iff all operators are negation \((\lnot )\), conjunction \((\wedge )\) and disjunction \((\vee )\), and negation operator only appears in front of atomic symbols. A literal is an atom or its negation.

A knowledge base K is a finite multiset of propositional formulas of \(\mathcal L\). At(K) denotes the set of atoms appearing in K. A literal is pure in K iff it appears in K and its negation does not.

In classical propositional logic an interpretation w is a total function from P to \(\{ F,T\}\), where F and T respectively represent False and True such that \(F<T\). The set of interpretations is denoted by \(\mathcal W\), its elements will be denoted by sets of valued propositional symbols

2.1 Logic of Paradox

The logic of paradox \(\mathcal {LP}\) introduced in [14] is one of the simplest paraconsistent logics. While classical logic assumes that no formula can be both True and False, \(\mathcal {LP}\) interprets such formulas as paradoxical formulas and can reason with them. \(\mathcal {LP}\) is a 3-valued logic such that an interpretation w is a total function from P to \(\{ F,B,T\}\) where B represents Both true and false, and F and T stand as usual for the truth values False and True, such that \(F<B<T\). B value characterises inconsistency and allows to find models for classically inconsistent set of formulas. An interpretation w is a \(\mathcal {LP}\) model of a formula \(\phi \), denoted \(w\models _{_{\mathcal {LP}}} \phi \) iff w assigns to \(\phi \) the truth value T or B in the \(\mathcal {LP}\) truth-functional way as in Tables 1 and 2. These truth tables are the same as the truth tables proposed by Kleene 3-valued logic [11]. However, in Kleene’s logic the only designated truth value is T while T and B are the designated truth values in \(\mathcal {LP}\).

Table 1. Truth table for negation in the logic of paradox
Table 2. Truth table for conjunction and disjunction in the logic of paradox

Implication and equivalence are defined in terms of conjunction and disjunction as usual: \(\phi \rightarrow \psi \equiv \lnot \phi \vee \psi \) and \(\phi \leftrightarrow \psi \equiv (\lnot \phi \vee \psi ) \wedge (\phi \vee \lnot \psi )\).

If w is a \(\mathcal {LP}\) model for every formula in a knowledge base K then we write \(w\models _{_{\mathcal {LP}}}K\). The set of \(\mathcal {LP}\) models of a knowledge base K is denoted by \(\llbracket K \rrbracket _{_{\mathcal {LP}}}\). There is at least one \(\mathcal {LP}\) model for every knowledge base K, i.e. if \(w(p_i)=B\) for \(i= 1, \dots , n\), then \(w(K)=B\). The set of \(\mathcal {LP}\) models of the language is denoted by \({\mathcal W}_{_{\mathcal {LP}}}\) and its elements will be denoted by sets of the form \(\{ l_1,...,l_n\}\) where \(l_i=p_i\) iff \(w(p_i)=T\), \(l_i=\pm p_i\) iff \(w(p_i)=B\) and \(l_i=\lnot p_i\) iff \(w(p_i)=F\).

Example 1

Consider the set of formulas \(K_1=\{a,b\vee c,\lnot a \wedge \lnot b\}\); in classical and Kleene logics \(K_1\) is inconsistent (\(K_1\models \perp \)). However, in \(\mathcal {LP}\) we have the following models: \(\llbracket K_1 \rrbracket _{_{\mathcal {LP}}}=\{\{ \pm a, \pm b, c \}\), \(\{ \pm a, \pm b, \pm c \}\), \(\{ \pm a, \pm b, \lnot c \}\), \(\{ \pm a, \lnot b, c \}\), \(\{ \pm a, \lnot b, \pm c \}\}\).

2.2 Minimally Inconsistent \(\mathcal {LP}\) models

Models which minimize the number of inconsistent symbols are the most “informative” ones. We can see in Example 1 that the most informative model is \(\{ \pm a, \lnot b, c \}\) which states that only a is conflicting and recovering consistency for \(K_1\) entails to delete some formulas involving a. Notice that if a pure literal is only involved in conjunctions of K, then half of the models set value B to the symbol associated to this literal. These models are of low interest as there is no conflict (no contradiction can arise) on pure literals.

In order to avoid unnecessary B valuations Priest [15] introduced the Minimally Inconsistent Logic of Paradox denoted \(\mathcal {LP}_m\), that reasons only with \(\mathcal {LP}\) models which are minimally inconsistent. Logic \(\mathcal {LP}_m\) allows to rank \(\mathcal {LP}\) models of K in order to find minimally inconsistent \(\mathcal {LP}\) models. To this end, Priest first introduced the notion of inconsistent part of an interpretation w, denoted w!, as the subset of atomic symbols set to value B. Then the \(\mathcal {LP}\) models of K w and \(w'\) can be ranked such that \(w < w'\) iff \(w! \subset w'!\). Finally, the \(\mathcal {LP}\) model w of K is a minimally inconsistent \(\mathcal {LP}\) model of K iff if \(w' < w\) then \(w'\nvDash _{_{\mathcal {LP}}} K\).

Oller in [13] provided a slightly different definition of minimally inconsistent model, which is the same as the definition used for the inconsistency measure \(I_{LP_m}\) [10]: ranking is no longer based on set inclusion but on counting. A model will then be minimal if it minimizes the number of inconsistent symbols. In the following, we commit to Oller’s definition of minimal inconsistent model:

Definition 1

(Minimally inconsistent \(\mathcal {LP}\) -models). The set of \(\mathcal {LP}_m\) models of K denoted \(\llbracket K \rrbracket _{_{{\mathcal {LP}_m}}}\) are defined as follows:

\(\llbracket K \rrbracket _{_{{\mathcal {LP}_m}}}=\{w | w\models _{_{\mathcal {LP}}} K\) and \(|w!|\le |w'!|\) for all \(w'\models _{_{\mathcal {LP}}} K\}\).

Example 2

Consider the set of formulas \(K_1=\{a,b\vee c,\lnot a \wedge \lnot b\}\), in the \(\mathcal {LP}_m\) we have the following model: \(\llbracket K_1 \rrbracket _{_{{\mathcal {LP}_m}}}=\{ \{ \pm a, \lnot b, c \} \}\).

2.3 Succinct Models

A Partial interpretation \(\dddot{w}\) is a partial function from P to \(\{F,B,T\}\) for \(\mathcal {LP}\) logic (or to \(\{F,T\}\) for classical logic). Partial interpretations are denoted by sets of the form \(\{ l_{i_1},...,l_{i_m}\}\) where \(i_m\le |P|\), \(l_i=p_i\) iff \(\dddot{w}(p_i)=T\), \(l_i=\pm p_i\) iff \(\dddot{w}(p_i)=B\) and \(l_i=\lnot p_i\) iff \(\dddot{w}(p_i)=F\). A succinct model \(\dddot{w}\) of the knowledge base K is a partial interpretation such that for each interpretation w superset of \(\dddot{w}\), \(w\models _{_{\mathcal {LP}}} K\):

$$ \dddot{w}\models _{_{\mathcal {LP}}} K \iff w \models _{_{\mathcal {LP}}} K \; \text { for all } w \supseteq \dddot{w}\; $$

A similar relation is also defined for classical logic (value B is no longer possible):

$$ \dddot{w}\models K \iff w \models K \; \text { for all } w \supseteq \dddot{w}\; $$

A succinct model gives the subset of propositional symbols that have to be set to a specific value to satisfy K while the rest of the propositional symbols can be set to any value among True, Both or False without changing the satisfaction of K. For example, for \(P=\{a,b\}\) and \(K_2=\{\lnot b, a \vee \lnot b \}\), we have the succinct model \(\dddot{w}=\{\lnot b\}\) which summarises the three models \(\{\{a,\lnot b\}, \{\pm a,\lnot b\}, \{ \lnot a,\lnot b\} \}\) (or the two models \(\{\{a,\lnot b\}, \{ \lnot a,\lnot b\} \}\) in classical logic). A succinct model is actually the semantic representation of an implicant. Notice that the previous notion of minimal \(\mathcal {LP}\) models can be extended to succinct model

Definition 2

A succinct model \(\dddot{w}\) of a knowledge base K is said to be minimal iff there is no succinct model \(\dddot{w}'\) of K such that \(|\dddot{w}'!| < |\dddot{w}!|\).

It is clear that minimal succinct models represent in a compact way \(\mathcal {LP}_m\) models: the minimal inconsistent part of a \(\mathcal {LP}_m\) model must belong to a succinct model which is also minimal and vice versa.

Proposition 1

Let \(\dddot{w}\) be a minimal succinct model and w a \(\mathcal {LP}_m\) model. The number of inconsistent symbols is the same in both models: \(|\dddot{w}!| = |w!|\).

Proof

(\(\Leftarrow \)) as \(\dddot{w}\) is a succinct model, then there exists a model w such that for all \(p\not \in \dddot{w}\), \(w(p)\ne B\). Hence, the number of inconsistent symbols in w is the same as in \(\dddot{w}\) otherwise \(\dddot{w}\) is not minimal. (\(\Rightarrow \)) If w is a minimally inconsistent model, any succinct model \(\dddot{w}\subseteq w\) have the same symbols set to value B. If they have more symbols set to values B they are not minimal. If they have less symbols set to value B, \(\exists w' \supseteq \dddot{w}\) s.t. \( w' \nvDash _{_{\mathcal {LP}}} K\).

Proposition 2

\(\forall w \in \llbracket K \rrbracket _{_{{\mathcal {LP}_m}}}\), \(\exists \dddot{w}\) a minimal succinct model s.t. \(w \supseteq \dddot{w}\).

It means that computing the minimal paradoxical models of some knowledge base K boils down to computing its succinct models.

3 Tableau and Succinct Models for \(\mathcal {LP}\) and \(\mathcal {LP}_m\)

3.1 Classical Tableau

The principle behind classical semantic tableaux is very simple: searching models for a set of formulas by decomposing the formulas into sets of literals. The corresponding decomposition is often represented as a tree whose nodes are labelled by sets composed of formulas or atoms. The initial set of formulas labels the root of the tree; each node has one or two child nodes depending on how a formula included in the node label is decomposed according to its principal operator [2]. For a formula in NNF, we only need two tableau decomposition rules, one for conjunctions and one for disjunctions as shown in Fig. 1.

Fig. 1.
figure 1

Tableau decomposition rules for conjunctions and disjunctions

A node labelled by a set containing at least a pair of opposed literals is marked closed so that the decomposition process is stopped and the node becomes a leaf. A node labelled by a set only composed of literals is a leaf. If the label of this leaf does not contain any pair of opposed literals it can be used to produce a set of models. It is actually a succinct model of the input set of formulas.

3.2 Extending Tableau for Finding Succinct \(\mathcal {LP}\)-Models

Extending the tableau method to produce succinct \(\mathcal {LP}\) models is straightforward. Nodes labelled by a set containing pairs of opposed literals are no longer considered as closed so that any branch of the tree is decomposed until reaching a node labelled by a set only composed of literals. Indeed, each pair of opposed literals represents a paradoxical symbol so that value B will be assigned to the corresponding symbol in the succinct \(\mathcal {LP}\) model derived from the corresponding leaf of the tree. Figure 2 illustrates this process for formulas in \(K_3=\{a,\lnot a \wedge \lnot b,b\vee c,\lnot d\}\): after decomposing formula \(\lnot a \wedge \lnot b\) we get a pair of opposed literals for symbol a, however, the corresponding node is not closed and is further decomposed into two branches according to the decomposition of formula \(b \vee c\). The two nodes obtained after this decomposition correspond to two leafs since all formulas of \(K_3\) have been decomposed. The first leaf contains opposite literals for atomic symbols a and b resulting in succinct model \(\dddot{w}_1=\{\pm a,\pm b, \lnot d\}\). Second leaf contains one pair of opposite literals for a representing the succinct model \(\dddot{w}_2=\{\pm a, \lnot b,c, \lnot d\}\). This extension of the tableau method is detailed by Algorithms 1 and 2, where all the set and multiset are ordered.

Fig. 2.
figure 2

Extended tableau for set of formulas \(\{a,\lnot a \wedge \lnot b,b\vee c, \lnot d\}\)

figure a

Algorithm 1 computes the set of succinct \(\mathcal {LP}\) models \(\dddot{W}\) from a set of formulas K by fully decomposing one formula at each iteration. Full decomposition means to consider all literals of the formula until no decomposition rule can be applied. More precisely, at iteration i, we expand each partial succinct model with the literals of the i-th formula.

figure b

Algorithm 2 details Function \(add\_literals(\dddot{W},formula)\) which consists of the following two alternatives:  

\(alternative_1\) :

(Lines 2–9) handles the base case of a formula only composed of one literal by adding this literal to each succinct model under construction.

\(alternative_2\) :

(Lines 10–20) decomposes the formula by recursive calls along the edges of the tableau tree.

 

Example 3 illustrates how every succinct model under construction is expanded at each iteration.

Example 3

Consider again set of formulas \(K_3=\{a,b\vee c,\lnot a \wedge \lnot b,\lnot d\}\). The value of \(\dddot{W}\) after each call is the following:

  1. 1.

    call of \(add\_literals(\{\{\}\}, a)\) gives \(\dddot{W}=\{\{a\}\}\)

  2. 2.

    call of \(add\_literals(\{\{a\}\},\lnot a \wedge \lnot b)\) gives \(\dddot{W}=\{\{\pm a,\lnot b\}\}\)

  3. 3.

    call of \(add\_literals(\{\{\pm a,\lnot b\}\}, b\vee c )\) gives \(\dddot{W}=\{\{\pm a, \pm b\},\{\pm a, \lnot b, c\}\}\)

  4. 4.

    call of \(add\_literals(\{\{\pm a,\pm b\},\) \(\{\pm a,\lnot b,c\}\},\) \(\lnot d)\) gives \(\dddot{W}=\{\{\pm a,\pm b,\lnot d\}\), \(\{\pm a,\lnot b,c, \lnot d\}\}\), which represent the succinct \(\mathcal {LP}\) models of K.

From the succinct models we can then compute \(\mathcal {LP}\) and \(\mathcal {LP}_m\) models. In the following section we propose the algorithm that extends the succinct \(\mathcal {LP}\) models of K produced by Algorithm 1, in order to get \(\llbracket K \rrbracket _{_{\mathcal {LP}}}\) and \(\llbracket K \rrbracket _{_{{\mathcal {LP}_m}}}.\)

3.3 Computing \(\llbracket K \rrbracket _{_{\mathcal {LP}}}\) and \(\llbracket K \rrbracket _{_{{\mathcal {LP}_m}}}\)

Algorithm 3 implements the transformation of succinct models into \(\mathcal {LP}\) models.

figure c

For each succinct model (Line 3), the algorithm creates a new set of temporary and partial interpretations \(W_{Temp}\) (Line 4) and extends these interpretations one symbol at a time for each symbol of the language (Lines 5–16). For each symbol P(j) the current set of partial interpretations is replicated in three new sets: one where previous partial interpretations are extended with the current symbol set to value B (Line 7), one where previous partial interpretations are extended with the current symbol set to value T if \(\lnot P(j)\) is not in the current succinct model (Lines 8–10) and one where previous partial interpretations are extended with the current symbol set to value F if P(j) is not in the current succinct model (Lines 11–13). Consequently, a symbol which is not in the current succinct model is added to the three copies since it can get any value: a symbol which occurs as \(\pm P(j)\) is added only to the first copy, while the other two types of symbol occurrences are added to two copies one with value B and one with one of the values T or F. Finally, the three copies of partial interpretations are assigned as the new current set of partial interpretations (Line 14). Suppose that the Algorithm 3 receives as input a set of succinct models \(\dddot{W}\) of some knowledge base K, then every \(w\in Temp\) is also a \(\mathcal {LP}\) model of K:

Lemma 1

Let K be a knowledge base represented w.r.t. set P. Let \(\dddot{W}\) be a set of succinct models of K: if \(W =extend\_succinct\_models(\dddot{W}, P)\), then for every \(w \in W\), \(w\models _{_{\mathcal {LP}}} K\).

Proof

Each iteration on symbols (Line 5) extends the current succinct model \(\dddot{w}_i\in \dddot{W}\) in an incremental way. If the current symbol P(j) has no valuation in \(\dddot{w}_i\) then P(j) can get any of the three values. Thus three copies of \(\dddot{w}_i\) are created. Otherwise, at most two copies of \(\dddot{w}_i\) are created, one with the value \(\pm P(j)\) and one with the value of P(j) in \(\dddot{w}_i\) if it is different of \(\pm P(j)\). At the end, copies may or may not be superset of \(\dddot{w}_i\). First case, assume that \(\dddot{w}_i \subseteq w\): according to the definition of succinct model, all interpretations \(w\supseteq \dddot{w}_i\) are models of K. Second case if \(\dddot{w}_i\not \subseteq w\), then it occurs that for each symbol p such that \(\dddot{w}_i(p) \ne w(p)\), \(\dddot{w}_i(p) \ne B\) and \(w(p)=B\) thanks to Lines 7, 8 and 11. Hence, according to Tables 1 and 2, either K has a truth value equal to B or it is still equal to T. In any case, the semantics of the logic \(\mathcal {LP}\) leads to conclude that \(w\models _{_{\mathcal {LP}}} K\). Then in both cases w is a model of K.

Algorithm 3 can easily be adapted to compute the set of models \(\llbracket K \rrbracket _{_{{\mathcal {LP}_m}}}\) if it takes as input the set of minimal succinct models instead of all succinct models. First, thanks to Proposition 2, all the \(\llbracket K \rrbracket _{_{{\mathcal {LP}_m}}}\) models can be generated from the set of minimal succinct models. Next, thanks to Proposition 1, we only need to consider T and F values for the symbols not yet set in the succinct models.

4 Complexity and Validity

4.1 Complexity

Let us now discuss the complexity of Algorithms 1 and 2. First, recall that we only allow negation in front of a variable as we only consider the restricted language NNF. Transformation of any arbitrary formula to NNF is polynomial.

Assume a set of formulas K. The complexity of Algorithm 1 is in O(|K|) without considering the complexity of function add_literals. Let us now consider some formula \(\phi \) to be decomposed. Function \(add\_literals(\dddot{W},\phi )\) applies either \(alternative_1\) or \(alternative_2\). \(Alternative_1\) adds the current literal to each succinct model of \(\dddot{W}\) and is in \(O(|\dddot{W}|)\). \(Alternative_2\) decomposes \(\phi \) by recursive calls. If the total number of conjunctions and disjunctions in \(\phi \) is m, \(alternative_2\) is in \(O(2 \times m\)). The complexity of the process for computing the succinct models is mostly due to \(alternative_1\) considering that the number \(|\dddot{W}|\) of succinct models produced grows exponentially with respect to the number of disjunctions appearing in formulas. Indeed, the number of succinct models is duplicated at each disjunction (Lines 16–18 of function \(add\_literals\)). Let \(\widehat{\phi }\) be the formula of K with the largest number of disjunctions and let \(|\widehat{\phi }|\) denote the number of disjuncts in \(\widehat{\phi }\). If the knowledge base K contains only conjunctions (there is only one alternative and \(|\widehat{\phi }|=1\)), Algorithm 1 produces exactly one succinct model.

Proposition 3

Let K be a knowledge base with no disjunction (\(|\widehat{\phi }|=1\)). Let \(\dddot{W}=succinct\_models(K)\), then \(|\dddot{W}|=1\).

Proof

Line 2 of function \(succinct\_models\) initializes \(\dddot{W}\) with an empty succinct model. Then Lines 6, 7, 13 and 14 of function \(add\_literals\) always extend this initial succinct model which is never duplicated.

We can give an upper bound of the number of succinct models produced for the case in which K contains disjunctions.

Proposition 4

Let K be a knowledge base, \(\widehat{\phi }\) be the formula of K with the largest number of disjunctions and let \(|\widehat{\phi }|\) denote the number of disjuncts in \(\widehat{\phi }\). Let \(\dddot{W}=succinct\_models(K)\). An upper bound of \(|\dddot{W}|\) is \(|\widehat{\phi }|^{|K|}\) and the complexity of function \(succinct\_models(K)\) is in \(O(|\widehat{\phi }|^{|K|})\).

Proof

Let us focus on the case where K contains \(n > 1\) formulas with disjunctions and suppose that after \(n - 1\) iterations of the main loop of Algorithm 1, the size of the ongoing set of succinct models is equal to \(S_{n - 1}\). Let us focus on the case where n-th formula contains disjunctions. Assume that \(\phi _n = \widehat{\phi }\) then according to Lines 16 and 17 of Algorithm 2, the size of Temp returned by Line 21 is equal to \(S_n = |\phi _n| \times S_{n - 1}\). Hence, by assuming that each formula in K contains \(|\widehat{\phi }|\) disjuncts, the upper bound of \(|\dddot{W}|\) is \(|\widehat{\phi }|^{|K|}\) and the complexity of function \(succinct\_models(K)\) is in \(O(|\widehat{\phi }|^{|K|})\).

Algorithm 3 is also exponential as shown by the following proposition.

Proposition 5

Let S be the number of succinct models of K and \(\dddot{w}_m\) be a minimal succinct model of K: let k be the number of symbols in \(\dddot{w}_m\) and l the number of symbols with values F or T. The complexity for computing paradoxical models as given by Algorithm 3 is in \(O(S \times 2^l\times 3^{|P| - k})\).

Proof

Suppose there is only one succinct model assigning values to k symbols and \(l\le k\) symbols are assigned value F or T. Temp contains \(2^l\times 3^{|P| - k}\) succinct models, hence the complexity is in \(O(2^l \times 3^{|P| - k})\). Suppose now there are n succinct models considered as input. Suppose that for iteration of Line 3, i is equal to \(n - 1\) and the current size of Temp is \(S_{n - 1}\). Again n succinct model is composed of k symbols and the number of new paradoxical models is bounded by \(S_n = S_{n - 1} + 2^l\times 3^{|P| - k}\). Hence, the overall complexity is in \(O(n \times 2^l\times 3^{|P| - k})\).

It is worth noting that the number of succinct \(\mathcal {LP}\) models of K is actually much smaller than the number of \(\mathcal {LP}\) models of K. For instance, as mentioned previously, if K contains only conjunctions we get one succinct \(\mathcal {LP}\) model while the number of \(\mathcal {LP}\) models is \(2^l\times 3^{|P|-|At(K)|}\).

4.2 Soundness and Completeness

The combination of the three algorithms is sound and complete, that is it produces exactly \(\llbracket K \rrbracket _{_{\mathcal {LP}}}\). We only need to show that succinct models output by Algorithm 1 are actually models of the knowledge base K considered as input. Next, Lemma 1 guarantees that these succinct models can be transformed into paradoxical models.

Theorem 1

(Soundness). If \(\dddot{w} \in succinct\_models(K)\) then \(\dddot{w}\models _{_{\mathcal {LP}}} K\).

Proof

(sketch) We prove that Algorithms 1 and 2 are sound by induction over the cardinality of K:

(Base case) Suppose that K contains one formula \(\phi \) and let us consider the three subcases about the formula structure: \(\phi \) is either a literal, a conjunction or a disjunction. We prove by induction on the structure of \(\phi \) that Algorithms 1 and 2 are sound.  

Base case. :

If \(\phi \) is a literal l associated to atom \(p_i\) then, output Temp contains one unique partial interpretation \(\{l\}\) which is a succinct model of \(\phi \).

Induction. :

Suppose that for any subformula \(\phi '\) of \(\phi \), function \(add\_literals\) \((\dddot{W}, \phi ')\) returns the set of succinct models of \(\phi '\). We only focus on the conjunction case (as disjunction case is similar): Line 13 calls \(add\_literals(\{\},\) \(ope\) \(rand_1)\) and returns a set Temp of succinct models of \(operand_1\) (by induction). Next step Line 14 calls \(add\_literals(Temp, ope\) \(rand_2)\). Let us focus on the case where \(operand_2\) is a literal l; then, \(add\_literals\) applies \(alternative_1\) (Lines 2–9) which returns a set Temp of extended partial interpretations \(\dddot{w}'\) such that for all \(\dddot{w}\in Temp, \dddot{w}'= \dddot{w} \dddot{\cup } \{l\}\) such that:

$$ \dddot{w}\dddot{\cup } \{l\} \left\{ \begin{array}{ll} \dddot{w}'=\dddot{w}\cup \{l\} &{} \text{ if } \dddot{w} \nvDash \lnot l \\ \dddot{w}'=\dddot{w}\setminus \{l, \lnot l\}\cup \pm \textit{At(l)} &{} \text{ otherwise. } \end{array} \right. $$

Each extended interpretation \(\dddot{w}' \in Temp\) is clearly a succinct model of \(operand_1\wedge operand_2\) which sets the interpretation value to B if a contradiction has been found or to T otherwise. For the general case “\(operand_2\) is not a literal”, Line 14 extends each model \(\dddot{w}\) of \(operand_1\) with each succinct models \(\dddot{w}'\) of \(operand_2\). Thus function \(add\_literals(Temp, operand_2)\) returns a set of succinct interpretations \(\dddot{w} \dddot{\cup } \dddot{w}'\).

 

(Induction) Let us now consider that K contains n formulas. Suppose that up to formula \(i-1\), Algorithm 1 outputs the set \(\dddot{W}_{i - 1}\) of succinct models of \(\cup _{j = 1... i - 1} K(j)\). Function \(add\_literals(\dddot{W}_{i - 1}, \phi _n)\) is then called (Line 4 of Algorithm 1). Again, we have to consider the three subcases with respect to the structure of \(\phi _i\): \(\phi _i\) is either a literal, a conjunction or a disjunction. Proof is again by induction on the structure and similar to the Base case previously described except for literals.

The immediate consequence is the overall soundness of Algorithms 1–3:

Corollary 1

If \(w \in extend\_succinct\_models(succinct\_models(K), P)\) then

\(w\models _{_{\mathcal {LP}}} K\).

Proof

It is a direct consequence of Lemma 1 and Theorem 1.

Let us now show that the algorithms are also complete:

Theorem 2

(completeness). Let \(w_0\) be an \(\mathcal {LP}\) interpretation. If \(w_0\models _{_\mathcal {LP}} K\) then \(w_0\in extend\_succinct\_models(succinct\_models(K), P)\).

Proof

(sketch) Let us consider the different cases with respect to the size of K and the structure of the formulas.

(Base Case) Suppose that K contains only one formula \(\phi \) and let us focus the literal and conjunction subcases:

  • If \(\phi = l\), then \(succinct\_models(K) = \{l\}\). First, set \(\{l\}\) is produced by Algorithm 2. Next, if the symbol P associated to l has B value in \(w_0\) then Algorithm 3 will create a new model with this value; otherwise if P has value T or F in \(w_0\) then Algorithm 3 creates a model w where P’s value is identical to the one in \(w_0\). Next, for all other symbols, all possible truth values are considered. Hence \(w_0 \in extend\_succinct\_models(\{l\}, P)\).

  • Let us consider the conjunction \(\phi _1 \wedge \phi _2\) and assume that the theorem holds for subformulas \(\phi _1\) and \(\phi _2\). We thus have two sets of succinct models \(\dddot{W}_1=succinct\_models(\{\phi _1\})\) and \(\dddot{W}_2=succinct\_models(\{\phi _2\})\). Two cases may occur:

    \(Case_1\), there is no inconsistencies between \(\phi _1\) and \(\phi _2\). Let us focus on the subcase where \(w_0 \models _{_\mathcal {LP}} \phi _1\wedge \phi _2,\exists \dddot{w}_1\in \dddot{W}_1 \mathbf s.t. \dddot{w}_1 \subseteq w_0\) and \(\exists \dddot{w}_2\in \dddot{W}_2 \mathbf s.t. \dddot{w}_2 \subseteq w_0\). Lines 16 and 17 combined with Lines 5–7 of Algorithm 2 guarantee that \(\dddot{w}_1 \cup \dddot{w}_2\) belongs to \(succinct\_models(\{\phi _1 \wedge \phi _2\})\). Hence, \(w \supseteq \dddot{w}_1\cup \dddot{w}_2\). Alternative subcase where \(w_0\) is not a superset of \(\dddot{w}_1\) or \(\dddot{w}_2\), i.e. Algorithm 3 changes and duplicates some truth values to the B value, also holds.

    \(Case_2\), there are some inconsistent literals between \(\phi _1\) and \(\phi _2\). Assume succinct models \(\dddot{w}_1\) and \(\dddot{w}_2\) for \(\phi _1\) and \(\phi _2\). Lines 16 and 17 combined with Line 9 of Algorithm 2 guarantee that each symbol getting an inconsistent value between \(\dddot{w}_1\) and \(\dddot{w}_2\) is set to value B when performing the “union” of \(\dddot{w}_1\) and \(\dddot{w}_2\). If \(w_0 \supseteq \dddot{w}_1 \dddot{\cup } \dddot{w}_2\) then \(w_0 \in extend\_succinct\_models(\phi _1 \wedge \phi _2, P)\); other cases where function \(extend\_succinct\_models\) creates additional models with other symbols set to B also holds.

  • Disjunction case can also be proved in a similar way.

So, when K contains only one formula, the theorem holds. Let us now consider the case where K contains more than one formula.

(Induction on formulas) Suppose that K contains i formulas and the theorem holds up to \(i - 1\) formulas. Let \(\dddot{W}_{i-1}=succinct\_models(K_{i-1})\), we thus have: \(\forall w\models _{_{\mathcal {LP}}} \cup _{j = 1... i - 1} K(j)\), \(\exists \dddot{w}\in \dddot{W}_{i-1}\) such that \(w \supseteq \dddot{w}\). Let us focus on the i-th formula: Algorithm 1 calls function \(add\_literals(\dddot{W}_{i-1}, K(i))\). Again, the different subcases defined by the structure of formula K(i) should be considered. We do not detail the proof as it is similar to the base case.

5 Conclusion

We propose a tableau method for enumerating the paradoxical models of a knowledge base. We provide the corresponding algorithm and prove that it is sound and complete. This algorithm is decomposed in two main steps. First step uses Algorithm 2 which computes the models with minimal number of inconsistent symbols to satisfy the input formulas, which are the succinct models constituting \(\dddot{W}\). Then Algorithm 3 calculates the full models constituting W, by extending the succinct models with all the symbols of the language. The second step is mandatory if we need the algorithm to be complete. However, this second step should not be done when computing the inconsistency measure \(I_{LP_m}\).

Indeed, the succinct models allow us to make the difference between the symbols really inconsistent in the formulas and symbols taking B in order to get models. The succinct models of knowledge base K can be reused for computing the succinct models of \(K'\), where \(K\subset K'\) by calling function \(add\_literals(\dddot{W},\phi )\) for every formula \(\phi \in K'\) such that \(\phi \not \in K\). So, this allows us complexity reduction when we already know the succinct models of some frequently used formulas.

The complexity of our approach is exponential, however, we need to implement only 10% of the number of decomposition rules compared with [3] which needs to implement 20 rules.