* Step 1: DependencyPairs WORST_CASE(?,O(n^1)) + Considered Problem: - Strict TRS: minus(x,0()) -> x minus(s(x),s(y)) -> minus(x,y) plus(0(),y) -> y plus(minus(x,s(0())),minus(y,s(s(z)))) -> plus(minus(y,s(s(z))),minus(x,s(0()))) plus(s(x),y) -> s(plus(x,y)) quot(0(),s(y)) -> 0() quot(s(x),s(y)) -> s(quot(minus(x,y),s(y))) - Signature: {minus/2,plus/2,quot/2} / {0/0,s/1} - Obligation: runtime complexity wrt. defined symbols {minus,plus,quot} and constructors {0,s} + Applied Processor: DependencyPairs {dpKind_ = WIDP} + Details: We add the following weak dependency pairs: Strict DPs minus#(x,0()) -> c_1(x) minus#(s(x),s(y)) -> c_2(minus#(x,y)) plus#(0(),y) -> c_3(y) plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))) plus#(s(x),y) -> c_5(plus#(x,y)) quot#(0(),s(y)) -> c_6() quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))) Weak DPs and mark the set of starting terms. * Step 2: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: minus#(x,0()) -> c_1(x) minus#(s(x),s(y)) -> c_2(minus#(x,y)) plus#(0(),y) -> c_3(y) plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))) plus#(s(x),y) -> c_5(plus#(x,y)) quot#(0(),s(y)) -> c_6() quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))) - Strict TRS: minus(x,0()) -> x minus(s(x),s(y)) -> minus(x,y) plus(0(),y) -> y plus(minus(x,s(0())),minus(y,s(s(z)))) -> plus(minus(y,s(s(z))),minus(x,s(0()))) plus(s(x),y) -> s(plus(x,y)) quot(0(),s(y)) -> 0() quot(s(x),s(y)) -> s(quot(minus(x,y),s(y))) - Signature: {minus/2,plus/2,quot/2,minus#/2,plus#/2,quot#/2} / {0/0,s/1,c_1/1,c_2/1,c_3/1,c_4/1,c_5/1,c_6/0,c_7/1} - Obligation: runtime complexity wrt. defined symbols {minus#,plus#,quot#} and constructors {0,s} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: minus(x,0()) -> x minus(s(x),s(y)) -> minus(x,y) minus#(x,0()) -> c_1(x) minus#(s(x),s(y)) -> c_2(minus#(x,y)) plus#(0(),y) -> c_3(y) plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))) plus#(s(x),y) -> c_5(plus#(x,y)) quot#(0(),s(y)) -> c_6() quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))) * Step 3: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: minus#(x,0()) -> c_1(x) minus#(s(x),s(y)) -> c_2(minus#(x,y)) plus#(0(),y) -> c_3(y) plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))) plus#(s(x),y) -> c_5(plus#(x,y)) quot#(0(),s(y)) -> c_6() quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))) - Strict TRS: minus(x,0()) -> x minus(s(x),s(y)) -> minus(x,y) - Signature: {minus/2,plus/2,quot/2,minus#/2,plus#/2,quot#/2} / {0/0,s/1,c_1/1,c_2/1,c_3/1,c_4/1,c_5/1,c_6/0,c_7/1} - Obligation: runtime complexity wrt. defined symbols {minus#,plus#,quot#} and constructors {0,s} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnTrs} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(quot#) = {1}, uargs(c_2) = {1}, uargs(c_5) = {1}, uargs(c_7) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [10] p(minus) = [1] x1 + [1] p(plus) = [0] p(quot) = [0] p(s) = [1] x1 + [1] p(minus#) = [1] x2 + [0] p(plus#) = [0] p(quot#) = [1] x1 + [2] x2 + [15] p(c_1) = [0] p(c_2) = [1] x1 + [0] p(c_3) = [0] p(c_4) = [0] p(c_5) = [1] x1 + [0] p(c_6) = [0] p(c_7) = [1] x1 + [0] Following rules are strictly oriented: minus#(x,0()) = [10] > [0] = c_1(x) minus#(s(x),s(y)) = [1] y + [1] > [1] y + [0] = c_2(minus#(x,y)) quot#(0(),s(y)) = [2] y + [27] > [0] = c_6() minus(x,0()) = [1] x + [1] > [1] x + [0] = x minus(s(x),s(y)) = [1] x + [2] > [1] x + [1] = minus(x,y) Following rules are (at-least) weakly oriented: plus#(0(),y) = [0] >= [0] = c_3(y) plus#(minus(x,s(0())),minus(y,s(s(z)))) = [0] >= [0] = c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))) plus#(s(x),y) = [0] >= [0] = c_5(plus#(x,y)) quot#(s(x),s(y)) = [1] x + [2] y + [18] >= [1] x + [2] y + [18] = c_7(quot#(minus(x,y),s(y))) Further, it can be verified that all rules not oriented are covered by the weightgap condition. * Step 4: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: plus#(0(),y) -> c_3(y) plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))) plus#(s(x),y) -> c_5(plus#(x,y)) quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))) - Weak DPs: minus#(x,0()) -> c_1(x) minus#(s(x),s(y)) -> c_2(minus#(x,y)) quot#(0(),s(y)) -> c_6() - Weak TRS: minus(x,0()) -> x minus(s(x),s(y)) -> minus(x,y) - Signature: {minus/2,plus/2,quot/2,minus#/2,plus#/2,quot#/2} / {0/0,s/1,c_1/1,c_2/1,c_3/1,c_4/1,c_5/1,c_6/0,c_7/1} - Obligation: runtime complexity wrt. defined symbols {minus#,plus#,quot#} and constructors {0,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:plus#(0(),y) -> c_3(y) -->_1 minus#(s(x),s(y)) -> c_2(minus#(x,y)):6 -->_1 minus#(x,0()) -> c_1(x):5 -->_1 quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))):4 -->_1 plus#(s(x),y) -> c_5(plus#(x,y)):3 -->_1 plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))):2 -->_1 quot#(0(),s(y)) -> c_6():7 -->_1 plus#(0(),y) -> c_3(y):1 2:S:plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))) -->_1 plus#(s(x),y) -> c_5(plus#(x,y)):3 -->_1 plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))):2 -->_1 plus#(0(),y) -> c_3(y):1 3:S:plus#(s(x),y) -> c_5(plus#(x,y)) -->_1 plus#(s(x),y) -> c_5(plus#(x,y)):3 -->_1 plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))):2 -->_1 plus#(0(),y) -> c_3(y):1 4:S:quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))) -->_1 quot#(0(),s(y)) -> c_6():7 -->_1 quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))):4 5:W:minus#(x,0()) -> c_1(x) -->_1 minus#(s(x),s(y)) -> c_2(minus#(x,y)):6 -->_1 quot#(0(),s(y)) -> c_6():7 -->_1 minus#(x,0()) -> c_1(x):5 -->_1 quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))):4 -->_1 plus#(s(x),y) -> c_5(plus#(x,y)):3 -->_1 plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))):2 -->_1 plus#(0(),y) -> c_3(y):1 6:W:minus#(s(x),s(y)) -> c_2(minus#(x,y)) -->_1 minus#(s(x),s(y)) -> c_2(minus#(x,y)):6 -->_1 minus#(x,0()) -> c_1(x):5 7:W:quot#(0(),s(y)) -> c_6() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 7: quot#(0(),s(y)) -> c_6() * Step 5: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: plus#(0(),y) -> c_3(y) plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))) plus#(s(x),y) -> c_5(plus#(x,y)) quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))) - Weak DPs: minus#(x,0()) -> c_1(x) minus#(s(x),s(y)) -> c_2(minus#(x,y)) - Weak TRS: minus(x,0()) -> x minus(s(x),s(y)) -> minus(x,y) - Signature: {minus/2,plus/2,quot/2,minus#/2,plus#/2,quot#/2} / {0/0,s/1,c_1/1,c_2/1,c_3/1,c_4/1,c_5/1,c_6/0,c_7/1} - Obligation: runtime complexity wrt. defined symbols {minus#,plus#,quot#} and constructors {0,s} + 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: plus#(0(),y) -> c_3(y) 2: plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))) 3: plus#(s(x),y) -> c_5(plus#(x,y)) 4: quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))) The strictly oriented rules are moved into the weak component. ** Step 5.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: plus#(0(),y) -> c_3(y) plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))) plus#(s(x),y) -> c_5(plus#(x,y)) quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))) - Weak DPs: minus#(x,0()) -> c_1(x) minus#(s(x),s(y)) -> c_2(minus#(x,y)) - Weak TRS: minus(x,0()) -> x minus(s(x),s(y)) -> minus(x,y) - Signature: {minus/2,plus/2,quot/2,minus#/2,plus#/2,quot#/2} / {0/0,s/1,c_1/1,c_2/1,c_3/1,c_4/1,c_5/1,c_6/0,c_7/1} - Obligation: runtime complexity wrt. defined symbols {minus#,plus#,quot#} and constructors {0,s} + 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_2) = {1}, uargs(c_5) = {1}, uargs(c_7) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [5] p(minus) = [1] x1 + [0] p(plus) = [1] p(quot) = [0] p(s) = [1] x1 + [4] p(minus#) = [0] p(plus#) = [4] x1 + [1] p(quot#) = [2] x1 + [4] p(c_1) = [0] p(c_2) = [8] x1 + [0] p(c_3) = [0] p(c_4) = [0] p(c_5) = [1] x1 + [0] p(c_6) = [1] p(c_7) = [1] x1 + [4] Following rules are strictly oriented: plus#(0(),y) = [21] > [0] = c_3(y) plus#(minus(x,s(0())),minus(y,s(s(z)))) = [4] x + [1] > [0] = c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))) plus#(s(x),y) = [4] x + [17] > [4] x + [1] = c_5(plus#(x,y)) quot#(s(x),s(y)) = [2] x + [12] > [2] x + [8] = c_7(quot#(minus(x,y),s(y))) Following rules are (at-least) weakly oriented: minus#(x,0()) = [0] >= [0] = c_1(x) minus#(s(x),s(y)) = [0] >= [0] = c_2(minus#(x,y)) minus(x,0()) = [1] x + [0] >= [1] x + [0] = x minus(s(x),s(y)) = [1] x + [4] >= [1] x + [0] = minus(x,y) ** Step 5.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: minus#(x,0()) -> c_1(x) minus#(s(x),s(y)) -> c_2(minus#(x,y)) plus#(0(),y) -> c_3(y) plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))) plus#(s(x),y) -> c_5(plus#(x,y)) quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))) - Weak TRS: minus(x,0()) -> x minus(s(x),s(y)) -> minus(x,y) - Signature: {minus/2,plus/2,quot/2,minus#/2,plus#/2,quot#/2} / {0/0,s/1,c_1/1,c_2/1,c_3/1,c_4/1,c_5/1,c_6/0,c_7/1} - Obligation: runtime complexity wrt. defined symbols {minus#,plus#,quot#} and constructors {0,s} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () ** Step 5.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: minus#(x,0()) -> c_1(x) minus#(s(x),s(y)) -> c_2(minus#(x,y)) plus#(0(),y) -> c_3(y) plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))) plus#(s(x),y) -> c_5(plus#(x,y)) quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))) - Weak TRS: minus(x,0()) -> x minus(s(x),s(y)) -> minus(x,y) - Signature: {minus/2,plus/2,quot/2,minus#/2,plus#/2,quot#/2} / {0/0,s/1,c_1/1,c_2/1,c_3/1,c_4/1,c_5/1,c_6/0,c_7/1} - Obligation: runtime complexity wrt. defined symbols {minus#,plus#,quot#} and constructors {0,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:minus#(x,0()) -> c_1(x) -->_1 quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))):6 -->_1 plus#(s(x),y) -> c_5(plus#(x,y)):5 -->_1 plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))):4 -->_1 plus#(0(),y) -> c_3(y):3 -->_1 minus#(s(x),s(y)) -> c_2(minus#(x,y)):2 -->_1 minus#(x,0()) -> c_1(x):1 2:W:minus#(s(x),s(y)) -> c_2(minus#(x,y)) -->_1 minus#(s(x),s(y)) -> c_2(minus#(x,y)):2 -->_1 minus#(x,0()) -> c_1(x):1 3:W:plus#(0(),y) -> c_3(y) -->_1 quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))):6 -->_1 plus#(s(x),y) -> c_5(plus#(x,y)):5 -->_1 plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))):4 -->_1 plus#(0(),y) -> c_3(y):3 -->_1 minus#(s(x),s(y)) -> c_2(minus#(x,y)):2 -->_1 minus#(x,0()) -> c_1(x):1 4:W:plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))) -->_1 plus#(s(x),y) -> c_5(plus#(x,y)):5 -->_1 plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))):4 -->_1 plus#(0(),y) -> c_3(y):3 5:W:plus#(s(x),y) -> c_5(plus#(x,y)) -->_1 plus#(s(x),y) -> c_5(plus#(x,y)):5 -->_1 plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))):4 -->_1 plus#(0(),y) -> c_3(y):3 6:W:quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))) -->_1 quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))):6 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: minus#(x,0()) -> c_1(x) 3: plus#(0(),y) -> c_3(y) 5: plus#(s(x),y) -> c_5(plus#(x,y)) 4: plus#(minus(x,s(0())),minus(y,s(s(z)))) -> c_4(plus#(minus(y,s(s(z))),minus(x,s(0())))) 2: minus#(s(x),s(y)) -> c_2(minus#(x,y)) 6: quot#(s(x),s(y)) -> c_7(quot#(minus(x,y),s(y))) ** Step 5.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: minus(x,0()) -> x minus(s(x),s(y)) -> minus(x,y) - Signature: {minus/2,plus/2,quot/2,minus#/2,plus#/2,quot#/2} / {0/0,s/1,c_1/1,c_2/1,c_3/1,c_4/1,c_5/1,c_6/0,c_7/1} - Obligation: runtime complexity wrt. defined symbols {minus#,plus#,quot#} and constructors {0,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^1))