WORST_CASE(Omega(n^1),O(n^3)) * Step 1: Sum WORST_CASE(Omega(n^1),O(n^3)) + Considered Problem: - Strict TRS: add0(C(x,y),y') -> add0(y,C(S(),y')) add0(Z(),y) -> y goal(xs,ys) -> mul0(xs,ys) isZero(C(x,y)) -> False() isZero(Z()) -> True() mul0(C(x,y),y') -> add0(mul0(y,y'),y') mul0(Z(),y) -> Z() second(C(x,y)) -> y - Signature: {add0/2,goal/2,isZero/1,mul0/2,second/1} / {C/2,False/0,S/0,True/0,Z/0} - Obligation: innermost runtime complexity wrt. defined symbols {add0,goal,isZero,mul0,second} and constructors {C,False,S ,True,Z} + Applied Processor: Sum {left = someStrategy, right = someStrategy} + Details: () ** Step 1.a:1: DecreasingLoops WORST_CASE(Omega(n^1),?) + Considered Problem: - Strict TRS: add0(C(x,y),y') -> add0(y,C(S(),y')) add0(Z(),y) -> y goal(xs,ys) -> mul0(xs,ys) isZero(C(x,y)) -> False() isZero(Z()) -> True() mul0(C(x,y),y') -> add0(mul0(y,y'),y') mul0(Z(),y) -> Z() second(C(x,y)) -> y - Signature: {add0/2,goal/2,isZero/1,mul0/2,second/1} / {C/2,False/0,S/0,True/0,Z/0} - Obligation: innermost runtime complexity wrt. defined symbols {add0,goal,isZero,mul0,second} and constructors {C,False,S ,True,Z} + Applied Processor: DecreasingLoops {bound = AnyLoop, narrow = 10} + Details: The system has following decreasing Loops: add0(y,z){y -> C(x,y)} = add0(C(x,y),z) ->^+ add0(y,C(S(),z)) = C[add0(y,C(S(),z)) = add0(y,z){z -> C(S(),z)}] ** Step 1.b:1: DependencyPairs WORST_CASE(?,O(n^3)) + Considered Problem: - Strict TRS: add0(C(x,y),y') -> add0(y,C(S(),y')) add0(Z(),y) -> y goal(xs,ys) -> mul0(xs,ys) isZero(C(x,y)) -> False() isZero(Z()) -> True() mul0(C(x,y),y') -> add0(mul0(y,y'),y') mul0(Z(),y) -> Z() second(C(x,y)) -> y - Signature: {add0/2,goal/2,isZero/1,mul0/2,second/1} / {C/2,False/0,S/0,True/0,Z/0} - Obligation: innermost runtime complexity wrt. defined symbols {add0,goal,isZero,mul0,second} and constructors {C,False,S ,True,Z} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) add0#(Z(),y) -> c_2() goal#(xs,ys) -> c_3(mul0#(xs,ys)) isZero#(C(x,y)) -> c_4() isZero#(Z()) -> c_5() mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) mul0#(Z(),y) -> c_7() second#(C(x,y)) -> c_8() Weak DPs and mark the set of starting terms. ** Step 1.b:2: PredecessorEstimation WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) add0#(Z(),y) -> c_2() goal#(xs,ys) -> c_3(mul0#(xs,ys)) isZero#(C(x,y)) -> c_4() isZero#(Z()) -> c_5() mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) mul0#(Z(),y) -> c_7() second#(C(x,y)) -> c_8() - Weak TRS: add0(C(x,y),y') -> add0(y,C(S(),y')) add0(Z(),y) -> y goal(xs,ys) -> mul0(xs,ys) isZero(C(x,y)) -> False() isZero(Z()) -> True() mul0(C(x,y),y') -> add0(mul0(y,y'),y') mul0(Z(),y) -> Z() second(C(x,y)) -> y - Signature: {add0/2,goal/2,isZero/1,mul0/2,second/1,add0#/2,goal#/2,isZero#/1,mul0#/2,second#/1} / {C/2,False/0,S/0 ,True/0,Z/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {add0#,goal#,isZero#,mul0#,second#} and constructors {C ,False,S,True,Z} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {2,4,5,7,8} by application of Pre({2,4,5,7,8}) = {1,3,6}. Here rules are labelled as follows: 1: add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) 2: add0#(Z(),y) -> c_2() 3: goal#(xs,ys) -> c_3(mul0#(xs,ys)) 4: isZero#(C(x,y)) -> c_4() 5: isZero#(Z()) -> c_5() 6: mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) 7: mul0#(Z(),y) -> c_7() 8: second#(C(x,y)) -> c_8() ** Step 1.b:3: RemoveWeakSuffixes WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) goal#(xs,ys) -> c_3(mul0#(xs,ys)) mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) - Weak DPs: add0#(Z(),y) -> c_2() isZero#(C(x,y)) -> c_4() isZero#(Z()) -> c_5() mul0#(Z(),y) -> c_7() second#(C(x,y)) -> c_8() - Weak TRS: add0(C(x,y),y') -> add0(y,C(S(),y')) add0(Z(),y) -> y goal(xs,ys) -> mul0(xs,ys) isZero(C(x,y)) -> False() isZero(Z()) -> True() mul0(C(x,y),y') -> add0(mul0(y,y'),y') mul0(Z(),y) -> Z() second(C(x,y)) -> y - Signature: {add0/2,goal/2,isZero/1,mul0/2,second/1,add0#/2,goal#/2,isZero#/1,mul0#/2,second#/1} / {C/2,False/0,S/0 ,True/0,Z/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {add0#,goal#,isZero#,mul0#,second#} and constructors {C ,False,S,True,Z} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) -->_1 add0#(Z(),y) -> c_2():4 -->_1 add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))):1 2:S:goal#(xs,ys) -> c_3(mul0#(xs,ys)) -->_1 mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')):3 -->_1 mul0#(Z(),y) -> c_7():7 3:S:mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) -->_2 mul0#(Z(),y) -> c_7():7 -->_1 add0#(Z(),y) -> c_2():4 -->_2 mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')):3 -->_1 add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))):1 4:W:add0#(Z(),y) -> c_2() 5:W:isZero#(C(x,y)) -> c_4() 6:W:isZero#(Z()) -> c_5() 7:W:mul0#(Z(),y) -> c_7() 8:W:second#(C(x,y)) -> c_8() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 8: second#(C(x,y)) -> c_8() 6: isZero#(Z()) -> c_5() 5: isZero#(C(x,y)) -> c_4() 7: mul0#(Z(),y) -> c_7() 4: add0#(Z(),y) -> c_2() ** Step 1.b:4: RemoveHeads WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) goal#(xs,ys) -> c_3(mul0#(xs,ys)) mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) - Weak TRS: add0(C(x,y),y') -> add0(y,C(S(),y')) add0(Z(),y) -> y goal(xs,ys) -> mul0(xs,ys) isZero(C(x,y)) -> False() isZero(Z()) -> True() mul0(C(x,y),y') -> add0(mul0(y,y'),y') mul0(Z(),y) -> Z() second(C(x,y)) -> y - Signature: {add0/2,goal/2,isZero/1,mul0/2,second/1,add0#/2,goal#/2,isZero#/1,mul0#/2,second#/1} / {C/2,False/0,S/0 ,True/0,Z/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {add0#,goal#,isZero#,mul0#,second#} and constructors {C ,False,S,True,Z} + Applied Processor: RemoveHeads + Details: Consider the dependency graph 1:S:add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) -->_1 add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))):1 2:S:goal#(xs,ys) -> c_3(mul0#(xs,ys)) -->_1 mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')):3 3:S:mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) -->_2 mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')):3 -->_1 add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))):1 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). [(2,goal#(xs,ys) -> c_3(mul0#(xs,ys)))] ** Step 1.b:5: UsableRules WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) - Weak TRS: add0(C(x,y),y') -> add0(y,C(S(),y')) add0(Z(),y) -> y goal(xs,ys) -> mul0(xs,ys) isZero(C(x,y)) -> False() isZero(Z()) -> True() mul0(C(x,y),y') -> add0(mul0(y,y'),y') mul0(Z(),y) -> Z() second(C(x,y)) -> y - Signature: {add0/2,goal/2,isZero/1,mul0/2,second/1,add0#/2,goal#/2,isZero#/1,mul0#/2,second#/1} / {C/2,False/0,S/0 ,True/0,Z/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {add0#,goal#,isZero#,mul0#,second#} and constructors {C ,False,S,True,Z} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: add0(C(x,y),y') -> add0(y,C(S(),y')) add0(Z(),y) -> y mul0(C(x,y),y') -> add0(mul0(y,y'),y') mul0(Z(),y) -> Z() add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) ** Step 1.b:6: DecomposeDG WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) - Weak TRS: add0(C(x,y),y') -> add0(y,C(S(),y')) add0(Z(),y) -> y mul0(C(x,y),y') -> add0(mul0(y,y'),y') mul0(Z(),y) -> Z() - Signature: {add0/2,goal/2,isZero/1,mul0/2,second/1,add0#/2,goal#/2,isZero#/1,mul0#/2,second#/1} / {C/2,False/0,S/0 ,True/0,Z/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {add0#,goal#,isZero#,mul0#,second#} and constructors {C ,False,S,True,Z} + Applied Processor: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Nothing, onLower = Nothing} + Details: We decompose the input problem according to the dependency graph into the upper component mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) and a lower component add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) Further, following extension rules are added to the lower component. mul0#(C(x,y),y') -> add0#(mul0(y,y'),y') mul0#(C(x,y),y') -> mul0#(y,y') *** Step 1.b:6.a:1: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) - Weak TRS: add0(C(x,y),y') -> add0(y,C(S(),y')) add0(Z(),y) -> y mul0(C(x,y),y') -> add0(mul0(y,y'),y') mul0(Z(),y) -> Z() - Signature: {add0/2,goal/2,isZero/1,mul0/2,second/1,add0#/2,goal#/2,isZero#/1,mul0#/2,second#/1} / {C/2,False/0,S/0 ,True/0,Z/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {add0#,goal#,isZero#,mul0#,second#} and constructors {C ,False,S,True,Z} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) -->_2 mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: mul0#(C(x,y),y') -> c_6(mul0#(y,y')) *** Step 1.b:6.a:2: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: mul0#(C(x,y),y') -> c_6(mul0#(y,y')) - Weak TRS: add0(C(x,y),y') -> add0(y,C(S(),y')) add0(Z(),y) -> y mul0(C(x,y),y') -> add0(mul0(y,y'),y') mul0(Z(),y) -> Z() - Signature: {add0/2,goal/2,isZero/1,mul0/2,second/1,add0#/2,goal#/2,isZero#/1,mul0#/2,second#/1} / {C/2,False/0,S/0 ,True/0,Z/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {add0#,goal#,isZero#,mul0#,second#} and constructors {C ,False,S,True,Z} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: mul0#(C(x,y),y') -> c_6(mul0#(y,y')) *** Step 1.b:6.a:3: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: mul0#(C(x,y),y') -> c_6(mul0#(y,y')) - Signature: {add0/2,goal/2,isZero/1,mul0/2,second/1,add0#/2,goal#/2,isZero#/1,mul0#/2,second#/1} / {C/2,False/0,S/0 ,True/0,Z/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {add0#,goal#,isZero#,mul0#,second#} and constructors {C ,False,S,True,Z} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_6) = {1} Following symbols are considered usable: {add0#,goal#,isZero#,mul0#,second#} TcT has computed the following interpretation: p(C) = [1] x2 + [8] p(False) = [0] p(S) = [1] p(True) = [2] p(Z) = [1] p(add0) = [2] x2 + [2] p(goal) = [4] x1 + [1] p(isZero) = [1] p(mul0) = [4] p(second) = [0] p(add0#) = [1] p(goal#) = [1] x1 + [8] x2 + [1] p(isZero#) = [1] p(mul0#) = [2] x1 + [8] x2 + [0] p(second#) = [1] x1 + [0] p(c_1) = [8] x1 + [1] p(c_2) = [1] p(c_3) = [1] p(c_4) = [1] p(c_5) = [2] p(c_6) = [1] x1 + [8] p(c_7) = [1] p(c_8) = [1] Following rules are strictly oriented: mul0#(C(x,y),y') = [2] y + [8] y' + [16] > [2] y + [8] y' + [8] = c_6(mul0#(y,y')) Following rules are (at-least) weakly oriented: *** Step 1.b:6.a:4: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: mul0#(C(x,y),y') -> c_6(mul0#(y,y')) - Signature: {add0/2,goal/2,isZero/1,mul0/2,second/1,add0#/2,goal#/2,isZero#/1,mul0#/2,second#/1} / {C/2,False/0,S/0 ,True/0,Z/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {add0#,goal#,isZero#,mul0#,second#} and constructors {C ,False,S,True,Z} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). *** Step 1.b:6.b:1: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) - Weak DPs: mul0#(C(x,y),y') -> add0#(mul0(y,y'),y') mul0#(C(x,y),y') -> mul0#(y,y') - Weak TRS: add0(C(x,y),y') -> add0(y,C(S(),y')) add0(Z(),y) -> y mul0(C(x,y),y') -> add0(mul0(y,y'),y') mul0(Z(),y) -> Z() - Signature: {add0/2,goal/2,isZero/1,mul0/2,second/1,add0#/2,goal#/2,isZero#/1,mul0#/2,second#/1} / {C/2,False/0,S/0 ,True/0,Z/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {add0#,goal#,isZero#,mul0#,second#} and constructors {C ,False,S,True,Z} + Applied Processor: NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a polynomial interpretation of kind constructor-based(mixed(2)): The following argument positions are considered usable: uargs(c_1) = {1} Following symbols are considered usable: {add0,mul0,add0#,goal#,isZero#,mul0#,second#} TcT has computed the following interpretation: p(C) = 2 + x2 p(False) = 1 p(S) = 0 p(True) = 0 p(Z) = 2 p(add0) = 1 + x1 + x2 p(goal) = 1 + 2*x1 + x1*x2 + 4*x2 + x2^2 p(isZero) = 4 + 2*x1 + 4*x1^2 p(mul0) = x1*x2 + 2*x1^2 + 3*x2 + x2^2 p(second) = 1 + 2*x1 + x1^2 p(add0#) = x1 p(goal#) = 1 + 2*x1 + 4*x1*x2 + x1^2 + x2 + 2*x2^2 p(isZero#) = 4 + x1^2 p(mul0#) = 4 + x1 + 4*x1*x2 + 2*x1^2 + 4*x2^2 p(second#) = 1 + x1 + 4*x1^2 p(c_1) = x1 p(c_2) = 4 p(c_3) = 1 p(c_4) = 0 p(c_5) = 0 p(c_6) = 1 + x1 + x2 p(c_7) = 0 p(c_8) = 0 Following rules are strictly oriented: add0#(C(x,y),y') = 2 + y > y = c_1(add0#(y,C(S(),y'))) Following rules are (at-least) weakly oriented: mul0#(C(x,y),y') = 14 + 9*y + 4*y*y' + 2*y^2 + 8*y' + 4*y'^2 >= y*y' + 2*y^2 + 3*y' + y'^2 = add0#(mul0(y,y'),y') mul0#(C(x,y),y') = 14 + 9*y + 4*y*y' + 2*y^2 + 8*y' + 4*y'^2 >= 4 + y + 4*y*y' + 2*y^2 + 4*y'^2 = mul0#(y,y') add0(C(x,y),y') = 3 + y + y' >= 3 + y + y' = add0(y,C(S(),y')) add0(Z(),y) = 3 + y >= y = y mul0(C(x,y),y') = 8 + 8*y + y*y' + 2*y^2 + 5*y' + y'^2 >= 1 + y*y' + 2*y^2 + 4*y' + y'^2 = add0(mul0(y,y'),y') mul0(Z(),y) = 8 + 5*y + y^2 >= 2 = Z() *** Step 1.b:6.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) mul0#(C(x,y),y') -> add0#(mul0(y,y'),y') mul0#(C(x,y),y') -> mul0#(y,y') - Weak TRS: add0(C(x,y),y') -> add0(y,C(S(),y')) add0(Z(),y) -> y mul0(C(x,y),y') -> add0(mul0(y,y'),y') mul0(Z(),y) -> Z() - Signature: {add0/2,goal/2,isZero/1,mul0/2,second/1,add0#/2,goal#/2,isZero#/1,mul0#/2,second#/1} / {C/2,False/0,S/0 ,True/0,Z/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {add0#,goal#,isZero#,mul0#,second#} and constructors {C ,False,S,True,Z} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(Omega(n^1),O(n^3))