1 Introduction

The tableau method is a popular deduction method in automated reasoning. Tableau methods in various forms are successfully used and applied for many non-classical logics and are especially apt for new application domains to develop new deduction systems. Of all the different forms, semantic tableau calculi in the styles of Smullyan and Fitting [8, 22] are widely used and widely taught in logic courses, because the rules of inference are easily explained and understood, and deductions are carried out in a completely goal-directed way. In explicit semantic tableau approaches the application of the inference rules is order independent (because these approaches are proof confluent), which avoids the overhead and complication associated with handling don’t know non-determinism of non-invertible rules in direct methods [1] (see also the discussion in [13]). Because semantic tableau approaches construct and return models, they are suitable for fault diagnosis and debugging, which is useful in areas such as ontology development, theory creation and multi-agent systems.

We are interested in refinements of semantic tableau calculi that lead to improvements in carrying out deductions. When carrying out deductions by hand a natural inclination is to delay the application of branching rules as much as possible because these are cumbersome. When it can no longer be delayed, we tend to apply rules creating fewer branches earlier than those creating more branches, unless looking ahead allows us to see that several branches created by an inference step can be closed quickly. In a prover, where everything is automated, the overhead of branching is high as well, so that similar strategies are useful and have been shown to give significant speed-ups, as we found for example in the evaluations undertaken in [14, 23]. Similar considerations and better performance have motivated the development and use of hypertableau, hyperresolution or selection-based resolution methods [3, 4, 7, 16].

It is therefore natural to ask whether there are general principles, which achieve these kinds of refinements in semantic tableau calculi. In [19] we described a general condition for reducing the branching in inference rules without loosing completeness of calculi devised in the tableau synthesis framework. Because this condition is inductive, at present it needs to be checked manually and it is open whether it can be checked automatically.

In this paper we extend the possibilities of refining inference rules, thereby making progress toward the aim of automating rule refinement in the tableau synthesis framework. We describe two new approaches to satisfy the general rule refinement condition of the tableau synthesis framework. For the first approach we introduce atomic rule refinement as a specialisation of the general rule refinement technique with the advantage that it is syntactic and therefore automatic. This guarantees that atomic rule refinement preserves constructive completeness of a tableau calculus. In the second approach we show how to extend a set of non-refinable rules by altering the semantic specification of the logic and obtain a modified set of rules which can be refined. The approaches are illustrated on first-order frame conditions of modal logics, and a tableau calculus for the modal logic \({\mathrm{K}_m}(\lnot )\) of ‘some’, ‘all’ and ‘only’ [12]. This logic is an extension of basic multi-modal logic \({\mathrm{K}_m}\) allowing negation on accessibility relations.

The paper is structured as follows. In the next two sections we sketch the main ideas of the tableau synthesis framework [19] and two existing refinements: general rule refinement and internalisation refinement. In Sect. 4 we introduce and investigate atomic rule refinement, which we show preserves constructive completeness and illustrate its usefulness in several examples. In Sect. 5 we show how atomic rule refinement can be used to construct hypertableau-like calculi. In the final section we apply the presented techniques to the extended modal logic \({{\mathrm{K}_m}(\lnot )}\). The proofs may be found in the long version [24].

2 The Tableau Synthesis Framework

The tableau synthesis framework provides a method for systematically deriving a tableau calculus for a propositional logic L [19]. In the following we give a minimal description of the main ingredients, the tableau language and tableau formulae in the calculi obtained using the method.

As the generated calculi are designed to construct models, the formulae in them are expressed in a meta-language \(\textsf {FO}(L)\) that extends the object language \(\mathcal {L} \) of the logic with extra symbols sufficient to define models and truth valuations of formulas. Consider, for example, the basic modal logic \({\mathrm{K}_m}\) with multiple modalities. The object language is a two-sorted language in which the formulae are defined by the BNF in sort \(\mathsf {f}\), where r is a variable or constant over the second sort \(\mathsf {r}\). The meta-language extends the object language with a domain sort \(\mathsf {D}\) (for the domain of interpretation), and two designated predicate symbols \(\nu _\mathsf {f}\) and \(\nu _\mathsf {r}\) (the holds predicates) plus the connectives of first-order logic and the equality predicate \(\approx \). The language is expressive enough to define the semantics of basic modal logic \({\mathrm{K}_m}\) as follows.

figure a

Intuitively, \(\nu _\mathsf {f}(p,x)\) can be read as ‘p is true in the world x’ (or formally \(x \in p^{\mathcal {I}}\)), and \(\nu _\mathsf {r}(r,x,y)\) as ‘y is an r-successor of x’ (or \((x,y)\in r^{\mathcal {I}}\)). Thus we can read (1) as saying: \({[{r}]}p\) is true in x iff for any r-successor y of x, p is true in y.

The stages in the tableau synthesis method are synthesis, refinement and blocking. The synthesis stage will transform the semantic specification of a logic such as the above into a tableau calculus \(T_L\). The tableau calculus \(T_{\mathrm{K}_m}\) produced for modal logic \({\mathrm{K}_m}\) is given in Fig. 1. This calculus allows reasoning in the semantics of the logic and we can use it for testing the (un)satisfiability of \(\mathrm{K}_m\)-formulae, and for model building.

Fig. 1.
figure 1

Generated tableau calculus \(T_{{\mathrm{K}_m}}\) for \({\mathrm{K}_m}\)

The actual creation of the tableau calculus is not important for this paper, only that we have a sound and complete semantic tableau calculus at hand. When certain well-definedness conditions are true for the semantic definition of a logic the generated tableau calculus \(T_L\) is sound and constructively complete [19]. A tableau calculus is sound when for a satisfiable set of tableau formulae any fully expanded tableau derivation has an open branch. A tableau calculus is constructively complete, if from every open fully expanded branch an interpretation can be constructed that validates all formulae on the branch. This interpretation is the canonical interpretation denoted by \({\mathcal {I}(\mathcal {B})}\).

Because the rule language and the initial calculus is heavily laden with meta-language notation, a crucial second stage in the method is the refinement stage. This is described in the next section. The paper is a contribution to this stage.

The third stage involves adding some form of blocking or loop checking mechanism to ensure termination or find models for finitely satisfiable input. For different modal and description logics various standard blocking mechanisms have been developed. In the tableau synthesis framework, blocking is realised by the use of equality-based blocking, which can be incorporated through additional inference rules, and is independent of the tableau calculus or the logic. Refinements of equality reasoning and equality-based blocking in semantic tableau-like approaches have been studied in [4, 14, 18, 21].

3 Refinement Techniques

The refinement stage of the tableau synthesis method involves two refinements: rule refinement and internalisation.

Rule refinement addresses the problem of reducing branching in inference rules by turning conclusions into premises [19]. Suppose \(T_L\) is a sound and constructively complete tableau calculus for a logic L and suppose \(\rho \) is a tableau rule in \(T_L\). Suppose \(\rho \) has the form where each \(X_i\) is a set \(\{\psi _1,\ldots ,\psi _k\}\) of formulae. For simplicity and without loss of generality, we assume the aim is to refine away the first denominator \(X_1\).

Let the rules \(\rho _j\) with \(j=1,\ldots ,k\) be defined by

figure b

where \(\mathord {\sim }\) denotes complementation, i.e., \(\mathord {\sim }\phi = \psi \), if \(\phi = \lnot \psi \), and \(\mathord {\sim }\phi = \lnot \psi \), otherwise. Each rule \(\rho _j\) is obtained from the rule \(\rho \) by removing the first denominator \(X_1\) and adding the complement of one of the formulae in \(X_1\) as a premise. Intuitively, we may think of the refined rules as incorporating a look-ahead and branch closure, since when \(\mathord {\sim }\psi _j\) is on the branch then the branch \(X_1\) can be immediately closed. Note that there is however no guarantee that the formulae \(\mathord {\sim }\psi _j\) are actually on the branch, even though there may be enough information so that \({\mathcal {I}(\mathcal {B})}\not \models \psi _j\) and thus \({\mathcal {I}(\mathcal {B})}\not \models X_1\) for particular instances, where \({\mathcal {I}(\mathcal {B})}\) is the canonical interpretation associated with the current (partial) branch \(\mathcal {B} \). We say a branch \(\mathcal {B} \) is reflected in the canonical interpretation \({\mathcal {I}(\mathcal {B})}\), if \({\mathcal {I}(\mathcal {B})}\) validates all formulae occurring on the branch \(\mathcal {B} \).

Let \(\mathop {\textsf {Ref}} (\rho ,T_L)\) denote the refined tableau calculus obtained from \(T_L\) by replacing the rule \(\rho \) with the rules \(\rho _1,\ldots ,\rho _k\). We say that \(\mathop {\textsf {Ref}} (\rho ,T_L)\) is the ( \(\rho \) -)rule refinement of \(T_L\). One can show that each rule \(\rho _j\) is derivable [10] in \(T_L\) and this implies that the calculus \(\mathop {\textsf {Ref}} (\rho ,T_L)\) is sound. In general, \(\mathop {\textsf {Ref}} (\rho ,T_L)\) is neither constructively complete nor complete. Nevertheless, the following theorem holds [19].

Theorem 1

Let \(T_L\) be a tableau calculus which is sound and constructively complete for the logic L. Let \(\rho \) be the rule \({X_0}/{X_1\,\mid \,\cdots \,\mid \,X_m}\) in \(T_L\) and suppose \(\mathop {\textsf {Ref}} (\rho ,T_L)\) is the rule refinement of \(T_L\). Further, suppose \(\mathcal {B} \) is an open branch in a \(\mathop {\textsf {Ref}} (\rho ,T_L)\)-tableau derivation and for every set Y of \(\mathcal {L} \)-formulae from \(\mathcal {B} \) the following holds. Then, \(\mathcal {B} \) is reflected in the interpretation \({\mathcal {I}(\mathcal {B})}\) induced by \(\mathcal {B} \).

figure c

\(X_i(\overline{E},t_1,\ldots ,t_n)\) denotes the set of instances of the formulae in \(X_i\) under uniform substitution of \(E_1,\ldots ,E_l\) and \(t_1,\ldots ,t_n\) for \(p_1,\ldots , p_l\) and \(x_1,\ldots ,x_n\), respectively, where \(p_1,\ldots ,p_l\) and \(x_1,\ldots ,x_n\) are respectively all the \(\mathcal {L} \)-variables and all the domain variables occurring in the rule \(\rho \). The notation \(\Vert t_i \Vert \) denotes the equivalence classes of terms modulo the equational theory defined by the term equalities encountered on the branch.

The general rule refinement condition states that if there is information in the branch \(\mathcal {B} \) to exclude \(X_1(\overline{E},t_1,\ldots ,t_n)\) from holding in the model \({\mathcal {I}(\mathcal {B})}\) constructed from \(\mathcal {B} \) then all the formulae of at least one of the other denominators of the rule are on the branch \(\mathcal {B} \). In [19] a weaker condition for rule refinement is given,Footnote 1 but the condition of Theorem 1 is sufficient for the results of this paper. A consequence of the theorem is the following.

Corollary 1

If the general rule refinement condition of Theorem 1 holds for every open branch \(\mathcal {B} \) of any fully expanded \(\mathop {\textsf {Ref}} (\rho ,T_L)\)-tableau then the refined calculus \(\mathop {\textsf {Ref}} (\rho ,T_L)\) is constructively complete for the logic L.

The generalisation of this refinement which turns more than one denominator of a rule into premises is not difficult.

As an example of rule refinement let us consider the (box) rule obtained from (1) in the tableau synthesis framework. Rule refinement gives (something close to) the usual box rule \((\Box )\).

figure d

It can be proved directly that the general rule refinement condition is true in any branch of the refined calculus \(\mathop {\textsf {Ref}} ((\textsf {box}), T_{\mathrm{K}_m})\) of the generated calculus \(T_{\mathrm{K}_m}\) of basic modal logic \({\mathrm{K}_m}\). By Corollary 1 the refined calculus is therefore constructively complete.

Theorem 2

The tableau calculus \(\mathop {\textsf {Ref}} ((\mathsf{box}),T_{{\mathrm{K}_m}})\) is sound and constructively complete for basic multi-modal logic \({\mathrm{K}_m}\).

In Sect. 6 we give an example where this rule refinement is not possible in an extension of the logic \(\mathrm{K}_m\). In fact, the general rule refinement condition is too strong to hold generally, because tableau calculi do not include introduction rules (just elimination rules), but we give examples in Sects. 4 and 6 where the refinement condition does hold.

Internalisation refinement in the tableau synthesis process involves eliminating some of the extra-logical notation, by expressing the rules in a tableau language as close as possible to the language of the logic. In particular, the internalisation involves reduction of the calculus to one where the holds predicates \(\nu _\mathsf {s}\) have been eliminated and the domain sort symbols are expressed in the language of the logic, provided this is possible. The idea is that each atomic formula \(\nu _\mathsf {s}(E,\overline{a})\) in the tableau calculus is replaced by a suitable formula of the logic, and all syntactically redundant rules are removed from the calculus.

For example, if the logic L contains nominals and the \(@_{}\) connective of hybrid logic [5] then the elements of the domain sort \(\mathsf {D}\) can be identified with nominals and the formulae \(\nu _\mathsf {f}(\phi ,v)\) and \(\nu _\mathsf {r}(\alpha ,v,w)\) can be internalised as the formulae \(@_{v}\phi \) and \(@_{v}\lnot {[{\alpha }]}\lnot w\) respectively, where v and w have become nominals. The refined and internalised calculus for basic modal logic \({\mathrm{K}_m}\) is given in Fig. 2.

Fig. 2.
figure 2

Refined tableau calculus \(T_{\mathrm{K}_m}^{\textsf {ref}}\).

If the logic is not expressive enough then an option is to simplify the notation of the rules by reformulating them using labels and the ‘:’ connective (of varying arity), to rephrase the rules in notation more familiar from the literature (alternative notations also exist).

The internalisation refinement simplifies the tableau language and, in many cases, reduces the number of the rules in the tableau calculus. In our experience it is easiest and produces better results, if rule refinement is performed first, followed by the internalisation refinement.

4 Atomic Rule Refinement

In this section we introduce the technique of atomic rule refinement. Under this refinement, formulae in the conclusions are only moved upwards to premise positions if the formulae are negated \(\mathcal {L}\) -atomic formulae in the language FO(L).

By definition, a \(\textsf {FO}(L)\)-formula \(\phi \) is \(\mathcal {L}\) -atomic if it is an atomic formula of \(\textsf {FO}(L)\) and all occurrences of \(\mathcal {L} \)-formulae in \(\phi \) are also atomic. Thus, \(\nu _\mathsf {s}(E,\overline{t})\) is \(\mathcal {L} \)-atomic only if E is an atomic formula of \(\mathcal {L} ^\mathsf {s}\). For example, the formulae \(\nu _\mathsf {f}(p,x)\) and \(\nu _\mathsf {r}(r,f(r,p,x),x)\) are \(\mathcal {L} ({\mathrm{K}_m})\)-atomic, but the formulae \(\lnot \nu _\mathsf {f}(p,x)\), \(\nu _\mathsf {f}(\lnot p,x)\) and \(\nu _\mathsf {f}(p\vee q,x)\) are not. The respective reasons are that \(\lnot \nu _f(p,x)\) is a negated \(\mathcal {L} ({\mathrm{K}_m})\)-atomic formula and \(\nu _\mathsf {f}(\lnot p,x)\) and \(\nu _\mathsf {f}(p\vee q,x)\) are not \(\mathcal {L} \)-atomic in FO(\(\mathrm{K}_m\)).

Using the notation and assumptions of Theorem 1, we can prove:

Theorem 3

Assume that for an open branch \(\mathcal {B} \) of the refined tableau calculus \(\mathop {\textsf {Ref}} (\rho ,T_L)\) and for every set Y of \(\mathcal {L} \)-formulae from \(\mathcal {B} \) the following holds. Then, \(\mathcal {B} \) is reflected in \({\mathcal {I}(\mathcal {B})}\).

figure e

Unlike the general rule refinement condition, the atomic rule refinement condition is purely syntactic and, thus, can be automatically checked against each given open branch \(\mathcal {B} \). However, even if all the formulae from \(X_1\) are negated \(\mathcal {L} \)-atomic formulae, their instantiation within a branch of a tableau derivation can, in general, produce a formula which is not a negated \(\mathcal {L} \)-atom. Therefore, similar to Corollary 1, by Theorem 3, in order to preserve constructive completeness we need to make sure that the atomic rule refinement condition holds for every branch of any derivation in the refined calculus.

Corollary 2

If the assumptions and condition of Theorem 3 holds for every open branch \(\mathcal {B} \) of any fully expanded \(\mathop {\textsf {Ref}} (\rho ,T_L)\)-tableau then the refined calculus \(\mathop {\textsf {Ref}} (\rho ,T_L)\) is constructively complete for the logic L.

In the following we give several examples of atomic rule refinement.

Example 1

The refinement \((\Box )\) of the rule (box) mentioned in the previous section is an example of an atomic rule refinement. Because any instantiation of \(\nu _\mathsf {r}(r,x,y)\) in the language of \({\mathrm{K}_m}\) is an \(\mathcal {L} ({\mathrm{K}_m})\)-atomic formula, constructive completeness of the refined calculus \(\mathop {\textsf {Ref}} ((\textsf {box}),T_{\mathrm{K}_m})\) follows from Corollary 2.

Example 2

Suppose we wish to impose that one accessibility relation r of our modal logic is irreflexive, i.e., we specify that \(\forall x\,\lnot \nu _\mathsf {r}(r,x,x)\). This generates the rule .Footnote 2 Using atomic rule refinement the rule can be refined to the following closure rule

figure f

Example 3

If we wish to specify that all relations are irreflexive, atomic rule refinement allows us to use the rule . Because the language of \({\mathrm{K}_m}\) contains only atomic relations \(r_1,\ldots ,r_m\) and no relational connectives, any instantiation of r and variable x in \(\nu _\mathsf {r}(r,x,x)\) produces only \(\mathcal {L} ({\mathrm{K}_m})\)-atomic formulae of the form \(\nu _\mathsf {r}(r_i,t,t)\) (where t is a term of the domain sort). Therefore, the atomic rule refinement condition is true for any branch of any tableau derivation in the calculus \(\mathop {\textsf {Ref}} ((\textsf {box}),T_{\mathrm{K}_m})\) extended with the (irr) rule. Thus, by Corollary 2, the calculus \(\mathop {\textsf {Ref}} ((\textsf {box}),T_{\mathrm{K}_m})\) extended with the (irr) rule is sound and constructively complete for the logic \({\mathrm{K}_m}\) with irreflexive relations.

Applying the internalisation refinement we obtain the following theorem for the labelled tableau calculus.

Theorem 4

\(T_{\mathrm{K}_m}^{\textsf {ref}}\) extended with the rule for each irreflexive relation r in \({\mathrm{K}_m}\) is sound and constructively complete (or, where r denotes a variable, for the case that each relation in the logic is irreflexive).

Example 4

The following frame condition from [2] states the existence of an immediate predecessor for every element in a model.

$$\forall x\exists y\forall z\Bigl (\nu _\mathsf {r}(r,y,x)\wedge x\not \approx y{}\wedge {} \bigr ((\nu _\mathsf {r}(r,y,z)\wedge \nu _\mathsf {r}(r,z,x))\rightarrow (z\approx x\vee z\approx y)\bigl )\Bigr )$$

We first reduce the formula to a form acceptable in the tableau synthesis framework. Let g be a new Skolem function which depends on two arguments, one of the sort \(\mathsf {r}\) and one from the domain sort. The existential quantifier is eliminated from the frame conditions and decomposed to give three formulae (see [19]):

figure g

From these formulae three rules are generated:

figure h

Atomic rule refinement is not applicable to the first rule since the conclusion is not negated. Consider the second and third rules. Applying the same argument as in Example 3 above we find that no instantiation of \(x\approx g(r,x)\), \(\nu _\mathsf {r}(r,g(r,x),z)\), and \(\nu _\mathsf {r}(r,z,x)\) within the language \(\textsf {FO}(\mathrm{K}_m)\) produces a formula which is not \(\mathcal {L} ({\mathrm{K}_m})\)-atomic. This means the atomic rule refinement condition holds for these rules. Refining the second rule once and the third rule twice, the rules

figure i

are obtained. By Corollary 2, constructive completeness of any tableau calculus in the language \(\textsf {FO}(\mathrm{K}_m)\) is preserved under these refinements. Internalising \(\textsf {FO}(\mathrm{K}_m)\) in the hybrid logic extension of \({\mathrm{K}_m}\) we obtain the following theorem.

Theorem 5

\(T_{\mathrm{K}_m}^{\textsf {ref}}\) extended with the rules

figure j

is sound and constructively complete for \({\mathrm{K}_m}\) over the class of models satisfying the frame condition of existence of an immediate predecessor.

The use of Skolem terms is not in agreement with common, present practice in the area, but they provide a useful technical device to enhance the scope of semantic tableau approaches by accommodating properties and specifications with negative occurrences of existential quantification, which produce rules where these occurrences appear in premise positions, cf. Example 4. This easily accommodates non-geometric theories. Skolem terms also allow for effective implementation of blocking and equality reasoning, since, e.g., no inference steps need to be recomputed when blocking occurs (cf. the comments in [14]).

Examples 3 and 4 are important because they show that atomic rule refinement allows automatic refinement of tableau rules generated from frame conditions of modal logics. Furthermore, the case of the last rule in Example 4 is a particularly clear illustration of the benefits of rule refinement. In that case the unrefined rule is applicable for every pair of domain elements and creates four branches on application, whereas the refined rule replacing it, is only applied to formulae matching two premises, and then creates only two branches. This constraining effect on the search space is an important benefit of rule refinement. In general, using the fairness requirements for tableau derivations, it is possible to map each refined derivation to its unrefined counterpart where each rule application is either mapped to itself or to the application of the corresponding unrefined rule. Since more premises need to be satisfied, the refined rule will be applied less often and each of its applications produces fewer branches than the corresponding point of the unrefined tableau. Thus, each refined derivation (in other words, the search space) is smaller than its unrefined counterpart.

Another important point is the incrementality of the technique: the rules can be refined one by one without affecting the refinability of other rules. It is therefore more flexible, robust and useful than general rule refinement, of which it is a special case.

Because of these attractive features we have used atomic rule refinement in other recent work. In [23] we applied the tableau synthesis framework and atomic rule refinement in the creation of terminating tableau calculi for a bi-intuitionistic logic with interacting modal operators, called BISKT. This logic can be equivalently embedded into a tense logic \(Kt(H,R)\) with several interacting modalities [18] via an extension of the standard embedding of intuitionistic propositional logic into modal logic \(\textit{S4}\). \(Kt(H,R)\) was subject to an investigation of the numerous possibilities of defining tableau calculi for modal logics, and their relative efficiency [18]. Interestingly, we found that the tableau calculi of BISKT [23] exhibited better performance than those of \(Kt(H,R)\) [18], which we attribute to the greater constraining power of atomic rule refinement in the style of calculus used for BISKT.

In [14] we used atomic rule refinement to obtain a tableau calculus with dynamically generated hypertableau-like inference rules for description logic ontologies. In particular, the standard inference rule for TBox statements \(\alpha \), which hold universally, is replaced by a set of refined rules for each statement in the TBox. E.g., for the statement \(A_1 \sqcap A_2 \sqsubseteq B\) the specifically generated rule is , where \(A_1, A_2, B\) are atomic concepts. For satisfiable and unsatisfiable inputs, the evaluation results showed improved performance for this refinement. The speed-up was particularly marked for unsatisfiable inputs (2.5–6 times faster on average), which was found to be mainly due to the presence of additional closure rules such as generated from the disjointness statement \(A\sqcap B \sqsubseteq \bot \), where A and B are atomic concepts. The results also showed a 22% (and 74%) drop in memory use for satisfiable (and unsatisfiable) inputs when using refined rules. The essential idea in this work is generalised in the next section.

5 Hypertableau

Let the given logic L have disjunction-like connectives \(\vee \) and negation-like connectives \(\lnot \) for some sort \(\mathsf {s}\) of the logic. Assume \(T_L\) is a tableau calculus sound and constructively complete for L and contains the rules

figure k

which are the usual rules for disjunction and negation. We transform the synthesised calculus \(T_L\) into a new calculus \(T_L^{\textsf {hyp}}\) in three steps. For simplicity we assume that disjunction in L is associative and commutative with respect to satisfiability, that is, the following statements are entailed by the semantic specification of L.

figure l

This assumption is not essential for the transformation but allows us to flatten disjunctions and avoid a combinatorial blow-up.

In the first step of the transformation, the usual disjunction rule is replaced by the set of the rules (for \(k>1\)):

figure m

We denote by \(T_L^{\textsf {sp}}\) a tableau calculus obtained from \(T_L\) by replacing the usual disjunction rule by the rules \((\textsf {split}_k)\). The \((\textsf {split}_k)\) rules and the usual disjunction rule are derivable from each other. Therefore, the transformed calculus \(T_L^{\textsf {sp}}\) is sound and constructively complete.

For the second step consider the following rules (for \(m+n>1\))

figure n

with the side-condition that only atomic substitutions are allowed for \(p_1,\ldots ,p_m\). Note, m is the maximal number of negated atoms in the disjunction which match the premise. That is, the rules are applicable only to formulae of the shape \(\nu _\mathsf {s}(\lnot E_1\vee \cdots \vee \lnot E_m\vee F_1\vee \cdots \vee F_n,\overline{x})\), where all \(E_1,\ldots ,E_m\) are atomic formulae of the logic L and no \(F_1,\ldots ,F_n\) is a negated atomic formula of L.

Let \(T_L^{\textsf {sp}+}\) be a tableau calculus obtained from \(T_L^{\textsf {sp}}\) by replacing the rules \((\textsf {split}_k)\) by the rules \((\textsf {split}^+_{mn})\). The rules \((\textsf {split}_k)\) and \((\textsf {split}^+_{mn})\) are derivable from each other and, thus, the following theorem holds.

Theorem 6

\(T_L^{\textsf {sp}+}\) is sound and constructively complete for the logic L.

Now we are in a position to use atomic rule refinement to refine the rules \((\textsf {split}^+_{mn})\) to the rules (\(m+n>1\))

figure o

with the restriction that only atomic substitutions are allowed for \(p_1,\ldots ,p_m\). These are hypertableau-like rules. Similarly to the rules in the previous step, an application of the rule \((\textsf {hyp}_{mn})\) is allowed only to formulae of the shape \(\nu _\mathsf {s}(\lnot E_1\vee \cdots \vee \lnot E_m\vee F_1\vee \cdots \vee F_n)\), where all \(E_1,\ldots ,E_m\) are atomic formulae and no \(F_1,\ldots ,F_n\) are negated atomic formulae of the logic L. Notice that in the case of \(n=0\) the rules \((\textsf {hyp}_{mn})\) are atomic closure rules.

Let \(T_L^{\mathsf {hyp}}\) be the calculus obtained from \(T_L^{\textsf {sp}}\) by adding the \((\textsf {hyp}_{mn})\) rules. By Corollary 2 and Theorem 6 we obtain constructive completeness of \(T_L^{\textsf {hyp}}\).

Theorem 7

\(T_L^{\textsf {hyp}}\) is sound and constructively complete for the logic L.

Thus, for any (propositional) logic L with disjunction and negation connectives and any sound and constructive complete calculus for L with the usual disjunction and negation rules, it is possible to devise a hypertableau-like calculus that is sound and constructively complete for the logic L.

Derivations in \(T_L^{\textsf {hyp}}\) can be done more efficiently if the logic L has additional properties. We already assume associativity and commutativity of disjunction. Suppose now that the satisfiability of formulae in a subset of the language \(\mathcal {L} \) is reducible to the satisfiability of formulae in conjunctive normal form:

figure p

Thus, every formula E has an equi-satisfiable clausal representation as a set of clauses \(C_1,\ldots ,C_I\), where \(C_i = E_{i1}\vee \cdots \vee E_{iJ_i}\) for each \(i=1,\ldots ,I\). Since disjunction is associative and commutative, we can assume that, in every clause, all negated atomic formulae (negative literals) of the logic appear before all other formulae. Let \(\mathcal {A}\) be a reduction algorithm which transforms any formula E into such equi-satisfiable clausal normal form.

Cases of logics become interesting when there are many clauses with negated atomic formulae, because then the \((\textsf {hyp}_{mn})\) rules with \(m>0\) are applied more frequently in derivations in \(T_L^{\textsf {hyp}}\). Since the \((\textsf {hyp}_{mn})\) rules with \(m>0\) create fewer branching points in derivations than the \((\textsf {hyp}_{mn})\) rules with \(m=0\), derivations in \(T_L^{\textsf {hyp}}\) will have fewer branches and therefore performance is enhanced.

The conclusions of the \((\textsf {hyp}_{mn})\) rules are allowed to contain non-atomic \(\mathcal {L} \)-formulae which have to be decomposed further by other rules of the calculus. For the conclusions of other rules, we have two alternatives. One is to use the rules of the tableau calculus to decompose their formulae up to atomic components. The other alternative is to apply the reduction algorithm \(\mathcal {A}\) to every new conclusion of any rule different from the \((\textsf {hyp}_{mn})\) rules. The first alternative uses the decomposition rules of the tableau calculus (assuming it includes rules for conjunction and disjunction) and the second one uses the algorithm \(\mathcal {A}\). In the implementation of a prover these two alternatives have to be carefully balanced, depending on the complexity of the algorithm \(\mathcal {A}\) and how efficiently it is implemented. There is an efficient clausification algorithm for Boolean parts which runs in polynomial time on the length of the input [17]. Thus, we can assume that every conclusion of a rule is immediately transformed into a set of clauses. This allows to omit all the rules for Boolean connectives except the hypertableau rules. We give an example of a hypertableau-style calculus in the next section.

6 Case Study: The Modal Logic of ‘Some’, ‘All’ and ‘Only’

As an illustration of the usefulness and generality of the refinement techniques investigated in this paper, we apply them to the modal logic \({{\mathrm{K}_m}(\lnot )}\) of ‘some’, ‘all’ and ‘only’ [12]. \({{\mathrm{K}_m}(\lnot )}\) is the extension of the basic multi-modal logic \({\mathrm{K}_m}\) with the relational negation.

Following the tableau synthesis framework [19] the language \(\mathcal {L} \) has two sorts: a sort \(\mathsf {f}\) for formulae and a sort \(\mathsf {r}\) for relations. Assuming the sort \(\mathsf {r}\) is formed over a set of relational constants \(\{a_1,\ldots ,a_m\}\), in \(\mathcal {L} \) every relation \(\alpha \) is defined by the BNF , where \(\lnot \) is a relational connective. The sort \(\mathsf {f}\) is formed over a set of propositional variables \(\{p,q,\ldots \}\) and every formula \(\phi \) is defined by the BNF , where \(\alpha \) ranges over all relations in the language.

The semantic specification language \(\textsf {FO}({{\mathrm{K}_m}(\lnot )})\) for \({{\mathrm{K}_m}(\lnot )}\) is a first-order language over the sorts \(\mathsf {f}\) and \(\mathsf {r}\) and an additional domain sort \(\mathsf {D}\). Formulae of \(\mathcal {L} \) are encoded in the obvious way as terms of the appropriate sorts in \(\textsf {FO}({{\mathrm{K}_m}(\lnot )})\). That is, every logical connective of \(\mathcal {L} \) is represented by a function in \(\textsf {FO}({{\mathrm{K}_m}(\lnot )})\). Every propositional variable of \(\mathcal {L} \) is an individual variable of the sort \(\mathsf {f}\) in \(\textsf {FO}({{\mathrm{K}_m}(\lnot )})\). Besides the individual constants \(a_1,\ldots ,a_m\) for relations, the language \(\textsf {FO}({{\mathrm{K}_m}(\lnot )})\) has a countable set of relation variables \(r,r',\ldots \). The additional sort \(\mathsf {D}\) has a countable set of individual variables \(x,y,z,\ldots \). Furthermore, the semantic specification language has two predicate symbols \(\nu _\mathsf {f}\) and \(\nu _\mathsf {r}\) of sort \((\mathsf {f},\mathsf {D})\) and \((\mathsf {r},\mathsf {D},\mathsf {D})\), respectively, to encode satisfiability. The meaning of these symbols can be understood from the definitions given next. The semantic specification consists of the following formulae, one for each of the logical connectives of \({\mathrm{K}_m}(\lnot )\).

figure q

Compared to the specification of \({\mathrm{K}_m}\), the specification of \({{\mathrm{K}_m}(\lnot )}\) is extended with the second clause in the left column, which defines relational negation.

The logic \(\mathrm{K}_m(\lnot )\) is interesting because of the presence of three quantifier operators. These are the necessity operator \({[{\alpha }]}\), the possibility operator \(\lnot {[{\alpha }]} \lnot \) and a third operator, the sufficiency operator \({[{\lnot \alpha }]}\lnot \), sometimes referred to as the window operator. \(\nu _\mathsf {f}({[{\alpha }]}\phi ,v)\) can be read as saying ‘\(\phi \) is true in all \(\alpha \)-successors’, \(\nu _\mathsf {f}(\lnot {[{\alpha }]}\lnot \phi ,v)\) as ‘\(\phi \) is true in some \(\alpha \)-successor’, and \(\nu _\mathsf {f}({[{\lnot \alpha }]}\lnot \phi ,v)\) as ‘\(\phi \) is true in only \(\alpha \)-successors of v’. \({{\mathrm{K}_m}(\lnot )}\) is a sublogic of Boolean modal logic [9] and the description logics \(\mathcal {ALBO}\) and \(\mathcal {ALBO}^{\textsf {id}}\) [20]. \({{\mathrm{K}_m}(\lnot )}\) has the finite model property [9] but the tree model property fails for the logic (e.g. [15]). The results of [15] imply that the satisfiability problem in \({{\mathrm{K}_m}(\lnot )}\) is ExpTime-complete.

Fig. 3.
figure 3

Generated tableau calculus \(T_{{{\mathrm{K}_m}(\lnot )}}\) for \({{\mathrm{K}_m}(\lnot )}\)

The tableau calculus \(T_{{{\mathrm{K}_m}(\lnot )}}\) obtained from the semantic specification of \({{\mathrm{K}_m}(\lnot )}\) in the tableau synthesis framework is given in Fig. 3. New compared to the generated tableau calculus for the basic modal logic \({\mathrm{K}_m}\) in Fig. 1 are the last two rules for relational negation. Because the semantic specification of \({{\mathrm{K}_m}(\lnot )}\) is well-defined in the sense of [19], from Theorems 5.1 and 5.6 in that work, we immediately obtain the following result.

Theorem 8 (Soundness and constructive completeness)

The calculus \(T_{{\mathrm{K}_m}(\lnot )}\) is sound and constructively complete for the logic \({{\mathrm{K}_m}(\lnot )}\).

However, none of the rules of the tableau calculus for \({{\mathrm{K}_m}(\lnot )}\) from Fig. 3 are refinable. In particular, the (box) rule cannot be refined to the \((\Box )\) rule (as discussed in Sect. 4) without loosing constructive completeness. Take for instance the set of formulae \(\{\nu _\mathsf {f}({[{\lnot \lnot r}]}p,a), \nu _\mathsf {r}(r,a,b), \lnot \nu _\mathsf {f}(p,b)\}\). The set is not \({{\mathrm{K}_m}(\lnot )}\)-satisfiable but none of the rules of the refined calculus \(\mathop {\textsf {Ref}} ((\textsf {box}),T_{{{\mathrm{K}_m}(\lnot )}})\) are applicable to the set.

A possibility for refinement is the atomic refinement of instances of rules. Atomic rule refinement would allow us to use the rule \((\Box )\) on formulae \({[{r}]}\phi \), where r is bound to a relational constant. We would still need to use the rule (box) when r is bound to a complex relational formula (in this case a negated relational formula). This kind of refinement is generally possible, and will be useful in practice, but leads to an uneven treatment of box formulae. Better would be if all instances of a rule can be refined.

In fact, by a small amendment of the semantic specification it is possible to refine the (box) rule generally, for all instances. Observe that the semantic specification of \({{\mathrm{K}_m}(\lnot )}\) entails the following formula.

$$\begin{aligned} \forall x\; (\nu _\mathsf {f}({[{\lnot r}]}p, x)\rightarrow \forall y\;(\lnot \nu _\mathsf {r}(r,x,y)\rightarrow \nu _\mathsf {f}(p,y))) \end{aligned}$$

This means the formula can be added to the semantic specification of \({{\mathrm{K}_m}(\lnot )}\) without changing the class of models of the logic. We use the notation \(T_{{{\mathrm{K}_m}(\lnot )}}^+\) to refer to the tableau calculus generated from the semantic specification extended with this formula. \(T_{{{\mathrm{K}_m}(\lnot )}}^+\) consists of the rules listed in Fig. 3 and the rule:

figure r

We can check that the well-definedness conditions from [19] are satisfied for the extended semantic specification of \({{\mathrm{K}_m}(\lnot )}\). Therefore, by the results of the tableau synthesis framework, the extended calculus \(T_{{{\mathrm{K}_m}(\lnot )}}^+\) is sound and constructively complete for \({{\mathrm{K}_m}(\lnot )}\). Note, the rule \(({[{\lnot }]})\) is a derived rule in the calculus \(T_{{{\mathrm{K}_m}(\lnot )}}\).

While the rule \(({[{\lnot }]})\) neither satisfies the atomic nor the general rule refinement condition, the general rule refinement condition is now satisfied for the (box) rule, and, thus, as a consequence of Corollary 1 we get:

Theorem 9

The tableau calculus \(\mathop {\textsf {Ref}} ((\textsf {box}),T_{{{\mathrm{K}_m}(\lnot )}}^+)\) using the \((\Box )\) rule instead of the \((\textsf {box})\) rule is sound and constructively complete for the logic \({{\mathrm{K}_m}(\lnot )}\).

The internalisation refinement is possible for the new calculus if nominals and the \(@_{}\) operator of hybrid logic [5] are introduced to the tableau language of \({{\mathrm{K}_m}(\lnot )}\). This significantly strengthens the tableau language and allows all formulae \(\nu _\mathsf {f}(\phi ,a)\) and \(\lnot \nu _\mathsf {f}(\phi ,a)\) to be replaced by the formulae \(@_{a}\phi \) and \(@_{a}\lnot \phi \), respectively, and the formulae \(\nu _\mathsf {r}(\alpha ,a,b)\) and \(\lnot \nu _\mathsf {r}(\alpha ,a,b)\) can be replaced respectively by the formulae \(@_{a}\lnot {[{\alpha }]}\lnot b\) and \(@_{a}{[{\alpha }]}\lnot b\) (the latter is equivalent to \(@_{a}\lnot \langle {\alpha }\rangle b\)). In this case the result of the refinement is a significantly simplified calculus, reminiscent of standard labelled tableau calculi. The obtained rules are listed in Fig. 4. We denote this calculus by \(T_{{\mathrm{K}_m}(\lnot )}^{\textsf {ref}}\). By the results of this paper and [19] it is sound and constructively complete for \({{\mathrm{K}_m}(\lnot )}\).

Fig. 4.
figure 4

Refined tableau calculus \(T_{{\mathrm{K}_m}(\lnot )}^{\textsf {ref}}\).

Because disjunction and negation in \({{\mathrm{K}_m}(\lnot )}\) are Boolean, it is possible to devise a hypertableau calculus for \({{\mathrm{K}_m}(\lnot )}\), see Fig. 5. By Theorem 7, this calculus is sound and constructively complete for \({{\mathrm{K}_m}(\lnot )}\). In summary, we have:

Theorem 10

The refined tableau calculi \(T_{{\mathrm{K}_m}(\lnot )}^{\textsf {ref}}\) and \(T_{{{\mathrm{K}_m}(\lnot )}}^{\textsf {hyp}}\) (of Figs. 4 and 5) are sound and constructively complete for the logic \({{\mathrm{K}_m}(\lnot )}\).

Fig. 5.
figure 5

Hybrid hypertableau calculus \(T_{{{\mathrm{K}_m}(\lnot )}}^{\textsf {hyp}}\) for \({{\mathrm{K}_m}(\lnot )}\)

A further example of systematic rule refinement using the ideas of this paper is the description logic \(\mathcal {ALBO}^{\textsf {id}}\), for which we presented a tableau calculus in [20]. \(\mathcal {ALBO}^{\textsf {id}}\) is an extension of the description logic \(\mathcal {ALC}\) with individuals, the inverse role (relation) connective, Boolean connectives on roles and the identity role. Although that work predates the work in [19] and the present work, the tableau calculus in [20] of \(\mathcal {ALBO}^{\textsf {id}}\) can be in fact synthesised by altering the semantic specification similar as described for \({{\mathrm{K}_m}(\lnot )}\) in this section. Using the results of the previous section a hypertableau calculus can be defined for \(\mathcal {ALBO}^{\textsf {id}}\).

7 Concluding Remarks

The paper has investigated refinement of inference rules for semantic tableau calculi in the setting of the tableau synthesis framework. We introduced atomic rule refinement as a general principle to reduce branching and simplify the way deductions are carried out with disjunctive formulae. A distinctive feature of the refinement is that it is syntactic and can be automated. As we have shown the approach covers two important cases: refinement of inference rules generated from frame conditions and systematically developing hypertableau-like calculi. In both cases, properties of the language of the logic are exploited. In the first case, because frame conditions are properties on atomic relations, the condition for atomic rule refinement trivially holds. In the second case, formulae of the logic were transformed into a normal form and the hypertableau rule was defined by constraining disjunctive splitting rules with atomic premises.

In the case study of \({{\mathrm{K}_m}(\lnot )}\) we showed that even if none of the rules of the initially generated calculus are refinable (without loss of completeness) there may be ways to modify the semantic specification for the logic and extend the calculus by additional rules in order to achieve refinability. In this case the addition of derivable rule enabled the refinement of other rules in the calculus.

Adding analytic cut rules [6] to the calculus is another approach to make rule refinement possible. This allows KE tableau calculi to be systematically derived in the framework. Due to space limitation we do not elaborate on this case.

We have considered rule refinement in the tableau synthesis framework. Since its rule language gives full freedom to generate sets of inference rules for any logic, where the semantics can be expressed in a first-order language, the results of the paper apply to all calculi that can be described in the framework. The refinements and essential ideas are however more general and can be applied to other types of deduction calculi, which deserves to be investigated. Further work will include the investigation of other refinements and reduction of the search space, such as ordering restrictions [11].