(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

concat(leaf, Y) → Y
concat(cons(U, V), Y) → cons(U, concat(V, Y))
lessleaves(X, leaf) → false
lessleaves(leaf, cons(W, Z)) → true
lessleaves(cons(U, V), cons(W, Z)) → lessleaves(concat(U, V), concat(W, Z))

Rewrite Strategy: INNERMOST

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

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

concat(leaf, z0) → z0
concat(cons(z0, z1), z2) → cons(z0, concat(z1, z2))
lessleaves(z0, leaf) → false
lessleaves(leaf, cons(z0, z1)) → true
lessleaves(cons(z0, z1), cons(z2, z3)) → lessleaves(concat(z0, z1), concat(z2, z3))
Tuples:

CONCAT(cons(z0, z1), z2) → c1(CONCAT(z1, z2))
LESSLEAVES(cons(z0, z1), cons(z2, z3)) → c4(LESSLEAVES(concat(z0, z1), concat(z2, z3)), CONCAT(z0, z1), CONCAT(z2, z3))
S tuples:

CONCAT(cons(z0, z1), z2) → c1(CONCAT(z1, z2))
LESSLEAVES(cons(z0, z1), cons(z2, z3)) → c4(LESSLEAVES(concat(z0, z1), concat(z2, z3)), CONCAT(z0, z1), CONCAT(z2, z3))
K tuples:none
Defined Rule Symbols:

concat, lessleaves

Defined Pair Symbols:

CONCAT, LESSLEAVES

Compound Symbols:

c1, c4

(3) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

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

LESSLEAVES(cons(z0, z1), cons(z2, z3)) → c4(LESSLEAVES(concat(z0, z1), concat(z2, z3)), CONCAT(z0, z1), CONCAT(z2, z3))
We considered the (Usable) Rules:

concat(leaf, z0) → z0
concat(cons(z0, z1), z2) → cons(z0, concat(z1, z2))
And the Tuples:

CONCAT(cons(z0, z1), z2) → c1(CONCAT(z1, z2))
LESSLEAVES(cons(z0, z1), cons(z2, z3)) → c4(LESSLEAVES(concat(z0, z1), concat(z2, z3)), CONCAT(z0, z1), CONCAT(z2, z3))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(CONCAT(x1, x2)) = 0   
POL(LESSLEAVES(x1, x2)) = x1   
POL(c1(x1)) = x1   
POL(c4(x1, x2, x3)) = x1 + x2 + x3   
POL(concat(x1, x2)) = [1] + x1 + x2   
POL(cons(x1, x2)) = [2] + x1 + x2   
POL(leaf) = 0   

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

concat(leaf, z0) → z0
concat(cons(z0, z1), z2) → cons(z0, concat(z1, z2))
lessleaves(z0, leaf) → false
lessleaves(leaf, cons(z0, z1)) → true
lessleaves(cons(z0, z1), cons(z2, z3)) → lessleaves(concat(z0, z1), concat(z2, z3))
Tuples:

CONCAT(cons(z0, z1), z2) → c1(CONCAT(z1, z2))
LESSLEAVES(cons(z0, z1), cons(z2, z3)) → c4(LESSLEAVES(concat(z0, z1), concat(z2, z3)), CONCAT(z0, z1), CONCAT(z2, z3))
S tuples:

CONCAT(cons(z0, z1), z2) → c1(CONCAT(z1, z2))
K tuples:

LESSLEAVES(cons(z0, z1), cons(z2, z3)) → c4(LESSLEAVES(concat(z0, z1), concat(z2, z3)), CONCAT(z0, z1), CONCAT(z2, z3))
Defined Rule Symbols:

concat, lessleaves

Defined Pair Symbols:

CONCAT, LESSLEAVES

Compound Symbols:

c1, c4

(5) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)

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

CONCAT(cons(z0, z1), z2) → c1(CONCAT(z1, z2))
We considered the (Usable) Rules:

concat(leaf, z0) → z0
concat(cons(z0, z1), z2) → cons(z0, concat(z1, z2))
And the Tuples:

CONCAT(cons(z0, z1), z2) → c1(CONCAT(z1, z2))
LESSLEAVES(cons(z0, z1), cons(z2, z3)) → c4(LESSLEAVES(concat(z0, z1), concat(z2, z3)), CONCAT(z0, z1), CONCAT(z2, z3))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(CONCAT(x1, x2)) = x1 + x2   
POL(LESSLEAVES(x1, x2)) = x2 + x22 + [2]x12   
POL(c1(x1)) = x1   
POL(c4(x1, x2, x3)) = x1 + x2 + x3   
POL(concat(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = [1] + x1 + x2   
POL(leaf) = 0   

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

concat(leaf, z0) → z0
concat(cons(z0, z1), z2) → cons(z0, concat(z1, z2))
lessleaves(z0, leaf) → false
lessleaves(leaf, cons(z0, z1)) → true
lessleaves(cons(z0, z1), cons(z2, z3)) → lessleaves(concat(z0, z1), concat(z2, z3))
Tuples:

CONCAT(cons(z0, z1), z2) → c1(CONCAT(z1, z2))
LESSLEAVES(cons(z0, z1), cons(z2, z3)) → c4(LESSLEAVES(concat(z0, z1), concat(z2, z3)), CONCAT(z0, z1), CONCAT(z2, z3))
S tuples:none
K tuples:

LESSLEAVES(cons(z0, z1), cons(z2, z3)) → c4(LESSLEAVES(concat(z0, z1), concat(z2, z3)), CONCAT(z0, z1), CONCAT(z2, z3))
CONCAT(cons(z0, z1), z2) → c1(CONCAT(z1, z2))
Defined Rule Symbols:

concat, lessleaves

Defined Pair Symbols:

CONCAT, LESSLEAVES

Compound Symbols:

c1, c4

(7) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(8) BOUNDS(O(1), O(1))