### (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(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(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))
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(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))
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(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(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))
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(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(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(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))
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(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(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(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))
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(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(false) → c25
ACTIVE(and(true, z0)) → c
PROPER(0) → c28
ACTIVE(and(false, z0)) → c1
PROPER(true) → c24
PROPER(nil) → c31
ACTIVE(if(true, z0, z1)) → c2
ACTIVE(if(false, z0, z1)) → c3
ACTIVE(first(0, z0)) → c6

### (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(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(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))
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(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(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(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))
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(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(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(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))
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(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(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(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))
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(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(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(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))
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(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(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(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))
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(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(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(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))
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(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(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))
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(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(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(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))
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(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(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(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(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
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(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(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))
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(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(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(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))
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(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(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(O(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(false) → ok(false)
active(and(z0, z1)) → and(active(z0), z1)
first(mark(z0), z1) → mark(first(z0, z1))
active(and(true, z0)) → mark(z0)
cons(ok(z0), ok(z1)) → ok(cons(z0, z1))
active(if(false, z0, z1)) → mark(z1)
proper(if(z0, z1, z2)) → if(proper(z0), proper(z1), proper(z2))
first(ok(z0), ok(z1)) → ok(first(z0, z1))
active(first(0, z0)) → mark(nil)
and(mark(z0), z1) → mark(and(z0, z1))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
proper(0) → ok(0)
proper(nil) → ok(nil)
s(ok(z0)) → ok(s(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
proper(true) → ok(true)
active(and(false, z0)) → mark(false)
proper(and(z0, z1)) → and(proper(z0), proper(z1))
active(if(z0, z1, z2)) → if(active(z0), z1, z2)
active(first(z0, z1)) → first(active(z0), z1)
active(from(z0)) → mark(cons(z0, from(s(z0))))
proper(s(z0)) → s(proper(z0))
proper(first(z0, z1)) → first(proper(z0), proper(z1))
first(z0, mark(z1)) → mark(first(z0, z1))
and(ok(z0), ok(z1)) → ok(and(z0, z1))
from(ok(z0)) → ok(from(z0))
active(first(z0, z1)) → first(z0, active(z1))
proper(from(z0)) → from(proper(z0))
proper(cons(z0, z1)) → cons(proper(z0), proper(z1))
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(if(true, z0, z1)) → mark(z0)
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(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))
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(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(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(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(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(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
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(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(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))
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(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(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(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))
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(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(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(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(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(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(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
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(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(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))
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(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(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(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(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(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))
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(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(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(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(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(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(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
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(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(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))
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(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(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(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(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(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))
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(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(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(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(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(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(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
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(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(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))
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(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(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(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(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(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))
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(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(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(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(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(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(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(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(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
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(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))
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(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(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(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(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(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(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(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))
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(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(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(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(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(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(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(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(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
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(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))
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(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(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(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(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(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(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))
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(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(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(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(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(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(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(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
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(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))
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(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(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(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(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(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))
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(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(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(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(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)

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(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))

### (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(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(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
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(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))
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(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(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(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(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(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
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))
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(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(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(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(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(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, 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:

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(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(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
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(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))
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(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(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(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(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(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, 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))
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(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(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(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(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(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), 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:

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(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(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
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(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))
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(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(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(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(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(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, 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))
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(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(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(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(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(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), 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:

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, 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(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(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(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
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(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))
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(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(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(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(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(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
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, 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(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))
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(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(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(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(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(s(z0), cons(z1, z2)), x1)) → c11(ADD(mark(cons(z1, first(z0, z2))), x1), ACTIVE(first(s(z0), cons(z1, z2))))
ACTIVE(add(if(z0, z1, z2), x1)) → c11(ADD(if(active(z0), z1, z2), x1), ACTIVE(if(z0, z1, z2)))
ACTIVE(and(add(0, z0), x1)) → c9(AND(mark(z0), x1))
ACTIVE(if(add(0, z0), x1, x2)) → c10(IF(mark(z0), x1, x2))
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, 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(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(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(first(z0, z1)) → first(active(z0), z1)
active(first(z0, z1)) → first(z0, active(z1))
s(ok(z0)) → ok(s(z0))
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(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))
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(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(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)))