(0) Obligation:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

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

ACTIVE(fact(X)) → IF(zero(X), s(0), prod(X, fact(p(X))))
ACTIVE(fact(X)) → ZERO(X)
ACTIVE(fact(X)) → S(0)
ACTIVE(fact(X)) → PROD(X, fact(p(X)))
ACTIVE(fact(X)) → FACT(p(X))
ACTIVE(fact(X)) → P(X)
ACTIVE(add(s(X), Y)) → S(add(X, Y))
ACTIVE(add(s(X), Y)) → ADD(X, Y)
ACTIVE(prod(s(X), Y)) → ADD(Y, prod(X, Y))
ACTIVE(prod(s(X), Y)) → PROD(X, Y)
ACTIVE(fact(X)) → FACT(active(X))
ACTIVE(fact(X)) → ACTIVE(X)
ACTIVE(if(X1, X2, X3)) → IF(active(X1), X2, X3)
ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(zero(X)) → ZERO(active(X))
ACTIVE(zero(X)) → ACTIVE(X)
ACTIVE(s(X)) → S(active(X))
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(prod(X1, X2)) → PROD(active(X1), X2)
ACTIVE(prod(X1, X2)) → ACTIVE(X1)
ACTIVE(prod(X1, X2)) → PROD(X1, active(X2))
ACTIVE(prod(X1, X2)) → ACTIVE(X2)
ACTIVE(p(X)) → P(active(X))
ACTIVE(p(X)) → ACTIVE(X)
ACTIVE(add(X1, X2)) → ADD(active(X1), X2)
ACTIVE(add(X1, X2)) → ACTIVE(X1)
ACTIVE(add(X1, X2)) → ADD(X1, active(X2))
ACTIVE(add(X1, X2)) → ACTIVE(X2)
FACT(mark(X)) → FACT(X)
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
ZERO(mark(X)) → ZERO(X)
S(mark(X)) → S(X)
PROD(mark(X1), X2) → PROD(X1, X2)
PROD(X1, mark(X2)) → PROD(X1, X2)
P(mark(X)) → P(X)
ADD(mark(X1), X2) → ADD(X1, X2)
ADD(X1, mark(X2)) → ADD(X1, X2)
PROPER(fact(X)) → FACT(proper(X))
PROPER(fact(X)) → PROPER(X)
PROPER(if(X1, X2, X3)) → IF(proper(X1), proper(X2), proper(X3))
PROPER(if(X1, X2, X3)) → PROPER(X1)
PROPER(if(X1, X2, X3)) → PROPER(X2)
PROPER(if(X1, X2, X3)) → PROPER(X3)
PROPER(zero(X)) → ZERO(proper(X))
PROPER(zero(X)) → PROPER(X)
PROPER(s(X)) → S(proper(X))
PROPER(s(X)) → PROPER(X)
PROPER(prod(X1, X2)) → PROD(proper(X1), proper(X2))
PROPER(prod(X1, X2)) → PROPER(X1)
PROPER(prod(X1, X2)) → PROPER(X2)
PROPER(p(X)) → P(proper(X))
PROPER(p(X)) → PROPER(X)
PROPER(add(X1, X2)) → ADD(proper(X1), proper(X2))
PROPER(add(X1, X2)) → PROPER(X1)
PROPER(add(X1, X2)) → PROPER(X2)
FACT(ok(X)) → FACT(X)
IF(ok(X1), ok(X2), ok(X3)) → IF(X1, X2, X3)
ZERO(ok(X)) → ZERO(X)
S(ok(X)) → S(X)
PROD(ok(X1), ok(X2)) → PROD(X1, X2)
P(ok(X)) → P(X)
ADD(ok(X1), ok(X2)) → ADD(X1, X2)
TOP(mark(X)) → TOP(proper(X))
TOP(mark(X)) → PROPER(X)
TOP(ok(X)) → TOP(active(X))
TOP(ok(X)) → ACTIVE(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(3) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 10 SCCs with 28 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

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

ADD(X1, mark(X2)) → ADD(X1, X2)
ADD(mark(X1), X2) → ADD(X1, X2)
ADD(ok(X1), ok(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(6) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ADD(mark(X1), X2) → ADD(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ADD(x1, x2)  =  ADD(x1)
mark(x1)  =  mark(x1)
ok(x1)  =  x1
active(x1)  =  active(x1)
fact(x1)  =  x1
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  x1
s(x1)  =  x1
0  =  0
prod(x1, x2)  =  prod(x1, x2)
p(x1)  =  x1
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
proper(x1)  =  x1
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
top > active1 > if3 > mark1 > ADD1
top > active1 > prod2 > mark1 > ADD1
top > active1 > prod2 > 0 > ADD1
top > active1 > add2 > mark1 > ADD1
top > active1 > true > mark1 > ADD1
top > active1 > false > ADD1

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(7) Obligation:

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

ADD(X1, mark(X2)) → ADD(X1, X2)
ADD(ok(X1), ok(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ADD(X1, mark(X2)) → ADD(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ADD(x1, x2)  =  ADD(x1, x2)
mark(x1)  =  mark(x1)
ok(x1)  =  x1
active(x1)  =  active(x1)
fact(x1)  =  x1
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  zero(x1)
s(x1)  =  x1
0  =  0
prod(x1, x2)  =  prod(x1, x2)
p(x1)  =  x1
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
proper(x1)  =  x1
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
active1 > if3 > mark1 > ADD2
active1 > zero1 > mark1 > ADD2
active1 > zero1 > true
active1 > zero1 > false
active1 > prod2 > mark1 > ADD2
active1 > prod2 > 0 > true
active1 > add2 > mark1 > ADD2

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(9) Obligation:

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

ADD(ok(X1), ok(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(10) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ADD(ok(X1), ok(X2)) → ADD(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ADD(x1, x2)  =  ADD(x1)
ok(x1)  =  ok(x1)
active(x1)  =  active(x1)
fact(x1)  =  x1
mark(x1)  =  x1
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  x1
s(x1)  =  x1
0  =  0
prod(x1, x2)  =  x2
p(x1)  =  p(x1)
add(x1, x2)  =  x2
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
proper1 > if3 > ok1 > ADD1 > 0
proper1 > p1 > ok1 > ADD1 > 0
proper1 > true > 0
proper1 > false > 0
top > active1 > if3 > ok1 > ADD1 > 0
top > active1 > p1 > ok1 > ADD1 > 0
top > active1 > true > 0
top > active1 > false > 0

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(11) Obligation:

Q DP problem:
P is empty.
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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(12) PisEmptyProof (EQUIVALENT transformation)

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

(13) TRUE

(14) Obligation:

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

P(ok(X)) → P(X)
P(mark(X)) → P(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(15) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


P(mark(X)) → P(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
P(x1)  =  P(x1)
ok(x1)  =  x1
mark(x1)  =  mark(x1)
active(x1)  =  active(x1)
fact(x1)  =  fact(x1)
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  zero(x1)
s(x1)  =  x1
0  =  0
prod(x1, x2)  =  prod(x1, x2)
p(x1)  =  x1
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
P1 > mark1
top > active1 > fact1 > 0 > true > mark1
top > active1 > fact1 > prod2 > mark1
top > active1 > if3 > mark1
top > active1 > zero1 > true > mark1
top > active1 > add2 > mark1
top > active1 > false > mark1
top > proper1 > fact1 > 0 > true > mark1
top > proper1 > fact1 > prod2 > mark1
top > proper1 > if3 > mark1
top > proper1 > zero1 > true > mark1
top > proper1 > add2 > mark1

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(16) Obligation:

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

P(ok(X)) → P(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(17) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


P(ok(X)) → P(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
P(x1)  =  x1
ok(x1)  =  ok(x1)
active(x1)  =  active(x1)
fact(x1)  =  x1
mark(x1)  =  x1
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  x1
s(x1)  =  x1
0  =  0
prod(x1, x2)  =  x1
p(x1)  =  x1
add(x1, x2)  =  x2
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
top > active1 > if3 > ok1 > false
top > active1 > 0 > ok1 > false
top > active1 > 0 > true > false
top > proper1 > if3 > ok1 > false
top > proper1 > 0 > ok1 > false
top > proper1 > 0 > true > false

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(18) Obligation:

Q DP problem:
P is empty.
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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(19) PisEmptyProof (EQUIVALENT transformation)

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

(20) TRUE

(21) Obligation:

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(ok(X1), ok(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(22) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PROD(mark(X1), X2) → PROD(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
PROD(x1, x2)  =  PROD(x1)
mark(x1)  =  mark(x1)
ok(x1)  =  x1
active(x1)  =  active(x1)
fact(x1)  =  x1
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  x1
s(x1)  =  x1
0  =  0
prod(x1, x2)  =  prod(x1, x2)
p(x1)  =  x1
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
proper(x1)  =  x1
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
top > active1 > if3 > mark1 > PROD1
top > active1 > prod2 > mark1 > PROD1
top > active1 > prod2 > 0 > PROD1
top > active1 > add2 > mark1 > PROD1
top > active1 > true > mark1 > PROD1
top > active1 > false > PROD1

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(23) Obligation:

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

PROD(X1, mark(X2)) → PROD(X1, X2)
PROD(ok(X1), ok(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(24) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PROD(X1, mark(X2)) → PROD(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
PROD(x1, x2)  =  PROD(x1, x2)
mark(x1)  =  mark(x1)
ok(x1)  =  x1
active(x1)  =  active(x1)
fact(x1)  =  x1
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  zero(x1)
s(x1)  =  x1
0  =  0
prod(x1, x2)  =  prod(x1, x2)
p(x1)  =  x1
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
proper(x1)  =  x1
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
active1 > if3 > mark1 > PROD2
active1 > zero1 > mark1 > PROD2
active1 > zero1 > true
active1 > zero1 > false
active1 > prod2 > mark1 > PROD2
active1 > prod2 > 0 > true
active1 > add2 > mark1 > PROD2

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(25) Obligation:

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

PROD(ok(X1), ok(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(26) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PROD(ok(X1), ok(X2)) → PROD(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
PROD(x1, x2)  =  PROD(x1)
ok(x1)  =  ok(x1)
active(x1)  =  active(x1)
fact(x1)  =  x1
mark(x1)  =  x1
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  x1
s(x1)  =  x1
0  =  0
prod(x1, x2)  =  x2
p(x1)  =  p(x1)
add(x1, x2)  =  x2
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
proper1 > if3 > ok1 > PROD1 > 0
proper1 > p1 > ok1 > PROD1 > 0
proper1 > true > 0
proper1 > false > 0
top > active1 > if3 > ok1 > PROD1 > 0
top > active1 > p1 > ok1 > PROD1 > 0
top > active1 > true > 0
top > active1 > false > 0

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(27) Obligation:

Q DP problem:
P is empty.
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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(28) PisEmptyProof (EQUIVALENT transformation)

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

(29) TRUE

(30) Obligation:

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

S(ok(X)) → S(X)
S(mark(X)) → S(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(31) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


S(mark(X)) → S(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
S(x1)  =  S(x1)
ok(x1)  =  x1
mark(x1)  =  mark(x1)
active(x1)  =  active(x1)
fact(x1)  =  fact(x1)
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  zero(x1)
s(x1)  =  x1
0  =  0
prod(x1, x2)  =  prod(x1, x2)
p(x1)  =  x1
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
S1 > mark1
top > active1 > fact1 > 0 > true > mark1
top > active1 > fact1 > prod2 > mark1
top > active1 > if3 > mark1
top > active1 > zero1 > true > mark1
top > active1 > add2 > mark1
top > active1 > false > mark1
top > proper1 > fact1 > 0 > true > mark1
top > proper1 > fact1 > prod2 > mark1
top > proper1 > if3 > mark1
top > proper1 > zero1 > true > mark1
top > proper1 > add2 > mark1

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(32) Obligation:

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

S(ok(X)) → S(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(33) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


S(ok(X)) → S(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
S(x1)  =  x1
ok(x1)  =  ok(x1)
active(x1)  =  active(x1)
fact(x1)  =  x1
mark(x1)  =  x1
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  x1
s(x1)  =  x1
0  =  0
prod(x1, x2)  =  x1
p(x1)  =  x1
add(x1, x2)  =  x2
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
top > active1 > if3 > ok1 > false
top > active1 > 0 > ok1 > false
top > active1 > 0 > true > false
top > proper1 > if3 > ok1 > false
top > proper1 > 0 > ok1 > false
top > proper1 > 0 > true > false

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(34) Obligation:

Q DP problem:
P is empty.
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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(35) PisEmptyProof (EQUIVALENT transformation)

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

(36) TRUE

(37) Obligation:

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

ZERO(ok(X)) → ZERO(X)
ZERO(mark(X)) → ZERO(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(38) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ZERO(mark(X)) → ZERO(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ZERO(x1)  =  ZERO(x1)
ok(x1)  =  x1
mark(x1)  =  mark(x1)
active(x1)  =  active(x1)
fact(x1)  =  fact(x1)
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  zero(x1)
s(x1)  =  x1
0  =  0
prod(x1, x2)  =  prod(x1, x2)
p(x1)  =  x1
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
ZERO1 > mark1
top > active1 > fact1 > 0 > true > mark1
top > active1 > fact1 > prod2 > mark1
top > active1 > if3 > mark1
top > active1 > zero1 > true > mark1
top > active1 > add2 > mark1
top > active1 > false > mark1
top > proper1 > fact1 > 0 > true > mark1
top > proper1 > fact1 > prod2 > mark1
top > proper1 > if3 > mark1
top > proper1 > zero1 > true > mark1
top > proper1 > add2 > mark1

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(39) Obligation:

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

ZERO(ok(X)) → ZERO(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(40) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ZERO(ok(X)) → ZERO(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ZERO(x1)  =  x1
ok(x1)  =  ok(x1)
active(x1)  =  active(x1)
fact(x1)  =  x1
mark(x1)  =  x1
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  x1
s(x1)  =  x1
0  =  0
prod(x1, x2)  =  x1
p(x1)  =  x1
add(x1, x2)  =  x2
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
top > active1 > if3 > ok1 > false
top > active1 > 0 > ok1 > false
top > active1 > 0 > true > false
top > proper1 > if3 > ok1 > false
top > proper1 > 0 > ok1 > false
top > proper1 > 0 > true > false

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(41) Obligation:

Q DP problem:
P is empty.
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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(42) PisEmptyProof (EQUIVALENT transformation)

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

(43) TRUE

(44) Obligation:

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

IF(ok(X1), ok(X2), ok(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(45) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IF(mark(X1), X2, X3) → IF(X1, X2, X3)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
IF(x1, x2, x3)  =  IF(x1)
ok(x1)  =  x1
mark(x1)  =  mark(x1)
active(x1)  =  active(x1)
fact(x1)  =  fact(x1)
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  x1
s(x1)  =  s(x1)
0  =  0
prod(x1, x2)  =  prod(x1, x2)
p(x1)  =  x1
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
proper(x1)  =  x1
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
active1 > fact1 > prod2 > mark1 > top > IF1
active1 > fact1 > prod2 > 0 > true > IF1
active1 > if3 > mark1 > top > IF1
active1 > s1 > prod2 > mark1 > top > IF1
active1 > s1 > prod2 > 0 > true > IF1
active1 > s1 > add2 > mark1 > top > IF1
active1 > s1 > false > IF1

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(46) Obligation:

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

IF(ok(X1), ok(X2), ok(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(47) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IF(ok(X1), ok(X2), ok(X3)) → IF(X1, X2, X3)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
IF(x1, x2, x3)  =  IF(x2)
ok(x1)  =  ok(x1)
active(x1)  =  x1
fact(x1)  =  x1
mark(x1)  =  mark
if(x1, x2, x3)  =  x1
zero(x1)  =  x1
s(x1)  =  s(x1)
0  =  0
prod(x1, x2)  =  x1
p(x1)  =  x1
add(x1, x2)  =  x2
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
proper1 > s1 > ok1 > IF1 > mark
proper1 > s1 > false > mark
proper1 > 0 > mark
proper1 > true > mark
top > mark

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(48) Obligation:

Q DP problem:
P is empty.
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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(49) PisEmptyProof (EQUIVALENT transformation)

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

(50) TRUE

(51) Obligation:

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

FACT(ok(X)) → FACT(X)
FACT(mark(X)) → FACT(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(52) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


FACT(mark(X)) → FACT(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
FACT(x1)  =  FACT(x1)
ok(x1)  =  x1
mark(x1)  =  mark(x1)
active(x1)  =  active(x1)
fact(x1)  =  fact(x1)
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  zero(x1)
s(x1)  =  x1
0  =  0
prod(x1, x2)  =  prod(x1, x2)
p(x1)  =  x1
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
FACT1 > mark1
top > active1 > fact1 > 0 > true > mark1
top > active1 > fact1 > prod2 > mark1
top > active1 > if3 > mark1
top > active1 > zero1 > true > mark1
top > active1 > add2 > mark1
top > active1 > false > mark1
top > proper1 > fact1 > 0 > true > mark1
top > proper1 > fact1 > prod2 > mark1
top > proper1 > if3 > mark1
top > proper1 > zero1 > true > mark1
top > proper1 > add2 > mark1

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(53) Obligation:

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

FACT(ok(X)) → FACT(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(54) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


FACT(ok(X)) → FACT(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
FACT(x1)  =  x1
ok(x1)  =  ok(x1)
active(x1)  =  active(x1)
fact(x1)  =  x1
mark(x1)  =  x1
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  x1
s(x1)  =  x1
0  =  0
prod(x1, x2)  =  x1
p(x1)  =  x1
add(x1, x2)  =  x2
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
top > active1 > if3 > ok1 > false
top > active1 > 0 > ok1 > false
top > active1 > 0 > true > false
top > proper1 > if3 > ok1 > false
top > proper1 > 0 > ok1 > false
top > proper1 > 0 > true > false

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(55) Obligation:

Q DP problem:
P is empty.
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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(56) PisEmptyProof (EQUIVALENT transformation)

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

(57) TRUE

(58) Obligation:

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

PROPER(if(X1, X2, X3)) → PROPER(X1)
PROPER(fact(X)) → PROPER(X)
PROPER(if(X1, X2, X3)) → PROPER(X2)
PROPER(if(X1, X2, X3)) → PROPER(X3)
PROPER(zero(X)) → PROPER(X)
PROPER(s(X)) → PROPER(X)
PROPER(prod(X1, X2)) → PROPER(X1)
PROPER(prod(X1, X2)) → PROPER(X2)
PROPER(p(X)) → PROPER(X)
PROPER(add(X1, X2)) → PROPER(X1)
PROPER(add(X1, X2)) → PROPER(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(59) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PROPER(if(X1, X2, X3)) → PROPER(X1)
PROPER(if(X1, X2, X3)) → PROPER(X2)
PROPER(if(X1, X2, X3)) → PROPER(X3)
PROPER(prod(X1, X2)) → PROPER(X1)
PROPER(prod(X1, X2)) → PROPER(X2)
PROPER(add(X1, X2)) → PROPER(X1)
PROPER(add(X1, X2)) → PROPER(X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
PROPER(x1)  =  x1
if(x1, x2, x3)  =  if(x1, x2, x3)
fact(x1)  =  x1
zero(x1)  =  x1
s(x1)  =  x1
prod(x1, x2)  =  prod(x1, x2)
p(x1)  =  x1
add(x1, x2)  =  add(x1, x2)
active(x1)  =  active(x1)
mark(x1)  =  mark
0  =  0
true  =  true
false  =  false
proper(x1)  =  x1
ok(x1)  =  x1
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
0 > mark
0 > true
false > mark
top > active1 > if3 > mark
top > active1 > prod2 > mark
top > active1 > add2 > mark
top > active1 > true

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(60) Obligation:

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

PROPER(fact(X)) → PROPER(X)
PROPER(zero(X)) → PROPER(X)
PROPER(s(X)) → PROPER(X)
PROPER(p(X)) → PROPER(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(61) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PROPER(s(X)) → PROPER(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
PROPER(x1)  =  PROPER(x1)
fact(x1)  =  x1
zero(x1)  =  x1
s(x1)  =  s(x1)
p(x1)  =  x1
active(x1)  =  active(x1)
mark(x1)  =  x1
if(x1, x2, x3)  =  if(x2, x3)
0  =  0
prod(x1, x2)  =  prod
add(x1, x2)  =  x2
true  =  true
false  =  false
proper(x1)  =  x1
ok(x1)  =  x1
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
top > active1 > s1 > PROPER1
top > active1 > if2 > PROPER1
top > active1 > prod > 0 > true > PROPER1
top > active1 > false > PROPER1

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(62) Obligation:

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

PROPER(fact(X)) → PROPER(X)
PROPER(zero(X)) → PROPER(X)
PROPER(p(X)) → PROPER(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(63) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PROPER(fact(X)) → PROPER(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
PROPER(x1)  =  PROPER(x1)
fact(x1)  =  fact(x1)
zero(x1)  =  x1
p(x1)  =  x1
active(x1)  =  active(x1)
mark(x1)  =  x1
if(x1, x2, x3)  =  if(x1, x2, x3)
s(x1)  =  s(x1)
0  =  0
prod(x1, x2)  =  prod(x2)
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
proper(x1)  =  proper(x1)
ok(x1)  =  ok
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
PROPER1 > 0
active1 > fact1 > if3 > ok > s1 > false > 0
active1 > prod1 > add2 > s1 > false > 0
active1 > prod1 > ok > s1 > false > 0
active1 > true > 0
proper1 > fact1 > if3 > ok > s1 > false > 0
proper1 > prod1 > add2 > s1 > false > 0
proper1 > prod1 > ok > s1 > false > 0
proper1 > true > 0
top > 0

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(64) Obligation:

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

PROPER(zero(X)) → PROPER(X)
PROPER(p(X)) → PROPER(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(65) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PROPER(zero(X)) → PROPER(X)
PROPER(p(X)) → PROPER(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
PROPER(x1)  =  PROPER(x1)
zero(x1)  =  zero(x1)
p(x1)  =  p(x1)
active(x1)  =  x1
fact(x1)  =  fact
mark(x1)  =  mark
if(x1, x2, x3)  =  if(x3)
s(x1)  =  s(x1)
0  =  0
prod(x1, x2)  =  prod(x1, x2)
add(x1, x2)  =  add(x2)
true  =  true
false  =  false
proper(x1)  =  x1
ok(x1)  =  x1
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
p1 > mark > zero1 > true
fact > s1 > prod2
fact > s1 > false > mark > zero1 > true
if1 > mark > zero1 > true
0 > mark > zero1 > true
add1 > s1 > prod2
add1 > s1 > false > mark > zero1 > true

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(66) Obligation:

Q DP problem:
P is empty.
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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(67) PisEmptyProof (EQUIVALENT transformation)

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

(68) TRUE

(69) Obligation:

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

ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(fact(X)) → ACTIVE(X)
ACTIVE(zero(X)) → ACTIVE(X)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(prod(X1, X2)) → ACTIVE(X1)
ACTIVE(prod(X1, X2)) → ACTIVE(X2)
ACTIVE(p(X)) → ACTIVE(X)
ACTIVE(add(X1, X2)) → ACTIVE(X1)
ACTIVE(add(X1, X2)) → ACTIVE(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(70) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ACTIVE(prod(X1, X2)) → ACTIVE(X1)
ACTIVE(prod(X1, X2)) → ACTIVE(X2)
ACTIVE(add(X1, X2)) → ACTIVE(X1)
ACTIVE(add(X1, X2)) → ACTIVE(X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ACTIVE(x1)  =  ACTIVE(x1)
if(x1, x2, x3)  =  x1
fact(x1)  =  x1
zero(x1)  =  x1
s(x1)  =  x1
prod(x1, x2)  =  prod(x1, x2)
p(x1)  =  x1
add(x1, x2)  =  add(x1, x2)
active(x1)  =  active(x1)
mark(x1)  =  mark
0  =  0
true  =  true
false  =  false
proper(x1)  =  proper(x1)
ok(x1)  =  ok(x1)
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
true > ok1 > mark
false > ok1 > mark
proper1 > prod2 > ACTIVE1 > mark
proper1 > prod2 > 0 > mark
proper1 > prod2 > ok1 > mark
proper1 > add2 > ACTIVE1 > mark
proper1 > add2 > ok1 > mark
top > active1 > prod2 > ACTIVE1 > mark
top > active1 > prod2 > 0 > mark
top > active1 > prod2 > ok1 > mark
top > active1 > add2 > ACTIVE1 > mark
top > active1 > add2 > ok1 > mark

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(71) Obligation:

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

ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(fact(X)) → ACTIVE(X)
ACTIVE(zero(X)) → ACTIVE(X)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(p(X)) → ACTIVE(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(72) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(fact(X)) → ACTIVE(X)
ACTIVE(zero(X)) → ACTIVE(X)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(p(X)) → ACTIVE(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ACTIVE(x1)  =  ACTIVE(x1)
if(x1, x2, x3)  =  if(x1, x2)
fact(x1)  =  fact(x1)
zero(x1)  =  zero(x1)
s(x1)  =  s(x1)
p(x1)  =  p(x1)
active(x1)  =  active(x1)
mark(x1)  =  mark
0  =  0
prod(x1, x2)  =  prod(x2)
add(x1, x2)  =  add(x1)
true  =  true
false  =  false
proper(x1)  =  proper(x1)
ok(x1)  =  x1
top(x1)  =  top

Recursive Path Order [RPO].
Precedence:
true > mark
top > active1 > if2 > mark
top > active1 > fact1 > zero1
top > active1 > fact1 > prod1 > mark
top > active1 > s1 > prod1 > mark
top > active1 > s1 > add1 > mark
top > active1 > s1 > false > mark
top > active1 > p1 > mark
top > proper1 > if2 > mark
top > proper1 > fact1 > zero1
top > proper1 > fact1 > prod1 > mark
top > proper1 > s1 > prod1 > mark
top > proper1 > s1 > add1 > mark
top > proper1 > s1 > false > mark
top > proper1 > p1 > mark
top > proper1 > 0 > mark

The following usable rules [FROCOS05] were oriented:

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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(73) Obligation:

Q DP problem:
P is empty.
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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(74) PisEmptyProof (EQUIVALENT transformation)

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

(75) TRUE

(76) Obligation:

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

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

The TRS R consists of the following rules:

active(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)
active(fact(X)) → fact(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(zero(X)) → zero(active(X))
active(s(X)) → s(active(X))
active(prod(X1, X2)) → prod(active(X1), X2)
active(prod(X1, X2)) → prod(X1, active(X2))
active(p(X)) → p(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
fact(mark(X)) → mark(fact(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
zero(mark(X)) → mark(zero(X))
s(mark(X)) → mark(s(X))
prod(mark(X1), X2) → mark(prod(X1, X2))
prod(X1, mark(X2)) → mark(prod(X1, X2))
p(mark(X)) → mark(p(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(fact(X)) → fact(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) → zero(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(prod(X1, X2)) → prod(proper(X1), proper(X2))
proper(p(X)) → p(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
fact(ok(X)) → ok(fact(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
zero(ok(X)) → ok(zero(X))
s(ok(X)) → ok(s(X))
prod(ok(X1), ok(X2)) → ok(prod(X1, X2))
p(ok(X)) → ok(p(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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