(0) Obligation:

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


The TRS R consists of the following rules:

is_empty(nil) → true
is_empty(cons(x, l)) → false
hd(cons(x, l)) → x
tl(cons(x, l)) → l
append(l1, l2) → ifappend(l1, l2, l1)
ifappend(l1, l2, nil) → l2
ifappend(l1, l2, cons(x, l)) → cons(x, append(l, l2))

Rewrite Strategy: FULL

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

Converted rc-obligation to irc-obligation.

As the TRS does not nest defined symbols, we have rc = irc.

(2) Obligation:

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


The TRS R consists of the following rules:

is_empty(nil) → true
is_empty(cons(x, l)) → false
hd(cons(x, l)) → x
tl(cons(x, l)) → l
append(l1, l2) → ifappend(l1, l2, l1)
ifappend(l1, l2, nil) → l2
ifappend(l1, l2, cons(x, l)) → cons(x, append(l, l2))

Rewrite Strategy: INNERMOST

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

Converted Cpx (relative) TRS to CDT

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

is_empty(nil) → true
is_empty(cons(z0, z1)) → false
hd(cons(z0, z1)) → z0
tl(cons(z0, z1)) → z1
append(z0, z1) → ifappend(z0, z1, z0)
ifappend(z0, z1, nil) → z1
ifappend(z0, z1, cons(z2, z3)) → cons(z2, append(z3, z1))
Tuples:

IS_EMPTY(nil) → c
IS_EMPTY(cons(z0, z1)) → c1
HD(cons(z0, z1)) → c2
TL(cons(z0, z1)) → c3
APPEND(z0, z1) → c4(IFAPPEND(z0, z1, z0))
IFAPPEND(z0, z1, nil) → c5
IFAPPEND(z0, z1, cons(z2, z3)) → c6(APPEND(z3, z1))
S tuples:

IS_EMPTY(nil) → c
IS_EMPTY(cons(z0, z1)) → c1
HD(cons(z0, z1)) → c2
TL(cons(z0, z1)) → c3
APPEND(z0, z1) → c4(IFAPPEND(z0, z1, z0))
IFAPPEND(z0, z1, nil) → c5
IFAPPEND(z0, z1, cons(z2, z3)) → c6(APPEND(z3, z1))
K tuples:none
Defined Rule Symbols:

is_empty, hd, tl, append, ifappend

Defined Pair Symbols:

IS_EMPTY, HD, TL, APPEND, IFAPPEND

Compound Symbols:

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

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

Removed 5 trailing nodes:

IS_EMPTY(cons(z0, z1)) → c1
TL(cons(z0, z1)) → c3
HD(cons(z0, z1)) → c2
IS_EMPTY(nil) → c
IFAPPEND(z0, z1, nil) → c5

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

is_empty(nil) → true
is_empty(cons(z0, z1)) → false
hd(cons(z0, z1)) → z0
tl(cons(z0, z1)) → z1
append(z0, z1) → ifappend(z0, z1, z0)
ifappend(z0, z1, nil) → z1
ifappend(z0, z1, cons(z2, z3)) → cons(z2, append(z3, z1))
Tuples:

APPEND(z0, z1) → c4(IFAPPEND(z0, z1, z0))
IFAPPEND(z0, z1, cons(z2, z3)) → c6(APPEND(z3, z1))
S tuples:

APPEND(z0, z1) → c4(IFAPPEND(z0, z1, z0))
IFAPPEND(z0, z1, cons(z2, z3)) → c6(APPEND(z3, z1))
K tuples:none
Defined Rule Symbols:

is_empty, hd, tl, append, ifappend

Defined Pair Symbols:

APPEND, IFAPPEND

Compound Symbols:

c4, c6

(7) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

is_empty(nil) → true
is_empty(cons(z0, z1)) → false
hd(cons(z0, z1)) → z0
tl(cons(z0, z1)) → z1
append(z0, z1) → ifappend(z0, z1, z0)
ifappend(z0, z1, nil) → z1
ifappend(z0, z1, cons(z2, z3)) → cons(z2, append(z3, z1))

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

APPEND(z0, z1) → c4(IFAPPEND(z0, z1, z0))
IFAPPEND(z0, z1, cons(z2, z3)) → c6(APPEND(z3, z1))
S tuples:

APPEND(z0, z1) → c4(IFAPPEND(z0, z1, z0))
IFAPPEND(z0, z1, cons(z2, z3)) → c6(APPEND(z3, z1))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

APPEND, IFAPPEND

Compound Symbols:

c4, c6

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

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

APPEND(z0, z1) → c4(IFAPPEND(z0, z1, z0))
IFAPPEND(z0, z1, cons(z2, z3)) → c6(APPEND(z3, z1))
We considered the (Usable) Rules:none
And the Tuples:

APPEND(z0, z1) → c4(IFAPPEND(z0, z1, z0))
IFAPPEND(z0, z1, cons(z2, z3)) → c6(APPEND(z3, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(APPEND(x1, x2)) = [1] + [3]x1   
POL(IFAPPEND(x1, x2, x3)) = [3]x3   
POL(c4(x1)) = x1   
POL(c6(x1)) = x1   
POL(cons(x1, x2)) = [3] + x2   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

APPEND(z0, z1) → c4(IFAPPEND(z0, z1, z0))
IFAPPEND(z0, z1, cons(z2, z3)) → c6(APPEND(z3, z1))
S tuples:none
K tuples:

APPEND(z0, z1) → c4(IFAPPEND(z0, z1, z0))
IFAPPEND(z0, z1, cons(z2, z3)) → c6(APPEND(z3, z1))
Defined Rule Symbols:none

Defined Pair Symbols:

APPEND, IFAPPEND

Compound Symbols:

c4, c6

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

The set S is empty

(12) BOUNDS(1, 1)