LTCS–Report Matching with respect to general concept inclusions in the Description Logic E L

Matching concept descriptions against concept patterns was introduced as a new inference task in Description Logics (DLs) almost 20 years ago, motivated by applications in the Classic system. For the DL EL , it was shown in 2000 that the matching problem is NP-complete. It then took almost 10 years before this NP-completeness result could be extended from matching to uniﬁcation in EL . The next big challenge was then to further extend these results from matching and uniﬁcation without a TBox to matching and uniﬁcation w.r.t. a general TBox, i.e., a ﬁnite set of general concept inclusions. For uniﬁcation, we could show some partial results for general TBoxes that satisfy a certain restriction on cyclic dependencies between concepts, but the general case is still open. For matching, we solve the general case in this paper: we show that matching in EL w.r.t. general TBoxes is NP-complete by introducing a goal-oriented matching algorithm that uses non-deterministic rules to transform a given matching problem into a solved form by a polynomial number of rule applications. We also investigate some tractable variants of the matching problem.


Introduction
The DL EL, which offers the constructors conjunction ( ), existential restriction (∃r.C), and the top concept ( ), has recently drawn considerable attention since, on the one hand, important inference problems such as the subsumption problem are polynomial in EL, even in the presence of general concept inclusions (GCIs) [Bra04].On the other hand, though quite inexpressive, EL can be used to define biomedical ontologies, such as the large medical ontology SNOMED CT. 1Matching of concept descriptions against concept patterns is a non-standard inference task in Description Logics, which was originally motivated by applications of the Classic system [BBMAR89].In [BM96], Borgida and McGuinness proposed matching as a means to filter out the unimportant aspects of large concept descriptions appearing in knowledge bases of Classic.Subsequently, matching (as well as the more general problem of unification) was also proposed as a tool for detecting redundancies in knowledge bases [BN01] and to support the integration of knowledge bases by prompting possible interschema assertions to the integrator [BK99].
All three applications have in common that one wants to search the knowledge base for concepts having a certain (not completely specified) form.This "form" can be expressed with the help of so-called concept patterns, i.e., concept descriptions containing variables (which stand for descriptions).For example, assume that we want to find concepts that are concerned with individuals having a son and a daughter sharing some characteristic.This can be expressed by the pattern D := ∃has-child.(MaleX) ∃has-child.(FemaleX), where X is a variable standing for the common characteristic.The concept description C := ∃has-child.(TallMale) ∃has-child.(TallFemale) matches this pattern in the sense that, if we replace the variable X by the description Tall, the pattern becomes equivalent to the description.Thus, the substitution σ := {X → Tall} is a matcher modulo equivalence of the matching problem C ≡ ?D since C ≡ σ(D).The original paper by Borgida and McGuinness actually considered matching modulo subsumption rather than matching modulo equivalence: such a problem is of the form C ? D, and a matcher is a substitution τ satisfying C τ (D).Obviously, any matcher modulo equivalence is also a matcher modulo subsumption, but not vice versa.For example, the substitution σ := {X → } is a matcher modulo subsumption of the matching problem C ? D, but it is not a matcher modulo equivalence of C ≡ ?D.
The first results on matching in DLs were concerned with sublanguages of the Classic description language, which does not allow for existential restrictions of the kind used in our example.A polynomial-time algorithm for computing matchers modulo subsumption for a rather expressive DL was introduced in [BM96].The main drawback of this algorithm was that it required the concept patterns to be in structural normal form, and thus it was not able to handle arbitrary matching problems.In addition, the algorithm was incomplete, i.e., it did not always find a matcher, even if one existed.For the DL ALN , a polynomial-time algorithm for matching modulo subsumption and equivalence was presented in [BKBM99].This algorithm is complete and it applies to arbitrary patterns.In [BK00], matching in DLs with existential restrictions was investigated for the first time.In particular, it was shown that in EL the matching problem (i.e., the problem of deciding whether a given matching problem has a matcher or not) is polynomial for matching modulo subsumption, but NP-complete for matching modulo equivalence.
Unification is a generalization of matching where both sides of the problem are patterns and thus the substitution needs to be applied to both sides.In [BN01] it was shown that the unification problem in the DL FL 0 , which offers the constructors conjunction ( ), value restriction (∀r.C), and the top concept ( ), is ExpTime-complete.In contrast, unification in EL is "only" NP-complete [BM10].In the results for matching and unification mentioned until now, there was no TBox involved, i.e., equivalence and subsumption was considered with respect to the empty TBox.For unification in EL, first attempts were made to take general TBoxes, i.e., finite sets of general concept inclusions (GCIs), into account.However, the results obtained so far, which are again NP-completeness results, are restricted to general TBoxes that satisfy a certain restriction on cyclic dependencies between concepts [BBM12a,BBM12b].
For matching, we solve the general case in this paper: we show that matching in EL w.r.t.general TBoxes is NP-complete by introducing a goal-oriented matching algorithm that uses non-deterministic rules to transform a given matching problem into a solved form by a polynomial number of rule applications.The matching problems considered in this paper are actually generalizations of matching modulo equivalence and matching modulo subsumption.For the special case of matching modulo subsumption, we show that the problem is tractable also in the presence of GCIs.The same is true for the dual problem where the pattern is on the side of the subsumee rather than on the side of the subsumer.

The Description Logics EL
The expressiveness of a DL is determined both by the formalism for describing concepts (the concept description language) and the terminological formalism, which can be used to state additional constraints on the interpretation of concepts and roles in a so-called TBox.
The concept description language considered in this paper is called EL. Starting with a finite set N C of concept names and a finite set N R of role names, EL-concept descriptions are built from concept names using the constructors conjunction (C D), existential restriction (∃r.C for every r ∈ N R ), and top ( ).Since in this paper we only consider EL-concept descriptions, we will sometimes dispense with the prefix EL.
On the semantic side, concept descriptions are interpreted as sets.To be more precise, an interpretation I = (∆ I , • I ) consists of a non-empty domain ∆ I and an interpretation function • I that maps concept names to subsets of ∆ I and role names to binary relations over ∆ I .This function is inductively extended to concept descriptions as follows: An EL-concept description is an atom if it is an existential restriction or a concept name.The atoms of an EL-concept description C are the subdescriptions of C that are atoms, and the top-level atoms of C are the atoms occurring in the top-level conjunction of C. Obviously, any EL-concept description is the conjunction of its top-level atoms, where the empty conjunction corresponds to .The atoms of a general EL-TBox T are the atoms of all the concept descriptions occurring in GCIs of T .
We say that a subsumption between two atoms is structural if their top-level structure is compatible.To be more precise, following [BBM12a] we define structural subsumption between atoms as follows: the atom C is structurally subsumed by the atom D w.r.t.T (C s T D) iff one of the following holds: Then

Matching in EL
In addition to the set N C of concept names (which must not be replaced by substitutions), we introduce a set N V of concept variables (which may be replaced by substitutions).Concept patterns are now built from concept names and concept variables by applying the constructors of EL.A substitution σ maps every concept variable to an EL-concept description.It is extended to concept patterns in the usual way: An EL-concept pattern C is ground if it does not contain variables, i.e., if it is a concept description.Obviously, a ground concept pattern is not modified by applying a substitution.
Matching problems modulo equivalence and subsumption are special cases of the matching problems introduced above: This coincides with the notion of matching modulo equivalence considered in [BKBM99, BK00], but extended to a non-empty general TBox.
• The EL-matching problem Γ is a left-ground matching problem modulo subsumption if C ? D ∈ Γ implies that C is ground.This coincides with the notion of matching modulo subsumption considered in [BKBM99, BK00], but again extended to a non-empty general TBox.
• The EL-matching problem Γ is a right-ground matching problem modulo subsumption if C ? D ∈ Γ implies that D is ground.To the best of our knowledge, this notion of matching has not been investigated before.
We will show in the following that the general case of matching, as introduced in Definition 3.1, and thus also matching modulo equivalence, is NP-complete, whereas the two notions of matching modulo subsumption are tractable, even in the presence of GCIs.

Matching modulo subsumption
The case of left-ground matching problems modulo subsumption can be treated as sketched in [BK00] for the case without a TBox.Given a general EL-TBox T and two substitutions σ, τ , we define Consequently, if we define σ as the substitution satisfying σ (X) = for all X ∈ N V , then σ T σ holds for all substitutions σ.Since the concept constructors of EL are monotonic w.r.t.subsumption, this implies σ(D) T σ (D) for all concept patterns D. Lemma 4.1.Let Γ = {C 1 ?D 1 , . . ., C n ?D n } be a left-ground matching problem modulo subsumption.Then Γ has a matcher w.r.t.T iff σ is a matcher of Γ w.r.t.T .Proof.The "if" direction is trivial.To see the "only-if" direction, assume that σ is a matcher of Γ w.r.t.T .Then we have, for all i, The lemma shows that it is sufficient to test whether the substitution σ is a matcher of Γ, i.e., whether σ (C i ) T σ (D i ) holds for all i, 1 ≤ i ≤ n.Since in EL subsumption w.r.t.general TBoxes is decidable in polynomial time, this yields a polynomial-time algorithm for left-ground matching modulo subsumption in EL.
Theorem 4.2.Let Γ be a left-ground EL-matching problem modulo subsumption and T a general EL-TBox.Then we can decide in polynomial time whether Γ has a matcher w.r.t.T or not.
The case of right-ground matching problems modulo subsumption can be treated similarly.However, since EL does not have the bottom concept ⊥ as a concept constructor, we cannot simply define σ ⊥ as the substitution satisfying σ ⊥ (X) = ⊥ for all X ∈ N V , and then show that that the right-ground matching problems modulo subsumption, Γ, has a matcher w.r.t.T iff σ ⊥ is a matcher of Γ w.r.t.T .Instead, we need to define σ ⊥ in a more complicated manner.
Given a general EL-TBox T and a right-ground matching problems modulo subsumption Γ = {C 1 ?D 1 , . . ., C n ?D n }, we use ⊥(Γ, T ) to denote the ELconcept description that is the conjunction of all the atoms of T and of D 1 , . . ., D n .We now define σ ⊥(Γ,T ) as the substitution satisfying Proof.The "if" direction is trivial.To see the "only-if" direction, assume that σ is a matcher of Γ w.r.t.T .We need to show that this implies the σ ⊥(Γ,T ) is also a matcher of Γ w.r.t.T , i.e., that it satisfies σ ⊥(Γ,T ) (C) T σ ⊥(Γ,T ) (D) for every subsumption C ? D ∈ Γ.
More generally, we consider subsumptions C ? D where C is a subpattern of a pattern occurring in Γ or T and D is an atom of T or D 1 , . . ., D n .We show the following claim: Before proving the claim, let us show that this implies that σ ⊥(Γ,T ) solves Γ w.r.t.T .In fact, any subsumption in Γ is of the form C ? E 1 . . .E k where C is a subpattern of a pattern occurring in Γ, and E 1 , . . ., E k are atoms of one of the D i .In addition, a substitution solves C ? E 1 . . .E k w.r.t.T iff it solves all the subsumptions C ? E i for i = 1, . . ., k.
We prove the claim by induction on the size |C| of the left-hand side C of the subsumption where F 1 , . . ., F are atoms.We distinguish the following three cases: 2. If there is an index i ∈ {1, . . ., } such that F i is ground and 3. Assume that the above two cases do not hold.Using Lemma 2.1, we can distinguish two more cases, depending on whether the first or the second condition of the lemma applies.
(a) If the first condition applies, then there is an index i ∈ {1, . . ., } such that F i s T D. Since F i is neither ground nor a variable, we know that F i is a non-ground existential restriction.Thus, and for each η ∈ {1, . . ., k}, there is j ∈ {1, . . ., } such that i. F j is a concept variable and σ(F j ) T A η , or ii.F j is ground and F j T A η , or iii.F j = ∃r.F , A η = ∃r.A and σ(F ) T A .
It is sufficient to show that the subsumption relationships in 3(b)i and 3(b)iii also hold if we replace σ by σ ⊥(Γ,T ) .For 3(b)i this can be shown as in 1 and for 3(b)iii as in 3a.
This completes the proof of the claim, and thus of the lemma.
Since the size of ⊥(Γ, T ) is polynomial in the size of Γ and T , this lemma yields a polynomial-time decision procedure for right-ground matching modulo subsumption.
Theorem 4.4.Let Γ be a right-ground EL-matching problem modulo subsumption and T a general EL-TBox.Then we can decide in polynomial time whether Γ has a matcher w.r.t.T or not.

The general case
NP-hardness for the general case follows from the known NP-hardness result for matching modulo equivalence without a TBox [BK00].In the following, we show that matching in EL w.r.t.general TBoxes is in NP by introducing a goal-oriented matching algorithm that uses non-deterministic rules to transform a given matching problem into a solved form by a polynomial number of rule applications.
Let T be a general EL-TBox and Γ 0 an EL-matching problem.We can assume without loss of generality that all the subsumptions C ? D in Γ 0 are such that either C or D is non-ground.In fact, if both C and D are ground, then the following holds:

Eager Solving -variable on the right:
Condition: An unsolved subsumption C ? X ∈ Γ where X ∈ N V .Action: • If there is some subsumption of the form X ?D ∈ Γ such that C T D, then the rule application fails.• Otherwise, mark C ? X as "solved." Eager Solving -variable on the left: Condition: An unsolved subsumption X ?D ∈ Γ where X ∈ N V .Action: • If there is some subsumption of the form C ? X ∈ Γ such that C T D, then the rule application fails.• Otherwise, mark X ?D as "solved."(1) Eager rule application: If an eager rule from Figure 1 applies, apply it and if it fails, stop and return "failure." (2) Non-deterministic rule application: If no eager rule is applicable, let s be an unsolved subsumption in Γ. Choose one of the non-deterministic rules of Figure 2, and apply it to s.If this rule application fails, then stop and return "failure." If no more rule applies and the algorithm has not stopped returning "failure," then return "success." In (2), the choice which unsolved subsumption to consider next is don't care nondeterministic.However, choosing which rule to apply to the chosen subsumption is don't know non-deterministic.Additionally, the application of a non-deterministic rules may require don't know non-deterministic choices to be made.If a nondeterministic rule is applied to a subsumption s, then neither its left-hand side nor its right-hand side is a variable.In fact, a subsumption that has a variable on one of its sides is solved by one of the eager rules, which have precedence over the non-deterministic rules.
It is easy to see that the subsumptions added by the non-deterministic rules satisfy the normalization conditions (i) and (ii), and thus all the sets Γ generated during a run of the algorithm are normalized EL-matching problems.The next lemma states an important property ensured by the presence of the eager rules.
Since any rule application either fails while trying to solve an unsolved subsumption (in which case the algorithm stops immediately) or actually solves an unsolved subsumption, there can be only polynomially many rule applications during a run.In addition, it is easy to see that each rule application can be realized in polynomial time, with a polynomial number of possible non-deterministic choices.This shows that Algorithm 5.1 is indeed an NP-algorithm.It remains to show that it is sound and complete.
To show soundness, assume that Γ is a matching problem obtained after termination of a non-failing run of the algorithm.Since the run terminated without failure, all the subsumptions in Γ are solved.We use the subsumptions of the form X ?C ∈ Γ to define a substitution σ Γ .Note that the fact that Γ is a normalized EL-matching problem implies that C is a ground pattern, i.e., a concept description.For each variable X ∈ N V , we define and denote the conjunction of all the elements of S Γ X as S Γ X , where the empty conjunction is .The substitution σ Γ is now defined as Lemma 5.4.σ Γ is a matcher of Γ w.r.t.T .
Proof.The subsumptions in Γ of the form X ?D are solved by σ Γ (i.e., σ Γ (X) T D) since D is a conjunct of σ Γ (X).
Next, consider a subsumption of the form C ? X.By definition, σ Γ (X) = D 1 • • • D n where, for each i ∈ {1, . . ., n}, X ?D i ∈ Γ.Since the algorithm has terminated successfully with the final matching problem Γ, the subsumption C ? X as well as all subsumptions X ?D i are marked as solved in Γ.Thus, Lemma 5.2 yields C T D i for all i ∈ {1, . . ., n}, which implies To show that σ Γ also solves the other subsumptions s = C ? D in Γ, we use induction over the size of s, which is defined to be |C| if C is non-ground and |D| if D is non-ground.The intuition is that an application of a non-deterministic rule to a subsumption s generates new subsumptions for which the size of the non-ground side is smaller than the size of the non-ground side of s.
Subsumptions whose non-ground side has size 1 are of the form C ? X or X ?D, and thus have been dealt with above.The subsumptions of size greater than 1 are solved by Mutation or Decomposition.
is computed for some i ∈ {1, . . ., n}, and this call of Dec does not fail, i.e., Case 1., 2., or 6. of the definition of Dec applies.
• In Case 1., C i is a variable, and Dec(C i ?D) = {C i ?D}.Thus, C i ?D ∈ Γ and we have already seen that σ Γ solves such subsumptions, i.e., σ Γ (C i ) T D. Obviously, this implies that σ Γ also solves • In Case 2., C i = ∃r.C and D = ∃r.(D 1 • • • D m ).Since the call of Dec did not fail, we have C T D j for all subsumptions C ? D j for which both sides are ground.Subsumptions C ? D j for which one side is non-ground are added to Γ. Since they are obviously smaller than s, σ Γ solves these subsumptions, as it does the ground ones.It is easy to see that this implies that σ Γ solves s as well.
• In Case 6, C i and D are ground and we have C i T D since the call of Dec did not fail.It is easy to see that this implies that σ Γ solves s.
Finally, assume that the subsumption s = C 1 • • • C n ?D ∈ Γ is solved by Mutation.Since the application of the rule does not fail, there are atoms The rule chooses for each η ∈ {1, . . ., k} an i ∈ {1, . . ., n} such that none of the calls Dec(C i ?A η ) fails.In addition, it calls Dec(B ?D), and this call also does not fail.Similarly to our treatment of the Decomposition rule above, we can show that all the subsumptions C i ?A η as well as B ? D are solved by σ Γ .It is easy to see that this implies that σ Γ also solves s.
Since the input matching problem Γ 0 is contained in Γ, this lemma shows that σ Γ is a matcher also of Γ 0 w.r.t.T .This completes the proof of soundness.
Regarding completeness, we can use a given matcher of Γ 0 w.r.t.T to guide the application of the non-deterministic rules such that a non-failing run is generated.
Lemma 5.5.Let σ be a matcher of Γ 0 w.r.t.T .Then there is a non-failing and terminating run of Algorithm 5.1 producing a matching problem Γ such that σ is a matcher of Γ w.r.t.T .
Proof.We show that the rule applications can be done such that they do not fail and the following invariant is preserved: (Inv) All subsumptions in the matching problems Γ produced during the run are solved by σ.
For the initial matching problem Γ := Γ 0 this invariant is satisfied since σ was assumed to be a matcher of Γ 0 w.r.t.T .
The application of an eager rule cannot fail since σ solves the participating subsumptions.In fact, if Γ contains the subsumption C ? X and X ?D, then Γ solves these subsumptions by (Inv), and thus C T σ(X) T D holds, which yields C T D by transitivity of the subsumption relation.
The non-deterministic rules make use of the function Dec. Our treatment of the non-deterministic rules makes use of the correctness of the following claim: Claim: If σ structurally solves the subsumption C ? D (i.e., σ(C) s T σ(D)), then the call Dec(C ?D) does not fail and σ solves all the subsumptions returned by this call.
To prove the claim, we consider the six cases in the definition of Dec. Case 1 is trivial since it never fails and returns the input subsumption.If Case 2 applies, then the fact that σ structurally solves ∃r.C ?∃r.
) for all i ∈ {1, . . ., n}.This yields C T D i for those indices i for which C and D i are both ground.Consequently, the call does not fail.In addition, σ solves the returned subsumptions C ? D i for which one side is non-ground.The Cases 3-4 cannot apply since in these cases σ could not structurally solve the respective subsumption, and in Case 6 we have C T D since otherwise σ could not (structurally) solve the ground subsumption C ? D. This completes the proof of the claim.Now, assume that no eager rule applies to the current matching problem Γ and there is an unsolved subsumption s = C 1 • • • C n ?D in Γ.Since no eager rule applies to s, neither D nor C 1 if n = 1 is a variable.
Since by assumption σ(C 1 ) • • • σ(C n ) T σ(D) holds, we consider three possibilities that may justify this subsumption relationship.
First, assume that n > 1 and there is an index i ∈ {1, . . ., n} such that C i is a variable and σ(C i ) T σ(D).Then the algorithm can apply Decomposition to s and call Dec(C i ?D).Since C i is a variable, this call does not fail and it returns C i ?D, which is added to Γ. Obviously, this preserves the invariant.Now, assume that the first case does not apply.The other two cases are due to the characterization of subsumption given in Lemma 2.1.
Second, assume that there is an index i ∈ {1, . . ., n} such C i is not a variable and σ(C i ) s T σ(D).In this case we apply Decomposition and choose the index i, which creates the call Dec(C i ?D).Since σ structurally solves C i ?D, the correctness of the above claim yields that this call does not fail and it returns subsumptions that are solved by σ.
Third, assume that there are atoms A 1 , . . ., A k , B of T such that A 1 • • • A k T B, for each η ∈ {1, . . ., k} there is i ∈ {1, . . ., n} with σ(C i ) s T A η and B s T σ(D).In this case we can apply Mutation, choosing exactly these atoms A 1 , . . ., A k , B. Since σ structurally solves the subsumptions C i ?A η and B ? D, the calls to Dec in the rule do not fail and produce only subsumptions solved by σ.Consequently, this application of Mutation does not fail and it preserves the invariant.
To sum up, we have seen that applications of eager rules do not fail and preserve the invariant.If no eager rule is applicable and there is an unsolved subsumption left, then we can apply a non-deterministic rule such that it solves this subsumption, does not fail, and preserves the invariant.Consequently, there is a successful run of the algorithm such that σ is a matcher w.r.t.T of the final matching problem Γ generated by this run.
This lemma provides the final step towards showing that Algorithm 5.1 is an NP-decision procedure for matching w.r.t.general TBoxes in EL.
Theorem 5.6.The problem of deciding whether a given EL-matching problem has a matcher w.r.t. a given general EL-TBox or not is NP-complete.

I
:= ∆ I , (C D) I := C I ∩ D I , (∃r.C) I := {x | ∃y : (x, y) ∈ r I ∧ y ∈ C I } A general concept inclusion axiom (GCI) is of the form C D for concept descriptions C, D. An interpretation I satisfies such an axiom C D iff C I ⊆ D I .A general EL-TBox is a finite set of GCIs.An interpretation is a model of a general EL-TBox if it satisfies all its GCIs.A concept description C is subsumed by a concept description D w.r.t. a general TBox T (written C T D) if every model of T satisfies the GCI C D. We say that C is equivalent to D w.r.t.T (C ≡ T D) if C T D and D T C. If T is empty, we also write C D and C ≡ D instead of C T D and C ≡ T D, respectively.As shown in [Bra04], subsumption w.r.t.general EL-TBoxes is decidable in polynomial time.
F i = ∃r.F , D = ∃r.(D 1 . . .D m ) with D 1 , . . ., D m atoms, and σ(F ) T D i for all i ∈ {1, . . ., m}.Since F is a subpattern of C, D i are atoms of D, and |F | < |C|, we can apply the induction hypothesis to the subsumptions F ? D i .This yields σ ⊥(Γ,T ) (F ) T D i for all i ∈ {1, . . ., m}, and thus σ ⊥(Γ,T ) (C) T D. (b) If the second condition applies, then there are atoms A 1 3. If C = ∃r.C and D = ∃s.D for roles s = r, then Dec(C ?D) fails.4. If C = A is a concept name and D = ∃r.D an existential restriction, then Dec(C ?D) fails. 5.If D = A is a concept name and C = ∃r.C an existential restriction, then Dec(C ?D) fails.6.If both C and D are ground and C T D then Dec(C ?D) fails, and otherwise returns ∅.

Figure 1 :
Figure 1: Eager Rules then Γ 0 has a matcher w.r.t.T iff Γ 0 \ {C ?D} has a matcher w.r.t.T .•If C T D, then Γ 0 does not have a matcher w.r.t.T .Consequently, we can either remove all the offending ground subsumptions without changing the solvability status of the problem, or immediately decide nonsolvability.Using the fact that C T D 1 D 2 iff C T D 1 and C T D 2 , we can additionally normalize Γ 0 such that the right-hand side of each subsumption in Γ 0 is an atom.We call an EL-matching problem normalized if C ∈ {1, . . ., n} such that both sides of C ? D i are ground and C T D i .Otherwise, Dec(∃r.C ?∃r.(D 1 ? D ∈ Γ 0 implies that (i) either C or D is non-ground, and (ii) D is an atom.Thus, assume that Γ 0 is a normalized EL-matching problem.Our algorithm starts with Γ := Γ 0 , and then applies non-deterministic rules to Γ.A nonfailing application of a rule may add subsumptions to Γ. Note, however, that a subsumption is only added if it is not yet present.New subsumptions that are added are marked as "unsolved," as are initially all the subsumptions of Γ 0 .A rule application may fail, which means that this attempt of solving the matching problem was not successful.A non-failing rule application marks one of the subsumptions in the matching problem as "solved."Rules are applied until all subsumptions are marked "solved" or an attempt to apply a rule has failed.Our definition of the rules uses a function Dec(. . . ) on subsumptions of the form C ? D, where C and D are atoms and D is not a variable.A call of Dec(C ?D) returns a (possibly empty) set of subsumptions or it fails: 1. Dec(C ?D) := {C ?D}, if C is a variable.2. If D 1 , . . ., D n are atoms, then Dec(∃r.C ?∃r.(D 1 • • • D n )) fails if there is an i