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

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(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(leq(s(X), s(Y))) → 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(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)
MARK(p(X)) → ACTIVE(p(mark(X)))
MARK(p(X)) → P(mark(X))
MARK(p(X)) → MARK(X)
MARK(0) → ACTIVE(0)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → S(mark(X))
MARK(s(X)) → MARK(X)
MARK(leq(X1, X2)) → ACTIVE(leq(mark(X1), mark(X2)))
MARK(leq(X1, X2)) → LEQ(mark(X1), mark(X2))
MARK(leq(X1, X2)) → MARK(X1)
MARK(leq(X1, X2)) → MARK(X2)
MARK(true) → ACTIVE(true)
MARK(false) → ACTIVE(false)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(if(X1, X2, X3)) → IF(mark(X1), X2, X3)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(diff(X1, X2)) → ACTIVE(diff(mark(X1), mark(X2)))
MARK(diff(X1, X2)) → DIFF(mark(X1), mark(X2))
MARK(diff(X1, X2)) → MARK(X1)
MARK(diff(X1, X2)) → MARK(X2)
P(mark(X)) → P(X)
P(active(X)) → P(X)
S(mark(X)) → S(X)
S(active(X)) → S(X)
LEQ(mark(X1), X2) → LEQ(X1, X2)
LEQ(X1, mark(X2)) → LEQ(X1, X2)
LEQ(active(X1), X2) → LEQ(X1, X2)
LEQ(X1, active(X2)) → LEQ(X1, X2)
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
IF(X1, mark(X2), X3) → IF(X1, X2, X3)
IF(X1, X2, mark(X3)) → IF(X1, X2, X3)
IF(active(X1), X2, X3) → IF(X1, X2, X3)
IF(X1, active(X2), X3) → IF(X1, X2, X3)
IF(X1, X2, active(X3)) → IF(X1, X2, X3)
DIFF(mark(X1), X2) → DIFF(X1, X2)
DIFF(X1, mark(X2)) → DIFF(X1, X2)
DIFF(active(X1), X2) → DIFF(X1, X2)
DIFF(X1, active(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))))
mark(p(X)) → active(p(mark(X)))
mark(0) → active(0)
mark(s(X)) → active(s(mark(X)))
mark(leq(X1, X2)) → active(leq(mark(X1), mark(X2)))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(diff(X1, X2)) → active(diff(mark(X1), mark(X2)))
p(mark(X)) → p(X)
p(active(X)) → p(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
leq(mark(X1), X2) → leq(X1, X2)
leq(X1, mark(X2)) → leq(X1, X2)
leq(active(X1), X2) → leq(X1, X2)
leq(X1, active(X2)) → leq(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
diff(mark(X1), X2) → diff(X1, X2)
diff(X1, mark(X2)) → diff(X1, X2)
diff(active(X1), X2) → diff(X1, X2)
diff(X1, active(X2)) → diff(X1, X2)

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 6 SCCs with 17 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(active(X1), X2) → DIFF(X1, X2)
DIFF(X1, active(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))))
mark(p(X)) → active(p(mark(X)))
mark(0) → active(0)
mark(s(X)) → active(s(mark(X)))
mark(leq(X1, X2)) → active(leq(mark(X1), mark(X2)))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(diff(X1, X2)) → active(diff(mark(X1), mark(X2)))
p(mark(X)) → p(X)
p(active(X)) → p(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
leq(mark(X1), X2) → leq(X1, X2)
leq(X1, mark(X2)) → leq(X1, X2)
leq(active(X1), X2) → leq(X1, X2)
leq(X1, active(X2)) → leq(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
diff(mark(X1), X2) → diff(X1, X2)
diff(X1, mark(X2)) → diff(X1, X2)
diff(active(X1), X2) → diff(X1, X2)
diff(X1, active(X2)) → diff(X1, X2)

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

Lexicographic path order with status [LPO].
Precedence:
trivial

Status:
mark1: [1]

The following usable rules [FROCOS05] were oriented: none

(7) Obligation:

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

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

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

Lexicographic path order with status [LPO].
Precedence:
mark1 > DIFF2

Status:
DIFF2: [1,2]
mark1: [1]

The following usable rules [FROCOS05] were oriented: none

(9) Obligation:

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

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

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(X1, active(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
active(x1)  =  active(x1)

Lexicographic path order with status [LPO].
Precedence:
trivial

Status:
active1: [1]

The following usable rules [FROCOS05] were oriented: none

(11) Obligation:

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

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

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

(12) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


DIFF(active(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)  =  x1
active(x1)  =  active(x1)

Lexicographic path order with status [LPO].
Precedence:
trivial

Status:
active1: [1]

The following usable rules [FROCOS05] were oriented: none

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

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

(14) PisEmptyProof (EQUIVALENT transformation)

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

(15) TRUE

(16) Obligation:

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

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

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(X1, mark(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(x2)
mark(x1)  =  mark(x1)
active(x1)  =  x1

Lexicographic path order with status [LPO].
Precedence:
trivial

Status:
mark1: [1]
IF1: [1]

The following usable rules [FROCOS05] were oriented: none

(18) Obligation:

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

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

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

(19) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IF(X1, active(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(x2)
mark(x1)  =  x1
active(x1)  =  active(x1)

Lexicographic path order with status [LPO].
Precedence:
trivial

Status:
active1: [1]
IF1: [1]

The following usable rules [FROCOS05] were oriented: none

(20) Obligation:

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

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

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

(21) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IF(X1, X2, mark(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)  =  x3
mark(x1)  =  mark(x1)
active(x1)  =  x1

Lexicographic path order with status [LPO].
Precedence:
trivial

Status:
mark1: [1]

The following usable rules [FROCOS05] were oriented: none

(22) Obligation:

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

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

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

(23) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IF(active(X1), X2, X3) → IF(X1, X2, X3)
IF(X1, X2, active(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)
mark(x1)  =  x1
active(x1)  =  active(x1)

Lexicographic path order with status [LPO].
Precedence:
active1 > IF2

Status:
active1: [1]
IF2: [1,2]

The following usable rules [FROCOS05] were oriented: none

(24) Obligation:

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

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

The TRS R consists of the following rules:

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

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

(25) 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)
mark(x1)  =  mark(x1)

Lexicographic path order with status [LPO].
Precedence:
mark1 > IF2

Status:
mark1: [1]
IF2: [2,1]

The following usable rules [FROCOS05] were oriented: none

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

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

(27) PisEmptyProof (EQUIVALENT transformation)

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

(28) TRUE

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

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

(30) 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)  =  x2
mark(x1)  =  mark(x1)
active(x1)  =  x1

Lexicographic path order with status [LPO].
Precedence:
trivial

Status:
mark1: [1]

The following usable rules [FROCOS05] were oriented: none

(31) Obligation:

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

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

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

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

Lexicographic path order with status [LPO].
Precedence:
mark1 > LEQ2

Status:
mark1: [1]
LEQ2: [1,2]

The following usable rules [FROCOS05] were oriented: none

(33) Obligation:

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

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

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

(34) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


LEQ(X1, active(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
active(x1)  =  active(x1)

Lexicographic path order with status [LPO].
Precedence:
trivial

Status:
active1: [1]

The following usable rules [FROCOS05] were oriented: none

(35) Obligation:

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

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

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.


LEQ(active(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
active(x1)  =  active(x1)

Lexicographic path order with status [LPO].
Precedence:
trivial

Status:
active1: [1]

The following usable rules [FROCOS05] were oriented: none

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

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

(38) PisEmptyProof (EQUIVALENT transformation)

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

(39) TRUE

(40) Obligation:

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

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

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

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

Lexicographic path order with status [LPO].
Precedence:
mark1 > S1

Status:
mark1: [1]
S1: [1]

The following usable rules [FROCOS05] were oriented: none

(42) Obligation:

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

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

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.


S(active(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
active(x1)  =  active(x1)

Lexicographic path order with status [LPO].
Precedence:
trivial

Status:
active1: [1]

The following usable rules [FROCOS05] were oriented: none

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

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

(45) PisEmptyProof (EQUIVALENT transformation)

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

(46) TRUE

(47) Obligation:

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

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

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

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

Lexicographic path order with status [LPO].
Precedence:
mark1 > P1

Status:
P1: [1]
mark1: [1]

The following usable rules [FROCOS05] were oriented: none

(49) Obligation:

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

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

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.


P(active(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
active(x1)  =  active(x1)

Lexicographic path order with status [LPO].
Precedence:
trivial

Status:
active1: [1]

The following usable rules [FROCOS05] were oriented: none

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

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

(52) PisEmptyProof (EQUIVALENT transformation)

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

(53) TRUE

(54) Obligation:

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

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

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