/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^2)) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). (0) CpxTRS (1) NestedDefinedSymbolProof [UPPER BOUND(ID), 11 ms] (2) CpxTRS (3) NonCtorToCtorProof [UPPER BOUND(ID), 0 ms] (4) CpxRelTRS (5) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxRelTRS (7) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxWeightedTrs (9) CpxWeightedTrsRenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxWeightedTrs (11) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTypedWeightedTrs (13) CompletionProof [UPPER BOUND(ID), 0 ms] (14) CpxTypedWeightedCompleteTrs (15) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 2 ms] (16) CpxRNTS (17) CompleteCoflocoProof [FINISHED, 399 ms] (18) BOUNDS(1, n^2) (19) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (20) CpxTRS (21) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (22) typed CpxTrs (23) OrderProof [LOWER BOUND(ID), 0 ms] (24) typed CpxTrs (25) RewriteLemmaProof [LOWER BOUND(ID), 1119 ms] (26) BEST (27) proven lower bound (28) LowerBoundPropagationProof [FINISHED, 0 ms] (29) BOUNDS(n^1, INF) (30) typed CpxTrs (31) RewriteLemmaProof [LOWER BOUND(ID), 69 ms] (32) typed CpxTrs (33) RewriteLemmaProof [LOWER BOUND(ID), 0 ms] (34) BOUNDS(1, INF) ---------------------------------------- (0) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: O(0) -> 0 +(0, x) -> x +(x, 0) -> x +(O(x), O(y)) -> O(+(x, y)) +(O(x), I(y)) -> I(+(x, y)) +(I(x), O(y)) -> I(+(x, y)) +(I(x), I(y)) -> O(+(+(x, y), I(0))) *(0, x) -> 0 *(x, 0) -> 0 *(O(x), y) -> O(*(x, y)) *(I(x), y) -> +(O(*(x, y)), y) -(x, 0) -> x -(0, x) -> 0 -(O(x), O(y)) -> O(-(x, y)) -(O(x), I(y)) -> I(-(-(x, y), I(1))) -(I(x), O(y)) -> I(-(x, y)) -(I(x), I(y)) -> O(-(x, y)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) NestedDefinedSymbolProof (UPPER BOUND(ID)) The following defined symbols can occur below the 0th argument of O: O, +, -, * The following defined symbols can occur below the 0th argument of +: O, +, * Hence, the left-hand sides of the following rules are not basic-reachable and can be removed: +(O(x), O(y)) -> O(+(x, y)) +(I(x), O(y)) -> I(+(x, y)) *(O(x), y) -> O(*(x, y)) -(O(x), O(y)) -> O(-(x, y)) -(O(x), I(y)) -> I(-(-(x, y), I(1))) -(I(x), O(y)) -> I(-(x, y)) ---------------------------------------- (2) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: O(0) -> 0 +(0, x) -> x +(x, 0) -> x +(O(x), I(y)) -> I(+(x, y)) +(I(x), I(y)) -> O(+(+(x, y), I(0))) *(0, x) -> 0 *(x, 0) -> 0 *(I(x), y) -> +(O(*(x, y)), y) -(x, 0) -> x -(0, x) -> 0 -(I(x), I(y)) -> O(-(x, y)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (3) NonCtorToCtorProof (UPPER BOUND(ID)) transformed non-ctor to ctor-system ---------------------------------------- (4) Obligation: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: O(0) -> 0 +(0, x) -> x +(x, 0) -> x +(I(x), I(y)) -> O(+(+(x, y), I(0))) *(0, x) -> 0 *(x, 0) -> 0 *(I(x), y) -> +(O(*(x, y)), y) -(x, 0) -> x -(0, x) -> 0 -(I(x), I(y)) -> O(-(x, y)) +(c_O(x), I(y)) -> I(+(x, y)) The (relative) TRS S consists of the following rules: O(x0) -> c_O(x0) Rewrite Strategy: FULL ---------------------------------------- (5) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. The duplicating contexts are: *(I(x), []) The defined contexts are: O([]) +([], x1) +([], I(0)) As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc. ---------------------------------------- (6) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: O(0) -> 0 +(0, x) -> x +(x, 0) -> x +(I(x), I(y)) -> O(+(+(x, y), I(0))) *(0, x) -> 0 *(x, 0) -> 0 *(I(x), y) -> +(O(*(x, y)), y) -(x, 0) -> x -(0, x) -> 0 -(I(x), I(y)) -> O(-(x, y)) +(c_O(x), I(y)) -> I(+(x, y)) The (relative) TRS S consists of the following rules: O(x0) -> c_O(x0) Rewrite Strategy: INNERMOST ---------------------------------------- (7) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (8) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: O(0) -> 0 [1] +(0, x) -> x [1] +(x, 0) -> x [1] +(I(x), I(y)) -> O(+(+(x, y), I(0))) [1] *(0, x) -> 0 [1] *(x, 0) -> 0 [1] *(I(x), y) -> +(O(*(x, y)), y) [1] -(x, 0) -> x [1] -(0, x) -> 0 [1] -(I(x), I(y)) -> O(-(x, y)) [1] +(c_O(x), I(y)) -> I(+(x, y)) [1] O(x0) -> c_O(x0) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (9) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID)) Renamed defined symbols to avoid conflicts with arithmetic symbols: + => plus * => times - => minus ---------------------------------------- (10) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: O(0) -> 0 [1] plus(0, x) -> x [1] plus(x, 0) -> x [1] plus(I(x), I(y)) -> O(plus(plus(x, y), I(0))) [1] times(0, x) -> 0 [1] times(x, 0) -> 0 [1] times(I(x), y) -> plus(O(times(x, y)), y) [1] minus(x, 0) -> x [1] minus(0, x) -> 0 [1] minus(I(x), I(y)) -> O(minus(x, y)) [1] plus(c_O(x), I(y)) -> I(plus(x, y)) [1] O(x0) -> c_O(x0) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (12) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: O(0) -> 0 [1] plus(0, x) -> x [1] plus(x, 0) -> x [1] plus(I(x), I(y)) -> O(plus(plus(x, y), I(0))) [1] times(0, x) -> 0 [1] times(x, 0) -> 0 [1] times(I(x), y) -> plus(O(times(x, y)), y) [1] minus(x, 0) -> x [1] minus(0, x) -> 0 [1] minus(I(x), I(y)) -> O(minus(x, y)) [1] plus(c_O(x), I(y)) -> I(plus(x, y)) [1] O(x0) -> c_O(x0) [0] The TRS has the following type information: O :: 0:I:c_O -> 0:I:c_O 0 :: 0:I:c_O plus :: 0:I:c_O -> 0:I:c_O -> 0:I:c_O I :: 0:I:c_O -> 0:I:c_O times :: 0:I:c_O -> 0:I:c_O -> 0:I:c_O minus :: 0:I:c_O -> 0:I:c_O -> 0:I:c_O c_O :: 0:I:c_O -> 0:I:c_O Rewrite Strategy: INNERMOST ---------------------------------------- (13) CompletionProof (UPPER BOUND(ID)) The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: O(v0) -> null_O [0] plus(v0, v1) -> null_plus [0] times(v0, v1) -> null_times [0] minus(v0, v1) -> null_minus [0] And the following fresh constants: null_O, null_plus, null_times, null_minus ---------------------------------------- (14) Obligation: Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: O(0) -> 0 [1] plus(0, x) -> x [1] plus(x, 0) -> x [1] plus(I(x), I(y)) -> O(plus(plus(x, y), I(0))) [1] times(0, x) -> 0 [1] times(x, 0) -> 0 [1] times(I(x), y) -> plus(O(times(x, y)), y) [1] minus(x, 0) -> x [1] minus(0, x) -> 0 [1] minus(I(x), I(y)) -> O(minus(x, y)) [1] plus(c_O(x), I(y)) -> I(plus(x, y)) [1] O(x0) -> c_O(x0) [0] O(v0) -> null_O [0] plus(v0, v1) -> null_plus [0] times(v0, v1) -> null_times [0] minus(v0, v1) -> null_minus [0] The TRS has the following type information: O :: 0:I:c_O:null_O:null_plus:null_times:null_minus -> 0:I:c_O:null_O:null_plus:null_times:null_minus 0 :: 0:I:c_O:null_O:null_plus:null_times:null_minus plus :: 0:I:c_O:null_O:null_plus:null_times:null_minus -> 0:I:c_O:null_O:null_plus:null_times:null_minus -> 0:I:c_O:null_O:null_plus:null_times:null_minus I :: 0:I:c_O:null_O:null_plus:null_times:null_minus -> 0:I:c_O:null_O:null_plus:null_times:null_minus times :: 0:I:c_O:null_O:null_plus:null_times:null_minus -> 0:I:c_O:null_O:null_plus:null_times:null_minus -> 0:I:c_O:null_O:null_plus:null_times:null_minus minus :: 0:I:c_O:null_O:null_plus:null_times:null_minus -> 0:I:c_O:null_O:null_plus:null_times:null_minus -> 0:I:c_O:null_O:null_plus:null_times:null_minus c_O :: 0:I:c_O:null_O:null_plus:null_times:null_minus -> 0:I:c_O:null_O:null_plus:null_times:null_minus null_O :: 0:I:c_O:null_O:null_plus:null_times:null_minus null_plus :: 0:I:c_O:null_O:null_plus:null_times:null_minus null_times :: 0:I:c_O:null_O:null_plus:null_times:null_minus null_minus :: 0:I:c_O:null_O:null_plus:null_times:null_minus Rewrite Strategy: INNERMOST ---------------------------------------- (15) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: 0 => 0 null_O => 0 null_plus => 0 null_times => 0 null_minus => 0 ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: O(z) -{ 1 }-> 0 :|: z = 0 O(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 O(z) -{ 0 }-> 1 + x0 :|: z = x0, x0 >= 0 minus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 minus(z, z') -{ 1 }-> O(minus(x, y)) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x minus(z, z') -{ 1 }-> 0 :|: z' = x, x >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 plus(z, z') -{ 1 }-> x :|: z' = x, x >= 0, z = 0 plus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 plus(z, z') -{ 1 }-> O(plus(plus(x, y), 1 + 0)) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x plus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 plus(z, z') -{ 1 }-> 1 + plus(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x times(z, z') -{ 1 }-> plus(O(times(x, y)), y) :|: x >= 0, y >= 0, z = 1 + x, z' = y times(z, z') -{ 1 }-> 0 :|: z' = x, x >= 0, z = 0 times(z, z') -{ 1 }-> 0 :|: x >= 0, z = x, z' = 0 times(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (17) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V, V1),0,[fun(V, Out)],[V >= 0]). eq(start(V, V1),0,[plus(V, V1, Out)],[V >= 0,V1 >= 0]). eq(start(V, V1),0,[times(V, V1, Out)],[V >= 0,V1 >= 0]). eq(start(V, V1),0,[minus(V, V1, Out)],[V >= 0,V1 >= 0]). eq(fun(V, Out),1,[],[Out = 0,V = 0]). eq(plus(V, V1, Out),1,[],[Out = V2,V1 = V2,V2 >= 0,V = 0]). eq(plus(V, V1, Out),1,[],[Out = V3,V3 >= 0,V = V3,V1 = 0]). eq(plus(V, V1, Out),1,[plus(V4, V5, Ret00),plus(Ret00, 1 + 0, Ret0),fun(Ret0, Ret)],[Out = Ret,V1 = 1 + V5,V4 >= 0,V5 >= 0,V = 1 + V4]). eq(times(V, V1, Out),1,[],[Out = 0,V1 = V6,V6 >= 0,V = 0]). eq(times(V, V1, Out),1,[],[Out = 0,V7 >= 0,V = V7,V1 = 0]). eq(times(V, V1, Out),1,[times(V8, V9, Ret001),fun(Ret001, Ret01),plus(Ret01, V9, Ret1)],[Out = Ret1,V8 >= 0,V9 >= 0,V = 1 + V8,V1 = V9]). eq(minus(V, V1, Out),1,[],[Out = V10,V10 >= 0,V = V10,V1 = 0]). eq(minus(V, V1, Out),1,[],[Out = 0,V1 = V11,V11 >= 0,V = 0]). eq(minus(V, V1, Out),1,[minus(V13, V12, Ret02),fun(Ret02, Ret2)],[Out = Ret2,V1 = 1 + V12,V13 >= 0,V12 >= 0,V = 1 + V13]). eq(plus(V, V1, Out),1,[plus(V15, V14, Ret11)],[Out = 1 + Ret11,V1 = 1 + V14,V15 >= 0,V14 >= 0,V = 1 + V15]). eq(fun(V, Out),0,[],[Out = 1 + V16,V = V16,V16 >= 0]). eq(fun(V, Out),0,[],[Out = 0,V17 >= 0,V = V17]). eq(plus(V, V1, Out),0,[],[Out = 0,V19 >= 0,V18 >= 0,V = V19,V1 = V18]). eq(times(V, V1, Out),0,[],[Out = 0,V21 >= 0,V20 >= 0,V = V21,V1 = V20]). eq(minus(V, V1, Out),0,[],[Out = 0,V22 >= 0,V23 >= 0,V = V22,V1 = V23]). input_output_vars(fun(V,Out),[V],[Out]). input_output_vars(plus(V,V1,Out),[V,V1],[Out]). input_output_vars(times(V,V1,Out),[V,V1],[Out]). input_output_vars(minus(V,V1,Out),[V,V1],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. non_recursive : [fun/2] 1. recursive [non_tail] : [minus/3] 2. recursive [non_tail,multiple] : [plus/3] 3. recursive [non_tail] : [times/3] 4. non_recursive : [start/2] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into fun/2 1. SCC is partially evaluated into minus/3 2. SCC is partially evaluated into plus/3 3. SCC is partially evaluated into times/3 4. SCC is partially evaluated into start/2 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations fun/2 * CE 6 is refined into CE [21] * CE 5 is refined into CE [22] * CE 7 is refined into CE [23] ### Cost equations --> "Loop" of fun/2 * CEs [21] --> Loop 15 * CEs [22,23] --> Loop 16 ### Ranking functions of CR fun(V,Out) #### Partial ranking functions of CR fun(V,Out) ### Specialization of cost equations minus/3 * CE 17 is refined into CE [24] * CE 18 is refined into CE [25] * CE 20 is refined into CE [26] * CE 19 is refined into CE [27,28] ### Cost equations --> "Loop" of minus/3 * CEs [28] --> Loop 17 * CEs [27] --> Loop 18 * CEs [24] --> Loop 19 * CEs [25,26] --> Loop 20 ### Ranking functions of CR minus(V,V1,Out) * RF of phase [17,18]: [V,V1] #### Partial ranking functions of CR minus(V,V1,Out) * Partial RF of phase [17,18]: - RF of loop [17:1,18:1]: V V1 ### Specialization of cost equations plus/3 * CE 12 is refined into CE [29] * CE 9 is refined into CE [30] * CE 8 is refined into CE [31] * CE 11 is refined into CE [32] * CE 10 is refined into CE [33,34] ### Cost equations --> "Loop" of plus/3 * CEs [34] --> Loop 21 * CEs [33] --> Loop 22 * CEs [32] --> Loop 23 * CEs [29] --> Loop 24 * CEs [30] --> Loop 25 * CEs [31] --> Loop 26 ### Ranking functions of CR plus(V,V1,Out) #### Partial ranking functions of CR plus(V,V1,Out) * Partial RF of phase [21,22,23]: - RF of loop [21:1,22:1,23:1]: V depends on loops [21:2,22:2] V1 ### Specialization of cost equations times/3 * CE 14 is refined into CE [35] * CE 13 is refined into CE [36] * CE 16 is refined into CE [37] * CE 15 is refined into CE [38,39,40,41,42,43] ### Cost equations --> "Loop" of times/3 * CEs [43] --> Loop 27 * CEs [38] --> Loop 28 * CEs [41] --> Loop 29 * CEs [39,40,42] --> Loop 30 * CEs [35] --> Loop 31 * CEs [36,37] --> Loop 32 ### Ranking functions of CR times(V,V1,Out) * RF of phase [27,28,29,30]: [V] #### Partial ranking functions of CR times(V,V1,Out) * Partial RF of phase [27,28,29,30]: - RF of loop [27:1,28:1,29:1,30:1]: V ### Specialization of cost equations start/2 * CE 1 is refined into CE [44,45] * CE 2 is refined into CE [46,47,48,49] * CE 3 is refined into CE [50,51] * CE 4 is refined into CE [52,53,54,55] ### Cost equations --> "Loop" of start/2 * CEs [47,52] --> Loop 33 * CEs [44,45,46,48,50,51,53,54,55] --> Loop 34 * CEs [49] --> Loop 35 ### Ranking functions of CR start(V,V1) #### Partial ranking functions of CR start(V,V1) Computing Bounds ===================================== #### Cost of chains of fun(V,Out): * Chain [16]: 1 with precondition: [Out=0,V>=0] * Chain [15]: 0 with precondition: [V+1=Out,V>=0] #### Cost of chains of minus(V,V1,Out): * Chain [[17,18],20]: 3*it(17)+1 Such that:aux(3) =< V1 aux(5) =< V it(17) =< aux(5) it(17) =< aux(3) with precondition: [V>=1,V1>=1,Out>=0,V>=Out,V1>=Out] * Chain [[17,18],19]: 3*it(17)+1 Such that:aux(1) =< V aux(6) =< V1 it(17) =< aux(1) it(17) =< aux(6) with precondition: [V1>=1,Out>=0,V>=V1,V>=Out] * Chain [20]: 1 with precondition: [Out=0,V>=0,V1>=0] * Chain [19]: 1 with precondition: [V1=0,V=Out,V>=0] #### Cost of chains of plus(V,V1,Out): * Chain [multiple([21,22,23],[[],[26],[25],[24]])]...: 4*it(21)+2*it([25])+0 Such that:aux(7) =< 1 aux(8) =< 2*V1 it(21) =< aux(8) it([25]) =< it(21)+it(21)+aux(7) with precondition: [V>=1,V1>=1] * Chain [26]: 1 with precondition: [V=0,V1=Out,V1>=0] * Chain [25]: 1 with precondition: [V1=0,V=Out,V>=0] * Chain [24]: 0 with precondition: [Out=0,V>=0,V1>=0] #### Cost of chains of times(V,V1,Out): * Chain [[27,28,29,30],32]: 9*it(27)+4*s(9)+2*s(10)+1 Such that:aux(10) =< 2*V1 aux(13) =< V it(27) =< aux(13) s(12) =< it(27)*aux(10) s(9) =< s(12) s(10) =< s(9)+s(9)+aux(13) with precondition: [V>=1,V1>=0] * Chain [[27,28,29,30],31]: 9*it(27)+2*s(10)+1 Such that:aux(14) =< V it(27) =< aux(14) s(10) =< aux(14) with precondition: [V1=0,V>=1,Out>=0,V>=Out] * Chain [32]: 1 with precondition: [Out=0,V>=0,V1>=0] * Chain [31]: 1 with precondition: [V1=0,Out=0,V>=0] #### Cost of chains of start(V,V1): * Chain [35]...: 4*s(24)+2*s(25)+0 Such that:s(22) =< 1 s(23) =< 2*V1 s(24) =< s(23) s(25) =< s(24)+s(24)+s(22) with precondition: [V>=1,V1>=1] * Chain [34]: 20*s(28)+4*s(30)+2*s(31)+6*s(34)+1 Such that:s(26) =< 2*V1 aux(16) =< V aux(17) =< V1 s(28) =< aux(16) s(29) =< s(28)*s(26) s(30) =< s(29) s(31) =< s(30)+s(30)+aux(16) s(34) =< aux(16) s(34) =< aux(17) with precondition: [V>=0] * Chain [33]: 1 with precondition: [V1=0,V>=0] Closed-form bounds of start(V,V1): ------------------------------------- * Chain [35]... with precondition: [V>=1,V1>=1] - Upper bound: 16*V1+2 - Complexity: n * Chain [34] with precondition: [V>=0] - Upper bound: 28*V+1+8*V*nat(2*V1) - Complexity: n^2 * Chain [33] with precondition: [V1=0,V>=0] - Upper bound: 1 - Complexity: constant ### Maximum cost of start(V,V1): max([nat(2*V1)*8+1,8*V*nat(2*V1)+28*V])+1 Asymptotic class: n^2 * Total analysis performed in 303 ms. ---------------------------------------- (18) BOUNDS(1, n^2) ---------------------------------------- (19) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (20) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: O(0') -> 0' +'(0', x) -> x +'(x, 0') -> x +'(O(x), O(y)) -> O(+'(x, y)) +'(O(x), I(y)) -> I(+'(x, y)) +'(I(x), O(y)) -> I(+'(x, y)) +'(I(x), I(y)) -> O(+'(+'(x, y), I(0'))) *'(0', x) -> 0' *'(x, 0') -> 0' *'(O(x), y) -> O(*'(x, y)) *'(I(x), y) -> +'(O(*'(x, y)), y) -(x, 0') -> x -(0', x) -> 0' -(O(x), O(y)) -> O(-(x, y)) -(O(x), I(y)) -> I(-(-(x, y), I(1'))) -(I(x), O(y)) -> I(-(x, y)) -(I(x), I(y)) -> O(-(x, y)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (21) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (22) Obligation: TRS: Rules: O(0') -> 0' +'(0', x) -> x +'(x, 0') -> x +'(O(x), O(y)) -> O(+'(x, y)) +'(O(x), I(y)) -> I(+'(x, y)) +'(I(x), O(y)) -> I(+'(x, y)) +'(I(x), I(y)) -> O(+'(+'(x, y), I(0'))) *'(0', x) -> 0' *'(x, 0') -> 0' *'(O(x), y) -> O(*'(x, y)) *'(I(x), y) -> +'(O(*'(x, y)), y) -(x, 0') -> x -(0', x) -> 0' -(O(x), O(y)) -> O(-(x, y)) -(O(x), I(y)) -> I(-(-(x, y), I(1'))) -(I(x), O(y)) -> I(-(x, y)) -(I(x), I(y)) -> O(-(x, y)) Types: O :: 0':I:1' -> 0':I:1' 0' :: 0':I:1' +' :: 0':I:1' -> 0':I:1' -> 0':I:1' I :: 0':I:1' -> 0':I:1' *' :: 0':I:1' -> 0':I:1' -> 0':I:1' - :: 0':I:1' -> 0':I:1' -> 0':I:1' 1' :: 0':I:1' hole_0':I:1'1_0 :: 0':I:1' gen_0':I:1'2_0 :: Nat -> 0':I:1' ---------------------------------------- (23) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: +', *', - They will be analysed ascendingly in the following order: +' < *' ---------------------------------------- (24) Obligation: TRS: Rules: O(0') -> 0' +'(0', x) -> x +'(x, 0') -> x +'(O(x), O(y)) -> O(+'(x, y)) +'(O(x), I(y)) -> I(+'(x, y)) +'(I(x), O(y)) -> I(+'(x, y)) +'(I(x), I(y)) -> O(+'(+'(x, y), I(0'))) *'(0', x) -> 0' *'(x, 0') -> 0' *'(O(x), y) -> O(*'(x, y)) *'(I(x), y) -> +'(O(*'(x, y)), y) -(x, 0') -> x -(0', x) -> 0' -(O(x), O(y)) -> O(-(x, y)) -(O(x), I(y)) -> I(-(-(x, y), I(1'))) -(I(x), O(y)) -> I(-(x, y)) -(I(x), I(y)) -> O(-(x, y)) Types: O :: 0':I:1' -> 0':I:1' 0' :: 0':I:1' +' :: 0':I:1' -> 0':I:1' -> 0':I:1' I :: 0':I:1' -> 0':I:1' *' :: 0':I:1' -> 0':I:1' -> 0':I:1' - :: 0':I:1' -> 0':I:1' -> 0':I:1' 1' :: 0':I:1' hole_0':I:1'1_0 :: 0':I:1' gen_0':I:1'2_0 :: Nat -> 0':I:1' Generator Equations: gen_0':I:1'2_0(0) <=> 0' gen_0':I:1'2_0(+(x, 1)) <=> I(gen_0':I:1'2_0(x)) The following defined symbols remain to be analysed: +', *', - They will be analysed ascendingly in the following order: +' < *' ---------------------------------------- (25) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: +'(gen_0':I:1'2_0(n4_0), gen_0':I:1'2_0(n4_0)) -> *3_0, rt in Omega(n4_0) Induction Base: +'(gen_0':I:1'2_0(0), gen_0':I:1'2_0(0)) Induction Step: +'(gen_0':I:1'2_0(+(n4_0, 1)), gen_0':I:1'2_0(+(n4_0, 1))) ->_R^Omega(1) O(+'(+'(gen_0':I:1'2_0(n4_0), gen_0':I:1'2_0(n4_0)), I(0'))) ->_IH O(+'(*3_0, I(0'))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (26) Complex Obligation (BEST) ---------------------------------------- (27) Obligation: Proved the lower bound n^1 for the following obligation: TRS: Rules: O(0') -> 0' +'(0', x) -> x +'(x, 0') -> x +'(O(x), O(y)) -> O(+'(x, y)) +'(O(x), I(y)) -> I(+'(x, y)) +'(I(x), O(y)) -> I(+'(x, y)) +'(I(x), I(y)) -> O(+'(+'(x, y), I(0'))) *'(0', x) -> 0' *'(x, 0') -> 0' *'(O(x), y) -> O(*'(x, y)) *'(I(x), y) -> +'(O(*'(x, y)), y) -(x, 0') -> x -(0', x) -> 0' -(O(x), O(y)) -> O(-(x, y)) -(O(x), I(y)) -> I(-(-(x, y), I(1'))) -(I(x), O(y)) -> I(-(x, y)) -(I(x), I(y)) -> O(-(x, y)) Types: O :: 0':I:1' -> 0':I:1' 0' :: 0':I:1' +' :: 0':I:1' -> 0':I:1' -> 0':I:1' I :: 0':I:1' -> 0':I:1' *' :: 0':I:1' -> 0':I:1' -> 0':I:1' - :: 0':I:1' -> 0':I:1' -> 0':I:1' 1' :: 0':I:1' hole_0':I:1'1_0 :: 0':I:1' gen_0':I:1'2_0 :: Nat -> 0':I:1' Generator Equations: gen_0':I:1'2_0(0) <=> 0' gen_0':I:1'2_0(+(x, 1)) <=> I(gen_0':I:1'2_0(x)) The following defined symbols remain to be analysed: +', *', - They will be analysed ascendingly in the following order: +' < *' ---------------------------------------- (28) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (29) BOUNDS(n^1, INF) ---------------------------------------- (30) Obligation: TRS: Rules: O(0') -> 0' +'(0', x) -> x +'(x, 0') -> x +'(O(x), O(y)) -> O(+'(x, y)) +'(O(x), I(y)) -> I(+'(x, y)) +'(I(x), O(y)) -> I(+'(x, y)) +'(I(x), I(y)) -> O(+'(+'(x, y), I(0'))) *'(0', x) -> 0' *'(x, 0') -> 0' *'(O(x), y) -> O(*'(x, y)) *'(I(x), y) -> +'(O(*'(x, y)), y) -(x, 0') -> x -(0', x) -> 0' -(O(x), O(y)) -> O(-(x, y)) -(O(x), I(y)) -> I(-(-(x, y), I(1'))) -(I(x), O(y)) -> I(-(x, y)) -(I(x), I(y)) -> O(-(x, y)) Types: O :: 0':I:1' -> 0':I:1' 0' :: 0':I:1' +' :: 0':I:1' -> 0':I:1' -> 0':I:1' I :: 0':I:1' -> 0':I:1' *' :: 0':I:1' -> 0':I:1' -> 0':I:1' - :: 0':I:1' -> 0':I:1' -> 0':I:1' 1' :: 0':I:1' hole_0':I:1'1_0 :: 0':I:1' gen_0':I:1'2_0 :: Nat -> 0':I:1' Lemmas: +'(gen_0':I:1'2_0(n4_0), gen_0':I:1'2_0(n4_0)) -> *3_0, rt in Omega(n4_0) Generator Equations: gen_0':I:1'2_0(0) <=> 0' gen_0':I:1'2_0(+(x, 1)) <=> I(gen_0':I:1'2_0(x)) The following defined symbols remain to be analysed: *', - ---------------------------------------- (31) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: *'(gen_0':I:1'2_0(n40693_0), gen_0':I:1'2_0(0)) -> gen_0':I:1'2_0(0), rt in Omega(1 + n40693_0) Induction Base: *'(gen_0':I:1'2_0(0), gen_0':I:1'2_0(0)) ->_R^Omega(1) 0' Induction Step: *'(gen_0':I:1'2_0(+(n40693_0, 1)), gen_0':I:1'2_0(0)) ->_R^Omega(1) +'(O(*'(gen_0':I:1'2_0(n40693_0), gen_0':I:1'2_0(0))), gen_0':I:1'2_0(0)) ->_IH +'(O(gen_0':I:1'2_0(0)), gen_0':I:1'2_0(0)) ->_R^Omega(1) +'(0', gen_0':I:1'2_0(0)) ->_R^Omega(1) gen_0':I:1'2_0(0) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (32) Obligation: TRS: Rules: O(0') -> 0' +'(0', x) -> x +'(x, 0') -> x +'(O(x), O(y)) -> O(+'(x, y)) +'(O(x), I(y)) -> I(+'(x, y)) +'(I(x), O(y)) -> I(+'(x, y)) +'(I(x), I(y)) -> O(+'(+'(x, y), I(0'))) *'(0', x) -> 0' *'(x, 0') -> 0' *'(O(x), y) -> O(*'(x, y)) *'(I(x), y) -> +'(O(*'(x, y)), y) -(x, 0') -> x -(0', x) -> 0' -(O(x), O(y)) -> O(-(x, y)) -(O(x), I(y)) -> I(-(-(x, y), I(1'))) -(I(x), O(y)) -> I(-(x, y)) -(I(x), I(y)) -> O(-(x, y)) Types: O :: 0':I:1' -> 0':I:1' 0' :: 0':I:1' +' :: 0':I:1' -> 0':I:1' -> 0':I:1' I :: 0':I:1' -> 0':I:1' *' :: 0':I:1' -> 0':I:1' -> 0':I:1' - :: 0':I:1' -> 0':I:1' -> 0':I:1' 1' :: 0':I:1' hole_0':I:1'1_0 :: 0':I:1' gen_0':I:1'2_0 :: Nat -> 0':I:1' Lemmas: +'(gen_0':I:1'2_0(n4_0), gen_0':I:1'2_0(n4_0)) -> *3_0, rt in Omega(n4_0) *'(gen_0':I:1'2_0(n40693_0), gen_0':I:1'2_0(0)) -> gen_0':I:1'2_0(0), rt in Omega(1 + n40693_0) Generator Equations: gen_0':I:1'2_0(0) <=> 0' gen_0':I:1'2_0(+(x, 1)) <=> I(gen_0':I:1'2_0(x)) The following defined symbols remain to be analysed: - ---------------------------------------- (33) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: -(gen_0':I:1'2_0(n46179_0), gen_0':I:1'2_0(n46179_0)) -> gen_0':I:1'2_0(0), rt in Omega(1 + n46179_0) Induction Base: -(gen_0':I:1'2_0(0), gen_0':I:1'2_0(0)) ->_R^Omega(1) gen_0':I:1'2_0(0) Induction Step: -(gen_0':I:1'2_0(+(n46179_0, 1)), gen_0':I:1'2_0(+(n46179_0, 1))) ->_R^Omega(1) O(-(gen_0':I:1'2_0(n46179_0), gen_0':I:1'2_0(n46179_0))) ->_IH O(gen_0':I:1'2_0(0)) ->_R^Omega(1) 0' We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (34) BOUNDS(1, INF)