```We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).

Strict Trs:
{ a__first(X1, X2) -> first(X1, X2)
, a__first(0(), X) -> nil()
, a__first(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
, mark(0()) -> 0()
, mark(nil()) -> nil()
, mark(s(X)) -> s(mark(X))
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
, mark(from(X)) -> a__from(mark(X))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__from(X) -> from(X) }
Obligation:
innermost runtime complexity
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__first) = {1, 2}, Uargs(s) = {1}, Uargs(cons) = {1},
Uargs(a__from) = {1}

TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).

[a__first](x1, x2) = [1] x1 + [1] x2 + [1]

[0] = [0]

[nil] = [0]

[s](x1) = [1] x1 + [0]

[cons](x1, x2) = [1] x1 + [0]

[mark](x1) = [0]

[first](x1, x2) = [1] x1 + [0]

[a__from](x1) = [1] x1 + [0]

[from](x1) = [1] x1 + [0]

The order satisfies the following ordering constraints:

[a__first(X1, X2)] =  [1] X1 + [1] X2 + [1]
>  [1] X1 + [0]
=  [first(X1, X2)]

[a__first(0(), X)] =  [1] X + [1]
>  [0]
=  [nil()]

[a__first(s(X), cons(Y, Z))] =  [1] X + [1] Y + [1]
>  [0]
=  [cons(mark(Y), first(X, Z))]

[mark(0())] =  [0]
>= [0]
=  [0()]

[mark(nil())] =  [0]
>= [0]
=  [nil()]

[mark(s(X))] =  [0]
>= [0]
=  [s(mark(X))]

[mark(cons(X1, X2))] =  [0]
>= [0]
=  [cons(mark(X1), X2)]

[mark(first(X1, X2))] =  [0]
?  [1]
=  [a__first(mark(X1), mark(X2))]

[mark(from(X))] =  [0]
>= [0]
=  [a__from(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)]

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(0()) -> 0()
, mark(nil()) -> nil()
, mark(s(X)) -> s(mark(X))
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
, mark(from(X)) -> a__from(mark(X))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__from(X) -> from(X) }
Weak Trs:
{ a__first(X1, X2) -> first(X1, X2)
, a__first(0(), X) -> nil()
, a__first(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z)) }
Obligation:
innermost runtime complexity
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__first) = {1, 2}, Uargs(s) = {1}, Uargs(cons) = {1},
Uargs(a__from) = {1}

TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).

[a__first](x1, x2) = [1] x1 + [1] x2 + [4]

[0] = [0]

[nil] = [0]

[s](x1) = [1] x1 + [0]

[cons](x1, x2) = [1] x1 + [0]

[mark](x1) = [1] x1 + [0]

[first](x1, x2) = [1] x1 + [1] x2 + [0]

[a__from](x1) = [1] x1 + [0]

[from](x1) = [1] x1 + [4]

The order satisfies the following ordering constraints:

[a__first(X1, X2)] =  [1] X1 + [1] X2 + [4]
>  [1] X1 + [1] X2 + [0]
=  [first(X1, X2)]

[a__first(0(), X)] =  [1] X + [4]
>  [0]
=  [nil()]

[a__first(s(X), cons(Y, Z))] =  [1] X + [1] Y + [4]
>  [1] Y + [0]
=  [cons(mark(Y), first(X, Z))]

[mark(0())] =  [0]
>= [0]
=  [0()]

[mark(nil())] =  [0]
>= [0]
=  [nil()]

[mark(s(X))] =  [1] X + [0]
>= [1] X + [0]
=  [s(mark(X))]

[mark(cons(X1, X2))] =  [1] X1 + [0]
>= [1] X1 + [0]
=  [cons(mark(X1), X2)]

[mark(first(X1, X2))] =  [1] X1 + [1] X2 + [0]
?  [1] X1 + [1] X2 + [4]
=  [a__first(mark(X1), mark(X2))]

[mark(from(X))] =  [1] X + [4]
>  [1] X + [0]
=  [a__from(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)]

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(0()) -> 0()
, mark(nil()) -> nil()
, mark(s(X)) -> s(mark(X))
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__from(X) -> from(X) }
Weak Trs:
{ a__first(X1, X2) -> first(X1, X2)
, a__first(0(), X) -> nil()
, a__first(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
, mark(from(X)) -> a__from(mark(X)) }
Obligation:
innermost runtime complexity
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__first) = {1, 2}, Uargs(s) = {1}, Uargs(cons) = {1},
Uargs(a__from) = {1}

TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).

[a__first](x1, x2) = [1] x1 + [1] x2 + [4]

[0] = [0]

[nil] = [0]

[s](x1) = [1] x1 + [0]

[cons](x1, x2) = [1] x1 + [0]

[mark](x1) = [1] x1 + [0]

[first](x1, x2) = [1] x1 + [1] x2 + [0]

[a__from](x1) = [1] x1 + [1]

[from](x1) = [1] x1 + [1]

The order satisfies the following ordering constraints:

[a__first(X1, X2)] =  [1] X1 + [1] X2 + [4]
>  [1] X1 + [1] X2 + [0]
=  [first(X1, X2)]

[a__first(0(), X)] =  [1] X + [4]
>  [0]
=  [nil()]

[a__first(s(X), cons(Y, Z))] =  [1] X + [1] Y + [4]
>  [1] Y + [0]
=  [cons(mark(Y), first(X, Z))]

[mark(0())] =  [0]
>= [0]
=  [0()]

[mark(nil())] =  [0]
>= [0]
=  [nil()]

[mark(s(X))] =  [1] X + [0]
>= [1] X + [0]
=  [s(mark(X))]

[mark(cons(X1, X2))] =  [1] X1 + [0]
>= [1] X1 + [0]
=  [cons(mark(X1), X2)]

[mark(first(X1, X2))] =  [1] X1 + [1] X2 + [0]
?  [1] X1 + [1] X2 + [4]
=  [a__first(mark(X1), mark(X2))]

[mark(from(X))] =  [1] X + [1]
>= [1] X + [1]
=  [a__from(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)]

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(0()) -> 0()
, mark(nil()) -> nil()
, mark(s(X)) -> s(mark(X))
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
, a__from(X) -> from(X) }
Weak Trs:
{ a__first(X1, X2) -> first(X1, X2)
, a__first(0(), X) -> nil()
, a__first(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
, mark(from(X)) -> a__from(mark(X))
, a__from(X) -> cons(mark(X), from(s(X))) }
Obligation:
innermost runtime complexity
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__first) = {1, 2}, Uargs(s) = {1}, Uargs(cons) = {1},
Uargs(a__from) = {1}

TcT has computed the following matrix interpretation satisfying
not(EDA) and not(IDA(1)).

[a__first](x1, x2) = [1] x1 + [1] x2 + [6]

[0] = [0]

[nil] = [0]

[s](x1) = [1] x1 + [0]

[cons](x1, x2) = [1] x1 + [0]

[mark](x1) = [1] x1 + [1]

[first](x1, x2) = [1] x1 + [1] x2 + [0]

[a__from](x1) = [1] x1 + [3]

[from](x1) = [1] x1 + [3]

The order satisfies the following ordering constraints:

[a__first(X1, X2)] =  [1] X1 + [1] X2 + [6]
>  [1] X1 + [1] X2 + [0]
=  [first(X1, X2)]

[a__first(0(), X)] =  [1] X + [6]
>  [0]
=  [nil()]

[a__first(s(X), cons(Y, Z))] =  [1] X + [1] Y + [6]
>  [1] Y + [1]
=  [cons(mark(Y), first(X, Z))]

[mark(0())] =  [1]
>  [0]
=  [0()]

[mark(nil())] =  [1]
>  [0]
=  [nil()]

[mark(s(X))] =  [1] X + [1]
>= [1] X + [1]
=  [s(mark(X))]

[mark(cons(X1, X2))] =  [1] X1 + [1]
>= [1] X1 + [1]
=  [cons(mark(X1), X2)]

[mark(first(X1, X2))] =  [1] X1 + [1] X2 + [1]
?  [1] X1 + [1] X2 + [8]
=  [a__first(mark(X1), mark(X2))]

[mark(from(X))] =  [1] X + [4]
>= [1] X + [4]
=  [a__from(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 + [3]
=  [from(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(s(X)) -> s(mark(X))
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
, a__from(X) -> from(X) }
Weak Trs:
{ a__first(X1, X2) -> first(X1, X2)
, a__first(0(), X) -> nil()
, a__first(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
, mark(0()) -> 0()
, mark(nil()) -> nil()
, mark(from(X)) -> a__from(mark(X))
, a__from(X) -> cons(mark(X), from(s(X))) }
Obligation:
innermost runtime complexity
YES(O(1),O(n^2))

We use the processor 'matrix interpretation of dimension 2' to
orient following rules strictly.

Trs:
{ mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
, 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__first) = {1, 2}, Uargs(s) = {1}, Uargs(cons) = {1},
Uargs(a__from) = {1}

TcT has computed the following constructor-based matrix
interpretation satisfying not(EDA).

[a__first](x1, x2) = [1 0] x1 + [1 1] x2 + [4]
[0 1]      [0 1]      [3]

[0] = [0]
[0]

[nil] = [0]
[0]

[s](x1) = [1 4] x1 + [4]
[0 1]      [0]

[cons](x1, x2) = [1 3] x1 + [0]
[0 1]      [0]

[mark](x1) = [1 1] x1 + [2]
[0 1]      [0]

[first](x1, x2) = [1 0] x1 + [1 1] x2 + [4]
[0 1]      [0 1]      [3]

[a__from](x1) = [1 6] x1 + [7]
[0 1]      [2]

[from](x1) = [1 6] x1 + [6]
[0 1]      [2]

The order satisfies the following ordering constraints:

[a__first(X1, X2)] =  [1 0] X1 + [1 1] X2 + [4]
[0 1]      [0 1]      [3]
>= [1 0] X1 + [1 1] X2 + [4]
[0 1]      [0 1]      [3]
=  [first(X1, X2)]

[a__first(0(), X)] =  [1 1] X + [4]
[0 1]     [3]
>  [0]
[0]
=  [nil()]

[a__first(s(X), cons(Y, Z))] =  [1 4] X + [1 4] Y + [8]
[0 1]     [0 1]     [3]
>  [1 4] Y + [2]
[0 1]     [0]
=  [cons(mark(Y), first(X, Z))]

[mark(0())] =  [2]
[0]
>  [0]
[0]
=  [0()]

[mark(nil())] =  [2]
[0]
>  [0]
[0]
=  [nil()]

[mark(s(X))] =  [1 5] X + [6]
[0 1]     [0]
>= [1 5] X + [6]
[0 1]     [0]
=  [s(mark(X))]

[mark(cons(X1, X2))] =  [1 4] X1 + [2]
[0 1]      [0]
>= [1 4] X1 + [2]
[0 1]      [0]
=  [cons(mark(X1), X2)]

[mark(first(X1, X2))] =  [1 1] X1 + [1 2] X2 + [9]
[0 1]      [0 1]      [3]
>  [1 1] X1 + [1 2] X2 + [8]
[0 1]      [0 1]      [3]
=  [a__first(mark(X1), mark(X2))]

[mark(from(X))] =  [1 7] X + [10]
[0 1]     [2]
>  [1 7] X + [9]
[0 1]     [2]
=  [a__from(mark(X))]

[a__from(X)] =  [1 6] X + [7]
[0 1]     [2]
>  [1 4] X + [2]
[0 1]     [0]
=  [cons(mark(X), from(s(X)))]

[a__from(X)] =  [1 6] X + [7]
[0 1]     [2]
>  [1 6] X + [6]
[0 1]     [2]
=  [from(X)]

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).

Strict Trs:
{ mark(s(X)) -> s(mark(X))
, mark(cons(X1, X2)) -> cons(mark(X1), X2) }
Weak Trs:
{ a__first(X1, X2) -> first(X1, X2)
, a__first(0(), X) -> nil()
, a__first(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
, mark(0()) -> 0()
, mark(nil()) -> nil()
, mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
, mark(from(X)) -> a__from(mark(X))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__from(X) -> from(X) }
Obligation:
innermost runtime complexity
YES(O(1),O(n^2))

We use the processor 'matrix interpretation of dimension 2' to
orient following rules strictly.

Trs:
{ mark(s(X)) -> s(mark(X))
, mark(cons(X1, X2)) -> cons(mark(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__first) = {1, 2}, Uargs(s) = {1}, Uargs(cons) = {1},
Uargs(a__from) = {1}

TcT has computed the following constructor-based matrix
interpretation satisfying not(EDA).

[a__first](x1, x2) = [1 0] x1 + [1 7] x2 + [0]
[0 1]      [0 1]      [1]

[0] = [0]
[0]

[nil] = [0]
[0]

[s](x1) = [1 7] x1 + [7]
[0 1]      [2]

[cons](x1, x2) = [1 0] x1 + [0 2] x2 + [0]
[0 1]      [0 0]      [1]

[mark](x1) = [1 1] x1 + [0]
[0 1]      [0]

[first](x1, x2) = [1 0] x1 + [1 7] x2 + [0]
[0 1]      [0 1]      [1]

[a__from](x1) = [1 3] x1 + [7]
[0 1]      [1]

[from](x1) = [1 3] x1 + [7]
[0 1]      [1]

The order satisfies the following ordering constraints:

[a__first(X1, X2)] =  [1 0] X1 + [1 7] X2 + [0]
[0 1]      [0 1]      [1]
>= [1 0] X1 + [1 7] X2 + [0]
[0 1]      [0 1]      [1]
=  [first(X1, X2)]

[a__first(0(), X)] =  [1 7] X + [0]
[0 1]     [1]
>= [0]
[0]
=  [nil()]

[a__first(s(X), cons(Y, Z))] =  [1 7] X + [1 7] Y + [0 2] Z + [14]
[0 1]     [0 1]     [0 0]     [4]
>  [0 2] X + [1 1] Y + [0 2] Z + [2]
[0 0]     [0 1]     [0 0]     [1]
=  [cons(mark(Y), first(X, Z))]

[mark(0())] =  [0]
[0]
>= [0]
[0]
=  [0()]

[mark(nil())] =  [0]
[0]
>= [0]
[0]
=  [nil()]

[mark(s(X))] =  [1 8] X + [9]
[0 1]     [2]
>  [1 8] X + [7]
[0 1]     [2]
=  [s(mark(X))]

[mark(cons(X1, X2))] =  [1 1] X1 + [0 2] X2 + [1]
[0 1]      [0 0]      [1]
>  [1 1] X1 + [0 2] X2 + [0]
[0 1]      [0 0]      [1]
=  [cons(mark(X1), X2)]

[mark(first(X1, X2))] =  [1 1] X1 + [1 8] X2 + [1]
[0 1]      [0 1]      [1]
>  [1 1] X1 + [1 8] X2 + [0]
[0 1]      [0 1]      [1]
=  [a__first(mark(X1), mark(X2))]

[mark(from(X))] =  [1 4] X + [8]
[0 1]     [1]
>  [1 4] X + [7]
[0 1]     [1]
=  [a__from(mark(X))]

[a__from(X)] =  [1 3] X + [7]
[0 1]     [1]
>  [1 3] X + [6]
[0 1]     [1]
=  [cons(mark(X), from(s(X)))]

[a__from(X)] =  [1 3] X + [7]
[0 1]     [1]
>= [1 3] X + [7]
[0 1]     [1]
=  [from(X)]

We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).

Weak Trs:
{ a__first(X1, X2) -> first(X1, X2)
, a__first(0(), X) -> nil()
, a__first(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
, mark(0()) -> 0()
, mark(nil()) -> nil()
, mark(s(X)) -> s(mark(X))
, mark(cons(X1, X2)) -> cons(mark(X1), X2)
, mark(first(X1, X2)) -> a__first(mark(X1), mark(X2))
, mark(from(X)) -> a__from(mark(X))
, a__from(X) -> cons(mark(X), from(s(X)))
, a__from(X) -> from(X) }
Obligation:
innermost runtime complexity