We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict Trs:
{ rev(nil()) -> nil()
, rev(.(x, y)) -> ++(rev(y), .(x, nil()))
, ++(nil(), y) -> y
, ++(.(x, y), z) -> .(x, ++(y, z))
, car(.(x, y)) -> x
, cdr(.(x, y)) -> y
, null(nil()) -> true()
, null(.(x, y)) -> false() }
Obligation:
runtime complexity
Answer:
YES(O(1),O(n^2))
The input is overlay and right-linear. Switching to innermost
rewriting.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict Trs:
{ rev(nil()) -> nil()
, rev(.(x, y)) -> ++(rev(y), .(x, nil()))
, ++(nil(), y) -> y
, ++(.(x, y), z) -> .(x, ++(y, z))
, car(.(x, y)) -> x
, cdr(.(x, y)) -> y
, null(nil()) -> true()
, null(.(x, y)) -> false() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We add the following dependency tuples:
Strict DPs:
{ rev^#(nil()) -> c_1()
, rev^#(.(x, y)) -> c_2(++^#(rev(y), .(x, nil())), rev^#(y))
, ++^#(nil(), y) -> c_3()
, ++^#(.(x, y), z) -> c_4(++^#(y, z))
, car^#(.(x, y)) -> c_5()
, cdr^#(.(x, y)) -> c_6()
, null^#(nil()) -> c_7()
, null^#(.(x, y)) -> c_8() }
and mark the set of starting terms.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ rev^#(nil()) -> c_1()
, rev^#(.(x, y)) -> c_2(++^#(rev(y), .(x, nil())), rev^#(y))
, ++^#(nil(), y) -> c_3()
, ++^#(.(x, y), z) -> c_4(++^#(y, z))
, car^#(.(x, y)) -> c_5()
, cdr^#(.(x, y)) -> c_6()
, null^#(nil()) -> c_7()
, null^#(.(x, y)) -> c_8() }
Weak Trs:
{ rev(nil()) -> nil()
, rev(.(x, y)) -> ++(rev(y), .(x, nil()))
, ++(nil(), y) -> y
, ++(.(x, y), z) -> .(x, ++(y, z))
, car(.(x, y)) -> x
, cdr(.(x, y)) -> y
, null(nil()) -> true()
, null(.(x, y)) -> false() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We estimate the number of application of {1,3,5,6,7,8} by
applications of Pre({1,3,5,6,7,8}) = {2,4}. Here rules are labeled
as follows:
DPs:
{ 1: rev^#(nil()) -> c_1()
, 2: rev^#(.(x, y)) -> c_2(++^#(rev(y), .(x, nil())), rev^#(y))
, 3: ++^#(nil(), y) -> c_3()
, 4: ++^#(.(x, y), z) -> c_4(++^#(y, z))
, 5: car^#(.(x, y)) -> c_5()
, 6: cdr^#(.(x, y)) -> c_6()
, 7: null^#(nil()) -> c_7()
, 8: null^#(.(x, y)) -> c_8() }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ rev^#(.(x, y)) -> c_2(++^#(rev(y), .(x, nil())), rev^#(y))
, ++^#(.(x, y), z) -> c_4(++^#(y, z)) }
Weak DPs:
{ rev^#(nil()) -> c_1()
, ++^#(nil(), y) -> c_3()
, car^#(.(x, y)) -> c_5()
, cdr^#(.(x, y)) -> c_6()
, null^#(nil()) -> c_7()
, null^#(.(x, y)) -> c_8() }
Weak Trs:
{ rev(nil()) -> nil()
, rev(.(x, y)) -> ++(rev(y), .(x, nil()))
, ++(nil(), y) -> y
, ++(.(x, y), z) -> .(x, ++(y, z))
, car(.(x, y)) -> x
, cdr(.(x, y)) -> y
, null(nil()) -> true()
, null(.(x, y)) -> false() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
The following weak DPs constitute a sub-graph of the DG that is
closed under successors. The DPs are removed.
{ rev^#(nil()) -> c_1()
, ++^#(nil(), y) -> c_3()
, car^#(.(x, y)) -> c_5()
, cdr^#(.(x, y)) -> c_6()
, null^#(nil()) -> c_7()
, null^#(.(x, y)) -> c_8() }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ rev^#(.(x, y)) -> c_2(++^#(rev(y), .(x, nil())), rev^#(y))
, ++^#(.(x, y), z) -> c_4(++^#(y, z)) }
Weak Trs:
{ rev(nil()) -> nil()
, rev(.(x, y)) -> ++(rev(y), .(x, nil()))
, ++(nil(), y) -> y
, ++(.(x, y), z) -> .(x, ++(y, z))
, car(.(x, y)) -> x
, cdr(.(x, y)) -> y
, null(nil()) -> true()
, null(.(x, y)) -> false() }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We replace rewrite rules by usable rules:
Weak Usable Rules:
{ rev(nil()) -> nil()
, rev(.(x, y)) -> ++(rev(y), .(x, nil()))
, ++(nil(), y) -> y
, ++(.(x, y), z) -> .(x, ++(y, z)) }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^2)).
Strict DPs:
{ rev^#(.(x, y)) -> c_2(++^#(rev(y), .(x, nil())), rev^#(y))
, ++^#(.(x, y), z) -> c_4(++^#(y, z)) }
Weak Trs:
{ rev(nil()) -> nil()
, rev(.(x, y)) -> ++(rev(y), .(x, nil()))
, ++(nil(), y) -> y
, ++(.(x, y), z) -> .(x, ++(y, z)) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^2))
We decompose the input problem according to the dependency graph
into the upper component
{ rev^#(.(x, y)) -> c_2(++^#(rev(y), .(x, nil())), rev^#(y)) }
and lower component
{ ++^#(.(x, y), z) -> c_4(++^#(y, z)) }
Further, following extension rules are added to the lower
component.
{ rev^#(.(x, y)) -> rev^#(y)
, rev^#(.(x, y)) -> ++^#(rev(y), .(x, nil())) }
TcT solves the upper component with certificate YES(O(1),O(n^1)).
Sub-proof:
----------
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(n^1)).
Strict DPs:
{ rev^#(.(x, y)) -> c_2(++^#(rev(y), .(x, nil())), rev^#(y)) }
Weak Trs:
{ rev(nil()) -> nil()
, rev(.(x, y)) -> ++(rev(y), .(x, nil()))
, ++(nil(), y) -> y
, ++(.(x, y), z) -> .(x, ++(y, z)) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(n^1))
We use the processor 'Small Polynomial Path Order (PS,1-bounded)'
to orient following rules strictly.
DPs:
{ 1: rev^#(.(x, y)) -> c_2(++^#(rev(y), .(x, nil())), rev^#(y)) }
Sub-proof:
----------
The input was oriented with the instance of 'Small Polynomial Path
Order (PS,1-bounded)' as induced by the safe mapping
safe(rev) = {}, safe(nil) = {}, safe(.) = {1, 2}, safe(++) = {},
safe(rev^#) = {}, safe(c_2) = {}, safe(++^#) = {}
and precedence
empty .
Following symbols are considered recursive:
{rev^#}
The recursion depth is 1.
Further, following argument filtering is employed:
pi(rev) = [], pi(nil) = [], pi(.) = [2], pi(++) = 2,
pi(rev^#) = [1], pi(c_2) = [1, 2], pi(++^#) = []
Usable defined function symbols are a subset of:
{rev^#, ++^#}
For your convenience, here are the satisfied ordering constraints:
pi(rev^#(.(x, y))) = rev^#(.(; y);)
> c_2(++^#(), rev^#(y;);)
= pi(c_2(++^#(rev(y), .(x, nil())), rev^#(y)))
The strictly oriented rules are moved into the weak component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Weak DPs:
{ rev^#(.(x, y)) -> c_2(++^#(rev(y), .(x, nil())), rev^#(y)) }
Weak Trs:
{ rev(nil()) -> nil()
, rev(.(x, y)) -> ++(rev(y), .(x, nil()))
, ++(nil(), y) -> y
, ++(.(x, y), z) -> .(x, ++(y, z)) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
The following weak DPs constitute a sub-graph of the DG that is
closed under successors. The DPs are removed.
{ rev^#(.(x, y)) -> c_2(++^#(rev(y), .(x, nil())), rev^#(y)) }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Weak Trs:
{ rev(nil()) -> nil()
, rev(.(x, y)) -> ++(rev(y), .(x, nil()))
, ++(nil(), y) -> y
, ++(.(x, y), z) -> .(x, ++(y, z)) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
No rule is usable, rules are removed from the input problem.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Rules: Empty
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
Empty rules are trivially bounded
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 DPs: { ++^#(.(x, y), z) -> c_4(++^#(y, z)) }
Weak DPs:
{ rev^#(.(x, y)) -> rev^#(y)
, rev^#(.(x, y)) -> ++^#(rev(y), .(x, nil())) }
Weak Trs:
{ rev(nil()) -> nil()
, rev(.(x, y)) -> ++(rev(y), .(x, nil()))
, ++(nil(), y) -> y
, ++(.(x, y), z) -> .(x, ++(y, 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.
DPs:
{ 1: ++^#(.(x, y), z) -> c_4(++^#(y, z))
, 2: rev^#(.(x, y)) -> rev^#(y)
, 3: rev^#(.(x, y)) -> ++^#(rev(y), .(x, nil())) }
Trs: { rev(nil()) -> nil() }
Sub-proof:
----------
The following argument positions are usable:
Uargs(c_4) = {1}
TcT has computed the following constructor-based matrix
interpretation satisfying not(EDA).
[rev](x1) = [1] x1 + [1]
[nil] = [0]
[.](x1, x2) = [1] x2 + [2]
[++](x1, x2) = [1] x1 + [1] x2 + [0]
[rev^#](x1) = [4] x1 + [3]
[++^#](x1, x2) = [4] x1 + [3] x2 + [0]
[c_4](x1) = [1] x1 + [7]
The order satisfies the following ordering constraints:
[rev(nil())] = [1]
> [0]
= [nil()]
[rev(.(x, y))] = [1] y + [3]
>= [1] y + [3]
= [++(rev(y), .(x, nil()))]
[++(nil(), y)] = [1] y + [0]
>= [1] y + [0]
= [y]
[++(.(x, y), z)] = [1] y + [1] z + [2]
>= [1] y + [1] z + [2]
= [.(x, ++(y, z))]
[rev^#(.(x, y))] = [4] y + [11]
> [4] y + [3]
= [rev^#(y)]
[rev^#(.(x, y))] = [4] y + [11]
> [4] y + [10]
= [++^#(rev(y), .(x, nil()))]
[++^#(.(x, y), z)] = [4] y + [3] z + [8]
> [4] y + [3] z + [7]
= [c_4(++^#(y, z))]
The strictly oriented rules are moved into the weak component.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Weak DPs:
{ rev^#(.(x, y)) -> rev^#(y)
, rev^#(.(x, y)) -> ++^#(rev(y), .(x, nil()))
, ++^#(.(x, y), z) -> c_4(++^#(y, z)) }
Weak Trs:
{ rev(nil()) -> nil()
, rev(.(x, y)) -> ++(rev(y), .(x, nil()))
, ++(nil(), y) -> y
, ++(.(x, y), z) -> .(x, ++(y, z)) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
The following weak DPs constitute a sub-graph of the DG that is
closed under successors. The DPs are removed.
{ rev^#(.(x, y)) -> rev^#(y)
, rev^#(.(x, y)) -> ++^#(rev(y), .(x, nil()))
, ++^#(.(x, y), z) -> c_4(++^#(y, z)) }
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Weak Trs:
{ rev(nil()) -> nil()
, rev(.(x, y)) -> ++(rev(y), .(x, nil()))
, ++(nil(), y) -> y
, ++(.(x, y), z) -> .(x, ++(y, z)) }
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
No rule is usable, rules are removed from the input problem.
We are left with following problem, upon which TcT provides the
certificate YES(O(1),O(1)).
Rules: Empty
Obligation:
innermost runtime complexity
Answer:
YES(O(1),O(1))
Empty rules are trivially bounded
Hurray, we answered YES(O(1),O(n^2))