* 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: UsableRules 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: 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'))) 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() ** Step 1.b:3: 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 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: 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:4: 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 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: 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:5: 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 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: 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:6: Decompose 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: Decompose {onSelection = all cycle independent sub-graph, withBound = RelativeAdd} + Details: We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component. Problem (R) - Strict DPs: add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) - Weak 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} Problem (S) - Strict DPs: mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) - Weak DPs: add0#(C(x,y),y') -> c_1(add0#(y,C(S(),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} *** Step 1.b:6.a:1: DecomposeDG WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) - Weak 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: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Just someStrategy, 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.a:1: PredecessorEstimationCP 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: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) The strictly oriented rules are moved into the weak component. ***** Step 1.b:6.a:1.a:1.a:1: NaturalMI 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: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and 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,2} Following symbols are considered usable: {add0#,goal#,isZero#,mul0#,second#} TcT has computed the following interpretation: p(C) = [1] x1 + [1] x2 + [1] p(False) = [0] p(S) = [4] p(True) = [1] p(Z) = [0] p(add0) = [4] x1 + [2] x2 + [2] p(goal) = [1] x1 + [2] x2 + [0] p(isZero) = [1] x1 + [2] p(mul0) = [2] x1 + [1] x2 + [1] p(second) = [2] x1 + [1] p(add0#) = [2] p(goal#) = [2] p(isZero#) = [4] x1 + [2] p(mul0#) = [8] x1 + [4] x2 + [0] p(second#) = [1] p(c_1) = [1] p(c_2) = [1] p(c_3) = [1] x1 + [1] p(c_4) = [1] p(c_5) = [1] p(c_6) = [1] x1 + [1] x2 + [0] p(c_7) = [1] p(c_8) = [2] Following rules are strictly oriented: mul0#(C(x,y),y') = [8] x + [8] y + [4] y' + [8] > [8] y + [4] y' + [2] = c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) Following rules are (at-least) weakly oriented: ***** Step 1.b:6.a:1.a:1.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak 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: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () ***** Step 1.b:6.a:1.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak 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: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W: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 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) ***** Step 1.b:6.a:1.a:1.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - 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). **** Step 1.b:6.a:1.b:1: PredecessorEstimationCP 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: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) The strictly oriented rules are moved into the weak component. ***** Step 1.b:6.a:1.b:1.a: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 first alternative for predecessorEstimation on any intersect of rules of CDG leaf and 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) = 1 + x2 p(False) = 1 p(S) = 1 p(True) = 1 p(Z) = 1 p(add0) = x1 + x2 p(goal) = x1^2 p(isZero) = 4*x1^2 p(mul0) = 2*x1 + x1*x2 p(second) = x1 + x1^2 p(add0#) = 4*x1 + 2*x2 p(goal#) = 1 p(isZero#) = 2*x1 p(mul0#) = 6*x1*x2 + 6*x1^2 p(second#) = 2 + 4*x1^2 p(c_1) = x1 p(c_2) = 1 p(c_3) = 0 p(c_4) = 0 p(c_5) = 0 p(c_6) = 1 + x1 + x2 p(c_7) = 0 p(c_8) = 1 Following rules are strictly oriented: add0#(C(x,y),y') = 4 + 4*y + 2*y' > 2 + 4*y + 2*y' = c_1(add0#(y,C(S(),y'))) Following rules are (at-least) weakly oriented: mul0#(C(x,y),y') = 6 + 12*y + 6*y*y' + 6*y^2 + 6*y' >= 8*y + 4*y*y' + 2*y' = add0#(mul0(y,y'),y') mul0#(C(x,y),y') = 6 + 12*y + 6*y*y' + 6*y^2 + 6*y' >= 6*y*y' + 6*y^2 = mul0#(y,y') add0(C(x,y),y') = 1 + y + y' >= 1 + y + y' = add0(y,C(S(),y')) add0(Z(),y) = 1 + y >= y = y mul0(C(x,y),y') = 2 + 2*y + y*y' + y' >= 2*y + y*y' + y' = add0(mul0(y,y'),y') mul0(Z(),y) = 2 + y >= 1 = Z() ***** Step 1.b:6.a:1.b:1.a:2: Assumption 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: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () ***** Step 1.b:6.a:1.b:1.b:1: RemoveWeakSuffixes 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: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W: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:W:mul0#(C(x,y),y') -> add0#(mul0(y,y'),y') -->_1 add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))):1 3:W:mul0#(C(x,y),y') -> mul0#(y,y') -->_1 mul0#(C(x,y),y') -> mul0#(y,y'):3 -->_1 mul0#(C(x,y),y') -> add0#(mul0(y,y'),y'):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 3: mul0#(C(x,y),y') -> mul0#(y,y') 2: mul0#(C(x,y),y') -> add0#(mul0(y,y'),y') 1: add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) ***** Step 1.b:6.a:1.b:1.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - 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). *** Step 1.b:6.b:1: RemoveWeakSuffixes 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 DPs: add0#(C(x,y),y') -> c_1(add0#(y,C(S(),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: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')) -->_1 add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))):2 -->_2 mul0#(C(x,y),y') -> c_6(add0#(mul0(y,y'),y'),mul0#(y,y')):1 2:W: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'))):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: add0#(C(x,y),y') -> c_1(add0#(y,C(S(),y'))) *** Step 1.b:6.b:2: 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.b:3: 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.b:4: PredecessorEstimationCP 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: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: mul0#(C(x,y),y') -> c_6(mul0#(y,y')) The strictly oriented rules are moved into the weak component. **** Step 1.b:6.b:4.a:1: 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 first alternative for predecessorEstimation on any intersect of rules of CDG leaf and 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] x1 + [1] x2 + [2] p(False) = [1] p(S) = [0] p(True) = [1] p(Z) = [2] p(add0) = [4] x1 + [1] x2 + [2] p(goal) = [1] p(isZero) = [1] x1 + [2] p(mul0) = [4] x2 + [0] p(second) = [1] x1 + [1] p(add0#) = [1] x1 + [1] p(goal#) = [1] x1 + [2] x2 + [1] p(isZero#) = [8] p(mul0#) = [8] x1 + [1] x2 + [0] p(second#) = [1] x1 + [1] p(c_1) = [8] p(c_2) = [0] p(c_3) = [2] p(c_4) = [8] p(c_5) = [0] p(c_6) = [1] x1 + [11] p(c_7) = [0] p(c_8) = [2] Following rules are strictly oriented: mul0#(C(x,y),y') = [8] x + [8] y + [1] y' + [16] > [8] y + [1] y' + [11] = c_6(mul0#(y,y')) Following rules are (at-least) weakly oriented: **** Step 1.b:6.b:4.a:2: Assumption 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: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () **** Step 1.b:6.b:4.b:1: RemoveWeakSuffixes 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: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:mul0#(C(x,y),y') -> c_6(mul0#(y,y')) -->_1 mul0#(C(x,y),y') -> c_6(mul0#(y,y')):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: mul0#(C(x,y),y') -> c_6(mul0#(y,y')) **** Step 1.b:6.b:4.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - 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). WORST_CASE(Omega(n^1),O(n^3))