YES(O(1),O(n^1)) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict Trs: { prime(0()) -> false() , prime(s(0())) -> false() , prime(s(s(x))) -> prime1(s(s(x)), s(x)) , prime1(x, 0()) -> false() , prime1(x, s(0())) -> true() , prime1(x, s(s(y))) -> and(not(divp(s(s(y)), x)), prime1(x, s(y))) , divp(x, y) -> =(rem(x, y), 0()) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We add the following innermost weak dependency pairs: Strict DPs: { prime^#(0()) -> c_1() , prime^#(s(0())) -> c_2() , prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , prime1^#(x, 0()) -> c_4() , prime1^#(x, s(0())) -> c_5() , prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) , divp^#(x, y) -> c_7() } and mark the set of starting terms. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { prime^#(0()) -> c_1() , prime^#(s(0())) -> c_2() , prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , prime1^#(x, 0()) -> c_4() , prime1^#(x, s(0())) -> c_5() , prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) , divp^#(x, y) -> c_7() } Strict Trs: { prime(0()) -> false() , prime(s(0())) -> false() , prime(s(s(x))) -> prime1(s(s(x)), s(x)) , prime1(x, 0()) -> false() , prime1(x, s(0())) -> true() , prime1(x, s(s(y))) -> and(not(divp(s(s(y)), x)), prime1(x, s(y))) , divp(x, y) -> =(rem(x, y), 0()) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^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(n^1)). Strict DPs: { prime^#(0()) -> c_1() , prime^#(s(0())) -> c_2() , prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , prime1^#(x, 0()) -> c_4() , prime1^#(x, s(0())) -> c_5() , prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) , divp^#(x, y) -> c_7() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The weightgap principle applies (using the following constant growth matrix-interpretation) The following argument positions are usable: Uargs(c_3) = {1}, Uargs(c_6) = {1, 2} TcT has computed the following constructor-restricted matrix interpretation. [0] = [0] [0] [s](x1) = [0] [0] [prime^#](x1) = [0] [0] [c_1] = [1] [0] [c_2] = [1] [0] [c_3](x1) = [1 0] x1 + [1] [0 1] [0] [prime1^#](x1, x2) = [0] [0] [c_4] = [1] [0] [c_5] = [2] [0] [c_6](x1, x2) = [1 0] x1 + [1 0] x2 + [0] [0 1] [0 1] [0] [divp^#](x1, x2) = [0 0] x2 + [1] [2 2] [0] [c_7] = [0] [0] The following symbols are considered usable {prime^#, prime1^#, divp^#} The order satisfies the following ordering constraints: [prime^#(0())] = [0] [0] ? [1] [0] = [c_1()] [prime^#(s(0()))] = [0] [0] ? [1] [0] = [c_2()] [prime^#(s(s(x)))] = [0] [0] ? [1] [0] = [c_3(prime1^#(s(s(x)), s(x)))] [prime1^#(x, 0())] = [0] [0] ? [1] [0] = [c_4()] [prime1^#(x, s(0()))] = [0] [0] ? [2] [0] = [c_5()] [prime1^#(x, s(s(y)))] = [0] [0] ? [0 0] x + [1] [2 2] [0] = [c_6(divp^#(s(s(y)), x), prime1^#(x, s(y)))] [divp^#(x, y)] = [0 0] y + [1] [2 2] [0] > [0] [0] = [c_7()] 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^1)). Strict DPs: { prime^#(0()) -> c_1() , prime^#(s(0())) -> c_2() , prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , prime1^#(x, 0()) -> c_4() , prime1^#(x, s(0())) -> c_5() , prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) } Weak DPs: { divp^#(x, y) -> c_7() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We estimate the number of application of {1,2,4,5} by applications of Pre({1,2,4,5}) = {3,6}. Here rules are labeled as follows: DPs: { 1: prime^#(0()) -> c_1() , 2: prime^#(s(0())) -> c_2() , 3: prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , 4: prime1^#(x, 0()) -> c_4() , 5: prime1^#(x, s(0())) -> c_5() , 6: prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) , 7: divp^#(x, y) -> c_7() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) } Weak DPs: { prime^#(0()) -> c_1() , prime^#(s(0())) -> c_2() , prime1^#(x, 0()) -> c_4() , prime1^#(x, s(0())) -> c_5() , divp^#(x, y) -> c_7() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { prime^#(0()) -> c_1() , prime^#(s(0())) -> c_2() , prime1^#(x, 0()) -> c_4() , prime1^#(x, s(0())) -> c_5() , divp^#(x, y) -> c_7() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { prime^#(s(s(x))) -> c_1(prime1^#(s(s(x)), s(x))) , prime1^#(x, s(s(y))) -> c_2(prime1^#(x, s(y))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) Consider the dependency graph 1: prime^#(s(s(x))) -> c_1(prime1^#(s(s(x)), s(x))) -->_1 prime1^#(x, s(s(y))) -> c_2(prime1^#(x, s(y))) :2 2: prime1^#(x, s(s(y))) -> c_2(prime1^#(x, s(y))) -->_1 prime1^#(x, s(s(y))) -> c_2(prime1^#(x, s(y))) :2 Following roots of the dependency graph are removed, as the considered set of starting terms is closed under reduction with respect to these rules (modulo compound contexts). { prime^#(s(s(x))) -> c_1(prime1^#(s(s(x)), s(x))) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { prime1^#(x, s(s(y))) -> c_2(prime1^#(x, s(y))) } 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: prime1^#(x, s(s(y))) -> c_2(prime1^#(x, s(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(prime) = {}, safe(0) = {}, safe(false) = {}, safe(s) = {1}, safe(prime1) = {}, safe(true) = {}, safe(and) = {1, 2}, safe(not) = {1}, safe(divp) = {}, safe(=) = {1, 2}, safe(rem) = {1, 2}, safe(prime^#) = {}, safe(c_1) = {}, safe(c_2) = {}, safe(c_3) = {}, safe(prime1^#) = {1}, safe(c_4) = {}, safe(c_5) = {}, safe(c_6) = {}, safe(divp^#) = {}, safe(c_7) = {}, safe(c) = {}, safe(c_1) = {}, safe(c_2) = {} and precedence empty . Following symbols are considered recursive: {prime1^#} The recursion depth is 1. Further, following argument filtering is employed: pi(prime) = [], pi(0) = [], pi(false) = [], pi(s) = [1], pi(prime1) = [], pi(true) = [], pi(and) = [], pi(not) = [], pi(divp) = [], pi(=) = [], pi(rem) = [], pi(prime^#) = [], pi(c_1) = [], pi(c_2) = [], pi(c_3) = [], pi(prime1^#) = [1, 2], pi(c_4) = [], pi(c_5) = [], pi(c_6) = [], pi(divp^#) = [], pi(c_7) = [], pi(c) = [], pi(c_1) = [], pi(c_2) = [1] Usable defined function symbols are a subset of: {prime^#, prime1^#, divp^#} For your convenience, here are the satisfied ordering constraints: pi(prime1^#(x, s(s(y)))) = prime1^#(s(; s(; y)); x) > c_2(prime1^#(s(; y); x);) = pi(c_2(prime1^#(x, 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: { prime1^#(x, s(s(y))) -> c_2(prime1^#(x, s(y))) } 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. { prime1^#(x, s(s(y))) -> c_2(prime1^#(x, s(y))) } 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^1))