(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(X1, mark(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)  =  mark(x1)
ok(x1)  =  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)  =  x1
top(x1)  =  top

Lexicographic path order with status [LPO].
Precedence:
DIFF1 > 0
active1 > leq2 > true > mark1 > 0
active1 > leq2 > false > mark1 > 0
active1 > if3 > mark1 > 0
active1 > diff2 > p1 > mark1 > 0
top > 0

Status:
DIFF1: [1]
mark1: [1]
active1: [1]
p1: [1]
0: []
leq2: [1,2]
true: []
false: []
if3: [2,3,1]
diff2: [1,2]
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(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.

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
active1 > p1 > mark1 > DIFF2 > false
active1 > 0 > true > mark1 > DIFF2 > false
active1 > s1 > mark1 > DIFF2 > false
active1 > leq2 > mark1 > DIFF2 > false
active1 > if3 > mark1 > DIFF2 > false
active1 > diff2 > mark1 > DIFF2 > false
top > false

Status:
DIFF2: [1,2]
mark1: [1]
active1: [1]
p1: [1]
0: []
s1: [1]
leq2: [1,2]
true: []
false: []
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))

(9) Obligation:

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

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.

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

Lexicographic path order with status [LPO].
Precedence:
proper1 > 0 > ok1 > mark
proper1 > 0 > true > mark
proper1 > 0 > false > mark
proper1 > s1 > ok1 > mark
proper1 > s1 > false > mark
proper1 > if1 > ok1 > mark
top > mark

Status:
ok1: [1]
0: []
mark: []
s1: [1]
true: []
false: []
if1: [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))

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

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

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.

(15) 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, x3)
ok(x1)  =  x1
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)  =  x1
top(x1)  =  top

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

Status:
IF2: [2,1]
mark1: [1]
active1: [1]
0: []
s1: [1]
leq2: [2,1]
true: []
false: []
if3: [3,1,2]
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))

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

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

Lexicographic path order with status [LPO].
Precedence:
IF1 > true
top > active1 > p1 > 0 > ok1 > true
top > active1 > p1 > 0 > false > true
top > active1 > diff1 > 0 > ok1 > true
top > active1 > diff1 > 0 > false > true
top > active1 > diff1 > s1 > ok1 > true
top > active1 > diff1 > s1 > false > true
top > active1 > diff1 > leq2 > ok1 > true
top > active1 > diff1 > leq2 > false > true
top > active1 > diff1 > if2 > ok1 > true
top > proper1 > p1 > 0 > ok1 > true
top > proper1 > p1 > 0 > false > true
top > proper1 > diff1 > 0 > ok1 > true
top > proper1 > diff1 > 0 > false > true
top > proper1 > diff1 > s1 > ok1 > true
top > proper1 > diff1 > s1 > false > true
top > proper1 > diff1 > leq2 > ok1 > true
top > proper1 > diff1 > leq2 > false > true
top > proper1 > diff1 > if2 > ok1 > true

Status:
IF1: [1]
ok1: [1]
active1: [1]
p1: [1]
0: []
s1: [1]
leq2: [1,2]
true: []
false: []
if2: [2,1]
diff1: [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))

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

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

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.

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

Lexicographic path order with status [LPO].
Precedence:
LEQ1 > false
top > active1 > leq1 > ok1 > false
top > active1 > leq1 > true > false
top > active1 > if3 > ok1 > false
top > active1 > diff1 > ok1 > false
top > active1 > diff1 > 0 > true > false
top > proper1 > leq1 > ok1 > false
top > proper1 > leq1 > true > false
top > proper1 > if3 > ok1 > false
top > proper1 > diff1 > ok1 > false
top > proper1 > diff1 > 0 > true > false

Status:
LEQ1: [1]
ok1: [1]
active1: [1]
0: []
leq1: [1]
true: []
false: []
if3: [2,1,3]
diff1: [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))

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

(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)  =  x1
mark(x1)  =  mark(x1)
active(x1)  =  active(x1)
p(x1)  =  p(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)  =  x1
top(x1)  =  top

Lexicographic path order with status [LPO].
Precedence:
proper1 > p1 > mark1
proper1 > 0 > true > mark1
proper1 > false > mark1
proper1 > diff2 > s1 > leq2 > mark1
proper1 > diff2 > if3 > mark1
top > active1 > p1 > mark1
top > active1 > 0 > true > mark1
top > active1 > false > mark1
top > active1 > diff2 > s1 > leq2 > mark1
top > active1 > diff2 > if3 > mark1

Status:
mark1: [1]
active1: [1]
p1: [1]
0: []
s1: [1]
leq2: [2,1]
true: []
false: []
if3: [1,3,2]
diff2: [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))

(25) Obligation:

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

LEQ(X1, mark(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.

(26) 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(x1, x2)
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(x1)
top(x1)  =  top

Lexicographic path order with status [LPO].
Precedence:
proper1 > 0 > true > mark1 > LEQ2
proper1 > 0 > false > mark1 > LEQ2
proper1 > 0 > ok1
proper1 > leq2 > true > mark1 > LEQ2
proper1 > leq2 > false > mark1 > LEQ2
proper1 > leq2 > ok1
proper1 > if3 > mark1 > LEQ2
proper1 > if3 > ok1
proper1 > diff2 > mark1 > LEQ2
proper1 > diff2 > ok1
top > active1 > 0 > true > mark1 > LEQ2
top > active1 > 0 > false > mark1 > LEQ2
top > active1 > 0 > ok1
top > active1 > leq2 > true > mark1 > LEQ2
top > active1 > leq2 > false > mark1 > LEQ2
top > active1 > leq2 > ok1
top > active1 > if3 > mark1 > LEQ2
top > active1 > if3 > ok1
top > active1 > diff2 > mark1 > LEQ2
top > active1 > diff2 > ok1

Status:
LEQ2: [1,2]
mark1: [1]
active1: [1]
0: []
leq2: [1,2]
true: []
false: []
if3: [1,2,3]
diff2: [2,1]
proper1: [1]
ok1: [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))

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

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

Lexicographic path order with status [LPO].
Precedence:
active1 > p1 > ok1
active1 > 0 > ok1
active1 > 0 > true
active1 > 0 > false
active1 > s1 > ok1
active1 > s1 > false
active1 > leq2 > ok1
active1 > leq2 > true
active1 > leq2 > false
active1 > if2 > ok1
proper1 > p1 > ok1
proper1 > 0 > ok1
proper1 > 0 > true
proper1 > 0 > false
proper1 > s1 > ok1
proper1 > s1 > false
proper1 > leq2 > ok1
proper1 > leq2 > true
proper1 > leq2 > false
proper1 > if2 > ok1

Status:
ok1: [1]
active1: [1]
p1: [1]
0: []
s1: [1]
leq2: [2,1]
true: []
false: []
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))

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

Lexicographic path order with status [LPO].
Precedence:
S1 > top
active1 > leq2 > mark1 > top
active1 > leq2 > true > top
active1 > false > mark1 > top
active1 > if3 > mark1 > top
active1 > diff2 > 0 > mark1 > top
active1 > diff2 > 0 > true > top

Status:
S1: [1]
mark1: [1]
active1: [1]
0: []
leq2: [2,1]
true: []
false: []
if3: [2,3,1]
diff2: [1,2]
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))

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

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

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.

(38) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Precedence:
active1 > p1 > ok1
active1 > 0 > ok1
active1 > 0 > true
active1 > 0 > false
active1 > s1 > ok1
active1 > s1 > false
active1 > leq2 > ok1
active1 > leq2 > true
active1 > leq2 > false
active1 > if2 > ok1
proper1 > p1 > ok1
proper1 > 0 > ok1
proper1 > 0 > true
proper1 > 0 > false
proper1 > s1 > ok1
proper1 > s1 > false
proper1 > leq2 > ok1
proper1 > leq2 > true
proper1 > leq2 > false
proper1 > if2 > ok1

Status:
ok1: [1]
active1: [1]
p1: [1]
0: []
s1: [1]
leq2: [2,1]
true: []
false: []
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))

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

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

Lexicographic path order with status [LPO].
Precedence:
P1 > top
active1 > leq2 > mark1 > top
active1 > leq2 > true > top
active1 > false > mark1 > top
active1 > if3 > mark1 > top
active1 > diff2 > 0 > mark1 > top
active1 > diff2 > 0 > true > top

Status:
P1: [1]
mark1: [1]
active1: [1]
0: []
leq2: [2,1]
true: []
false: []
if3: [2,3,1]
diff2: [1,2]
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))

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

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

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.

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

Lexicographic path order with status [LPO].
Precedence:
PROPER1 > true
proper1 > p1 > 0 > ok1 > top > true
proper1 > p1 > mark > top > true
proper1 > leq2 > mark > top > true
proper1 > leq2 > false > ok1 > top > true
proper1 > diff2 > s1 > ok1 > top > true
proper1 > diff2 > if3 > mark > top > true
proper1 > diff2 > if3 > ok1 > top > true
proper1 > diff2 > 0 > ok1 > top > true

Status:
PROPER1: [1]
s1: [1]
p1: [1]
leq2: [1,2]
if3: [1,2,3]
diff2: [1,2]
0: []
mark: []
true: []
false: []
proper1: [1]
ok1: [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))

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

(47) PisEmptyProof (EQUIVALENT transformation)

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

(48) TRUE

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

(50) 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)  =  x1
true  =  true
false  =  false
proper(x1)  =  proper(x1)
ok(x1)  =  ok
top(x1)  =  top

Lexicographic path order with status [LPO].
Precedence:
ACTIVE1 > diff2
top > active1 > s1 > leq2 > false > diff2
top > active1 > s1 > leq2 > ok > diff2
top > active1 > if3 > ok > diff2
top > active1 > 0 > true > ok > diff2
top > active1 > 0 > false > diff2
top > proper1 > s1 > leq2 > false > diff2
top > proper1 > s1 > leq2 > ok > diff2
top > proper1 > if3 > ok > diff2
top > proper1 > 0 > true > ok > diff2
top > proper1 > 0 > false > diff2

Status:
ACTIVE1: [1]
s1: [1]
leq2: [2,1]
if3: [2,3,1]
diff2: [2,1]
active1: [1]
0: []
true: []
false: []
proper1: [1]
ok: []
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))

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

(52) 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)
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)  =  if
diff(x1, x2)  =  diff
proper(x1)  =  proper(x1)
ok(x1)  =  ok
top(x1)  =  top

Lexicographic path order with status [LPO].
Precedence:
ACTIVE1 > false
top > active1 > leq > mark > p1 > false
top > active1 > leq > true > false
top > active1 > leq > ok > p1 > false
top > active1 > if > mark > p1 > false
top > active1 > if > ok > p1 > false
top > active1 > diff > 0 > true > false
top > active1 > diff > mark > p1 > false
top > active1 > diff > ok > p1 > false
top > proper1 > leq > mark > p1 > false
top > proper1 > leq > true > false
top > proper1 > leq > ok > p1 > false
top > proper1 > if > mark > p1 > false
top > proper1 > if > ok > p1 > false
top > proper1 > diff > 0 > true > false
top > proper1 > diff > mark > p1 > false
top > proper1 > diff > ok > p1 > false

Status:
ACTIVE1: [1]
p1: [1]
active1: [1]
0: []
mark: []
leq: []
true: []
false: []
if: []
diff: []
proper1: [1]
ok: []
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:
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.

(54) PisEmptyProof (EQUIVALENT transformation)

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

(55) TRUE

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