Inconsistency is a phenomena that appears naturally in our world. Consider the following situation: two persons have different (contradictory) opinions about a specific statement : the first one considers true, meanwhile the second one believes that is true. This contradiction, however, should not prevent that common conclusions which do not involve – directly or indirectly – can be deduced.
This situation is not adequately managed by classical logic, since it is not equipped to deal with inconsistency. The reason is the well known “Ex contradictione sequitur quod libet” principle: if a theory is inconsistent, that is, if formulas and are theorems, then every formula of the language is also a theorem in ; or, shortly, becomes trivial.
Paraconsistent Logics were initially proposed by Da Costa  as logical systems that deal with contradictions in a discriminating way, avoiding the previous principle and managing inconsistent but non-trivial theories.
Presently automatic proof methods are widely used in several computer applications, such as in robot control , in medicine [14, 16], and many others . Most of the employed methods work on logical formalisms based on classical logic. In this paper we present the specification of an strategy for automatic theorem prover based on a KE system, an improvement of the well known tableaux deduction method, for a particular paraconsistent logic called .
The rest of this paper is organized as follows: Section 2 introduces the axiomatization and valuation of the paraconsistent logic ; in Sections 3 and 4 we present the KE system for and its inference rules, and the KEMS strategy, respectively; Section 5 presents a set of problems constructed to evaluate the prover; in Section 6 we present a motivating example, showing that our proposal is adequate to deal with practical problems; in Section 7 we compare our work with similar ones; finally in Section 8 we draw some conclusions and propose future research.
We emphasize the main contributions of this paper: (a) a sound and complete KE system for (Section 3); (b) an informal specification of a KEMS  strategy for the prover (Section 4); and (c) problem families that can be used to evaluate provers for (Section 5).
Let be a countable set of propositional letters. We concentrate on the propositional language formed by the usual boolean connectives (implication), (conjunction), (disjunction) and (negation). We call this set of connectives: ( is called a signature in ). and are, respectively, iterated conjuntion and iterated disjunction.
Throughout the paper, we use uppercase Latin or lowercase Greek letters to denote arbitrary formulas, and uppercase Greek letters to denote sets of formulas.
We also work here with signed formulas. A signed formula is an expression where is called the sign and is a propositional formula. The symbols and , respectively representing the ‘true’ and ‘false’ truth-values, can be used as signs. The conjugate of a signed formula () is (). The subformulas of a signed formula are all the formulas of the form or where is a subformula of .
The size of a signed formula is defined as the size of . The size of a formula is defined as usual:
if is a propositional atom;
, where is a formula and is a unary connective;
, where is a binary connective, and and are formulas.
A propositional valuation is a function . We extend the definition of valuations to signed formulas in the following way: and .
2 , a paraconsistent logic
is a paraconsistent logic , “a logic of the early paraconsistent vintage” . It is part of the hierarchy of logics , . is of historical importance because it was one of the first paraconsistent logics to be presented.
Paraconsistent logics are logics in which theories can be inconsistent but nontrivial . In classical logic, for any formulas and . This is not true in paraconsistent logics.
In , a consistency operator () is introduced. The intended meaning of is “ is consistent” . According to , “da Costa’s intuition was that the ‘consistency’ (which he dubbed ‘good behavior’) of a given formula would not only be a sufficient requisite to guarantee its explosive character, but that it could also be represented as an ordinary formula of the underlying language.”
In , da Costa represented the consistency of a formula by the formula . That is, the consistency connective “” is not a primitive connective, but an abbreviation:
2.1 ’s Axiomatization
The difference from classical propositional logic (CPL) axiomatization is that to obtain an axiomatization for CPL we must remove the schemas that deal with the consistency connective ((bc1), (ca1), (ca2) and (ca3)) and add the following axiom schema (called ‘explosion law’ in ):
2.2 ’s Valuation
if and only if and ;
if and only if or ;
if and only if or ;
implies or .
implies or , for ;
Let be for . is a valid sequent in if and only if, whenever for all (). “ is a valid sequent in ” can be abbreviated to .
3 The Ke System for
The KE inference system is a tableau method  developed by Marco Mondadori and discussed in detail in several works authored or co-authored by Marcello D’Agostino [2, 11, 12]. The KE system was presented as an improvement, in the computational efficiency sense, over Analytic Tableaux . A KE System is a tableau system in which there is only one branching rule. As branching can lead to repetition of efforts (i.e. the same work being done in two or more branches), branching rules lead to less efficient proof systems (and implementations) .
We present here a sound and complete KE System we have devised for . The rules in our system are presented in Figure 1. Note that in , the set of connectives is but, to make the rules simpler, we have used the connectives in , i.e. including the consistency connective, which is actually an abbreviation.
In [19, 21] (and also in ) the first and third authors of this paper have presented KE Systems for two other paraconsistent logics: mbC and mCi (more about these two logics can be found in ). The KE System for has several rules in common with the KE Systems for these two logics. However, in these logics, consistency () is not a defined connective.
As in classical KE rules , rules with “1” (for instance, “”) or “2” as subscript are interchangeable. Only one of each pair is actually essential. By using the PB rule (Figure 1), the other can be derived.
Note also that and are actually three rules each, because can be any connective in . In a 2-premiss rule, the main premiss is the first premiss. The second premiss is called minor premiss. The main premiss in (or in ) can be “”, “” or “”. And, as ‘’ is a defined connective, “” is actually “”. For instance, is:
It is easy to see that these rules ( and ) are not analytic. In , is not a subformula of any premiss.
Therefore, in our system we have:
12 essential linear rules (5 of these rules are 1-premiss rules and 7 rules are 2-premiss rules);
6 derived linear 2-premiss rules;
1 (0-premiss) branching rule.
Of these rules, 6 of them ( and ) are rather complex, far more complex than any CPL KE rule.
The formula can be proved in KE system as depicted in Figure 2. The same formula was proved in  using the tableau system presented there (Figure 3). It is easy to see that the KE proof has less formula nodes and less branches than the tableau  proof.
3.1 Soundness and Completeness
Our intention here is to prove that the KE system is sound and complete. The proof is very similar to the mCi KE system’s soundness and completeness proof presented in Section B.2.4 of . We begin with some definitions.
 A branch of a KE tableau is closed when and appear in the branch.
 A KE tableau is closed if all its branches are closed.
if there is a closed KE tableau for .
The KE system is sound if, for any and , implies .
The KE system is complete if, for any and , implies .
A set of signed formulas is downward saturated:
whenever a signed formula is in , its conjugate is not in ;
when all premises of any KE rule (except PB) are in , its conclusions are also in ;
when the major premiss of a 2-premiss KE rule is in , either its auxiliary premiss or its conjugate is in .
A Hintikka’s Lemma holds for downward saturated sets: (Hintikka’s Lemma for ) Every downward saturated set is satisfiable. For any downward saturated set , we can easily construct a valuation such that for every signed formula in the set, . How can we guarantee this is in fact a valuation? First, we know that there is no pair and in . Second, all premised KE rules preserve valuations. That is, if for every premiss , then for all conclusions . And if and , where and are, respectively, major and minor premises of a KE rule, then , where is the conjugate of . Therefore, is satisfiable.
Let ’ be a set of signed formulas. ’ is satisfiable if and only if there exists a downward saturated set ” such that ’ ”. First, let us prove that if there exists a downward saturated set ” such that ’ ”, then ’ is satisfiable. This is obvious because from ” we can obtain a valuation that satisfies all formulas in ”, and ’ ”.
Now, let us prove that if ’ is satisfiable, there exists a downward saturated set ” such that ’ ”.
So, suppose that ’ is satisfiable and that there is no downward saturated set ” such that ’ ”. Using items (ii) and (iii) of (3.1), we can obtain a family of sets of signed formulas ’ () that include ’. If none of them is downward saturated, it is because for all , ’ for some . But all rules are valuation-preserving, so this can only happen if is unsatisfiable, which is a contradiction.
’ is an unsatisfiable set of formulas if and only if there is no downward saturated set ” such that ’ ”.
The KE system is sound and complete. The KE proof search procedure for a set of signed formulas either provides one or more downward saturated sets that give a valuation satisfying or finishes with no downward saturated set. The KE system is a refutation system. The KE system is sound because if a KE tableau for a set of formulas closes, then there is no downward saturated set that includes it, so is unsatisfiable. If the tableau is open and completed, then any of its open branches can be represented as a downward saturated set and be used to provide a valuation that satisfies (in other words, is satisfiable).
The KE system is complete because if is satisfiable, no KE tableau for a set of formulas closes. And if is unsatisfiable, all completed KE tableaux for close.
We do not prove here that the KE system is decidable, i.e., that there is an algorithm for finding proofs in the KE system. We only present the sketch of such a proof that will be detailed in a future paper about the implementation of a prover.
The idea is to define a restriction of the KE system which imposes some conditions on the application the PB rule (Figure 1). In this restricted KE system, the PB rule can only be applied in a branch:
when there is a non-atomic signed formula that can be the main premiss of a 2-premiss rule and that was not yet analysed (i.e. used as main premiss) in the branch; and
when either or can be the minor premiss of a 2-premiss rule, where is the PB formula (i.e. the formula that appears as in the new left branch and in the new right branch after PB application).
For all the 2-premiss rules in Figure 1, the minor premiss’s size is smaller than major premiss’s size. This, alongside with the conditions above, guarantees the the proof search procedure eventually terminates.
4 A KEMS Strategy for
KEMS  is a theorem prover that can be used to implement strategies for many different logical systems. For instance, the current version  has 6 strategies for CPL, 2 strategies for mbC and 2 strategies for mCi.
We have to follow some steps to implement a strategy for a logical system in KEMS. First, one has to know how KEMS implementation is structured (by reading  and the source code available in ). Second, one has to implement the classes that will represent the logical system (such as CPL or ). Third, one has to implement the classes necessary to represent the rules of the KE system (such as KE system). Only after these three steps, one can implement one or more strategies for a given KE system.
KE systems (as well as many logical proof methods) are usually presented by showing their rules. The rules tells us only what we can do – they do not specify in which order to use the rules. A strategy is a deterministic algorithm for a given KE system, as well as a set of data structures used by the algorithm.
4.1 Ke Simple Strategy
The KE Simple Strategy resembles mbC and mCi Simple Strategies (see Sections C.4.4 and C.4.5 of ). Let us informally describe the algorithm performed by this strategy:
the strategy applies all possible linear rules in the current branch (in the beginning, the current branch is the branch containing the formulas obtained from the problem);
if the current branch closes (i.e. if a contradiction is found), then the strategy tries to remove a branch from its stack of open branches. If it succeeds, this branch becomes the current branch and the control goes back to the first step. If there is no remaining open branch, the procedure ends and the result is that the tableau is declared closed;
if the current branch is linearly saturated (i.e. no more linear rules can be applied), but not closed, the strategy tries to apply the PB rule. The PB rule can be applied when there is at least one non-atomic signed formula in the branch that can be the main premiss of a 2-premiss rule and this signed formula was not yet used as the main premiss in an application of a 2-premiss rule. If the strategy can apply the PB rule, then the (new) right branch is put in the stack of open branches and the left branch becomes the current branch. If the strategy cannot apply the PB rule, then the procedure finishes by declaring the tableau open.
The order of rule applications is:
KE 1-premiss rules;
KE 2-premiss rules;
the PB rule.
See Sections C.2 and C.4 of  for more details on how rules are applied in KEMS.
4.1.1 Implementation Remarks
This strategy is a very straightforward strategy for a KE system. The idea is to use the PB rule only as a last resource (as shown in the canonical procedure for KE ). The difference is that in the KE system we cannot restrict the strategy to perform only analytic applications of PB. An analytic application of PB is an application of PB where the PB formula (i.e. the formula that appears as in the new left branch and in the new right branch after PB application) is a subformula of some formula in the branch.
Another difficulty in the implementation of this strategy (actually in the implementation of almost any proof system for ) is how to deal with the consistency connective.
We have two options:
only accept problems using the connectives in . Therefore, all rules presented in Figure 1 will have to be implemented using
connectives (which makes the rules and the associated pattern matching more complex). Note that the size of problems written inmay grow exponentially (in the worst case) when translated to ;
accept problems written in and, whenever a formula appears (for any ), treat it as if it was (also) in the applications of rules that have formulas with as premisses. Although this option allows the prover to deal with smaller problems, it makes rule applications more difficult.
Simple Strategy will use option (i) above. Option (ii) will be used on a second strategy for KE.
5 Problem Families to Evaluate Provers
A problem family is a set of problems that we know, by construction, whether they are valid, satisfiable or unsatisfiable . A problem is a sequent that can be given as input for a theorem prover. The -th instance (for ) of a problem family is a (valid, satisfiable or unsatisfiable) sequent.
In Section D.1.2 of , seven families of difficult problems that can be used to evaluate theorem provers for paraconsistent logics were presented. All these families were families of valid sequents. To the best of our knowledge, there are no other families of difficult problems designed with this purpose in mind. The families presented there can be used to evaluate provers for two logics: mbC and mCi, which are part of the class of logics of formal inconsistency (LFIs) .
In  it is shown that
can also be classified as an LFI and that it extendsmbC. Therefore, the first four families created to evaluate mbC provers  can also be used to evaluate provers for .
However, these families do not test all KE rules. That is, to prove the problems in those families using the KE system, one does not need to use all its rules. Therefore, to extend what we could call “rule coverage”, i.e. to test more rules, we present two more families of sequents. These sequents are valid in (but not in mbC, therefore they can also be used to test mbC provers) and, for proving them, we have to use rules that are not used in the first four families’ proofs.
These families were not developed with any intuitive meaning in sight. As the objective was to test theorem provers, they were designed to be difficult to prove, by using as many rules as possible.
The motivation for developing and presenting these problem families before the actual prover was implemented was, inspired by the Test-Driven Development technique for software development , to use the tests as a guide for the design and implementation of the sofwtare.
Note: to make it easier to read the problems, we have used the connectives in and we sometimes use “[” and “]” in place of “(” and “)”.
5.1 Fifth family
The sequents in this family () demand ’s rule to be proven valid. (the nth instance of ) is:
For instance, in signed tableau notation is:
5.2 Sixth family
In order to prove, using the KE system, that the sequents in this family () are valid, it is necessary to use the two KE rules where “” is the main connective in the main premiss: and . (the n-th instance of ) is:
For instance, is:
6 A Motivating Example
We present here an example almost completely based on the example shown in :
Consider the construction of a simple medical system aimed at diagnosing three diseases , and . There are two different symptoms, denoted by and . The intended usage of this system is as follows:
The core part of the system is the knowledge provided by a doctor ().
When we intend to apply this knowledge to a specific patient, other professionals conduct medical tests on this patient add the results of these tests to the knowledge base.
In order to use the system, we submit a goal to the program in a similar way as it is done in Prolog.
We assume that the system is written in the form of a finite set of formulas over . Suppose that provided us the following five rules (formulas):
Intuitively, the doctor is telling that:
An individual cannot have both diseases and ( and ).
If an individual has the disease , them he has the disease ()
If an individual has the symptom , them he has the disease ()
If an individual has the symptom , them he has the disease ()
To exemplify the use of this knowledge base, we describe four situations. The first one is similar to a query to a Prolog program, while the other three explore the capacity of handling inconsistencies:
Case 1: Suppose that the patient has symptom and we want to know if he has the disease but not .
To answer this query we must verify if
is valid. As the KE proof for this sequent is a closed tableau, this sequent is valid. It is also valid in classical logic.
Case 2: Now suppose that the patient tested positive for symptoms and , and we want to know if he has both diseases and .
To answer this query we must verify if
is valid for any formula . However, (2) is not valid in for any formula .
Case 3: Now suppose that the patient tested positive for symptoms and , and we want to know if he has not the disease .
To answer this query we must verify if
is valid. The KE proof for this sequent (an open tableau, which shows that the sequent is NOT valid) is the following:
However, this sequent is valid in classical logic, because a classical contradiction is found ( and ).
Case 4: Now suppose again that the patient tested positive for symptoms and , but now we want to know if he has the disease and if this conclusion is not consistent ().
To answer this query we must verify if
is valid. The KE proof for this sequent (a closed tableau) is the following:
This query shows that, besides “dealing with inconsistencies in the knowledge base without every formula becoming derivable” , a common feature of paraconsistent logics, allows us to express propositions about the (in)consistency of formulas.
The sequent (4) is valid in classical logic. Note that, for any formula , “” is a theorem in classical logic. Therefore, in classical logic, if and only .
7 Related Work
A tableau system for was presented in . As this system is based on analytic tableaux (AT) , it has four branching rules: the three ones from AT plus a branching rule. Due to this rule, infinite loops may occur during the proof search, postponing indefinitely the analysis of formulas that involve the negation and consistency operators. Notwithstanding, this system is decidable. This system has been implemented but the source code is not available.
In  two tableau systems for were presented, the second one being a version of the first one considered by the authors more adequate to be implemented. The first system has 12 rules (8 of them are branching rules) while the second has 20 rules (12 of them are branching rules). The rules are rather complex, involving much more formulas and connectives than KE rules. The second system was elegantly implemented in LISP (the source code is available in ). However it was written in a LISP dialect (muLISP) which cannot be compiled in modern LISP compilers.
We have experimented using Buchsbaum’s system with the formulae described in Section 5. For example, it was not able to prove instance due to lack of memory. This confirms that the family is a family of difficult problems. We are translating this prover to a different LISP dialect to make it more robust.
Another tableau system appears in . It was obtained by using a general method for constructing tableau systems . Although this system has a PB branching rule, a feature of KE systems, is not a KE system. To be a KE system it should have only one branching rule, but it has 8 branching rules. Just like the system in , it is based on AT. However, it does not have rules that lead to infinite loops. We do not know of any implementation of this method.
In , tableau systems for several logics of the hierarchy were presented. The tableau system presented there is also based on AT. While in the previous systems was applied whenever necessary to generate the branches of the tableau, this system has specific rules to directly deal with all operators, including “”. However, as it is based on the analytic tableau method, it also has too many (six) branching rules. We also do not know of any implementation of this method.
Therefore, the distinctive feature of our KE system is that it has 13 essential rules and only of them is a branching rule. This feature will allow us to implement efficient strategies for this system in KEMS .
In this paper, we have presented a sound and complete KE system for Da Costa’s calculus for paraconsistent logic. We have shown that our system has less branching rules than other tableau systems for described in the literature [3, 4, 6, 7, 15]
. Therefore, it is probably more efficient than those systems (see for a discussion on why branching leads to inefficiency).
We have also described a strategy for this KE system that can be implemented in KEMS. Future work includes implementing this strategy, as well as designing and implementing other strategies for the KE system.
In order to evaluate KE strategies, we have developed two problem families. These families and the first four problem families described in section D.1.2 of  can also be used to evaluate other theorem provers for , such as Arthur Buchsbaum’s prover for .
As further work, we intend to compare the results obtained by our strategies (in the style of section D.2 of ) among themselves as well as with Arthur Buchsbaum’s prover.
-  Kent Beck. Test Driven Development: By Example. Addison-Wesley Professional, November 2002.
-  Krysia Broda, Marcello D’Agostino, and Marco Mondadori. A Solution to a Problem of Popper. In Proceedings of the conference Karl Popper Philosopher of Science, 1995. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.43.7542. Last accessed, June 2009.
-  Arthur Buchsbaum. An automatic proof method for paraconsistent logic (in portuguese), 1988. Available at http://migre.me/gQD. Last accessed, Mar 2009.
-  Arthur Buchsbaum and Tarcisio Pequeno. A reasoning method for a paraconsistent logic. Studia Logica, 52(2):281–289, June 1993.
-  Carlos Caleiro, Walter Carnielli, Marcelo Coniglio, and Joao Marcos. Two’s company: The humbug of many logical values. In Logica Universalis, pages 169–189. Birkhauser Basel, 2005.
-  Walter Carnielli, Marcelo E. Coniglio, and Joao Marcos. Handbook of the Philosophical Logic, volume 14, chapter Logics of Formal Inconsistency, pages 15–107. Springer-Verlag, second edition, 2007.
-  Walter Alexandre Carnielli and Mamede Lima-Marques. Reasoning under inconsistent knowledge. Journal of Applied Non-Classical Logics, 2(1), 1992.
-  Newton C. A. da Costa. Sistemas Formais Inconsistentes. Rio de Janeiro, NEPE, 1963. Reprinted by Editora da UFPR, Curitiba, 1993.
-  Newton C. A. da Costa and E. H. Alves. A semantical analysis of the calculi C. Notre Dame Journal of Formal Logic, 18(4):621–630, 1977. Available at http://migre.me/gMA. Last accessed, Mar 2009.
-  Newton C. A. da Costa, Decio Krause, and Otavio Bueno. Handbook of the Philosophy of Science. Philosophy of Logic, chapter Paraconsistent Logics and Paraconsistency, pages 791–911. Elsevier, 2007.
-  Marcello D’Agostino. Are Tableaux an Improvement on Truth-Tables? Cut-Free proofs and Bivalence. Journal of Logic, Language and Information, pages 235–252, 1992. Available at http://citeseer.nj.nec.com/140346.html. Last accessed, May 2005.
-  Marcello D’Agostino. Tableau methods for classical propositional logic. In Marcello D’Agostino et al., editor, Handbook of Tableau Methods, chapter 1, pages 45–123. Kluwer Academic Press, 1999.
-  Marcello D’Agostino and Marco Mondadori. The taming of the cut: Classical refutations with analytic cut. Journal of Logic and Computation, pages 285–319, 1994.
-  Fabio Romeu de Carvalho, Israel Brunstein, and Jair Minoro Abe. Prevision of Medical Diagnosis Based on Paraconsistent Annotated Logic. International Journal of Computing Anticipatory Systems, 18:288–297, 2005.
-  Itala M. Loffredo D’Ottaviano and Milton Augustinis de Castro. Analytical tableaux for da costa’s hierarchy of paraconsistent logics. Electronic Notes in Theoretical Computer Science, 143:27 – 44, 2006. Proceedings of the 12th Workshop on Logic, Language, Information and Computation (WoLLIC 2005).
-  Fahim T. Imam, Wendy MacCaull, and Margaret Ann Kennedy. Merging healthcare ontologies: Inconsistency tolerance and implementation issues. Proceedings of the Twentieth IEEE International Symposium on Computer-Based Medical Systems, pages 530–535, 2007.
-  Decio Krause, Emerson Faria Nobre, and Martin Musicante. Bibel’s matrix connection method in paraconsistent logic: general concepts and implementation. In Proceedings of the XXI International Conference of the Chilean Computer Science Society, pages 161–167, 2001.
-  Adolfo Neto. A Multi-Strategy Tableau Prover. PhD thesis, University of Sao Paulo, 2007. Available at http://www.dainf.ct.utfpr.edu.br/~adolfo/Thesis/. Last accessed, Mar 2009.
-  Adolfo Neto and Marcelo Finger. Effective Prover for Minimal Inconsistency Logic. In Artificial Intelligence in Theory and Practice, IFIP, pages 465–474. Springer Verlag, 2006. Available at http://www.springerlink.com/content/b80728w7m6885765. Last accessed, November 2006.
-  Adolfo Neto and Marcelo Finger. KEMS - A KE-based Multi-Strategy Tableau Prover, 2006. http://www.dainf.ct.utfpr.edu.br/~adolfo/KEMS. Last accessed, April 2009.
-  Adolfo Neto and Marcelo Finger. A KE tableau for a logic of formal inconsistency. In Proceedings of TABLEAUX’07 position papers and Workshop on Agents, Logic and Theorem Proving. Technical Report (LSIS.RR.2007.002) of the LSIS/Université Paul Cézanne, Marseille, France, 2007.
-  Raymond M. Smullyan. First-Order Logic. Springer-Verlag, 1968.
-  Cláudio Rodrigo Torres, Germano Lambert-Torres, Luiz Eduardo Borges da Silva, and Jair Minoro Abe. Intelligent system of paraconsistent logic to control autonomous moving robots. In IEEE Industrial Electronics, IECON 2006 - 32nd Annual Conference on, pages 4009–4013, Nov. 2006.