We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict Trs:
{ fst(X1, X2) -> n__fst(X1, X2)
, fst(0(), Z) -> nil()
, fst(s(X), cons(Y, Z)) ->
cons(Y, n__fst(activate(X), activate(Z)))
, activate(X) -> X
, activate(n__fst(X1, X2)) -> fst(X1, X2)
, activate(n__from(X)) -> from(X)
, activate(n__add(X1, X2)) -> add(X1, X2)
, activate(n__len(X)) -> len(X)
, from(X) -> cons(X, n__from(s(X)))
, from(X) -> n__from(X)
, add(X1, X2) -> n__add(X1, X2)
, add(0(), X) -> X
, add(s(X), Y) -> s(n__add(activate(X), Y))
, len(X) -> n__len(X)
, len(nil()) -> 0()
, len(cons(X, Z)) -> s(n__len(activate(Z))) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
The weightgap principle applies (using the following nonconstant
growth matrix-interpretation)
The following argument positions are usable:
Uargs(s) = {1}, Uargs(cons) = {2}, Uargs(n__fst) = {1, 2},
Uargs(n__add) = {1}, Uargs(n__len) = {1}
TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).
[fst](x1, x2) = [1] x1 + [1] x2 + [0]
[0] = [4]
[nil] = [0]
[s](x1) = [1] x1 + [0]
[cons](x1, x2) = [1] x2 + [0]
[n__fst](x1, x2) = [1] x1 + [1] x2 + [0]
[activate](x1) = [1] x1 + [0]
[from](x1) = [1]
[n__from](x1) = [0]
[add](x1, x2) = [1] x1 + [1] x2 + [0]
[n__add](x1, x2) = [1] x1 + [1] x2 + [0]
[len](x1) = [1] x1 + [0]
[n__len](x1) = [1] x1 + [0]
The order satisfies the following ordering constraints:
[fst(X1, X2)] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [n__fst(X1, X2)]
[fst(0(), Z)] = [1] Z + [4]
> [0]
= [nil()]
[fst(s(X), cons(Y, Z))] = [1] Z + [1] X + [0]
>= [1] Z + [1] X + [0]
= [cons(Y, n__fst(activate(X), activate(Z)))]
[activate(X)] = [1] X + [0]
>= [1] X + [0]
= [X]
[activate(n__fst(X1, X2))] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [fst(X1, X2)]
[activate(n__from(X))] = [0]
? [1]
= [from(X)]
[activate(n__add(X1, X2))] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [add(X1, X2)]
[activate(n__len(X))] = [1] X + [0]
>= [1] X + [0]
= [len(X)]
[from(X)] = [1]
> [0]
= [cons(X, n__from(s(X)))]
[from(X)] = [1]
> [0]
= [n__from(X)]
[add(X1, X2)] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [n__add(X1, X2)]
[add(0(), X)] = [1] X + [4]
> [1] X + [0]
= [X]
[add(s(X), Y)] = [1] X + [1] Y + [0]
>= [1] X + [1] Y + [0]
= [s(n__add(activate(X), Y))]
[len(X)] = [1] X + [0]
>= [1] X + [0]
= [n__len(X)]
[len(nil())] = [0]
? [4]
= [0()]
[len(cons(X, Z))] = [1] Z + [0]
>= [1] Z + [0]
= [s(n__len(activate(Z)))]
Further, it can be verified that all rules not oriented are covered by the weightgap condition.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict Trs:
{ fst(X1, X2) -> n__fst(X1, X2)
, fst(s(X), cons(Y, Z)) ->
cons(Y, n__fst(activate(X), activate(Z)))
, activate(X) -> X
, activate(n__fst(X1, X2)) -> fst(X1, X2)
, activate(n__from(X)) -> from(X)
, activate(n__add(X1, X2)) -> add(X1, X2)
, activate(n__len(X)) -> len(X)
, add(X1, X2) -> n__add(X1, X2)
, add(s(X), Y) -> s(n__add(activate(X), Y))
, len(X) -> n__len(X)
, len(nil()) -> 0()
, len(cons(X, Z)) -> s(n__len(activate(Z))) }
Weak Trs:
{ fst(0(), Z) -> nil()
, from(X) -> cons(X, n__from(s(X)))
, from(X) -> n__from(X)
, add(0(), X) -> X }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.
Trs: { len(nil()) -> 0() }
The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^1)) . These rules are moved into the corresponding weak
component(s).
Sub-proof:
----------
The following argument positions are usable:
Uargs(s) = {1}, Uargs(cons) = {2}, Uargs(n__fst) = {1, 2},
Uargs(n__add) = {1}, Uargs(n__len) = {1}
TcT has computed the following constructor-based matrix
interpretation satisfying not(EDA).
[fst](x1, x2) = [1] x1 + [1] x2 + [0]
[0] = [0]
[nil] = [0]
[s](x1) = [1] x1 + [0]
[cons](x1, x2) = [1] x2 + [0]
[n__fst](x1, x2) = [1] x1 + [1] x2 + [0]
[activate](x1) = [1] x1 + [0]
[from](x1) = [0]
[n__from](x1) = [0]
[add](x1, x2) = [1] x1 + [1] x2 + [0]
[n__add](x1, x2) = [1] x1 + [1] x2 + [0]
[len](x1) = [1] x1 + [1]
[n__len](x1) = [1] x1 + [1]
The order satisfies the following ordering constraints:
[fst(X1, X2)] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [n__fst(X1, X2)]
[fst(0(), Z)] = [1] Z + [0]
>= [0]
= [nil()]
[fst(s(X), cons(Y, Z))] = [1] Z + [1] X + [0]
>= [1] Z + [1] X + [0]
= [cons(Y, n__fst(activate(X), activate(Z)))]
[activate(X)] = [1] X + [0]
>= [1] X + [0]
= [X]
[activate(n__fst(X1, X2))] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [fst(X1, X2)]
[activate(n__from(X))] = [0]
>= [0]
= [from(X)]
[activate(n__add(X1, X2))] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [add(X1, X2)]
[activate(n__len(X))] = [1] X + [1]
>= [1] X + [1]
= [len(X)]
[from(X)] = [0]
>= [0]
= [cons(X, n__from(s(X)))]
[from(X)] = [0]
>= [0]
= [n__from(X)]
[add(X1, X2)] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [n__add(X1, X2)]
[add(0(), X)] = [1] X + [0]
>= [1] X + [0]
= [X]
[add(s(X), Y)] = [1] X + [1] Y + [0]
>= [1] X + [1] Y + [0]
= [s(n__add(activate(X), Y))]
[len(X)] = [1] X + [1]
>= [1] X + [1]
= [n__len(X)]
[len(nil())] = [1]
> [0]
= [0()]
[len(cons(X, Z))] = [1] Z + [1]
>= [1] Z + [1]
= [s(n__len(activate(Z)))]
We return to the main proof.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict Trs:
{ fst(X1, X2) -> n__fst(X1, X2)
, fst(s(X), cons(Y, Z)) ->
cons(Y, n__fst(activate(X), activate(Z)))
, activate(X) -> X
, activate(n__fst(X1, X2)) -> fst(X1, X2)
, activate(n__from(X)) -> from(X)
, activate(n__add(X1, X2)) -> add(X1, X2)
, activate(n__len(X)) -> len(X)
, add(X1, X2) -> n__add(X1, X2)
, add(s(X), Y) -> s(n__add(activate(X), Y))
, len(X) -> n__len(X)
, len(cons(X, Z)) -> s(n__len(activate(Z))) }
Weak Trs:
{ fst(0(), Z) -> nil()
, from(X) -> cons(X, n__from(s(X)))
, from(X) -> n__from(X)
, add(0(), X) -> X
, len(nil()) -> 0() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
The weightgap principle applies (using the following nonconstant
growth matrix-interpretation)
The following argument positions are usable:
Uargs(s) = {1}, Uargs(cons) = {2}, Uargs(n__fst) = {1, 2},
Uargs(n__add) = {1}, Uargs(n__len) = {1}
TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).
[fst](x1, x2) = [1] x1 + [1] x2 + [5]
[0] = [3]
[nil] = [4]
[s](x1) = [1] x1 + [0]
[cons](x1, x2) = [1] x2 + [0]
[n__fst](x1, x2) = [1] x1 + [1] x2 + [0]
[activate](x1) = [1] x1 + [0]
[from](x1) = [5]
[n__from](x1) = [0]
[add](x1, x2) = [1] x1 + [1] x2 + [0]
[n__add](x1, x2) = [1] x1 + [1] x2 + [0]
[len](x1) = [1] x1 + [0]
[n__len](x1) = [1] x1 + [0]
The order satisfies the following ordering constraints:
[fst(X1, X2)] = [1] X1 + [1] X2 + [5]
> [1] X1 + [1] X2 + [0]
= [n__fst(X1, X2)]
[fst(0(), Z)] = [1] Z + [8]
> [4]
= [nil()]
[fst(s(X), cons(Y, Z))] = [1] Z + [1] X + [5]
> [1] Z + [1] X + [0]
= [cons(Y, n__fst(activate(X), activate(Z)))]
[activate(X)] = [1] X + [0]
>= [1] X + [0]
= [X]
[activate(n__fst(X1, X2))] = [1] X1 + [1] X2 + [0]
? [1] X1 + [1] X2 + [5]
= [fst(X1, X2)]
[activate(n__from(X))] = [0]
? [5]
= [from(X)]
[activate(n__add(X1, X2))] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [add(X1, X2)]
[activate(n__len(X))] = [1] X + [0]
>= [1] X + [0]
= [len(X)]
[from(X)] = [5]
> [0]
= [cons(X, n__from(s(X)))]
[from(X)] = [5]
> [0]
= [n__from(X)]
[add(X1, X2)] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [n__add(X1, X2)]
[add(0(), X)] = [1] X + [3]
> [1] X + [0]
= [X]
[add(s(X), Y)] = [1] X + [1] Y + [0]
>= [1] X + [1] Y + [0]
= [s(n__add(activate(X), Y))]
[len(X)] = [1] X + [0]
>= [1] X + [0]
= [n__len(X)]
[len(nil())] = [4]
> [3]
= [0()]
[len(cons(X, Z))] = [1] Z + [0]
>= [1] Z + [0]
= [s(n__len(activate(Z)))]
Further, it can be verified that all rules not oriented are covered by the weightgap condition.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict Trs:
{ activate(X) -> X
, activate(n__fst(X1, X2)) -> fst(X1, X2)
, activate(n__from(X)) -> from(X)
, activate(n__add(X1, X2)) -> add(X1, X2)
, activate(n__len(X)) -> len(X)
, add(X1, X2) -> n__add(X1, X2)
, add(s(X), Y) -> s(n__add(activate(X), Y))
, len(X) -> n__len(X)
, len(cons(X, Z)) -> s(n__len(activate(Z))) }
Weak Trs:
{ fst(X1, X2) -> n__fst(X1, X2)
, fst(0(), Z) -> nil()
, fst(s(X), cons(Y, Z)) ->
cons(Y, n__fst(activate(X), activate(Z)))
, from(X) -> cons(X, n__from(s(X)))
, from(X) -> n__from(X)
, add(0(), X) -> X
, len(nil()) -> 0() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.
Trs:
{ activate(n__len(X)) -> len(X)
, add(s(X), Y) -> s(n__add(activate(X), Y))
, len(X) -> n__len(X)
, len(cons(X, Z)) -> s(n__len(activate(Z))) }
The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^1)) . These rules are moved into the corresponding weak
component(s).
Sub-proof:
----------
The following argument positions are usable:
Uargs(s) = {1}, Uargs(cons) = {2}, Uargs(n__fst) = {1, 2},
Uargs(n__add) = {1}, Uargs(n__len) = {1}
TcT has computed the following constructor-based matrix
interpretation satisfying not(EDA).
[fst](x1, x2) = [4] x1 + [4] x2 + [0]
[0] = [0]
[nil] = [0]
[s](x1) = [1] x1 + [2]
[cons](x1, x2) = [1] x2 + [0]
[n__fst](x1, x2) = [1] x1 + [1] x2 + [0]
[activate](x1) = [4] x1 + [0]
[from](x1) = [0]
[n__from](x1) = [0]
[add](x1, x2) = [4] x1 + [2] x2 + [0]
[n__add](x1, x2) = [1] x1 + [1] x2 + [0]
[len](x1) = [4] x1 + [5]
[n__len](x1) = [1] x1 + [2]
The order satisfies the following ordering constraints:
[fst(X1, X2)] = [4] X1 + [4] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [n__fst(X1, X2)]
[fst(0(), Z)] = [4] Z + [0]
>= [0]
= [nil()]
[fst(s(X), cons(Y, Z))] = [4] Z + [4] X + [8]
> [4] Z + [4] X + [0]
= [cons(Y, n__fst(activate(X), activate(Z)))]
[activate(X)] = [4] X + [0]
>= [1] X + [0]
= [X]
[activate(n__fst(X1, X2))] = [4] X1 + [4] X2 + [0]
>= [4] X1 + [4] X2 + [0]
= [fst(X1, X2)]
[activate(n__from(X))] = [0]
>= [0]
= [from(X)]
[activate(n__add(X1, X2))] = [4] X1 + [4] X2 + [0]
>= [4] X1 + [2] X2 + [0]
= [add(X1, X2)]
[activate(n__len(X))] = [4] X + [8]
> [4] X + [5]
= [len(X)]
[from(X)] = [0]
>= [0]
= [cons(X, n__from(s(X)))]
[from(X)] = [0]
>= [0]
= [n__from(X)]
[add(X1, X2)] = [4] X1 + [2] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [n__add(X1, X2)]
[add(0(), X)] = [2] X + [0]
>= [1] X + [0]
= [X]
[add(s(X), Y)] = [4] X + [2] Y + [8]
> [4] X + [1] Y + [2]
= [s(n__add(activate(X), Y))]
[len(X)] = [4] X + [5]
> [1] X + [2]
= [n__len(X)]
[len(nil())] = [5]
> [0]
= [0()]
[len(cons(X, Z))] = [4] Z + [5]
> [4] Z + [4]
= [s(n__len(activate(Z)))]
We return to the main proof.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict Trs:
{ activate(X) -> X
, activate(n__fst(X1, X2)) -> fst(X1, X2)
, activate(n__from(X)) -> from(X)
, activate(n__add(X1, X2)) -> add(X1, X2)
, add(X1, X2) -> n__add(X1, X2) }
Weak Trs:
{ fst(X1, X2) -> n__fst(X1, X2)
, fst(0(), Z) -> nil()
, fst(s(X), cons(Y, Z)) ->
cons(Y, n__fst(activate(X), activate(Z)))
, activate(n__len(X)) -> len(X)
, from(X) -> cons(X, n__from(s(X)))
, from(X) -> n__from(X)
, add(0(), X) -> X
, add(s(X), Y) -> s(n__add(activate(X), Y))
, len(X) -> n__len(X)
, len(nil()) -> 0()
, len(cons(X, Z)) -> s(n__len(activate(Z))) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
The weightgap principle applies (using the following nonconstant
growth matrix-interpretation)
The following argument positions are usable:
Uargs(s) = {1}, Uargs(cons) = {2}, Uargs(n__fst) = {1, 2},
Uargs(n__add) = {1}, Uargs(n__len) = {1}
TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).
[fst](x1, x2) = [1] x1 + [1] x2 + [5]
[0] = [3]
[nil] = [4]
[s](x1) = [1] x1 + [0]
[cons](x1, x2) = [1] x2 + [0]
[n__fst](x1, x2) = [1] x1 + [1] x2 + [0]
[activate](x1) = [1] x1 + [0]
[from](x1) = [7]
[n__from](x1) = [0]
[add](x1, x2) = [1] x1 + [1] x2 + [4]
[n__add](x1, x2) = [1] x1 + [1] x2 + [0]
[len](x1) = [1] x1 + [0]
[n__len](x1) = [1] x1 + [0]
The order satisfies the following ordering constraints:
[fst(X1, X2)] = [1] X1 + [1] X2 + [5]
> [1] X1 + [1] X2 + [0]
= [n__fst(X1, X2)]
[fst(0(), Z)] = [1] Z + [8]
> [4]
= [nil()]
[fst(s(X), cons(Y, Z))] = [1] Z + [1] X + [5]
> [1] Z + [1] X + [0]
= [cons(Y, n__fst(activate(X), activate(Z)))]
[activate(X)] = [1] X + [0]
>= [1] X + [0]
= [X]
[activate(n__fst(X1, X2))] = [1] X1 + [1] X2 + [0]
? [1] X1 + [1] X2 + [5]
= [fst(X1, X2)]
[activate(n__from(X))] = [0]
? [7]
= [from(X)]
[activate(n__add(X1, X2))] = [1] X1 + [1] X2 + [0]
? [1] X1 + [1] X2 + [4]
= [add(X1, X2)]
[activate(n__len(X))] = [1] X + [0]
>= [1] X + [0]
= [len(X)]
[from(X)] = [7]
> [0]
= [cons(X, n__from(s(X)))]
[from(X)] = [7]
> [0]
= [n__from(X)]
[add(X1, X2)] = [1] X1 + [1] X2 + [4]
> [1] X1 + [1] X2 + [0]
= [n__add(X1, X2)]
[add(0(), X)] = [1] X + [7]
> [1] X + [0]
= [X]
[add(s(X), Y)] = [1] X + [1] Y + [4]
> [1] X + [1] Y + [0]
= [s(n__add(activate(X), Y))]
[len(X)] = [1] X + [0]
>= [1] X + [0]
= [n__len(X)]
[len(nil())] = [4]
> [3]
= [0()]
[len(cons(X, Z))] = [1] Z + [0]
>= [1] Z + [0]
= [s(n__len(activate(Z)))]
Further, it can be verified that all rules not oriented are covered by the weightgap condition.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict Trs:
{ activate(X) -> X
, activate(n__fst(X1, X2)) -> fst(X1, X2)
, activate(n__from(X)) -> from(X)
, activate(n__add(X1, X2)) -> add(X1, X2) }
Weak Trs:
{ fst(X1, X2) -> n__fst(X1, X2)
, fst(0(), Z) -> nil()
, fst(s(X), cons(Y, Z)) ->
cons(Y, n__fst(activate(X), activate(Z)))
, activate(n__len(X)) -> len(X)
, from(X) -> cons(X, n__from(s(X)))
, from(X) -> n__from(X)
, add(X1, X2) -> n__add(X1, X2)
, add(0(), X) -> X
, add(s(X), Y) -> s(n__add(activate(X), Y))
, len(X) -> n__len(X)
, len(nil()) -> 0()
, len(cons(X, Z)) -> s(n__len(activate(Z))) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
The weightgap principle applies (using the following nonconstant
growth matrix-interpretation)
The following argument positions are usable:
Uargs(s) = {1}, Uargs(cons) = {2}, Uargs(n__fst) = {1, 2},
Uargs(n__add) = {1}, Uargs(n__len) = {1}
TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).
[fst](x1, x2) = [1] x1 + [1] x2 + [5]
[0] = [0]
[nil] = [0]
[s](x1) = [1] x1 + [1]
[cons](x1, x2) = [1] x2 + [2]
[n__fst](x1, x2) = [1] x1 + [1] x2 + [2]
[activate](x1) = [1] x1 + [2]
[from](x1) = [5]
[n__from](x1) = [3]
[add](x1, x2) = [1] x1 + [1] x2 + [7]
[n__add](x1, x2) = [1] x1 + [1] x2 + [2]
[len](x1) = [1] x1 + [4]
[n__len](x1) = [1] x1 + [2]
The order satisfies the following ordering constraints:
[fst(X1, X2)] = [1] X1 + [1] X2 + [5]
> [1] X1 + [1] X2 + [2]
= [n__fst(X1, X2)]
[fst(0(), Z)] = [1] Z + [5]
> [0]
= [nil()]
[fst(s(X), cons(Y, Z))] = [1] Z + [1] X + [8]
>= [1] Z + [1] X + [8]
= [cons(Y, n__fst(activate(X), activate(Z)))]
[activate(X)] = [1] X + [2]
> [1] X + [0]
= [X]
[activate(n__fst(X1, X2))] = [1] X1 + [1] X2 + [4]
? [1] X1 + [1] X2 + [5]
= [fst(X1, X2)]
[activate(n__from(X))] = [5]
>= [5]
= [from(X)]
[activate(n__add(X1, X2))] = [1] X1 + [1] X2 + [4]
? [1] X1 + [1] X2 + [7]
= [add(X1, X2)]
[activate(n__len(X))] = [1] X + [4]
>= [1] X + [4]
= [len(X)]
[from(X)] = [5]
>= [5]
= [cons(X, n__from(s(X)))]
[from(X)] = [5]
> [3]
= [n__from(X)]
[add(X1, X2)] = [1] X1 + [1] X2 + [7]
> [1] X1 + [1] X2 + [2]
= [n__add(X1, X2)]
[add(0(), X)] = [1] X + [7]
> [1] X + [0]
= [X]
[add(s(X), Y)] = [1] X + [1] Y + [8]
> [1] X + [1] Y + [5]
= [s(n__add(activate(X), Y))]
[len(X)] = [1] X + [4]
> [1] X + [2]
= [n__len(X)]
[len(nil())] = [4]
> [0]
= [0()]
[len(cons(X, Z))] = [1] Z + [6]
> [1] Z + [5]
= [s(n__len(activate(Z)))]
Further, it can be verified that all rules not oriented are covered by the weightgap condition.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict Trs:
{ activate(n__fst(X1, X2)) -> fst(X1, X2)
, activate(n__from(X)) -> from(X)
, activate(n__add(X1, X2)) -> add(X1, X2) }
Weak Trs:
{ fst(X1, X2) -> n__fst(X1, X2)
, fst(0(), Z) -> nil()
, fst(s(X), cons(Y, Z)) ->
cons(Y, n__fst(activate(X), activate(Z)))
, activate(X) -> X
, activate(n__len(X)) -> len(X)
, from(X) -> cons(X, n__from(s(X)))
, from(X) -> n__from(X)
, add(X1, X2) -> n__add(X1, X2)
, add(0(), X) -> X
, add(s(X), Y) -> s(n__add(activate(X), Y))
, len(X) -> n__len(X)
, len(nil()) -> 0()
, len(cons(X, Z)) -> s(n__len(activate(Z))) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
The weightgap principle applies (using the following nonconstant
growth matrix-interpretation)
The following argument positions are usable:
Uargs(s) = {1}, Uargs(cons) = {2}, Uargs(n__fst) = {1, 2},
Uargs(n__add) = {1}, Uargs(n__len) = {1}
TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).
[fst](x1, x2) = [1] x1 + [1] x2 + [0]
[0] = [2]
[nil] = [0]
[s](x1) = [1] x1 + [5]
[cons](x1, x2) = [1] x2 + [6]
[n__fst](x1, x2) = [1] x1 + [1] x2 + [0]
[activate](x1) = [1] x1 + [1]
[from](x1) = [7]
[n__from](x1) = [0]
[add](x1, x2) = [1] x1 + [1] x2 + [4]
[n__add](x1, x2) = [1] x1 + [1] x2 + [0]
[len](x1) = [1] x1 + [4]
[n__len](x1) = [1] x1 + [4]
The order satisfies the following ordering constraints:
[fst(X1, X2)] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [n__fst(X1, X2)]
[fst(0(), Z)] = [1] Z + [2]
> [0]
= [nil()]
[fst(s(X), cons(Y, Z))] = [1] Z + [1] X + [11]
> [1] Z + [1] X + [8]
= [cons(Y, n__fst(activate(X), activate(Z)))]
[activate(X)] = [1] X + [1]
> [1] X + [0]
= [X]
[activate(n__fst(X1, X2))] = [1] X1 + [1] X2 + [1]
> [1] X1 + [1] X2 + [0]
= [fst(X1, X2)]
[activate(n__from(X))] = [1]
? [7]
= [from(X)]
[activate(n__add(X1, X2))] = [1] X1 + [1] X2 + [1]
? [1] X1 + [1] X2 + [4]
= [add(X1, X2)]
[activate(n__len(X))] = [1] X + [5]
> [1] X + [4]
= [len(X)]
[from(X)] = [7]
> [6]
= [cons(X, n__from(s(X)))]
[from(X)] = [7]
> [0]
= [n__from(X)]
[add(X1, X2)] = [1] X1 + [1] X2 + [4]
> [1] X1 + [1] X2 + [0]
= [n__add(X1, X2)]
[add(0(), X)] = [1] X + [6]
> [1] X + [0]
= [X]
[add(s(X), Y)] = [1] X + [1] Y + [9]
> [1] X + [1] Y + [6]
= [s(n__add(activate(X), Y))]
[len(X)] = [1] X + [4]
>= [1] X + [4]
= [n__len(X)]
[len(nil())] = [4]
> [2]
= [0()]
[len(cons(X, Z))] = [1] Z + [10]
>= [1] Z + [10]
= [s(n__len(activate(Z)))]
Further, it can be verified that all rules not oriented are covered by the weightgap condition.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict Trs:
{ activate(n__from(X)) -> from(X)
, activate(n__add(X1, X2)) -> add(X1, X2) }
Weak Trs:
{ fst(X1, X2) -> n__fst(X1, X2)
, fst(0(), Z) -> nil()
, fst(s(X), cons(Y, Z)) ->
cons(Y, n__fst(activate(X), activate(Z)))
, activate(X) -> X
, activate(n__fst(X1, X2)) -> fst(X1, X2)
, activate(n__len(X)) -> len(X)
, from(X) -> cons(X, n__from(s(X)))
, from(X) -> n__from(X)
, add(X1, X2) -> n__add(X1, X2)
, add(0(), X) -> X
, add(s(X), Y) -> s(n__add(activate(X), Y))
, len(X) -> n__len(X)
, len(nil()) -> 0()
, len(cons(X, Z)) -> s(n__len(activate(Z))) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.
Trs: { activate(n__add(X1, X2)) -> add(X1, X2) }
The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^1)) . These rules are moved into the corresponding weak
component(s).
Sub-proof:
----------
The following argument positions are usable:
Uargs(s) = {1}, Uargs(cons) = {2}, Uargs(n__fst) = {1, 2},
Uargs(n__add) = {1}, Uargs(n__len) = {1}
TcT has computed the following constructor-based matrix
interpretation satisfying not(EDA).
[fst](x1, x2) = [3] x1 + [3] x2 + [0]
[0] = [0]
[nil] = [0]
[s](x1) = [1] x1 + [0]
[cons](x1, x2) = [1] x2 + [0]
[n__fst](x1, x2) = [1] x1 + [1] x2 + [0]
[activate](x1) = [3] x1 + [0]
[from](x1) = [0]
[n__from](x1) = [0]
[add](x1, x2) = [3] x1 + [1] x2 + [3]
[n__add](x1, x2) = [1] x1 + [1] x2 + [3]
[len](x1) = [3] x1 + [0]
[n__len](x1) = [1] x1 + [0]
The order satisfies the following ordering constraints:
[fst(X1, X2)] = [3] X1 + [3] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [n__fst(X1, X2)]
[fst(0(), Z)] = [3] Z + [0]
>= [0]
= [nil()]
[fst(s(X), cons(Y, Z))] = [3] Z + [3] X + [0]
>= [3] Z + [3] X + [0]
= [cons(Y, n__fst(activate(X), activate(Z)))]
[activate(X)] = [3] X + [0]
>= [1] X + [0]
= [X]
[activate(n__fst(X1, X2))] = [3] X1 + [3] X2 + [0]
>= [3] X1 + [3] X2 + [0]
= [fst(X1, X2)]
[activate(n__from(X))] = [0]
>= [0]
= [from(X)]
[activate(n__add(X1, X2))] = [3] X1 + [3] X2 + [9]
> [3] X1 + [1] X2 + [3]
= [add(X1, X2)]
[activate(n__len(X))] = [3] X + [0]
>= [3] X + [0]
= [len(X)]
[from(X)] = [0]
>= [0]
= [cons(X, n__from(s(X)))]
[from(X)] = [0]
>= [0]
= [n__from(X)]
[add(X1, X2)] = [3] X1 + [1] X2 + [3]
>= [1] X1 + [1] X2 + [3]
= [n__add(X1, X2)]
[add(0(), X)] = [1] X + [3]
> [1] X + [0]
= [X]
[add(s(X), Y)] = [3] X + [1] Y + [3]
>= [3] X + [1] Y + [3]
= [s(n__add(activate(X), Y))]
[len(X)] = [3] X + [0]
>= [1] X + [0]
= [n__len(X)]
[len(nil())] = [0]
>= [0]
= [0()]
[len(cons(X, Z))] = [3] Z + [0]
>= [3] Z + [0]
= [s(n__len(activate(Z)))]
We return to the main proof.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict Trs: { activate(n__from(X)) -> from(X) }
Weak Trs:
{ fst(X1, X2) -> n__fst(X1, X2)
, fst(0(), Z) -> nil()
, fst(s(X), cons(Y, Z)) ->
cons(Y, n__fst(activate(X), activate(Z)))
, activate(X) -> X
, activate(n__fst(X1, X2)) -> fst(X1, X2)
, activate(n__add(X1, X2)) -> add(X1, X2)
, activate(n__len(X)) -> len(X)
, from(X) -> cons(X, n__from(s(X)))
, from(X) -> n__from(X)
, add(X1, X2) -> n__add(X1, X2)
, add(0(), X) -> X
, add(s(X), Y) -> s(n__add(activate(X), Y))
, len(X) -> n__len(X)
, len(nil()) -> 0()
, len(cons(X, Z)) -> s(n__len(activate(Z))) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'matrix interpretation of dimension 1' to
orient following rules strictly.
Trs: { activate(n__from(X)) -> from(X) }
The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^1)) . These rules are moved into the corresponding weak
component(s).
Sub-proof:
----------
The following argument positions are usable:
Uargs(s) = {1}, Uargs(cons) = {2}, Uargs(n__fst) = {1, 2},
Uargs(n__add) = {1}, Uargs(n__len) = {1}
TcT has computed the following constructor-based matrix
interpretation satisfying not(EDA).
[fst](x1, x2) = [2] x1 + [2] x2 + [0]
[0] = [0]
[nil] = [0]
[s](x1) = [1] x1 + [1]
[cons](x1, x2) = [1] x2 + [1]
[n__fst](x1, x2) = [1] x1 + [1] x2 + [0]
[activate](x1) = [2] x1 + [0]
[from](x1) = [6]
[n__from](x1) = [4]
[add](x1, x2) = [2] x1 + [2] x2 + [5]
[n__add](x1, x2) = [1] x1 + [1] x2 + [4]
[len](x1) = [2] x1 + [0]
[n__len](x1) = [1] x1 + [0]
The order satisfies the following ordering constraints:
[fst(X1, X2)] = [2] X1 + [2] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [n__fst(X1, X2)]
[fst(0(), Z)] = [2] Z + [0]
>= [0]
= [nil()]
[fst(s(X), cons(Y, Z))] = [2] Z + [2] X + [4]
> [2] Z + [2] X + [1]
= [cons(Y, n__fst(activate(X), activate(Z)))]
[activate(X)] = [2] X + [0]
>= [1] X + [0]
= [X]
[activate(n__fst(X1, X2))] = [2] X1 + [2] X2 + [0]
>= [2] X1 + [2] X2 + [0]
= [fst(X1, X2)]
[activate(n__from(X))] = [8]
> [6]
= [from(X)]
[activate(n__add(X1, X2))] = [2] X1 + [2] X2 + [8]
> [2] X1 + [2] X2 + [5]
= [add(X1, X2)]
[activate(n__len(X))] = [2] X + [0]
>= [2] X + [0]
= [len(X)]
[from(X)] = [6]
> [5]
= [cons(X, n__from(s(X)))]
[from(X)] = [6]
> [4]
= [n__from(X)]
[add(X1, X2)] = [2] X1 + [2] X2 + [5]
> [1] X1 + [1] X2 + [4]
= [n__add(X1, X2)]
[add(0(), X)] = [2] X + [5]
> [1] X + [0]
= [X]
[add(s(X), Y)] = [2] X + [2] Y + [7]
> [2] X + [1] Y + [5]
= [s(n__add(activate(X), Y))]
[len(X)] = [2] X + [0]
>= [1] X + [0]
= [n__len(X)]
[len(nil())] = [0]
>= [0]
= [0()]
[len(cons(X, Z))] = [2] Z + [2]
> [2] Z + [1]
= [s(n__len(activate(Z)))]
We return to the main proof.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Weak Trs:
{ fst(X1, X2) -> n__fst(X1, X2)
, fst(0(), Z) -> nil()
, fst(s(X), cons(Y, Z)) ->
cons(Y, n__fst(activate(X), activate(Z)))
, activate(X) -> X
, activate(n__fst(X1, X2)) -> fst(X1, X2)
, activate(n__from(X)) -> from(X)
, activate(n__add(X1, X2)) -> add(X1, X2)
, activate(n__len(X)) -> len(X)
, from(X) -> cons(X, n__from(s(X)))
, from(X) -> n__from(X)
, add(X1, X2) -> n__add(X1, X2)
, add(0(), X) -> X
, add(s(X), Y) -> s(n__add(activate(X), Y))
, len(X) -> n__len(X)
, len(nil()) -> 0()
, len(cons(X, Z)) -> s(n__len(activate(Z))) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
Empty rules are trivially bounded
Hurray, we answered YES(O(1),O(n^1))