We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict Trs:
{ a__app(X1, X2) -> app(X1, X2)
, a__app(nil(), YS) -> mark(YS)
, a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS))
, mark(nil()) -> nil()
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(app(X1, X2)) -> a__app(mark(X1), mark(X2))
, mark(from(X)) -> a__from(mark(X))
, mark(s(X)) -> s(mark(X))
, mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2))
, mark(prefix(X)) -> a__prefix(mark(X))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__from(X) -> from(X)
, a__zWadr(X1, X2) -> zWadr(X1, X2)
, a__zWadr(XS, nil()) -> nil()
, a__zWadr(nil(), YS) -> nil()
, a__zWadr(cons(X, XS), cons(Y, YS)) ->
cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))
, a__prefix(L) -> cons(nil(), zWadr(L, prefix(L)))
, a__prefix(X) -> prefix(X) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
The weightgap principle applies (using the following nonconstant
growth matrix-interpretation)
The following argument positions are usable:
Uargs(a__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1}
TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).
[a__app](x1, x2) = [1] x1 + [1] x2 + [1]
[nil] = [0]
[mark](x1) = [0]
[cons](x1, x2) = [1] x1 + [0]
[app](x1, x2) = [1] x2 + [0]
[a__from](x1) = [1] x1 + [0]
[from](x1) = [1] x1 + [0]
[s](x1) = [1] x1 + [0]
[a__zWadr](x1, x2) = [1] x1 + [1] x2 + [0]
[zWadr](x1, x2) = [1] x1 + [1] x2 + [0]
[a__prefix](x1) = [1] x1 + [0]
[prefix](x1) = [1] x1 + [0]
The order satisfies the following ordering constraints:
[a__app(X1, X2)] = [1] X1 + [1] X2 + [1]
> [1] X2 + [0]
= [app(X1, X2)]
[a__app(nil(), YS)] = [1] YS + [1]
> [0]
= [mark(YS)]
[a__app(cons(X, XS), YS)] = [1] YS + [1] X + [1]
> [0]
= [cons(mark(X), app(XS, YS))]
[mark(nil())] = [0]
>= [0]
= [nil()]
[mark(cons(X1, X2))] = [0]
>= [0]
= [cons(mark(X1), X2)]
[mark(app(X1, X2))] = [0]
? [1]
= [a__app(mark(X1), mark(X2))]
[mark(from(X))] = [0]
>= [0]
= [a__from(mark(X))]
[mark(s(X))] = [0]
>= [0]
= [s(mark(X))]
[mark(zWadr(X1, X2))] = [0]
>= [0]
= [a__zWadr(mark(X1), mark(X2))]
[mark(prefix(X))] = [0]
>= [0]
= [a__prefix(mark(X))]
[a__from(X)] = [1] X + [0]
>= [0]
= [cons(mark(X), from(s(X)))]
[a__from(X)] = [1] X + [0]
>= [1] X + [0]
= [from(X)]
[a__zWadr(X1, X2)] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [zWadr(X1, X2)]
[a__zWadr(XS, nil())] = [1] XS + [0]
>= [0]
= [nil()]
[a__zWadr(nil(), YS)] = [1] YS + [0]
>= [0]
= [nil()]
[a__zWadr(cons(X, XS), cons(Y, YS))] = [1] X + [1] Y + [0]
? [1]
= [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))]
[a__prefix(L)] = [1] L + [0]
>= [0]
= [cons(nil(), zWadr(L, prefix(L)))]
[a__prefix(X)] = [1] X + [0]
>= [1] X + [0]
= [prefix(X)]
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^2)).
Strict Trs:
{ mark(nil()) -> nil()
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(app(X1, X2)) -> a__app(mark(X1), mark(X2))
, mark(from(X)) -> a__from(mark(X))
, mark(s(X)) -> s(mark(X))
, mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2))
, mark(prefix(X)) -> a__prefix(mark(X))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__from(X) -> from(X)
, a__zWadr(X1, X2) -> zWadr(X1, X2)
, a__zWadr(XS, nil()) -> nil()
, a__zWadr(nil(), YS) -> nil()
, a__zWadr(cons(X, XS), cons(Y, YS)) ->
cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))
, a__prefix(L) -> cons(nil(), zWadr(L, prefix(L)))
, a__prefix(X) -> prefix(X) }
Weak Trs:
{ a__app(X1, X2) -> app(X1, X2)
, a__app(nil(), YS) -> mark(YS)
, a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS)) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
The weightgap principle applies (using the following nonconstant
growth matrix-interpretation)
The following argument positions are usable:
Uargs(a__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1}
TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).
[a__app](x1, x2) = [1] x1 + [1] x2 + [0]
[nil] = [4]
[mark](x1) = [1] x1 + [0]
[cons](x1, x2) = [1] x1 + [0]
[app](x1, x2) = [1] x1 + [1] x2 + [0]
[a__from](x1) = [1] x1 + [0]
[from](x1) = [1] x1 + [0]
[s](x1) = [1] x1 + [0]
[a__zWadr](x1, x2) = [1] x1 + [1] x2 + [0]
[zWadr](x1, x2) = [1] x1 + [1] x2 + [0]
[a__prefix](x1) = [1] x1 + [1]
[prefix](x1) = [1] x1 + [0]
The order satisfies the following ordering constraints:
[a__app(X1, X2)] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [app(X1, X2)]
[a__app(nil(), YS)] = [1] YS + [4]
> [1] YS + [0]
= [mark(YS)]
[a__app(cons(X, XS), YS)] = [1] YS + [1] X + [0]
>= [1] X + [0]
= [cons(mark(X), app(XS, YS))]
[mark(nil())] = [4]
>= [4]
= [nil()]
[mark(cons(X1, X2))] = [1] X1 + [0]
>= [1] X1 + [0]
= [cons(mark(X1), X2)]
[mark(app(X1, X2))] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [a__app(mark(X1), mark(X2))]
[mark(from(X))] = [1] X + [0]
>= [1] X + [0]
= [a__from(mark(X))]
[mark(s(X))] = [1] X + [0]
>= [1] X + [0]
= [s(mark(X))]
[mark(zWadr(X1, X2))] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [a__zWadr(mark(X1), mark(X2))]
[mark(prefix(X))] = [1] X + [0]
? [1] X + [1]
= [a__prefix(mark(X))]
[a__from(X)] = [1] X + [0]
>= [1] X + [0]
= [cons(mark(X), from(s(X)))]
[a__from(X)] = [1] X + [0]
>= [1] X + [0]
= [from(X)]
[a__zWadr(X1, X2)] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [zWadr(X1, X2)]
[a__zWadr(XS, nil())] = [1] XS + [4]
>= [4]
= [nil()]
[a__zWadr(nil(), YS)] = [1] YS + [4]
>= [4]
= [nil()]
[a__zWadr(cons(X, XS), cons(Y, YS))] = [1] X + [1] Y + [0]
>= [1] X + [1] Y + [0]
= [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))]
[a__prefix(L)] = [1] L + [1]
? [4]
= [cons(nil(), zWadr(L, prefix(L)))]
[a__prefix(X)] = [1] X + [1]
> [1] X + [0]
= [prefix(X)]
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^2)).
Strict Trs:
{ mark(nil()) -> nil()
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(app(X1, X2)) -> a__app(mark(X1), mark(X2))
, mark(from(X)) -> a__from(mark(X))
, mark(s(X)) -> s(mark(X))
, mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2))
, mark(prefix(X)) -> a__prefix(mark(X))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__from(X) -> from(X)
, a__zWadr(X1, X2) -> zWadr(X1, X2)
, a__zWadr(XS, nil()) -> nil()
, a__zWadr(nil(), YS) -> nil()
, a__zWadr(cons(X, XS), cons(Y, YS)) ->
cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))
, a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) }
Weak Trs:
{ a__app(X1, X2) -> app(X1, X2)
, a__app(nil(), YS) -> mark(YS)
, a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS))
, a__prefix(X) -> prefix(X) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
The weightgap principle applies (using the following nonconstant
growth matrix-interpretation)
The following argument positions are usable:
Uargs(a__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1}
TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).
[a__app](x1, x2) = [1] x1 + [1] x2 + [0]
[nil] = [4]
[mark](x1) = [1] x1 + [0]
[cons](x1, x2) = [1] x1 + [0]
[app](x1, x2) = [1] x1 + [1] x2 + [0]
[a__from](x1) = [1] x1 + [0]
[from](x1) = [1] x1 + [4]
[s](x1) = [1] x1 + [0]
[a__zWadr](x1, x2) = [1] x1 + [1] x2 + [0]
[zWadr](x1, x2) = [1] x1 + [1] x2 + [0]
[a__prefix](x1) = [1] x1 + [4]
[prefix](x1) = [1] x1 + [0]
The order satisfies the following ordering constraints:
[a__app(X1, X2)] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [app(X1, X2)]
[a__app(nil(), YS)] = [1] YS + [4]
> [1] YS + [0]
= [mark(YS)]
[a__app(cons(X, XS), YS)] = [1] YS + [1] X + [0]
>= [1] X + [0]
= [cons(mark(X), app(XS, YS))]
[mark(nil())] = [4]
>= [4]
= [nil()]
[mark(cons(X1, X2))] = [1] X1 + [0]
>= [1] X1 + [0]
= [cons(mark(X1), X2)]
[mark(app(X1, X2))] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [a__app(mark(X1), mark(X2))]
[mark(from(X))] = [1] X + [4]
> [1] X + [0]
= [a__from(mark(X))]
[mark(s(X))] = [1] X + [0]
>= [1] X + [0]
= [s(mark(X))]
[mark(zWadr(X1, X2))] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [a__zWadr(mark(X1), mark(X2))]
[mark(prefix(X))] = [1] X + [0]
? [1] X + [4]
= [a__prefix(mark(X))]
[a__from(X)] = [1] X + [0]
>= [1] X + [0]
= [cons(mark(X), from(s(X)))]
[a__from(X)] = [1] X + [0]
? [1] X + [4]
= [from(X)]
[a__zWadr(X1, X2)] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [zWadr(X1, X2)]
[a__zWadr(XS, nil())] = [1] XS + [4]
>= [4]
= [nil()]
[a__zWadr(nil(), YS)] = [1] YS + [4]
>= [4]
= [nil()]
[a__zWadr(cons(X, XS), cons(Y, YS))] = [1] X + [1] Y + [0]
>= [1] X + [1] Y + [0]
= [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))]
[a__prefix(L)] = [1] L + [4]
>= [4]
= [cons(nil(), zWadr(L, prefix(L)))]
[a__prefix(X)] = [1] X + [4]
> [1] X + [0]
= [prefix(X)]
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^2)).
Strict Trs:
{ mark(nil()) -> nil()
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(app(X1, X2)) -> a__app(mark(X1), mark(X2))
, mark(s(X)) -> s(mark(X))
, mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2))
, mark(prefix(X)) -> a__prefix(mark(X))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__from(X) -> from(X)
, a__zWadr(X1, X2) -> zWadr(X1, X2)
, a__zWadr(XS, nil()) -> nil()
, a__zWadr(nil(), YS) -> nil()
, a__zWadr(cons(X, XS), cons(Y, YS)) ->
cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))
, a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) }
Weak Trs:
{ a__app(X1, X2) -> app(X1, X2)
, a__app(nil(), YS) -> mark(YS)
, a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS))
, mark(from(X)) -> a__from(mark(X))
, a__prefix(X) -> prefix(X) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
The weightgap principle applies (using the following nonconstant
growth matrix-interpretation)
The following argument positions are usable:
Uargs(a__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1}
TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).
[a__app](x1, x2) = [1] x1 + [1] x2 + [0]
[nil] = [4]
[mark](x1) = [1] x1 + [0]
[cons](x1, x2) = [1] x1 + [0]
[app](x1, x2) = [1] x1 + [1] x2 + [0]
[a__from](x1) = [1] x1 + [0]
[from](x1) = [1] x1 + [0]
[s](x1) = [1] x1 + [0]
[a__zWadr](x1, x2) = [1] x1 + [1] x2 + [0]
[zWadr](x1, x2) = [1] x1 + [1] x2 + [4]
[a__prefix](x1) = [1] x1 + [1]
[prefix](x1) = [1] x1 + [0]
The order satisfies the following ordering constraints:
[a__app(X1, X2)] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [app(X1, X2)]
[a__app(nil(), YS)] = [1] YS + [4]
> [1] YS + [0]
= [mark(YS)]
[a__app(cons(X, XS), YS)] = [1] YS + [1] X + [0]
>= [1] X + [0]
= [cons(mark(X), app(XS, YS))]
[mark(nil())] = [4]
>= [4]
= [nil()]
[mark(cons(X1, X2))] = [1] X1 + [0]
>= [1] X1 + [0]
= [cons(mark(X1), X2)]
[mark(app(X1, X2))] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [a__app(mark(X1), mark(X2))]
[mark(from(X))] = [1] X + [0]
>= [1] X + [0]
= [a__from(mark(X))]
[mark(s(X))] = [1] X + [0]
>= [1] X + [0]
= [s(mark(X))]
[mark(zWadr(X1, X2))] = [1] X1 + [1] X2 + [4]
> [1] X1 + [1] X2 + [0]
= [a__zWadr(mark(X1), mark(X2))]
[mark(prefix(X))] = [1] X + [0]
? [1] X + [1]
= [a__prefix(mark(X))]
[a__from(X)] = [1] X + [0]
>= [1] X + [0]
= [cons(mark(X), from(s(X)))]
[a__from(X)] = [1] X + [0]
>= [1] X + [0]
= [from(X)]
[a__zWadr(X1, X2)] = [1] X1 + [1] X2 + [0]
? [1] X1 + [1] X2 + [4]
= [zWadr(X1, X2)]
[a__zWadr(XS, nil())] = [1] XS + [4]
>= [4]
= [nil()]
[a__zWadr(nil(), YS)] = [1] YS + [4]
>= [4]
= [nil()]
[a__zWadr(cons(X, XS), cons(Y, YS))] = [1] X + [1] Y + [0]
>= [1] X + [1] Y + [0]
= [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))]
[a__prefix(L)] = [1] L + [1]
? [4]
= [cons(nil(), zWadr(L, prefix(L)))]
[a__prefix(X)] = [1] X + [1]
> [1] X + [0]
= [prefix(X)]
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^2)).
Strict Trs:
{ mark(nil()) -> nil()
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(app(X1, X2)) -> a__app(mark(X1), mark(X2))
, mark(s(X)) -> s(mark(X))
, mark(prefix(X)) -> a__prefix(mark(X))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__from(X) -> from(X)
, a__zWadr(X1, X2) -> zWadr(X1, X2)
, a__zWadr(XS, nil()) -> nil()
, a__zWadr(nil(), YS) -> nil()
, a__zWadr(cons(X, XS), cons(Y, YS)) ->
cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))
, a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) }
Weak Trs:
{ a__app(X1, X2) -> app(X1, X2)
, a__app(nil(), YS) -> mark(YS)
, a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS))
, mark(from(X)) -> a__from(mark(X))
, mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2))
, a__prefix(X) -> prefix(X) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
The weightgap principle applies (using the following nonconstant
growth matrix-interpretation)
The following argument positions are usable:
Uargs(a__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1}
TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).
[a__app](x1, x2) = [1] x1 + [1] x2 + [1]
[nil] = [4]
[mark](x1) = [1] x1 + [0]
[cons](x1, x2) = [1] x1 + [0]
[app](x1, x2) = [1] x1 + [1] x2 + [0]
[a__from](x1) = [1] x1 + [1]
[from](x1) = [1] x1 + [1]
[s](x1) = [1] x1 + [0]
[a__zWadr](x1, x2) = [1] x1 + [1] x2 + [0]
[zWadr](x1, x2) = [1] x1 + [1] x2 + [5]
[a__prefix](x1) = [1] x1 + [4]
[prefix](x1) = [1] x1 + [0]
The order satisfies the following ordering constraints:
[a__app(X1, X2)] = [1] X1 + [1] X2 + [1]
> [1] X1 + [1] X2 + [0]
= [app(X1, X2)]
[a__app(nil(), YS)] = [1] YS + [5]
> [1] YS + [0]
= [mark(YS)]
[a__app(cons(X, XS), YS)] = [1] YS + [1] X + [1]
> [1] X + [0]
= [cons(mark(X), app(XS, YS))]
[mark(nil())] = [4]
>= [4]
= [nil()]
[mark(cons(X1, X2))] = [1] X1 + [0]
>= [1] X1 + [0]
= [cons(mark(X1), X2)]
[mark(app(X1, X2))] = [1] X1 + [1] X2 + [0]
? [1] X1 + [1] X2 + [1]
= [a__app(mark(X1), mark(X2))]
[mark(from(X))] = [1] X + [1]
>= [1] X + [1]
= [a__from(mark(X))]
[mark(s(X))] = [1] X + [0]
>= [1] X + [0]
= [s(mark(X))]
[mark(zWadr(X1, X2))] = [1] X1 + [1] X2 + [5]
> [1] X1 + [1] X2 + [0]
= [a__zWadr(mark(X1), mark(X2))]
[mark(prefix(X))] = [1] X + [0]
? [1] X + [4]
= [a__prefix(mark(X))]
[a__from(X)] = [1] X + [1]
> [1] X + [0]
= [cons(mark(X), from(s(X)))]
[a__from(X)] = [1] X + [1]
>= [1] X + [1]
= [from(X)]
[a__zWadr(X1, X2)] = [1] X1 + [1] X2 + [0]
? [1] X1 + [1] X2 + [5]
= [zWadr(X1, X2)]
[a__zWadr(XS, nil())] = [1] XS + [4]
>= [4]
= [nil()]
[a__zWadr(nil(), YS)] = [1] YS + [4]
>= [4]
= [nil()]
[a__zWadr(cons(X, XS), cons(Y, YS))] = [1] X + [1] Y + [0]
? [1] X + [1] Y + [1]
= [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))]
[a__prefix(L)] = [1] L + [4]
>= [4]
= [cons(nil(), zWadr(L, prefix(L)))]
[a__prefix(X)] = [1] X + [4]
> [1] X + [0]
= [prefix(X)]
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^2)).
Strict Trs:
{ mark(nil()) -> nil()
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(app(X1, X2)) -> a__app(mark(X1), mark(X2))
, mark(s(X)) -> s(mark(X))
, mark(prefix(X)) -> a__prefix(mark(X))
, a__from(X) -> from(X)
, a__zWadr(X1, X2) -> zWadr(X1, X2)
, a__zWadr(XS, nil()) -> nil()
, a__zWadr(nil(), YS) -> nil()
, a__zWadr(cons(X, XS), cons(Y, YS)) ->
cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))
, a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) }
Weak Trs:
{ a__app(X1, X2) -> app(X1, X2)
, a__app(nil(), YS) -> mark(YS)
, a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS))
, mark(from(X)) -> a__from(mark(X))
, mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__prefix(X) -> prefix(X) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
The weightgap principle applies (using the following nonconstant
growth matrix-interpretation)
The following argument positions are usable:
Uargs(a__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1}
TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).
[a__app](x1, x2) = [1] x1 + [1] x2 + [0]
[nil] = [4]
[mark](x1) = [1] x1 + [0]
[cons](x1, x2) = [1] x1 + [0]
[app](x1, x2) = [1] x1 + [1] x2 + [0]
[a__from](x1) = [1] x1 + [1]
[from](x1) = [1] x1 + [4]
[s](x1) = [1] x1 + [0]
[a__zWadr](x1, x2) = [1] x1 + [1] x2 + [1]
[zWadr](x1, x2) = [1] x1 + [1] x2 + [1]
[a__prefix](x1) = [1] x1 + [1]
[prefix](x1) = [1] x1 + [1]
The order satisfies the following ordering constraints:
[a__app(X1, X2)] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [app(X1, X2)]
[a__app(nil(), YS)] = [1] YS + [4]
> [1] YS + [0]
= [mark(YS)]
[a__app(cons(X, XS), YS)] = [1] YS + [1] X + [0]
>= [1] X + [0]
= [cons(mark(X), app(XS, YS))]
[mark(nil())] = [4]
>= [4]
= [nil()]
[mark(cons(X1, X2))] = [1] X1 + [0]
>= [1] X1 + [0]
= [cons(mark(X1), X2)]
[mark(app(X1, X2))] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [a__app(mark(X1), mark(X2))]
[mark(from(X))] = [1] X + [4]
> [1] X + [1]
= [a__from(mark(X))]
[mark(s(X))] = [1] X + [0]
>= [1] X + [0]
= [s(mark(X))]
[mark(zWadr(X1, X2))] = [1] X1 + [1] X2 + [1]
>= [1] X1 + [1] X2 + [1]
= [a__zWadr(mark(X1), mark(X2))]
[mark(prefix(X))] = [1] X + [1]
>= [1] X + [1]
= [a__prefix(mark(X))]
[a__from(X)] = [1] X + [1]
> [1] X + [0]
= [cons(mark(X), from(s(X)))]
[a__from(X)] = [1] X + [1]
? [1] X + [4]
= [from(X)]
[a__zWadr(X1, X2)] = [1] X1 + [1] X2 + [1]
>= [1] X1 + [1] X2 + [1]
= [zWadr(X1, X2)]
[a__zWadr(XS, nil())] = [1] XS + [5]
> [4]
= [nil()]
[a__zWadr(nil(), YS)] = [1] YS + [5]
> [4]
= [nil()]
[a__zWadr(cons(X, XS), cons(Y, YS))] = [1] X + [1] Y + [1]
> [1] X + [1] Y + [0]
= [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))]
[a__prefix(L)] = [1] L + [1]
? [4]
= [cons(nil(), zWadr(L, prefix(L)))]
[a__prefix(X)] = [1] X + [1]
>= [1] X + [1]
= [prefix(X)]
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^2)).
Strict Trs:
{ mark(nil()) -> nil()
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(app(X1, X2)) -> a__app(mark(X1), mark(X2))
, mark(s(X)) -> s(mark(X))
, mark(prefix(X)) -> a__prefix(mark(X))
, a__from(X) -> from(X)
, a__zWadr(X1, X2) -> zWadr(X1, X2)
, a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) }
Weak Trs:
{ a__app(X1, X2) -> app(X1, X2)
, a__app(nil(), YS) -> mark(YS)
, a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS))
, mark(from(X)) -> a__from(mark(X))
, mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__zWadr(XS, nil()) -> nil()
, a__zWadr(nil(), YS) -> nil()
, a__zWadr(cons(X, XS), cons(Y, YS)) ->
cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))
, a__prefix(X) -> prefix(X) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
The weightgap principle applies (using the following nonconstant
growth matrix-interpretation)
The following argument positions are usable:
Uargs(a__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1}
TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).
[a__app](x1, x2) = [1] x1 + [1] x2 + [0]
[nil] = [0]
[mark](x1) = [1] x1 + [0]
[cons](x1, x2) = [1] x1 + [0]
[app](x1, x2) = [1] x1 + [1] x2 + [0]
[a__from](x1) = [1] x1 + [1]
[from](x1) = [1] x1 + [4]
[s](x1) = [1] x1 + [0]
[a__zWadr](x1, x2) = [1] x1 + [1] x2 + [0]
[zWadr](x1, x2) = [1] x1 + [1] x2 + [0]
[a__prefix](x1) = [1] x1 + [1]
[prefix](x1) = [1] x1 + [0]
The order satisfies the following ordering constraints:
[a__app(X1, X2)] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [app(X1, X2)]
[a__app(nil(), YS)] = [1] YS + [0]
>= [1] YS + [0]
= [mark(YS)]
[a__app(cons(X, XS), YS)] = [1] YS + [1] X + [0]
>= [1] X + [0]
= [cons(mark(X), app(XS, YS))]
[mark(nil())] = [0]
>= [0]
= [nil()]
[mark(cons(X1, X2))] = [1] X1 + [0]
>= [1] X1 + [0]
= [cons(mark(X1), X2)]
[mark(app(X1, X2))] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [a__app(mark(X1), mark(X2))]
[mark(from(X))] = [1] X + [4]
> [1] X + [1]
= [a__from(mark(X))]
[mark(s(X))] = [1] X + [0]
>= [1] X + [0]
= [s(mark(X))]
[mark(zWadr(X1, X2))] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [a__zWadr(mark(X1), mark(X2))]
[mark(prefix(X))] = [1] X + [0]
? [1] X + [1]
= [a__prefix(mark(X))]
[a__from(X)] = [1] X + [1]
> [1] X + [0]
= [cons(mark(X), from(s(X)))]
[a__from(X)] = [1] X + [1]
? [1] X + [4]
= [from(X)]
[a__zWadr(X1, X2)] = [1] X1 + [1] X2 + [0]
>= [1] X1 + [1] X2 + [0]
= [zWadr(X1, X2)]
[a__zWadr(XS, nil())] = [1] XS + [0]
>= [0]
= [nil()]
[a__zWadr(nil(), YS)] = [1] YS + [0]
>= [0]
= [nil()]
[a__zWadr(cons(X, XS), cons(Y, YS))] = [1] X + [1] Y + [0]
>= [1] X + [1] Y + [0]
= [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))]
[a__prefix(L)] = [1] L + [1]
> [0]
= [cons(nil(), zWadr(L, prefix(L)))]
[a__prefix(X)] = [1] X + [1]
> [1] X + [0]
= [prefix(X)]
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^2)).
Strict Trs:
{ mark(nil()) -> nil()
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(app(X1, X2)) -> a__app(mark(X1), mark(X2))
, mark(s(X)) -> s(mark(X))
, mark(prefix(X)) -> a__prefix(mark(X))
, a__from(X) -> from(X)
, a__zWadr(X1, X2) -> zWadr(X1, X2) }
Weak Trs:
{ a__app(X1, X2) -> app(X1, X2)
, a__app(nil(), YS) -> mark(YS)
, a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS))
, mark(from(X)) -> a__from(mark(X))
, mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__zWadr(XS, nil()) -> nil()
, a__zWadr(nil(), YS) -> nil()
, a__zWadr(cons(X, XS), cons(Y, YS)) ->
cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))
, a__prefix(L) -> cons(nil(), zWadr(L, prefix(L)))
, a__prefix(X) -> prefix(X) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
The weightgap principle applies (using the following nonconstant
growth matrix-interpretation)
The following argument positions are usable:
Uargs(a__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1}
TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).
[a__app](x1, x2) = [1] x1 + [1] x2 + [3]
[nil] = [0]
[mark](x1) = [1] x1 + [1]
[cons](x1, x2) = [1] x1 + [0]
[app](x1, x2) = [1] x1 + [1] x2 + [0]
[a__from](x1) = [1] x1 + [3]
[from](x1) = [1] x1 + [4]
[s](x1) = [1] x1 + [0]
[a__zWadr](x1, x2) = [1] x1 + [1] x2 + [5]
[zWadr](x1, x2) = [1] x1 + [1] x2 + [7]
[a__prefix](x1) = [1] x1 + [7]
[prefix](x1) = [1] x1 + [4]
The order satisfies the following ordering constraints:
[a__app(X1, X2)] = [1] X1 + [1] X2 + [3]
> [1] X1 + [1] X2 + [0]
= [app(X1, X2)]
[a__app(nil(), YS)] = [1] YS + [3]
> [1] YS + [1]
= [mark(YS)]
[a__app(cons(X, XS), YS)] = [1] YS + [1] X + [3]
> [1] X + [1]
= [cons(mark(X), app(XS, YS))]
[mark(nil())] = [1]
> [0]
= [nil()]
[mark(cons(X1, X2))] = [1] X1 + [1]
>= [1] X1 + [1]
= [cons(mark(X1), X2)]
[mark(app(X1, X2))] = [1] X1 + [1] X2 + [1]
? [1] X1 + [1] X2 + [5]
= [a__app(mark(X1), mark(X2))]
[mark(from(X))] = [1] X + [5]
> [1] X + [4]
= [a__from(mark(X))]
[mark(s(X))] = [1] X + [1]
>= [1] X + [1]
= [s(mark(X))]
[mark(zWadr(X1, X2))] = [1] X1 + [1] X2 + [8]
> [1] X1 + [1] X2 + [7]
= [a__zWadr(mark(X1), mark(X2))]
[mark(prefix(X))] = [1] X + [5]
? [1] X + [8]
= [a__prefix(mark(X))]
[a__from(X)] = [1] X + [3]
> [1] X + [1]
= [cons(mark(X), from(s(X)))]
[a__from(X)] = [1] X + [3]
? [1] X + [4]
= [from(X)]
[a__zWadr(X1, X2)] = [1] X1 + [1] X2 + [5]
? [1] X1 + [1] X2 + [7]
= [zWadr(X1, X2)]
[a__zWadr(XS, nil())] = [1] XS + [5]
> [0]
= [nil()]
[a__zWadr(nil(), YS)] = [1] YS + [5]
> [0]
= [nil()]
[a__zWadr(cons(X, XS), cons(Y, YS))] = [1] X + [1] Y + [5]
>= [1] X + [1] Y + [5]
= [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))]
[a__prefix(L)] = [1] L + [7]
> [0]
= [cons(nil(), zWadr(L, prefix(L)))]
[a__prefix(X)] = [1] X + [7]
> [1] X + [4]
= [prefix(X)]
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^2)).
Strict Trs:
{ mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(app(X1, X2)) -> a__app(mark(X1), mark(X2))
, mark(s(X)) -> s(mark(X))
, mark(prefix(X)) -> a__prefix(mark(X))
, a__from(X) -> from(X)
, a__zWadr(X1, X2) -> zWadr(X1, X2) }
Weak Trs:
{ a__app(X1, X2) -> app(X1, X2)
, a__app(nil(), YS) -> mark(YS)
, a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS))
, mark(nil()) -> nil()
, mark(from(X)) -> a__from(mark(X))
, mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__zWadr(XS, nil()) -> nil()
, a__zWadr(nil(), YS) -> nil()
, a__zWadr(cons(X, XS), cons(Y, YS)) ->
cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))
, a__prefix(L) -> cons(nil(), zWadr(L, prefix(L)))
, a__prefix(X) -> prefix(X) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We use the processor 'matrix interpretation of dimension 2' to
orient following rules strictly.
Trs:
{ mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(prefix(X)) -> a__prefix(mark(X))
, a__from(X) -> from(X) }
The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^2)) . These rules are moved into the corresponding weak
component(s).
Sub-proof:
----------
The following argument positions are usable:
Uargs(a__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1}
TcT has computed the following constructor-based matrix
interpretation satisfying not(EDA).
[a__app](x1, x2) = [1 5] x1 + [1 3] x2 + [1]
[0 1] [0 1] [1]
[nil] = [1]
[1]
[mark](x1) = [1 2] x1 + [2]
[0 1] [0]
[cons](x1, x2) = [1 0] x1 + [0]
[0 1] [1]
[app](x1, x2) = [1 5] x1 + [1 3] x2 + [1]
[0 1] [0 1] [1]
[a__from](x1) = [1 3] x1 + [7]
[0 1] [3]
[from](x1) = [1 3] x1 + [2]
[0 1] [3]
[s](x1) = [1 4] x1 + [0]
[0 1] [0]
[a__zWadr](x1, x2) = [1 6] x1 + [1 7] x2 + [0]
[0 1] [0 1] [1]
[zWadr](x1, x2) = [1 6] x1 + [1 7] x2 + [0]
[0 1] [0 1] [1]
[a__prefix](x1) = [1 1] x1 + [7]
[0 1] [3]
[prefix](x1) = [1 1] x1 + [2]
[0 1] [3]
The order satisfies the following ordering constraints:
[a__app(X1, X2)] = [1 5] X1 + [1 3] X2 + [1]
[0 1] [0 1] [1]
>= [1 5] X1 + [1 3] X2 + [1]
[0 1] [0 1] [1]
= [app(X1, X2)]
[a__app(nil(), YS)] = [1 3] YS + [7]
[0 1] [2]
> [1 2] YS + [2]
[0 1] [0]
= [mark(YS)]
[a__app(cons(X, XS), YS)] = [1 3] YS + [1 5] X + [6]
[0 1] [0 1] [2]
> [1 2] X + [2]
[0 1] [1]
= [cons(mark(X), app(XS, YS))]
[mark(nil())] = [5]
[1]
> [1]
[1]
= [nil()]
[mark(cons(X1, X2))] = [1 2] X1 + [4]
[0 1] [1]
> [1 2] X1 + [2]
[0 1] [1]
= [cons(mark(X1), X2)]
[mark(app(X1, X2))] = [1 7] X1 + [1 5] X2 + [5]
[0 1] [0 1] [1]
>= [1 7] X1 + [1 5] X2 + [5]
[0 1] [0 1] [1]
= [a__app(mark(X1), mark(X2))]
[mark(from(X))] = [1 5] X + [10]
[0 1] [3]
> [1 5] X + [9]
[0 1] [3]
= [a__from(mark(X))]
[mark(s(X))] = [1 6] X + [2]
[0 1] [0]
>= [1 6] X + [2]
[0 1] [0]
= [s(mark(X))]
[mark(zWadr(X1, X2))] = [1 8] X1 + [1 9] X2 + [4]
[0 1] [0 1] [1]
>= [1 8] X1 + [1 9] X2 + [4]
[0 1] [0 1] [1]
= [a__zWadr(mark(X1), mark(X2))]
[mark(prefix(X))] = [1 3] X + [10]
[0 1] [3]
> [1 3] X + [9]
[0 1] [3]
= [a__prefix(mark(X))]
[a__from(X)] = [1 3] X + [7]
[0 1] [3]
> [1 2] X + [2]
[0 1] [1]
= [cons(mark(X), from(s(X)))]
[a__from(X)] = [1 3] X + [7]
[0 1] [3]
> [1 3] X + [2]
[0 1] [3]
= [from(X)]
[a__zWadr(X1, X2)] = [1 6] X1 + [1 7] X2 + [0]
[0 1] [0 1] [1]
>= [1 6] X1 + [1 7] X2 + [0]
[0 1] [0 1] [1]
= [zWadr(X1, X2)]
[a__zWadr(XS, nil())] = [1 6] XS + [8]
[0 1] [2]
> [1]
[1]
= [nil()]
[a__zWadr(nil(), YS)] = [1 7] YS + [7]
[0 1] [2]
> [1]
[1]
= [nil()]
[a__zWadr(cons(X, XS), cons(Y, YS))] = [1 6] X + [1 7] Y + [13]
[0 1] [0 1] [3]
> [1 5] X + [1 7] Y + [8]
[0 1] [0 1] [3]
= [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))]
[a__prefix(L)] = [1 1] L + [7]
[0 1] [3]
> [1]
[2]
= [cons(nil(), zWadr(L, prefix(L)))]
[a__prefix(X)] = [1 1] X + [7]
[0 1] [3]
> [1 1] X + [2]
[0 1] [3]
= [prefix(X)]
We return to the main proof.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict Trs:
{ mark(app(X1, X2)) -> a__app(mark(X1), mark(X2))
, mark(s(X)) -> s(mark(X))
, a__zWadr(X1, X2) -> zWadr(X1, X2) }
Weak Trs:
{ a__app(X1, X2) -> app(X1, X2)
, a__app(nil(), YS) -> mark(YS)
, a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS))
, mark(nil()) -> nil()
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(from(X)) -> a__from(mark(X))
, mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2))
, mark(prefix(X)) -> a__prefix(mark(X))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__from(X) -> from(X)
, a__zWadr(XS, nil()) -> nil()
, a__zWadr(nil(), YS) -> nil()
, a__zWadr(cons(X, XS), cons(Y, YS)) ->
cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))
, a__prefix(L) -> cons(nil(), zWadr(L, prefix(L)))
, a__prefix(X) -> prefix(X) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We use the processor 'matrix interpretation of dimension 2' to
orient following rules strictly.
Trs:
{ mark(app(X1, X2)) -> a__app(mark(X1), mark(X2))
, mark(s(X)) -> s(mark(X))
, a__zWadr(X1, X2) -> zWadr(X1, X2) }
The induced complexity on above rules (modulo remaining rules) is
YES(?,O(n^2)) . These rules are moved into the corresponding weak
component(s).
Sub-proof:
----------
The following argument positions are usable:
Uargs(a__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1},
Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1}
TcT has computed the following constructor-based matrix
interpretation satisfying not(EDA).
[a__app](x1, x2) = [1 1] x1 + [1 1] x2 + [2]
[0 1] [0 1] [5]
[nil] = [6]
[0]
[mark](x1) = [1 1] x1 + [0]
[0 1] [0]
[cons](x1, x2) = [1 0] x1 + [0]
[0 1] [3]
[app](x1, x2) = [1 1] x1 + [1 1] x2 + [0]
[0 1] [0 1] [5]
[a__from](x1) = [1 7] x1 + [4]
[0 1] [3]
[from](x1) = [1 7] x1 + [1]
[0 1] [3]
[s](x1) = [1 0] x1 + [4]
[0 1] [2]
[a__zWadr](x1, x2) = [1 2] x1 + [1 2] x2 + [3]
[0 1] [0 1] [7]
[zWadr](x1, x2) = [1 2] x1 + [1 2] x2 + [0]
[0 1] [0 1] [7]
[a__prefix](x1) = [1 0] x1 + [7]
[0 1] [3]
[prefix](x1) = [1 0] x1 + [4]
[0 1] [3]
The order satisfies the following ordering constraints:
[a__app(X1, X2)] = [1 1] X1 + [1 1] X2 + [2]
[0 1] [0 1] [5]
> [1 1] X1 + [1 1] X2 + [0]
[0 1] [0 1] [5]
= [app(X1, X2)]
[a__app(nil(), YS)] = [1 1] YS + [8]
[0 1] [5]
> [1 1] YS + [0]
[0 1] [0]
= [mark(YS)]
[a__app(cons(X, XS), YS)] = [1 1] YS + [1 1] X + [5]
[0 1] [0 1] [8]
> [1 1] X + [0]
[0 1] [3]
= [cons(mark(X), app(XS, YS))]
[mark(nil())] = [6]
[0]
>= [6]
[0]
= [nil()]
[mark(cons(X1, X2))] = [1 1] X1 + [3]
[0 1] [3]
> [1 1] X1 + [0]
[0 1] [3]
= [cons(mark(X1), X2)]
[mark(app(X1, X2))] = [1 2] X1 + [1 2] X2 + [5]
[0 1] [0 1] [5]
> [1 2] X1 + [1 2] X2 + [2]
[0 1] [0 1] [5]
= [a__app(mark(X1), mark(X2))]
[mark(from(X))] = [1 8] X + [4]
[0 1] [3]
>= [1 8] X + [4]
[0 1] [3]
= [a__from(mark(X))]
[mark(s(X))] = [1 1] X + [6]
[0 1] [2]
> [1 1] X + [4]
[0 1] [2]
= [s(mark(X))]
[mark(zWadr(X1, X2))] = [1 3] X1 + [1 3] X2 + [7]
[0 1] [0 1] [7]
> [1 3] X1 + [1 3] X2 + [3]
[0 1] [0 1] [7]
= [a__zWadr(mark(X1), mark(X2))]
[mark(prefix(X))] = [1 1] X + [7]
[0 1] [3]
>= [1 1] X + [7]
[0 1] [3]
= [a__prefix(mark(X))]
[a__from(X)] = [1 7] X + [4]
[0 1] [3]
> [1 1] X + [0]
[0 1] [3]
= [cons(mark(X), from(s(X)))]
[a__from(X)] = [1 7] X + [4]
[0 1] [3]
> [1 7] X + [1]
[0 1] [3]
= [from(X)]
[a__zWadr(X1, X2)] = [1 2] X1 + [1 2] X2 + [3]
[0 1] [0 1] [7]
> [1 2] X1 + [1 2] X2 + [0]
[0 1] [0 1] [7]
= [zWadr(X1, X2)]
[a__zWadr(XS, nil())] = [1 2] XS + [9]
[0 1] [7]
> [6]
[0]
= [nil()]
[a__zWadr(nil(), YS)] = [1 2] YS + [9]
[0 1] [7]
> [6]
[0]
= [nil()]
[a__zWadr(cons(X, XS), cons(Y, YS))] = [1 2] X + [1 2] Y + [15]
[0 1] [0 1] [13]
> [1 2] X + [1 2] Y + [5]
[0 1] [0 1] [11]
= [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))]
[a__prefix(L)] = [1 0] L + [7]
[0 1] [3]
> [6]
[3]
= [cons(nil(), zWadr(L, prefix(L)))]
[a__prefix(X)] = [1 0] X + [7]
[0 1] [3]
> [1 0] X + [4]
[0 1] [3]
= [prefix(X)]
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:
{ a__app(X1, X2) -> app(X1, X2)
, a__app(nil(), YS) -> mark(YS)
, a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS))
, mark(nil()) -> nil()
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(app(X1, X2)) -> a__app(mark(X1), mark(X2))
, mark(from(X)) -> a__from(mark(X))
, mark(s(X)) -> s(mark(X))
, mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2))
, mark(prefix(X)) -> a__prefix(mark(X))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__from(X) -> from(X)
, a__zWadr(X1, X2) -> zWadr(X1, X2)
, a__zWadr(XS, nil()) -> nil()
, a__zWadr(nil(), YS) -> nil()
, a__zWadr(cons(X, XS), cons(Y, YS)) ->
cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))
, a__prefix(L) -> cons(nil(), zWadr(L, prefix(L)))
, a__prefix(X) -> prefix(X) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
Empty rules are trivially bounded
Hurray, we answered YES(O(1),O(n^2))