YES(O(1),O(n^2)) 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)) } Trs: { rev(nil()) -> nil() } 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(car) = {}, safe(cdr) = {}, safe(null) = {}, safe(true) = {}, safe(false) = {}, safe(rev^#) = {}, safe(c_1) = {}, safe(c_2) = {}, safe(++^#) = {}, safe(c_3) = {}, safe(c_4) = {}, safe(car^#) = {}, safe(c_5) = {}, safe(cdr^#) = {}, safe(c_6) = {}, safe(null^#) = {}, safe(c_7) = {}, safe(c_8) = {} 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(car) = [], pi(cdr) = [], pi(null) = [], pi(true) = [], pi(false) = [], pi(rev^#) = [1], pi(c_1) = [], pi(c_2) = [1, 2], pi(++^#) = [], pi(c_3) = [], pi(c_4) = [], pi(car^#) = [], pi(c_5) = [], pi(cdr^#) = [], pi(c_6) = [], pi(null^#) = [], pi(c_7) = [], pi(c_8) = [] Usable defined function symbols are a subset of: {rev^#, ++^#, car^#, cdr^#, null^#} 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())) } 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 + [0] [nil] = [0] [.](x1, x2) = [1] x1 + [1] x2 + [1] [++](x1, x2) = [1] x1 + [1] x2 + [0] [car](x1) = [7] x1 + [0] [cdr](x1) = [7] x1 + [0] [null](x1) = [7] x1 + [0] [true] = [0] [false] = [0] [rev^#](x1) = [4] x1 + [1] [c_1] = [0] [c_2](x1, x2) = [7] x1 + [7] x2 + [0] [++^#](x1, x2) = [4] x1 + [0] [c_3] = [0] [c_4](x1) = [1] x1 + [1] [car^#](x1) = [7] x1 + [0] [c_5] = [0] [cdr^#](x1) = [7] x1 + [0] [c_6] = [0] [null^#](x1) = [7] x1 + [0] [c_7] = [0] [c_8] = [0] The following symbols are considered usable {rev, ++, rev^#, ++^#} The order satisfies the following ordering constraints: [rev(nil())] = [0] >= [0] = [nil()] [rev(.(x, y))] = [1] x + [1] y + [1] >= [1] x + [1] y + [1] = [++(rev(y), .(x, nil()))] [++(nil(), y)] = [1] y + [0] >= [1] y + [0] = [y] [++(.(x, y), z)] = [1] x + [1] y + [1] z + [1] >= [1] x + [1] y + [1] z + [1] = [.(x, ++(y, z))] [rev^#(.(x, y))] = [4] x + [4] y + [5] > [4] y + [1] = [rev^#(y)] [rev^#(.(x, y))] = [4] x + [4] y + [5] > [4] y + [0] = [++^#(rev(y), .(x, nil()))] [++^#(.(x, y), z)] = [4] x + [4] y + [4] > [4] y + [1] = [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))