(0) Obligation:

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

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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(add(s(X), Y)) → S(add(X, Y))
ACTIVE(add(s(X), Y)) → ADD(X, Y)
ACTIVE(first(s(X), cons(Y, Z))) → CONS(Y, first(X, Z))
ACTIVE(first(s(X), cons(Y, Z))) → FIRST(X, Z)
ACTIVE(from(X)) → CONS(X, from(s(X)))
ACTIVE(from(X)) → FROM(s(X))
ACTIVE(from(X)) → S(X)
ACTIVE(and(X1, X2)) → AND(active(X1), X2)
ACTIVE(and(X1, X2)) → ACTIVE(X1)
ACTIVE(if(X1, X2, X3)) → IF(active(X1), X2, X3)
ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(add(X1, X2)) → ADD(active(X1), X2)
ACTIVE(add(X1, X2)) → ACTIVE(X1)
ACTIVE(first(X1, X2)) → FIRST(active(X1), X2)
ACTIVE(first(X1, X2)) → ACTIVE(X1)
ACTIVE(first(X1, X2)) → FIRST(X1, active(X2))
ACTIVE(first(X1, X2)) → ACTIVE(X2)
AND(mark(X1), X2) → AND(X1, X2)
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
ADD(mark(X1), X2) → ADD(X1, X2)
FIRST(mark(X1), X2) → FIRST(X1, X2)
FIRST(X1, mark(X2)) → FIRST(X1, X2)
PROPER(and(X1, X2)) → AND(proper(X1), proper(X2))
PROPER(and(X1, X2)) → PROPER(X1)
PROPER(and(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(add(X1, X2)) → ADD(proper(X1), proper(X2))
PROPER(add(X1, X2)) → PROPER(X1)
PROPER(add(X1, X2)) → PROPER(X2)
PROPER(s(X)) → S(proper(X))
PROPER(s(X)) → PROPER(X)
PROPER(first(X1, X2)) → FIRST(proper(X1), proper(X2))
PROPER(first(X1, X2)) → PROPER(X1)
PROPER(first(X1, X2)) → PROPER(X2)
PROPER(cons(X1, X2)) → CONS(proper(X1), proper(X2))
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(from(X)) → FROM(proper(X))
PROPER(from(X)) → PROPER(X)
AND(ok(X1), ok(X2)) → AND(X1, X2)
IF(ok(X1), ok(X2), ok(X3)) → IF(X1, X2, X3)
ADD(ok(X1), ok(X2)) → ADD(X1, X2)
S(ok(X)) → S(X)
FIRST(ok(X1), ok(X2)) → FIRST(X1, X2)
CONS(ok(X1), ok(X2)) → CONS(X1, X2)
FROM(ok(X)) → FROM(X)
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(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(3) DependencyGraphProof (EQUIVALENT transformation)

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

(4) Complex Obligation (AND)

(5) Obligation:

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

FROM(ok(X)) → FROM(X)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.


FROM(ok(X)) → FROM(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Recursive path order with status [RPO].
Quasi-Precedence:
ok1 > FROM1

Status:
ok1: multiset
FROM1: multiset


The following usable rules [FROCOS05] were oriented: none

(7) Obligation:

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

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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) PisEmptyProof (EQUIVALENT transformation)

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

(9) TRUE

(10) Obligation:

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

CONS(ok(X1), ok(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

(11) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


CONS(ok(X1), ok(X2)) → CONS(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
CONS(x1, x2)  =  CONS(x2)
ok(x1)  =  ok(x1)

Recursive path order with status [RPO].
Quasi-Precedence:
[CONS1, ok1]

Status:
CONS1: multiset
ok1: [1]


The following usable rules [FROCOS05] were oriented: none

(12) Obligation:

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

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(13) PisEmptyProof (EQUIVALENT transformation)

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

(14) TRUE

(15) Obligation:

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

S(ok(X)) → S(X)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

(16) 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: Recursive path order with status [RPO].
Quasi-Precedence:
ok1 > S1

Status:
ok1: multiset
S1: multiset


The following usable rules [FROCOS05] were oriented: none

(17) Obligation:

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

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

(18) PisEmptyProof (EQUIVALENT transformation)

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

(19) TRUE

(20) Obligation:

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

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

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

(21) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


FIRST(X1, mark(X2)) → FIRST(X1, X2)
FIRST(mark(X1), X2) → FIRST(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
FIRST(x1, x2)  =  FIRST(x1, x2)
mark(x1)  =  mark(x1)
ok(x1)  =  x1

Recursive path order with status [RPO].
Quasi-Precedence:
trivial

Status:
FIRST2: [2,1]
mark1: multiset


The following usable rules [FROCOS05] were oriented: none

(22) Obligation:

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

FIRST(ok(X1), ok(X2)) → FIRST(X1, X2)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

(23) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


FIRST(ok(X1), ok(X2)) → FIRST(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
FIRST(x1, x2)  =  FIRST(x2)
ok(x1)  =  ok(x1)

Recursive path order with status [RPO].
Quasi-Precedence:
[FIRST1, ok1]

Status:
FIRST1: multiset
ok1: [1]


The following usable rules [FROCOS05] were oriented: none

(24) Obligation:

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

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

(25) PisEmptyProof (EQUIVALENT transformation)

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

(26) TRUE

(27) Obligation:

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

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

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ADD(ok(X1), ok(X2)) → ADD(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ADD(x1, x2)  =  ADD(x2)
ok(x1)  =  ok(x1)
mark(x1)  =  mark

Recursive path order with status [RPO].
Quasi-Precedence:
ok1 > ADD1
mark > ADD1

Status:
mark: multiset
ok1: multiset
ADD1: multiset


The following usable rules [FROCOS05] were oriented: none

(29) Obligation:

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

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

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

(30) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ADD(mark(X1), X2) → ADD(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ADD(x1, x2)  =  ADD(x1)
mark(x1)  =  mark(x1)

Recursive path order with status [RPO].
Quasi-Precedence:
[ADD1, mark1]

Status:
mark1: [1]
ADD1: multiset


The following usable rules [FROCOS05] were oriented: none

(31) Obligation:

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

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

(32) PisEmptyProof (EQUIVALENT transformation)

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

(33) TRUE

(34) 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(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IF(ok(X1), ok(X2), ok(X3)) → IF(X1, X2, X3)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
IF(x1, x2, x3)  =  IF(x2, x3)
ok(x1)  =  ok(x1)
mark(x1)  =  x1

Recursive path order with status [RPO].
Quasi-Precedence:
[IF2, ok1]

Status:
ok1: multiset
IF2: multiset


The following usable rules [FROCOS05] were oriented: none

(36) 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(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

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

Recursive path order with status [RPO].
Quasi-Precedence:
[IF1, mark1]

Status:
mark1: multiset
IF1: multiset


The following usable rules [FROCOS05] were oriented: none

(38) Obligation:

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

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

(39) PisEmptyProof (EQUIVALENT transformation)

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

(40) TRUE

(41) Obligation:

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

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

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


AND(ok(X1), ok(X2)) → AND(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
AND(x1, x2)  =  AND(x2)
ok(x1)  =  ok(x1)
mark(x1)  =  mark

Recursive path order with status [RPO].
Quasi-Precedence:
ok1 > AND1
mark > AND1

Status:
AND1: multiset
mark: multiset
ok1: multiset


The following usable rules [FROCOS05] were oriented: none

(43) Obligation:

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

AND(mark(X1), X2) → AND(X1, X2)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

(44) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


AND(mark(X1), X2) → AND(X1, X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
AND(x1, x2)  =  AND(x1)
mark(x1)  =  mark(x1)

Recursive path order with status [RPO].
Quasi-Precedence:
[AND1, mark1]

Status:
AND1: multiset
mark1: [1]


The following usable rules [FROCOS05] were oriented: none

(45) Obligation:

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

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

(46) PisEmptyProof (EQUIVALENT transformation)

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

(47) TRUE

(48) Obligation:

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

PROPER(and(X1, X2)) → PROPER(X2)
PROPER(and(X1, X2)) → PROPER(X1)
PROPER(if(X1, X2, X3)) → PROPER(X1)
PROPER(if(X1, X2, X3)) → PROPER(X2)
PROPER(if(X1, X2, X3)) → PROPER(X3)
PROPER(add(X1, X2)) → PROPER(X1)
PROPER(add(X1, X2)) → PROPER(X2)
PROPER(s(X)) → PROPER(X)
PROPER(first(X1, X2)) → PROPER(X1)
PROPER(first(X1, X2)) → PROPER(X2)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(from(X)) → PROPER(X)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(49) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PROPER(and(X1, X2)) → PROPER(X2)
PROPER(and(X1, X2)) → PROPER(X1)
PROPER(if(X1, X2, X3)) → PROPER(X1)
PROPER(if(X1, X2, X3)) → PROPER(X2)
PROPER(if(X1, X2, X3)) → PROPER(X3)
PROPER(add(X1, X2)) → PROPER(X1)
PROPER(add(X1, X2)) → PROPER(X2)
PROPER(first(X1, X2)) → PROPER(X1)
PROPER(first(X1, X2)) → PROPER(X2)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(from(X)) → PROPER(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
PROPER(x1)  =  x1
and(x1, x2)  =  and(x1, x2)
if(x1, x2, x3)  =  if(x1, x2, x3)
add(x1, x2)  =  add(x1, x2)
s(x1)  =  x1
first(x1, x2)  =  first(x1, x2)
cons(x1, x2)  =  cons(x1, x2)
from(x1)  =  from(x1)

Recursive path order with status [RPO].
Quasi-Precedence:
trivial

Status:
add2: multiset
cons2: multiset
from1: [1]
if3: [1,3,2]
and2: multiset
first2: multiset


The following usable rules [FROCOS05] were oriented: none

(50) Obligation:

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

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

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

(51) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PROPER(s(X)) → PROPER(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Recursive path order with status [RPO].
Quasi-Precedence:
s1 > PROPER1

Status:
PROPER1: multiset
s1: multiset


The following usable rules [FROCOS05] were oriented: none

(52) Obligation:

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

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

(53) PisEmptyProof (EQUIVALENT transformation)

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

(54) TRUE

(55) Obligation:

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

ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(and(X1, X2)) → ACTIVE(X1)
ACTIVE(add(X1, X2)) → ACTIVE(X1)
ACTIVE(first(X1, X2)) → ACTIVE(X1)
ACTIVE(first(X1, X2)) → ACTIVE(X2)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(56) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ACTIVE(first(X1, X2)) → ACTIVE(X1)
ACTIVE(first(X1, X2)) → ACTIVE(X2)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
ACTIVE(x1)  =  ACTIVE(x1)
if(x1, x2, x3)  =  x1
and(x1, x2)  =  x1
add(x1, x2)  =  x1
first(x1, x2)  =  first(x1, x2)

Recursive path order with status [RPO].
Quasi-Precedence:
[ACTIVE1, first2]

Status:
first2: multiset
ACTIVE1: multiset


The following usable rules [FROCOS05] were oriented: none

(57) Obligation:

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

ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(and(X1, X2)) → ACTIVE(X1)
ACTIVE(add(X1, X2)) → ACTIVE(X1)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

(58) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(and(X1, X2)) → ACTIVE(X1)
ACTIVE(add(X1, X2)) → ACTIVE(X1)
The remaining pairs can at least be oriented weakly.
Used ordering: Recursive path order with status [RPO].
Quasi-Precedence:
if3 > [ACTIVE1, and2, add2]

Status:
add2: [2,1]
if3: multiset
and2: multiset
ACTIVE1: multiset


The following usable rules [FROCOS05] were oriented: none

(59) Obligation:

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

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
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.

(60) PisEmptyProof (EQUIVALENT transformation)

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

(61) TRUE

(62) 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(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(63) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


TOP(mark(X)) → TOP(proper(X))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
TOP(x1)  =  TOP(x1)
ok(x1)  =  x1
active(x1)  =  x1
mark(x1)  =  mark(x1)
proper(x1)  =  x1
cons(x1, x2)  =  cons
first(x1, x2)  =  first(x1, x2)
from(x1)  =  from(x1)
nil  =  nil
if(x1, x2, x3)  =  if(x1, x2, x3)
and(x1, x2)  =  and(x1, x2)
s(x1)  =  s
add(x1, x2)  =  add(x1, x2)
true  =  true
false  =  false
0  =  0

Recursive path order with status [RPO].
Quasi-Precedence:
[first2, nil, 0] > [TOP1, mark1, cons, false]
from1 > s > add2 > [TOP1, mark1, cons, false]
if3 > [TOP1, mark1, cons, false]
and2 > [TOP1, mark1, cons, false]
true > [TOP1, mark1, cons, false]

Status:
from1: [1]
true: multiset
mark1: multiset
s: []
and2: [1,2]
0: multiset
first2: multiset
add2: [2,1]
if3: [3,1,2]
cons: []
false: multiset
TOP1: [1]
nil: multiset


The following usable rules [FROCOS05] were oriented:

cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
from(ok(X)) → ok(from(X))
proper(nil) → ok(nil)
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
s(ok(X)) → ok(s(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
proper(true) → ok(true)
proper(false) → ok(false)
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(add(0, X)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(and(X1, X2)) → and(active(X1), X2)
active(from(X)) → mark(cons(X, from(s(X))))
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(first(0, X)) → mark(nil)
active(and(false, Y)) → mark(false)
active(and(true, X)) → mark(X)

(64) Obligation:

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

TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(65) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


TOP(ok(X)) → TOP(active(X))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
TOP(x1)  =  TOP(x1)
ok(x1)  =  ok(x1)
active(x1)  =  x1
cons(x1, x2)  =  cons(x1, x2)
first(x1, x2)  =  x2
from(x1)  =  from(x1)
if(x1, x2, x3)  =  x2
and(x1, x2)  =  x1
s(x1)  =  x1
add(x1, x2)  =  x2
mark(x1)  =  mark
0  =  0
false  =  false
true  =  true
nil  =  nil

Recursive path order with status [RPO].
Quasi-Precedence:
cons2 > ok1 > [TOP1, mark, true]
from1 > ok1 > [TOP1, mark, true]
0 > [TOP1, mark, true]
false > [TOP1, mark, true]
nil > [TOP1, mark, true]

Status:
cons2: multiset
from1: multiset
true: multiset
mark: []
ok1: multiset
false: multiset
TOP1: [1]
0: multiset
nil: multiset


The following usable rules [FROCOS05] were oriented:

first(ok(X1), ok(X2)) → ok(first(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(add(0, X)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(and(X1, X2)) → and(active(X1), X2)
active(from(X)) → mark(cons(X, from(s(X))))
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(first(0, X)) → mark(nil)
active(and(false, Y)) → mark(false)
active(and(true, X)) → mark(X)

(66) Obligation:

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

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(and(X1, X2)) → and(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(add(X1, X2)) → add(active(X1), X2)
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
and(mark(X1), X2) → mark(and(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
add(mark(X1), X2) → mark(add(X1, X2))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(and(X1, X2)) → and(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(add(X1, X2)) → add(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
s(ok(X)) → ok(s(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

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

(67) PisEmptyProof (EQUIVALENT transformation)

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

(68) TRUE