(0) Obligation:

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

a__and(true, X) → mark(X)
a__and(false, Y) → false
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__add(X1, X2) → add(X1, X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(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:

A__AND(true, X) → MARK(X)
A__IF(true, X, Y) → MARK(X)
A__IF(false, X, Y) → MARK(Y)
A__ADD(0, X) → MARK(X)
MARK(and(X1, X2)) → A__AND(mark(X1), X2)
MARK(and(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(add(X1, X2)) → A__ADD(mark(X1), X2)
MARK(add(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → A__FIRST(mark(X1), mark(X2))
MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X2)
MARK(from(X)) → A__FROM(X)

The TRS R consists of the following rules:

a__and(true, X) → mark(X)
a__and(false, Y) → false
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__add(X1, X2) → add(X1, X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(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 1 SCC with 2 less nodes.

(4) Obligation:

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

MARK(and(X1, X2)) → A__AND(mark(X1), X2)
A__AND(true, X) → MARK(X)
MARK(and(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
A__IF(true, X, Y) → MARK(X)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(add(X1, X2)) → A__ADD(mark(X1), X2)
A__ADD(0, X) → MARK(X)
MARK(add(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X2)
A__IF(false, X, Y) → MARK(Y)

The TRS R consists of the following rules:

a__and(true, X) → mark(X)
a__and(false, Y) → false
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__add(X1, X2) → add(X1, X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

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

(5) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


A__AND(true, X) → MARK(X)
MARK(and(X1, X2)) → MARK(X1)
A__IF(true, X, Y) → MARK(X)
MARK(if(X1, X2, X3)) → MARK(X1)
A__ADD(0, X) → MARK(X)
MARK(add(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X2)
A__IF(false, X, Y) → MARK(Y)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(A__ADD(x1, x2)) = 1 + x2   
POL(A__AND(x1, x2)) = 1 + x2   
POL(A__IF(x1, x2, x3)) = 1 + x2 + x3   
POL(MARK(x1)) = x1   
POL(a__add(x1, x2)) = 0   
POL(a__and(x1, x2)) = 0   
POL(a__first(x1, x2)) = 0   
POL(a__from(x1)) = 0   
POL(a__if(x1, x2, x3)) = 0   
POL(add(x1, x2)) = 1 + x1 + x2   
POL(and(x1, x2)) = 1 + x1 + x2   
POL(cons(x1, x2)) = 0   
POL(false) = 0   
POL(first(x1, x2)) = 1 + x1 + x2   
POL(from(x1)) = 0   
POL(if(x1, x2, x3)) = 1 + x1 + x2 + x3   
POL(mark(x1)) = 0   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(true) = 0   

The following usable rules [FROCOS05] were oriented: none

(6) Obligation:

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

MARK(and(X1, X2)) → A__AND(mark(X1), X2)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
MARK(add(X1, X2)) → A__ADD(mark(X1), X2)

The TRS R consists of the following rules:

a__and(true, X) → mark(X)
a__and(false, Y) → false
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__add(X1, X2) → add(X1, X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

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

(8) TRUE