(0) Obligation:

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

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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(leq(s(X), s(Y))) → LEQ(X, Y)
ACTIVE(diff(X, Y)) → IF(leq(X, Y), 0, s(diff(p(X), Y)))
ACTIVE(diff(X, Y)) → LEQ(X, Y)
ACTIVE(diff(X, Y)) → S(diff(p(X), Y))
ACTIVE(diff(X, Y)) → DIFF(p(X), Y)
ACTIVE(diff(X, Y)) → P(X)
ACTIVE(p(X)) → P(active(X))
ACTIVE(p(X)) → ACTIVE(X)
ACTIVE(s(X)) → S(active(X))
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(leq(X1, X2)) → LEQ(active(X1), X2)
ACTIVE(leq(X1, X2)) → ACTIVE(X1)
ACTIVE(leq(X1, X2)) → LEQ(X1, active(X2))
ACTIVE(leq(X1, X2)) → ACTIVE(X2)
ACTIVE(if(X1, X2, X3)) → IF(active(X1), X2, X3)
ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(diff(X1, X2)) → DIFF(active(X1), X2)
ACTIVE(diff(X1, X2)) → ACTIVE(X1)
ACTIVE(diff(X1, X2)) → DIFF(X1, active(X2))
ACTIVE(diff(X1, X2)) → ACTIVE(X2)
P(mark(X)) → P(X)
S(mark(X)) → S(X)
LEQ(mark(X1), X2) → LEQ(X1, X2)
LEQ(X1, mark(X2)) → LEQ(X1, X2)
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
DIFF(mark(X1), X2) → DIFF(X1, X2)
DIFF(X1, mark(X2)) → DIFF(X1, X2)
PROPER(p(X)) → P(proper(X))
PROPER(p(X)) → PROPER(X)
PROPER(s(X)) → S(proper(X))
PROPER(s(X)) → PROPER(X)
PROPER(leq(X1, X2)) → LEQ(proper(X1), proper(X2))
PROPER(leq(X1, X2)) → PROPER(X1)
PROPER(leq(X1, X2)) → PROPER(X2)
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(diff(X1, X2)) → DIFF(proper(X1), proper(X2))
PROPER(diff(X1, X2)) → PROPER(X1)
PROPER(diff(X1, X2)) → PROPER(X2)
P(ok(X)) → P(X)
S(ok(X)) → S(X)
LEQ(ok(X1), ok(X2)) → LEQ(X1, X2)
IF(ok(X1), ok(X2), ok(X3)) → IF(X1, X2, X3)
DIFF(ok(X1), ok(X2)) → DIFF(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(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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 8 SCCs with 20 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

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

DIFF(X1, mark(X2)) → DIFF(X1, X2)
DIFF(mark(X1), X2) → DIFF(X1, X2)
DIFF(ok(X1), ok(X2)) → DIFF(X1, X2)

The TRS R consists of the following rules:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.


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

Recursive path order with status [RPO].
Precedence:
DIFF1 > 0
top > active1 > p1 > ok1 > 0
top > active1 > if3 > ok1 > 0
top > active1 > diff2 > leq2 > true > ok1 > 0
top > active1 > diff2 > leq2 > false > ok1 > 0
top > proper1 > p1 > ok1 > 0
top > proper1 > if3 > ok1 > 0
top > proper1 > diff2 > leq2 > true > ok1 > 0
top > proper1 > diff2 > leq2 > false > ok1 > 0

Status:
DIFF1: [1]
ok1: multiset
active1: multiset
p1: multiset
0: multiset
leq2: multiset
true: multiset
false: multiset
if3: multiset
diff2: [2,1]
proper1: [1]
top: []

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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:

DIFF(X1, mark(X2)) → DIFF(X1, X2)
DIFF(mark(X1), X2) → DIFF(X1, X2)

The TRS R consists of the following rules:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.


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

Recursive path order with status [RPO].
Precedence:
active1 > p1 > mark1 > DIFF2 > false
active1 > p1 > 0 > false
active1 > p1 > ok > false
active1 > if3 > mark1 > DIFF2 > false
active1 > if3 > ok > false
active1 > diff2 > 0 > false
active1 > diff2 > leq2 > true > mark1 > DIFF2 > false
active1 > diff2 > leq2 > true > ok > false
proper1 > p1 > mark1 > DIFF2 > false
proper1 > p1 > 0 > false
proper1 > p1 > ok > false
proper1 > if3 > mark1 > DIFF2 > false
proper1 > if3 > ok > false
proper1 > diff2 > 0 > false
proper1 > diff2 > leq2 > true > mark1 > DIFF2 > false
proper1 > diff2 > leq2 > true > ok > false
top > false

Status:
DIFF2: multiset
mark1: [1]
active1: [1]
p1: multiset
0: multiset
leq2: [2,1]
true: multiset
false: multiset
if3: multiset
diff2: [1,2]
proper1: [1]
ok: multiset
top: multiset

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(9) Obligation:

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

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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) PisEmptyProof (EQUIVALENT transformation)

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

(11) TRUE

(12) 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(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.

(13) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Precedence:
active1 > leq2 > mark1
active1 > leq2 > true
active1 > false > mark1
active1 > if3 > mark1
active1 > diff2 > mark1
active1 > diff2 > 0 > true

Status:
IF1: multiset
mark1: multiset
active1: [1]
0: multiset
leq2: [1,2]
true: multiset
false: multiset
if3: [1,2,3]
diff2: [2,1]
top: []

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(14) Obligation:

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

IF(ok(X1), ok(X2), ok(X3)) → IF(X1, X2, X3)

The TRS R consists of the following rules:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.


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

Recursive path order with status [RPO].
Precedence:
IF1 > mark
proper > ok1 > mark
proper > 0 > mark
proper > true > mark
proper > false > mark
top > mark

Status:
IF1: multiset
ok1: [1]
0: multiset
mark: multiset
true: multiset
false: multiset
proper: multiset
top: []

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(16) Obligation:

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

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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) PisEmptyProof (EQUIVALENT transformation)

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

(18) TRUE

(19) Obligation:

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

LEQ(X1, mark(X2)) → LEQ(X1, X2)
LEQ(mark(X1), X2) → LEQ(X1, X2)
LEQ(ok(X1), ok(X2)) → LEQ(X1, X2)

The TRS R consists of the following rules:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.

(20) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Precedence:
active1 > p1 > ok1 > true
active1 > p1 > 0 > false > true
active1 > s1 > ok1 > true
active1 > s1 > false > true
active1 > if2 > ok1 > true
proper1 > p1 > ok1 > true
proper1 > p1 > 0 > false > true
proper1 > s1 > ok1 > true
proper1 > s1 > false > true
proper1 > if2 > ok1 > true
top > true

Status:
ok1: [1]
active1: [1]
p1: [1]
0: multiset
s1: [1]
true: multiset
false: multiset
if2: [1,2]
proper1: [1]
top: []

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(21) Obligation:

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

LEQ(X1, mark(X2)) → LEQ(X1, X2)
LEQ(mark(X1), X2) → LEQ(X1, X2)

The TRS R consists of the following rules:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.


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

Recursive path order with status [RPO].
Precedence:
LEQ1 > mark1
active1 > 0 > true > ok > s1 > mark1
active1 > 0 > true > ok > leq2 > false > mark1
active1 > 0 > true > ok > if3 > mark1
active1 > diff2 > ok > s1 > mark1
active1 > diff2 > ok > leq2 > false > mark1
active1 > diff2 > ok > if3 > mark1
proper1 > diff2 > ok > s1 > mark1
proper1 > diff2 > ok > leq2 > false > mark1
proper1 > diff2 > ok > if3 > mark1
top > mark1

Status:
LEQ1: multiset
mark1: multiset
active1: multiset
0: multiset
s1: multiset
leq2: [2,1]
true: multiset
false: multiset
if3: [1,2,3]
diff2: multiset
proper1: [1]
ok: multiset
top: multiset

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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:

LEQ(mark(X1), X2) → LEQ(X1, X2)

The TRS R consists of the following rules:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.


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

Recursive path order with status [RPO].
Precedence:
LEQ2 > true
proper1 > p1 > 0 > mark1 > true
proper1 > false > mark1 > true
proper1 > diff2 > 0 > mark1 > true
proper1 > diff2 > leq2 > mark1 > true
proper1 > diff2 > if3 > mark1 > true
top > active1 > p1 > 0 > mark1 > true
top > active1 > false > mark1 > true
top > active1 > diff2 > 0 > mark1 > true
top > active1 > diff2 > leq2 > mark1 > true
top > active1 > diff2 > if3 > mark1 > true

Status:
LEQ2: multiset
mark1: [1]
active1: [1]
p1: [1]
0: multiset
leq2: [2,1]
true: multiset
false: multiset
if3: multiset
diff2: [2,1]
proper1: multiset
top: []

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(25) Obligation:

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

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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) PisEmptyProof (EQUIVALENT transformation)

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

(27) TRUE

(28) 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(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.

(29) 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)
p(x1)  =  x1
0  =  0
s(x1)  =  x1
leq(x1, x2)  =  x2
true  =  true
false  =  false
if(x1, x2, x3)  =  if(x2, x3)
diff(x1, x2)  =  x1
proper(x1)  =  proper(x1)
top(x1)  =  top

Recursive path order with status [RPO].
Precedence:
S1 > ok1
active1 > 0 > ok1
active1 > true > ok1
active1 > false > ok1
active1 > if2 > ok1
proper1 > if2 > ok1
top > ok1

Status:
S1: [1]
ok1: multiset
active1: [1]
0: multiset
true: multiset
false: multiset
if2: [2,1]
proper1: [1]
top: []

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(30) 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(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(31) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive path order with status [RPO].
Precedence:
proper1 > leq2 > mark1 > S1
proper1 > leq2 > false > S1
proper1 > leq2 > ok > S1
proper1 > true > mark1 > S1
proper1 > true > ok > S1
proper1 > if3 > mark1 > S1
proper1 > if3 > ok > S1
proper1 > diff2 > mark1 > S1
proper1 > diff2 > 0 > false > S1
proper1 > diff2 > ok > S1
top > active1 > leq2 > mark1 > S1
top > active1 > leq2 > false > S1
top > active1 > leq2 > ok > S1
top > active1 > true > mark1 > S1
top > active1 > true > ok > S1
top > active1 > if3 > mark1 > S1
top > active1 > if3 > ok > S1
top > active1 > diff2 > mark1 > S1
top > active1 > diff2 > 0 > false > S1
top > active1 > diff2 > ok > S1

Status:
S1: multiset
mark1: [1]
active1: [1]
0: multiset
leq2: [2,1]
true: multiset
false: multiset
if3: [2,3,1]
diff2: multiset
proper1: [1]
ok: multiset
top: []

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(32) Obligation:

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

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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) PisEmptyProof (EQUIVALENT transformation)

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

(34) TRUE

(35) 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(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.

(36) 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)
p(x1)  =  x1
0  =  0
s(x1)  =  x1
leq(x1, x2)  =  x2
true  =  true
false  =  false
if(x1, x2, x3)  =  if(x2, x3)
diff(x1, x2)  =  x1
proper(x1)  =  proper(x1)
top(x1)  =  top

Recursive path order with status [RPO].
Precedence:
P1 > ok1
active1 > 0 > ok1
active1 > true > ok1
active1 > false > ok1
active1 > if2 > ok1
proper1 > if2 > ok1
top > ok1

Status:
P1: [1]
ok1: multiset
active1: [1]
0: multiset
true: multiset
false: multiset
if2: [2,1]
proper1: [1]
top: []

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(37) 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(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.


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)
p(x1)  =  x1
0  =  0
s(x1)  =  x1
leq(x1, x2)  =  leq(x1, x2)
true  =  true
false  =  false
if(x1, x2, x3)  =  if(x1, x2, x3)
diff(x1, x2)  =  diff(x1, x2)
proper(x1)  =  proper(x1)
ok(x1)  =  ok
top(x1)  =  top

Recursive path order with status [RPO].
Precedence:
proper1 > leq2 > mark1 > P1
proper1 > leq2 > false > P1
proper1 > leq2 > ok > P1
proper1 > true > mark1 > P1
proper1 > true > ok > P1
proper1 > if3 > mark1 > P1
proper1 > if3 > ok > P1
proper1 > diff2 > mark1 > P1
proper1 > diff2 > 0 > false > P1
proper1 > diff2 > ok > P1
top > active1 > leq2 > mark1 > P1
top > active1 > leq2 > false > P1
top > active1 > leq2 > ok > P1
top > active1 > true > mark1 > P1
top > active1 > true > ok > P1
top > active1 > if3 > mark1 > P1
top > active1 > if3 > ok > P1
top > active1 > diff2 > mark1 > P1
top > active1 > diff2 > 0 > false > P1
top > active1 > diff2 > ok > P1

Status:
P1: multiset
mark1: [1]
active1: [1]
0: multiset
leq2: [2,1]
true: multiset
false: multiset
if3: [2,3,1]
diff2: multiset
proper1: [1]
ok: multiset
top: []

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(39) Obligation:

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

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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) PisEmptyProof (EQUIVALENT transformation)

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

(41) TRUE

(42) Obligation:

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

PROPER(s(X)) → PROPER(X)
PROPER(p(X)) → PROPER(X)
PROPER(leq(X1, X2)) → PROPER(X1)
PROPER(leq(X1, X2)) → PROPER(X2)
PROPER(if(X1, X2, X3)) → PROPER(X1)
PROPER(if(X1, X2, X3)) → PROPER(X2)
PROPER(if(X1, X2, X3)) → PROPER(X3)
PROPER(diff(X1, X2)) → PROPER(X1)
PROPER(diff(X1, X2)) → PROPER(X2)

The TRS R consists of the following rules:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.

(43) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PROPER(leq(X1, X2)) → PROPER(X1)
PROPER(leq(X1, X2)) → PROPER(X2)
PROPER(if(X1, X2, X3)) → PROPER(X1)
PROPER(if(X1, X2, X3)) → PROPER(X2)
PROPER(if(X1, X2, X3)) → PROPER(X3)
PROPER(diff(X1, X2)) → PROPER(X1)
PROPER(diff(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)
s(x1)  =  x1
p(x1)  =  x1
leq(x1, x2)  =  leq(x1, x2)
if(x1, x2, x3)  =  if(x1, x2, x3)
diff(x1, x2)  =  diff(x1, x2)
active(x1)  =  active(x1)
0  =  0
mark(x1)  =  mark
true  =  true
false  =  false
proper(x1)  =  x1
ok(x1)  =  x1
top(x1)  =  top

Recursive path order with status [RPO].
Precedence:
active1 > leq2 > PROPER1
active1 > leq2 > mark
active1 > if3 > PROPER1
active1 > if3 > mark
active1 > diff2 > PROPER1
active1 > diff2 > mark
active1 > 0 > mark
true > mark
false > mark

Status:
PROPER1: multiset
leq2: multiset
if3: [3,2,1]
diff2: multiset
active1: [1]
0: multiset
mark: multiset
true: multiset
false: multiset
top: multiset

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

(44) Obligation:

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

PROPER(s(X)) → PROPER(X)
PROPER(p(X)) → PROPER(X)

The TRS R consists of the following rules:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.


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

Recursive path order with status [RPO].
Precedence:
proper1 > s1 > PROPER1 > mark1
proper1 > s1 > leq2 > mark1
proper1 > 0 > mark1
proper1 > true > mark1
proper1 > false > mark1
proper1 > if3 > mark1
proper1 > diff2 > mark1
top > active1 > s1 > PROPER1 > mark1
top > active1 > s1 > leq2 > mark1
top > active1 > 0 > mark1
top > active1 > true > mark1
top > active1 > false > mark1
top > active1 > if3 > mark1
top > active1 > diff2 > mark1

Status:
PROPER1: multiset
s1: multiset
active1: multiset
0: multiset
mark1: [1]
leq2: [1,2]
true: multiset
false: multiset
if3: multiset
diff2: [2,1]
proper1: multiset
top: []

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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:

PROPER(p(X)) → PROPER(X)

The TRS R consists of the following rules:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.


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

Recursive path order with status [RPO].
Precedence:
top > active1 > leq > mark > p1
top > active1 > leq > true > p1
top > active1 > leq > false > p1
top > active1 > diff > 0 > p1
top > active1 > diff > mark > p1
top > proper1 > leq > mark > p1
top > proper1 > leq > true > p1
top > proper1 > leq > false > p1
top > proper1 > diff > 0 > p1
top > proper1 > diff > mark > p1

Status:
p1: [1]
active1: [1]
0: multiset
mark: multiset
leq: multiset
true: multiset
false: multiset
diff: multiset
proper1: multiset
top: multiset

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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:

ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(p(X)) → ACTIVE(X)
ACTIVE(leq(X1, X2)) → ACTIVE(X1)
ACTIVE(leq(X1, X2)) → ACTIVE(X2)
ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(diff(X1, X2)) → ACTIVE(X1)
ACTIVE(diff(X1, X2)) → ACTIVE(X2)

The TRS R consists of the following rules:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.


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

Recursive path order with status [RPO].
Precedence:
top > active1 > s1 > leq2 > ACTIVE1
top > active1 > s1 > leq2 > mark1
top > active1 > s1 > leq2 > true
top > active1 > diff2 > leq2 > ACTIVE1
top > active1 > diff2 > leq2 > mark1
top > active1 > diff2 > leq2 > true
top > active1 > diff2 > if3 > ACTIVE1
top > active1 > diff2 > if3 > mark1
top > active1 > 0 > mark1
top > active1 > 0 > true
top > active1 > false > mark1

Status:
ACTIVE1: multiset
s1: multiset
leq2: [2,1]
if3: [1,2,3]
diff2: [2,1]
active1: [1]
0: multiset
mark1: multiset
true: multiset
false: multiset
top: []

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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:

ACTIVE(p(X)) → ACTIVE(X)

The TRS R consists of the following rules:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.


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

Recursive path order with status [RPO].
Precedence:
top > active1 > leq > mark > p1
top > active1 > leq > true > p1
top > active1 > leq > false > p1
top > active1 > diff > 0 > p1
top > active1 > diff > mark > p1
top > proper1 > leq > mark > p1
top > proper1 > leq > true > p1
top > proper1 > leq > false > p1
top > proper1 > diff > 0 > p1
top > proper1 > diff > mark > p1

Status:
p1: [1]
active1: [1]
0: multiset
mark: multiset
leq: multiset
true: multiset
false: multiset
diff: multiset
proper1: multiset
top: multiset

The following usable rules [FROCOS05] were oriented:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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:

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

The TRS R consists of the following rules:

active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(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.