(0) Obligation:

The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


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: FULL

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

The following defined symbols can occur below the 0th argument of plus: sum, plus, pred
The following defined symbols can occur below the 1th argument of plus: sum, plus, pred
The following defined symbols can occur below the 0th argument of sum: sum, plus, pred
The following defined symbols can occur below the 0th argument of pred: sum, plus, pred

Hence, the left-hand sides of the following rules are not basic-reachable and can be removed:
sum(app(l, cons(x, cons(y, k)))) → sum(app(l, sum(cons(x, cons(y, k)))))

(2) Obligation:

The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

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

Rewrite Strategy: FULL

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

Converted rc-obligation to irc-obligation.

As the TRS is a non-duplicating overlay system, we have rc = irc.

(4) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

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

Rewrite Strategy: INNERMOST

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

Converted Cpx (relative) TRS to CDT

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

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

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

app, plus, sum, pred

Defined Pair Symbols:

APP, PLUS, SUM, PRED

Compound Symbols:

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

(7) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)

Removed 1 leading nodes:

SUM(plus(cons(0, z0), cons(z1, z2))) → c6(PRED(sum(cons(s(z0), cons(z1, z2)))), SUM(cons(s(z0), cons(z1, z2))))
Removed 5 trailing nodes:

APP(z0, nil) → c2
SUM(cons(z0, nil)) → c5
PRED(cons(s(z0), nil)) → c8
APP(nil, z0) → c1
PLUS(0, z0) → c4

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

APP(cons(z0, z1), z2) → c(APP(z1, z2))
PLUS(s(z0), z1) → c3(PLUS(z0, z1))
SUM(cons(z0, cons(z1, z2))) → c7(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
S tuples:

APP(cons(z0, z1), z2) → c(APP(z1, z2))
PLUS(s(z0), z1) → c3(PLUS(z0, z1))
SUM(cons(z0, cons(z1, z2))) → c7(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
K tuples:none
Defined Rule Symbols:

app, plus, sum, pred

Defined Pair Symbols:

APP, PLUS, SUM

Compound Symbols:

c, c3, c7

(9) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

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

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

APP(cons(z0, z1), z2) → c(APP(z1, z2))
PLUS(s(z0), z1) → c3(PLUS(z0, z1))
SUM(cons(z0, cons(z1, z2))) → c7(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
S tuples:

APP(cons(z0, z1), z2) → c(APP(z1, z2))
PLUS(s(z0), z1) → c3(PLUS(z0, z1))
SUM(cons(z0, cons(z1, z2))) → c7(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
K tuples:none
Defined Rule Symbols:

plus

Defined Pair Symbols:

APP, PLUS, SUM

Compound Symbols:

c, c3, c7

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

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

APP(cons(z0, z1), z2) → c(APP(z1, z2))
We considered the (Usable) Rules:none
And the Tuples:

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

POL(0) = 0   
POL(APP(x1, x2)) = x1   
POL(PLUS(x1, x2)) = 0   
POL(SUM(x1)) = 0   
POL(c(x1)) = x1   
POL(c3(x1)) = x1   
POL(c7(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = [2] + x2   
POL(plus(x1, x2)) = 0   
POL(s(x1)) = 0   

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

APP(cons(z0, z1), z2) → c(APP(z1, z2))
PLUS(s(z0), z1) → c3(PLUS(z0, z1))
SUM(cons(z0, cons(z1, z2))) → c7(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
S tuples:

PLUS(s(z0), z1) → c3(PLUS(z0, z1))
SUM(cons(z0, cons(z1, z2))) → c7(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
K tuples:

APP(cons(z0, z1), z2) → c(APP(z1, z2))
Defined Rule Symbols:

plus

Defined Pair Symbols:

APP, PLUS, SUM

Compound Symbols:

c, c3, c7

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

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

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

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

POL(0) = 0   
POL(APP(x1, x2)) = 0   
POL(PLUS(x1, x2)) = 0   
POL(SUM(x1)) = x1   
POL(c(x1)) = x1   
POL(c3(x1)) = x1   
POL(c7(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = [1] + x2   
POL(plus(x1, x2)) = 0   
POL(s(x1)) = 0   

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

APP(cons(z0, z1), z2) → c(APP(z1, z2))
PLUS(s(z0), z1) → c3(PLUS(z0, z1))
SUM(cons(z0, cons(z1, z2))) → c7(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
S tuples:

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

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

plus

Defined Pair Symbols:

APP, PLUS, SUM

Compound Symbols:

c, c3, c7

(15) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)

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

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

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

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

POL(0) = 0   
POL(APP(x1, x2)) = x1·x2   
POL(PLUS(x1, x2)) = x1 + [2]x2   
POL(SUM(x1)) = x1 + x12   
POL(c(x1)) = x1   
POL(c3(x1)) = x1   
POL(c7(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = [2] + x1 + x2   
POL(plus(x1, x2)) = x1 + x2   
POL(s(x1)) = [1] + x1   

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

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

APP(cons(z0, z1), z2) → c(APP(z1, z2))
PLUS(s(z0), z1) → c3(PLUS(z0, z1))
SUM(cons(z0, cons(z1, z2))) → c7(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
S tuples:none
K tuples:

APP(cons(z0, z1), z2) → c(APP(z1, z2))
SUM(cons(z0, cons(z1, z2))) → c7(SUM(cons(plus(z0, z1), z2)), PLUS(z0, z1))
PLUS(s(z0), z1) → c3(PLUS(z0, z1))
Defined Rule Symbols:

plus

Defined Pair Symbols:

APP, PLUS, SUM

Compound Symbols:

c, c3, c7

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

The set S is empty

(18) BOUNDS(1, 1)