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 following 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 following constructor-restricted matrix interpretation. [0] = [0] [s](x1) = [1] [prime^#](x1) = [1] [c_1] = [0] [c_2] = [0] [c_3](x1) = [1] x1 + [0] [prime1^#](x1, x2) = [1] x2 + [0] [c_4] = [1] [c_5] = [0] [c_6](x1, x2) = [1] x1 + [1] x2 + [0] [divp^#](x1, x2) = [0] [c_7] = [1] This order satisfies following ordering constraints: 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(n^1)). Strict DPs: { prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , prime1^#(x, 0()) -> c_4() , prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) , divp^#(x, y) -> c_7() } Weak DPs: { prime^#(0()) -> c_1() , prime^#(s(0())) -> c_2() , prime1^#(x, s(0())) -> c_5() } Obligation: innermost runtime complexity Answer: YES(?,O(n^1)) We estimate the number of application of {2,4} by applications of Pre({2,4}) = {3}. Here rules are labeled as follows: DPs: { 1: prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , 2: prime1^#(x, 0()) -> c_4() , 3: prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) , 4: divp^#(x, y) -> c_7() , 5: prime^#(0()) -> c_1() , 6: prime^#(s(0())) -> c_2() , 7: prime1^#(x, s(0())) -> c_5() } We are left with following problem, upon which TcT provides the certificate YES(?,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(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(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(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(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(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(n^1)). Strict DPs: { prime1^#(x, s(s(y))) -> c_2(prime1^#(x, s(y))) } Obligation: innermost runtime complexity Answer: YES(?,O(n^1)) The input was oriented with the instance of 'Small Polynomial Path Order (PS)' as induced by the safe mapping safe(s) = {1}, safe(prime1^#) = {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(s) = [1], pi(prime1^#) = [1, 2], pi(c_2) = [1] Usable defined function symbols are a subset of: {prime1^#} 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)))) Hurray, we answered YES(O(1),O(n^1))