YES Termination w.r.t. Q proof of ../tpdb/TRS/TRCSR/Ex1_Zan97_C.trs
Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(g(X)) → mark(h(X))
active(c) → mark(d)
active(h(d)) → mark(g(c))
proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
g(ok(X)) → ok(g(X))
h(ok(X)) → ok(h(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(g(X)) → mark(h(X))
active(c) → mark(d)
active(h(d)) → mark(g(c))
proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
g(ok(X)) → ok(g(X))
h(ok(X)) → ok(h(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

ACTIVE(g(X)) → H(X)
TOP(mark(X)) → PROPER(X)
PROPER(g(X)) → G(proper(X))
PROPER(g(X)) → PROPER(X)
ACTIVE(h(d)) → G(c)
PROPER(h(X)) → PROPER(X)
TOP(ok(X)) → TOP(active(X))
TOP(mark(X)) → TOP(proper(X))
G(ok(X)) → G(X)
PROPER(h(X)) → H(proper(X))
TOP(ok(X)) → ACTIVE(X)
H(ok(X)) → H(X)

The TRS R consists of the following rules:

active(g(X)) → mark(h(X))
active(c) → mark(d)
active(h(d)) → mark(g(c))
proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
g(ok(X)) → ok(g(X))
h(ok(X)) → ok(h(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(g(X)) → H(X)
TOP(mark(X)) → PROPER(X)
PROPER(g(X)) → G(proper(X))
PROPER(g(X)) → PROPER(X)
ACTIVE(h(d)) → G(c)
PROPER(h(X)) → PROPER(X)
TOP(ok(X)) → TOP(active(X))
TOP(mark(X)) → TOP(proper(X))
G(ok(X)) → G(X)
PROPER(h(X)) → H(proper(X))
TOP(ok(X)) → ACTIVE(X)
H(ok(X)) → H(X)

The TRS R consists of the following rules:

active(g(X)) → mark(h(X))
active(c) → mark(d)
active(h(d)) → mark(g(c))
proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
g(ok(X)) → ok(g(X))
h(ok(X)) → ok(h(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 4 SCCs with 6 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

H(ok(X)) → H(X)

The TRS R consists of the following rules:

active(g(X)) → mark(h(X))
active(c) → mark(d)
active(h(d)) → mark(g(c))
proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
g(ok(X)) → ok(g(X))
h(ok(X)) → ok(h(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

H(ok(X)) → H(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

G(ok(X)) → G(X)

The TRS R consists of the following rules:

active(g(X)) → mark(h(X))
active(c) → mark(d)
active(h(d)) → mark(g(c))
proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
g(ok(X)) → ok(g(X))
h(ok(X)) → ok(h(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

G(ok(X)) → G(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PROPER(g(X)) → PROPER(X)
PROPER(h(X)) → PROPER(X)

The TRS R consists of the following rules:

active(g(X)) → mark(h(X))
active(c) → mark(d)
active(h(d)) → mark(g(c))
proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
g(ok(X)) → ok(g(X))
h(ok(X)) → ok(h(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PROPER(g(X)) → PROPER(X)
PROPER(h(X)) → PROPER(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(X)) → TOP(active(X))
TOP(mark(X)) → TOP(proper(X))

The TRS R consists of the following rules:

active(g(X)) → mark(h(X))
active(c) → mark(d)
active(h(d)) → mark(g(c))
proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
g(ok(X)) → ok(g(X))
h(ok(X)) → ok(h(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(X)) → TOP(active(X))
TOP(mark(X)) → TOP(proper(X))

The TRS R consists of the following rules:

proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
h(ok(X)) → ok(h(X))
g(ok(X)) → ok(g(X))
active(g(X)) → mark(h(X))
active(c) → mark(d)
active(h(d)) → mark(g(c))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule TOP(ok(X)) → TOP(active(X)) at position [0] we obtained the following new rules:

TOP(ok(c)) → TOP(mark(d))
TOP(ok(h(d))) → TOP(mark(g(c)))
TOP(ok(g(x0))) → TOP(mark(h(x0)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ Narrowing
QDP
                    ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(c)) → TOP(mark(d))
TOP(ok(h(d))) → TOP(mark(g(c)))
TOP(mark(X)) → TOP(proper(X))
TOP(ok(g(x0))) → TOP(mark(h(x0)))

The TRS R consists of the following rules:

proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
h(ok(X)) → ok(h(X))
g(ok(X)) → ok(g(X))
active(g(X)) → mark(h(X))
active(c) → mark(d)
active(h(d)) → mark(g(c))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(c)) → TOP(mark(d))
TOP(ok(h(d))) → TOP(mark(g(c)))
TOP(mark(X)) → TOP(proper(X))
TOP(ok(g(x0))) → TOP(mark(h(x0)))

The TRS R consists of the following rules:

proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
h(ok(X)) → ok(h(X))
g(ok(X)) → ok(g(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule TOP(mark(X)) → TOP(proper(X)) at position [0] we obtained the following new rules:

TOP(mark(g(x0))) → TOP(g(proper(x0)))
TOP(mark(c)) → TOP(ok(c))
TOP(mark(h(x0))) → TOP(h(proper(x0)))
TOP(mark(d)) → TOP(ok(d))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(g(x0))) → TOP(g(proper(x0)))
TOP(ok(c)) → TOP(mark(d))
TOP(ok(h(d))) → TOP(mark(g(c)))
TOP(mark(h(x0))) → TOP(h(proper(x0)))
TOP(mark(d)) → TOP(ok(d))
TOP(mark(c)) → TOP(ok(c))
TOP(ok(g(x0))) → TOP(mark(h(x0)))

The TRS R consists of the following rules:

proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
h(ok(X)) → ok(h(X))
g(ok(X)) → ok(g(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
QDP
                                ↳ RuleRemovalProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(g(x0))) → TOP(g(proper(x0)))
TOP(ok(h(d))) → TOP(mark(g(c)))
TOP(mark(h(x0))) → TOP(h(proper(x0)))
TOP(ok(g(x0))) → TOP(mark(h(x0)))

The TRS R consists of the following rules:

proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
h(ok(X)) → ok(h(X))
g(ok(X)) → ok(g(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

TOP(ok(g(x0))) → TOP(mark(h(x0)))


Used ordering: POLO with Polynomial interpretation [25]:

POL(TOP(x1)) = 2·x1   
POL(c) = 0   
POL(d) = 2   
POL(g(x1)) = 2 + x1   
POL(h(x1)) = x1   
POL(mark(x1)) = 2 + x1   
POL(ok(x1)) = 2 + x1   
POL(proper(x1)) = 2 + x1   



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ RuleRemovalProof
QDP
                                    ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(g(x0))) → TOP(g(proper(x0)))
TOP(ok(h(d))) → TOP(mark(g(c)))
TOP(mark(h(x0))) → TOP(h(proper(x0)))

The TRS R consists of the following rules:

proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
h(ok(X)) → ok(h(X))
g(ok(X)) → ok(g(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ DependencyGraphProof
QDP
                                        ↳ RuleRemovalProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(g(x0))) → TOP(g(proper(x0)))
TOP(ok(h(d))) → TOP(mark(g(c)))

The TRS R consists of the following rules:

proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
h(ok(X)) → ok(h(X))
g(ok(X)) → ok(g(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

TOP(mark(g(x0))) → TOP(g(proper(x0)))
TOP(ok(h(d))) → TOP(mark(g(c)))


Used ordering: POLO with Polynomial interpretation [25]:

POL(TOP(x1)) = 2·x1   
POL(c) = 0   
POL(d) = 2   
POL(g(x1)) = x1   
POL(h(x1)) = 2·x1   
POL(mark(x1)) = 1 + 2·x1   
POL(ok(x1)) = 2·x1   
POL(proper(x1)) = 2·x1   



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ RuleRemovalProof
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ RuleRemovalProof
QDP
                                            ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

proper(g(X)) → g(proper(X))
proper(h(X)) → h(proper(X))
proper(c) → ok(c)
proper(d) → ok(d)
h(ok(X)) → ok(h(X))
g(ok(X)) → ok(g(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.