(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) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(a__add(x1, x2)) = 2 + x1 + 2·x2   
POL(a__and(x1, x2)) = x1 + 2·x2   
POL(a__first(x1, x2)) = 2·x1 + 2·x2   
POL(a__from(x1)) = 2·x1   
POL(a__if(x1, x2, x3)) = 2·x1 + 2·x2 + 2·x3   
POL(add(x1, x2)) = 1 + x1 + 2·x2   
POL(and(x1, x2)) = x1 + 2·x2   
POL(cons(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(first(x1, x2)) = 2·x1 + 2·x2   
POL(from(x1)) = x1   
POL(if(x1, x2, x3)) = 2·x1 + x2 + x3   
POL(mark(x1)) = 2·x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(true) = 2   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

a__and(true, X) → mark(X)
a__if(true, X, Y) → mark(X)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
mark(true) → true
a__add(X1, X2) → add(X1, X2)


(2) Obligation:

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

a__and(false, Y) → false
a__if(false, X, Y) → mark(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(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__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.

(3) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 2   
POL(a__add(x1, x2)) = 2 + x1 + 2·x2   
POL(a__and(x1, x2)) = 2 + 2·x1 + x2   
POL(a__first(x1, x2)) = x1 + x2   
POL(a__from(x1)) = 2 + 2·x1   
POL(a__if(x1, x2, x3)) = 2 + x1 + 2·x2 + 2·x3   
POL(add(x1, x2)) = 2 + 2·x1 + 2·x2   
POL(and(x1, x2)) = 1 + 2·x1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(false) = 2   
POL(first(x1, x2)) = x1 + x2   
POL(from(x1)) = 1 + x1   
POL(if(x1, x2, x3)) = 1 + x1 + 2·x2 + 2·x3   
POL(mark(x1)) = 2·x1   
POL(nil) = 2   
POL(s(x1)) = x1   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

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


(4) Obligation:

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

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

Q is empty.

(5) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 1   
POL(a__and(x1, x2)) = x1 + x2   
POL(a__first(x1, x2)) = x1 + x2   
POL(a__from(x1)) = x1   
POL(a__if(x1, x2, x3)) = x1 + x2 + x3   
POL(and(x1, x2)) = 1 + x1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(first(x1, x2)) = x1 + x2   
POL(from(x1)) = 1 + x1   
POL(if(x1, x2, x3)) = 1 + x1 + x2 + x3   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 1 + x1   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

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


(6) Obligation:

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

mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(s(X)) → s(X)
mark(cons(X1, X2)) → cons(X1, X2)
a__first(X1, X2) → first(X1, X2)

Q is empty.

(7) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(a__first(x1, x2)) = 2·x1 + x2   
POL(cons(x1, x2)) = 1 + 2·x1 + x2   
POL(first(x1, x2)) = 2·x1 + x2   
POL(mark(x1)) = 2·x1   
POL(s(x1)) = x1   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

mark(cons(X1, X2)) → cons(X1, X2)


(8) Obligation:

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

mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(s(X)) → s(X)
a__first(X1, X2) → first(X1, X2)

Q is empty.

(9) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(a__first(x1, x2)) = x1 + x2   
POL(first(x1, x2)) = x1 + x2   
POL(mark(x1)) = 2·x1   
POL(s(x1)) = 1 + 2·x1   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

mark(s(X)) → s(X)


(10) Obligation:

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

mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
a__first(X1, X2) → first(X1, X2)

Q is empty.

(11) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(a__first(x1, x2)) = 2 + x1 + 2·x2   
POL(first(x1, x2)) = 1 + x1 + 2·x2   
POL(mark(x1)) = 2·x1   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

a__first(X1, X2) → first(X1, X2)


(12) Obligation:

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

mark(first(X1, X2)) → a__first(mark(X1), mark(X2))

Q is empty.

(13) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(a__first(x1, x2)) = x1 + x2   
POL(first(x1, x2)) = 1 + x1 + x2   
POL(mark(x1)) = x1   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

mark(first(X1, X2)) → a__first(mark(X1), mark(X2))


(14) Obligation:

Q restricted rewrite system:
R is empty.
Q is empty.

(15) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(16) TRUE

(17) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(18) TRUE