1107.65/291.57 WORST_CASE(Omega(n^1), O(n^3)) 1107.65/291.59 proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml 1107.65/291.59 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 1107.65/291.59 1107.65/291.59 1107.65/291.59 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). 1107.65/291.59 1107.65/291.59 (0) CpxTRS 1107.65/291.59 (1) NestedDefinedSymbolProof [UPPER BOUND(ID), 0 ms] 1107.65/291.59 (2) CpxTRS 1107.65/291.59 (3) RcToIrcProof [BOTH BOUNDS(ID, ID), 9 ms] 1107.65/291.59 (4) CpxTRS 1107.65/291.59 (5) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 1107.65/291.59 (6) CpxWeightedTrs 1107.65/291.59 (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 1107.65/291.59 (8) CpxTypedWeightedTrs 1107.65/291.59 (9) CompletionProof [UPPER BOUND(ID), 0 ms] 1107.65/291.59 (10) CpxTypedWeightedCompleteTrs 1107.65/291.59 (11) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 3 ms] 1107.65/291.59 (12) CpxRNTS 1107.65/291.59 (13) CompleteCoflocoProof [FINISHED, 550 ms] 1107.65/291.59 (14) BOUNDS(1, n^3) 1107.65/291.59 (15) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 1107.65/291.59 (16) TRS for Loop Detection 1107.65/291.59 (17) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 1107.65/291.59 (18) BEST 1107.65/291.59 (19) proven lower bound 1107.65/291.59 (20) LowerBoundPropagationProof [FINISHED, 0 ms] 1107.65/291.59 (21) BOUNDS(n^1, INF) 1107.65/291.59 (22) TRS for Loop Detection 1107.65/291.59 1107.65/291.59 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (0) 1107.65/291.59 Obligation: 1107.65/291.59 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). 1107.65/291.59 1107.65/291.59 1107.65/291.59 The TRS R consists of the following rules: 1107.65/291.59 1107.65/291.59 minus(x, 0) -> x 1107.65/291.59 minus(0, y) -> 0 1107.65/291.59 minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) 1107.65/291.59 minus(x, plus(y, z)) -> minus(minus(x, y), z) 1107.65/291.59 p(s(s(x))) -> s(p(s(x))) 1107.65/291.59 p(0) -> s(s(0)) 1107.65/291.59 div(s(x), s(y)) -> s(div(minus(x, y), s(y))) 1107.65/291.59 div(plus(x, y), z) -> plus(div(x, z), div(y, z)) 1107.65/291.59 plus(0, y) -> y 1107.65/291.59 plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) 1107.65/291.59 1107.65/291.59 S is empty. 1107.65/291.59 Rewrite Strategy: FULL 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (1) NestedDefinedSymbolProof (UPPER BOUND(ID)) 1107.65/291.59 The following defined symbols can occur below the 0th argument of minus: p, minus 1107.65/291.59 The following defined symbols can occur below the 1th argument of minus: p 1107.65/291.59 The following defined symbols can occur below the 0th argument of p: p 1107.65/291.59 The following defined symbols can occur below the 0th argument of plus: p, minus 1107.65/291.59 The following defined symbols can occur below the 1th argument of plus: p, minus 1107.65/291.59 The following defined symbols can occur below the 0th argument of div: p, minus 1107.65/291.59 1107.65/291.59 Hence, the left-hand sides of the following rules are not basic-reachable and can be removed: 1107.65/291.59 minus(x, plus(y, z)) -> minus(minus(x, y), z) 1107.65/291.59 div(plus(x, y), z) -> plus(div(x, z), div(y, z)) 1107.65/291.59 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (2) 1107.65/291.59 Obligation: 1107.65/291.59 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^3). 1107.65/291.59 1107.65/291.59 1107.65/291.59 The TRS R consists of the following rules: 1107.65/291.59 1107.65/291.59 minus(x, 0) -> x 1107.65/291.59 minus(0, y) -> 0 1107.65/291.59 minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) 1107.65/291.59 p(s(s(x))) -> s(p(s(x))) 1107.65/291.59 p(0) -> s(s(0)) 1107.65/291.59 div(s(x), s(y)) -> s(div(minus(x, y), s(y))) 1107.65/291.59 plus(0, y) -> y 1107.65/291.59 plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) 1107.65/291.59 1107.65/291.59 S is empty. 1107.65/291.59 Rewrite Strategy: FULL 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (3) RcToIrcProof (BOTH BOUNDS(ID, ID)) 1107.65/291.59 Converted rc-obligation to irc-obligation. 1107.65/291.59 1107.65/291.59 The duplicating contexts are: 1107.65/291.59 div(s(x), s([])) 1107.65/291.59 1107.65/291.59 1107.65/291.59 The defined contexts are: 1107.65/291.59 minus([], x1) 1107.65/291.59 minus(x0, []) 1107.65/291.59 plus(x0, []) 1107.65/291.59 div([], s(x1)) 1107.65/291.59 p(s([])) 1107.65/291.59 plus([], x1) 1107.65/291.59 minus(s([]), s(0)) 1107.65/291.59 1107.65/291.59 1107.65/291.59 As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc. 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (4) 1107.65/291.59 Obligation: 1107.65/291.59 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^3). 1107.65/291.59 1107.65/291.59 1107.65/291.59 The TRS R consists of the following rules: 1107.65/291.59 1107.65/291.59 minus(x, 0) -> x 1107.65/291.59 minus(0, y) -> 0 1107.65/291.59 minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) 1107.65/291.59 p(s(s(x))) -> s(p(s(x))) 1107.65/291.59 p(0) -> s(s(0)) 1107.65/291.59 div(s(x), s(y)) -> s(div(minus(x, y), s(y))) 1107.65/291.59 plus(0, y) -> y 1107.65/291.59 plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) 1107.65/291.59 1107.65/291.59 S is empty. 1107.65/291.59 Rewrite Strategy: INNERMOST 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (5) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 1107.65/291.59 Transformed relative TRS to weighted TRS 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (6) 1107.65/291.59 Obligation: 1107.65/291.59 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^3). 1107.65/291.59 1107.65/291.59 1107.65/291.59 The TRS R consists of the following rules: 1107.65/291.59 1107.65/291.59 minus(x, 0) -> x [1] 1107.65/291.59 minus(0, y) -> 0 [1] 1107.65/291.59 minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) [1] 1107.65/291.59 p(s(s(x))) -> s(p(s(x))) [1] 1107.65/291.59 p(0) -> s(s(0)) [1] 1107.65/291.59 div(s(x), s(y)) -> s(div(minus(x, y), s(y))) [1] 1107.65/291.59 plus(0, y) -> y [1] 1107.65/291.59 plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) [1] 1107.65/291.59 1107.65/291.59 Rewrite Strategy: INNERMOST 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 1107.65/291.59 Infered types. 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (8) 1107.65/291.59 Obligation: 1107.65/291.59 Runtime Complexity Weighted TRS with Types. 1107.65/291.59 The TRS R consists of the following rules: 1107.65/291.59 1107.65/291.59 minus(x, 0) -> x [1] 1107.65/291.59 minus(0, y) -> 0 [1] 1107.65/291.59 minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) [1] 1107.65/291.59 p(s(s(x))) -> s(p(s(x))) [1] 1107.65/291.59 p(0) -> s(s(0)) [1] 1107.65/291.59 div(s(x), s(y)) -> s(div(minus(x, y), s(y))) [1] 1107.65/291.59 plus(0, y) -> y [1] 1107.65/291.59 plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) [1] 1107.65/291.59 1107.65/291.59 The TRS has the following type information: 1107.65/291.59 minus :: 0:s -> 0:s -> 0:s 1107.65/291.59 0 :: 0:s 1107.65/291.59 s :: 0:s -> 0:s 1107.65/291.59 p :: 0:s -> 0:s 1107.65/291.59 div :: 0:s -> 0:s -> 0:s 1107.65/291.59 plus :: 0:s -> 0:s -> 0:s 1107.65/291.59 1107.65/291.59 Rewrite Strategy: INNERMOST 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (9) CompletionProof (UPPER BOUND(ID)) 1107.65/291.59 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 1107.65/291.59 1107.65/291.59 p(v0) -> null_p [0] 1107.65/291.59 div(v0, v1) -> null_div [0] 1107.65/291.59 minus(v0, v1) -> null_minus [0] 1107.65/291.59 plus(v0, v1) -> null_plus [0] 1107.65/291.59 1107.65/291.59 And the following fresh constants: null_p, null_div, null_minus, null_plus 1107.65/291.59 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (10) 1107.65/291.59 Obligation: 1107.65/291.59 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 1107.65/291.59 1107.65/291.59 Runtime Complexity Weighted TRS with Types. 1107.65/291.59 The TRS R consists of the following rules: 1107.65/291.59 1107.65/291.59 minus(x, 0) -> x [1] 1107.65/291.59 minus(0, y) -> 0 [1] 1107.65/291.59 minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) [1] 1107.65/291.59 p(s(s(x))) -> s(p(s(x))) [1] 1107.65/291.59 p(0) -> s(s(0)) [1] 1107.65/291.59 div(s(x), s(y)) -> s(div(minus(x, y), s(y))) [1] 1107.65/291.59 plus(0, y) -> y [1] 1107.65/291.59 plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) [1] 1107.65/291.59 p(v0) -> null_p [0] 1107.65/291.59 div(v0, v1) -> null_div [0] 1107.65/291.59 minus(v0, v1) -> null_minus [0] 1107.65/291.59 plus(v0, v1) -> null_plus [0] 1107.65/291.59 1107.65/291.59 The TRS has the following type information: 1107.65/291.59 minus :: 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus 1107.65/291.59 0 :: 0:s:null_p:null_div:null_minus:null_plus 1107.65/291.59 s :: 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus 1107.65/291.59 p :: 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus 1107.65/291.59 div :: 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus 1107.65/291.59 plus :: 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus 1107.65/291.59 null_p :: 0:s:null_p:null_div:null_minus:null_plus 1107.65/291.59 null_div :: 0:s:null_p:null_div:null_minus:null_plus 1107.65/291.59 null_minus :: 0:s:null_p:null_div:null_minus:null_plus 1107.65/291.59 null_plus :: 0:s:null_p:null_div:null_minus:null_plus 1107.65/291.59 1107.65/291.59 Rewrite Strategy: INNERMOST 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (11) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 1107.65/291.59 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 1107.65/291.59 The constant constructors are abstracted as follows: 1107.65/291.59 1107.65/291.59 0 => 0 1107.65/291.59 null_p => 0 1107.65/291.59 null_div => 0 1107.65/291.59 null_minus => 0 1107.65/291.59 null_plus => 0 1107.65/291.59 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (12) 1107.65/291.59 Obligation: 1107.65/291.59 Complexity RNTS consisting of the following rules: 1107.65/291.59 1107.65/291.59 div(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 1107.65/291.59 div(z, z') -{ 1 }-> 1 + div(minus(x, y), 1 + y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 1107.65/291.59 minus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 1107.65/291.59 minus(z, z') -{ 1 }-> minus(p(1 + x), p(1 + y)) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 1107.65/291.59 minus(z, z') -{ 1 }-> 0 :|: y >= 0, z = 0, z' = y 1107.65/291.59 minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 1107.65/291.59 p(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 1107.65/291.59 p(z) -{ 1 }-> 1 + p(1 + x) :|: x >= 0, z = 1 + (1 + x) 1107.65/291.59 p(z) -{ 1 }-> 1 + (1 + 0) :|: z = 0 1107.65/291.59 plus(z, z') -{ 1 }-> y :|: y >= 0, z = 0, z' = y 1107.65/291.59 plus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 1107.65/291.59 plus(z, z') -{ 1 }-> 1 + plus(y, minus(1 + x, 1 + 0)) :|: x >= 0, y >= 0, z = 1 + x, z' = y 1107.65/291.59 1107.65/291.59 Only complete derivations are relevant for the runtime complexity. 1107.65/291.59 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (13) CompleteCoflocoProof (FINISHED) 1107.65/291.59 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 1107.65/291.59 1107.65/291.59 eq(start(V1, V),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). 1107.65/291.59 eq(start(V1, V),0,[p(V1, Out)],[V1 >= 0]). 1107.65/291.59 eq(start(V1, V),0,[div(V1, V, Out)],[V1 >= 0,V >= 0]). 1107.65/291.59 eq(start(V1, V),0,[plus(V1, V, Out)],[V1 >= 0,V >= 0]). 1107.65/291.59 eq(minus(V1, V, Out),1,[],[Out = V2,V2 >= 0,V1 = V2,V = 0]). 1107.65/291.59 eq(minus(V1, V, Out),1,[],[Out = 0,V3 >= 0,V1 = 0,V = V3]). 1107.65/291.59 eq(minus(V1, V, Out),1,[p(1 + V4, Ret0),p(1 + V5, Ret1),minus(Ret0, Ret1, Ret)],[Out = Ret,V = 1 + V5,V4 >= 0,V5 >= 0,V1 = 1 + V4]). 1107.65/291.59 eq(p(V1, Out),1,[p(1 + V6, Ret11)],[Out = 1 + Ret11,V6 >= 0,V1 = 2 + V6]). 1107.65/291.59 eq(p(V1, Out),1,[],[Out = 2,V1 = 0]). 1107.65/291.59 eq(div(V1, V, Out),1,[minus(V7, V8, Ret10),div(Ret10, 1 + V8, Ret12)],[Out = 1 + Ret12,V = 1 + V8,V7 >= 0,V8 >= 0,V1 = 1 + V7]). 1107.65/291.59 eq(plus(V1, V, Out),1,[],[Out = V9,V9 >= 0,V1 = 0,V = V9]). 1107.65/291.59 eq(plus(V1, V, Out),1,[minus(1 + V11, 1 + 0, Ret111),plus(V10, Ret111, Ret13)],[Out = 1 + Ret13,V11 >= 0,V10 >= 0,V1 = 1 + V11,V = V10]). 1107.65/291.59 eq(p(V1, Out),0,[],[Out = 0,V12 >= 0,V1 = V12]). 1107.65/291.59 eq(div(V1, V, Out),0,[],[Out = 0,V14 >= 0,V13 >= 0,V1 = V14,V = V13]). 1107.65/291.59 eq(minus(V1, V, Out),0,[],[Out = 0,V16 >= 0,V15 >= 0,V1 = V16,V = V15]). 1107.65/291.59 eq(plus(V1, V, Out),0,[],[Out = 0,V17 >= 0,V18 >= 0,V1 = V17,V = V18]). 1107.65/291.59 input_output_vars(minus(V1,V,Out),[V1,V],[Out]). 1107.65/291.59 input_output_vars(p(V1,Out),[V1],[Out]). 1107.65/291.59 input_output_vars(div(V1,V,Out),[V1,V],[Out]). 1107.65/291.59 input_output_vars(plus(V1,V,Out),[V1,V],[Out]). 1107.65/291.59 1107.65/291.59 1107.65/291.59 CoFloCo proof output: 1107.65/291.59 Preprocessing Cost Relations 1107.65/291.59 ===================================== 1107.65/291.59 1107.65/291.59 #### Computed strongly connected components 1107.65/291.59 0. recursive : [p/2] 1107.65/291.59 1. recursive : [minus/3] 1107.65/291.59 2. recursive : [(div)/3] 1107.65/291.59 3. recursive : [plus/3] 1107.65/291.59 4. non_recursive : [start/2] 1107.65/291.59 1107.65/291.59 #### Obtained direct recursion through partial evaluation 1107.65/291.59 0. SCC is partially evaluated into p/2 1107.65/291.59 1. SCC is partially evaluated into minus/3 1107.65/291.59 2. SCC is partially evaluated into (div)/3 1107.65/291.59 3. SCC is partially evaluated into plus/3 1107.65/291.59 4. SCC is partially evaluated into start/2 1107.65/291.59 1107.65/291.59 Control-Flow Refinement of Cost Relations 1107.65/291.59 ===================================== 1107.65/291.59 1107.65/291.59 ### Specialization of cost equations p/2 1107.65/291.59 * CE 11 is refined into CE [17] 1107.65/291.59 * CE 10 is refined into CE [18] 1107.65/291.59 * CE 9 is refined into CE [19] 1107.65/291.59 1107.65/291.59 1107.65/291.59 ### Cost equations --> "Loop" of p/2 1107.65/291.59 * CEs [19] --> Loop 13 1107.65/291.59 * CEs [17] --> Loop 14 1107.65/291.59 * CEs [18] --> Loop 15 1107.65/291.59 1107.65/291.59 ### Ranking functions of CR p(V1,Out) 1107.65/291.59 * RF of phase [13]: [V1-1] 1107.65/291.59 1107.65/291.59 #### Partial ranking functions of CR p(V1,Out) 1107.65/291.59 * Partial RF of phase [13]: 1107.65/291.59 - RF of loop [13:1]: 1107.65/291.59 V1-1 1107.65/291.59 1107.65/291.59 1107.65/291.59 ### Specialization of cost equations minus/3 1107.65/291.59 * CE 5 is refined into CE [20] 1107.65/291.59 * CE 6 is refined into CE [21] 1107.65/291.59 * CE 8 is refined into CE [22] 1107.65/291.59 * CE 7 is refined into CE [23,24,25,26] 1107.65/291.59 1107.65/291.59 1107.65/291.59 ### Cost equations --> "Loop" of minus/3 1107.65/291.59 * CEs [26] --> Loop 16 1107.65/291.59 * CEs [25] --> Loop 17 1107.65/291.59 * CEs [24] --> Loop 18 1107.65/291.59 * CEs [23] --> Loop 19 1107.65/291.59 * CEs [20] --> Loop 20 1107.65/291.59 * CEs [21,22] --> Loop 21 1107.65/291.59 1107.65/291.59 ### Ranking functions of CR minus(V1,V,Out) 1107.65/291.59 * RF of phase [16]: [V-1,V1-1] 1107.65/291.59 1107.65/291.59 #### Partial ranking functions of CR minus(V1,V,Out) 1107.65/291.59 * Partial RF of phase [16]: 1107.65/291.59 - RF of loop [16:1]: 1107.65/291.59 V-1 1107.65/291.59 V1-1 1107.65/291.59 1107.65/291.59 1107.65/291.59 ### Specialization of cost equations (div)/3 1107.65/291.59 * CE 13 is refined into CE [27] 1107.65/291.59 * CE 12 is refined into CE [28,29,30] 1107.65/291.59 1107.65/291.59 1107.65/291.59 ### Cost equations --> "Loop" of (div)/3 1107.65/291.59 * CEs [30] --> Loop 22 1107.65/291.59 * CEs [29] --> Loop 23 1107.65/291.59 * CEs [28] --> Loop 24 1107.65/291.59 * CEs [27] --> Loop 25 1107.65/291.59 1107.65/291.59 ### Ranking functions of CR div(V1,V,Out) 1107.65/291.59 * RF of phase [22]: [V1/2-1] 1107.65/291.59 * RF of phase [24]: [V1] 1107.65/291.59 1107.65/291.59 #### Partial ranking functions of CR div(V1,V,Out) 1107.65/291.59 * Partial RF of phase [22]: 1107.65/291.59 - RF of loop [22:1]: 1107.65/291.59 V1/2-1 1107.65/291.59 * Partial RF of phase [24]: 1107.65/291.59 - RF of loop [24:1]: 1107.65/291.59 V1 1107.65/291.59 1107.65/291.59 1107.65/291.59 ### Specialization of cost equations plus/3 1107.65/291.59 * CE 16 is refined into CE [31] 1107.65/291.59 * CE 14 is refined into CE [32] 1107.65/291.59 * CE 15 is refined into CE [33,34] 1107.65/291.59 1107.65/291.59 1107.65/291.59 ### Cost equations --> "Loop" of plus/3 1107.65/291.59 * CEs [34] --> Loop 26 1107.65/291.59 * CEs [33] --> Loop 27 1107.65/291.59 * CEs [31] --> Loop 28 1107.65/291.59 * CEs [32] --> Loop 29 1107.65/291.59 1107.65/291.59 ### Ranking functions of CR plus(V1,V,Out) 1107.65/291.59 * RF of phase [26,27]: [V1+V] 1107.65/291.59 1107.65/291.59 #### Partial ranking functions of CR plus(V1,V,Out) 1107.65/291.59 * Partial RF of phase [26,27]: 1107.65/291.59 - RF of loop [26:1]: 1107.65/291.59 V1+V-1 1107.65/291.59 - RF of loop [27:1]: 1107.65/291.59 V1+V 1107.65/291.59 1107.65/291.59 1107.65/291.59 ### Specialization of cost equations start/2 1107.65/291.59 * CE 1 is refined into CE [35,36,37] 1107.65/291.59 * CE 2 is refined into CE [38,39,40] 1107.65/291.59 * CE 3 is refined into CE [41,42,43,44,45] 1107.65/291.59 * CE 4 is refined into CE [46,47,48] 1107.65/291.59 1107.65/291.59 1107.65/291.59 ### Cost equations --> "Loop" of start/2 1107.65/291.59 * CEs [41] --> Loop 30 1107.65/291.59 * CEs [35] --> Loop 31 1107.65/291.59 * CEs [36,37,38,39,40,42,43,44,45,46,47,48] --> Loop 32 1107.65/291.59 1107.65/291.59 ### Ranking functions of CR start(V1,V) 1107.65/291.59 1107.65/291.59 #### Partial ranking functions of CR start(V1,V) 1107.65/291.59 1107.65/291.59 1107.65/291.59 Computing Bounds 1107.65/291.59 ===================================== 1107.65/291.59 1107.65/291.59 #### Cost of chains of p(V1,Out): 1107.65/291.59 * Chain [[13],14]: 1*it(13)+0 1107.65/291.59 Such that:it(13) =< Out 1107.65/291.59 1107.65/291.59 with precondition: [Out>=1,V1>=Out+1] 1107.65/291.59 1107.65/291.59 * Chain [15]: 1 1107.65/291.59 with precondition: [V1=0,Out=2] 1107.65/291.59 1107.65/291.59 * Chain [14]: 0 1107.65/291.59 with precondition: [Out=0,V1>=0] 1107.65/291.59 1107.65/291.59 1107.65/291.59 #### Cost of chains of minus(V1,V,Out): 1107.65/291.59 * Chain [[16],21]: 1*it(16)+1*s(5)+1*s(6)+1 1107.65/291.59 Such that:aux(3) =< V1 1107.65/291.59 aux(5) =< V 1107.65/291.59 it(16) =< aux(5) 1107.65/291.59 it(16) =< aux(3) 1107.65/291.59 s(6) =< it(16)*aux(5) 1107.65/291.59 s(5) =< it(16)*aux(3) 1107.65/291.59 1107.65/291.59 with precondition: [Out=0,V1>=2,V>=2] 1107.65/291.59 1107.65/291.59 * Chain [[16],19,21]: 1*it(16)+1*s(5)+1*s(6)+2 1107.65/291.59 Such that:aux(3) =< V1 1107.65/291.59 aux(6) =< V 1107.65/291.59 it(16) =< aux(6) 1107.65/291.59 it(16) =< aux(3) 1107.65/291.59 s(6) =< it(16)*aux(6) 1107.65/291.59 s(5) =< it(16)*aux(3) 1107.65/291.59 1107.65/291.59 with precondition: [Out=0,V1>=2,V>=2] 1107.65/291.59 1107.65/291.59 * Chain [[16],19,20]: 1*it(16)+1*s(5)+1*s(6)+2 1107.65/291.59 Such that:aux(3) =< V1 1107.65/291.59 aux(7) =< V 1107.65/291.59 it(16) =< aux(7) 1107.65/291.59 it(16) =< aux(3) 1107.65/291.59 s(6) =< it(16)*aux(7) 1107.65/291.59 s(5) =< it(16)*aux(3) 1107.65/291.59 1107.65/291.59 with precondition: [Out=0,V1>=2,V>=2] 1107.65/291.59 1107.65/291.59 * Chain [[16],18,21]: 1*it(16)+1*s(5)+1*s(6)+1*s(7)+2 1107.65/291.59 Such that:aux(3) =< V1 1107.65/291.59 aux(8) =< V 1107.65/291.59 it(16) =< aux(8) 1107.65/291.59 s(7) =< aux(8) 1107.65/291.59 it(16) =< aux(3) 1107.65/291.59 s(6) =< it(16)*aux(8) 1107.65/291.59 s(5) =< it(16)*aux(3) 1107.65/291.59 1107.65/291.59 with precondition: [Out=0,V1>=2,V>=3] 1107.65/291.59 1107.65/291.59 * Chain [[16],17,21]: 1*it(16)+1*s(5)+1*s(6)+1*s(8)+2 1107.65/291.59 Such that:aux(4) =< V 1107.65/291.59 aux(9) =< V1 1107.65/291.59 it(16) =< aux(9) 1107.65/291.59 s(8) =< aux(9) 1107.65/291.59 it(16) =< aux(4) 1107.65/291.59 s(6) =< it(16)*aux(4) 1107.65/291.59 s(5) =< it(16)*aux(9) 1107.65/291.59 1107.65/291.59 with precondition: [Out=0,V1>=3,V>=2] 1107.65/291.59 1107.65/291.59 * Chain [[16],17,20]: 1*it(16)+1*s(5)+1*s(6)+1*s(8)+2 1107.65/291.59 Such that:aux(3) =< V1 1107.65/291.59 s(8) =< Out 1107.65/291.59 aux(10) =< V 1107.65/291.59 it(16) =< aux(10) 1107.65/291.59 it(16) =< aux(3) 1107.65/291.59 s(6) =< it(16)*aux(10) 1107.65/291.59 s(5) =< it(16)*aux(3) 1107.65/291.59 1107.65/291.59 with precondition: [V>=2,Out>=1,V1>=Out+2] 1107.65/291.59 1107.65/291.59 * Chain [21]: 1 1107.65/291.59 with precondition: [Out=0,V1>=0,V>=0] 1107.65/291.59 1107.65/291.59 * Chain [20]: 1 1107.65/291.59 with precondition: [V=0,V1=Out,V1>=0] 1107.65/291.59 1107.65/291.59 * Chain [19,21]: 2 1107.65/291.59 with precondition: [Out=0,V1>=1,V>=1] 1107.65/291.59 1107.65/291.59 * Chain [19,20]: 2 1107.65/291.59 with precondition: [Out=0,V1>=1,V>=1] 1107.65/291.59 1107.65/291.59 * Chain [18,21]: 1*s(7)+2 1107.65/291.59 Such that:s(7) =< V 1107.65/291.59 1107.65/291.59 with precondition: [Out=0,V1>=1,V>=2] 1107.65/291.59 1107.65/291.59 * Chain [17,21]: 1*s(8)+2 1107.65/291.59 Such that:s(8) =< V1 1107.65/291.59 1107.65/291.59 with precondition: [Out=0,V1>=2,V>=1] 1107.65/291.59 1107.65/291.59 * Chain [17,20]: 1*s(8)+2 1107.65/291.59 Such that:s(8) =< Out 1107.65/291.59 1107.65/291.59 with precondition: [V>=1,Out>=1,V1>=Out+1] 1107.65/291.59 1107.65/291.59 1107.65/291.59 #### Cost of chains of div(V1,V,Out): 1107.65/291.59 * Chain [[24],25]: 2*it(24)+0 1107.65/291.59 Such that:it(24) =< Out 1107.65/291.59 1107.65/291.59 with precondition: [V=1,Out>=1,V1>=Out] 1107.65/291.59 1107.65/291.59 * Chain [[24],23,25]: 2*it(24)+2*s(47)+2*s(48)+5*s(49)+5*s(50)+5*s(51)+3 1107.65/291.59 Such that:s(46) =< 1 1107.65/291.59 s(45) =< V1-Out+1 1107.65/291.59 it(24) =< Out 1107.65/291.59 s(47) =< s(45) 1107.65/291.59 s(48) =< s(46) 1107.65/291.59 s(49) =< s(46) 1107.65/291.59 s(49) =< s(45) 1107.65/291.59 s(50) =< s(49)*s(46) 1107.65/291.59 s(51) =< s(49)*s(45) 1107.65/291.59 1107.65/291.59 with precondition: [V=1,Out>=2,V1>=Out] 1107.65/291.59 1107.65/291.59 * Chain [[22],25]: 3*it(22)+2*s(66)+1*s(67)+1*s(68)+1*s(69)+0 1107.65/291.59 Such that:s(59) =< V1 1107.65/291.59 it(22) =< V1/2 1107.65/291.59 s(61) =< V 1107.65/291.59 aux(16) =< s(61) 1107.65/291.59 aux(15) =< s(59)-2 1107.65/291.59 aux(14) =< s(59) 1107.65/291.59 s(71) =< it(22)*aux(16) 1107.65/291.59 s(72) =< it(22)*aux(15) 1107.65/291.59 s(70) =< it(22)*aux(14) 1107.65/291.59 s(66) =< s(72) 1107.65/291.59 s(67) =< s(71) 1107.65/291.59 s(67) =< s(70) 1107.65/291.59 s(68) =< s(67)*s(61) 1107.65/291.59 s(69) =< s(67)*s(59) 1107.65/291.59 1107.65/291.59 with precondition: [V>=2,Out>=1,V1>=2*Out+1] 1107.65/291.59 1107.65/291.59 * Chain [[22],23,25]: 5*it(22)+2*s(48)+5*s(49)+5*s(50)+5*s(51)+2*s(66)+1*s(67)+1*s(68)+1*s(69)+3 1107.65/291.59 Such that:aux(17) =< V1 1107.65/291.59 aux(18) =< V 1107.65/291.59 it(22) =< aux(17) 1107.65/291.59 s(48) =< aux(18) 1107.65/291.59 s(49) =< aux(18) 1107.65/291.59 s(49) =< aux(17) 1107.65/291.59 s(50) =< s(49)*aux(18) 1107.65/291.59 s(51) =< s(49)*aux(17) 1107.65/291.59 aux(16) =< aux(18) 1107.65/291.59 aux(15) =< aux(17)-2 1107.65/291.59 aux(14) =< aux(17) 1107.65/291.59 s(71) =< it(22)*aux(16) 1107.65/291.59 s(72) =< it(22)*aux(15) 1107.65/291.59 s(70) =< it(22)*aux(14) 1107.65/291.59 s(66) =< s(72) 1107.65/291.59 s(67) =< s(71) 1107.65/291.59 s(67) =< s(70) 1107.65/291.59 s(68) =< s(67)*aux(18) 1107.65/291.59 s(69) =< s(67)*aux(17) 1107.65/291.59 1107.65/291.59 with precondition: [V>=2,Out>=2,V1+1>=2*Out] 1107.65/291.59 1107.65/291.59 * Chain [25]: 0 1107.65/291.59 with precondition: [Out=0,V1>=0,V>=0] 1107.65/291.59 1107.65/291.59 * Chain [23,25]: 2*s(47)+2*s(48)+5*s(49)+5*s(50)+5*s(51)+3 1107.65/291.59 Such that:s(45) =< V1 1107.65/291.59 s(46) =< V 1107.65/291.59 s(47) =< s(45) 1107.65/291.59 s(48) =< s(46) 1107.65/291.59 s(49) =< s(46) 1107.65/291.59 s(49) =< s(45) 1107.65/291.59 s(50) =< s(49)*s(46) 1107.65/291.59 s(51) =< s(49)*s(45) 1107.65/291.59 1107.65/291.59 with precondition: [Out=1,V1>=1,V>=1] 1107.65/291.59 1107.65/291.59 1107.65/291.59 #### Cost of chains of plus(V1,V,Out): 1107.65/291.59 * Chain [[26,27],29]: 15*it(26)+2*s(110)+1*s(111)+1*s(112)+1*s(113)+5*s(120)+5*s(121)+1 1107.65/291.59 Such that:aux(24) =< 1 1107.65/291.59 aux(27) =< V1+V 1107.65/291.59 it(26) =< aux(27) 1107.65/291.59 aux(22) =< aux(27)-1 1107.65/291.59 aux(21) =< aux(27) 1107.65/291.59 s(116) =< it(26)*aux(22) 1107.65/291.59 s(114) =< it(26)*aux(21) 1107.65/291.59 s(120) =< it(26)*aux(24) 1107.65/291.59 s(121) =< it(26)*aux(21) 1107.65/291.59 s(110) =< s(116) 1107.65/291.59 s(111) =< aux(27) 1107.65/291.59 s(111) =< s(114) 1107.65/291.59 s(112) =< s(111)*aux(24) 1107.65/291.59 s(113) =< s(111)*aux(27) 1107.65/291.59 1107.65/291.59 with precondition: [V1>=1,V>=0,Out>=1,V+V1>=Out] 1107.65/291.59 1107.65/291.59 * Chain [[26,27],28]: 15*it(26)+2*s(110)+1*s(111)+1*s(112)+1*s(113)+5*s(120)+5*s(121)+0 1107.65/291.59 Such that:aux(24) =< 1 1107.65/291.59 aux(28) =< V1+V 1107.65/291.59 it(26) =< aux(28) 1107.65/291.59 aux(22) =< aux(28)-1 1107.65/291.59 aux(21) =< aux(28) 1107.65/291.59 s(116) =< it(26)*aux(22) 1107.65/291.59 s(114) =< it(26)*aux(21) 1107.65/291.59 s(120) =< it(26)*aux(24) 1107.65/291.59 s(121) =< it(26)*aux(21) 1107.65/291.59 s(110) =< s(116) 1107.65/291.59 s(111) =< aux(28) 1107.65/291.59 s(111) =< s(114) 1107.65/291.59 s(112) =< s(111)*aux(24) 1107.65/291.59 s(113) =< s(111)*aux(28) 1107.65/291.59 1107.65/291.59 with precondition: [V1>=1,V>=0,Out>=1] 1107.65/291.59 1107.65/291.59 * Chain [29]: 1 1107.65/291.59 with precondition: [V1=0,V=Out,V>=0] 1107.65/291.59 1107.65/291.59 * Chain [28]: 0 1107.65/291.59 with precondition: [Out=0,V1>=0,V>=0] 1107.65/291.59 1107.65/291.59 1107.65/291.59 #### Cost of chains of start(V1,V): 1107.65/291.59 * Chain [32]: 12*s(152)+6*s(153)+16*s(154)+16*s(155)+16*s(156)+3*s(173)+2*s(181)+1*s(182)+1*s(183)+1*s(184)+2*s(198)+1*s(199)+1*s(200)+1*s(201)+30*s(204)+10*s(209)+10*s(210)+4*s(211)+2*s(212)+2*s(213)+2*s(214)+3 1107.65/291.59 Such that:s(202) =< 1 1107.65/291.59 s(203) =< V1+V 1107.65/291.59 s(173) =< V1/2 1107.65/291.59 aux(32) =< V1 1107.65/291.59 aux(33) =< V 1107.65/291.59 s(152) =< aux(32) 1107.65/291.59 s(204) =< s(203) 1107.65/291.59 s(205) =< s(203)-1 1107.65/291.59 s(206) =< s(203) 1107.65/291.59 s(207) =< s(204)*s(205) 1107.65/291.59 s(208) =< s(204)*s(206) 1107.65/291.59 s(209) =< s(204)*s(202) 1107.65/291.59 s(210) =< s(204)*s(206) 1107.65/291.59 s(211) =< s(207) 1107.65/291.59 s(212) =< s(203) 1107.65/291.59 s(212) =< s(208) 1107.65/291.59 s(213) =< s(212)*s(202) 1107.65/291.59 s(214) =< s(212)*s(203) 1107.65/291.59 s(153) =< aux(33) 1107.65/291.59 s(154) =< aux(33) 1107.65/291.59 s(154) =< aux(32) 1107.65/291.59 s(155) =< s(154)*aux(33) 1107.65/291.59 s(156) =< s(154)*aux(32) 1107.65/291.59 s(175) =< aux(33) 1107.65/291.59 s(176) =< aux(32)-2 1107.65/291.59 s(177) =< aux(32) 1107.65/291.59 s(178) =< s(173)*s(175) 1107.65/291.59 s(179) =< s(173)*s(176) 1107.65/291.59 s(180) =< s(173)*s(177) 1107.65/291.59 s(181) =< s(179) 1107.65/291.59 s(182) =< s(178) 1107.65/291.59 s(182) =< s(180) 1107.65/291.59 s(183) =< s(182)*aux(33) 1107.65/291.59 s(184) =< s(182)*aux(32) 1107.65/291.59 s(195) =< s(152)*s(175) 1107.65/291.59 s(196) =< s(152)*s(176) 1107.65/291.59 s(197) =< s(152)*s(177) 1107.65/291.59 s(198) =< s(196) 1107.65/291.59 s(199) =< s(195) 1107.65/291.59 s(199) =< s(197) 1107.65/291.59 s(200) =< s(199)*aux(33) 1107.65/291.59 s(201) =< s(199)*aux(32) 1107.65/291.59 1107.65/291.59 with precondition: [V1>=0] 1107.65/291.59 1107.65/291.59 * Chain [31]: 1 1107.65/291.59 with precondition: [V=0,V1>=0] 1107.65/291.59 1107.65/291.59 * Chain [30]: 6*s(218)+2*s(220)+5*s(221)+5*s(222)+5*s(223)+3 1107.65/291.59 Such that:s(215) =< 1 1107.65/291.59 aux(34) =< V1+1 1107.65/291.59 s(218) =< aux(34) 1107.65/291.59 s(220) =< s(215) 1107.65/291.59 s(221) =< s(215) 1107.65/291.59 s(221) =< aux(34) 1107.65/291.59 s(222) =< s(221)*s(215) 1107.65/291.59 s(223) =< s(221)*aux(34) 1107.65/291.59 1107.65/291.59 with precondition: [V=1,V1>=1] 1107.65/291.59 1107.65/291.59 1107.65/291.59 Closed-form bounds of start(V1,V): 1107.65/291.59 ------------------------------------- 1107.65/291.59 * Chain [32] with precondition: [V1>=0] 1107.65/291.59 - Upper bound: 12*V1+3+V1*V1*nat(V)+17*V1*nat(V)+nat(V)*V1*nat(V)+V1/2*(nat(V)*V1)+2*V1*nat(V1-2)+nat(V)*22+nat(V)*16*nat(V)+V1/2*(nat(V)*nat(V))+V1/2*nat(V)+V1/2*(nat(V1-2)*2)+nat(nat(V1+V)+ -1)*4*nat(V1+V)+nat(V1+V)*44+nat(V1+V)*12*nat(V1+V)+3/2*V1 1107.65/291.59 - Complexity: n^3 1107.65/291.59 * Chain [31] with precondition: [V=0,V1>=0] 1107.65/291.59 - Upper bound: 1 1107.65/291.59 - Complexity: constant 1107.65/291.59 * Chain [30] with precondition: [V=1,V1>=1] 1107.65/291.59 - Upper bound: 11*V1+26 1107.65/291.59 - Complexity: n 1107.65/291.59 1107.65/291.59 ### Maximum cost of start(V1,V): max([11*V1+25,12*V1+2+V1*V1*nat(V)+17*V1*nat(V)+nat(V)*V1*nat(V)+V1/2*(nat(V)*V1)+2*V1*nat(V1-2)+nat(V)*22+nat(V)*16*nat(V)+V1/2*(nat(V)*nat(V))+V1/2*nat(V)+V1/2*(nat(V1-2)*2)+nat(nat(V1+V)+ -1)*4*nat(V1+V)+nat(V1+V)*44+nat(V1+V)*12*nat(V1+V)+3/2*V1])+1 1107.65/291.59 Asymptotic class: n^3 1107.65/291.59 * Total analysis performed in 442 ms. 1107.65/291.59 1107.65/291.59 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (14) 1107.65/291.59 BOUNDS(1, n^3) 1107.65/291.59 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (15) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 1107.65/291.59 Transformed a relative TRS into a decreasing-loop problem. 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (16) 1107.65/291.59 Obligation: 1107.65/291.59 Analyzing the following TRS for decreasing loops: 1107.65/291.59 1107.65/291.59 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). 1107.65/291.59 1107.65/291.59 1107.65/291.59 The TRS R consists of the following rules: 1107.65/291.59 1107.65/291.59 minus(x, 0) -> x 1107.65/291.59 minus(0, y) -> 0 1107.65/291.59 minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) 1107.65/291.59 minus(x, plus(y, z)) -> minus(minus(x, y), z) 1107.65/291.59 p(s(s(x))) -> s(p(s(x))) 1107.65/291.59 p(0) -> s(s(0)) 1107.65/291.59 div(s(x), s(y)) -> s(div(minus(x, y), s(y))) 1107.65/291.59 div(plus(x, y), z) -> plus(div(x, z), div(y, z)) 1107.65/291.59 plus(0, y) -> y 1107.65/291.59 plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) 1107.65/291.59 1107.65/291.59 S is empty. 1107.65/291.59 Rewrite Strategy: FULL 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (17) DecreasingLoopProof (LOWER BOUND(ID)) 1107.65/291.59 The following loop(s) give(s) rise to the lower bound Omega(n^1): 1107.65/291.59 1107.65/291.59 The rewrite sequence 1107.65/291.59 1107.65/291.59 p(s(s(x))) ->^+ s(p(s(x))) 1107.65/291.59 1107.65/291.59 gives rise to a decreasing loop by considering the right hand sides subterm at position [0]. 1107.65/291.59 1107.65/291.59 The pumping substitution is [x / s(x)]. 1107.65/291.59 1107.65/291.59 The result substitution is [ ]. 1107.65/291.59 1107.65/291.59 1107.65/291.59 1107.65/291.59 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (18) 1107.65/291.59 Complex Obligation (BEST) 1107.65/291.59 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (19) 1107.65/291.59 Obligation: 1107.65/291.59 Proved the lower bound n^1 for the following obligation: 1107.65/291.59 1107.65/291.59 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). 1107.65/291.59 1107.65/291.59 1107.65/291.59 The TRS R consists of the following rules: 1107.65/291.59 1107.65/291.59 minus(x, 0) -> x 1107.65/291.59 minus(0, y) -> 0 1107.65/291.59 minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) 1107.65/291.59 minus(x, plus(y, z)) -> minus(minus(x, y), z) 1107.65/291.59 p(s(s(x))) -> s(p(s(x))) 1107.65/291.59 p(0) -> s(s(0)) 1107.65/291.59 div(s(x), s(y)) -> s(div(minus(x, y), s(y))) 1107.65/291.59 div(plus(x, y), z) -> plus(div(x, z), div(y, z)) 1107.65/291.59 plus(0, y) -> y 1107.65/291.59 plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) 1107.65/291.59 1107.65/291.59 S is empty. 1107.65/291.59 Rewrite Strategy: FULL 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (20) LowerBoundPropagationProof (FINISHED) 1107.65/291.59 Propagated lower bound. 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (21) 1107.65/291.59 BOUNDS(n^1, INF) 1107.65/291.59 1107.65/291.59 ---------------------------------------- 1107.65/291.59 1107.65/291.59 (22) 1107.65/291.59 Obligation: 1107.65/291.59 Analyzing the following TRS for decreasing loops: 1107.65/291.59 1107.65/291.59 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). 1107.65/291.59 1107.65/291.59 1107.65/291.59 The TRS R consists of the following rules: 1107.65/291.59 1107.65/291.59 minus(x, 0) -> x 1107.65/291.59 minus(0, y) -> 0 1107.65/291.59 minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) 1107.65/291.59 minus(x, plus(y, z)) -> minus(minus(x, y), z) 1107.65/291.59 p(s(s(x))) -> s(p(s(x))) 1107.65/291.59 p(0) -> s(s(0)) 1107.65/291.59 div(s(x), s(y)) -> s(div(minus(x, y), s(y))) 1107.65/291.59 div(plus(x, y), z) -> plus(div(x, z), div(y, z)) 1107.65/291.59 plus(0, y) -> y 1107.65/291.59 plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) 1107.65/291.59 1107.65/291.59 S is empty. 1107.65/291.59 Rewrite Strategy: FULL 1107.89/291.66 EOF