(0) Obligation:

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

app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) → sum(app(l, sum(cons(x, cons(y, k)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
sum(plus(cons(0, x), cons(y, l))) → pred(sum(cons(s(x), cons(y, l))))
pred(cons(s(x), nil)) → cons(x, nil)

Rewrite Strategy: INNERMOST

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

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

app(nil, z0) → z0
app(z0, nil) → z0
app(cons(z0, z1), z2) → cons(z0, app(z1, z2))
sum(cons(z0, nil)) → cons(z0, nil)
sum(cons(z0, cons(z1, z2))) → sum(cons(plus(z0, z1), z2))
sum(app(z0, cons(z1, cons(z2, z3)))) → sum(app(z0, sum(cons(z1, cons(z2, z3)))))
sum(plus(cons(0, z0), cons(z1, z2))) → pred(sum(cons(s(z0), cons(z1, z2))))
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
pred(cons(s(z0), nil)) → cons(z0, nil)
Tuples:

APP(nil, z0) → c
APP(z0, nil) → c1
APP(cons(z0, z1), z2) → c2(APP(z1, z2))
SUM(cons(z0, nil)) → c3
SUM(cons(z0, cons(z1, z2))) → c4(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
SUM(app(z0, cons(z1, cons(z2, z3)))) → c5(SUM(app(z0, sum(cons(z1, cons(z2, z3))))), APP(z0, sum(cons(z1, cons(z2, z3)))), SUM(cons(z1, cons(z2, z3))))
SUM(plus(cons(0, z0), cons(z1, z2))) → c6(PRED(sum(cons(s(z0), cons(z1, z2)))), SUM(cons(s(z0), cons(z1, z2))))
PLUS(0, z0) → c7
PLUS(s(z0), z1) → c8(PLUS(z0, z1))
PRED(cons(s(z0), nil)) → c9
S tuples:

APP(nil, z0) → c
APP(z0, nil) → c1
APP(cons(z0, z1), z2) → c2(APP(z1, z2))
SUM(cons(z0, nil)) → c3
SUM(cons(z0, cons(z1, z2))) → c4(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
SUM(app(z0, cons(z1, cons(z2, z3)))) → c5(SUM(app(z0, sum(cons(z1, cons(z2, z3))))), APP(z0, sum(cons(z1, cons(z2, z3)))), SUM(cons(z1, cons(z2, z3))))
SUM(plus(cons(0, z0), cons(z1, z2))) → c6(PRED(sum(cons(s(z0), cons(z1, z2)))), SUM(cons(s(z0), cons(z1, z2))))
PLUS(0, z0) → c7
PLUS(s(z0), z1) → c8(PLUS(z0, z1))
PRED(cons(s(z0), nil)) → c9
K tuples:none
Defined Rule Symbols:

app, sum, plus, pred

Defined Pair Symbols:

APP, SUM, PLUS, PRED

Compound Symbols:

c, c1, c2, c3, c4, c5, c6, c7, c8, c9

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

Removed 5 trailing nodes:

APP(nil, z0) → c
APP(z0, nil) → c1
SUM(cons(z0, nil)) → c3
PRED(cons(s(z0), nil)) → c9
PLUS(0, z0) → c7

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

app(nil, z0) → z0
app(z0, nil) → z0
app(cons(z0, z1), z2) → cons(z0, app(z1, z2))
sum(cons(z0, nil)) → cons(z0, nil)
sum(cons(z0, cons(z1, z2))) → sum(cons(plus(z0, z1), z2))
sum(app(z0, cons(z1, cons(z2, z3)))) → sum(app(z0, sum(cons(z1, cons(z2, z3)))))
sum(plus(cons(0, z0), cons(z1, z2))) → pred(sum(cons(s(z0), cons(z1, z2))))
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
pred(cons(s(z0), nil)) → cons(z0, nil)
Tuples:

APP(cons(z0, z1), z2) → c2(APP(z1, z2))
SUM(cons(z0, cons(z1, z2))) → c4(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
SUM(app(z0, cons(z1, cons(z2, z3)))) → c5(SUM(app(z0, sum(cons(z1, cons(z2, z3))))), APP(z0, sum(cons(z1, cons(z2, z3)))), SUM(cons(z1, cons(z2, z3))))
SUM(plus(cons(0, z0), cons(z1, z2))) → c6(PRED(sum(cons(s(z0), cons(z1, z2)))), SUM(cons(s(z0), cons(z1, z2))))
PLUS(s(z0), z1) → c8(PLUS(z0, z1))
S tuples:

APP(cons(z0, z1), z2) → c2(APP(z1, z2))
SUM(cons(z0, cons(z1, z2))) → c4(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
SUM(app(z0, cons(z1, cons(z2, z3)))) → c5(SUM(app(z0, sum(cons(z1, cons(z2, z3))))), APP(z0, sum(cons(z1, cons(z2, z3)))), SUM(cons(z1, cons(z2, z3))))
SUM(plus(cons(0, z0), cons(z1, z2))) → c6(PRED(sum(cons(s(z0), cons(z1, z2)))), SUM(cons(s(z0), cons(z1, z2))))
PLUS(s(z0), z1) → c8(PLUS(z0, z1))
K tuples:none
Defined Rule Symbols:

app, sum, plus, pred

Defined Pair Symbols:

APP, SUM, PLUS

Compound Symbols:

c2, c4, c5, c6, c8

(5) CdtUnreachableProof (EQUIVALENT transformation)

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

SUM(app(z0, cons(z1, cons(z2, z3)))) → c5(SUM(app(z0, sum(cons(z1, cons(z2, z3))))), APP(z0, sum(cons(z1, cons(z2, z3)))), SUM(cons(z1, cons(z2, z3))))
SUM(plus(cons(0, z0), cons(z1, z2))) → c6(PRED(sum(cons(s(z0), cons(z1, z2)))), SUM(cons(s(z0), cons(z1, z2))))

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

app(nil, z0) → z0
app(z0, nil) → z0
app(cons(z0, z1), z2) → cons(z0, app(z1, z2))
sum(cons(z0, nil)) → cons(z0, nil)
sum(cons(z0, cons(z1, z2))) → sum(cons(plus(z0, z1), z2))
sum(app(z0, cons(z1, cons(z2, z3)))) → sum(app(z0, sum(cons(z1, cons(z2, z3)))))
sum(plus(cons(0, z0), cons(z1, z2))) → pred(sum(cons(s(z0), cons(z1, z2))))
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
pred(cons(s(z0), nil)) → cons(z0, nil)
Tuples:

APP(cons(z0, z1), z2) → c2(APP(z1, z2))
SUM(cons(z0, cons(z1, z2))) → c4(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
PLUS(s(z0), z1) → c8(PLUS(z0, z1))
S tuples:

APP(cons(z0, z1), z2) → c2(APP(z1, z2))
SUM(cons(z0, cons(z1, z2))) → c4(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
PLUS(s(z0), z1) → c8(PLUS(z0, z1))
K tuples:none
Defined Rule Symbols:

app, sum, plus, pred

Defined Pair Symbols:

APP, SUM, PLUS

Compound Symbols:

c2, c4, c8

(7) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

app(nil, z0) → z0
app(z0, nil) → z0
app(cons(z0, z1), z2) → cons(z0, app(z1, z2))
sum(cons(z0, nil)) → cons(z0, nil)
sum(cons(z0, cons(z1, z2))) → sum(cons(plus(z0, z1), z2))
sum(app(z0, cons(z1, cons(z2, z3)))) → sum(app(z0, sum(cons(z1, cons(z2, z3)))))
sum(plus(cons(0, z0), cons(z1, z2))) → pred(sum(cons(s(z0), cons(z1, z2))))
pred(cons(s(z0), nil)) → cons(z0, nil)

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
Tuples:

APP(cons(z0, z1), z2) → c2(APP(z1, z2))
SUM(cons(z0, cons(z1, z2))) → c4(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
PLUS(s(z0), z1) → c8(PLUS(z0, z1))
S tuples:

APP(cons(z0, z1), z2) → c2(APP(z1, z2))
SUM(cons(z0, cons(z1, z2))) → c4(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
PLUS(s(z0), z1) → c8(PLUS(z0, z1))
K tuples:none
Defined Rule Symbols:

plus

Defined Pair Symbols:

APP, SUM, PLUS

Compound Symbols:

c2, c4, c8

(9) 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.

APP(cons(z0, z1), z2) → c2(APP(z1, z2))
SUM(cons(z0, cons(z1, z2))) → c4(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:

APP(cons(z0, z1), z2) → c2(APP(z1, z2))
SUM(cons(z0, cons(z1, z2))) → c4(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
PLUS(s(z0), z1) → c8(PLUS(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(APP(x1, x2)) = [4]x1   
POL(PLUS(x1, x2)) = [2]   
POL(SUM(x1)) = [4]x1   
POL(c2(x1)) = x1   
POL(c4(x1, x2)) = x1 + x2   
POL(c8(x1)) = x1   
POL(cons(x1, x2)) = [4] + x2   
POL(plus(x1, x2)) = [4] + [4]x1 + x2   
POL(s(x1)) = [3] + x1   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
Tuples:

APP(cons(z0, z1), z2) → c2(APP(z1, z2))
SUM(cons(z0, cons(z1, z2))) → c4(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
PLUS(s(z0), z1) → c8(PLUS(z0, z1))
S tuples:

PLUS(s(z0), z1) → c8(PLUS(z0, z1))
K tuples:

APP(cons(z0, z1), z2) → c2(APP(z1, z2))
SUM(cons(z0, cons(z1, z2))) → c4(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
Defined Rule Symbols:

plus

Defined Pair Symbols:

APP, SUM, PLUS

Compound Symbols:

c2, c4, c8

(11) CdtRuleRemovalProof (UPPER BOUND (ADD(O(n^2))) transformation)

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

PLUS(s(z0), z1) → c8(PLUS(z0, z1))
We considered the (Usable) Rules:

plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
And the Tuples:

APP(cons(z0, z1), z2) → c2(APP(z1, z2))
SUM(cons(z0, cons(z1, z2))) → c4(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
PLUS(s(z0), z1) → c8(PLUS(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(APP(x1, x2)) = [2]x1·x2   
POL(PLUS(x1, x2)) = x1 + [3]x2   
POL(SUM(x1)) = [2]x12   
POL(c2(x1)) = x1   
POL(c4(x1, x2)) = x1 + x2   
POL(c8(x1)) = x1   
POL(cons(x1, x2)) = [2] + x1 + x2   
POL(plus(x1, x2)) = x1 + x2   
POL(s(x1)) = [1] + x1   

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
Tuples:

APP(cons(z0, z1), z2) → c2(APP(z1, z2))
SUM(cons(z0, cons(z1, z2))) → c4(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
PLUS(s(z0), z1) → c8(PLUS(z0, z1))
S tuples:none
K tuples:

APP(cons(z0, z1), z2) → c2(APP(z1, z2))
SUM(cons(z0, cons(z1, z2))) → c4(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
PLUS(s(z0), z1) → c8(PLUS(z0, z1))
Defined Rule Symbols:

plus

Defined Pair Symbols:

APP, SUM, PLUS

Compound Symbols:

c2, c4, c8

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

The set S is empty

(14) BOUNDS(O(1), O(1))