(0) Obligation:

Runtime Complexity TRS:
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))

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

ACTIVE(and(true, z0)) → c
ACTIVE(and(false, z0)) → c1
ACTIVE(if(true, z0, z1)) → c2
ACTIVE(if(false, z0, z1)) → c3
ACTIVE(add(0, z0)) → c4
ACTIVE(add(s(z0), z1)) → c5(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(0, z0)) → c6
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(from(z0)) → c8(CONS(z0, from(s(z0))), FROM(s(z0)), S(z0))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(true) → c24
PROPER(false) → c25
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(0) → c28
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(nil) → c31
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
S tuples:

ACTIVE(and(true, z0)) → c
ACTIVE(and(false, z0)) → c1
ACTIVE(if(true, z0, z1)) → c2
ACTIVE(if(false, z0, z1)) → c3
ACTIVE(add(0, z0)) → c4
ACTIVE(add(s(z0), z1)) → c5(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(0, z0)) → c6
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(from(z0)) → c8(CONS(z0, from(s(z0))), FROM(s(z0)), S(z0))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(true) → c24
PROPER(false) → c25
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(0) → c28
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(nil) → c31
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
K tuples:none
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38

(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 10 trailing nodes:

PROPER(nil) → c31
ACTIVE(first(0, z0)) → c6
ACTIVE(add(0, z0)) → c4
ACTIVE(if(false, z0, z1)) → c3
ACTIVE(and(true, z0)) → c
ACTIVE(and(false, z0)) → c1
PROPER(false) → c25
PROPER(0) → c28
PROPER(true) → c24
ACTIVE(if(true, z0, z1)) → c2

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

ACTIVE(add(s(z0), z1)) → c5(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(from(z0)) → c8(CONS(z0, from(s(z0))), FROM(s(z0)), S(z0))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
S tuples:

ACTIVE(add(s(z0), z1)) → c5(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(from(z0)) → c8(CONS(z0, from(s(z0))), FROM(s(z0)), S(z0))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
K tuples:none
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c5, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38

(5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 2 trailing tuple parts

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

ACTIVE(add(s(z0), z1)) → c5(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
S tuples:

ACTIVE(add(s(z0), z1)) → c5(S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
K tuples:none
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c5, c7, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8

(7) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID) transformation)

Split RHS of tuples not part of any SCC

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
s(ok(z0)) → ok(s(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
from(ok(z0)) → ok(from(z0))
top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))
Tuples:

ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
S tuples:

ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
K tuples:none
Defined Rule Symbols:

active, and, if, add, first, proper, s, cons, from, top

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c

(9) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

top(mark(z0)) → top(proper(z0))
top(ok(z0)) → top(active(z0))

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
S tuples:

ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
K tuples:none
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c

(11) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
We considered the (Usable) Rules:

proper(true) → ok(true)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
from(ok(z0)) → ok(from(z0))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
active(and(true, z0)) → mark(z0)
first(ok(z0), ok(z1)) → ok(first(z0, z1))
active(if(true, z0, z1)) → mark(z0)
active(first(z0, z1)) → first(active(z0), z1)
and(ok(z0), ok(z1)) → ok(and(z0, z1))
active(and(false, z0)) → mark(false)
proper(s(z0)) → s(proper(z0))
active(add(z0, z1)) → add(active(z0), z1)
proper(false) → ok(false)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
proper(from(z0)) → from(proper(z0))
first(z0, mark(z1)) → mark(first(z0, z1))
add(mark(z0), z1) → mark(add(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
active(and(z0, z1)) → and(active(z0), z1)
proper(nil) → ok(nil)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
and(mark(z0), z1) → mark(and(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
active(add(0, z0)) → mark(z0)
active(first(z0, z1)) → first(z0, active(z1))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
s(ok(z0)) → ok(s(z0))
active(if(false, z0, z1)) → mark(z1)
active(from(z0)) → mark(cons(z0, from(s(z0))))
proper(0) → ok(0)
proper(add(z0, z1)) → add(proper(z0), proper(z1))
active(first(0, z0)) → mark(nil)
And the Tuples:

ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [2]   
POL(ACTIVE(x1)) = 0   
POL(ADD(x1, x2)) = 0   
POL(AND(x1, x2)) = 0   
POL(CONS(x1, x2)) = 0   
POL(FIRST(x1, x2)) = 0   
POL(FROM(x1)) = 0   
POL(IF(x1, x2, x3)) = 0   
POL(PROPER(x1)) = 0   
POL(S(x1)) = 0   
POL(TOP(x1)) = x1   
POL(active(x1)) = x1   
POL(add(x1, x2)) = [2]x1 + x2   
POL(and(x1, x2)) = [2] + [4]x1 + x2   
POL(c(x1)) = x1   
POL(c10(x1, x2)) = x1 + x2   
POL(c11(x1, x2)) = x1 + x2   
POL(c12(x1, x2)) = x1 + x2   
POL(c13(x1, x2)) = x1 + x2   
POL(c14(x1)) = x1   
POL(c15(x1)) = x1   
POL(c16(x1)) = x1   
POL(c17(x1)) = x1   
POL(c18(x1)) = x1   
POL(c19(x1)) = x1   
POL(c20(x1)) = x1   
POL(c21(x1)) = x1   
POL(c22(x1)) = x1   
POL(c23(x1, x2, x3)) = x1 + x2 + x3   
POL(c26(x1, x2, x3, x4)) = x1 + x2 + x3 + x4   
POL(c27(x1, x2, x3)) = x1 + x2 + x3   
POL(c29(x1, x2)) = x1 + x2   
POL(c30(x1, x2, x3)) = x1 + x2 + x3   
POL(c32(x1, x2, x3)) = x1 + x2 + x3   
POL(c33(x1, x2)) = x1 + x2   
POL(c34(x1)) = x1   
POL(c35(x1)) = x1   
POL(c36(x1)) = x1   
POL(c37(x1, x2)) = x1 + x2   
POL(c38(x1, x2)) = x1 + x2   
POL(c8(x1)) = x1   
POL(c9(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = 0   
POL(false) = [4]   
POL(first(x1, x2)) = x1 + x2   
POL(from(x1)) = [1]   
POL(if(x1, x2, x3)) = [2] + x1 + [4]x2 + x3   
POL(mark(x1)) = [1] + x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(proper(x1)) = x1   
POL(s(x1)) = [1]   
POL(true) = 0   

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
S tuples:

ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0))
ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c

(13) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace ACTIVE(and(z0, z1)) → c9(AND(active(z0), z1), ACTIVE(z0)) by

ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(and(true, z0)))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1), ACTIVE(and(false, z0)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1), ACTIVE(if(true, z0, z1)))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1), ACTIVE(if(false, z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(from(z0), x1)) → c9(AND(mark(cons(z0, from(s(z0)))), x1), ACTIVE(from(z0)))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(and(true, z0)))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1), ACTIVE(and(false, z0)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1), ACTIVE(if(true, z0, z1)))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1), ACTIVE(if(false, z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(from(z0), x1)) → c9(AND(mark(cons(z0, from(s(z0)))), x1), ACTIVE(from(z0)))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
S tuples:

ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(and(true, z0)))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1), ACTIVE(and(false, z0)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1), ACTIVE(if(true, z0, z1)))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1), ACTIVE(if(false, z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(from(z0), x1)) → c9(AND(mark(cons(z0, from(s(z0)))), x1), ACTIVE(from(z0)))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9

(15) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 2 trailing tuple parts

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1), ACTIVE(if(true, z0, z1)))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1), ACTIVE(if(false, z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(from(z0), x1)) → c9(AND(mark(cons(z0, from(s(z0)))), x1), ACTIVE(from(z0)))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
S tuples:

ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1), ACTIVE(if(true, z0, z1)))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1), ACTIVE(if(false, z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(from(z0), x1)) → c9(AND(mark(cons(z0, from(s(z0)))), x1), ACTIVE(from(z0)))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9

(17) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID) transformation)

Split RHS of tuples not part of any SCC

(18) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1), ACTIVE(if(true, z0, z1)))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1), ACTIVE(if(false, z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
S tuples:

ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0))
ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1), ACTIVE(if(true, z0, z1)))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1), ACTIVE(if(false, z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1

(19) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace ACTIVE(if(z0, z1, z2)) → c10(IF(active(z0), z1, z2), ACTIVE(z0)) by

ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2), ACTIVE(and(true, z0)))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2), ACTIVE(and(false, z0)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2), ACTIVE(if(true, z0, z1)))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2), ACTIVE(if(false, z0, z1)))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c10(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(from(z0), x1, x2)) → c10(IF(mark(cons(z0, from(s(z0)))), x1, x2), ACTIVE(from(z0)))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))

(20) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1), ACTIVE(if(true, z0, z1)))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1), ACTIVE(if(false, z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2), ACTIVE(and(true, z0)))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2), ACTIVE(and(false, z0)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2), ACTIVE(if(true, z0, z1)))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2), ACTIVE(if(false, z0, z1)))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c10(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(from(z0), x1, x2)) → c10(IF(mark(cons(z0, from(s(z0)))), x1, x2), ACTIVE(from(z0)))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
S tuples:

ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1), ACTIVE(if(true, z0, z1)))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1), ACTIVE(if(false, z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2), ACTIVE(and(true, z0)))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2), ACTIVE(and(false, z0)))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2), ACTIVE(if(true, z0, z1)))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2), ACTIVE(if(false, z0, z1)))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c10(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(from(z0), x1, x2)) → c10(IF(mark(cons(z0, from(s(z0)))), x1, x2), ACTIVE(from(z0)))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10

(21) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 6 trailing tuple parts

(22) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c10(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(from(z0), x1, x2)) → c10(IF(mark(cons(z0, from(s(z0)))), x1, x2), ACTIVE(from(z0)))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
S tuples:

ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c10(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(from(z0), x1, x2)) → c10(IF(mark(cons(z0, from(s(z0)))), x1, x2), ACTIVE(from(z0)))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10

(23) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID) transformation)

Split RHS of tuples not part of any SCC

(24) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c10(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
S tuples:

ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c10(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2

(25) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace ACTIVE(add(z0, z1)) → c11(ADD(active(z0), z1), ACTIVE(z0)) by

ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1), ACTIVE(and(true, z0)))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1), ACTIVE(and(false, z0)))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1), ACTIVE(if(true, z0, z1)))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1), ACTIVE(if(false, z0, z1)))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(add(add(s(z0), z1), x1)) → c11(ADD(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(from(z0), x1)) → c11(ADD(mark(cons(z0, from(s(z0)))), x1), ACTIVE(from(z0)))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))

(26) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c10(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1), ACTIVE(and(true, z0)))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1), ACTIVE(and(false, z0)))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1), ACTIVE(if(true, z0, z1)))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1), ACTIVE(if(false, z0, z1)))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(add(add(s(z0), z1), x1)) → c11(ADD(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(from(z0), x1)) → c11(ADD(mark(cons(z0, from(s(z0)))), x1), ACTIVE(from(z0)))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2), ACTIVE(add(0, z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c10(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1), ACTIVE(and(true, z0)))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1), ACTIVE(and(false, z0)))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1), ACTIVE(if(true, z0, z1)))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1), ACTIVE(if(false, z0, z1)))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1), ACTIVE(add(0, z0)))
ACTIVE(add(add(s(z0), z1), x1)) → c11(ADD(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(from(z0), x1)) → c11(ADD(mark(cons(z0, from(s(z0)))), x1), ACTIVE(from(z0)))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11

(27) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 7 trailing tuple parts

(28) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c10(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(add(s(z0), z1), x1)) → c11(ADD(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(from(z0), x1)) → c11(ADD(mark(cons(z0, from(s(z0)))), x1), ACTIVE(from(z0)))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(add(s(z0), z1), x1)) → c9(AND(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c10(IF(mark(s(add(z0, z1))), x1, x2), ACTIVE(add(s(z0), z1)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(add(s(z0), z1), x1)) → c11(ADD(mark(s(add(z0, z1))), x1), ACTIVE(add(s(z0), z1)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(from(z0), x1)) → c11(ADD(mark(cons(z0, from(s(z0)))), x1), ACTIVE(from(z0)))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11

(29) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID) transformation)

Split RHS of tuples not part of any SCC

(30) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3

(31) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace PROPER(and(z0, z1)) → c23(AND(proper(z0), proper(z1)), PROPER(z0), PROPER(z1)) by

PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0), PROPER(nil))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(false), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(nil), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))

(32) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0), PROPER(nil))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(false), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(nil), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0), PROPER(nil))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(false), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(nil), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23

(33) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 8 trailing tuple parts

(34) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c26, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23

(35) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace PROPER(if(z0, z1, z2)) → c26(IF(proper(z0), proper(z1), proper(z2)), PROPER(z0), PROPER(z1), PROPER(z2)) by

PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1), PROPER(true))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1), PROPER(false))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1), PROPER(0))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1), PROPER(nil))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(true), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(false), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(0), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(nil), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(true), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(false), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(0), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(nil), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))

(36) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1), PROPER(true))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1), PROPER(false))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1), PROPER(0))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1), PROPER(nil))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(true), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(false), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(0), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(nil), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(true), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(false), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(0), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(nil), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1), PROPER(true))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1), PROPER(false))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1), PROPER(0))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1), PROPER(nil))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(true), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(false), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(0), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(nil), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(true), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(false), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(0), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(nil), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26

(37) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 12 trailing tuple parts

(38) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c27, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26, c26

(39) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace PROPER(add(z0, z1)) → c27(ADD(proper(z0), proper(z1)), PROPER(z0), PROPER(z1)) by

PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0), PROPER(nil))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(false), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(nil), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))

(40) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0), PROPER(nil))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(false), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(nil), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0), PROPER(nil))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(false), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(nil), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26, c26, c27

(41) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 8 trailing tuple parts

(42) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c29, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26, c26, c27, c27

(43) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace PROPER(s(z0)) → c29(S(proper(z0)), PROPER(z0)) by

PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(true)) → c29(S(ok(true)), PROPER(true))
PROPER(s(false)) → c29(S(ok(false)), PROPER(false))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c29(S(ok(0)), PROPER(0))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(nil)) → c29(S(ok(nil)), PROPER(nil))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))

(44) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(true)) → c29(S(ok(true)), PROPER(true))
PROPER(s(false)) → c29(S(ok(false)), PROPER(false))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c29(S(ok(0)), PROPER(0))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(nil)) → c29(S(ok(nil)), PROPER(nil))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(true)) → c29(S(ok(true)), PROPER(true))
PROPER(s(false)) → c29(S(ok(false)), PROPER(false))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(0)) → c29(S(ok(0)), PROPER(0))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(nil)) → c29(S(ok(nil)), PROPER(nil))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26, c26, c27, c27, c29

(45) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 4 trailing tuple parts

(46) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c30, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26, c26, c27, c27, c29, c29

(47) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace PROPER(first(z0, z1)) → c30(FIRST(proper(z0), proper(z1)), PROPER(z0), PROPER(z1)) by

PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0), PROPER(nil))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(false), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(nil), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))

(48) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0), PROPER(nil))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(false), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(nil), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0), PROPER(nil))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(false), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(nil), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26, c26, c27, c27, c29, c29, c30

(49) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 8 trailing tuple parts

(50) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c32, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26, c26, c27, c27, c29, c29, c30, c30

(51) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace PROPER(cons(z0, z1)) → c32(CONS(proper(z0), proper(z1)), PROPER(z0), PROPER(z1)) by

PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0), PROPER(nil))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(false), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(nil), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))

(52) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0), PROPER(nil))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(false), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(nil), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0), PROPER(true))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0), PROPER(false))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0), PROPER(0))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0), PROPER(nil))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(true), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(false), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(0), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(nil), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26, c26, c27, c27, c29, c29, c30, c30, c32

(53) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 8 trailing tuple parts

(54) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(x1))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(x1))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, PROPER, S, CONS, FROM, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c33, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26, c26, c27, c27, c29, c29, c30, c30, c32, c32

(55) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace PROPER(from(z0)) → c33(FROM(proper(z0)), PROPER(z0)) by

PROPER(from(and(z0, z1))) → c33(FROM(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(from(true)) → c33(FROM(ok(true)), PROPER(true))
PROPER(from(false)) → c33(FROM(ok(false)), PROPER(false))
PROPER(from(if(z0, z1, z2))) → c33(FROM(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(from(add(z0, z1))) → c33(FROM(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(from(0)) → c33(FROM(ok(0)), PROPER(0))
PROPER(from(s(z0))) → c33(FROM(s(proper(z0))), PROPER(s(z0)))
PROPER(from(first(z0, z1))) → c33(FROM(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(from(nil)) → c33(FROM(ok(nil)), PROPER(nil))
PROPER(from(cons(z0, z1))) → c33(FROM(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(from(from(z0))) → c33(FROM(from(proper(z0))), PROPER(from(z0)))

(56) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(x1))
PROPER(from(and(z0, z1))) → c33(FROM(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(from(true)) → c33(FROM(ok(true)), PROPER(true))
PROPER(from(false)) → c33(FROM(ok(false)), PROPER(false))
PROPER(from(if(z0, z1, z2))) → c33(FROM(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(from(add(z0, z1))) → c33(FROM(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(from(0)) → c33(FROM(ok(0)), PROPER(0))
PROPER(from(s(z0))) → c33(FROM(s(proper(z0))), PROPER(s(z0)))
PROPER(from(first(z0, z1))) → c33(FROM(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(from(nil)) → c33(FROM(ok(nil)), PROPER(nil))
PROPER(from(cons(z0, z1))) → c33(FROM(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(from(from(z0))) → c33(FROM(from(proper(z0))), PROPER(from(z0)))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(x1))
PROPER(from(and(z0, z1))) → c33(FROM(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(from(true)) → c33(FROM(ok(true)), PROPER(true))
PROPER(from(false)) → c33(FROM(ok(false)), PROPER(false))
PROPER(from(if(z0, z1, z2))) → c33(FROM(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(from(add(z0, z1))) → c33(FROM(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(from(0)) → c33(FROM(ok(0)), PROPER(0))
PROPER(from(s(z0))) → c33(FROM(s(proper(z0))), PROPER(s(z0)))
PROPER(from(first(z0, z1))) → c33(FROM(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(from(nil)) → c33(FROM(ok(nil)), PROPER(nil))
PROPER(from(cons(z0, z1))) → c33(FROM(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(from(from(z0))) → c33(FROM(from(proper(z0))), PROPER(from(z0)))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, S, CONS, FROM, TOP, PROPER

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26, c26, c27, c27, c29, c29, c30, c30, c32, c32, c33

(57) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 4 trailing tuple parts

(58) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(x1))
PROPER(from(and(z0, z1))) → c33(FROM(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(from(if(z0, z1, z2))) → c33(FROM(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(from(add(z0, z1))) → c33(FROM(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(from(s(z0))) → c33(FROM(s(proper(z0))), PROPER(s(z0)))
PROPER(from(first(z0, z1))) → c33(FROM(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(from(cons(z0, z1))) → c33(FROM(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(from(from(z0))) → c33(FROM(from(proper(z0))), PROPER(from(z0)))
PROPER(from(true)) → c33(FROM(ok(true)))
PROPER(from(false)) → c33(FROM(ok(false)))
PROPER(from(0)) → c33(FROM(ok(0)))
PROPER(from(nil)) → c33(FROM(ok(nil)))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(x1))
PROPER(from(and(z0, z1))) → c33(FROM(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(from(if(z0, z1, z2))) → c33(FROM(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(from(add(z0, z1))) → c33(FROM(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(from(s(z0))) → c33(FROM(s(proper(z0))), PROPER(s(z0)))
PROPER(from(first(z0, z1))) → c33(FROM(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(from(cons(z0, z1))) → c33(FROM(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(from(from(z0))) → c33(FROM(from(proper(z0))), PROPER(from(z0)))
PROPER(from(true)) → c33(FROM(ok(true)))
PROPER(from(false)) → c33(FROM(ok(false)))
PROPER(from(0)) → c33(FROM(ok(0)))
PROPER(from(nil)) → c33(FROM(ok(nil)))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, S, CONS, FROM, TOP, PROPER

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36, c37, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26, c26, c27, c27, c29, c29, c30, c30, c32, c32, c33, c33

(59) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0)) by

TOP(mark(and(z0, z1))) → c37(TOP(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
TOP(mark(true)) → c37(TOP(ok(true)), PROPER(true))
TOP(mark(false)) → c37(TOP(ok(false)), PROPER(false))
TOP(mark(if(z0, z1, z2))) → c37(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(add(z0, z1))) → c37(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(0)) → c37(TOP(ok(0)), PROPER(0))
TOP(mark(s(z0))) → c37(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(first(z0, z1))) → c37(TOP(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
TOP(mark(nil)) → c37(TOP(ok(nil)), PROPER(nil))
TOP(mark(cons(z0, z1))) → c37(TOP(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
TOP(mark(from(z0))) → c37(TOP(from(proper(z0))), PROPER(from(z0)))

(60) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(x1))
PROPER(from(and(z0, z1))) → c33(FROM(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(from(if(z0, z1, z2))) → c33(FROM(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(from(add(z0, z1))) → c33(FROM(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(from(s(z0))) → c33(FROM(s(proper(z0))), PROPER(s(z0)))
PROPER(from(first(z0, z1))) → c33(FROM(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(from(cons(z0, z1))) → c33(FROM(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(from(from(z0))) → c33(FROM(from(proper(z0))), PROPER(from(z0)))
PROPER(from(true)) → c33(FROM(ok(true)))
PROPER(from(false)) → c33(FROM(ok(false)))
PROPER(from(0)) → c33(FROM(ok(0)))
PROPER(from(nil)) → c33(FROM(ok(nil)))
TOP(mark(and(z0, z1))) → c37(TOP(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
TOP(mark(true)) → c37(TOP(ok(true)), PROPER(true))
TOP(mark(false)) → c37(TOP(ok(false)), PROPER(false))
TOP(mark(if(z0, z1, z2))) → c37(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(add(z0, z1))) → c37(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(0)) → c37(TOP(ok(0)), PROPER(0))
TOP(mark(s(z0))) → c37(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(first(z0, z1))) → c37(TOP(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
TOP(mark(nil)) → c37(TOP(ok(nil)), PROPER(nil))
TOP(mark(cons(z0, z1))) → c37(TOP(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
TOP(mark(from(z0))) → c37(TOP(from(proper(z0))), PROPER(from(z0)))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(x1))
PROPER(from(and(z0, z1))) → c33(FROM(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(from(if(z0, z1, z2))) → c33(FROM(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(from(add(z0, z1))) → c33(FROM(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(from(s(z0))) → c33(FROM(s(proper(z0))), PROPER(s(z0)))
PROPER(from(first(z0, z1))) → c33(FROM(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(from(cons(z0, z1))) → c33(FROM(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(from(from(z0))) → c33(FROM(from(proper(z0))), PROPER(from(z0)))
PROPER(from(true)) → c33(FROM(ok(true)))
PROPER(from(false)) → c33(FROM(ok(false)))
PROPER(from(0)) → c33(FROM(ok(0)))
PROPER(from(nil)) → c33(FROM(ok(nil)))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, S, CONS, FROM, TOP, PROPER

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26, c26, c27, c27, c29, c29, c30, c30, c32, c32, c33, c33, c37

(61) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 4 trailing tuple parts

(62) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(x1))
PROPER(from(and(z0, z1))) → c33(FROM(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(from(if(z0, z1, z2))) → c33(FROM(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(from(add(z0, z1))) → c33(FROM(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(from(s(z0))) → c33(FROM(s(proper(z0))), PROPER(s(z0)))
PROPER(from(first(z0, z1))) → c33(FROM(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(from(cons(z0, z1))) → c33(FROM(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(from(from(z0))) → c33(FROM(from(proper(z0))), PROPER(from(z0)))
PROPER(from(true)) → c33(FROM(ok(true)))
PROPER(from(false)) → c33(FROM(ok(false)))
PROPER(from(0)) → c33(FROM(ok(0)))
PROPER(from(nil)) → c33(FROM(ok(nil)))
TOP(mark(and(z0, z1))) → c37(TOP(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
TOP(mark(if(z0, z1, z2))) → c37(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(add(z0, z1))) → c37(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(s(z0))) → c37(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(first(z0, z1))) → c37(TOP(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
TOP(mark(cons(z0, z1))) → c37(TOP(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
TOP(mark(from(z0))) → c37(TOP(from(proper(z0))), PROPER(from(z0)))
TOP(mark(true)) → c37(TOP(ok(true)))
TOP(mark(false)) → c37(TOP(ok(false)))
TOP(mark(0)) → c37(TOP(ok(0)))
TOP(mark(nil)) → c37(TOP(ok(nil)))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(x1))
PROPER(from(and(z0, z1))) → c33(FROM(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(from(if(z0, z1, z2))) → c33(FROM(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(from(add(z0, z1))) → c33(FROM(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(from(s(z0))) → c33(FROM(s(proper(z0))), PROPER(s(z0)))
PROPER(from(first(z0, z1))) → c33(FROM(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(from(cons(z0, z1))) → c33(FROM(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(from(from(z0))) → c33(FROM(from(proper(z0))), PROPER(from(z0)))
PROPER(from(true)) → c33(FROM(ok(true)))
PROPER(from(false)) → c33(FROM(ok(false)))
PROPER(from(0)) → c33(FROM(ok(0)))
PROPER(from(nil)) → c33(FROM(ok(nil)))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, S, CONS, FROM, TOP, PROPER

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36, c38, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26, c26, c27, c27, c29, c29, c30, c30, c32, c32, c33, c33, c37, c37

(63) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace TOP(ok(z0)) → c38(TOP(active(z0)), ACTIVE(z0)) by

TOP(ok(and(true, z0))) → c38(TOP(mark(z0)), ACTIVE(and(true, z0)))
TOP(ok(and(false, z0))) → c38(TOP(mark(false)), ACTIVE(and(false, z0)))
TOP(ok(if(true, z0, z1))) → c38(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c38(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(add(0, z0))) → c38(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c38(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(first(0, z0))) → c38(TOP(mark(nil)), ACTIVE(first(0, z0)))
TOP(ok(first(s(z0), cons(z1, z2)))) → c38(TOP(mark(cons(z1, first(z0, z2)))), ACTIVE(first(s(z0), cons(z1, z2))))
TOP(ok(from(z0))) → c38(TOP(mark(cons(z0, from(s(z0))))), ACTIVE(from(z0)))
TOP(ok(and(z0, z1))) → c38(TOP(and(active(z0), z1)), ACTIVE(and(z0, z1)))
TOP(ok(if(z0, z1, z2))) → c38(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(add(z0, z1))) → c38(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(active(z0), z1)), ACTIVE(first(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(z0, active(z1))), ACTIVE(first(z0, z1)))

(64) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(x1))
PROPER(from(and(z0, z1))) → c33(FROM(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(from(if(z0, z1, z2))) → c33(FROM(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(from(add(z0, z1))) → c33(FROM(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(from(s(z0))) → c33(FROM(s(proper(z0))), PROPER(s(z0)))
PROPER(from(first(z0, z1))) → c33(FROM(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(from(cons(z0, z1))) → c33(FROM(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(from(from(z0))) → c33(FROM(from(proper(z0))), PROPER(from(z0)))
PROPER(from(true)) → c33(FROM(ok(true)))
PROPER(from(false)) → c33(FROM(ok(false)))
PROPER(from(0)) → c33(FROM(ok(0)))
PROPER(from(nil)) → c33(FROM(ok(nil)))
TOP(mark(and(z0, z1))) → c37(TOP(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
TOP(mark(if(z0, z1, z2))) → c37(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(add(z0, z1))) → c37(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(s(z0))) → c37(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(first(z0, z1))) → c37(TOP(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
TOP(mark(cons(z0, z1))) → c37(TOP(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
TOP(mark(from(z0))) → c37(TOP(from(proper(z0))), PROPER(from(z0)))
TOP(mark(true)) → c37(TOP(ok(true)))
TOP(mark(false)) → c37(TOP(ok(false)))
TOP(mark(0)) → c37(TOP(ok(0)))
TOP(mark(nil)) → c37(TOP(ok(nil)))
TOP(ok(and(true, z0))) → c38(TOP(mark(z0)), ACTIVE(and(true, z0)))
TOP(ok(and(false, z0))) → c38(TOP(mark(false)), ACTIVE(and(false, z0)))
TOP(ok(if(true, z0, z1))) → c38(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c38(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(add(0, z0))) → c38(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c38(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(first(0, z0))) → c38(TOP(mark(nil)), ACTIVE(first(0, z0)))
TOP(ok(first(s(z0), cons(z1, z2)))) → c38(TOP(mark(cons(z1, first(z0, z2)))), ACTIVE(first(s(z0), cons(z1, z2))))
TOP(ok(from(z0))) → c38(TOP(mark(cons(z0, from(s(z0))))), ACTIVE(from(z0)))
TOP(ok(and(z0, z1))) → c38(TOP(and(active(z0), z1)), ACTIVE(and(z0, z1)))
TOP(ok(if(z0, z1, z2))) → c38(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(add(z0, z1))) → c38(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(active(z0), z1)), ACTIVE(first(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(z0, active(z1))), ACTIVE(first(z0, z1)))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(x1))
PROPER(from(and(z0, z1))) → c33(FROM(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(from(if(z0, z1, z2))) → c33(FROM(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(from(add(z0, z1))) → c33(FROM(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(from(s(z0))) → c33(FROM(s(proper(z0))), PROPER(s(z0)))
PROPER(from(first(z0, z1))) → c33(FROM(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(from(cons(z0, z1))) → c33(FROM(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(from(from(z0))) → c33(FROM(from(proper(z0))), PROPER(from(z0)))
PROPER(from(true)) → c33(FROM(ok(true)))
PROPER(from(false)) → c33(FROM(ok(false)))
PROPER(from(0)) → c33(FROM(ok(0)))
PROPER(from(nil)) → c33(FROM(ok(nil)))
TOP(ok(and(true, z0))) → c38(TOP(mark(z0)), ACTIVE(and(true, z0)))
TOP(ok(and(false, z0))) → c38(TOP(mark(false)), ACTIVE(and(false, z0)))
TOP(ok(if(true, z0, z1))) → c38(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c38(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(add(0, z0))) → c38(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c38(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(first(0, z0))) → c38(TOP(mark(nil)), ACTIVE(first(0, z0)))
TOP(ok(first(s(z0), cons(z1, z2)))) → c38(TOP(mark(cons(z1, first(z0, z2)))), ACTIVE(first(s(z0), cons(z1, z2))))
TOP(ok(from(z0))) → c38(TOP(mark(cons(z0, from(s(z0))))), ACTIVE(from(z0)))
TOP(ok(and(z0, z1))) → c38(TOP(and(active(z0), z1)), ACTIVE(and(z0, z1)))
TOP(ok(if(z0, z1, z2))) → c38(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(add(z0, z1))) → c38(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(active(z0), z1)), ACTIVE(first(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(z0, active(z1))), ACTIVE(first(z0, z1)))
K tuples:

TOP(mark(z0)) → c37(TOP(proper(z0)), PROPER(z0))
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, S, CONS, FROM, PROPER, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26, c26, c27, c27, c29, c29, c30, c30, c32, c32, c33, c33, c37, c37, c38

(65) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 4 trailing nodes:

TOP(mark(false)) → c37(TOP(ok(false)))
TOP(mark(nil)) → c37(TOP(ok(nil)))
TOP(mark(0)) → c37(TOP(ok(0)))
TOP(mark(true)) → c37(TOP(ok(true)))

(66) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(x1))
PROPER(from(and(z0, z1))) → c33(FROM(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(from(if(z0, z1, z2))) → c33(FROM(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(from(add(z0, z1))) → c33(FROM(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(from(s(z0))) → c33(FROM(s(proper(z0))), PROPER(s(z0)))
PROPER(from(first(z0, z1))) → c33(FROM(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(from(cons(z0, z1))) → c33(FROM(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(from(from(z0))) → c33(FROM(from(proper(z0))), PROPER(from(z0)))
PROPER(from(true)) → c33(FROM(ok(true)))
PROPER(from(false)) → c33(FROM(ok(false)))
PROPER(from(0)) → c33(FROM(ok(0)))
PROPER(from(nil)) → c33(FROM(ok(nil)))
TOP(mark(and(z0, z1))) → c37(TOP(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
TOP(mark(if(z0, z1, z2))) → c37(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(add(z0, z1))) → c37(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(s(z0))) → c37(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(first(z0, z1))) → c37(TOP(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
TOP(mark(cons(z0, z1))) → c37(TOP(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
TOP(mark(from(z0))) → c37(TOP(from(proper(z0))), PROPER(from(z0)))
TOP(ok(and(true, z0))) → c38(TOP(mark(z0)), ACTIVE(and(true, z0)))
TOP(ok(and(false, z0))) → c38(TOP(mark(false)), ACTIVE(and(false, z0)))
TOP(ok(if(true, z0, z1))) → c38(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c38(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(add(0, z0))) → c38(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c38(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(first(0, z0))) → c38(TOP(mark(nil)), ACTIVE(first(0, z0)))
TOP(ok(first(s(z0), cons(z1, z2)))) → c38(TOP(mark(cons(z1, first(z0, z2)))), ACTIVE(first(s(z0), cons(z1, z2))))
TOP(ok(from(z0))) → c38(TOP(mark(cons(z0, from(s(z0))))), ACTIVE(from(z0)))
TOP(ok(and(z0, z1))) → c38(TOP(and(active(z0), z1)), ACTIVE(and(z0, z1)))
TOP(ok(if(z0, z1, z2))) → c38(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(add(z0, z1))) → c38(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(active(z0), z1)), ACTIVE(first(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(z0, active(z1))), ACTIVE(first(z0, z1)))
S tuples:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(x1))
PROPER(from(and(z0, z1))) → c33(FROM(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(from(if(z0, z1, z2))) → c33(FROM(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(from(add(z0, z1))) → c33(FROM(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(from(s(z0))) → c33(FROM(s(proper(z0))), PROPER(s(z0)))
PROPER(from(first(z0, z1))) → c33(FROM(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(from(cons(z0, z1))) → c33(FROM(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(from(from(z0))) → c33(FROM(from(proper(z0))), PROPER(from(z0)))
PROPER(from(true)) → c33(FROM(ok(true)))
PROPER(from(false)) → c33(FROM(ok(false)))
PROPER(from(0)) → c33(FROM(ok(0)))
PROPER(from(nil)) → c33(FROM(ok(nil)))
TOP(ok(and(true, z0))) → c38(TOP(mark(z0)), ACTIVE(and(true, z0)))
TOP(ok(and(false, z0))) → c38(TOP(mark(false)), ACTIVE(and(false, z0)))
TOP(ok(if(true, z0, z1))) → c38(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c38(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(add(0, z0))) → c38(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c38(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(first(0, z0))) → c38(TOP(mark(nil)), ACTIVE(first(0, z0)))
TOP(ok(first(s(z0), cons(z1, z2)))) → c38(TOP(mark(cons(z1, first(z0, z2)))), ACTIVE(first(s(z0), cons(z1, z2))))
TOP(ok(from(z0))) → c38(TOP(mark(cons(z0, from(s(z0))))), ACTIVE(from(z0)))
TOP(ok(and(z0, z1))) → c38(TOP(and(active(z0), z1)), ACTIVE(and(z0, z1)))
TOP(ok(if(z0, z1, z2))) → c38(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(add(z0, z1))) → c38(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(active(z0), z1)), ACTIVE(first(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(z0, active(z1))), ACTIVE(first(z0, z1)))
K tuples:none
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

ACTIVE, AND, IF, ADD, FIRST, S, CONS, FROM, PROPER, TOP

Compound Symbols:

c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36, c8, c, c9, c9, c1, c10, c10, c2, c11, c11, c3, c23, c23, c26, c26, c27, c27, c29, c29, c30, c30, c32, c32, c33, c33, c37, c38

(67) CdtUnreachableProof (EQUIVALENT transformation)

The following tuples could be removed as they are not reachable from basic start terms:

ACTIVE(first(z0, z1)) → c12(FIRST(active(z0), z1), ACTIVE(z0))
ACTIVE(first(z0, z1)) → c13(FIRST(z0, active(z1)), ACTIVE(z1))
ACTIVE(from(z0)) → c8(S(z0))
ACTIVE(add(s(z0), z1)) → c(S(add(z0, z1)))
ACTIVE(add(s(z0), z1)) → c(ADD(z0, z1))
ACTIVE(first(s(z0), cons(z1, z2))) → c(CONS(z1, first(z0, z2)))
ACTIVE(first(s(z0), cons(z1, z2))) → c(FIRST(z0, z2))
ACTIVE(and(first(0, z0), x1)) → c9(AND(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(and(first(s(z0), cons(z1, z2)), x1)) → c9(AND(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(and(and(z0, z1), x1)) → c9(AND(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(and(if(z0, z1, z2), x1)) → c9(AND(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(z0, z1), x1)) → c9(AND(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(first(z0, z1), x1)) → c9(AND(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(and(true, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(and(false, z0), x1)) → c9(AND(mark(false), x1))
ACTIVE(and(from(z0), x1)) → c1(AND(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(and(from(z0), x1)) → c1(ACTIVE(from(z0)))
ACTIVE(if(first(0, z0), x1, x2)) → c10(IF(mark(nil), x1, x2), ACTIVE(first(0, z0)))
ACTIVE(if(first(s(z0), cons(z1, z2)), x1, x2)) → c10(IF(mark(cons(z1, first(z0, z2))), x1, x2), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(if(and(z0, z1), x1, x2)) → c10(IF(and(active(z0), z1), x1, x2), ACTIVE(and(z0, z1)))
ACTIVE(if(if(z0, z1, z2), x1, x2)) → c10(IF(if(active(z0), z1, z2), x1, x2), ACTIVE(if(z0, z1, z2)))
ACTIVE(if(add(z0, z1), x1, x2)) → c10(IF(add(active(z0), z1), x1, x2), ACTIVE(add(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(active(z0), z1), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(if(first(z0, z1), x1, x2)) → c10(IF(first(z0, active(z1)), x1, x2), ACTIVE(first(z0, z1)))
ACTIVE(and(if(true, z0, z1), x1)) → c9(AND(mark(z0), x1))
ACTIVE(and(if(false, z0, z1), x1)) → c9(AND(mark(z1), x1))
ACTIVE(if(and(true, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(and(false, z0), x1, x2)) → c10(IF(mark(false), x1, x2))
ACTIVE(if(if(true, z0, z1), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(if(if(false, z0, z1), x1, x2)) → c10(IF(mark(z1), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(IF(mark(cons(z0, from(s(z0)))), x1, x2))
ACTIVE(if(from(z0), x1, x2)) → c2(ACTIVE(from(z0)))
ACTIVE(add(first(0, z0), x1)) → c11(ADD(mark(nil), x1), ACTIVE(first(0, z0)))
ACTIVE(add(first(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(and(z0, z1), x1)) → c11(ADD(and(active(z0), z1), x1), ACTIVE(and(z0, z1)))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(add(add(z0, z1), x1)) → c11(ADD(add(active(z0), z1), x1), ACTIVE(add(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(active(z0), z1), x1), ACTIVE(first(z0, z1)))
ACTIVE(add(first(z0, z1), x1)) → c11(ADD(first(z0, active(z1)), x1), ACTIVE(first(z0, z1)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
ACTIVE(add(and(true, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(and(false, z0), x1)) → c11(ADD(mark(false), x1))
ACTIVE(add(if(true, z0, z1), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(add(if(false, z0, z1), x1)) → c11(ADD(mark(z1), x1))
ACTIVE(add(add(0, z0), x1)) → c11(ADD(mark(z0), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(AND(mark(s(add(z0, z1))), x1))
ACTIVE(and(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(IF(mark(s(add(z0, z1))), x1, x2))
ACTIVE(if(add(s(z0), z1), x1, x2)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ADD(mark(s(add(z0, z1))), x1))
ACTIVE(add(add(s(z0), z1), x1)) → c3(ACTIVE(add(s(z0), z1)))
ACTIVE(add(from(z0), x1)) → c3(ADD(mark(cons(z0, from(s(z0)))), x1))
ACTIVE(add(from(z0), x1)) → c3(ACTIVE(from(z0)))
PROPER(and(x0, and(z0, z1))) → c23(AND(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(and(x0, if(z0, z1, z2))) → c23(AND(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(and(x0, add(z0, z1))) → c23(AND(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(and(x0, s(z0))) → c23(AND(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(and(x0, first(z0, z1))) → c23(AND(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(and(x0, cons(z0, z1))) → c23(AND(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(and(x0, from(z0))) → c23(AND(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(and(and(z0, z1), x1)) → c23(AND(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(and(if(z0, z1, z2), x1)) → c23(AND(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(and(add(z0, z1), x1)) → c23(AND(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(and(s(z0), x1)) → c23(AND(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(and(first(z0, z1), x1)) → c23(AND(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(and(cons(z0, z1), x1)) → c23(AND(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(and(from(z0), x1)) → c23(AND(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(and(x0, true)) → c23(AND(proper(x0), ok(true)), PROPER(x0))
PROPER(and(x0, false)) → c23(AND(proper(x0), ok(false)), PROPER(x0))
PROPER(and(x0, 0)) → c23(AND(proper(x0), ok(0)), PROPER(x0))
PROPER(and(x0, nil)) → c23(AND(proper(x0), ok(nil)), PROPER(x0))
PROPER(and(true, x1)) → c23(AND(ok(true), proper(x1)), PROPER(x1))
PROPER(and(false, x1)) → c23(AND(ok(false), proper(x1)), PROPER(x1))
PROPER(and(0, x1)) → c23(AND(ok(0), proper(x1)), PROPER(x1))
PROPER(and(nil, x1)) → c23(AND(ok(nil), proper(x1)), PROPER(x1))
PROPER(if(x0, x1, and(z0, z1))) → c26(IF(proper(x0), proper(x1), and(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(and(z0, z1)))
PROPER(if(x0, x1, if(z0, z1, z2))) → c26(IF(proper(x0), proper(x1), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(x1), PROPER(if(z0, z1, z2)))
PROPER(if(x0, x1, add(z0, z1))) → c26(IF(proper(x0), proper(x1), add(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(add(z0, z1)))
PROPER(if(x0, x1, s(z0))) → c26(IF(proper(x0), proper(x1), s(proper(z0))), PROPER(x0), PROPER(x1), PROPER(s(z0)))
PROPER(if(x0, x1, first(z0, z1))) → c26(IF(proper(x0), proper(x1), first(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(first(z0, z1)))
PROPER(if(x0, x1, cons(z0, z1))) → c26(IF(proper(x0), proper(x1), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(x1), PROPER(cons(z0, z1)))
PROPER(if(x0, x1, from(z0))) → c26(IF(proper(x0), proper(x1), from(proper(z0))), PROPER(x0), PROPER(x1), PROPER(from(z0)))
PROPER(if(x0, and(z0, z1), x2)) → c26(IF(proper(x0), and(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(and(z0, z1)), PROPER(x2))
PROPER(if(x0, if(z0, z1, z2), x2)) → c26(IF(proper(x0), if(proper(z0), proper(z1), proper(z2)), proper(x2)), PROPER(x0), PROPER(if(z0, z1, z2)), PROPER(x2))
PROPER(if(x0, add(z0, z1), x2)) → c26(IF(proper(x0), add(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(add(z0, z1)), PROPER(x2))
PROPER(if(x0, s(z0), x2)) → c26(IF(proper(x0), s(proper(z0)), proper(x2)), PROPER(x0), PROPER(s(z0)), PROPER(x2))
PROPER(if(x0, first(z0, z1), x2)) → c26(IF(proper(x0), first(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(first(z0, z1)), PROPER(x2))
PROPER(if(x0, cons(z0, z1), x2)) → c26(IF(proper(x0), cons(proper(z0), proper(z1)), proper(x2)), PROPER(x0), PROPER(cons(z0, z1)), PROPER(x2))
PROPER(if(x0, from(z0), x2)) → c26(IF(proper(x0), from(proper(z0)), proper(x2)), PROPER(x0), PROPER(from(z0)), PROPER(x2))
PROPER(if(and(z0, z1), x1, x2)) → c26(IF(and(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(and(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(if(z0, z1, z2), x1, x2)) → c26(IF(if(proper(z0), proper(z1), proper(z2)), proper(x1), proper(x2)), PROPER(if(z0, z1, z2)), PROPER(x1), PROPER(x2))
PROPER(if(add(z0, z1), x1, x2)) → c26(IF(add(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(add(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(s(z0), x1, x2)) → c26(IF(s(proper(z0)), proper(x1), proper(x2)), PROPER(s(z0)), PROPER(x1), PROPER(x2))
PROPER(if(first(z0, z1), x1, x2)) → c26(IF(first(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(first(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(cons(z0, z1), x1, x2)) → c26(IF(cons(proper(z0), proper(z1)), proper(x1), proper(x2)), PROPER(cons(z0, z1)), PROPER(x1), PROPER(x2))
PROPER(if(from(z0), x1, x2)) → c26(IF(from(proper(z0)), proper(x1), proper(x2)), PROPER(from(z0)), PROPER(x1), PROPER(x2))
PROPER(if(x0, x1, true)) → c26(IF(proper(x0), proper(x1), ok(true)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, false)) → c26(IF(proper(x0), proper(x1), ok(false)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, 0)) → c26(IF(proper(x0), proper(x1), ok(0)), PROPER(x0), PROPER(x1))
PROPER(if(x0, x1, nil)) → c26(IF(proper(x0), proper(x1), ok(nil)), PROPER(x0), PROPER(x1))
PROPER(if(x0, true, x2)) → c26(IF(proper(x0), ok(true), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, false, x2)) → c26(IF(proper(x0), ok(false), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, 0, x2)) → c26(IF(proper(x0), ok(0), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(x0, nil, x2)) → c26(IF(proper(x0), ok(nil), proper(x2)), PROPER(x0), PROPER(x2))
PROPER(if(true, x1, x2)) → c26(IF(ok(true), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(false, x1, x2)) → c26(IF(ok(false), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(0, x1, x2)) → c26(IF(ok(0), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(if(nil, x1, x2)) → c26(IF(ok(nil), proper(x1), proper(x2)), PROPER(x1), PROPER(x2))
PROPER(add(x0, and(z0, z1))) → c27(ADD(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(add(x0, if(z0, z1, z2))) → c27(ADD(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(add(x0, add(z0, z1))) → c27(ADD(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(add(x0, s(z0))) → c27(ADD(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(add(x0, first(z0, z1))) → c27(ADD(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(add(x0, cons(z0, z1))) → c27(ADD(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(add(x0, from(z0))) → c27(ADD(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(add(and(z0, z1), x1)) → c27(ADD(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(add(if(z0, z1, z2), x1)) → c27(ADD(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(add(add(z0, z1), x1)) → c27(ADD(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(add(s(z0), x1)) → c27(ADD(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(add(first(z0, z1), x1)) → c27(ADD(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(add(cons(z0, z1), x1)) → c27(ADD(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(add(from(z0), x1)) → c27(ADD(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(add(x0, true)) → c27(ADD(proper(x0), ok(true)), PROPER(x0))
PROPER(add(x0, false)) → c27(ADD(proper(x0), ok(false)), PROPER(x0))
PROPER(add(x0, 0)) → c27(ADD(proper(x0), ok(0)), PROPER(x0))
PROPER(add(x0, nil)) → c27(ADD(proper(x0), ok(nil)), PROPER(x0))
PROPER(add(true, x1)) → c27(ADD(ok(true), proper(x1)), PROPER(x1))
PROPER(add(false, x1)) → c27(ADD(ok(false), proper(x1)), PROPER(x1))
PROPER(add(0, x1)) → c27(ADD(ok(0), proper(x1)), PROPER(x1))
PROPER(add(nil, x1)) → c27(ADD(ok(nil), proper(x1)), PROPER(x1))
PROPER(s(and(z0, z1))) → c29(S(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(s(if(z0, z1, z2))) → c29(S(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(s(add(z0, z1))) → c29(S(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(s(s(z0))) → c29(S(s(proper(z0))), PROPER(s(z0)))
PROPER(s(first(z0, z1))) → c29(S(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(s(cons(z0, z1))) → c29(S(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(s(from(z0))) → c29(S(from(proper(z0))), PROPER(from(z0)))
PROPER(s(true)) → c29(S(ok(true)))
PROPER(s(false)) → c29(S(ok(false)))
PROPER(s(0)) → c29(S(ok(0)))
PROPER(s(nil)) → c29(S(ok(nil)))
PROPER(first(x0, and(z0, z1))) → c30(FIRST(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(first(x0, if(z0, z1, z2))) → c30(FIRST(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(first(x0, add(z0, z1))) → c30(FIRST(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(first(x0, s(z0))) → c30(FIRST(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(first(x0, first(z0, z1))) → c30(FIRST(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(first(x0, cons(z0, z1))) → c30(FIRST(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(first(x0, from(z0))) → c30(FIRST(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(first(and(z0, z1), x1)) → c30(FIRST(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(first(if(z0, z1, z2), x1)) → c30(FIRST(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(first(add(z0, z1), x1)) → c30(FIRST(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(first(s(z0), x1)) → c30(FIRST(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(first(first(z0, z1), x1)) → c30(FIRST(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(first(cons(z0, z1), x1)) → c30(FIRST(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(first(from(z0), x1)) → c30(FIRST(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(first(x0, true)) → c30(FIRST(proper(x0), ok(true)), PROPER(x0))
PROPER(first(x0, false)) → c30(FIRST(proper(x0), ok(false)), PROPER(x0))
PROPER(first(x0, 0)) → c30(FIRST(proper(x0), ok(0)), PROPER(x0))
PROPER(first(x0, nil)) → c30(FIRST(proper(x0), ok(nil)), PROPER(x0))
PROPER(first(true, x1)) → c30(FIRST(ok(true), proper(x1)), PROPER(x1))
PROPER(first(false, x1)) → c30(FIRST(ok(false), proper(x1)), PROPER(x1))
PROPER(first(0, x1)) → c30(FIRST(ok(0), proper(x1)), PROPER(x1))
PROPER(first(nil, x1)) → c30(FIRST(ok(nil), proper(x1)), PROPER(x1))
PROPER(cons(x0, and(z0, z1))) → c32(CONS(proper(x0), and(proper(z0), proper(z1))), PROPER(x0), PROPER(and(z0, z1)))
PROPER(cons(x0, if(z0, z1, z2))) → c32(CONS(proper(x0), if(proper(z0), proper(z1), proper(z2))), PROPER(x0), PROPER(if(z0, z1, z2)))
PROPER(cons(x0, add(z0, z1))) → c32(CONS(proper(x0), add(proper(z0), proper(z1))), PROPER(x0), PROPER(add(z0, z1)))
PROPER(cons(x0, s(z0))) → c32(CONS(proper(x0), s(proper(z0))), PROPER(x0), PROPER(s(z0)))
PROPER(cons(x0, first(z0, z1))) → c32(CONS(proper(x0), first(proper(z0), proper(z1))), PROPER(x0), PROPER(first(z0, z1)))
PROPER(cons(x0, cons(z0, z1))) → c32(CONS(proper(x0), cons(proper(z0), proper(z1))), PROPER(x0), PROPER(cons(z0, z1)))
PROPER(cons(x0, from(z0))) → c32(CONS(proper(x0), from(proper(z0))), PROPER(x0), PROPER(from(z0)))
PROPER(cons(and(z0, z1), x1)) → c32(CONS(and(proper(z0), proper(z1)), proper(x1)), PROPER(and(z0, z1)), PROPER(x1))
PROPER(cons(if(z0, z1, z2), x1)) → c32(CONS(if(proper(z0), proper(z1), proper(z2)), proper(x1)), PROPER(if(z0, z1, z2)), PROPER(x1))
PROPER(cons(add(z0, z1), x1)) → c32(CONS(add(proper(z0), proper(z1)), proper(x1)), PROPER(add(z0, z1)), PROPER(x1))
PROPER(cons(s(z0), x1)) → c32(CONS(s(proper(z0)), proper(x1)), PROPER(s(z0)), PROPER(x1))
PROPER(cons(first(z0, z1), x1)) → c32(CONS(first(proper(z0), proper(z1)), proper(x1)), PROPER(first(z0, z1)), PROPER(x1))
PROPER(cons(cons(z0, z1), x1)) → c32(CONS(cons(proper(z0), proper(z1)), proper(x1)), PROPER(cons(z0, z1)), PROPER(x1))
PROPER(cons(from(z0), x1)) → c32(CONS(from(proper(z0)), proper(x1)), PROPER(from(z0)), PROPER(x1))
PROPER(cons(x0, true)) → c32(CONS(proper(x0), ok(true)), PROPER(x0))
PROPER(cons(x0, false)) → c32(CONS(proper(x0), ok(false)), PROPER(x0))
PROPER(cons(x0, 0)) → c32(CONS(proper(x0), ok(0)), PROPER(x0))
PROPER(cons(x0, nil)) → c32(CONS(proper(x0), ok(nil)), PROPER(x0))
PROPER(cons(true, x1)) → c32(CONS(ok(true), proper(x1)), PROPER(x1))
PROPER(cons(false, x1)) → c32(CONS(ok(false), proper(x1)), PROPER(x1))
PROPER(cons(0, x1)) → c32(CONS(ok(0), proper(x1)), PROPER(x1))
PROPER(cons(nil, x1)) → c32(CONS(ok(nil), proper(x1)), PROPER(x1))
PROPER(from(and(z0, z1))) → c33(FROM(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
PROPER(from(if(z0, z1, z2))) → c33(FROM(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
PROPER(from(add(z0, z1))) → c33(FROM(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
PROPER(from(s(z0))) → c33(FROM(s(proper(z0))), PROPER(s(z0)))
PROPER(from(first(z0, z1))) → c33(FROM(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
PROPER(from(cons(z0, z1))) → c33(FROM(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
PROPER(from(from(z0))) → c33(FROM(from(proper(z0))), PROPER(from(z0)))
PROPER(from(true)) → c33(FROM(ok(true)))
PROPER(from(false)) → c33(FROM(ok(false)))
PROPER(from(0)) → c33(FROM(ok(0)))
PROPER(from(nil)) → c33(FROM(ok(nil)))
TOP(mark(and(z0, z1))) → c37(TOP(and(proper(z0), proper(z1))), PROPER(and(z0, z1)))
TOP(mark(if(z0, z1, z2))) → c37(TOP(if(proper(z0), proper(z1), proper(z2))), PROPER(if(z0, z1, z2)))
TOP(mark(add(z0, z1))) → c37(TOP(add(proper(z0), proper(z1))), PROPER(add(z0, z1)))
TOP(mark(s(z0))) → c37(TOP(s(proper(z0))), PROPER(s(z0)))
TOP(mark(first(z0, z1))) → c37(TOP(first(proper(z0), proper(z1))), PROPER(first(z0, z1)))
TOP(mark(cons(z0, z1))) → c37(TOP(cons(proper(z0), proper(z1))), PROPER(cons(z0, z1)))
TOP(mark(from(z0))) → c37(TOP(from(proper(z0))), PROPER(from(z0)))
TOP(ok(and(true, z0))) → c38(TOP(mark(z0)), ACTIVE(and(true, z0)))
TOP(ok(and(false, z0))) → c38(TOP(mark(false)), ACTIVE(and(false, z0)))
TOP(ok(if(true, z0, z1))) → c38(TOP(mark(z0)), ACTIVE(if(true, z0, z1)))
TOP(ok(if(false, z0, z1))) → c38(TOP(mark(z1)), ACTIVE(if(false, z0, z1)))
TOP(ok(add(0, z0))) → c38(TOP(mark(z0)), ACTIVE(add(0, z0)))
TOP(ok(add(s(z0), z1))) → c38(TOP(mark(s(add(z0, z1)))), ACTIVE(add(s(z0), z1)))
TOP(ok(first(0, z0))) → c38(TOP(mark(nil)), ACTIVE(first(0, z0)))
TOP(ok(first(s(z0), cons(z1, z2)))) → c38(TOP(mark(cons(z1, first(z0, z2)))), ACTIVE(first(s(z0), cons(z1, z2))))
TOP(ok(from(z0))) → c38(TOP(mark(cons(z0, from(s(z0))))), ACTIVE(from(z0)))
TOP(ok(and(z0, z1))) → c38(TOP(and(active(z0), z1)), ACTIVE(and(z0, z1)))
TOP(ok(if(z0, z1, z2))) → c38(TOP(if(active(z0), z1, z2)), ACTIVE(if(z0, z1, z2)))
TOP(ok(add(z0, z1))) → c38(TOP(add(active(z0), z1)), ACTIVE(add(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(active(z0), z1)), ACTIVE(first(z0, z1)))
TOP(ok(first(z0, z1))) → c38(TOP(first(z0, active(z1))), ACTIVE(first(z0, z1)))

(68) Obligation:

Complexity Dependency Tuples Problem
Rules:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
S tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
K tuples:none
Defined Rule Symbols:

active, s, add, cons, first, and, if, proper, from

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36

(69) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
active(and(z0, z1)) → and(active(z0), z1)
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(add(z0, z1)) → add(active(z0), z1)
active(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
add(mark(z0), z1) → mark(add(z0, z1))
add(ok(z0), ok(z1)) → ok(add(z0, z1))
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
first(mark(z0), z1) → mark(first(z0, z1))
first(z0, mark(z1)) → mark(first(z0, z1))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
and(mark(z0), z1) → mark(and(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(and(z0, z1)) → and(proper(z0), proper(z1))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
proper(add(z0, z1)) → add(proper(z0), proper(z1))
proper(0) → ok(0)
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
proper(nil) → ok(nil)
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
proper(from(z0)) → from(proper(z0))
from(ok(z0)) → ok(from(z0))

(70) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
S tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36

(71) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
We considered the (Usable) Rules:none
And the Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ADD(x1, x2)) = [5]x2   
POL(AND(x1, x2)) = [4]x2   
POL(CONS(x1, x2)) = [3]x1 + [4]x2   
POL(FIRST(x1, x2)) = 0   
POL(FROM(x1)) = [2]x1   
POL(IF(x1, x2, x3)) = [2]x2   
POL(S(x1)) = [3]x1   
POL(c14(x1)) = x1   
POL(c15(x1)) = x1   
POL(c16(x1)) = x1   
POL(c17(x1)) = x1   
POL(c18(x1)) = x1   
POL(c19(x1)) = x1   
POL(c20(x1)) = x1   
POL(c21(x1)) = x1   
POL(c22(x1)) = x1   
POL(c34(x1)) = x1   
POL(c35(x1)) = x1   
POL(c36(x1)) = x1   
POL(mark(x1)) = [5]   
POL(ok(x1)) = [1] + x1   

(72) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
S tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
K tuples:

AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
Defined Rule Symbols:none

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36

(73) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
We considered the (Usable) Rules:none
And the Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ADD(x1, x2)) = 0   
POL(AND(x1, x2)) = [4]x2   
POL(CONS(x1, x2)) = 0   
POL(FIRST(x1, x2)) = 0   
POL(FROM(x1)) = [2]x1   
POL(IF(x1, x2, x3)) = [4]x1 + [4]x3   
POL(S(x1)) = 0   
POL(c14(x1)) = x1   
POL(c15(x1)) = x1   
POL(c16(x1)) = x1   
POL(c17(x1)) = x1   
POL(c18(x1)) = x1   
POL(c19(x1)) = x1   
POL(c20(x1)) = x1   
POL(c21(x1)) = x1   
POL(c22(x1)) = x1   
POL(c34(x1)) = x1   
POL(c35(x1)) = x1   
POL(c36(x1)) = x1   
POL(mark(x1)) = [4] + x1   
POL(ok(x1)) = [2] + x1   

(74) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
S tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
K tuples:

AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
Defined Rule Symbols:none

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36

(75) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

AND(mark(z0), z1) → c14(AND(z0, z1))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ADD(x1, x2)) = [4]x1 + [3]x2   
POL(AND(x1, x2)) = [4]x1   
POL(CONS(x1, x2)) = [4]x1 + [3]x2   
POL(FIRST(x1, x2)) = [4]x1   
POL(FROM(x1)) = [3]x1   
POL(IF(x1, x2, x3)) = [4]x1 + [3]x3   
POL(S(x1)) = [4]x1   
POL(c14(x1)) = x1   
POL(c15(x1)) = x1   
POL(c16(x1)) = x1   
POL(c17(x1)) = x1   
POL(c18(x1)) = x1   
POL(c19(x1)) = x1   
POL(c20(x1)) = x1   
POL(c21(x1)) = x1   
POL(c22(x1)) = x1   
POL(c34(x1)) = x1   
POL(c35(x1)) = x1   
POL(c36(x1)) = x1   
POL(mark(x1)) = [4] + x1   
POL(ok(x1)) = [1] + x1   

(76) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
S tuples:

FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
K tuples:

AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
AND(mark(z0), z1) → c14(AND(z0, z1))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
Defined Rule Symbols:none

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36

(77) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ADD(x1, x2)) = [4]x1 + [2]x2   
POL(AND(x1, x2)) = [4]x1   
POL(CONS(x1, x2)) = [3]x2   
POL(FIRST(x1, x2)) = [4]x1 + x2   
POL(FROM(x1)) = [2]x1   
POL(IF(x1, x2, x3)) = [4]x3   
POL(S(x1)) = [3]x1   
POL(c14(x1)) = x1   
POL(c15(x1)) = x1   
POL(c16(x1)) = x1   
POL(c17(x1)) = x1   
POL(c18(x1)) = x1   
POL(c19(x1)) = x1   
POL(c20(x1)) = x1   
POL(c21(x1)) = x1   
POL(c22(x1)) = x1   
POL(c34(x1)) = x1   
POL(c35(x1)) = x1   
POL(c36(x1)) = x1   
POL(mark(x1)) = [1] + x1   
POL(ok(x1)) = x1   

(78) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

AND(mark(z0), z1) → c14(AND(z0, z1))
AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
S tuples:none
K tuples:

AND(ok(z0), ok(z1)) → c15(AND(z0, z1))
IF(ok(z0), ok(z1), ok(z2)) → c17(IF(z0, z1, z2))
ADD(ok(z0), ok(z1)) → c19(ADD(z0, z1))
S(ok(z0)) → c34(S(z0))
CONS(ok(z0), ok(z1)) → c35(CONS(z0, z1))
FROM(ok(z0)) → c36(FROM(z0))
IF(mark(z0), z1, z2) → c16(IF(z0, z1, z2))
AND(mark(z0), z1) → c14(AND(z0, z1))
ADD(mark(z0), z1) → c18(ADD(z0, z1))
FIRST(mark(z0), z1) → c20(FIRST(z0, z1))
FIRST(ok(z0), ok(z1)) → c22(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c21(FIRST(z0, z1))
Defined Rule Symbols:none

Defined Pair Symbols:

AND, IF, ADD, FIRST, S, CONS, FROM

Compound Symbols:

c14, c15, c16, c17, c18, c19, c20, c21, c22, c34, c35, c36

(79) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(80) BOUNDS(1, 1)