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: { p(0()) -> 0() , p(s(x)) -> x , le(0(), y) -> true() , le(s(x), 0()) -> false() , le(s(x), s(y)) -> le(x, y) , minus(x, 0()) -> x , minus(x, s(y)) -> if(le(x, s(y)), 0(), p(minus(x, p(s(y))))) , if(true(), x, y) -> x , if(false(), x, y) -> y } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We add the following dependency tuples: Strict DPs: { p^#(0()) -> c_1() , p^#(s(x)) -> c_2() , le^#(0(), y) -> c_3() , le^#(s(x), 0()) -> c_4() , le^#(s(x), s(y)) -> c_5(le^#(x, y)) , minus^#(x, 0()) -> c_6() , minus^#(x, s(y)) -> c_7(if^#(le(x, s(y)), 0(), p(minus(x, p(s(y))))), le^#(x, s(y)), p^#(minus(x, p(s(y)))), minus^#(x, p(s(y))), p^#(s(y))) , if^#(true(), x, y) -> c_8() , if^#(false(), x, y) -> c_9() } 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: { p^#(0()) -> c_1() , p^#(s(x)) -> c_2() , le^#(0(), y) -> c_3() , le^#(s(x), 0()) -> c_4() , le^#(s(x), s(y)) -> c_5(le^#(x, y)) , minus^#(x, 0()) -> c_6() , minus^#(x, s(y)) -> c_7(if^#(le(x, s(y)), 0(), p(minus(x, p(s(y))))), le^#(x, s(y)), p^#(minus(x, p(s(y)))), minus^#(x, p(s(y))), p^#(s(y))) , if^#(true(), x, y) -> c_8() , if^#(false(), x, y) -> c_9() } Weak Trs: { p(0()) -> 0() , p(s(x)) -> x , le(0(), y) -> true() , le(s(x), 0()) -> false() , le(s(x), s(y)) -> le(x, y) , minus(x, 0()) -> x , minus(x, s(y)) -> if(le(x, s(y)), 0(), p(minus(x, p(s(y))))) , if(true(), x, y) -> x , if(false(), x, y) -> y } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We estimate the number of application of {1,2,3,4,6,8,9} by applications of Pre({1,2,3,4,6,8,9}) = {5,7}. Here rules are labeled as follows: DPs: { 1: p^#(0()) -> c_1() , 2: p^#(s(x)) -> c_2() , 3: le^#(0(), y) -> c_3() , 4: le^#(s(x), 0()) -> c_4() , 5: le^#(s(x), s(y)) -> c_5(le^#(x, y)) , 6: minus^#(x, 0()) -> c_6() , 7: minus^#(x, s(y)) -> c_7(if^#(le(x, s(y)), 0(), p(minus(x, p(s(y))))), le^#(x, s(y)), p^#(minus(x, p(s(y)))), minus^#(x, p(s(y))), p^#(s(y))) , 8: if^#(true(), x, y) -> c_8() , 9: if^#(false(), x, y) -> c_9() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { le^#(s(x), s(y)) -> c_5(le^#(x, y)) , minus^#(x, s(y)) -> c_7(if^#(le(x, s(y)), 0(), p(minus(x, p(s(y))))), le^#(x, s(y)), p^#(minus(x, p(s(y)))), minus^#(x, p(s(y))), p^#(s(y))) } Weak DPs: { p^#(0()) -> c_1() , p^#(s(x)) -> c_2() , le^#(0(), y) -> c_3() , le^#(s(x), 0()) -> c_4() , minus^#(x, 0()) -> c_6() , if^#(true(), x, y) -> c_8() , if^#(false(), x, y) -> c_9() } Weak Trs: { p(0()) -> 0() , p(s(x)) -> x , le(0(), y) -> true() , le(s(x), 0()) -> false() , le(s(x), s(y)) -> le(x, y) , minus(x, 0()) -> x , minus(x, s(y)) -> if(le(x, s(y)), 0(), p(minus(x, p(s(y))))) , if(true(), x, y) -> x , if(false(), x, y) -> y } 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. { p^#(0()) -> c_1() , p^#(s(x)) -> c_2() , le^#(0(), y) -> c_3() , le^#(s(x), 0()) -> c_4() , minus^#(x, 0()) -> c_6() , if^#(true(), x, y) -> c_8() , if^#(false(), x, y) -> c_9() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { le^#(s(x), s(y)) -> c_5(le^#(x, y)) , minus^#(x, s(y)) -> c_7(if^#(le(x, s(y)), 0(), p(minus(x, p(s(y))))), le^#(x, s(y)), p^#(minus(x, p(s(y)))), minus^#(x, p(s(y))), p^#(s(y))) } Weak Trs: { p(0()) -> 0() , p(s(x)) -> x , le(0(), y) -> true() , le(s(x), 0()) -> false() , le(s(x), s(y)) -> le(x, y) , minus(x, 0()) -> x , minus(x, s(y)) -> if(le(x, s(y)), 0(), p(minus(x, p(s(y))))) , if(true(), x, y) -> x , if(false(), x, y) -> y } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { minus^#(x, s(y)) -> c_7(if^#(le(x, s(y)), 0(), p(minus(x, p(s(y))))), le^#(x, s(y)), p^#(minus(x, p(s(y)))), minus^#(x, p(s(y))), p^#(s(y))) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { le^#(s(x), s(y)) -> c_1(le^#(x, y)) , minus^#(x, s(y)) -> c_2(le^#(x, s(y)), minus^#(x, p(s(y)))) } Weak Trs: { p(0()) -> 0() , p(s(x)) -> x , le(0(), y) -> true() , le(s(x), 0()) -> false() , le(s(x), s(y)) -> le(x, y) , minus(x, 0()) -> x , minus(x, s(y)) -> if(le(x, s(y)), 0(), p(minus(x, p(s(y))))) , if(true(), x, y) -> x , if(false(), x, y) -> y } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We replace rewrite rules by usable rules: Weak Usable Rules: { p(0()) -> 0() , p(s(x)) -> x } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { le^#(s(x), s(y)) -> c_1(le^#(x, y)) , minus^#(x, s(y)) -> c_2(le^#(x, s(y)), minus^#(x, p(s(y)))) } Weak Trs: { p(0()) -> 0() , p(s(x)) -> x } 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 { minus^#(x, s(y)) -> c_2(le^#(x, s(y)), minus^#(x, p(s(y)))) } and lower component { le^#(s(x), s(y)) -> c_1(le^#(x, y)) } Further, following extension rules are added to the lower component. { minus^#(x, s(y)) -> le^#(x, s(y)) , minus^#(x, s(y)) -> minus^#(x, p(s(y))) } 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: { minus^#(x, s(y)) -> c_2(le^#(x, s(y)), minus^#(x, p(s(y)))) } Weak Trs: { p(0()) -> 0() , p(s(x)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 3' to orient following rules strictly. DPs: { 1: minus^#(x, s(y)) -> c_2(le^#(x, s(y)), minus^#(x, p(s(y)))) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_2) = {2} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA) and not(IDA(1)). [0 0 1] [0] [p](x1) = [0 4 0] x1 + [4] [0 1 0] [4] [0] [0] = [0] [0] [1 0 0] [4] [s](x1) = [0 1 2] x1 + [0] [1 0 0] [0] [7 0 7] [7 0 7] [0] [le](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0] [0 0 0] [0 0 0] [0] [0] [true] = [0] [0] [0] [false] = [0] [0] [7 0 7] [7 0 7] [0] [minus](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0] [0 0 0] [0 0 0] [0] [7 0 7] [7 0 7] [7 0 7] [0] [if](x1, x2, x3) = [0 0 0] x1 + [0 0 0] x2 + [0 0 0] x3 + [0] [0 0 0] [0 0 0] [0 0 0] [0] [7 0 7] [0] [p^#](x1) = [0 0 0] x1 + [0] [0 0 0] [0] [0] [c_1] = [0] [0] [0] [c_2] = [0] [0] [0] [le^#](x1, x2) = [0] [0] [0] [c_3] = [0] [0] [0] [c_4] = [0] [0] [7 0 7] [0] [c_5](x1) = [0 0 0] x1 + [0] [0 0 0] [0] [0 0 0] [1 0 0] [0] [minus^#](x1, x2) = [4 4 4] x1 + [0 0 0] x2 + [0] [0 0 0] [0 0 0] [0] [0] [c_6] = [0] [0] [7 0 7] [7 0 7] [7 0 7] [7 0 7] [7 0 7] [0] [c_7](x1, x2, x3, x4, x5) = [0 0 0] x1 + [0 0 0] x2 + [0 0 0] x3 + [0 0 0] x4 + [0 0 0] x5 + [0] [0 0 0] [0 0 0] [0 0 0] [0 0 0] [0 0 0] [0] [7 0 7] [7 0 7] [7 0 7] [0] [if^#](x1, x2, x3) = [0 0 0] x1 + [0 0 0] x2 + [0 0 0] x3 + [0] [0 0 0] [0 0 0] [0 0 0] [0] [0] [c_8] = [0] [0] [0] [c_9] = [0] [0] [0] [c] = [0] [0] [7 0 7] [0] [c_1](x1) = [0 0 0] x1 + [0] [0 0 0] [0] [1 0 0] [1] [c_2](x1, x2) = [0 0 0] x2 + [0] [0 0 0] [0] The following symbols are considered usable {p, minus^#} The order satisfies the following ordering constraints: [p(0())] = [0] [4] [4] >= [0] [0] [0] = [0()] [p(s(x))] = [1 0 0] [0] [0 4 8] x + [4] [0 1 2] [4] >= [1 0 0] [0] [0 1 0] x + [0] [0 0 1] [0] = [x] [minus^#(x, s(y))] = [0 0 0] [1 0 0] [4] [4 4 4] x + [0 0 0] y + [0] [0 0 0] [0 0 0] [0] > [1 0 0] [1] [0 0 0] y + [0] [0 0 0] [0] = [c_2(le^#(x, s(y)), minus^#(x, p(s(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: { minus^#(x, s(y)) -> c_2(le^#(x, s(y)), minus^#(x, p(s(y)))) } Weak Trs: { p(0()) -> 0() , p(s(x)) -> x } 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. { minus^#(x, s(y)) -> c_2(le^#(x, s(y)), minus^#(x, p(s(y)))) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { p(0()) -> 0() , p(s(x)) -> x } 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: { le^#(s(x), s(y)) -> c_1(le^#(x, y)) } Weak DPs: { minus^#(x, s(y)) -> le^#(x, s(y)) , minus^#(x, s(y)) -> minus^#(x, p(s(y))) } Weak Trs: { p(0()) -> 0() , p(s(x)) -> x } 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: le^#(s(x), s(y)) -> c_1(le^#(x, y)) } Trs: { p(s(x)) -> x } Sub-proof: ---------- The input was oriented with the instance of 'Small Polynomial Path Order (PS,1-bounded)' as induced by the safe mapping safe(p) = {1}, safe(0) = {}, safe(s) = {1}, safe(le) = {}, safe(true) = {}, safe(false) = {}, safe(minus) = {}, safe(if) = {}, safe(p^#) = {}, safe(c_1) = {}, safe(c_2) = {}, safe(le^#) = {1}, safe(c_3) = {}, safe(c_4) = {}, safe(c_5) = {}, safe(minus^#) = {}, safe(c_6) = {}, safe(c_7) = {}, safe(if^#) = {}, safe(c_8) = {}, safe(c_9) = {}, safe(c) = {}, safe(c_1) = {}, safe(c_2) = {} and precedence le^# > p, minus^# > p, le^# ~ minus^# . Following symbols are considered recursive: {le^#, minus^#} The recursion depth is 1. Further, following argument filtering is employed: pi(p) = 1, pi(0) = [], pi(s) = [1], pi(le) = [], pi(true) = [], pi(false) = [], pi(minus) = [], pi(if) = [], pi(p^#) = [], pi(c_1) = [], pi(c_2) = [], pi(le^#) = [2], pi(c_3) = [], pi(c_4) = [], pi(c_5) = [], pi(minus^#) = [2], pi(c_6) = [], pi(c_7) = [], pi(if^#) = [], pi(c_8) = [], pi(c_9) = [], pi(c) = [], pi(c_1) = [1], pi(c_2) = [] Usable defined function symbols are a subset of: {p, p^#, le^#, minus^#, if^#} For your convenience, here are the satisfied ordering constraints: pi(le^#(s(x), s(y))) = le^#(s(; y);) > c_1(le^#(y;);) = pi(c_1(le^#(x, y))) pi(minus^#(x, s(y))) = minus^#(s(; y);) >= le^#(s(; y);) = pi(le^#(x, s(y))) pi(minus^#(x, s(y))) = minus^#(s(; y);) >= minus^#(s(; y);) = pi(minus^#(x, p(s(y)))) pi(p(0())) = 0() >= 0() = pi(0()) pi(p(s(x))) = s(; x) > x = pi(x) 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: { le^#(s(x), s(y)) -> c_1(le^#(x, y)) , minus^#(x, s(y)) -> le^#(x, s(y)) , minus^#(x, s(y)) -> minus^#(x, p(s(y))) } Weak Trs: { p(0()) -> 0() , p(s(x)) -> x } 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. { le^#(s(x), s(y)) -> c_1(le^#(x, y)) , minus^#(x, s(y)) -> le^#(x, s(y)) , minus^#(x, s(y)) -> minus^#(x, p(s(y))) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { p(0()) -> 0() , p(s(x)) -> x } 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))