(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(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, x2)
mark(x1)  =  x1
ok(x1)  =  ok(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)  =  x2
p(x1)  =  p(x1)
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
top > active1 > if3 > [ok1, 0]
top > active1 > zero1 > [ok1, 0]
top > active1 > p1 > [ok1, 0]
top > active1 > add2 > [ok1, 0]
top > active1 > true > [ok1, 0]
top > active1 > false > [ok1, 0]
top > proper1 > if3 > [ok1, 0]
top > proper1 > zero1 > [ok1, 0]
top > proper1 > p1 > [ok1, 0]
top > proper1 > add2 > [ok1, 0]
top > proper1 > true > [ok1, 0]
top > proper1 > false > [ok1, 0]

Status:
zero1: [1]
true: []
ok1: [1]
p1: [1]
0: []
active1: [1]
add2: [2,1]
if3: [3,1,2]
false: []
proper1: [1]
top: []
ADD2: [2,1]


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(mark(X1), X2) → ADD(X1, X2)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
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)  =  x2
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)  =  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
ok(x1)  =  ok
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
top > [active1, fact1, true, false] > [0, prod2, ok] > if3 > mark1
top > [active1, fact1, true, false] > [0, prod2, ok] > add2 > mark1

Status:
prod2: [2,1]
active1: [1]
add2: [2,1]
if3: [2,1,3]
true: []
mark1: [1]
false: []
ok: []
fact1: [1]
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))

(9) Obligation:

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

ADD(mark(X1), X2) → ADD(X1, X2)

The TRS R consists of the following rules:

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

Lexicographic path order with status [LPO].
Quasi-Precedence:
ADD1 > ok
[active1, true] > [false, proper1] > if3 > mark1 > ok
[active1, true] > [false, proper1] > 0 > mark1 > ok
[active1, true] > [false, proper1] > prod2 > mark1 > ok
[active1, true] > [false, proper1] > add2 > mark1 > ok
top > ok

Status:
true: []
mark1: [1]
ADD1: [1]
0: []
prod2: [2,1]
active1: [1]
add2: [2,1]
if3: [3,2,1]
false: []
ok: []
proper1: [1]
top: []


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(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)  =  P(x1)
ok(x1)  =  ok(x1)
mark(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)  =  p(x1)
add(x1, x2)  =  x2
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
P1 > [ok1, zero1]
proper1 > [active1, false] > if3 > [ok1, zero1]
proper1 > [active1, false] > 0 > true > [ok1, zero1]
proper1 > [active1, false] > prod2 > [ok1, zero1]
proper1 > [active1, false] > p1 > [ok1, zero1]
top > [ok1, zero1]

Status:
zero1: [1]
true: []
ok1: [1]
p1: [1]
0: []
prod2: [1,2]
active1: [1]
P1: [1]
if3: [2,3,1]
false: []
proper1: [1]
top: []


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(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.

(17) 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)
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
ok(x1)  =  x1
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
[active1, if3, false] > fact1 > mark1
[active1, if3, false] > fact1 > 0
[active1, if3, false] > s1 > add2 > mark1
[active1, if3, false] > prod2 > 0
[active1, if3, false] > prod2 > add2 > mark1
[active1, if3, false] > true > mark1

Status:
true: []
mark1: [1]
0: []
prod2: [2,1]
active1: [1]
add2: [1,2]
P1: [1]
if3: [1,3,2]
false: []
s1: [1]
fact1: [1]
top: []


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(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, x2)
mark(x1)  =  x1
ok(x1)  =  ok(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)  =  x2
p(x1)  =  p(x1)
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
top > active1 > if3 > [ok1, 0]
top > active1 > zero1 > [ok1, 0]
top > active1 > p1 > [ok1, 0]
top > active1 > add2 > [ok1, 0]
top > active1 > true > [ok1, 0]
top > active1 > false > [ok1, 0]
top > proper1 > if3 > [ok1, 0]
top > proper1 > zero1 > [ok1, 0]
top > proper1 > p1 > [ok1, 0]
top > proper1 > add2 > [ok1, 0]
top > proper1 > true > [ok1, 0]
top > proper1 > false > [ok1, 0]

Status:
zero1: [1]
true: []
ok1: [1]
p1: [1]
0: []
active1: [1]
add2: [2,1]
if3: [3,1,2]
false: []
PROD2: [2,1]
proper1: [1]
top: []


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(mark(X1), X2) → PROD(X1, X2)

The TRS R consists of the following rules:

active(fact(X)) → mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(prod(0, X)) → mark(0)
active(prod(s(X), Y)) → mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(zero(0)) → mark(true)
active(zero(s(X))) → mark(false)
active(p(s(X))) → mark(X)
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)  =  x2
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)  =  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
ok(x1)  =  ok
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
top > [active1, fact1, true, false] > [0, prod2, ok] > if3 > mark1
top > [active1, fact1, true, false] > [0, prod2, ok] > add2 > mark1

Status:
prod2: [2,1]
active1: [1]
add2: [2,1]
if3: [2,1,3]
true: []
mark1: [1]
false: []
ok: []
fact1: [1]
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))

(25) Obligation:

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

PROD(mark(X1), X2) → PROD(X1, X2)

The TRS R consists of the following rules:

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

Lexicographic path order with status [LPO].
Quasi-Precedence:
PROD1 > ok
[active1, true] > [false, proper1] > if3 > mark1 > ok
[active1, true] > [false, proper1] > 0 > mark1 > ok
[active1, true] > [false, proper1] > prod2 > mark1 > ok
[active1, true] > [false, proper1] > add2 > mark1 > ok
top > ok

Status:
true: []
mark1: [1]
0: []
prod2: [2,1]
active1: [1]
add2: [2,1]
if3: [3,2,1]
PROD1: [1]
false: []
ok: []
proper1: [1]
top: []


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(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)  =  S(x1)
ok(x1)  =  ok(x1)
mark(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)  =  p(x1)
add(x1, x2)  =  x2
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
S1 > [ok1, zero1]
proper1 > [active1, false] > if3 > [ok1, zero1]
proper1 > [active1, false] > 0 > true > [ok1, zero1]
proper1 > [active1, false] > prod2 > [ok1, zero1]
proper1 > [active1, false] > p1 > [ok1, zero1]
top > [ok1, zero1]

Status:
zero1: [1]
true: []
ok1: [1]
p1: [1]
0: []
prod2: [1,2]
active1: [1]
if3: [2,3,1]
false: []
proper1: [1]
top: []
S1: [1]


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(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.

(33) 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)
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
ok(x1)  =  x1
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
[active1, if3, false] > fact1 > mark1
[active1, if3, false] > fact1 > 0
[active1, if3, false] > s1 > add2 > mark1
[active1, if3, false] > prod2 > 0
[active1, if3, false] > prod2 > add2 > mark1
[active1, if3, false] > true > mark1

Status:
true: []
mark1: [1]
0: []
prod2: [2,1]
active1: [1]
add2: [1,2]
if3: [1,3,2]
false: []
s1: [1]
fact1: [1]
top: []
S1: [1]


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(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)  =  ZERO(x1)
ok(x1)  =  ok(x1)
mark(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)  =  p(x1)
add(x1, x2)  =  x2
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
ZERO1 > [ok1, zero1]
proper1 > [active1, false] > if3 > [ok1, zero1]
proper1 > [active1, false] > 0 > true > [ok1, zero1]
proper1 > [active1, false] > prod2 > [ok1, zero1]
proper1 > [active1, false] > p1 > [ok1, zero1]
top > [ok1, zero1]

Status:
zero1: [1]
true: []
ok1: [1]
p1: [1]
0: []
prod2: [1,2]
active1: [1]
if3: [2,3,1]
ZERO1: [1]
false: []
proper1: [1]
top: []


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(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.

(40) 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)
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
ok(x1)  =  x1
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
[active1, if3, false] > fact1 > mark1
[active1, if3, false] > fact1 > 0
[active1, if3, false] > s1 > add2 > mark1
[active1, if3, false] > prod2 > 0
[active1, if3, false] > prod2 > add2 > mark1
[active1, if3, false] > true > mark1

Status:
true: []
mark1: [1]
0: []
prod2: [2,1]
active1: [1]
add2: [1,2]
if3: [1,3,2]
ZERO1: [1]
false: []
s1: [1]
fact1: [1]
top: []


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(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)  =  x1
ok(x1)  =  ok(x1)
mark(x1)  =  x1
active(x1)  =  active(x1)
fact(x1)  =  fact(x1)
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  zero(x1)
s(x1)  =  s(x1)
0  =  0
prod(x1, x2)  =  prod(x2)
p(x1)  =  p(x1)
add(x1, x2)  =  x2
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
proper1 > [active1, zero1, s1, true] > if3 > [ok1, fact1, 0, prod1]
proper1 > [active1, zero1, s1, true] > p1 > [ok1, fact1, 0, prod1]
proper1 > [active1, zero1, s1, true] > false

Status:
zero1: [1]
true: []
prod1: [1]
ok1: [1]
p1: [1]
0: []
active1: [1]
if3: [1,2,3]
false: []
s1: [1]
proper1: [1]
fact1: [1]
top: []


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(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.

(47) 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)  =  x1
mark(x1)  =  mark(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)  =  proper(x1)
ok(x1)  =  ok(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
[active1, true, proper1] > if3 > [mark1, zero1] > [0, ok1]
[active1, true, proper1] > if3 > [mark1, zero1] > false
[active1, true, proper1] > prod2 > [mark1, zero1] > [0, ok1]
[active1, true, proper1] > prod2 > [mark1, zero1] > false
[active1, true, proper1] > add2 > [mark1, zero1] > [0, ok1]
[active1, true, proper1] > add2 > [mark1, zero1] > false

Status:
zero1: [1]
true: []
mark1: [1]
ok1: [1]
0: []
prod2: [1,2]
active1: [1]
add2: [2,1]
if3: [1,2,3]
false: []
proper1: [1]
top: []


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(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)  =  FACT(x1)
ok(x1)  =  ok(x1)
mark(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)  =  p(x1)
add(x1, x2)  =  x2
true  =  true
false  =  false
proper(x1)  =  proper(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
FACT1 > [ok1, zero1]
proper1 > [active1, false] > if3 > [ok1, zero1]
proper1 > [active1, false] > 0 > true > [ok1, zero1]
proper1 > [active1, false] > prod2 > [ok1, zero1]
proper1 > [active1, false] > p1 > [ok1, zero1]
top > [ok1, zero1]

Status:
zero1: [1]
true: []
ok1: [1]
p1: [1]
0: []
prod2: [1,2]
active1: [1]
FACT1: [1]
if3: [2,3,1]
false: []
proper1: [1]
top: []


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(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.

(54) 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)
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
ok(x1)  =  x1
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
[active1, if3, false] > fact1 > mark1
[active1, if3, false] > fact1 > 0
[active1, if3, false] > s1 > add2 > mark1
[active1, if3, false] > prod2 > 0
[active1, if3, false] > prod2 > add2 > mark1
[active1, if3, false] > true > mark1

Status:
true: []
mark1: [1]
0: []
prod2: [2,1]
active1: [1]
add2: [1,2]
FACT1: [1]
if3: [1,3,2]
false: []
s1: [1]
fact1: [1]
top: []


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
PROPER1 > mark
[if3, add2, proper1] > prod2 > [zero1, ok] > false > mark
[if3, add2, proper1] > prod2 > 0 > mark
[if3, add2, proper1] > true > [zero1, ok] > false > mark
top > mark

Status:
zero1: [1]
PROPER1: [1]
true: []
0: []
prod2: [2,1]
add2: [2,1]
if3: [3,1,2]
mark: []
false: []
ok: []
proper1: [1]
top: []


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(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(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)
fact(x1)  =  x1
s(x1)  =  x1
p(x1)  =  p(x1)
active(x1)  =  active(x1)
mark(x1)  =  x1
if(x1, x2, x3)  =  if(x2, x3)
zero(x1)  =  zero
0  =  0
prod(x1, x2)  =  prod
add(x1, x2)  =  add(x2)
true  =  true
false  =  false
proper(x1)  =  proper(x1)
ok(x1)  =  x1
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
PROPER1 > [if2, prod]
[zero, false] > proper1 > [p1, active1, add1] > 0 > true > [if2, prod]
top > [if2, prod]

Status:
add1: [1]
PROPER1: [1]
if2: [2,1]
true: []
p1: [1]
0: []
active1: [1]
zero: []
prod: []
false: []
proper1: [1]
top: []


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(s(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(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
s(x1)  =  s(x1)
active(x1)  =  active(x1)
mark(x1)  =  x1
if(x1, x2, x3)  =  if(x2, x3)
zero(x1)  =  zero
0  =  0
prod(x1, x2)  =  prod
p(x1)  =  x1
add(x1, x2)  =  x2
true  =  true
false  =  false
proper(x1)  =  proper(x1)
ok(x1)  =  x1
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
PROPER1 > [s1, if2, proper1]
[active1, 0, true, false] > zero > [s1, if2, proper1]
[active1, 0, true, false] > prod > [s1, if2, proper1]
top > [s1, if2, proper1]

Status:
PROPER1: [1]
active1: [1]
if2: [1,2]
zero: []
prod: []
true: []
false: []
s1: [1]
proper1: [1]
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(fact(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(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)
active(x1)  =  x1
mark(x1)  =  mark
if(x1, x2, x3)  =  if(x1, x2, x3)
zero(x1)  =  x1
s(x1)  =  s
0  =  0
prod(x1, x2)  =  x1
p(x1)  =  p
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
proper(x1)  =  proper(x1)
ok(x1)  =  ok
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
PROPER1 > [mark, s, 0, true, false, ok]
p > proper1 > fact1 > [mark, s, 0, true, false, ok]
p > proper1 > if3 > [mark, s, 0, true, false, ok]
p > proper1 > add2 > [mark, s, 0, true, false, ok]
top > [mark, s, 0, true, false, ok]

Status:
PROPER1: [1]
true: []
s: []
0: []
add2: [2,1]
if3: [1,2,3]
p: []
mark: []
false: []
ok: []
proper1: [1]
fact1: [1]
top: []


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
ACTIVE1 > mark1
[active1, 0] > false > [fact1, s1, prod2, proper1, ok] > if3 > mark1
[active1, 0] > false > [fact1, s1, prod2, proper1, ok] > add2 > mark1
[active1, 0] > false > [fact1, s1, prod2, proper1, ok] > true > mark1
top > [fact1, s1, prod2, proper1, ok] > if3 > mark1
top > [fact1, s1, prod2, proper1, ok] > add2 > mark1
top > [fact1, s1, prod2, proper1, ok] > true > mark1

Status:
true: []
mark1: [1]
0: []
ACTIVE1: [1]
prod2: [2,1]
active1: [1]
add2: [2,1]
if3: [2,3,1]
false: []
ok: []
s1: [1]
proper1: [1]
fact1: [1]
top: []


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(zero(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(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)
zero(x1)  =  x1
p(x1)  =  p(x1)
active(x1)  =  active(x1)
fact(x1)  =  x1
mark(x1)  =  x1
if(x1, x2, x3)  =  if(x1, x2, x3)
s(x1)  =  s(x1)
0  =  0
prod(x1, x2)  =  prod(x1, x2)
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
proper(x1)  =  proper(x1)
ok(x1)  =  ok(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
proper1 > [active1, add2, true, false] > if3 > [p1, s1, ok1]
proper1 > [active1, add2, true, false] > [0, prod2] > [p1, s1, ok1]

Status:
true: []
ok1: [1]
p1: [1]
0: []
ACTIVE1: [1]
prod2: [2,1]
add2: [2,1]
active1: [1]
if3: [3,1,2]
false: []
s1: [1]
proper1: [1]
top: []


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:
The TRS P consists of the following rules:

ACTIVE(zero(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.

(74) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ACTIVE(zero(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)
zero(x1)  =  zero(x1)
active(x1)  =  x1
fact(x1)  =  fact
mark(x1)  =  mark
if(x1, x2, x3)  =  if
s(x1)  =  s
0  =  0
prod(x1, x2)  =  prod(x1, x2)
p(x1)  =  x1
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
proper(x1)  =  x1
ok(x1)  =  x1
top(x1)  =  top

Lexicographic path order with status [LPO].
Quasi-Precedence:
zero1 > ACTIVE1
zero1 > [fact, mark, if, s, 0] > prod2
zero1 > [fact, mark, if, s, 0] > false
zero1 > [fact, mark, if, s, 0] > top
add2 > [fact, mark, if, s, 0] > prod2
add2 > [fact, mark, if, s, 0] > false
add2 > [fact, mark, if, s, 0] > top
true > [fact, mark, if, s, 0] > prod2
true > [fact, mark, if, s, 0] > false
true > [fact, mark, if, s, 0] > top

Status:
zero1: [1]
if: []
true: []
fact: []
s: []
0: []
ACTIVE1: [1]
prod2: [2,1]
add2: [1,2]
mark: []
false: []
top: []


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))

(75) 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.

(76) PisEmptyProof (EQUIVALENT transformation)

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

(77) TRUE

(78) 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.