Termination of the following Term Rewriting System could not be shown:

Context-sensitive rewrite system:
The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The replacement map contains the following entries:

fact: {1}
if: {1}
zero: {1}
s: {1}
0: empty set
prod: {1, 2}
p: {1}
add: {1, 2}
true: empty set
false: empty set


CSR
  ↳ CSRInnermostProof

Context-sensitive rewrite system:
The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The replacement map contains the following entries:

fact: {1}
if: {1}
zero: {1}
s: {1}
0: empty set
prod: {1, 2}
p: {1}
add: {1, 2}
true: empty set
false: empty set

The CSR is orthogonal. By [10] we can switch to innermost.

↳ CSR
  ↳ CSRInnermostProof
CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Context-sensitive rewrite system:
The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The replacement map contains the following entries:

fact: {1}
if: {1}
zero: {1}
s: {1}
0: empty set
prod: {1, 2}
p: {1}
add: {1, 2}
true: empty set
false: empty set

Innermost Strategy.

Using Improved CS-DPs we result in the following initial Q-CSDP problem.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
QCSDP
          ↳ QCSDependencyGraphProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {fact, zero, s, prod, p, add, FACT, ZERO, ADD, PROD, P} are replacing on all positions.
For all symbols f in {if, IF} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The ordinary context-sensitive dependency pairs DPo are:

FACT(X) → IF(zero(X), s(0), prod(X, fact(p(X))))
FACT(X) → ZERO(X)
ADD(s(X), Y) → ADD(X, Y)
PROD(s(X), Y) → ADD(Y, prod(X, Y))
PROD(s(X), Y) → PROD(X, Y)

The collapsing dependency pairs are DPc:

IF(true, X, Y) → X
IF(false, X, Y) → Y


The hidden terms of R are:

prod(X, fact(p(X)))
fact(p(X))
p(X)

Every hiding context is built from:

p on positions {1}
fact on positions {1}
prod on positions {1, 2}

Hence, the new unhiding pairs DPu are :

IF(true, X, Y) → U(X)
IF(false, X, Y) → U(Y)
U(p(x_0)) → U(x_0)
U(fact(x_0)) → U(x_0)
U(prod(x_0, x_1)) → U(x_0)
U(prod(x_0, x_1)) → U(x_1)
U(prod(X, fact(p(X)))) → PROD(X, fact(p(X)))
U(fact(p(X))) → FACT(p(X))
U(p(X)) → P(X)

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))


The approximation of the Context-Sensitive Dependency Graph contains 3 SCCs with 4 less nodes.


↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
QCSDP
                ↳ QCSDPSubtermProof
              ↳ QCSDP
              ↳ QCSDP
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {fact, zero, s, prod, p, add, ADD} are replacing on all positions.
For all symbols f in {if} we have µ(f) = {1}.

The TRS P consists of the following rules:

ADD(s(X), Y) → ADD(X, Y)

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))


We use the subterm processor [20].


The following pairs can be oriented strictly and are deleted.


ADD(s(X), Y) → ADD(X, Y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
ADD(x1, x2)  =  x1

Subterm Order


↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
                ↳ QCSDPSubtermProof
QCSDP
                    ↳ PIsEmptyProof
              ↳ QCSDP
              ↳ QCSDP
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {fact, zero, s, prod, p, add} are replacing on all positions.
For all symbols f in {if} we have µ(f) = {1}.

The TRS P consists of the following rules:
none

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))


The TRS P is empty. Hence, there is no (P,Q,R,µ)-chain.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
QCSDP
                ↳ QCSDPSubtermProof
              ↳ QCSDP
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {fact, zero, s, prod, p, add, PROD} are replacing on all positions.
For all symbols f in {if} we have µ(f) = {1}.

The TRS P consists of the following rules:

PROD(s(X), Y) → PROD(X, Y)

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))


We use the subterm processor [20].


The following pairs can be oriented strictly and are deleted.


PROD(s(X), Y) → PROD(X, Y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
PROD(x1, x2)  =  x1

Subterm Order


↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
                ↳ QCSDPSubtermProof
QCSDP
                    ↳ PIsEmptyProof
              ↳ QCSDP
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {fact, zero, s, prod, p, add} are replacing on all positions.
For all symbols f in {if} we have µ(f) = {1}.

The TRS P consists of the following rules:
none

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))


The TRS P is empty. Hence, there is no (P,Q,R,µ)-chain.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
QCSDP
                ↳ QCSDPInstantiationProcessor
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {fact, zero, s, prod, p, add, FACT} are replacing on all positions.
For all symbols f in {if, IF} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

IF(true, X, Y) → U(X)
U(p(x_0)) → U(x_0)
U(fact(x_0)) → U(x_0)
U(prod(x_0, x_1)) → U(x_0)
U(prod(x_0, x_1)) → U(x_1)
U(fact(p(X))) → FACT(p(X))
FACT(X) → IF(zero(X), s(0), prod(X, fact(p(X))))
IF(false, X, Y) → U(Y)

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))


Using the Context-Sensitive Instantiation Processor
the pair IF(true, X, Y) → U(X)
was transformed to the following new pairs:

IF(true, s(0), prod(z0, fact(p(z0)))) → U(s(0))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
              ↳ QCSDP
                ↳ QCSDPInstantiationProcessor
QCSDP
                    ↳ QCSDependencyGraphProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {fact, zero, s, prod, p, add, FACT} are replacing on all positions.
For all symbols f in {if, IF} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

IF(false, X, Y) → U(Y)
U(p(x_0)) → U(x_0)
U(fact(p(X))) → FACT(p(X))
U(prod(x_0, x_1)) → U(x_0)
IF(true, s(0), prod(z0, fact(p(z0)))) → U(s(0))
U(prod(x_0, x_1)) → U(x_1)
U(fact(x_0)) → U(x_0)
FACT(X) → IF(zero(X), s(0), prod(X, fact(p(X))))

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))


The approximation of the Context-Sensitive Dependency Graph contains 1 SCC with 1 less node.
The rules IF(true, s(0), prod(z0, fact(p(z0)))) → U(s(0)) and U(p(x0)) → U(x0) form no chain, because ECapµ(U(s(0))) = U(s(0)) does not unify with U(p(x0)). The rules IF(true, s(0), prod(z0, fact(p(z0)))) → U(s(0)) and U(fact(x0)) → U(x0) form no chain, because ECapµ(U(s(0))) = U(s(0)) does not unify with U(fact(x0)). The rules IF(true, s(0), prod(z0, fact(p(z0)))) → U(s(0)) and U(prod(x0, x1)) → U(x0) form no chain, because ECapµ(U(s(0))) = U(s(0)) does not unify with U(prod(x0, x1)). The rules IF(true, s(0), prod(z0, fact(p(z0)))) → U(s(0)) and U(prod(x0, x1)) → U(x1) form no chain, because ECapµ(U(s(0))) = U(s(0)) does not unify with U(prod(x0, x1)). The rules IF(true, s(0), prod(z0, fact(p(z0)))) → U(s(0)) and U(fact(p(x0))) → FACT(p(x0)) form no chain, because ECapµ(U(s(0))) = U(s(0)) does not unify with U(fact(p(x0))).

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
              ↳ QCSDP
                ↳ QCSDPInstantiationProcessor
                  ↳ QCSDP
                    ↳ QCSDependencyGraphProof
QCSDP
                        ↳ QCSDPInstantiationProcessor
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {fact, zero, s, prod, p, add, FACT} are replacing on all positions.
For all symbols f in {if, IF} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

U(p(x_0)) → U(x_0)
U(fact(x_0)) → U(x_0)
U(prod(x_0, x_1)) → U(x_0)
U(prod(x_0, x_1)) → U(x_1)
U(fact(p(X))) → FACT(p(X))
FACT(X) → IF(zero(X), s(0), prod(X, fact(p(X))))
IF(false, X, Y) → U(Y)

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))


Using the Context-Sensitive Instantiation Processor
the pair IF(false, X, Y) → U(Y)
was transformed to the following new pairs:

IF(false, s(0), prod(z0, fact(p(z0)))) → U(prod(z0, fact(p(z0))))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
              ↳ QCSDP
                ↳ QCSDPInstantiationProcessor
                  ↳ QCSDP
                    ↳ QCSDependencyGraphProof
                      ↳ QCSDP
                        ↳ QCSDPInstantiationProcessor
QCSDP
                            ↳ QCSDPForwardInstantiationProcessor
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {fact, zero, s, prod, p, add, FACT} are replacing on all positions.
For all symbols f in {if, IF} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

U(p(x_0)) → U(x_0)
U(fact(p(X))) → FACT(p(X))
IF(false, s(0), prod(z0, fact(p(z0)))) → U(prod(z0, fact(p(z0))))
U(prod(x_0, x_1)) → U(x_0)
U(prod(x_0, x_1)) → U(x_1)
U(fact(x_0)) → U(x_0)
FACT(X) → IF(zero(X), s(0), prod(X, fact(p(X))))

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))


Using the Context-Sensitive Forward Instantiation Processor
the pair U(p(x_0)) → U(x_0)
was transformed to the following new pairs:

U(p(p(z0))) → U(p(z0))
U(p(fact(z0))) → U(fact(z0))
U(p(prod(z0, z1))) → U(prod(z0, z1))
U(p(fact(p(z0)))) → U(fact(p(z0)))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
              ↳ QCSDP
                ↳ QCSDPInstantiationProcessor
                  ↳ QCSDP
                    ↳ QCSDependencyGraphProof
                      ↳ QCSDP
                        ↳ QCSDPInstantiationProcessor
                          ↳ QCSDP
                            ↳ QCSDPForwardInstantiationProcessor
QCSDP
                                ↳ QCSDependencyGraphProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {fact, zero, s, prod, p, add, FACT} are replacing on all positions.
For all symbols f in {if, IF} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

U(p(prod(z0, z1))) → U(prod(z0, z1))
U(p(fact(p(z0)))) → U(fact(p(z0)))
U(p(p(z0))) → U(p(z0))
U(fact(p(X))) → FACT(p(X))
IF(false, s(0), prod(z0, fact(p(z0)))) → U(prod(z0, fact(p(z0))))
U(prod(x_0, x_1)) → U(x_0)
U(prod(x_0, x_1)) → U(x_1)
U(p(fact(z0))) → U(fact(z0))
U(fact(x_0)) → U(x_0)
FACT(X) → IF(zero(X), s(0), prod(X, fact(p(X))))

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))


The approximation of the Context-Sensitive Dependency Graph contains 2 SCCs.
The rules U(p(p(z0))) → U(p(z0)) and U(fact(x0)) → U(x0) form no chain, because ECapµ(U(p(z0))) = U(p(z0)) does not unify with U(fact(x0)). The rules U(p(p(z0))) → U(p(z0)) and U(prod(x0, x1)) → U(x0) form no chain, because ECapµ(U(p(z0))) = U(p(z0)) does not unify with U(prod(x0, x1)). The rules U(p(p(z0))) → U(p(z0)) and U(prod(x0, x1)) → U(x1) form no chain, because ECapµ(U(p(z0))) = U(p(z0)) does not unify with U(prod(x0, x1)). The rules U(p(p(z0))) → U(p(z0)) and U(fact(p(x0))) → FACT(p(x0)) form no chain, because ECapµ(U(p(z0))) = U(p(z0)) does not unify with U(fact(p(x0))). The rules U(p(fact(z0))) → U(fact(z0)) and U(prod(x0, x1)) → U(x0) form no chain, because ECapµ(U(fact(z0))) = U(fact(z0)) does not unify with U(prod(x0, x1)). The rules U(p(fact(z0))) → U(fact(z0)) and U(prod(x0, x1)) → U(x1) form no chain, because ECapµ(U(fact(z0))) = U(fact(z0)) does not unify with U(prod(x0, x1)). The rules U(p(fact(z0))) → U(fact(z0)) and U(p(fact(x0))) → U(fact(x0)) form no chain, because ECapµ(U(fact(z0))) = U(fact(z0)) does not unify with U(p(fact(x0))). The rules U(p(prod(z0, z1))) → U(prod(z0, z1)) and U(fact(x0)) → U(x0) form no chain, because ECapµ(U(prod(z0, z1))) = U(prod(z0, z1)) does not unify with U(fact(x0)). The rules U(p(prod(z0, z1))) → U(prod(z0, z1)) and U(fact(p(x0))) → FACT(p(x0)) form no chain, because ECapµ(U(prod(z0, z1))) = U(prod(z0, z1)) does not unify with U(fact(p(x0))). The rules U(p(prod(z0, z1))) → U(prod(z0, z1)) and U(p(prod(x0, x1))) → U(prod(x0, x1)) form no chain, because ECapµ(U(prod(z0, z1))) = U(prod(z0, z1)) does not unify with U(p(prod(x0, x1))). The rules U(p(fact(p(z0)))) → U(fact(p(z0))) and U(prod(x0, x1)) → U(x0) form no chain, because ECapµ(U(fact(p(z0)))) = U(fact(p(z0))) does not unify with U(prod(x0, x1)). The rules U(p(fact(p(z0)))) → U(fact(p(z0))) and U(prod(x0, x1)) → U(x1) form no chain, because ECapµ(U(fact(p(z0)))) = U(fact(p(z0))) does not unify with U(prod(x0, x1)). The rules U(p(fact(p(z0)))) → U(fact(p(z0))) and U(p(fact(p(x0)))) → U(fact(p(x0))) form no chain, because ECapµ(U(fact(p(z0)))) = U(fact(p(z0))) does not unify with U(p(fact(p(x0)))).

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
              ↳ QCSDP
                ↳ QCSDPInstantiationProcessor
                  ↳ QCSDP
                    ↳ QCSDependencyGraphProof
                      ↳ QCSDP
                        ↳ QCSDPInstantiationProcessor
                          ↳ QCSDP
                            ↳ QCSDPForwardInstantiationProcessor
                              ↳ QCSDP
                                ↳ QCSDependencyGraphProof
                                  ↳ AND
QCSDP
                                      ↳ QCSDPSubtermProof
                                    ↳ QCSDP
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {fact, zero, s, prod, p, add} are replacing on all positions.
For all symbols f in {if} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

U(p(p(z0))) → U(p(z0))

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))


We use the subterm processor [20].


The following pairs can be oriented strictly and are deleted.


U(p(p(z0))) → U(p(z0))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
U(x1)  =  x1

Subterm Order


↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
              ↳ QCSDP
                ↳ QCSDPInstantiationProcessor
                  ↳ QCSDP
                    ↳ QCSDependencyGraphProof
                      ↳ QCSDP
                        ↳ QCSDPInstantiationProcessor
                          ↳ QCSDP
                            ↳ QCSDPForwardInstantiationProcessor
                              ↳ QCSDP
                                ↳ QCSDependencyGraphProof
                                  ↳ AND
                                    ↳ QCSDP
                                      ↳ QCSDPSubtermProof
QCSDP
                                          ↳ PIsEmptyProof
                                    ↳ QCSDP
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {fact, zero, s, prod, p, add} are replacing on all positions.
For all symbols f in {if} we have µ(f) = {1}.

The TRS P consists of the following rules:
none

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))


The TRS P is empty. Hence, there is no (P,Q,R,µ)-chain.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
              ↳ QCSDP
                ↳ QCSDPInstantiationProcessor
                  ↳ QCSDP
                    ↳ QCSDependencyGraphProof
                      ↳ QCSDP
                        ↳ QCSDPInstantiationProcessor
                          ↳ QCSDP
                            ↳ QCSDPForwardInstantiationProcessor
                              ↳ QCSDP
                                ↳ QCSDependencyGraphProof
                                  ↳ AND
                                    ↳ QCSDP
QCSDP
                                      ↳ QCSDPForwardInstantiationProcessor
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {fact, zero, s, prod, p, add, FACT} are replacing on all positions.
For all symbols f in {if, IF} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

U(fact(x_0)) → U(x_0)
U(prod(x_0, x_1)) → U(x_0)
U(prod(x_0, x_1)) → U(x_1)
U(fact(p(X))) → FACT(p(X))
FACT(X) → IF(zero(X), s(0), prod(X, fact(p(X))))
IF(false, s(0), prod(z0, fact(p(z0)))) → U(prod(z0, fact(p(z0))))
U(p(fact(z0))) → U(fact(z0))
U(p(prod(z0, z1))) → U(prod(z0, z1))
U(p(fact(p(z0)))) → U(fact(p(z0)))

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))


Using the Context-Sensitive Forward Instantiation Processor
the pair U(fact(x_0)) → U(x_0)
was transformed to the following new pairs:

U(fact(fact(z0))) → U(fact(z0))
U(fact(prod(z0, z1))) → U(prod(z0, z1))
U(fact(fact(p(z0)))) → U(fact(p(z0)))
U(fact(p(fact(z0)))) → U(p(fact(z0)))
U(fact(p(prod(z0, z1)))) → U(p(prod(z0, z1)))
U(fact(p(fact(p(z0))))) → U(p(fact(p(z0))))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
              ↳ QCSDP
                ↳ QCSDPInstantiationProcessor
                  ↳ QCSDP
                    ↳ QCSDependencyGraphProof
                      ↳ QCSDP
                        ↳ QCSDPInstantiationProcessor
                          ↳ QCSDP
                            ↳ QCSDPForwardInstantiationProcessor
                              ↳ QCSDP
                                ↳ QCSDependencyGraphProof
                                  ↳ AND
                                    ↳ QCSDP
                                    ↳ QCSDP
                                      ↳ QCSDPForwardInstantiationProcessor
QCSDP
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {fact, zero, s, prod, p, add, FACT} are replacing on all positions.
For all symbols f in {if, IF} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

U(fact(p(fact(z0)))) → U(p(fact(z0)))
U(p(fact(p(z0)))) → U(fact(p(z0)))
U(fact(p(X))) → FACT(p(X))
IF(false, s(0), prod(z0, fact(p(z0)))) → U(prod(z0, fact(p(z0))))
U(prod(x_0, x_1)) → U(x_1)
U(p(fact(z0))) → U(fact(z0))
U(fact(p(prod(z0, z1)))) → U(p(prod(z0, z1)))
U(fact(p(fact(p(z0))))) → U(p(fact(p(z0))))
FACT(X) → IF(zero(X), s(0), prod(X, fact(p(X))))
U(fact(fact(z0))) → U(fact(z0))
U(p(prod(z0, z1))) → U(prod(z0, z1))
U(fact(prod(z0, z1))) → U(prod(z0, z1))
U(prod(x_0, x_1)) → U(x_0)
U(fact(fact(p(z0)))) → U(fact(p(z0)))

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))


We applied the Zantema transformation [34] to transform the context-sensitive TRS to a usual TRS.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
QTRS
          ↳ DependencyPairsProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

fact(X) → if(zero(X), sInact(0), prodInact(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
a(x) → x
prod(x1, x2) → prodInact(x1, x2)
a(prodInact(x1, x2)) → prod(x1, x2)
s(x1) → sInact(x1)
a(sInact(x1)) → s(x1)

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:

IF(true, X, Y) → A(X)
PROD(s(X), Y) → ADD(Y, prod(X, Y))
ADD(s(X), Y) → S(add(X, Y))
IF(false, X, Y) → A(Y)
FACT(X) → P(X)
ADD(s(X), Y) → ADD(X, Y)
FACT(X) → FACT(p(X))
A(sInact(x1)) → S(x1)
FACT(X) → IF(zero(X), sInact(0), prodInact(X, fact(p(X))))
A(prodInact(x1, x2)) → PROD(x1, x2)
PROD(s(X), Y) → PROD(X, Y)
FACT(X) → ZERO(X)

The TRS R consists of the following rules:

fact(X) → if(zero(X), sInact(0), prodInact(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
a(x) → x
prod(x1, x2) → prodInact(x1, x2)
a(prodInact(x1, x2)) → prod(x1, x2)
s(x1) → sInact(x1)
a(sInact(x1)) → s(x1)

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

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
QDP
              ↳ DependencyGraphProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

IF(true, X, Y) → A(X)
PROD(s(X), Y) → ADD(Y, prod(X, Y))
ADD(s(X), Y) → S(add(X, Y))
IF(false, X, Y) → A(Y)
FACT(X) → P(X)
ADD(s(X), Y) → ADD(X, Y)
FACT(X) → FACT(p(X))
A(sInact(x1)) → S(x1)
FACT(X) → IF(zero(X), sInact(0), prodInact(X, fact(p(X))))
A(prodInact(x1, x2)) → PROD(x1, x2)
PROD(s(X), Y) → PROD(X, Y)
FACT(X) → ZERO(X)

The TRS R consists of the following rules:

fact(X) → if(zero(X), sInact(0), prodInact(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
a(x) → x
prod(x1, x2) → prodInact(x1, x2)
a(prodInact(x1, x2)) → prod(x1, x2)
s(x1) → sInact(x1)
a(sInact(x1)) → s(x1)

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

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
QDP
                    ↳ UsableRulesProof
                  ↳ QDP
                  ↳ QDP
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

ADD(s(X), Y) → ADD(X, Y)

The TRS R consists of the following rules:

fact(X) → if(zero(X), sInact(0), prodInact(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
a(x) → x
prod(x1, x2) → prodInact(x1, x2)
a(prodInact(x1, x2)) → prod(x1, x2)
s(x1) → sInact(x1)
a(sInact(x1)) → s(x1)

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.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QDPSizeChangeProof
                  ↳ QDP
                  ↳ QDP
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

ADD(s(X), Y) → ADD(X, Y)

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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
QDP
                    ↳ UsableRulesProof
                  ↳ QDP
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

PROD(s(X), Y) → PROD(X, Y)

The TRS R consists of the following rules:

fact(X) → if(zero(X), sInact(0), prodInact(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
a(x) → x
prod(x1, x2) → prodInact(x1, x2)
a(prodInact(x1, x2)) → prod(x1, x2)
s(x1) → sInact(x1)
a(sInact(x1)) → s(x1)

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.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QDPSizeChangeProof
                  ↳ QDP
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

PROD(s(X), Y) → PROD(X, Y)

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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ UsableRulesProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(X) → FACT(p(X))

The TRS R consists of the following rules:

fact(X) → if(zero(X), sInact(0), prodInact(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
a(x) → x
prod(x1, x2) → prodInact(x1, x2)
a(prodInact(x1, x2)) → prod(x1, x2)
s(x1) → sInact(x1)
a(sInact(x1)) → s(x1)

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.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ MNOCProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(X) → FACT(p(X))

The TRS R consists of the following rules:

p(s(X)) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the modular non-overlap check [15] to enlarge Q to all left-hand sides of R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ MNOCProof
QDP
                            ↳ UsableRulesReductionPairsProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(X) → FACT(p(X))

The TRS R consists of the following rules:

p(s(X)) → X

The set Q consists of the following terms:

p(s(x0))

We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

The following rules are removed from R:

p(s(X)) → X
Used ordering: POLO with Polynomial interpretation [25]:

POL(FACT(x1)) = 2·x1   
POL(p(x1)) = x1   
POL(s(x1)) = x1   



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ MNOCProof
                          ↳ QDP
                            ↳ UsableRulesReductionPairsProof
QDP
                                ↳ Instantiation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(X) → FACT(p(X))

R is empty.
The set Q consists of the following terms:

p(s(x0))

We have to consider all minimal (P,Q,R)-chains.
By instantiating [15] the rule FACT(X) → FACT(p(X)) we obtained the following new rules:

FACT(p(z0)) → FACT(p(p(z0)))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ MNOCProof
                          ↳ QDP
                            ↳ UsableRulesReductionPairsProof
                              ↳ QDP
                                ↳ Instantiation
QDP
                                    ↳ Instantiation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(p(z0)) → FACT(p(p(z0)))

R is empty.
The set Q consists of the following terms:

p(s(x0))

We have to consider all minimal (P,Q,R)-chains.
By instantiating [15] the rule FACT(p(z0)) → FACT(p(p(z0))) we obtained the following new rules:

FACT(p(p(z0))) → FACT(p(p(p(z0))))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ MNOCProof
                          ↳ QDP
                            ↳ UsableRulesReductionPairsProof
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
QDP
                                        ↳ QReductionProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(p(p(z0))) → FACT(p(p(p(z0))))

R is empty.
The set Q consists of the following terms:

p(s(x0))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as they contain symbols which do neither occur in P nor in R.

p(s(x0))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ MNOCProof
                          ↳ QDP
                            ↳ UsableRulesReductionPairsProof
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ QReductionProof
QDP
                                            ↳ NonTerminationProof
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(p(p(z0))) → FACT(p(p(p(z0))))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

FACT(p(p(z0))) → FACT(p(p(p(z0))))

The TRS R consists of the following rules:none


s = FACT(p(p(z0))) evaluates to t =FACT(p(p(p(z0))))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from FACT(p(p(z0))) to FACT(p(p(p(z0)))).




We applied the Innermost Giesl Middeldorp transformation [10] to transform the context-sensitive TRS to a usual TRS.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
QTRS
          ↳ DependencyPairsProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)


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

ZERO(active(x1)) → ZERO(x1)
ADD(active(x1), x2) → ADD(x1, x2)
MARK(p(x1)) → ACTIVE(p(mark(x1)))
ACTIVE(prod(s(X), Y)) → ADD(Y, prod(X, Y))
ADD(x1, active(x2)) → ADD(x1, x2)
ADD(mark(x1), x2) → ADD(x1, x2)
ACTIVE(p(s(X))) → MARK(X)
MARK(fact(x1)) → FACT(mark(x1))
MARK(true) → ACTIVE(true)
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
FACT(active(x1)) → FACT(x1)
MARK(if(x1, x2, x3)) → MARK(x1)
ACTIVE(prod(s(X), Y)) → PROD(X, Y)
MARK(p(x1)) → MARK(x1)
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))
PROD(x1, active(x2)) → PROD(x1, x2)
MARK(add(x1, x2)) → ADD(mark(x1), mark(x2))
MARK(zero(x1)) → ZERO(mark(x1))
S(active(x1)) → S(x1)
MARK(false) → ACTIVE(false)
P(active(x1)) → P(x1)
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
ACTIVE(fact(X)) → P(X)
MARK(zero(x1)) → MARK(x1)
ACTIVE(zero(0)) → MARK(true)
MARK(prod(x1, x2)) → MARK(x1)
ACTIVE(add(s(X), Y)) → ADD(X, Y)
ACTIVE(zero(s(X))) → MARK(false)
MARK(s(x1)) → MARK(x1)
MARK(add(x1, x2)) → MARK(x2)
ACTIVE(if(false, X, Y)) → MARK(Y)
ACTIVE(add(s(X), Y)) → S(add(X, Y))
PROD(x1, mark(x2)) → PROD(x1, x2)
P(mark(x1)) → P(x1)
FACT(mark(x1)) → FACT(x1)
MARK(fact(x1)) → MARK(x1)
PROD(mark(x1), x2) → PROD(x1, x2)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
ADD(x1, mark(x2)) → ADD(x1, x2)
MARK(add(x1, x2)) → MARK(x1)
PROD(active(x1), x2) → PROD(x1, x2)
MARK(s(x1)) → ACTIVE(s(mark(x1)))
ACTIVE(fact(X)) → FACT(p(X))
ACTIVE(fact(X)) → PROD(X, fact(p(X)))
ACTIVE(prod(0, X)) → MARK(0)
MARK(prod(x1, x2)) → MARK(x2)
MARK(s(x1)) → S(mark(x1))
S(mark(x1)) → S(x1)
ACTIVE(fact(X)) → ZERO(X)
MARK(if(x1, x2, x3)) → IF(mark(x1), x2, x3)
MARK(zero(x1)) → ACTIVE(zero(mark(x1)))
MARK(if(x1, x2, x3)) → ACTIVE(if(mark(x1), x2, x3))
IF(active(x1), x2, x3) → IF(x1, x2, x3)
IF(mark(x1), x2, x3) → IF(x1, x2, x3)
MARK(p(x1)) → P(mark(x1))
ACTIVE(fact(X)) → S(0)
MARK(0) → ACTIVE(0)
ZERO(mark(x1)) → ZERO(x1)
ACTIVE(fact(X)) → IF(zero(X), s(0), prod(X, fact(p(X))))
ACTIVE(add(0, X)) → MARK(X)
MARK(prod(x1, x2)) → PROD(mark(x1), mark(x2))
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

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

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
QDP
              ↳ DependencyGraphProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

ZERO(active(x1)) → ZERO(x1)
ADD(active(x1), x2) → ADD(x1, x2)
MARK(p(x1)) → ACTIVE(p(mark(x1)))
ACTIVE(prod(s(X), Y)) → ADD(Y, prod(X, Y))
ADD(x1, active(x2)) → ADD(x1, x2)
ADD(mark(x1), x2) → ADD(x1, x2)
ACTIVE(p(s(X))) → MARK(X)
MARK(fact(x1)) → FACT(mark(x1))
MARK(true) → ACTIVE(true)
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
FACT(active(x1)) → FACT(x1)
MARK(if(x1, x2, x3)) → MARK(x1)
ACTIVE(prod(s(X), Y)) → PROD(X, Y)
MARK(p(x1)) → MARK(x1)
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))
PROD(x1, active(x2)) → PROD(x1, x2)
MARK(add(x1, x2)) → ADD(mark(x1), mark(x2))
MARK(zero(x1)) → ZERO(mark(x1))
S(active(x1)) → S(x1)
MARK(false) → ACTIVE(false)
P(active(x1)) → P(x1)
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
ACTIVE(fact(X)) → P(X)
MARK(zero(x1)) → MARK(x1)
ACTIVE(zero(0)) → MARK(true)
MARK(prod(x1, x2)) → MARK(x1)
ACTIVE(add(s(X), Y)) → ADD(X, Y)
ACTIVE(zero(s(X))) → MARK(false)
MARK(s(x1)) → MARK(x1)
MARK(add(x1, x2)) → MARK(x2)
ACTIVE(if(false, X, Y)) → MARK(Y)
ACTIVE(add(s(X), Y)) → S(add(X, Y))
PROD(x1, mark(x2)) → PROD(x1, x2)
P(mark(x1)) → P(x1)
FACT(mark(x1)) → FACT(x1)
MARK(fact(x1)) → MARK(x1)
PROD(mark(x1), x2) → PROD(x1, x2)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
ADD(x1, mark(x2)) → ADD(x1, x2)
MARK(add(x1, x2)) → MARK(x1)
PROD(active(x1), x2) → PROD(x1, x2)
MARK(s(x1)) → ACTIVE(s(mark(x1)))
ACTIVE(fact(X)) → FACT(p(X))
ACTIVE(fact(X)) → PROD(X, fact(p(X)))
ACTIVE(prod(0, X)) → MARK(0)
MARK(prod(x1, x2)) → MARK(x2)
MARK(s(x1)) → S(mark(x1))
S(mark(x1)) → S(x1)
ACTIVE(fact(X)) → ZERO(X)
MARK(if(x1, x2, x3)) → IF(mark(x1), x2, x3)
MARK(zero(x1)) → ACTIVE(zero(mark(x1)))
MARK(if(x1, x2, x3)) → ACTIVE(if(mark(x1), x2, x3))
IF(active(x1), x2, x3) → IF(x1, x2, x3)
IF(mark(x1), x2, x3) → IF(x1, x2, x3)
MARK(p(x1)) → P(mark(x1))
ACTIVE(fact(X)) → S(0)
MARK(0) → ACTIVE(0)
ZERO(mark(x1)) → ZERO(x1)
ACTIVE(fact(X)) → IF(zero(X), s(0), prod(X, fact(p(X))))
ACTIVE(add(0, X)) → MARK(X)
MARK(prod(x1, x2)) → PROD(mark(x1), mark(x2))
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

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

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
QDP
                    ↳ UsableRulesProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

ADD(active(x1), x2) → ADD(x1, x2)
ADD(x1, active(x2)) → ADD(x1, x2)
ADD(x1, mark(x2)) → ADD(x1, x2)
ADD(mark(x1), x2) → ADD(x1, x2)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QReductionProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

ADD(active(x1), x2) → ADD(x1, x2)
ADD(x1, active(x2)) → ADD(x1, x2)
ADD(x1, mark(x2)) → ADD(x1, x2)
ADD(mark(x1), x2) → ADD(x1, x2)

R is empty.
The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

fact(active(x0))
fact(mark(x0))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
zero(active(x0))
zero(mark(x0))
s(active(x0))
s(mark(x0))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
p(active(x0))
p(mark(x0))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ QReductionProof
QDP
                            ↳ QDPSizeChangeProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

ADD(active(x1), x2) → ADD(x1, x2)
ADD(x1, active(x2)) → ADD(x1, x2)
ADD(x1, mark(x2)) → ADD(x1, x2)
ADD(mark(x1), x2) → ADD(x1, x2)

R is empty.
The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
mark(if(x0, x1, x2))
mark(zero(x0))
mark(s(x0))
mark(0)
mark(prod(x0, x1))
mark(p(x0))
mark(add(x0, x1))
mark(true)
mark(false)

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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
QDP
                    ↳ UsableRulesProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

P(active(x1)) → P(x1)
P(mark(x1)) → P(x1)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QReductionProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

P(active(x1)) → P(x1)
P(mark(x1)) → P(x1)

R is empty.
The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

fact(active(x0))
fact(mark(x0))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
zero(active(x0))
zero(mark(x0))
s(active(x0))
s(mark(x0))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
p(active(x0))
p(mark(x0))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ QReductionProof
QDP
                            ↳ QDPSizeChangeProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

P(active(x1)) → P(x1)
P(mark(x1)) → P(x1)

R is empty.
The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
mark(if(x0, x1, x2))
mark(zero(x0))
mark(s(x0))
mark(0)
mark(prod(x0, x1))
mark(p(x0))
mark(add(x0, x1))
mark(true)
mark(false)

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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ UsableRulesProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

PROD(x1, mark(x2)) → PROD(x1, x2)
PROD(mark(x1), x2) → PROD(x1, x2)
PROD(x1, active(x2)) → PROD(x1, x2)
PROD(active(x1), x2) → PROD(x1, x2)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QReductionProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

PROD(x1, mark(x2)) → PROD(x1, x2)
PROD(mark(x1), x2) → PROD(x1, x2)
PROD(x1, active(x2)) → PROD(x1, x2)
PROD(active(x1), x2) → PROD(x1, x2)

R is empty.
The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

fact(active(x0))
fact(mark(x0))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
zero(active(x0))
zero(mark(x0))
s(active(x0))
s(mark(x0))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
p(active(x0))
p(mark(x0))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ QReductionProof
QDP
                            ↳ QDPSizeChangeProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

PROD(x1, mark(x2)) → PROD(x1, x2)
PROD(mark(x1), x2) → PROD(x1, x2)
PROD(active(x1), x2) → PROD(x1, x2)
PROD(x1, active(x2)) → PROD(x1, x2)

R is empty.
The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
mark(if(x0, x1, x2))
mark(zero(x0))
mark(s(x0))
mark(0)
mark(prod(x0, x1))
mark(p(x0))
mark(add(x0, x1))
mark(true)
mark(false)

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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ UsableRulesProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

S(active(x1)) → S(x1)
S(mark(x1)) → S(x1)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QReductionProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

S(active(x1)) → S(x1)
S(mark(x1)) → S(x1)

R is empty.
The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

fact(active(x0))
fact(mark(x0))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
zero(active(x0))
zero(mark(x0))
s(active(x0))
s(mark(x0))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
p(active(x0))
p(mark(x0))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ QReductionProof
QDP
                            ↳ QDPSizeChangeProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

S(mark(x1)) → S(x1)
S(active(x1)) → S(x1)

R is empty.
The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
mark(if(x0, x1, x2))
mark(zero(x0))
mark(s(x0))
mark(0)
mark(prod(x0, x1))
mark(p(x0))
mark(add(x0, x1))
mark(true)
mark(false)

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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ UsableRulesProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

ZERO(active(x1)) → ZERO(x1)
ZERO(mark(x1)) → ZERO(x1)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QReductionProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

ZERO(active(x1)) → ZERO(x1)
ZERO(mark(x1)) → ZERO(x1)

R is empty.
The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

fact(active(x0))
fact(mark(x0))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
zero(active(x0))
zero(mark(x0))
s(active(x0))
s(mark(x0))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
p(active(x0))
p(mark(x0))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ QReductionProof
QDP
                            ↳ QDPSizeChangeProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

ZERO(active(x1)) → ZERO(x1)
ZERO(mark(x1)) → ZERO(x1)

R is empty.
The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
mark(if(x0, x1, x2))
mark(zero(x0))
mark(s(x0))
mark(0)
mark(prod(x0, x1))
mark(p(x0))
mark(add(x0, x1))
mark(true)
mark(false)

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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ UsableRulesProof
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

IF(active(x1), x2, x3) → IF(x1, x2, x3)
IF(mark(x1), x2, x3) → IF(x1, x2, x3)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QReductionProof
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

IF(active(x1), x2, x3) → IF(x1, x2, x3)
IF(mark(x1), x2, x3) → IF(x1, x2, x3)

R is empty.
The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

fact(active(x0))
fact(mark(x0))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
zero(active(x0))
zero(mark(x0))
s(active(x0))
s(mark(x0))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
p(active(x0))
p(mark(x0))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ QReductionProof
QDP
                            ↳ QDPSizeChangeProof
                  ↳ QDP
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

IF(mark(x1), x2, x3) → IF(x1, x2, x3)
IF(active(x1), x2, x3) → IF(x1, x2, x3)

R is empty.
The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
mark(if(x0, x1, x2))
mark(zero(x0))
mark(s(x0))
mark(0)
mark(prod(x0, x1))
mark(p(x0))
mark(add(x0, x1))
mark(true)
mark(false)

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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ UsableRulesProof
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(active(x1)) → FACT(x1)
FACT(mark(x1)) → FACT(x1)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QReductionProof
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(active(x1)) → FACT(x1)
FACT(mark(x1)) → FACT(x1)

R is empty.
The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

fact(active(x0))
fact(mark(x0))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
zero(active(x0))
zero(mark(x0))
s(active(x0))
s(mark(x0))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
p(active(x0))
p(mark(x0))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ QReductionProof
QDP
                            ↳ QDPSizeChangeProof
                  ↳ QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(active(x1)) → FACT(x1)
FACT(mark(x1)) → FACT(x1)

R is empty.
The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
mark(if(x0, x1, x2))
mark(zero(x0))
mark(s(x0))
mark(0)
mark(prod(x0, x1))
mark(p(x0))
mark(add(x0, x1))
mark(true)
mark(false)

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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ QDPOrderProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(prod(x1, x2)) → MARK(x2)
MARK(prod(x1, x2)) → MARK(x1)
MARK(zero(x1)) → ACTIVE(zero(mark(x1)))
MARK(s(x1)) → MARK(x1)
MARK(add(x1, x2)) → MARK(x2)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(p(x1)) → ACTIVE(p(mark(x1)))
MARK(if(x1, x2, x3)) → ACTIVE(if(mark(x1), x2, x3))
MARK(fact(x1)) → MARK(x1)
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(add(x1, x2)) → MARK(x1)
ACTIVE(p(s(X))) → MARK(X)
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(s(x1)) → ACTIVE(s(mark(x1)))
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(p(x1)) → MARK(x1)
MARK(zero(x1)) → MARK(x1)
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(zero(x1)) → ACTIVE(zero(mark(x1)))
MARK(s(x1)) → ACTIVE(s(mark(x1)))
The remaining pairs can at least be oriented weakly.

MARK(prod(x1, x2)) → MARK(x2)
MARK(prod(x1, x2)) → MARK(x1)
MARK(s(x1)) → MARK(x1)
MARK(add(x1, x2)) → MARK(x2)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(p(x1)) → ACTIVE(p(mark(x1)))
MARK(if(x1, x2, x3)) → ACTIVE(if(mark(x1), x2, x3))
MARK(fact(x1)) → MARK(x1)
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(add(x1, x2)) → MARK(x1)
ACTIVE(p(s(X))) → MARK(X)
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(p(x1)) → MARK(x1)
MARK(zero(x1)) → MARK(x1)
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = 1   
POL(active(x1)) = 0   
POL(add(x1, x2)) = 1   
POL(fact(x1)) = 1   
POL(false) = 0   
POL(if(x1, x2, x3)) = 1   
POL(mark(x1)) = 0   
POL(p(x1)) = 1   
POL(prod(x1, x2)) = 1   
POL(s(x1)) = 0   
POL(true) = 0   
POL(zero(x1)) = 0   

The following usable rules [17] were oriented:

s(mark(x1)) → s(x1)
s(active(x1)) → s(x1)
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
if(mark(x1), x2, x3) → if(x1, x2, x3)
if(active(x1), x2, x3) → if(x1, x2, x3)
fact(mark(x1)) → fact(x1)
fact(active(x1)) → fact(x1)
zero(mark(x1)) → zero(x1)
zero(active(x1)) → zero(x1)
p(mark(x1)) → p(x1)
p(active(x1)) → p(x1)
add(x1, mark(x2)) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(active(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ Narrowing
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(prod(x1, x2)) → MARK(x2)
MARK(prod(x1, x2)) → MARK(x1)
MARK(s(x1)) → MARK(x1)
MARK(add(x1, x2)) → MARK(x2)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(p(x1)) → ACTIVE(p(mark(x1)))
MARK(if(x1, x2, x3)) → ACTIVE(if(mark(x1), x2, x3))
MARK(fact(x1)) → MARK(x1)
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(add(x1, x2)) → MARK(x1)
ACTIVE(p(s(X))) → MARK(X)
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(zero(x1)) → MARK(x1)
MARK(p(x1)) → MARK(x1)
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(p(x1)) → ACTIVE(p(mark(x1))) at position [0] we obtained the following new rules:

MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(p(true)) → ACTIVE(p(active(true)))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
MARK(p(false)) → ACTIVE(p(active(false)))
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(0)) → ACTIVE(p(active(0)))
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Rewriting
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(prod(x1, x2)) → MARK(x1)
MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(s(x1)) → MARK(x1)
MARK(add(x1, x2)) → MARK(x2)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(fact(x1)) → MARK(x1)
MARK(p(true)) → ACTIVE(p(active(true)))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(add(x1, x2)) → MARK(x1)
ACTIVE(p(s(X))) → MARK(X)
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))
MARK(prod(x1, x2)) → MARK(x2)
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(x1, x2, x3)) → ACTIVE(if(mark(x1), x2, x3))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
MARK(p(false)) → ACTIVE(p(active(false)))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(p(0)) → ACTIVE(p(active(0)))
MARK(zero(x1)) → MARK(x1)
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule MARK(p(true)) → ACTIVE(p(active(true))) at position [0] we obtained the following new rules:

MARK(p(true)) → ACTIVE(p(true))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
QDP
                                ↳ DependencyGraphProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(prod(x1, x2)) → MARK(x1)
MARK(s(x1)) → MARK(x1)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(add(x1, x2)) → MARK(x2)
MARK(fact(x1)) → MARK(x1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
ACTIVE(p(s(X))) → MARK(X)
MARK(add(x1, x2)) → MARK(x1)
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))
MARK(prod(x1, x2)) → MARK(x2)
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(x1, x2, x3)) → ACTIVE(if(mark(x1), x2, x3))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
MARK(p(true)) → ACTIVE(p(true))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
MARK(p(false)) → ACTIVE(p(active(false)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(p(0)) → ACTIVE(p(active(0)))
MARK(zero(x1)) → MARK(x1)
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

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.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
QDP
                                    ↳ Rewriting
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(prod(x1, x2)) → MARK(x1)
MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(s(x1)) → MARK(x1)
MARK(add(x1, x2)) → MARK(x2)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(fact(x1)) → MARK(x1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(add(x1, x2)) → MARK(x1)
ACTIVE(p(s(X))) → MARK(X)
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))
MARK(prod(x1, x2)) → MARK(x2)
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(x1, x2, x3)) → ACTIVE(if(mark(x1), x2, x3))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
MARK(p(false)) → ACTIVE(p(active(false)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(p(0)) → ACTIVE(p(active(0)))
MARK(zero(x1)) → MARK(x1)
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule MARK(p(false)) → ACTIVE(p(active(false))) at position [0] we obtained the following new rules:

MARK(p(false)) → ACTIVE(p(false))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
QDP
                                        ↳ DependencyGraphProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(prod(x1, x2)) → MARK(x1)
MARK(s(x1)) → MARK(x1)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(add(x1, x2)) → MARK(x2)
MARK(fact(x1)) → MARK(x1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
ACTIVE(p(s(X))) → MARK(X)
MARK(add(x1, x2)) → MARK(x1)
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(p(false)) → ACTIVE(p(false))
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))
MARK(prod(x1, x2)) → MARK(x2)
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(x1, x2, x3)) → ACTIVE(if(mark(x1), x2, x3))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(p(0)) → ACTIVE(p(active(0)))
MARK(zero(x1)) → MARK(x1)
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

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.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ DependencyGraphProof
QDP
                                            ↳ Rewriting
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(prod(x1, x2)) → MARK(x1)
MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(s(x1)) → MARK(x1)
MARK(add(x1, x2)) → MARK(x2)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(fact(x1)) → MARK(x1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(add(x1, x2)) → MARK(x1)
ACTIVE(p(s(X))) → MARK(X)
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))
MARK(prod(x1, x2)) → MARK(x2)
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(x1, x2, x3)) → ACTIVE(if(mark(x1), x2, x3))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(p(0)) → ACTIVE(p(active(0)))
MARK(zero(x1)) → MARK(x1)
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule MARK(p(0)) → ACTIVE(p(active(0))) at position [0] we obtained the following new rules:

MARK(p(0)) → ACTIVE(p(0))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Rewriting
QDP
                                                ↳ DependencyGraphProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(prod(x1, x2)) → MARK(x1)
MARK(s(x1)) → MARK(x1)
MARK(p(0)) → ACTIVE(p(0))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(add(x1, x2)) → MARK(x2)
MARK(fact(x1)) → MARK(x1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
ACTIVE(p(s(X))) → MARK(X)
MARK(add(x1, x2)) → MARK(x1)
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))
MARK(prod(x1, x2)) → MARK(x2)
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(x1, x2, x3)) → ACTIVE(if(mark(x1), x2, x3))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(zero(x1)) → MARK(x1)
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

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.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ DependencyGraphProof
QDP
                                                    ↳ Narrowing
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(prod(x1, x2)) → MARK(x1)
MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(s(x1)) → MARK(x1)
MARK(add(x1, x2)) → MARK(x2)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(fact(x1)) → MARK(x1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(add(x1, x2)) → MARK(x1)
ACTIVE(p(s(X))) → MARK(X)
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))
MARK(prod(x1, x2)) → MARK(x2)
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(x1, x2, x3)) → ACTIVE(if(mark(x1), x2, x3))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(zero(x1)) → MARK(x1)
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(if(x1, x2, x3)) → ACTIVE(if(mark(x1), x2, x3)) at position [0] we obtained the following new rules:

MARK(if(add(x0, x1), y1, y2)) → ACTIVE(if(active(add(mark(x0), mark(x1))), y1, y2))
MARK(if(p(x0), y1, y2)) → ACTIVE(if(active(p(mark(x0))), y1, y2))
MARK(if(zero(x0), y1, y2)) → ACTIVE(if(active(zero(mark(x0))), y1, y2))
MARK(if(0, y1, y2)) → ACTIVE(if(active(0), y1, y2))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(if(prod(x0, x1), y1, y2)) → ACTIVE(if(active(prod(mark(x0), mark(x1))), y1, y2))
MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(if(fact(x0), y1, y2)) → ACTIVE(if(active(fact(mark(x0))), y1, y2))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Narrowing
QDP
                                                        ↳ Rewriting
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(if(zero(x0), y1, y2)) → ACTIVE(if(active(zero(mark(x0))), y1, y2))
MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(prod(x1, x2)) → MARK(x1)
MARK(if(0, y1, y2)) → ACTIVE(if(active(0), y1, y2))
MARK(if(prod(x0, x1), y1, y2)) → ACTIVE(if(active(prod(mark(x0), mark(x1))), y1, y2))
MARK(s(x1)) → MARK(x1)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(add(x1, x2)) → MARK(x2)
MARK(fact(x1)) → MARK(x1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2))
ACTIVE(p(s(X))) → MARK(X)
MARK(add(x1, x2)) → MARK(x1)
MARK(if(add(x0, x1), y1, y2)) → ACTIVE(if(active(add(mark(x0), mark(x1))), y1, y2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))
MARK(if(p(x0), y1, y2)) → ACTIVE(if(active(p(mark(x0))), y1, y2))
MARK(prod(x1, x2)) → MARK(x2)
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(zero(x1)) → MARK(x1)
MARK(if(fact(x0), y1, y2)) → ACTIVE(if(active(fact(mark(x0))), y1, y2))
ACTIVE(add(0, X)) → MARK(X)
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule MARK(if(0, y1, y2)) → ACTIVE(if(active(0), y1, y2)) at position [0] we obtained the following new rules:

MARK(if(0, y1, y2)) → ACTIVE(if(0, y1, y2))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ Rewriting
QDP
                                                            ↳ DependencyGraphProof
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(prod(x1, x2)) → MARK(x1)
MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(if(zero(x0), y1, y2)) → ACTIVE(if(active(zero(mark(x0))), y1, y2))
MARK(s(x1)) → MARK(x1)
MARK(if(prod(x0, x1), y1, y2)) → ACTIVE(if(active(prod(mark(x0), mark(x1))), y1, y2))
MARK(add(x1, x2)) → MARK(x2)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(fact(x1)) → MARK(x1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2))
MARK(add(x1, x2)) → MARK(x1)
ACTIVE(p(s(X))) → MARK(X)
MARK(if(add(x0, x1), y1, y2)) → ACTIVE(if(active(add(mark(x0), mark(x1))), y1, y2))
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))
MARK(prod(x1, x2)) → MARK(x2)
MARK(if(p(x0), y1, y2)) → ACTIVE(if(active(p(mark(x0))), y1, y2))
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))
MARK(if(0, y1, y2)) → ACTIVE(if(0, y1, y2))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(zero(x1)) → MARK(x1)
ACTIVE(add(0, X)) → MARK(X)
MARK(if(fact(x0), y1, y2)) → ACTIVE(if(active(fact(mark(x0))), y1, y2))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

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.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
QDP
                                                                ↳ Rewriting
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(if(zero(x0), y1, y2)) → ACTIVE(if(active(zero(mark(x0))), y1, y2))
MARK(prod(x1, x2)) → MARK(x1)
MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(if(prod(x0, x1), y1, y2)) → ACTIVE(if(active(prod(mark(x0), mark(x1))), y1, y2))
MARK(s(x1)) → MARK(x1)
MARK(add(x1, x2)) → MARK(x2)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(fact(x1)) → MARK(x1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2))
MARK(add(x1, x2)) → MARK(x1)
ACTIVE(p(s(X))) → MARK(X)
MARK(if(add(x0, x1), y1, y2)) → ACTIVE(if(active(add(mark(x0), mark(x1))), y1, y2))
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))
MARK(if(p(x0), y1, y2)) → ACTIVE(if(active(p(mark(x0))), y1, y2))
MARK(prod(x1, x2)) → MARK(x2)
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(zero(x1)) → MARK(x1)
MARK(if(fact(x0), y1, y2)) → ACTIVE(if(active(fact(mark(x0))), y1, y2))
ACTIVE(add(0, X)) → MARK(X)
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2)) at position [0] we obtained the following new rules:

MARK(if(true, y1, y2)) → ACTIVE(if(true, y1, y2))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ QDP
                                                                ↳ Rewriting
QDP
                                                                    ↳ Rewriting
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(prod(x1, x2)) → MARK(x1)
MARK(if(zero(x0), y1, y2)) → ACTIVE(if(active(zero(mark(x0))), y1, y2))
MARK(if(true, y1, y2)) → ACTIVE(if(true, y1, y2))
MARK(s(x1)) → MARK(x1)
MARK(if(prod(x0, x1), y1, y2)) → ACTIVE(if(active(prod(mark(x0), mark(x1))), y1, y2))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(add(x1, x2)) → MARK(x2)
MARK(fact(x1)) → MARK(x1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
ACTIVE(p(s(X))) → MARK(X)
MARK(add(x1, x2)) → MARK(x1)
MARK(if(add(x0, x1), y1, y2)) → ACTIVE(if(active(add(mark(x0), mark(x1))), y1, y2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))
MARK(prod(x1, x2)) → MARK(x2)
MARK(if(p(x0), y1, y2)) → ACTIVE(if(active(p(mark(x0))), y1, y2))
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(zero(x1)) → MARK(x1)
ACTIVE(add(0, X)) → MARK(X)
MARK(if(fact(x0), y1, y2)) → ACTIVE(if(active(fact(mark(x0))), y1, y2))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2)) at position [0] we obtained the following new rules:

MARK(if(false, y1, y2)) → ACTIVE(if(false, y1, y2))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
QDP
                                                                        ↳ Narrowing
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(if(zero(x0), y1, y2)) → ACTIVE(if(active(zero(mark(x0))), y1, y2))
MARK(prod(x1, x2)) → MARK(x1)
MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(if(true, y1, y2)) → ACTIVE(if(true, y1, y2))
MARK(if(prod(x0, x1), y1, y2)) → ACTIVE(if(active(prod(mark(x0), mark(x1))), y1, y2))
MARK(s(x1)) → MARK(x1)
MARK(add(x1, x2)) → MARK(x2)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(fact(x1)) → MARK(x1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(add(x1, x2)) → MARK(x1)
ACTIVE(p(s(X))) → MARK(X)
MARK(if(add(x0, x1), y1, y2)) → ACTIVE(if(active(add(mark(x0), mark(x1))), y1, y2))
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(fact(x1)) → ACTIVE(fact(mark(x1)))
MARK(if(p(x0), y1, y2)) → ACTIVE(if(active(p(mark(x0))), y1, y2))
MARK(prod(x1, x2)) → MARK(x2)
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(false, y1, y2))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(zero(x1)) → MARK(x1)
MARK(if(fact(x0), y1, y2)) → ACTIVE(if(active(fact(mark(x0))), y1, y2))
ACTIVE(add(0, X)) → MARK(X)
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(fact(x1)) → ACTIVE(fact(mark(x1))) at position [0] we obtained the following new rules:

MARK(fact(true)) → ACTIVE(fact(active(true)))
MARK(fact(false)) → ACTIVE(fact(active(false)))
MARK(fact(zero(x0))) → ACTIVE(fact(active(zero(mark(x0)))))
MARK(fact(p(x0))) → ACTIVE(fact(active(p(mark(x0)))))
MARK(fact(fact(x0))) → ACTIVE(fact(active(fact(mark(x0)))))
MARK(fact(prod(x0, x1))) → ACTIVE(fact(active(prod(mark(x0), mark(x1)))))
MARK(fact(if(x0, x1, x2))) → ACTIVE(fact(active(if(mark(x0), x1, x2))))
MARK(fact(x0)) → ACTIVE(fact(x0))
MARK(fact(add(x0, x1))) → ACTIVE(fact(active(add(mark(x0), mark(x1)))))
MARK(fact(0)) → ACTIVE(fact(active(0)))
MARK(fact(s(x0))) → ACTIVE(fact(active(s(mark(x0)))))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
QDP
                                                                            ↳ Rewriting
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(fact(true)) → ACTIVE(fact(active(true)))
MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(prod(x1, x2)) → MARK(x1)
MARK(if(zero(x0), y1, y2)) → ACTIVE(if(active(zero(mark(x0))), y1, y2))
MARK(if(true, y1, y2)) → ACTIVE(if(true, y1, y2))
MARK(fact(fact(x0))) → ACTIVE(fact(active(fact(mark(x0)))))
MARK(s(x1)) → MARK(x1)
MARK(if(prod(x0, x1), y1, y2)) → ACTIVE(if(active(prod(mark(x0), mark(x1))), y1, y2))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(add(x1, x2)) → MARK(x2)
MARK(fact(x1)) → MARK(x1)
MARK(fact(x0)) → ACTIVE(fact(x0))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
ACTIVE(p(s(X))) → MARK(X)
MARK(add(x1, x2)) → MARK(x1)
MARK(if(add(x0, x1), y1, y2)) → ACTIVE(if(active(add(mark(x0), mark(x1))), y1, y2))
MARK(fact(false)) → ACTIVE(fact(active(false)))
MARK(fact(p(x0))) → ACTIVE(fact(active(p(mark(x0)))))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(fact(if(x0, x1, x2))) → ACTIVE(fact(active(if(mark(x0), x1, x2))))
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(prod(x1, x2)) → MARK(x2)
MARK(if(p(x0), y1, y2)) → ACTIVE(if(active(p(mark(x0))), y1, y2))
MARK(fact(zero(x0))) → ACTIVE(fact(active(zero(mark(x0)))))
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(fact(prod(x0, x1))) → ACTIVE(fact(active(prod(mark(x0), mark(x1)))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(false, y1, y2))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(zero(x1)) → MARK(x1)
MARK(fact(add(x0, x1))) → ACTIVE(fact(active(add(mark(x0), mark(x1)))))
ACTIVE(add(0, X)) → MARK(X)
MARK(if(fact(x0), y1, y2)) → ACTIVE(if(active(fact(mark(x0))), y1, y2))
MARK(fact(0)) → ACTIVE(fact(active(0)))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(fact(s(x0))) → ACTIVE(fact(active(s(mark(x0)))))

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule MARK(fact(true)) → ACTIVE(fact(active(true))) at position [0] we obtained the following new rules:

MARK(fact(true)) → ACTIVE(fact(true))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
QDP
                                                                                ↳ Rewriting
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(if(zero(x0), y1, y2)) → ACTIVE(if(active(zero(mark(x0))), y1, y2))
MARK(prod(x1, x2)) → MARK(x1)
MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(if(true, y1, y2)) → ACTIVE(if(true, y1, y2))
MARK(if(prod(x0, x1), y1, y2)) → ACTIVE(if(active(prod(mark(x0), mark(x1))), y1, y2))
MARK(s(x1)) → MARK(x1)
MARK(fact(fact(x0))) → ACTIVE(fact(active(fact(mark(x0)))))
MARK(add(x1, x2)) → MARK(x2)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(fact(x1)) → MARK(x1)
MARK(fact(x0)) → ACTIVE(fact(x0))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(add(x1, x2)) → MARK(x1)
ACTIVE(p(s(X))) → MARK(X)
MARK(if(add(x0, x1), y1, y2)) → ACTIVE(if(active(add(mark(x0), mark(x1))), y1, y2))
MARK(fact(false)) → ACTIVE(fact(active(false)))
MARK(fact(true)) → ACTIVE(fact(true))
MARK(fact(p(x0))) → ACTIVE(fact(active(p(mark(x0)))))
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(fact(if(x0, x1, x2))) → ACTIVE(fact(active(if(mark(x0), x1, x2))))
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(if(p(x0), y1, y2)) → ACTIVE(if(active(p(mark(x0))), y1, y2))
MARK(prod(x1, x2)) → MARK(x2)
MARK(fact(zero(x0))) → ACTIVE(fact(active(zero(mark(x0)))))
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(fact(prod(x0, x1))) → ACTIVE(fact(active(prod(mark(x0), mark(x1)))))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(false, y1, y2))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(zero(x1)) → MARK(x1)
MARK(if(fact(x0), y1, y2)) → ACTIVE(if(active(fact(mark(x0))), y1, y2))
ACTIVE(add(0, X)) → MARK(X)
MARK(fact(add(x0, x1))) → ACTIVE(fact(active(add(mark(x0), mark(x1)))))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(fact(0)) → ACTIVE(fact(active(0)))
MARK(fact(s(x0))) → ACTIVE(fact(active(s(mark(x0)))))

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule MARK(fact(false)) → ACTIVE(fact(active(false))) at position [0] we obtained the following new rules:

MARK(fact(false)) → ACTIVE(fact(false))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ Rewriting
QDP
                                                                                    ↳ Rewriting
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(prod(x1, x2)) → MARK(x1)
MARK(if(zero(x0), y1, y2)) → ACTIVE(if(active(zero(mark(x0))), y1, y2))
MARK(if(true, y1, y2)) → ACTIVE(if(true, y1, y2))
MARK(fact(fact(x0))) → ACTIVE(fact(active(fact(mark(x0)))))
MARK(s(x1)) → MARK(x1)
MARK(if(prod(x0, x1), y1, y2)) → ACTIVE(if(active(prod(mark(x0), mark(x1))), y1, y2))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(add(x1, x2)) → MARK(x2)
MARK(fact(x1)) → MARK(x1)
MARK(fact(x0)) → ACTIVE(fact(x0))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
ACTIVE(p(s(X))) → MARK(X)
MARK(add(x1, x2)) → MARK(x1)
MARK(if(add(x0, x1), y1, y2)) → ACTIVE(if(active(add(mark(x0), mark(x1))), y1, y2))
MARK(fact(p(x0))) → ACTIVE(fact(active(p(mark(x0)))))
MARK(fact(true)) → ACTIVE(fact(true))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(fact(if(x0, x1, x2))) → ACTIVE(fact(active(if(mark(x0), x1, x2))))
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(prod(x1, x2)) → MARK(x2)
MARK(if(p(x0), y1, y2)) → ACTIVE(if(active(p(mark(x0))), y1, y2))
MARK(fact(zero(x0))) → ACTIVE(fact(active(zero(mark(x0)))))
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(fact(prod(x0, x1))) → ACTIVE(fact(active(prod(mark(x0), mark(x1)))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(fact(false)) → ACTIVE(fact(false))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(false, y1, y2))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(zero(x1)) → MARK(x1)
MARK(fact(add(x0, x1))) → ACTIVE(fact(active(add(mark(x0), mark(x1)))))
ACTIVE(add(0, X)) → MARK(X)
MARK(if(fact(x0), y1, y2)) → ACTIVE(if(active(fact(mark(x0))), y1, y2))
MARK(fact(0)) → ACTIVE(fact(active(0)))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(fact(s(x0))) → ACTIVE(fact(active(s(mark(x0)))))

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule MARK(fact(0)) → ACTIVE(fact(active(0))) at position [0] we obtained the following new rules:

MARK(fact(0)) → ACTIVE(fact(0))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ Rewriting
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
QDP
                                                                                        ↳ Narrowing
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(if(zero(x0), y1, y2)) → ACTIVE(if(active(zero(mark(x0))), y1, y2))
MARK(prod(x1, x2)) → MARK(x1)
MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(if(true, y1, y2)) → ACTIVE(if(true, y1, y2))
MARK(if(prod(x0, x1), y1, y2)) → ACTIVE(if(active(prod(mark(x0), mark(x1))), y1, y2))
MARK(s(x1)) → MARK(x1)
MARK(fact(fact(x0))) → ACTIVE(fact(active(fact(mark(x0)))))
MARK(add(x1, x2)) → MARK(x2)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(fact(x1)) → MARK(x1)
MARK(fact(x0)) → ACTIVE(fact(x0))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(add(x1, x2)) → MARK(x1)
ACTIVE(p(s(X))) → MARK(X)
MARK(if(add(x0, x1), y1, y2)) → ACTIVE(if(active(add(mark(x0), mark(x1))), y1, y2))
MARK(fact(true)) → ACTIVE(fact(true))
MARK(fact(p(x0))) → ACTIVE(fact(active(p(mark(x0)))))
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(fact(if(x0, x1, x2))) → ACTIVE(fact(active(if(mark(x0), x1, x2))))
MARK(fact(0)) → ACTIVE(fact(0))
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(if(p(x0), y1, y2)) → ACTIVE(if(active(p(mark(x0))), y1, y2))
MARK(prod(x1, x2)) → MARK(x2)
MARK(fact(zero(x0))) → ACTIVE(fact(active(zero(mark(x0)))))
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(fact(prod(x0, x1))) → ACTIVE(fact(active(prod(mark(x0), mark(x1)))))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(fact(false)) → ACTIVE(fact(false))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(false, y1, y2))
MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2)))
MARK(zero(x1)) → MARK(x1)
MARK(if(fact(x0), y1, y2)) → ACTIVE(if(active(fact(mark(x0))), y1, y2))
ACTIVE(add(0, X)) → MARK(X)
MARK(fact(add(x0, x1))) → ACTIVE(fact(active(add(mark(x0), mark(x1)))))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(fact(s(x0))) → ACTIVE(fact(active(s(mark(x0)))))

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(prod(x1, x2)) → ACTIVE(prod(mark(x1), mark(x2))) at position [0] we obtained the following new rules:

MARK(prod(y0, prod(x0, x1))) → ACTIVE(prod(mark(y0), active(prod(mark(x0), mark(x1)))))
MARK(prod(fact(x0), y1)) → ACTIVE(prod(active(fact(mark(x0))), mark(y1)))
MARK(prod(p(x0), y1)) → ACTIVE(prod(active(p(mark(x0))), mark(y1)))
MARK(prod(y0, true)) → ACTIVE(prod(mark(y0), active(true)))
MARK(prod(true, y1)) → ACTIVE(prod(active(true), mark(y1)))
MARK(prod(y0, zero(x0))) → ACTIVE(prod(mark(y0), active(zero(mark(x0)))))
MARK(prod(if(x0, x1, x2), y1)) → ACTIVE(prod(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(prod(y0, if(x0, x1, x2))) → ACTIVE(prod(mark(y0), active(if(mark(x0), x1, x2))))
MARK(prod(y0, x1)) → ACTIVE(prod(mark(y0), x1))
MARK(prod(y0, fact(x0))) → ACTIVE(prod(mark(y0), active(fact(mark(x0)))))
MARK(prod(add(x0, x1), y1)) → ACTIVE(prod(active(add(mark(x0), mark(x1))), mark(y1)))
MARK(prod(y0, s(x0))) → ACTIVE(prod(mark(y0), active(s(mark(x0)))))
MARK(prod(y0, false)) → ACTIVE(prod(mark(y0), active(false)))
MARK(prod(false, y1)) → ACTIVE(prod(active(false), mark(y1)))
MARK(prod(x0, y1)) → ACTIVE(prod(x0, mark(y1)))
MARK(prod(y0, 0)) → ACTIVE(prod(mark(y0), active(0)))
MARK(prod(0, y1)) → ACTIVE(prod(active(0), mark(y1)))
MARK(prod(y0, p(x0))) → ACTIVE(prod(mark(y0), active(p(mark(x0)))))
MARK(prod(y0, add(x0, x1))) → ACTIVE(prod(mark(y0), active(add(mark(x0), mark(x1)))))
MARK(prod(zero(x0), y1)) → ACTIVE(prod(active(zero(mark(x0))), mark(y1)))
MARK(prod(prod(x0, x1), y1)) → ACTIVE(prod(active(prod(mark(x0), mark(x1))), mark(y1)))
MARK(prod(s(x0), y1)) → ACTIVE(prod(active(s(mark(x0))), mark(y1)))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ Rewriting
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
QDP
                                                                                            ↳ Narrowing
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(prod(y0, prod(x0, x1))) → ACTIVE(prod(mark(y0), active(prod(mark(x0), mark(x1)))))
MARK(if(true, y1, y2)) → ACTIVE(if(true, y1, y2))
MARK(prod(y0, zero(x0))) → ACTIVE(prod(mark(y0), active(zero(mark(x0)))))
MARK(if(prod(x0, x1), y1, y2)) → ACTIVE(if(active(prod(mark(x0), mark(x1))), y1, y2))
MARK(prod(if(x0, x1, x2), y1)) → ACTIVE(prod(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(fact(x0)) → ACTIVE(fact(x0))
MARK(prod(add(x0, x1), y1)) → ACTIVE(prod(active(add(mark(x0), mark(x1))), mark(y1)))
ACTIVE(p(s(X))) → MARK(X)
MARK(prod(y0, s(x0))) → ACTIVE(prod(mark(y0), active(s(mark(x0)))))
MARK(prod(false, y1)) → ACTIVE(prod(active(false), mark(y1)))
MARK(prod(y0, false)) → ACTIVE(prod(mark(y0), active(false)))
MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2)))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(fact(if(x0, x1, x2))) → ACTIVE(fact(active(if(mark(x0), x1, x2))))
MARK(prod(y0, add(x0, x1))) → ACTIVE(prod(mark(y0), active(add(mark(x0), mark(x1)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(prod(prod(x0, x1), y1)) → ACTIVE(prod(active(prod(mark(x0), mark(x1))), mark(y1)))
MARK(fact(prod(x0, x1))) → ACTIVE(fact(active(prod(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(fact(false)) → ACTIVE(fact(false))
MARK(zero(x1)) → MARK(x1)
MARK(if(fact(x0), y1, y2)) → ACTIVE(if(active(fact(mark(x0))), y1, y2))
MARK(fact(add(x0, x1))) → ACTIVE(fact(active(add(mark(x0), mark(x1)))))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(prod(s(x0), y1)) → ACTIVE(prod(active(s(mark(x0))), mark(y1)))
MARK(fact(s(x0))) → ACTIVE(fact(active(s(mark(x0)))))
MARK(prod(p(x0), y1)) → ACTIVE(prod(active(p(mark(x0))), mark(y1)))
MARK(if(zero(x0), y1, y2)) → ACTIVE(if(active(zero(mark(x0))), y1, y2))
MARK(prod(x1, x2)) → MARK(x1)
MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(prod(fact(x0), y1)) → ACTIVE(prod(active(fact(mark(x0))), mark(y1)))
MARK(s(x1)) → MARK(x1)
MARK(fact(fact(x0))) → ACTIVE(fact(active(fact(mark(x0)))))
MARK(add(x1, x2)) → MARK(x2)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(fact(x1)) → MARK(x1)
MARK(prod(y0, if(x0, x1, x2))) → ACTIVE(prod(mark(y0), active(if(mark(x0), x1, x2))))
MARK(prod(y0, x1)) → ACTIVE(prod(mark(y0), x1))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(prod(y0, fact(x0))) → ACTIVE(prod(mark(y0), active(fact(mark(x0)))))
MARK(add(x1, x2)) → MARK(x1)
MARK(if(add(x0, x1), y1, y2)) → ACTIVE(if(active(add(mark(x0), mark(x1))), y1, y2))
MARK(prod(x0, y1)) → ACTIVE(prod(x0, mark(y1)))
MARK(fact(true)) → ACTIVE(fact(true))
MARK(fact(p(x0))) → ACTIVE(fact(active(p(mark(x0)))))
MARK(prod(0, y1)) → ACTIVE(prod(active(0), mark(y1)))
MARK(prod(y0, 0)) → ACTIVE(prod(mark(y0), active(0)))
MARK(fact(0)) → ACTIVE(fact(0))
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(if(p(x0), y1, y2)) → ACTIVE(if(active(p(mark(x0))), y1, y2))
MARK(prod(x1, x2)) → MARK(x2)
MARK(prod(true, y1)) → ACTIVE(prod(active(true), mark(y1)))
MARK(prod(y0, true)) → ACTIVE(prod(mark(y0), active(true)))
MARK(fact(zero(x0))) → ACTIVE(fact(active(zero(mark(x0)))))
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(false, y1, y2))
MARK(prod(y0, p(x0))) → ACTIVE(prod(mark(y0), active(p(mark(x0)))))
MARK(prod(zero(x0), y1)) → ACTIVE(prod(active(zero(mark(x0))), mark(y1)))
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(add(x1, x2)) → ACTIVE(add(mark(x1), mark(x2))) at position [0] we obtained the following new rules:

MARK(add(y0, zero(x0))) → ACTIVE(add(mark(y0), active(zero(mark(x0)))))
MARK(add(add(x0, x1), y1)) → ACTIVE(add(active(add(mark(x0), mark(x1))), mark(y1)))
MARK(add(fact(x0), y1)) → ACTIVE(add(active(fact(mark(x0))), mark(y1)))
MARK(add(zero(x0), y1)) → ACTIVE(add(active(zero(mark(x0))), mark(y1)))
MARK(add(y0, false)) → ACTIVE(add(mark(y0), active(false)))
MARK(add(false, y1)) → ACTIVE(add(active(false), mark(y1)))
MARK(add(y0, s(x0))) → ACTIVE(add(mark(y0), active(s(mark(x0)))))
MARK(add(if(x0, x1, x2), y1)) → ACTIVE(add(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(add(s(x0), y1)) → ACTIVE(add(active(s(mark(x0))), mark(y1)))
MARK(add(y0, prod(x0, x1))) → ACTIVE(add(mark(y0), active(prod(mark(x0), mark(x1)))))
MARK(add(y0, x1)) → ACTIVE(add(mark(y0), x1))
MARK(add(prod(x0, x1), y1)) → ACTIVE(add(active(prod(mark(x0), mark(x1))), mark(y1)))
MARK(add(p(x0), y1)) → ACTIVE(add(active(p(mark(x0))), mark(y1)))
MARK(add(y0, 0)) → ACTIVE(add(mark(y0), active(0)))
MARK(add(y0, if(x0, x1, x2))) → ACTIVE(add(mark(y0), active(if(mark(x0), x1, x2))))
MARK(add(0, y1)) → ACTIVE(add(active(0), mark(y1)))
MARK(add(x0, y1)) → ACTIVE(add(x0, mark(y1)))
MARK(add(y0, p(x0))) → ACTIVE(add(mark(y0), active(p(mark(x0)))))
MARK(add(y0, true)) → ACTIVE(add(mark(y0), active(true)))
MARK(add(true, y1)) → ACTIVE(add(active(true), mark(y1)))
MARK(add(y0, add(x0, x1))) → ACTIVE(add(mark(y0), active(add(mark(x0), mark(x1)))))
MARK(add(y0, fact(x0))) → ACTIVE(add(mark(y0), active(fact(mark(x0)))))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ Rewriting
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
QDP
                                                                                                ↳ ForwardInstantiation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(prod(y0, prod(x0, x1))) → ACTIVE(prod(mark(y0), active(prod(mark(x0), mark(x1)))))
MARK(if(true, y1, y2)) → ACTIVE(if(true, y1, y2))
MARK(if(prod(x0, x1), y1, y2)) → ACTIVE(if(active(prod(mark(x0), mark(x1))), y1, y2))
MARK(prod(y0, zero(x0))) → ACTIVE(prod(mark(y0), active(zero(mark(x0)))))
MARK(prod(if(x0, x1, x2), y1)) → ACTIVE(prod(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(add(false, y1)) → ACTIVE(add(active(false), mark(y1)))
MARK(add(y0, false)) → ACTIVE(add(mark(y0), active(false)))
MARK(add(y0, s(x0))) → ACTIVE(add(mark(y0), active(s(mark(x0)))))
MARK(fact(x0)) → ACTIVE(fact(x0))
ACTIVE(p(s(X))) → MARK(X)
MARK(prod(add(x0, x1), y1)) → ACTIVE(prod(active(add(mark(x0), mark(x1))), mark(y1)))
MARK(prod(y0, s(x0))) → ACTIVE(prod(mark(y0), active(s(mark(x0)))))
MARK(prod(y0, false)) → ACTIVE(prod(mark(y0), active(false)))
MARK(prod(false, y1)) → ACTIVE(prod(active(false), mark(y1)))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(fact(if(x0, x1, x2))) → ACTIVE(fact(active(if(mark(x0), x1, x2))))
MARK(prod(y0, add(x0, x1))) → ACTIVE(prod(mark(y0), active(add(mark(x0), mark(x1)))))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(prod(prod(x0, x1), y1)) → ACTIVE(prod(active(prod(mark(x0), mark(x1))), mark(y1)))
MARK(add(y0, add(x0, x1))) → ACTIVE(add(mark(y0), active(add(mark(x0), mark(x1)))))
MARK(add(add(x0, x1), y1)) → ACTIVE(add(active(add(mark(x0), mark(x1))), mark(y1)))
MARK(add(fact(x0), y1)) → ACTIVE(add(active(fact(mark(x0))), mark(y1)))
MARK(add(zero(x0), y1)) → ACTIVE(add(active(zero(mark(x0))), mark(y1)))
MARK(fact(prod(x0, x1))) → ACTIVE(fact(active(prod(mark(x0), mark(x1)))))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(add(y0, x1)) → ACTIVE(add(mark(y0), x1))
MARK(add(y0, prod(x0, x1))) → ACTIVE(add(mark(y0), active(prod(mark(x0), mark(x1)))))
MARK(fact(false)) → ACTIVE(fact(false))
MARK(add(x0, y1)) → ACTIVE(add(x0, mark(y1)))
MARK(zero(x1)) → MARK(x1)
MARK(fact(add(x0, x1))) → ACTIVE(fact(active(add(mark(x0), mark(x1)))))
MARK(if(fact(x0), y1, y2)) → ACTIVE(if(active(fact(mark(x0))), y1, y2))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(fact(s(x0))) → ACTIVE(fact(active(s(mark(x0)))))
MARK(prod(s(x0), y1)) → ACTIVE(prod(active(s(mark(x0))), mark(y1)))
MARK(prod(fact(x0), y1)) → ACTIVE(prod(active(fact(mark(x0))), mark(y1)))
MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(prod(x1, x2)) → MARK(x1)
MARK(if(zero(x0), y1, y2)) → ACTIVE(if(active(zero(mark(x0))), y1, y2))
MARK(prod(p(x0), y1)) → ACTIVE(prod(active(p(mark(x0))), mark(y1)))
MARK(fact(fact(x0))) → ACTIVE(fact(active(fact(mark(x0)))))
MARK(s(x1)) → MARK(x1)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(add(x1, x2)) → MARK(x2)
MARK(fact(x1)) → MARK(x1)
MARK(prod(y0, if(x0, x1, x2))) → ACTIVE(prod(mark(y0), active(if(mark(x0), x1, x2))))
MARK(prod(y0, x1)) → ACTIVE(prod(mark(y0), x1))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(prod(y0, fact(x0))) → ACTIVE(prod(mark(y0), active(fact(mark(x0)))))
MARK(add(x1, x2)) → MARK(x1)
MARK(if(add(x0, x1), y1, y2)) → ACTIVE(if(active(add(mark(x0), mark(x1))), y1, y2))
MARK(add(prod(x0, x1), y1)) → ACTIVE(add(active(prod(mark(x0), mark(x1))), mark(y1)))
MARK(fact(p(x0))) → ACTIVE(fact(active(p(mark(x0)))))
MARK(fact(true)) → ACTIVE(fact(true))
MARK(prod(x0, y1)) → ACTIVE(prod(x0, mark(y1)))
MARK(prod(y0, 0)) → ACTIVE(prod(mark(y0), active(0)))
MARK(prod(0, y1)) → ACTIVE(prod(active(0), mark(y1)))
MARK(fact(0)) → ACTIVE(fact(0))
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(prod(x1, x2)) → MARK(x2)
MARK(if(p(x0), y1, y2)) → ACTIVE(if(active(p(mark(x0))), y1, y2))
MARK(add(y0, zero(x0))) → ACTIVE(add(mark(y0), active(zero(mark(x0)))))
MARK(prod(y0, true)) → ACTIVE(prod(mark(y0), active(true)))
MARK(prod(true, y1)) → ACTIVE(prod(active(true), mark(y1)))
MARK(fact(zero(x0))) → ACTIVE(fact(active(zero(mark(x0)))))
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
MARK(add(if(x0, x1, x2), y1)) → ACTIVE(add(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(add(s(x0), y1)) → ACTIVE(add(active(s(mark(x0))), mark(y1)))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(false, y1, y2))
MARK(add(p(x0), y1)) → ACTIVE(add(active(p(mark(x0))), mark(y1)))
MARK(add(0, y1)) → ACTIVE(add(active(0), mark(y1)))
MARK(add(y0, if(x0, x1, x2))) → ACTIVE(add(mark(y0), active(if(mark(x0), x1, x2))))
MARK(add(y0, 0)) → ACTIVE(add(mark(y0), active(0)))
MARK(prod(y0, p(x0))) → ACTIVE(prod(mark(y0), active(p(mark(x0)))))
MARK(add(y0, p(x0))) → ACTIVE(add(mark(y0), active(p(mark(x0)))))
MARK(prod(zero(x0), y1)) → ACTIVE(prod(active(zero(mark(x0))), mark(y1)))
MARK(add(true, y1)) → ACTIVE(add(active(true), mark(y1)))
MARK(add(y0, true)) → ACTIVE(add(mark(y0), active(true)))
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(add(y0, fact(x0))) → ACTIVE(add(mark(y0), active(fact(mark(x0)))))

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
By forward instantiating [14] the rule MARK(if(x1, x2, x3)) → MARK(x1) we obtained the following new rules:

MARK(if(if(s(y_0), y_1, y_2), x1, x2)) → MARK(if(s(y_0), y_1, y_2))
MARK(if(add(y_0, fact(y_1)), x1, x2)) → MARK(add(y_0, fact(y_1)))
MARK(if(add(s(y_0), y_1), x1, x2)) → MARK(add(s(y_0), y_1))
MARK(if(add(fact(y_0), y_1), x1, x2)) → MARK(add(fact(y_0), y_1))
MARK(if(add(y_0, s(y_1)), x1, x2)) → MARK(add(y_0, s(y_1)))
MARK(if(if(if(y_0, y_1, y_2), y_3, y_4), x1, x2)) → MARK(if(if(y_0, y_1, y_2), y_3, y_4))
MARK(if(p(fact(y_0)), x1, x2)) → MARK(p(fact(y_0)))
MARK(if(add(add(y_0, y_1), y_2), x1, x2)) → MARK(add(add(y_0, y_1), y_2))
MARK(if(add(true, y_0), x1, x2)) → MARK(add(true, y_0))
MARK(if(add(y_0, true), x1, x2)) → MARK(add(y_0, true))
MARK(if(p(s(y_0)), x1, x2)) → MARK(p(s(y_0)))
MARK(if(add(y_0, add(y_1, y_2)), x1, x2)) → MARK(add(y_0, add(y_1, y_2)))
MARK(if(p(prod(y_0, y_1)), x1, x2)) → MARK(p(prod(y_0, y_1)))
MARK(if(if(fact(y_0), y_1, y_2), x1, x2)) → MARK(if(fact(y_0), y_1, y_2))
MARK(if(prod(zero(y_0), y_1), x1, x2)) → MARK(prod(zero(y_0), y_1))
MARK(if(prod(y_0, 0), x1, x2)) → MARK(prod(y_0, 0))
MARK(if(prod(0, y_0), x1, x2)) → MARK(prod(0, y_0))
MARK(if(add(y_0, zero(y_1)), x1, x2)) → MARK(add(y_0, zero(y_1)))
MARK(if(prod(y_0, fact(y_1)), x1, x2)) → MARK(prod(y_0, fact(y_1)))
MARK(if(prod(y_0, true), x1, x2)) → MARK(prod(y_0, true))
MARK(if(prod(true, y_0), x1, x2)) → MARK(prod(true, y_0))
MARK(if(fact(p(y_0)), x1, x2)) → MARK(fact(p(y_0)))
MARK(if(if(zero(y_0), y_1, y_2), x1, x2)) → MARK(if(zero(y_0), y_1, y_2))
MARK(if(add(y_0, y_1), x1, x2)) → MARK(add(y_0, y_1))
MARK(if(add(zero(y_0), y_1), x1, x2)) → MARK(add(zero(y_0), y_1))
MARK(if(if(prod(y_0, y_1), y_2, y_3), x1, x2)) → MARK(if(prod(y_0, y_1), y_2, y_3))
MARK(if(p(p(y_0)), x1, x2)) → MARK(p(p(y_0)))
MARK(if(if(add(y_0, y_1), y_2, y_3), x1, x2)) → MARK(if(add(y_0, y_1), y_2, y_3))
MARK(if(fact(true), x1, x2)) → MARK(fact(true))
MARK(if(add(false, y_0), x1, x2)) → MARK(add(false, y_0))
MARK(if(add(y_0, false), x1, x2)) → MARK(add(y_0, false))
MARK(if(fact(s(y_0)), x1, x2)) → MARK(fact(s(y_0)))
MARK(if(fact(fact(y_0)), x1, x2)) → MARK(fact(fact(y_0)))
MARK(if(fact(add(y_0, y_1)), x1, x2)) → MARK(fact(add(y_0, y_1)))
MARK(if(add(if(y_0, y_1, y_2), y_3), x1, x2)) → MARK(add(if(y_0, y_1, y_2), y_3))
MARK(if(fact(zero(y_0)), x1, x2)) → MARK(fact(zero(y_0)))
MARK(if(s(y_0), x1, x2)) → MARK(s(y_0))
MARK(if(prod(if(y_0, y_1, y_2), y_3), x1, x2)) → MARK(prod(if(y_0, y_1, y_2), y_3))
MARK(if(add(y_0, prod(y_1, y_2)), x1, x2)) → MARK(add(y_0, prod(y_1, y_2)))
MARK(if(fact(0), x1, x2)) → MARK(fact(0))
MARK(if(if(p(y_0), y_1, y_2), x1, x2)) → MARK(if(p(y_0), y_1, y_2))
MARK(if(prod(p(y_0), y_1), x1, x2)) → MARK(prod(p(y_0), y_1))
MARK(if(prod(y_0, zero(y_1)), x1, x2)) → MARK(prod(y_0, zero(y_1)))
MARK(if(if(false, y_0, y_1), x1, x2)) → MARK(if(false, y_0, y_1))
MARK(if(add(y_0, p(y_1)), x1, x2)) → MARK(add(y_0, p(y_1)))
MARK(if(prod(add(y_0, y_1), y_2), x1, x2)) → MARK(prod(add(y_0, y_1), y_2))
MARK(if(if(y_0, y_1, y_2), x1, x2)) → MARK(if(y_0, y_1, y_2))
MARK(if(fact(if(y_0, y_1, y_2)), x1, x2)) → MARK(fact(if(y_0, y_1, y_2)))
MARK(if(prod(s(y_0), y_1), x1, x2)) → MARK(prod(s(y_0), y_1))
MARK(if(p(y_0), x1, x2)) → MARK(p(y_0))
MARK(if(fact(false), x1, x2)) → MARK(fact(false))
MARK(if(add(y_0, if(y_1, y_2, y_3)), x1, x2)) → MARK(add(y_0, if(y_1, y_2, y_3)))
MARK(if(p(add(y_0, y_1)), x1, x2)) → MARK(p(add(y_0, y_1)))
MARK(if(prod(prod(y_0, y_1), y_2), x1, x2)) → MARK(prod(prod(y_0, y_1), y_2))
MARK(if(prod(y_0, prod(y_1, y_2)), x1, x2)) → MARK(prod(y_0, prod(y_1, y_2)))
MARK(if(prod(y_0, false), x1, x2)) → MARK(prod(y_0, false))
MARK(if(prod(false, y_0), x1, x2)) → MARK(prod(false, y_0))
MARK(if(p(if(y_0, y_1, y_2)), x1, x2)) → MARK(p(if(y_0, y_1, y_2)))
MARK(if(prod(y_0, if(y_1, y_2, y_3)), x1, x2)) → MARK(prod(y_0, if(y_1, y_2, y_3)))
MARK(if(if(true, y_0, y_1), x1, x2)) → MARK(if(true, y_0, y_1))
MARK(if(prod(fact(y_0), y_1), x1, x2)) → MARK(prod(fact(y_0), y_1))
MARK(if(add(0, y_0), x1, x2)) → MARK(add(0, y_0))
MARK(if(add(y_0, 0), x1, x2)) → MARK(add(y_0, 0))
MARK(if(prod(y_0, y_1), x1, x2)) → MARK(prod(y_0, y_1))
MARK(if(prod(y_0, s(y_1)), x1, x2)) → MARK(prod(y_0, s(y_1)))
MARK(if(zero(y_0), x1, x2)) → MARK(zero(y_0))
MARK(if(add(prod(y_0, y_1), y_2), x1, x2)) → MARK(add(prod(y_0, y_1), y_2))
MARK(if(add(p(y_0), y_1), x1, x2)) → MARK(add(p(y_0), y_1))
MARK(if(fact(prod(y_0, y_1)), x1, x2)) → MARK(fact(prod(y_0, y_1)))
MARK(if(p(zero(y_0)), x1, x2)) → MARK(p(zero(y_0)))
MARK(if(fact(y_0), x1, x2)) → MARK(fact(y_0))
MARK(if(prod(y_0, p(y_1)), x1, x2)) → MARK(prod(y_0, p(y_1)))
MARK(if(prod(y_0, add(y_1, y_2)), x1, x2)) → MARK(prod(y_0, add(y_1, y_2)))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Rewriting
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ Rewriting
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ ForwardInstantiation
QDP
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation

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

MARK(prod(y0, prod(x0, x1))) → ACTIVE(prod(mark(y0), active(prod(mark(x0), mark(x1)))))
MARK(if(if(s(y_0), y_1, y_2), x1, x2)) → MARK(if(s(y_0), y_1, y_2))
MARK(prod(y0, zero(x0))) → ACTIVE(prod(mark(y0), active(zero(mark(x0)))))
MARK(prod(if(x0, x1, x2), y1)) → ACTIVE(prod(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(add(false, y1)) → ACTIVE(add(active(false), mark(y1)))
MARK(add(y0, false)) → ACTIVE(add(mark(y0), active(false)))
MARK(if(add(y_0, fact(y_1)), x1, x2)) → MARK(add(y_0, fact(y_1)))
MARK(if(add(s(y_0), y_1), x1, x2)) → MARK(add(s(y_0), y_1))
MARK(if(p(fact(y_0)), x1, x2)) → MARK(p(fact(y_0)))
ACTIVE(p(s(X))) → MARK(X)
MARK(prod(y0, s(x0))) → ACTIVE(prod(mark(y0), active(s(mark(x0)))))
MARK(prod(y0, false)) → ACTIVE(prod(mark(y0), active(false)))
MARK(prod(false, y1)) → ACTIVE(prod(active(false), mark(y1)))
MARK(if(p(prod(y_0, y_1)), x1, x2)) → MARK(p(prod(y_0, y_1)))
MARK(if(if(fact(y_0), y_1, y_2), x1, x2)) → MARK(if(fact(y_0), y_1, y_2))
MARK(p(x1)) → MARK(x1)
MARK(p(prod(x0, x1))) → ACTIVE(p(active(prod(mark(x0), mark(x1)))))
MARK(prod(prod(x0, x1), y1)) → ACTIVE(prod(active(prod(mark(x0), mark(x1))), mark(y1)))
MARK(add(y0, add(x0, x1))) → ACTIVE(add(mark(y0), active(add(mark(x0), mark(x1)))))
MARK(if(prod(0, y_0), x1, x2)) → MARK(prod(0, y_0))
MARK(if(prod(y_0, 0), x1, x2)) → MARK(prod(y_0, 0))
MARK(if(prod(zero(y_0), y_1), x1, x2)) → MARK(prod(zero(y_0), y_1))
MARK(fact(prod(x0, x1))) → ACTIVE(fact(active(prod(mark(x0), mark(x1)))))
MARK(if(add(y_0, zero(y_1)), x1, x2)) → MARK(add(y_0, zero(y_1)))
ACTIVE(fact(X)) → MARK(if(zero(X), s(0), prod(X, fact(p(X)))))
MARK(if(fact(p(y_0)), x1, x2)) → MARK(fact(p(y_0)))
MARK(if(add(y_0, y_1), x1, x2)) → MARK(add(y_0, y_1))
MARK(if(add(zero(y_0), y_1), x1, x2)) → MARK(add(zero(y_0), y_1))
MARK(add(x0, y1)) → ACTIVE(add(x0, mark(y1)))
MARK(zero(x1)) → MARK(x1)
MARK(fact(add(x0, x1))) → ACTIVE(fact(active(add(mark(x0), mark(x1)))))
MARK(prod(s(x0), y1)) → ACTIVE(prod(active(s(mark(x0))), mark(y1)))
MARK(prod(fact(x0), y1)) → ACTIVE(prod(active(fact(mark(x0))), mark(y1)))
MARK(p(fact(x0))) → ACTIVE(p(active(fact(mark(x0)))))
MARK(prod(x1, x2)) → MARK(x1)
MARK(s(x1)) → MARK(x1)
MARK(if(prod(p(y_0), y_1), x1, x2)) → MARK(prod(p(y_0), y_1))
MARK(prod(y0, if(x0, x1, x2))) → ACTIVE(prod(mark(y0), active(if(mark(x0), x1, x2))))
MARK(if(prod(y_0, zero(y_1)), x1, x2)) → MARK(prod(y_0, zero(y_1)))
MARK(prod(y0, x1)) → ACTIVE(prod(mark(y0), x1))
MARK(prod(y0, fact(x0))) → ACTIVE(prod(mark(y0), active(fact(mark(x0)))))
MARK(add(x1, x2)) → MARK(x1)
MARK(if(prod(add(y_0, y_1), y_2), x1, x2)) → MARK(prod(add(y_0, y_1), y_2))
MARK(if(add(x0, x1), y1, y2)) → ACTIVE(if(active(add(mark(x0), mark(x1))), y1, y2))
MARK(add(prod(x0, x1), y1)) → ACTIVE(add(active(prod(mark(x0), mark(x1))), mark(y1)))
MARK(if(fact(if(y_0, y_1, y_2)), x1, x2)) → MARK(fact(if(y_0, y_1, y_2)))
MARK(fact(true)) → ACTIVE(fact(true))
MARK(prod(x0, y1)) → ACTIVE(prod(x0, mark(y1)))
MARK(if(prod(s(y_0), y_1), x1, x2)) → MARK(prod(s(y_0), y_1))
MARK(prod(y0, 0)) → ACTIVE(prod(mark(y0), active(0)))
MARK(prod(0, y1)) → ACTIVE(prod(active(0), mark(y1)))
MARK(if(p(add(y_0, y_1)), x1, x2)) → MARK(p(add(y_0, y_1)))
MARK(if(prod(false, y_0), x1, x2)) → MARK(prod(false, y_0))
MARK(if(prod(y_0, false), x1, x2)) → MARK(prod(y_0, false))
MARK(if(prod(y_0, prod(y_1, y_2)), x1, x2)) → MARK(prod(y_0, prod(y_1, y_2)))
MARK(if(prod(y_0, if(y_1, y_2, y_3)), x1, x2)) → MARK(prod(y_0, if(y_1, y_2, y_3)))
MARK(if(p(if(y_0, y_1, y_2)), x1, x2)) → MARK(p(if(y_0, y_1, y_2)))
MARK(if(prod(fact(y_0), y_1), x1, x2)) → MARK(prod(fact(y_0), y_1))
MARK(if(p(x0), y1, y2)) → ACTIVE(if(active(p(mark(x0))), y1, y2))
MARK(if(add(y_0, 0), x1, x2)) → MARK(add(y_0, 0))
MARK(if(add(0, y_0), x1, x2)) → MARK(add(0, y_0))
MARK(add(y0, zero(x0))) → ACTIVE(add(mark(y0), active(zero(mark(x0)))))
MARK(fact(zero(x0))) → ACTIVE(fact(active(zero(mark(x0)))))
MARK(p(if(x0, x1, x2))) → ACTIVE(p(active(if(mark(x0), x1, x2))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(p(add(x0, x1))) → ACTIVE(p(active(add(mark(x0), mark(x1)))))
MARK(add(if(x0, x1, x2), y1)) → ACTIVE(add(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(p(x0)) → ACTIVE(p(x0))
MARK(if(zero(y_0), x1, x2)) → MARK(zero(y_0))
MARK(if(false, y1, y2)) → ACTIVE(if(false, y1, y2))
MARK(add(p(x0), y1)) → ACTIVE(add(active(p(mark(x0))), mark(y1)))
MARK(add(0, y1)) → ACTIVE(add(active(0), mark(y1)))
MARK(add(y0, if(x0, x1, x2))) → ACTIVE(add(mark(y0), active(if(mark(x0), x1, x2))))
MARK(add(y0, 0)) → ACTIVE(add(mark(y0), active(0)))
MARK(prod(y0, p(x0))) → ACTIVE(prod(mark(y0), active(p(mark(x0)))))
MARK(if(add(p(y_0), y_1), x1, x2)) → MARK(add(p(y_0), y_1))
MARK(if(p(zero(y_0)), x1, x2)) → MARK(p(zero(y_0)))
MARK(if(prod(y_0, p(y_1)), x1, x2)) → MARK(prod(y_0, p(y_1)))
MARK(if(prod(y_0, add(y_1, y_2)), x1, x2)) → MARK(prod(y_0, add(y_1, y_2)))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(add(y0, fact(x0))) → ACTIVE(add(mark(y0), active(fact(mark(x0)))))
MARK(if(true, y1, y2)) → ACTIVE(if(true, y1, y2))
MARK(if(prod(x0, x1), y1, y2)) → ACTIVE(if(active(prod(mark(x0), mark(x1))), y1, y2))
MARK(add(y0, s(x0))) → ACTIVE(add(mark(y0), active(s(mark(x0)))))
MARK(fact(x0)) → ACTIVE(fact(x0))
MARK(if(add(fact(y_0), y_1), x1, x2)) → MARK(add(fact(y_0), y_1))
MARK(if(add(y_0, s(y_1)), x1, x2)) → MARK(add(y_0, s(y_1)))
MARK(if(if(if(y_0, y_1, y_2), y_3, y_4), x1, x2)) → MARK(if(if(y_0, y_1, y_2), y_3, y_4))
MARK(prod(add(x0, x1), y1)) → ACTIVE(prod(active(add(mark(x0), mark(x1))), mark(y1)))
MARK(if(add(add(y_0, y_1), y_2), x1, x2)) → MARK(add(add(y_0, y_1), y_2))
MARK(if(add(y_0, true), x1, x2)) → MARK(add(y_0, true))
MARK(if(add(true, y_0), x1, x2)) → MARK(add(true, y_0))
MARK(fact(if(x0, x1, x2))) → ACTIVE(fact(active(if(mark(x0), x1, x2))))
MARK(if(p(s(y_0)), x1, x2)) → MARK(p(s(y_0)))
MARK(if(add(y_0, add(y_1, y_2)), x1, x2)) → MARK(add(y_0, add(y_1, y_2)))
MARK(prod(y0, add(x0, x1))) → ACTIVE(prod(mark(y0), active(add(mark(x0), mark(x1)))))
MARK(add(add(x0, x1), y1)) → ACTIVE(add(active(add(mark(x0), mark(x1))), mark(y1)))
MARK(add(fact(x0), y1)) → ACTIVE(add(active(fact(mark(x0))), mark(y1)))
MARK(add(zero(x0), y1)) → ACTIVE(add(active(zero(mark(x0))), mark(y1)))
MARK(if(prod(y_0, fact(y_1)), x1, x2)) → MARK(prod(y_0, fact(y_1)))
ACTIVE(prod(s(X), Y)) → MARK(add(Y, prod(X, Y)))
MARK(if(prod(true, y_0), x1, x2)) → MARK(prod(true, y_0))
MARK(if(prod(y_0, true), x1, x2)) → MARK(prod(y_0, true))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(if(if(zero(y_0), y_1, y_2), x1, x2)) → MARK(if(zero(y_0), y_1, y_2))
MARK(add(y0, x1)) → ACTIVE(add(mark(y0), x1))
MARK(add(y0, prod(x0, x1))) → ACTIVE(add(mark(y0), active(prod(mark(x0), mark(x1)))))
MARK(fact(false)) → ACTIVE(fact(false))
MARK(if(p(p(y_0)), x1, x2)) → MARK(p(p(y_0)))
MARK(if(if(prod(y_0, y_1), y_2, y_3), x1, x2)) → MARK(if(prod(y_0, y_1), y_2, y_3))
MARK(if(fact(true), x1, x2)) → MARK(fact(true))
MARK(if(if(add(y_0, y_1), y_2, y_3), x1, x2)) → MARK(if(add(y_0, y_1), y_2, y_3))
MARK(if(add(y_0, false), x1, x2)) → MARK(add(y_0, false))
MARK(if(add(false, y_0), x1, x2)) → MARK(add(false, y_0))
MARK(if(fact(s(y_0)), x1, x2)) → MARK(fact(s(y_0)))
MARK(if(fact(fact(y_0)), x1, x2)) → MARK(fact(fact(y_0)))
MARK(if(fact(x0), y1, y2)) → ACTIVE(if(active(fact(mark(x0))), y1, y2))
MARK(if(fact(add(y_0, y_1)), x1, x2)) → MARK(fact(add(y_0, y_1)))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(if(fact(zero(y_0)), x1, x2)) → MARK(fact(zero(y_0)))
MARK(if(add(if(y_0, y_1, y_2), y_3), x1, x2)) → MARK(add(if(y_0, y_1, y_2), y_3))
MARK(fact(s(x0))) → ACTIVE(fact(active(s(mark(x0)))))
MARK(if(prod(if(y_0, y_1, y_2), y_3), x1, x2)) → MARK(prod(if(y_0, y_1, y_2), y_3))
MARK(if(s(y_0), x1, x2)) → MARK(s(y_0))
MARK(if(zero(x0), y1, y2)) → ACTIVE(if(active(zero(mark(x0))), y1, y2))
MARK(prod(p(x0), y1)) → ACTIVE(prod(active(p(mark(x0))), mark(y1)))
MARK(if(add(y_0, prod(y_1, y_2)), x1, x2)) → MARK(add(y_0, prod(y_1, y_2)))
MARK(if(fact(0), x1, x2)) → MARK(fact(0))
MARK(fact(fact(x0))) → ACTIVE(fact(active(fact(mark(x0)))))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(add(x1, x2)) → MARK(x2)
MARK(fact(x1)) → MARK(x1)
MARK(if(if(p(y_0), y_1, y_2), x1, x2)) → MARK(if(p(y_0), y_1, y_2))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(if(if(false, y_0, y_1), x1, x2)) → MARK(if(false, y_0, y_1))
MARK(if(add(y_0, p(y_1)), x1, x2)) → MARK(add(y_0, p(y_1)))
MARK(if(if(y_0, y_1, y_2), x1, x2)) → MARK(if(y_0, y_1, y_2))
MARK(fact(p(x0))) → ACTIVE(fact(active(p(mark(x0)))))
MARK(if(fact(false), x1, x2)) → MARK(fact(false))
MARK(if(p(y_0), x1, x2)) → MARK(p(y_0))
MARK(if(add(y_0, if(y_1, y_2, y_3)), x1, x2)) → MARK(add(y_0, if(y_1, y_2, y_3)))
MARK(fact(0)) → ACTIVE(fact(0))
MARK(if(prod(prod(y_0, y_1), y_2), x1, x2)) → MARK(prod(prod(y_0, y_1), y_2))
MARK(p(zero(x0))) → ACTIVE(p(active(zero(mark(x0)))))
MARK(p(s(x0))) → ACTIVE(p(active(s(mark(x0)))))
MARK(if(if(true, y_0, y_1), x1, x2)) → MARK(if(true, y_0, y_1))
MARK(prod(x1, x2)) → MARK(x2)
MARK(prod(y0, true)) → ACTIVE(prod(mark(y0), active(true)))
MARK(prod(true, y1)) → ACTIVE(prod(active(true), mark(y1)))
MARK(if(prod(y_0, y_1), x1, x2)) → MARK(prod(y_0, y_1))
MARK(if(prod(y_0, s(y_1)), x1, x2)) → MARK(prod(y_0, s(y_1)))
MARK(add(s(x0), y1)) → ACTIVE(add(active(s(mark(x0))), mark(y1)))
MARK(p(p(x0))) → ACTIVE(p(active(p(mark(x0)))))
MARK(if(add(prod(y_0, y_1), y_2), x1, x2)) → MARK(add(prod(y_0, y_1), y_2))
MARK(if(fact(prod(y_0, y_1)), x1, x2)) → MARK(fact(prod(y_0, y_1)))
MARK(add(y0, p(x0))) → ACTIVE(add(mark(y0), active(p(mark(x0)))))
MARK(if(fact(y_0), x1, x2)) → MARK(fact(y_0))
MARK(prod(zero(x0), y1)) → ACTIVE(prod(active(zero(mark(x0))), mark(y1)))
MARK(add(true, y1)) → ACTIVE(add(active(true), mark(y1)))
MARK(add(y0, true)) → ACTIVE(add(mark(y0), active(true)))
ACTIVE(add(0, X)) → MARK(X)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
mark(fact(x1)) → active(fact(mark(x1)))
fact(active(x1)) → fact(x1)
fact(mark(x1)) → fact(x1)
mark(if(x1, x2, x3)) → active(if(mark(x1), x2, x3))
if(active(x1), x2, x3) → if(x1, x2, x3)
if(mark(x1), x2, x3) → if(x1, x2, x3)
mark(zero(x1)) → active(zero(mark(x1)))
zero(active(x1)) → zero(x1)
zero(mark(x1)) → zero(x1)
mark(s(x1)) → active(s(mark(x1)))
s(active(x1)) → s(x1)
s(mark(x1)) → s(x1)
mark(0) → active(0)
mark(prod(x1, x2)) → active(prod(mark(x1), mark(x2)))
prod(active(x1), x2) → prod(x1, x2)
prod(mark(x1), x2) → prod(x1, x2)
prod(x1, active(x2)) → prod(x1, x2)
prod(x1, mark(x2)) → prod(x1, x2)
mark(p(x1)) → active(p(mark(x1)))
p(active(x1)) → p(x1)
p(mark(x1)) → p(x1)
mark(add(x1, x2)) → active(add(mark(x1), mark(x2)))
add(active(x1), x2) → add(x1, x2)
add(mark(x1), x2) → add(x1, x2)
add(x1, active(x2)) → add(x1, x2)
add(x1, mark(x2)) → add(x1, x2)
mark(true) → active(true)
mark(false) → active(false)

The set Q consists of the following terms:

active(fact(x0))
active(add(0, x0))
active(add(s(x0), x1))
active(prod(0, x0))
active(prod(s(x0), x1))
active(if(true, x0, x1))
active(if(false, x0, x1))
active(zero(0))
active(zero(s(x0)))
active(p(s(x0)))
mark(fact(x0))
fact(active(x0))
fact(mark(x0))
mark(if(x0, x1, x2))
if(active(x0), x1, x2)
if(mark(x0), x1, x2)
mark(zero(x0))
zero(active(x0))
zero(mark(x0))
mark(s(x0))
s(active(x0))
s(mark(x0))
mark(0)
mark(prod(x0, x1))
prod(active(x0), x1)
prod(mark(x0), x1)
prod(x0, active(x1))
prod(x0, mark(x1))
mark(p(x0))
p(active(x0))
p(mark(x0))
mark(add(x0, x1))
add(active(x0), x1)
add(mark(x0), x1)
add(x0, active(x1))
add(x0, mark(x1))
mark(true)
mark(false)

We have to consider all minimal (P,Q,R)-chains.
We applied the Trivial transformation to transform the context-sensitive TRS to a usual TRS.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
QTRS
          ↳ Overlay + Local Confluence
      ↳ Improved Ferreira Ribeiro-Transformation

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

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

Q is empty.

The TRS is overlay and locally confluent. By [19] we can switch to innermost.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ Overlay + Local Confluence
QTRS
              ↳ DependencyPairsProof
      ↳ Improved Ferreira Ribeiro-Transformation

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

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))


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

FACT(X) → PROD(X, fact(p(X)))
PROD(s(X), Y) → ADD(Y, prod(X, Y))
FACT(X) → P(X)
ADD(s(X), Y) → ADD(X, Y)
FACT(X) → FACT(p(X))
PROD(s(X), Y) → PROD(X, Y)
FACT(X) → ZERO(X)
FACT(X) → IF(zero(X), s(0), prod(X, fact(p(X))))

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))

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

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ Overlay + Local Confluence
            ↳ QTRS
              ↳ DependencyPairsProof
QDP
                  ↳ DependencyGraphProof
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(X) → PROD(X, fact(p(X)))
PROD(s(X), Y) → ADD(Y, prod(X, Y))
FACT(X) → P(X)
ADD(s(X), Y) → ADD(X, Y)
FACT(X) → FACT(p(X))
PROD(s(X), Y) → PROD(X, Y)
FACT(X) → ZERO(X)
FACT(X) → IF(zero(X), s(0), prod(X, fact(p(X))))

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))

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

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ Overlay + Local Confluence
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
                      ↳ QDP
      ↳ Improved Ferreira Ribeiro-Transformation

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

ADD(s(X), Y) → ADD(X, Y)

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ Overlay + Local Confluence
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ QReductionProof
                      ↳ QDP
                      ↳ QDP
      ↳ Improved Ferreira Ribeiro-Transformation

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

ADD(s(X), Y) → ADD(X, Y)

R is empty.
The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ Overlay + Local Confluence
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
QDP
                                ↳ QDPSizeChangeProof
                      ↳ QDP
                      ↳ QDP
      ↳ Improved Ferreira Ribeiro-Transformation

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

ADD(s(X), Y) → ADD(X, Y)

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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ Overlay + Local Confluence
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
                      ↳ QDP
      ↳ Improved Ferreira Ribeiro-Transformation

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

PROD(s(X), Y) → PROD(X, Y)

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ Overlay + Local Confluence
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ QReductionProof
                      ↳ QDP
      ↳ Improved Ferreira Ribeiro-Transformation

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

PROD(s(X), Y) → PROD(X, Y)

R is empty.
The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ Overlay + Local Confluence
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
QDP
                                ↳ QDPSizeChangeProof
                      ↳ QDP
      ↳ Improved Ferreira Ribeiro-Transformation

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

PROD(s(X), Y) → PROD(X, Y)

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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ Overlay + Local Confluence
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
QDP
                        ↳ UsableRulesProof
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(X) → FACT(p(X))

The TRS R consists of the following rules:

fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ Overlay + Local Confluence
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
QDP
                            ↳ QReductionProof
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(X) → FACT(p(X))

The TRS R consists of the following rules:

p(s(X)) → X

The set Q consists of the following terms:

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))
p(s(x0))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

fact(x0)
add(0, x0)
add(s(x0), x1)
prod(0, x0)
prod(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
zero(0)
zero(s(x0))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ Overlay + Local Confluence
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
QDP
                                ↳ UsableRulesReductionPairsProof
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(X) → FACT(p(X))

The TRS R consists of the following rules:

p(s(X)) → X

The set Q consists of the following terms:

p(s(x0))

We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

The following rules are removed from R:

p(s(X)) → X
Used ordering: POLO with Polynomial interpretation [25]:

POL(FACT(x1)) = 2·x1   
POL(p(x1)) = x1   
POL(s(x1)) = x1   



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ Overlay + Local Confluence
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
QDP
                                    ↳ Instantiation
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(X) → FACT(p(X))

R is empty.
The set Q consists of the following terms:

p(s(x0))

We have to consider all minimal (P,Q,R)-chains.
By instantiating [15] the rule FACT(X) → FACT(p(X)) we obtained the following new rules:

FACT(p(z0)) → FACT(p(p(z0)))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ Overlay + Local Confluence
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ Instantiation
QDP
                                        ↳ Instantiation
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(p(z0)) → FACT(p(p(z0)))

R is empty.
The set Q consists of the following terms:

p(s(x0))

We have to consider all minimal (P,Q,R)-chains.
By instantiating [15] the rule FACT(p(z0)) → FACT(p(p(z0))) we obtained the following new rules:

FACT(p(p(z0))) → FACT(p(p(p(z0))))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ Overlay + Local Confluence
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ Instantiation
QDP
                                            ↳ QReductionProof
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(p(p(z0))) → FACT(p(p(p(z0))))

R is empty.
The set Q consists of the following terms:

p(s(x0))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as they contain symbols which do neither occur in P nor in R.

p(s(x0))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
        ↳ QTRS
          ↳ Overlay + Local Confluence
            ↳ QTRS
              ↳ DependencyPairsProof
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ AND
                      ↳ QDP
                      ↳ QDP
                      ↳ QDP
                        ↳ UsableRulesProof
                          ↳ QDP
                            ↳ QReductionProof
                              ↳ QDP
                                ↳ UsableRulesReductionPairsProof
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ Instantiation
                                          ↳ QDP
                                            ↳ QReductionProof
QDP
                                                ↳ NonTerminationProof
      ↳ Improved Ferreira Ribeiro-Transformation

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

FACT(p(p(z0))) → FACT(p(p(p(z0))))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

FACT(p(p(z0))) → FACT(p(p(p(z0))))

The TRS R consists of the following rules:none


s = FACT(p(p(z0))) evaluates to t =FACT(p(p(p(z0))))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from FACT(p(p(z0))) to FACT(p(p(p(z0)))).




We applied the Improved Ferreira Ribeiro transformation [5,11] to transform the context-sensitive TRS to a usual TRS.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
QTRS
          ↳ DependencyPairsProof

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

fact(X) → if(zero(X), sInact(0Inact), prodInact(X, factInact(pInact(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
a(x) → x
prod(x1, x2) → prodInact(x1, x2)
a(prodInact(x1, x2)) → prod(a(x1), a(x2))
p(x1) → pInact(x1)
a(pInact(x1)) → p(a(x1))
s(x1) → sInact(x1)
a(sInact(x1)) → s(a(x1))
fact(x1) → factInact(x1)
a(factInact(x1)) → fact(a(x1))
00Inact
a(0Inact) → 0

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:

A(sInact(x1)) → S(a(x1))
ADD(s(X), Y) → S(add(X, Y))
A(prodInact(x1, x2)) → PROD(a(x1), a(x2))
A(prodInact(x1, x2)) → A(x1)
FACT(X) → ZERO(X)
PROD(s(X), Y) → PROD(X, Y)
A(0Inact) → 01
A(prodInact(x1, x2)) → A(x2)
IF(true, X, Y) → A(X)
PROD(s(X), Y) → ADD(Y, prod(X, Y))
A(factInact(x1)) → FACT(a(x1))
A(factInact(x1)) → A(x1)
IF(false, X, Y) → A(Y)
ADD(s(X), Y) → ADD(X, Y)
A(pInact(x1)) → P(a(x1))
A(pInact(x1)) → A(x1)
FACT(X) → IF(zero(X), sInact(0Inact), prodInact(X, factInact(pInact(X))))
A(sInact(x1)) → A(x1)

The TRS R consists of the following rules:

fact(X) → if(zero(X), sInact(0Inact), prodInact(X, factInact(pInact(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
a(x) → x
prod(x1, x2) → prodInact(x1, x2)
a(prodInact(x1, x2)) → prod(a(x1), a(x2))
p(x1) → pInact(x1)
a(pInact(x1)) → p(a(x1))
s(x1) → sInact(x1)
a(sInact(x1)) → s(a(x1))
fact(x1) → factInact(x1)
a(factInact(x1)) → fact(a(x1))
00Inact
a(0Inact) → 0

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

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
QDP
              ↳ DependencyGraphProof

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

A(sInact(x1)) → S(a(x1))
ADD(s(X), Y) → S(add(X, Y))
A(prodInact(x1, x2)) → PROD(a(x1), a(x2))
A(prodInact(x1, x2)) → A(x1)
FACT(X) → ZERO(X)
PROD(s(X), Y) → PROD(X, Y)
A(0Inact) → 01
A(prodInact(x1, x2)) → A(x2)
IF(true, X, Y) → A(X)
PROD(s(X), Y) → ADD(Y, prod(X, Y))
A(factInact(x1)) → FACT(a(x1))
A(factInact(x1)) → A(x1)
IF(false, X, Y) → A(Y)
ADD(s(X), Y) → ADD(X, Y)
A(pInact(x1)) → P(a(x1))
A(pInact(x1)) → A(x1)
FACT(X) → IF(zero(X), sInact(0Inact), prodInact(X, factInact(pInact(X))))
A(sInact(x1)) → A(x1)

The TRS R consists of the following rules:

fact(X) → if(zero(X), sInact(0Inact), prodInact(X, factInact(pInact(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
a(x) → x
prod(x1, x2) → prodInact(x1, x2)
a(prodInact(x1, x2)) → prod(a(x1), a(x2))
p(x1) → pInact(x1)
a(pInact(x1)) → p(a(x1))
s(x1) → sInact(x1)
a(sInact(x1)) → s(a(x1))
fact(x1) → factInact(x1)
a(factInact(x1)) → fact(a(x1))
00Inact
a(0Inact) → 0

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

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
QDP
                    ↳ UsableRulesProof
                  ↳ QDP
                  ↳ QDP

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

ADD(s(X), Y) → ADD(X, Y)

The TRS R consists of the following rules:

fact(X) → if(zero(X), sInact(0Inact), prodInact(X, factInact(pInact(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
a(x) → x
prod(x1, x2) → prodInact(x1, x2)
a(prodInact(x1, x2)) → prod(a(x1), a(x2))
p(x1) → pInact(x1)
a(pInact(x1)) → p(a(x1))
s(x1) → sInact(x1)
a(sInact(x1)) → s(a(x1))
fact(x1) → factInact(x1)
a(factInact(x1)) → fact(a(x1))
00Inact
a(0Inact) → 0

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.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QDPSizeChangeProof
                  ↳ QDP
                  ↳ QDP

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

ADD(s(X), Y) → ADD(X, Y)

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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
QDP
                    ↳ UsableRulesProof
                  ↳ QDP

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

PROD(s(X), Y) → PROD(X, Y)

The TRS R consists of the following rules:

fact(X) → if(zero(X), sInact(0Inact), prodInact(X, factInact(pInact(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
a(x) → x
prod(x1, x2) → prodInact(x1, x2)
a(prodInact(x1, x2)) → prod(a(x1), a(x2))
p(x1) → pInact(x1)
a(pInact(x1)) → p(a(x1))
s(x1) → sInact(x1)
a(sInact(x1)) → s(a(x1))
fact(x1) → factInact(x1)
a(factInact(x1)) → fact(a(x1))
00Inact
a(0Inact) → 0

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.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QDPSizeChangeProof
                  ↳ QDP

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

PROD(s(X), Y) → PROD(X, Y)

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:



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ Instantiation

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

A(prodInact(x1, x2)) → A(x2)
IF(true, X, Y) → A(X)
A(factInact(x1)) → FACT(a(x1))
A(factInact(x1)) → A(x1)
IF(false, X, Y) → A(Y)
A(prodInact(x1, x2)) → A(x1)
A(pInact(x1)) → A(x1)
FACT(X) → IF(zero(X), sInact(0Inact), prodInact(X, factInact(pInact(X))))
A(sInact(x1)) → A(x1)

The TRS R consists of the following rules:

fact(X) → if(zero(X), sInact(0Inact), prodInact(X, factInact(pInact(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
a(x) → x
prod(x1, x2) → prodInact(x1, x2)
a(prodInact(x1, x2)) → prod(a(x1), a(x2))
p(x1) → pInact(x1)
a(pInact(x1)) → p(a(x1))
s(x1) → sInact(x1)
a(sInact(x1)) → s(a(x1))
fact(x1) → factInact(x1)
a(factInact(x1)) → fact(a(x1))
00Inact
a(0Inact) → 0

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By instantiating [15] the rule IF(true, X, Y) → A(X) we obtained the following new rules:

IF(true, sInact(0Inact), prodInact(y_2, factInact(pInact(y_3)))) → A(sInact(0Inact))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ Instantiation
QDP
                        ↳ Instantiation

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

A(prodInact(x1, x2)) → A(x2)
A(factInact(x1)) → FACT(a(x1))
A(factInact(x1)) → A(x1)
IF(false, X, Y) → A(Y)
IF(true, sInact(0Inact), prodInact(y_2, factInact(pInact(y_3)))) → A(sInact(0Inact))
A(prodInact(x1, x2)) → A(x1)
A(pInact(x1)) → A(x1)
FACT(X) → IF(zero(X), sInact(0Inact), prodInact(X, factInact(pInact(X))))
A(sInact(x1)) → A(x1)

The TRS R consists of the following rules:

fact(X) → if(zero(X), sInact(0Inact), prodInact(X, factInact(pInact(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
a(x) → x
prod(x1, x2) → prodInact(x1, x2)
a(prodInact(x1, x2)) → prod(a(x1), a(x2))
p(x1) → pInact(x1)
a(pInact(x1)) → p(a(x1))
s(x1) → sInact(x1)
a(sInact(x1)) → s(a(x1))
fact(x1) → factInact(x1)
a(factInact(x1)) → fact(a(x1))
00Inact
a(0Inact) → 0

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By instantiating [15] the rule IF(false, X, Y) → A(Y) we obtained the following new rules:

IF(false, sInact(0Inact), prodInact(y_2, factInact(pInact(y_3)))) → A(prodInact(y_2, factInact(pInact(y_3))))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
      ↳ Zantema-Transformation
      ↳ Innermost Giesl Middeldorp-Transformation
      ↳ Trivial-Transformation
      ↳ Improved Ferreira Ribeiro-Transformation
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ Instantiation
                      ↳ QDP
                        ↳ Instantiation
QDP

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

A(prodInact(x1, x2)) → A(x2)
A(factInact(x1)) → FACT(a(x1))
A(factInact(x1)) → A(x1)
IF(false, sInact(0Inact), prodInact(y_2, factInact(pInact(y_3)))) → A(prodInact(y_2, factInact(pInact(y_3))))
A(prodInact(x1, x2)) → A(x1)
IF(true, sInact(0Inact), prodInact(y_2, factInact(pInact(y_3)))) → A(sInact(0Inact))
A(pInact(x1)) → A(x1)
FACT(X) → IF(zero(X), sInact(0Inact), prodInact(X, factInact(pInact(X))))
A(sInact(x1)) → A(x1)

The TRS R consists of the following rules:

fact(X) → if(zero(X), sInact(0Inact), prodInact(X, factInact(pInact(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
a(x) → x
prod(x1, x2) → prodInact(x1, x2)
a(prodInact(x1, x2)) → prod(a(x1), a(x2))
p(x1) → pInact(x1)
a(pInact(x1)) → p(a(x1))
s(x1) → sInact(x1)
a(sInact(x1)) → s(a(x1))
fact(x1) → factInact(x1)
a(factInact(x1)) → fact(a(x1))
00Inact
a(0Inact) → 0

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