WORST_CASE(Omega(n^1),O(n^2)) proof of input_8ClzMtGPTe.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). (0) CpxTRS (1) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (2) CpxWeightedTrs (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTypedWeightedTrs (5) CompletionProof [UPPER BOUND(ID), 1 ms] (6) CpxTypedWeightedCompleteTrs (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 1028 ms] (10) BOUNDS(1, n^2) (11) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CdtProblem (13) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxRelTRS (15) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxRelTRS (17) TypeInferenceProof [BOTH BOUNDS(ID, ID), 1 ms] (18) typed CpxTrs (19) OrderProof [LOWER BOUND(ID), 0 ms] (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 330 ms] (22) typed CpxTrs (23) RewriteLemmaProof [LOWER BOUND(ID), 151 ms] (24) BEST (25) proven lower bound (26) LowerBoundPropagationProof [FINISHED, 0 ms] (27) BOUNDS(n^1, INF) (28) typed CpxTrs (29) RewriteLemmaProof [LOWER BOUND(ID), 40 ms] (30) typed CpxTrs (31) RewriteLemmaProof [LOWER BOUND(ID), 66 ms] (32) typed CpxTrs (33) RewriteLemmaProof [LOWER BOUND(ID), 68 ms] (34) typed CpxTrs (35) RewriteLemmaProof [LOWER BOUND(ID), 79 ms] (36) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: cond1(true, x, y) -> cond2(gr(x, y), x, y) cond2(true, x, y) -> cond1(gr(add(x, y), 0), p(x), y) cond2(false, x, y) -> cond3(eq(x, y), x, y) cond3(true, x, y) -> cond1(gr(add(x, y), 0), p(x), y) cond3(false, x, y) -> cond1(gr(add(x, y), 0), x, p(y)) gr(0, x) -> false gr(s(x), 0) -> true gr(s(x), s(y)) -> gr(x, y) add(0, x) -> x add(s(x), y) -> s(add(x, y)) eq(0, 0) -> true eq(0, s(x)) -> false eq(s(x), 0) -> false eq(s(x), s(y)) -> eq(x, y) p(0) -> 0 p(s(x)) -> x S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (2) 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: cond1(true, x, y) -> cond2(gr(x, y), x, y) [1] cond2(true, x, y) -> cond1(gr(add(x, y), 0), p(x), y) [1] cond2(false, x, y) -> cond3(eq(x, y), x, y) [1] cond3(true, x, y) -> cond1(gr(add(x, y), 0), p(x), y) [1] cond3(false, x, y) -> cond1(gr(add(x, y), 0), x, p(y)) [1] gr(0, x) -> false [1] gr(s(x), 0) -> true [1] gr(s(x), s(y)) -> gr(x, y) [1] add(0, x) -> x [1] add(s(x), y) -> s(add(x, y)) [1] eq(0, 0) -> true [1] eq(0, s(x)) -> false [1] eq(s(x), 0) -> false [1] eq(s(x), s(y)) -> eq(x, y) [1] p(0) -> 0 [1] p(s(x)) -> x [1] Rewrite Strategy: INNERMOST ---------------------------------------- (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (4) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: cond1(true, x, y) -> cond2(gr(x, y), x, y) [1] cond2(true, x, y) -> cond1(gr(add(x, y), 0), p(x), y) [1] cond2(false, x, y) -> cond3(eq(x, y), x, y) [1] cond3(true, x, y) -> cond1(gr(add(x, y), 0), p(x), y) [1] cond3(false, x, y) -> cond1(gr(add(x, y), 0), x, p(y)) [1] gr(0, x) -> false [1] gr(s(x), 0) -> true [1] gr(s(x), s(y)) -> gr(x, y) [1] add(0, x) -> x [1] add(s(x), y) -> s(add(x, y)) [1] eq(0, 0) -> true [1] eq(0, s(x)) -> false [1] eq(s(x), 0) -> false [1] eq(s(x), s(y)) -> eq(x, y) [1] p(0) -> 0 [1] p(s(x)) -> x [1] The TRS has the following type information: cond1 :: true:false -> 0:s -> 0:s -> cond1:cond2:cond3 true :: true:false cond2 :: true:false -> 0:s -> 0:s -> cond1:cond2:cond3 gr :: 0:s -> 0:s -> true:false add :: 0:s -> 0:s -> 0:s 0 :: 0:s p :: 0:s -> 0:s false :: true:false cond3 :: true:false -> 0:s -> 0:s -> cond1:cond2:cond3 eq :: 0:s -> 0:s -> true:false s :: 0:s -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (5) 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: cond1(v0, v1, v2) -> null_cond1 [0] And the following fresh constants: null_cond1 ---------------------------------------- (6) 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: cond1(true, x, y) -> cond2(gr(x, y), x, y) [1] cond2(true, x, y) -> cond1(gr(add(x, y), 0), p(x), y) [1] cond2(false, x, y) -> cond3(eq(x, y), x, y) [1] cond3(true, x, y) -> cond1(gr(add(x, y), 0), p(x), y) [1] cond3(false, x, y) -> cond1(gr(add(x, y), 0), x, p(y)) [1] gr(0, x) -> false [1] gr(s(x), 0) -> true [1] gr(s(x), s(y)) -> gr(x, y) [1] add(0, x) -> x [1] add(s(x), y) -> s(add(x, y)) [1] eq(0, 0) -> true [1] eq(0, s(x)) -> false [1] eq(s(x), 0) -> false [1] eq(s(x), s(y)) -> eq(x, y) [1] p(0) -> 0 [1] p(s(x)) -> x [1] cond1(v0, v1, v2) -> null_cond1 [0] The TRS has the following type information: cond1 :: true:false -> 0:s -> 0:s -> null_cond1 true :: true:false cond2 :: true:false -> 0:s -> 0:s -> null_cond1 gr :: 0:s -> 0:s -> true:false add :: 0:s -> 0:s -> 0:s 0 :: 0:s p :: 0:s -> 0:s false :: true:false cond3 :: true:false -> 0:s -> 0:s -> null_cond1 eq :: 0:s -> 0:s -> true:false s :: 0:s -> 0:s null_cond1 :: null_cond1 Rewrite Strategy: INNERMOST ---------------------------------------- (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: true => 1 0 => 0 false => 0 null_cond1 => 0 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> x :|: z' = x, x >= 0, z = 0 add(z, z') -{ 1 }-> 1 + add(x, y) :|: x >= 0, y >= 0, z = 1 + x, z' = y cond1(z, z', z'') -{ 1 }-> cond2(gr(x, y), x, y) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 cond1(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 cond2(z, z', z'') -{ 1 }-> cond3(eq(x, y), x, y) :|: z' = x, z'' = y, x >= 0, y >= 0, z = 0 cond2(z, z', z'') -{ 1 }-> cond1(gr(add(x, y), 0), p(x), y) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 cond3(z, z', z'') -{ 1 }-> cond1(gr(add(x, y), 0), x, p(y)) :|: z' = x, z'' = y, x >= 0, y >= 0, z = 0 cond3(z, z', z'') -{ 1 }-> cond1(gr(add(x, y), 0), p(x), y) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 eq(z, z') -{ 1 }-> eq(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x eq(z, z') -{ 1 }-> 1 :|: z = 0, z' = 0 eq(z, z') -{ 1 }-> 0 :|: z' = 1 + x, x >= 0, z = 0 eq(z, z') -{ 1 }-> 0 :|: x >= 0, z = 1 + x, z' = 0 gr(z, z') -{ 1 }-> gr(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x gr(z, z') -{ 1 }-> 1 :|: x >= 0, z = 1 + x, z' = 0 gr(z, z') -{ 1 }-> 0 :|: z' = x, x >= 0, z = 0 p(z) -{ 1 }-> x :|: x >= 0, z = 1 + x p(z) -{ 1 }-> 0 :|: z = 0 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (9) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V1, V, V2),0,[cond1(V1, V, V2, Out)],[V1 >= 0,V >= 0,V2 >= 0]). eq(start(V1, V, V2),0,[cond2(V1, V, V2, Out)],[V1 >= 0,V >= 0,V2 >= 0]). eq(start(V1, V, V2),0,[cond3(V1, V, V2, Out)],[V1 >= 0,V >= 0,V2 >= 0]). eq(start(V1, V, V2),0,[gr(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V2),0,[add(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V2),0,[eq(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V2),0,[p(V1, Out)],[V1 >= 0]). eq(cond1(V1, V, V2, Out),1,[gr(V4, V3, Ret0),cond2(Ret0, V4, V3, Ret)],[Out = Ret,V = V4,V2 = V3,V1 = 1,V4 >= 0,V3 >= 0]). eq(cond2(V1, V, V2, Out),1,[add(V5, V6, Ret00),gr(Ret00, 0, Ret01),p(V5, Ret1),cond1(Ret01, Ret1, V6, Ret2)],[Out = Ret2,V = V5,V2 = V6,V1 = 1,V5 >= 0,V6 >= 0]). eq(cond2(V1, V, V2, Out),1,[eq(V8, V7, Ret02),cond3(Ret02, V8, V7, Ret3)],[Out = Ret3,V = V8,V2 = V7,V8 >= 0,V7 >= 0,V1 = 0]). eq(cond3(V1, V, V2, Out),1,[add(V9, V10, Ret001),gr(Ret001, 0, Ret03),p(V9, Ret11),cond1(Ret03, Ret11, V10, Ret4)],[Out = Ret4,V = V9,V2 = V10,V1 = 1,V9 >= 0,V10 >= 0]). eq(cond3(V1, V, V2, Out),1,[add(V12, V11, Ret002),gr(Ret002, 0, Ret04),p(V11, Ret21),cond1(Ret04, V12, Ret21, Ret5)],[Out = Ret5,V = V12,V2 = V11,V12 >= 0,V11 >= 0,V1 = 0]). eq(gr(V1, V, Out),1,[],[Out = 0,V = V13,V13 >= 0,V1 = 0]). eq(gr(V1, V, Out),1,[],[Out = 1,V14 >= 0,V1 = 1 + V14,V = 0]). eq(gr(V1, V, Out),1,[gr(V16, V15, Ret6)],[Out = Ret6,V = 1 + V15,V16 >= 0,V15 >= 0,V1 = 1 + V16]). eq(add(V1, V, Out),1,[],[Out = V17,V = V17,V17 >= 0,V1 = 0]). eq(add(V1, V, Out),1,[add(V19, V18, Ret12)],[Out = 1 + Ret12,V19 >= 0,V18 >= 0,V1 = 1 + V19,V = V18]). eq(eq(V1, V, Out),1,[],[Out = 1,V1 = 0,V = 0]). eq(eq(V1, V, Out),1,[],[Out = 0,V = 1 + V20,V20 >= 0,V1 = 0]). eq(eq(V1, V, Out),1,[],[Out = 0,V21 >= 0,V1 = 1 + V21,V = 0]). eq(eq(V1, V, Out),1,[eq(V22, V23, Ret7)],[Out = Ret7,V = 1 + V23,V22 >= 0,V23 >= 0,V1 = 1 + V22]). eq(p(V1, Out),1,[],[Out = 0,V1 = 0]). eq(p(V1, Out),1,[],[Out = V24,V24 >= 0,V1 = 1 + V24]). eq(cond1(V1, V, V2, Out),0,[],[Out = 0,V26 >= 0,V2 = V27,V25 >= 0,V1 = V26,V = V25,V27 >= 0]). input_output_vars(cond1(V1,V,V2,Out),[V1,V,V2],[Out]). input_output_vars(cond2(V1,V,V2,Out),[V1,V,V2],[Out]). input_output_vars(cond3(V1,V,V2,Out),[V1,V,V2],[Out]). input_output_vars(gr(V1,V,Out),[V1,V],[Out]). input_output_vars(add(V1,V,Out),[V1,V],[Out]). input_output_vars(eq(V1,V,Out),[V1,V],[Out]). input_output_vars(p(V1,Out),[V1],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [add/3] 1. recursive : [gr/3] 2. non_recursive : [p/2] 3. recursive : [eq/3] 4. recursive : [cond1/4,cond2/4,cond3/4] 5. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into add/3 1. SCC is partially evaluated into gr/3 2. SCC is partially evaluated into p/2 3. SCC is partially evaluated into eq/3 4. SCC is partially evaluated into cond1/4 5. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations add/3 * CE 11 is refined into CE [25] * CE 10 is refined into CE [26] ### Cost equations --> "Loop" of add/3 * CEs [26] --> Loop 17 * CEs [25] --> Loop 18 ### Ranking functions of CR add(V1,V,Out) * RF of phase [18]: [V1] #### Partial ranking functions of CR add(V1,V,Out) * Partial RF of phase [18]: - RF of loop [18:1]: V1 ### Specialization of cost equations gr/3 * CE 14 is refined into CE [27] * CE 13 is refined into CE [28] * CE 12 is refined into CE [29] ### Cost equations --> "Loop" of gr/3 * CEs [28] --> Loop 19 * CEs [29] --> Loop 20 * CEs [27] --> Loop 21 ### Ranking functions of CR gr(V1,V,Out) * RF of phase [21]: [V,V1] #### Partial ranking functions of CR gr(V1,V,Out) * Partial RF of phase [21]: - RF of loop [21:1]: V V1 ### Specialization of cost equations p/2 * CE 16 is refined into CE [30] * CE 15 is refined into CE [31] ### Cost equations --> "Loop" of p/2 * CEs [30] --> Loop 22 * CEs [31] --> Loop 23 ### Ranking functions of CR p(V1,Out) #### Partial ranking functions of CR p(V1,Out) ### Specialization of cost equations eq/3 * CE 24 is refined into CE [32] * CE 23 is refined into CE [33] * CE 22 is refined into CE [34] * CE 21 is refined into CE [35] ### Cost equations --> "Loop" of eq/3 * CEs [33] --> Loop 24 * CEs [34] --> Loop 25 * CEs [35] --> Loop 26 * CEs [32] --> Loop 27 ### Ranking functions of CR eq(V1,V,Out) * RF of phase [27]: [V,V1] #### Partial ranking functions of CR eq(V1,V,Out) * Partial RF of phase [27]: - RF of loop [27:1]: V V1 ### Specialization of cost equations cond1/4 * CE 20 is refined into CE [36] * CE 17 is refined into CE [37,38] * CE 18 is refined into CE [39,40] * CE 19 is refined into CE [41,42] ### Cost equations --> "Loop" of cond1/4 * CEs [42] --> Loop 28 * CEs [38] --> Loop 29 * CEs [40] --> Loop 30 * CEs [37] --> Loop 31 * CEs [41] --> Loop 32 * CEs [39] --> Loop 33 * CEs [36] --> Loop 34 ### Ranking functions of CR cond1(V1,V,V2,Out) * RF of phase [28,30]: [V+V2-1] * RF of phase [29]: [V-1,V-V2] * RF of phase [31]: [V] * RF of phase [32]: [V2] #### Partial ranking functions of CR cond1(V1,V,V2,Out) * Partial RF of phase [28,30]: - RF of loop [28:1]: -V+V2 depends on loops [30:1] V2-1 - RF of loop [30:1]: V V-V2+1 depends on loops [28:1] * Partial RF of phase [29]: - RF of loop [29:1]: V-1 V-V2 * Partial RF of phase [31]: - RF of loop [31:1]: V * Partial RF of phase [32]: - RF of loop [32:1]: V2 ### Specialization of cost equations start/3 * CE 1 is refined into CE [43,44,45,46,47,48,49,50] * CE 2 is refined into CE [51,52,53,54] * CE 3 is refined into CE [55,56,57,58,59,60,61,62,63] * CE 4 is refined into CE [64,65,66,67,68,69,70,71,72] * CE 5 is refined into CE [73,74,75,76,77] * CE 6 is refined into CE [78,79,80,81] * CE 7 is refined into CE [82,83] * CE 8 is refined into CE [84,85,86,87,88,89] * CE 9 is refined into CE [90,91] ### Cost equations --> "Loop" of start/3 * CEs [89] --> Loop 35 * CEs [48,75] --> Loop 36 * CEs [46,47,49,50,76,77] --> Loop 37 * CEs [44,45,73,74] --> Loop 38 * CEs [43,79,80,81,83,86,87,88,91] --> Loop 39 * CEs [51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,78,82,84,85,90] --> Loop 40 ### Ranking functions of CR start(V1,V,V2) #### Partial ranking functions of CR start(V1,V,V2) Computing Bounds ===================================== #### Cost of chains of add(V1,V,Out): * Chain [[18],17]: 1*it(18)+1 Such that:it(18) =< -V+Out with precondition: [V+V1=Out,V1>=1,V>=0] * Chain [17]: 1 with precondition: [V1=0,V=Out,V>=0] #### Cost of chains of gr(V1,V,Out): * Chain [[21],20]: 1*it(21)+1 Such that:it(21) =< V1 with precondition: [Out=0,V1>=1,V>=V1] * Chain [[21],19]: 1*it(21)+1 Such that:it(21) =< V with precondition: [Out=1,V>=1,V1>=V+1] * Chain [20]: 1 with precondition: [V1=0,Out=0,V>=0] * Chain [19]: 1 with precondition: [V=0,Out=1,V1>=1] #### Cost of chains of p(V1,Out): * Chain [23]: 1 with precondition: [V1=0,Out=0] * Chain [22]: 1 with precondition: [V1=Out+1,V1>=1] #### Cost of chains of eq(V1,V,Out): * Chain [[27],26]: 1*it(27)+1 Such that:it(27) =< V1 with precondition: [Out=1,V1=V,V1>=1] * Chain [[27],25]: 1*it(27)+1 Such that:it(27) =< V1 with precondition: [Out=0,V1>=1,V>=V1+1] * Chain [[27],24]: 1*it(27)+1 Such that:it(27) =< V with precondition: [Out=0,V>=1,V1>=V+1] * Chain [26]: 1 with precondition: [V1=0,V=0,Out=1] * Chain [25]: 1 with precondition: [V1=0,Out=0,V>=1] * Chain [24]: 1 with precondition: [V=0,Out=0,V1>=1] #### Cost of chains of cond1(V1,V,V2,Out): * Chain [[32],34]: 8*it(32)+0 Such that:it(32) =< V2 with precondition: [V1=1,V=0,Out=0,V2>=1] * Chain [[32],33,34]: 8*it(32)+8 Such that:it(32) =< V2 with precondition: [V1=1,V=0,Out=0,V2>=1] * Chain [[31],34]: 6*it(31)+1*s(3)+0 Such that:aux(3) =< V it(31) =< aux(3) s(3) =< it(31)*aux(3) with precondition: [V1=1,V2=0,Out=0,V>=1] * Chain [[31],33,34]: 6*it(31)+1*s(3)+8 Such that:aux(4) =< V it(31) =< aux(4) s(3) =< it(31)*aux(4) with precondition: [V1=1,V2=0,Out=0,V>=1] * Chain [[29],[28,30],[32],34]: 16*it(28)+6*it(29)+8*it(32)+3*s(14)+3*s(16)+1*s(22)+1*s(23)+0 Such that:aux(20) =< V it(29) =< V-V2 aux(17) =< 2*V2 aux(21) =< V2 it(28) =< aux(21) it(32) =< aux(17) it(28) =< aux(17) s(17) =< it(28)*aux(17) s(15) =< it(28)*aux(21) s(16) =< s(17) s(14) =< s(15) it(29) =< aux(20) s(22) =< it(29)*aux(21) s(23) =< it(29)*aux(20) with precondition: [V1=1,Out=0,V2>=1,V>=V2+1] * Chain [[29],[28,30],[32],33,34]: 16*it(28)+6*it(29)+8*it(32)+3*s(14)+3*s(16)+1*s(22)+1*s(23)+8 Such that:aux(20) =< V it(29) =< V-V2 aux(23) =< 2*V2 aux(24) =< V2 it(28) =< aux(24) it(32) =< aux(23) it(28) =< aux(23) s(17) =< it(28)*aux(23) s(15) =< it(28)*aux(24) s(16) =< s(17) s(14) =< s(15) it(29) =< aux(20) s(22) =< it(29)*aux(24) s(23) =< it(29)*aux(20) with precondition: [V1=1,Out=0,V2>=1,V>=V2+1] * Chain [[29],[28,30],34]: 16*it(28)+6*it(29)+3*s(14)+3*s(16)+1*s(22)+1*s(23)+0 Such that:aux(20) =< V it(29) =< V-V2 aux(26) =< 2*V2 aux(27) =< V2 it(28) =< aux(27) it(28) =< aux(26) s(17) =< it(28)*aux(26) s(15) =< it(28)*aux(27) s(16) =< s(17) s(14) =< s(15) it(29) =< aux(20) s(22) =< it(29)*aux(27) s(23) =< it(29)*aux(20) with precondition: [V1=1,Out=0,V2>=1,V>=V2+1] * Chain [[29],34]: 6*it(29)+1*s(22)+1*s(23)+0 Such that:aux(20) =< V it(29) =< V-V2 aux(19) =< V2 it(29) =< aux(20) s(22) =< it(29)*aux(19) s(23) =< it(29)*aux(20) with precondition: [V1=1,Out=0,V2>=1,V>=V2+1] * Chain [[28,30],[32],34]: 8*it(28)+8*it(30)+8*it(32)+3*s(14)+3*s(16)+0 Such that:it(28) =< V2 aux(16) =< V aux(17) =< V+V2 it(30) =< aux(16) it(32) =< aux(17) it(28) =< aux(17) it(30) =< aux(17) s(17) =< it(30)*aux(17) s(15) =< it(28)*aux(16) s(16) =< s(17) s(14) =< s(15) with precondition: [V1=1,Out=0,V>=1,V2>=V] * Chain [[28,30],[32],33,34]: 8*it(28)+8*it(30)+8*it(32)+3*s(14)+3*s(16)+8 Such that:it(28) =< V2 aux(22) =< V aux(23) =< V+V2 it(30) =< aux(22) it(32) =< aux(23) it(28) =< aux(23) it(30) =< aux(23) s(17) =< it(30)*aux(23) s(15) =< it(28)*aux(22) s(16) =< s(17) s(14) =< s(15) with precondition: [V1=1,Out=0,V>=1,V2>=V] * Chain [[28,30],34]: 8*it(28)+8*it(30)+3*s(14)+3*s(16)+0 Such that:it(28) =< V2 aux(25) =< V aux(26) =< V+V2 it(30) =< aux(25) it(28) =< aux(26) it(30) =< aux(26) s(17) =< it(30)*aux(26) s(15) =< it(28)*aux(25) s(16) =< s(17) s(14) =< s(15) with precondition: [V1=1,Out=0,V>=1,V2>=V] * Chain [34]: 0 with precondition: [Out=0,V1>=0,V>=0,V2>=0] * Chain [33,34]: 8 with precondition: [V1=1,V=0,V2=0,Out=0] #### Cost of chains of start(V1,V,V2): * Chain [40]: 38*s(98)+19*s(100)+144*s(109)+27*s(113)+27*s(114)+48*s(115)+63*s(118)+8*s(122)+48*s(130)+48*s(131)+18*s(134)+18*s(135)+32*s(136)+48*s(150)+8*s(151)+8*s(152)+14 Such that:aux(50) =< 1 aux(51) =< V aux(52) =< V-V2+1 aux(53) =< V+V2 aux(54) =< V2 aux(55) =< 2*V2 s(100) =< aux(50) s(118) =< aux(51) s(98) =< aux(54) s(122) =< s(118)*aux(51) s(150) =< aux(52) s(150) =< aux(51) s(151) =< s(150)*aux(54) s(152) =< s(150)*aux(51) s(109) =< aux(54) s(109) =< aux(55) s(111) =< s(109)*aux(55) s(112) =< s(109)*aux(54) s(113) =< s(111) s(114) =< s(112) s(115) =< aux(55) s(130) =< aux(54) s(131) =< aux(51) s(130) =< aux(53) s(131) =< aux(53) s(132) =< s(131)*aux(53) s(133) =< s(130)*aux(51) s(134) =< s(132) s(135) =< s(133) s(136) =< aux(53) with precondition: [V1=0] * Chain [39]: 3*s(196)+2*s(197)+12 Such that:aux(56) =< V1 aux(57) =< V s(196) =< aux(56) s(197) =< aux(57) with precondition: [V1>=1] * Chain [38]: 32*s(202)+12 Such that:aux(58) =< V2 s(202) =< aux(58) with precondition: [V1>=0,V>=0,V2>=0] * Chain [37]: 3*s(205)+1*s(206)+16*s(208)+48*s(213)+48*s(214)+18*s(217)+18*s(218)+32*s(219)+48*s(225)+8*s(226)+8*s(227)+96*s(228)+18*s(231)+18*s(232)+32*s(233)+12 Such that:s(206) =< 1 aux(61) =< V aux(62) =< V-V2 aux(63) =< V+V2 aux(64) =< V2 aux(65) =< 2*V2 s(205) =< aux(61) s(208) =< aux(64) s(213) =< aux(64) s(214) =< aux(61) s(213) =< aux(63) s(214) =< aux(63) s(215) =< s(214)*aux(63) s(216) =< s(213)*aux(61) s(217) =< s(215) s(218) =< s(216) s(219) =< aux(63) s(225) =< aux(62) s(225) =< aux(61) s(226) =< s(225)*aux(64) s(227) =< s(225)*aux(61) s(228) =< aux(64) s(228) =< aux(65) s(229) =< s(228)*aux(65) s(230) =< s(228)*aux(64) s(231) =< s(229) s(232) =< s(230) s(233) =< aux(65) with precondition: [V1=1,V>=1,V2>=0] * Chain [36]: 25*s(257)+4*s(260)+12 Such that:aux(67) =< V s(257) =< aux(67) s(260) =< s(257)*aux(67) with precondition: [V1=1,V2=0,V>=1] * Chain [35]: 1*s(264)+1 Such that:s(264) =< V with precondition: [V1=V,V1>=1] Closed-form bounds of start(V1,V,V2): ------------------------------------- * Chain [40] with precondition: [V1=0] - Upper bound: nat(V)*111+33+nat(V)*8*nat(V)+nat(V)*18*nat(V2)+nat(V)*18*nat(V+V2)+nat(V)*8*nat(V-V2+1)+nat(V2)*230+nat(V2)*27*nat(V2)+nat(V2)*27*nat(2*V2)+nat(V2)*8*nat(V-V2+1)+nat(2*V2)*48+nat(V+V2)*32+nat(V-V2+1)*48 - Complexity: n^2 * Chain [39] with precondition: [V1>=1] - Upper bound: 3*V1+12+nat(V)*2 - Complexity: n * Chain [38] with precondition: [V1>=0,V>=0,V2>=0] - Upper bound: 32*V2+12 - Complexity: n * Chain [37] with precondition: [V1=1,V>=1,V2>=0] - Upper bound: 51*V+13+18*V*V2+(V+V2)*(18*V)+8*V*nat(V-V2)+160*V2+18*V2*V2+18*V2*(2*V2)+8*V2*nat(V-V2)+64*V2+(32*V+32*V2)+nat(V-V2)*48 - Complexity: n^2 * Chain [36] with precondition: [V1=1,V2=0,V>=1] - Upper bound: 25*V+12+4*V*V - Complexity: n^2 * Chain [35] with precondition: [V1=V,V1>=1] - Upper bound: V+1 - Complexity: n ### Maximum cost of start(V1,V,V2): max([nat(V2)*32+11,nat(V)+11+max([3*V1,nat(V)*23+max([nat(V)*4*nat(V),nat(V)*26+1+nat(V)*18*nat(V2)+nat(V)*18*nat(V+V2)+nat(V2)*160+nat(V2)*18*nat(V2)+nat(V2)*18*nat(2*V2)+nat(2*V2)*32+nat(V+V2)*32+max([nat(V2)*8*nat(V-V2)+nat(V)*8*nat(V-V2)+nat(V-V2)*48,nat(V)*60+20+nat(V)*8*nat(V)+nat(V)*8*nat(V-V2+1)+nat(V2)*70+nat(V2)*9*nat(V2)+nat(V2)*9*nat(2*V2)+nat(V2)*8*nat(V-V2+1)+nat(2*V2)*16+nat(V-V2+1)*48])])])+nat(V)])+1 Asymptotic class: n^2 * Total analysis performed in 972 ms. ---------------------------------------- (10) BOUNDS(1, n^2) ---------------------------------------- (11) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules: cond1(true, z0, z1) -> cond2(gr(z0, z1), z0, z1) cond2(true, z0, z1) -> cond1(gr(add(z0, z1), 0), p(z0), z1) cond2(false, z0, z1) -> cond3(eq(z0, z1), z0, z1) cond3(true, z0, z1) -> cond1(gr(add(z0, z1), 0), p(z0), z1) cond3(false, z0, z1) -> cond1(gr(add(z0, z1), 0), z0, p(z1)) gr(0, z0) -> false gr(s(z0), 0) -> true gr(s(z0), s(z1)) -> gr(z0, z1) add(0, z0) -> z0 add(s(z0), z1) -> s(add(z0, z1)) eq(0, 0) -> true eq(0, s(z0)) -> false eq(s(z0), 0) -> false eq(s(z0), s(z1)) -> eq(z0, z1) p(0) -> 0 p(s(z0)) -> z0 Tuples: COND1(true, z0, z1) -> c(COND2(gr(z0, z1), z0, z1), GR(z0, z1)) COND2(true, z0, z1) -> c1(COND1(gr(add(z0, z1), 0), p(z0), z1), GR(add(z0, z1), 0), ADD(z0, z1)) COND2(true, z0, z1) -> c2(COND1(gr(add(z0, z1), 0), p(z0), z1), P(z0)) COND2(false, z0, z1) -> c3(COND3(eq(z0, z1), z0, z1), EQ(z0, z1)) COND3(true, z0, z1) -> c4(COND1(gr(add(z0, z1), 0), p(z0), z1), GR(add(z0, z1), 0), ADD(z0, z1)) COND3(true, z0, z1) -> c5(COND1(gr(add(z0, z1), 0), p(z0), z1), P(z0)) COND3(false, z0, z1) -> c6(COND1(gr(add(z0, z1), 0), z0, p(z1)), GR(add(z0, z1), 0), ADD(z0, z1)) COND3(false, z0, z1) -> c7(COND1(gr(add(z0, z1), 0), z0, p(z1)), P(z1)) GR(0, z0) -> c8 GR(s(z0), 0) -> c9 GR(s(z0), s(z1)) -> c10(GR(z0, z1)) ADD(0, z0) -> c11 ADD(s(z0), z1) -> c12(ADD(z0, z1)) EQ(0, 0) -> c13 EQ(0, s(z0)) -> c14 EQ(s(z0), 0) -> c15 EQ(s(z0), s(z1)) -> c16(EQ(z0, z1)) P(0) -> c17 P(s(z0)) -> c18 S tuples: COND1(true, z0, z1) -> c(COND2(gr(z0, z1), z0, z1), GR(z0, z1)) COND2(true, z0, z1) -> c1(COND1(gr(add(z0, z1), 0), p(z0), z1), GR(add(z0, z1), 0), ADD(z0, z1)) COND2(true, z0, z1) -> c2(COND1(gr(add(z0, z1), 0), p(z0), z1), P(z0)) COND2(false, z0, z1) -> c3(COND3(eq(z0, z1), z0, z1), EQ(z0, z1)) COND3(true, z0, z1) -> c4(COND1(gr(add(z0, z1), 0), p(z0), z1), GR(add(z0, z1), 0), ADD(z0, z1)) COND3(true, z0, z1) -> c5(COND1(gr(add(z0, z1), 0), p(z0), z1), P(z0)) COND3(false, z0, z1) -> c6(COND1(gr(add(z0, z1), 0), z0, p(z1)), GR(add(z0, z1), 0), ADD(z0, z1)) COND3(false, z0, z1) -> c7(COND1(gr(add(z0, z1), 0), z0, p(z1)), P(z1)) GR(0, z0) -> c8 GR(s(z0), 0) -> c9 GR(s(z0), s(z1)) -> c10(GR(z0, z1)) ADD(0, z0) -> c11 ADD(s(z0), z1) -> c12(ADD(z0, z1)) EQ(0, 0) -> c13 EQ(0, s(z0)) -> c14 EQ(s(z0), 0) -> c15 EQ(s(z0), s(z1)) -> c16(EQ(z0, z1)) P(0) -> c17 P(s(z0)) -> c18 K tuples:none Defined Rule Symbols: cond1_3, cond2_3, cond3_3, gr_2, add_2, eq_2, p_1 Defined Pair Symbols: COND1_3, COND2_3, COND3_3, GR_2, ADD_2, EQ_2, P_1 Compound Symbols: c_2, c1_3, c2_2, c3_2, c4_3, c5_2, c6_3, c7_2, c8, c9, c10_1, c11, c12_1, c13, c14, c15, c16_1, c17, c18 ---------------------------------------- (13) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (14) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: COND1(true, z0, z1) -> c(COND2(gr(z0, z1), z0, z1), GR(z0, z1)) COND2(true, z0, z1) -> c1(COND1(gr(add(z0, z1), 0), p(z0), z1), GR(add(z0, z1), 0), ADD(z0, z1)) COND2(true, z0, z1) -> c2(COND1(gr(add(z0, z1), 0), p(z0), z1), P(z0)) COND2(false, z0, z1) -> c3(COND3(eq(z0, z1), z0, z1), EQ(z0, z1)) COND3(true, z0, z1) -> c4(COND1(gr(add(z0, z1), 0), p(z0), z1), GR(add(z0, z1), 0), ADD(z0, z1)) COND3(true, z0, z1) -> c5(COND1(gr(add(z0, z1), 0), p(z0), z1), P(z0)) COND3(false, z0, z1) -> c6(COND1(gr(add(z0, z1), 0), z0, p(z1)), GR(add(z0, z1), 0), ADD(z0, z1)) COND3(false, z0, z1) -> c7(COND1(gr(add(z0, z1), 0), z0, p(z1)), P(z1)) GR(0, z0) -> c8 GR(s(z0), 0) -> c9 GR(s(z0), s(z1)) -> c10(GR(z0, z1)) ADD(0, z0) -> c11 ADD(s(z0), z1) -> c12(ADD(z0, z1)) EQ(0, 0) -> c13 EQ(0, s(z0)) -> c14 EQ(s(z0), 0) -> c15 EQ(s(z0), s(z1)) -> c16(EQ(z0, z1)) P(0) -> c17 P(s(z0)) -> c18 The (relative) TRS S consists of the following rules: cond1(true, z0, z1) -> cond2(gr(z0, z1), z0, z1) cond2(true, z0, z1) -> cond1(gr(add(z0, z1), 0), p(z0), z1) cond2(false, z0, z1) -> cond3(eq(z0, z1), z0, z1) cond3(true, z0, z1) -> cond1(gr(add(z0, z1), 0), p(z0), z1) cond3(false, z0, z1) -> cond1(gr(add(z0, z1), 0), z0, p(z1)) gr(0, z0) -> false gr(s(z0), 0) -> true gr(s(z0), s(z1)) -> gr(z0, z1) add(0, z0) -> z0 add(s(z0), z1) -> s(add(z0, z1)) eq(0, 0) -> true eq(0, s(z0)) -> false eq(s(z0), 0) -> false eq(s(z0), s(z1)) -> eq(z0, z1) p(0) -> 0 p(s(z0)) -> z0 Rewrite Strategy: INNERMOST ---------------------------------------- (15) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (16) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: COND1(true, z0, z1) -> c(COND2(gr(z0, z1), z0, z1), GR(z0, z1)) COND2(true, z0, z1) -> c1(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND2(true, z0, z1) -> c2(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND2(false, z0, z1) -> c3(COND3(eq(z0, z1), z0, z1), EQ(z0, z1)) COND3(true, z0, z1) -> c4(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(true, z0, z1) -> c5(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND3(false, z0, z1) -> c6(COND1(gr(add(z0, z1), 0'), z0, p(z1)), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(false, z0, z1) -> c7(COND1(gr(add(z0, z1), 0'), z0, p(z1)), P(z1)) GR(0', z0) -> c8 GR(s(z0), 0') -> c9 GR(s(z0), s(z1)) -> c10(GR(z0, z1)) ADD(0', z0) -> c11 ADD(s(z0), z1) -> c12(ADD(z0, z1)) EQ(0', 0') -> c13 EQ(0', s(z0)) -> c14 EQ(s(z0), 0') -> c15 EQ(s(z0), s(z1)) -> c16(EQ(z0, z1)) P(0') -> c17 P(s(z0)) -> c18 The (relative) TRS S consists of the following rules: cond1(true, z0, z1) -> cond2(gr(z0, z1), z0, z1) cond2(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond2(false, z0, z1) -> cond3(eq(z0, z1), z0, z1) cond3(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond3(false, z0, z1) -> cond1(gr(add(z0, z1), 0'), z0, p(z1)) gr(0', z0) -> false gr(s(z0), 0') -> true gr(s(z0), s(z1)) -> gr(z0, z1) add(0', z0) -> z0 add(s(z0), z1) -> s(add(z0, z1)) eq(0', 0') -> true eq(0', s(z0)) -> false eq(s(z0), 0') -> false eq(s(z0), s(z1)) -> eq(z0, z1) p(0') -> 0' p(s(z0)) -> z0 Rewrite Strategy: INNERMOST ---------------------------------------- (17) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (18) Obligation: Innermost TRS: Rules: COND1(true, z0, z1) -> c(COND2(gr(z0, z1), z0, z1), GR(z0, z1)) COND2(true, z0, z1) -> c1(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND2(true, z0, z1) -> c2(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND2(false, z0, z1) -> c3(COND3(eq(z0, z1), z0, z1), EQ(z0, z1)) COND3(true, z0, z1) -> c4(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(true, z0, z1) -> c5(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND3(false, z0, z1) -> c6(COND1(gr(add(z0, z1), 0'), z0, p(z1)), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(false, z0, z1) -> c7(COND1(gr(add(z0, z1), 0'), z0, p(z1)), P(z1)) GR(0', z0) -> c8 GR(s(z0), 0') -> c9 GR(s(z0), s(z1)) -> c10(GR(z0, z1)) ADD(0', z0) -> c11 ADD(s(z0), z1) -> c12(ADD(z0, z1)) EQ(0', 0') -> c13 EQ(0', s(z0)) -> c14 EQ(s(z0), 0') -> c15 EQ(s(z0), s(z1)) -> c16(EQ(z0, z1)) P(0') -> c17 P(s(z0)) -> c18 cond1(true, z0, z1) -> cond2(gr(z0, z1), z0, z1) cond2(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond2(false, z0, z1) -> cond3(eq(z0, z1), z0, z1) cond3(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond3(false, z0, z1) -> cond1(gr(add(z0, z1), 0'), z0, p(z1)) gr(0', z0) -> false gr(s(z0), 0') -> true gr(s(z0), s(z1)) -> gr(z0, z1) add(0', z0) -> z0 add(s(z0), z1) -> s(add(z0, z1)) eq(0', 0') -> true eq(0', s(z0)) -> false eq(s(z0), 0') -> false eq(s(z0), s(z1)) -> eq(z0, z1) p(0') -> 0' p(s(z0)) -> z0 Types: COND1 :: true:false -> 0':s -> 0':s -> c true :: true:false c :: c1:c2:c3 -> c8:c9:c10 -> c COND2 :: true:false -> 0':s -> 0':s -> c1:c2:c3 gr :: 0':s -> 0':s -> true:false GR :: 0':s -> 0':s -> c8:c9:c10 c1 :: c -> c8:c9:c10 -> c11:c12 -> c1:c2:c3 add :: 0':s -> 0':s -> 0':s 0' :: 0':s p :: 0':s -> 0':s ADD :: 0':s -> 0':s -> c11:c12 c2 :: c -> c17:c18 -> c1:c2:c3 P :: 0':s -> c17:c18 false :: true:false c3 :: c4:c5:c6:c7 -> c13:c14:c15:c16 -> c1:c2:c3 COND3 :: true:false -> 0':s -> 0':s -> c4:c5:c6:c7 eq :: 0':s -> 0':s -> true:false EQ :: 0':s -> 0':s -> c13:c14:c15:c16 c4 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c5 :: c -> c17:c18 -> c4:c5:c6:c7 c6 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c7 :: c -> c17:c18 -> c4:c5:c6:c7 c8 :: c8:c9:c10 s :: 0':s -> 0':s c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 c13 :: c13:c14:c15:c16 c14 :: c13:c14:c15:c16 c15 :: c13:c14:c15:c16 c16 :: c13:c14:c15:c16 -> c13:c14:c15:c16 c17 :: c17:c18 c18 :: c17:c18 cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond3 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 hole_c1_19 :: c hole_true:false2_19 :: true:false hole_0':s3_19 :: 0':s hole_c1:c2:c34_19 :: c1:c2:c3 hole_c8:c9:c105_19 :: c8:c9:c10 hole_c11:c126_19 :: c11:c12 hole_c17:c187_19 :: c17:c18 hole_c4:c5:c6:c78_19 :: c4:c5:c6:c7 hole_c13:c14:c15:c169_19 :: c13:c14:c15:c16 hole_cond1:cond2:cond310_19 :: cond1:cond2:cond3 gen_0':s11_19 :: Nat -> 0':s gen_c8:c9:c1012_19 :: Nat -> c8:c9:c10 gen_c11:c1213_19 :: Nat -> c11:c12 gen_c13:c14:c15:c1614_19 :: Nat -> c13:c14:c15:c16 ---------------------------------------- (19) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: COND1, COND2, gr, GR, add, ADD, COND3, eq, EQ, cond1, cond2, cond3 They will be analysed ascendingly in the following order: COND1 = COND2 gr < COND1 GR < COND1 COND1 = COND3 gr < COND2 GR < COND2 add < COND2 ADD < COND2 COND2 = COND3 eq < COND2 EQ < COND2 gr < COND3 gr < cond1 gr < cond2 gr < cond3 GR < COND3 add < COND3 add < cond2 add < cond3 ADD < COND3 eq < cond2 cond1 = cond2 cond1 = cond3 cond2 = cond3 ---------------------------------------- (20) Obligation: Innermost TRS: Rules: COND1(true, z0, z1) -> c(COND2(gr(z0, z1), z0, z1), GR(z0, z1)) COND2(true, z0, z1) -> c1(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND2(true, z0, z1) -> c2(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND2(false, z0, z1) -> c3(COND3(eq(z0, z1), z0, z1), EQ(z0, z1)) COND3(true, z0, z1) -> c4(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(true, z0, z1) -> c5(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND3(false, z0, z1) -> c6(COND1(gr(add(z0, z1), 0'), z0, p(z1)), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(false, z0, z1) -> c7(COND1(gr(add(z0, z1), 0'), z0, p(z1)), P(z1)) GR(0', z0) -> c8 GR(s(z0), 0') -> c9 GR(s(z0), s(z1)) -> c10(GR(z0, z1)) ADD(0', z0) -> c11 ADD(s(z0), z1) -> c12(ADD(z0, z1)) EQ(0', 0') -> c13 EQ(0', s(z0)) -> c14 EQ(s(z0), 0') -> c15 EQ(s(z0), s(z1)) -> c16(EQ(z0, z1)) P(0') -> c17 P(s(z0)) -> c18 cond1(true, z0, z1) -> cond2(gr(z0, z1), z0, z1) cond2(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond2(false, z0, z1) -> cond3(eq(z0, z1), z0, z1) cond3(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond3(false, z0, z1) -> cond1(gr(add(z0, z1), 0'), z0, p(z1)) gr(0', z0) -> false gr(s(z0), 0') -> true gr(s(z0), s(z1)) -> gr(z0, z1) add(0', z0) -> z0 add(s(z0), z1) -> s(add(z0, z1)) eq(0', 0') -> true eq(0', s(z0)) -> false eq(s(z0), 0') -> false eq(s(z0), s(z1)) -> eq(z0, z1) p(0') -> 0' p(s(z0)) -> z0 Types: COND1 :: true:false -> 0':s -> 0':s -> c true :: true:false c :: c1:c2:c3 -> c8:c9:c10 -> c COND2 :: true:false -> 0':s -> 0':s -> c1:c2:c3 gr :: 0':s -> 0':s -> true:false GR :: 0':s -> 0':s -> c8:c9:c10 c1 :: c -> c8:c9:c10 -> c11:c12 -> c1:c2:c3 add :: 0':s -> 0':s -> 0':s 0' :: 0':s p :: 0':s -> 0':s ADD :: 0':s -> 0':s -> c11:c12 c2 :: c -> c17:c18 -> c1:c2:c3 P :: 0':s -> c17:c18 false :: true:false c3 :: c4:c5:c6:c7 -> c13:c14:c15:c16 -> c1:c2:c3 COND3 :: true:false -> 0':s -> 0':s -> c4:c5:c6:c7 eq :: 0':s -> 0':s -> true:false EQ :: 0':s -> 0':s -> c13:c14:c15:c16 c4 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c5 :: c -> c17:c18 -> c4:c5:c6:c7 c6 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c7 :: c -> c17:c18 -> c4:c5:c6:c7 c8 :: c8:c9:c10 s :: 0':s -> 0':s c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 c13 :: c13:c14:c15:c16 c14 :: c13:c14:c15:c16 c15 :: c13:c14:c15:c16 c16 :: c13:c14:c15:c16 -> c13:c14:c15:c16 c17 :: c17:c18 c18 :: c17:c18 cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond3 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 hole_c1_19 :: c hole_true:false2_19 :: true:false hole_0':s3_19 :: 0':s hole_c1:c2:c34_19 :: c1:c2:c3 hole_c8:c9:c105_19 :: c8:c9:c10 hole_c11:c126_19 :: c11:c12 hole_c17:c187_19 :: c17:c18 hole_c4:c5:c6:c78_19 :: c4:c5:c6:c7 hole_c13:c14:c15:c169_19 :: c13:c14:c15:c16 hole_cond1:cond2:cond310_19 :: cond1:cond2:cond3 gen_0':s11_19 :: Nat -> 0':s gen_c8:c9:c1012_19 :: Nat -> c8:c9:c10 gen_c11:c1213_19 :: Nat -> c11:c12 gen_c13:c14:c15:c1614_19 :: Nat -> c13:c14:c15:c16 Generator Equations: gen_0':s11_19(0) <=> 0' gen_0':s11_19(+(x, 1)) <=> s(gen_0':s11_19(x)) gen_c8:c9:c1012_19(0) <=> c8 gen_c8:c9:c1012_19(+(x, 1)) <=> c10(gen_c8:c9:c1012_19(x)) gen_c11:c1213_19(0) <=> c11 gen_c11:c1213_19(+(x, 1)) <=> c12(gen_c11:c1213_19(x)) gen_c13:c14:c15:c1614_19(0) <=> c13 gen_c13:c14:c15:c1614_19(+(x, 1)) <=> c16(gen_c13:c14:c15:c1614_19(x)) The following defined symbols remain to be analysed: gr, COND1, COND2, GR, add, ADD, COND3, eq, EQ, cond1, cond2, cond3 They will be analysed ascendingly in the following order: COND1 = COND2 gr < COND1 GR < COND1 COND1 = COND3 gr < COND2 GR < COND2 add < COND2 ADD < COND2 COND2 = COND3 eq < COND2 EQ < COND2 gr < COND3 gr < cond1 gr < cond2 gr < cond3 GR < COND3 add < COND3 add < cond2 add < cond3 ADD < COND3 eq < cond2 cond1 = cond2 cond1 = cond3 cond2 = cond3 ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: gr(gen_0':s11_19(n16_19), gen_0':s11_19(n16_19)) -> false, rt in Omega(0) Induction Base: gr(gen_0':s11_19(0), gen_0':s11_19(0)) ->_R^Omega(0) false Induction Step: gr(gen_0':s11_19(+(n16_19, 1)), gen_0':s11_19(+(n16_19, 1))) ->_R^Omega(0) gr(gen_0':s11_19(n16_19), gen_0':s11_19(n16_19)) ->_IH false We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (22) Obligation: Innermost TRS: Rules: COND1(true, z0, z1) -> c(COND2(gr(z0, z1), z0, z1), GR(z0, z1)) COND2(true, z0, z1) -> c1(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND2(true, z0, z1) -> c2(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND2(false, z0, z1) -> c3(COND3(eq(z0, z1), z0, z1), EQ(z0, z1)) COND3(true, z0, z1) -> c4(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(true, z0, z1) -> c5(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND3(false, z0, z1) -> c6(COND1(gr(add(z0, z1), 0'), z0, p(z1)), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(false, z0, z1) -> c7(COND1(gr(add(z0, z1), 0'), z0, p(z1)), P(z1)) GR(0', z0) -> c8 GR(s(z0), 0') -> c9 GR(s(z0), s(z1)) -> c10(GR(z0, z1)) ADD(0', z0) -> c11 ADD(s(z0), z1) -> c12(ADD(z0, z1)) EQ(0', 0') -> c13 EQ(0', s(z0)) -> c14 EQ(s(z0), 0') -> c15 EQ(s(z0), s(z1)) -> c16(EQ(z0, z1)) P(0') -> c17 P(s(z0)) -> c18 cond1(true, z0, z1) -> cond2(gr(z0, z1), z0, z1) cond2(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond2(false, z0, z1) -> cond3(eq(z0, z1), z0, z1) cond3(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond3(false, z0, z1) -> cond1(gr(add(z0, z1), 0'), z0, p(z1)) gr(0', z0) -> false gr(s(z0), 0') -> true gr(s(z0), s(z1)) -> gr(z0, z1) add(0', z0) -> z0 add(s(z0), z1) -> s(add(z0, z1)) eq(0', 0') -> true eq(0', s(z0)) -> false eq(s(z0), 0') -> false eq(s(z0), s(z1)) -> eq(z0, z1) p(0') -> 0' p(s(z0)) -> z0 Types: COND1 :: true:false -> 0':s -> 0':s -> c true :: true:false c :: c1:c2:c3 -> c8:c9:c10 -> c COND2 :: true:false -> 0':s -> 0':s -> c1:c2:c3 gr :: 0':s -> 0':s -> true:false GR :: 0':s -> 0':s -> c8:c9:c10 c1 :: c -> c8:c9:c10 -> c11:c12 -> c1:c2:c3 add :: 0':s -> 0':s -> 0':s 0' :: 0':s p :: 0':s -> 0':s ADD :: 0':s -> 0':s -> c11:c12 c2 :: c -> c17:c18 -> c1:c2:c3 P :: 0':s -> c17:c18 false :: true:false c3 :: c4:c5:c6:c7 -> c13:c14:c15:c16 -> c1:c2:c3 COND3 :: true:false -> 0':s -> 0':s -> c4:c5:c6:c7 eq :: 0':s -> 0':s -> true:false EQ :: 0':s -> 0':s -> c13:c14:c15:c16 c4 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c5 :: c -> c17:c18 -> c4:c5:c6:c7 c6 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c7 :: c -> c17:c18 -> c4:c5:c6:c7 c8 :: c8:c9:c10 s :: 0':s -> 0':s c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 c13 :: c13:c14:c15:c16 c14 :: c13:c14:c15:c16 c15 :: c13:c14:c15:c16 c16 :: c13:c14:c15:c16 -> c13:c14:c15:c16 c17 :: c17:c18 c18 :: c17:c18 cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond3 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 hole_c1_19 :: c hole_true:false2_19 :: true:false hole_0':s3_19 :: 0':s hole_c1:c2:c34_19 :: c1:c2:c3 hole_c8:c9:c105_19 :: c8:c9:c10 hole_c11:c126_19 :: c11:c12 hole_c17:c187_19 :: c17:c18 hole_c4:c5:c6:c78_19 :: c4:c5:c6:c7 hole_c13:c14:c15:c169_19 :: c13:c14:c15:c16 hole_cond1:cond2:cond310_19 :: cond1:cond2:cond3 gen_0':s11_19 :: Nat -> 0':s gen_c8:c9:c1012_19 :: Nat -> c8:c9:c10 gen_c11:c1213_19 :: Nat -> c11:c12 gen_c13:c14:c15:c1614_19 :: Nat -> c13:c14:c15:c16 Lemmas: gr(gen_0':s11_19(n16_19), gen_0':s11_19(n16_19)) -> false, rt in Omega(0) Generator Equations: gen_0':s11_19(0) <=> 0' gen_0':s11_19(+(x, 1)) <=> s(gen_0':s11_19(x)) gen_c8:c9:c1012_19(0) <=> c8 gen_c8:c9:c1012_19(+(x, 1)) <=> c10(gen_c8:c9:c1012_19(x)) gen_c11:c1213_19(0) <=> c11 gen_c11:c1213_19(+(x, 1)) <=> c12(gen_c11:c1213_19(x)) gen_c13:c14:c15:c1614_19(0) <=> c13 gen_c13:c14:c15:c1614_19(+(x, 1)) <=> c16(gen_c13:c14:c15:c1614_19(x)) The following defined symbols remain to be analysed: GR, COND1, COND2, add, ADD, COND3, eq, EQ, cond1, cond2, cond3 They will be analysed ascendingly in the following order: COND1 = COND2 GR < COND1 COND1 = COND3 GR < COND2 add < COND2 ADD < COND2 COND2 = COND3 eq < COND2 EQ < COND2 GR < COND3 add < COND3 add < cond2 add < cond3 ADD < COND3 eq < cond2 cond1 = cond2 cond1 = cond3 cond2 = cond3 ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: GR(gen_0':s11_19(n449_19), gen_0':s11_19(n449_19)) -> gen_c8:c9:c1012_19(n449_19), rt in Omega(1 + n449_19) Induction Base: GR(gen_0':s11_19(0), gen_0':s11_19(0)) ->_R^Omega(1) c8 Induction Step: GR(gen_0':s11_19(+(n449_19, 1)), gen_0':s11_19(+(n449_19, 1))) ->_R^Omega(1) c10(GR(gen_0':s11_19(n449_19), gen_0':s11_19(n449_19))) ->_IH c10(gen_c8:c9:c1012_19(c450_19)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (24) Complex Obligation (BEST) ---------------------------------------- (25) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: COND1(true, z0, z1) -> c(COND2(gr(z0, z1), z0, z1), GR(z0, z1)) COND2(true, z0, z1) -> c1(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND2(true, z0, z1) -> c2(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND2(false, z0, z1) -> c3(COND3(eq(z0, z1), z0, z1), EQ(z0, z1)) COND3(true, z0, z1) -> c4(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(true, z0, z1) -> c5(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND3(false, z0, z1) -> c6(COND1(gr(add(z0, z1), 0'), z0, p(z1)), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(false, z0, z1) -> c7(COND1(gr(add(z0, z1), 0'), z0, p(z1)), P(z1)) GR(0', z0) -> c8 GR(s(z0), 0') -> c9 GR(s(z0), s(z1)) -> c10(GR(z0, z1)) ADD(0', z0) -> c11 ADD(s(z0), z1) -> c12(ADD(z0, z1)) EQ(0', 0') -> c13 EQ(0', s(z0)) -> c14 EQ(s(z0), 0') -> c15 EQ(s(z0), s(z1)) -> c16(EQ(z0, z1)) P(0') -> c17 P(s(z0)) -> c18 cond1(true, z0, z1) -> cond2(gr(z0, z1), z0, z1) cond2(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond2(false, z0, z1) -> cond3(eq(z0, z1), z0, z1) cond3(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond3(false, z0, z1) -> cond1(gr(add(z0, z1), 0'), z0, p(z1)) gr(0', z0) -> false gr(s(z0), 0') -> true gr(s(z0), s(z1)) -> gr(z0, z1) add(0', z0) -> z0 add(s(z0), z1) -> s(add(z0, z1)) eq(0', 0') -> true eq(0', s(z0)) -> false eq(s(z0), 0') -> false eq(s(z0), s(z1)) -> eq(z0, z1) p(0') -> 0' p(s(z0)) -> z0 Types: COND1 :: true:false -> 0':s -> 0':s -> c true :: true:false c :: c1:c2:c3 -> c8:c9:c10 -> c COND2 :: true:false -> 0':s -> 0':s -> c1:c2:c3 gr :: 0':s -> 0':s -> true:false GR :: 0':s -> 0':s -> c8:c9:c10 c1 :: c -> c8:c9:c10 -> c11:c12 -> c1:c2:c3 add :: 0':s -> 0':s -> 0':s 0' :: 0':s p :: 0':s -> 0':s ADD :: 0':s -> 0':s -> c11:c12 c2 :: c -> c17:c18 -> c1:c2:c3 P :: 0':s -> c17:c18 false :: true:false c3 :: c4:c5:c6:c7 -> c13:c14:c15:c16 -> c1:c2:c3 COND3 :: true:false -> 0':s -> 0':s -> c4:c5:c6:c7 eq :: 0':s -> 0':s -> true:false EQ :: 0':s -> 0':s -> c13:c14:c15:c16 c4 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c5 :: c -> c17:c18 -> c4:c5:c6:c7 c6 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c7 :: c -> c17:c18 -> c4:c5:c6:c7 c8 :: c8:c9:c10 s :: 0':s -> 0':s c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 c13 :: c13:c14:c15:c16 c14 :: c13:c14:c15:c16 c15 :: c13:c14:c15:c16 c16 :: c13:c14:c15:c16 -> c13:c14:c15:c16 c17 :: c17:c18 c18 :: c17:c18 cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond3 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 hole_c1_19 :: c hole_true:false2_19 :: true:false hole_0':s3_19 :: 0':s hole_c1:c2:c34_19 :: c1:c2:c3 hole_c8:c9:c105_19 :: c8:c9:c10 hole_c11:c126_19 :: c11:c12 hole_c17:c187_19 :: c17:c18 hole_c4:c5:c6:c78_19 :: c4:c5:c6:c7 hole_c13:c14:c15:c169_19 :: c13:c14:c15:c16 hole_cond1:cond2:cond310_19 :: cond1:cond2:cond3 gen_0':s11_19 :: Nat -> 0':s gen_c8:c9:c1012_19 :: Nat -> c8:c9:c10 gen_c11:c1213_19 :: Nat -> c11:c12 gen_c13:c14:c15:c1614_19 :: Nat -> c13:c14:c15:c16 Lemmas: gr(gen_0':s11_19(n16_19), gen_0':s11_19(n16_19)) -> false, rt in Omega(0) Generator Equations: gen_0':s11_19(0) <=> 0' gen_0':s11_19(+(x, 1)) <=> s(gen_0':s11_19(x)) gen_c8:c9:c1012_19(0) <=> c8 gen_c8:c9:c1012_19(+(x, 1)) <=> c10(gen_c8:c9:c1012_19(x)) gen_c11:c1213_19(0) <=> c11 gen_c11:c1213_19(+(x, 1)) <=> c12(gen_c11:c1213_19(x)) gen_c13:c14:c15:c1614_19(0) <=> c13 gen_c13:c14:c15:c1614_19(+(x, 1)) <=> c16(gen_c13:c14:c15:c1614_19(x)) The following defined symbols remain to be analysed: GR, COND1, COND2, add, ADD, COND3, eq, EQ, cond1, cond2, cond3 They will be analysed ascendingly in the following order: COND1 = COND2 GR < COND1 COND1 = COND3 GR < COND2 add < COND2 ADD < COND2 COND2 = COND3 eq < COND2 EQ < COND2 GR < COND3 add < COND3 add < cond2 add < cond3 ADD < COND3 eq < cond2 cond1 = cond2 cond1 = cond3 cond2 = cond3 ---------------------------------------- (26) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (27) BOUNDS(n^1, INF) ---------------------------------------- (28) Obligation: Innermost TRS: Rules: COND1(true, z0, z1) -> c(COND2(gr(z0, z1), z0, z1), GR(z0, z1)) COND2(true, z0, z1) -> c1(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND2(true, z0, z1) -> c2(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND2(false, z0, z1) -> c3(COND3(eq(z0, z1), z0, z1), EQ(z0, z1)) COND3(true, z0, z1) -> c4(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(true, z0, z1) -> c5(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND3(false, z0, z1) -> c6(COND1(gr(add(z0, z1), 0'), z0, p(z1)), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(false, z0, z1) -> c7(COND1(gr(add(z0, z1), 0'), z0, p(z1)), P(z1)) GR(0', z0) -> c8 GR(s(z0), 0') -> c9 GR(s(z0), s(z1)) -> c10(GR(z0, z1)) ADD(0', z0) -> c11 ADD(s(z0), z1) -> c12(ADD(z0, z1)) EQ(0', 0') -> c13 EQ(0', s(z0)) -> c14 EQ(s(z0), 0') -> c15 EQ(s(z0), s(z1)) -> c16(EQ(z0, z1)) P(0') -> c17 P(s(z0)) -> c18 cond1(true, z0, z1) -> cond2(gr(z0, z1), z0, z1) cond2(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond2(false, z0, z1) -> cond3(eq(z0, z1), z0, z1) cond3(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond3(false, z0, z1) -> cond1(gr(add(z0, z1), 0'), z0, p(z1)) gr(0', z0) -> false gr(s(z0), 0') -> true gr(s(z0), s(z1)) -> gr(z0, z1) add(0', z0) -> z0 add(s(z0), z1) -> s(add(z0, z1)) eq(0', 0') -> true eq(0', s(z0)) -> false eq(s(z0), 0') -> false eq(s(z0), s(z1)) -> eq(z0, z1) p(0') -> 0' p(s(z0)) -> z0 Types: COND1 :: true:false -> 0':s -> 0':s -> c true :: true:false c :: c1:c2:c3 -> c8:c9:c10 -> c COND2 :: true:false -> 0':s -> 0':s -> c1:c2:c3 gr :: 0':s -> 0':s -> true:false GR :: 0':s -> 0':s -> c8:c9:c10 c1 :: c -> c8:c9:c10 -> c11:c12 -> c1:c2:c3 add :: 0':s -> 0':s -> 0':s 0' :: 0':s p :: 0':s -> 0':s ADD :: 0':s -> 0':s -> c11:c12 c2 :: c -> c17:c18 -> c1:c2:c3 P :: 0':s -> c17:c18 false :: true:false c3 :: c4:c5:c6:c7 -> c13:c14:c15:c16 -> c1:c2:c3 COND3 :: true:false -> 0':s -> 0':s -> c4:c5:c6:c7 eq :: 0':s -> 0':s -> true:false EQ :: 0':s -> 0':s -> c13:c14:c15:c16 c4 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c5 :: c -> c17:c18 -> c4:c5:c6:c7 c6 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c7 :: c -> c17:c18 -> c4:c5:c6:c7 c8 :: c8:c9:c10 s :: 0':s -> 0':s c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 c13 :: c13:c14:c15:c16 c14 :: c13:c14:c15:c16 c15 :: c13:c14:c15:c16 c16 :: c13:c14:c15:c16 -> c13:c14:c15:c16 c17 :: c17:c18 c18 :: c17:c18 cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond3 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 hole_c1_19 :: c hole_true:false2_19 :: true:false hole_0':s3_19 :: 0':s hole_c1:c2:c34_19 :: c1:c2:c3 hole_c8:c9:c105_19 :: c8:c9:c10 hole_c11:c126_19 :: c11:c12 hole_c17:c187_19 :: c17:c18 hole_c4:c5:c6:c78_19 :: c4:c5:c6:c7 hole_c13:c14:c15:c169_19 :: c13:c14:c15:c16 hole_cond1:cond2:cond310_19 :: cond1:cond2:cond3 gen_0':s11_19 :: Nat -> 0':s gen_c8:c9:c1012_19 :: Nat -> c8:c9:c10 gen_c11:c1213_19 :: Nat -> c11:c12 gen_c13:c14:c15:c1614_19 :: Nat -> c13:c14:c15:c16 Lemmas: gr(gen_0':s11_19(n16_19), gen_0':s11_19(n16_19)) -> false, rt in Omega(0) GR(gen_0':s11_19(n449_19), gen_0':s11_19(n449_19)) -> gen_c8:c9:c1012_19(n449_19), rt in Omega(1 + n449_19) Generator Equations: gen_0':s11_19(0) <=> 0' gen_0':s11_19(+(x, 1)) <=> s(gen_0':s11_19(x)) gen_c8:c9:c1012_19(0) <=> c8 gen_c8:c9:c1012_19(+(x, 1)) <=> c10(gen_c8:c9:c1012_19(x)) gen_c11:c1213_19(0) <=> c11 gen_c11:c1213_19(+(x, 1)) <=> c12(gen_c11:c1213_19(x)) gen_c13:c14:c15:c1614_19(0) <=> c13 gen_c13:c14:c15:c1614_19(+(x, 1)) <=> c16(gen_c13:c14:c15:c1614_19(x)) The following defined symbols remain to be analysed: add, COND1, COND2, ADD, COND3, eq, EQ, cond1, cond2, cond3 They will be analysed ascendingly in the following order: COND1 = COND2 COND1 = COND3 add < COND2 ADD < COND2 COND2 = COND3 eq < COND2 EQ < COND2 add < COND3 add < cond2 add < cond3 ADD < COND3 eq < cond2 cond1 = cond2 cond1 = cond3 cond2 = cond3 ---------------------------------------- (29) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: add(gen_0':s11_19(n1165_19), gen_0':s11_19(b)) -> gen_0':s11_19(+(n1165_19, b)), rt in Omega(0) Induction Base: add(gen_0':s11_19(0), gen_0':s11_19(b)) ->_R^Omega(0) gen_0':s11_19(b) Induction Step: add(gen_0':s11_19(+(n1165_19, 1)), gen_0':s11_19(b)) ->_R^Omega(0) s(add(gen_0':s11_19(n1165_19), gen_0':s11_19(b))) ->_IH s(gen_0':s11_19(+(b, c1166_19))) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (30) Obligation: Innermost TRS: Rules: COND1(true, z0, z1) -> c(COND2(gr(z0, z1), z0, z1), GR(z0, z1)) COND2(true, z0, z1) -> c1(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND2(true, z0, z1) -> c2(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND2(false, z0, z1) -> c3(COND3(eq(z0, z1), z0, z1), EQ(z0, z1)) COND3(true, z0, z1) -> c4(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(true, z0, z1) -> c5(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND3(false, z0, z1) -> c6(COND1(gr(add(z0, z1), 0'), z0, p(z1)), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(false, z0, z1) -> c7(COND1(gr(add(z0, z1), 0'), z0, p(z1)), P(z1)) GR(0', z0) -> c8 GR(s(z0), 0') -> c9 GR(s(z0), s(z1)) -> c10(GR(z0, z1)) ADD(0', z0) -> c11 ADD(s(z0), z1) -> c12(ADD(z0, z1)) EQ(0', 0') -> c13 EQ(0', s(z0)) -> c14 EQ(s(z0), 0') -> c15 EQ(s(z0), s(z1)) -> c16(EQ(z0, z1)) P(0') -> c17 P(s(z0)) -> c18 cond1(true, z0, z1) -> cond2(gr(z0, z1), z0, z1) cond2(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond2(false, z0, z1) -> cond3(eq(z0, z1), z0, z1) cond3(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond3(false, z0, z1) -> cond1(gr(add(z0, z1), 0'), z0, p(z1)) gr(0', z0) -> false gr(s(z0), 0') -> true gr(s(z0), s(z1)) -> gr(z0, z1) add(0', z0) -> z0 add(s(z0), z1) -> s(add(z0, z1)) eq(0', 0') -> true eq(0', s(z0)) -> false eq(s(z0), 0') -> false eq(s(z0), s(z1)) -> eq(z0, z1) p(0') -> 0' p(s(z0)) -> z0 Types: COND1 :: true:false -> 0':s -> 0':s -> c true :: true:false c :: c1:c2:c3 -> c8:c9:c10 -> c COND2 :: true:false -> 0':s -> 0':s -> c1:c2:c3 gr :: 0':s -> 0':s -> true:false GR :: 0':s -> 0':s -> c8:c9:c10 c1 :: c -> c8:c9:c10 -> c11:c12 -> c1:c2:c3 add :: 0':s -> 0':s -> 0':s 0' :: 0':s p :: 0':s -> 0':s ADD :: 0':s -> 0':s -> c11:c12 c2 :: c -> c17:c18 -> c1:c2:c3 P :: 0':s -> c17:c18 false :: true:false c3 :: c4:c5:c6:c7 -> c13:c14:c15:c16 -> c1:c2:c3 COND3 :: true:false -> 0':s -> 0':s -> c4:c5:c6:c7 eq :: 0':s -> 0':s -> true:false EQ :: 0':s -> 0':s -> c13:c14:c15:c16 c4 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c5 :: c -> c17:c18 -> c4:c5:c6:c7 c6 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c7 :: c -> c17:c18 -> c4:c5:c6:c7 c8 :: c8:c9:c10 s :: 0':s -> 0':s c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 c13 :: c13:c14:c15:c16 c14 :: c13:c14:c15:c16 c15 :: c13:c14:c15:c16 c16 :: c13:c14:c15:c16 -> c13:c14:c15:c16 c17 :: c17:c18 c18 :: c17:c18 cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond3 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 hole_c1_19 :: c hole_true:false2_19 :: true:false hole_0':s3_19 :: 0':s hole_c1:c2:c34_19 :: c1:c2:c3 hole_c8:c9:c105_19 :: c8:c9:c10 hole_c11:c126_19 :: c11:c12 hole_c17:c187_19 :: c17:c18 hole_c4:c5:c6:c78_19 :: c4:c5:c6:c7 hole_c13:c14:c15:c169_19 :: c13:c14:c15:c16 hole_cond1:cond2:cond310_19 :: cond1:cond2:cond3 gen_0':s11_19 :: Nat -> 0':s gen_c8:c9:c1012_19 :: Nat -> c8:c9:c10 gen_c11:c1213_19 :: Nat -> c11:c12 gen_c13:c14:c15:c1614_19 :: Nat -> c13:c14:c15:c16 Lemmas: gr(gen_0':s11_19(n16_19), gen_0':s11_19(n16_19)) -> false, rt in Omega(0) GR(gen_0':s11_19(n449_19), gen_0':s11_19(n449_19)) -> gen_c8:c9:c1012_19(n449_19), rt in Omega(1 + n449_19) add(gen_0':s11_19(n1165_19), gen_0':s11_19(b)) -> gen_0':s11_19(+(n1165_19, b)), rt in Omega(0) Generator Equations: gen_0':s11_19(0) <=> 0' gen_0':s11_19(+(x, 1)) <=> s(gen_0':s11_19(x)) gen_c8:c9:c1012_19(0) <=> c8 gen_c8:c9:c1012_19(+(x, 1)) <=> c10(gen_c8:c9:c1012_19(x)) gen_c11:c1213_19(0) <=> c11 gen_c11:c1213_19(+(x, 1)) <=> c12(gen_c11:c1213_19(x)) gen_c13:c14:c15:c1614_19(0) <=> c13 gen_c13:c14:c15:c1614_19(+(x, 1)) <=> c16(gen_c13:c14:c15:c1614_19(x)) The following defined symbols remain to be analysed: ADD, COND1, COND2, COND3, eq, EQ, cond1, cond2, cond3 They will be analysed ascendingly in the following order: COND1 = COND2 COND1 = COND3 ADD < COND2 COND2 = COND3 eq < COND2 EQ < COND2 ADD < COND3 eq < cond2 cond1 = cond2 cond1 = cond3 cond2 = cond3 ---------------------------------------- (31) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: ADD(gen_0':s11_19(n2496_19), gen_0':s11_19(b)) -> gen_c11:c1213_19(n2496_19), rt in Omega(1 + n2496_19) Induction Base: ADD(gen_0':s11_19(0), gen_0':s11_19(b)) ->_R^Omega(1) c11 Induction Step: ADD(gen_0':s11_19(+(n2496_19, 1)), gen_0':s11_19(b)) ->_R^Omega(1) c12(ADD(gen_0':s11_19(n2496_19), gen_0':s11_19(b))) ->_IH c12(gen_c11:c1213_19(c2497_19)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (32) Obligation: Innermost TRS: Rules: COND1(true, z0, z1) -> c(COND2(gr(z0, z1), z0, z1), GR(z0, z1)) COND2(true, z0, z1) -> c1(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND2(true, z0, z1) -> c2(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND2(false, z0, z1) -> c3(COND3(eq(z0, z1), z0, z1), EQ(z0, z1)) COND3(true, z0, z1) -> c4(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(true, z0, z1) -> c5(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND3(false, z0, z1) -> c6(COND1(gr(add(z0, z1), 0'), z0, p(z1)), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(false, z0, z1) -> c7(COND1(gr(add(z0, z1), 0'), z0, p(z1)), P(z1)) GR(0', z0) -> c8 GR(s(z0), 0') -> c9 GR(s(z0), s(z1)) -> c10(GR(z0, z1)) ADD(0', z0) -> c11 ADD(s(z0), z1) -> c12(ADD(z0, z1)) EQ(0', 0') -> c13 EQ(0', s(z0)) -> c14 EQ(s(z0), 0') -> c15 EQ(s(z0), s(z1)) -> c16(EQ(z0, z1)) P(0') -> c17 P(s(z0)) -> c18 cond1(true, z0, z1) -> cond2(gr(z0, z1), z0, z1) cond2(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond2(false, z0, z1) -> cond3(eq(z0, z1), z0, z1) cond3(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond3(false, z0, z1) -> cond1(gr(add(z0, z1), 0'), z0, p(z1)) gr(0', z0) -> false gr(s(z0), 0') -> true gr(s(z0), s(z1)) -> gr(z0, z1) add(0', z0) -> z0 add(s(z0), z1) -> s(add(z0, z1)) eq(0', 0') -> true eq(0', s(z0)) -> false eq(s(z0), 0') -> false eq(s(z0), s(z1)) -> eq(z0, z1) p(0') -> 0' p(s(z0)) -> z0 Types: COND1 :: true:false -> 0':s -> 0':s -> c true :: true:false c :: c1:c2:c3 -> c8:c9:c10 -> c COND2 :: true:false -> 0':s -> 0':s -> c1:c2:c3 gr :: 0':s -> 0':s -> true:false GR :: 0':s -> 0':s -> c8:c9:c10 c1 :: c -> c8:c9:c10 -> c11:c12 -> c1:c2:c3 add :: 0':s -> 0':s -> 0':s 0' :: 0':s p :: 0':s -> 0':s ADD :: 0':s -> 0':s -> c11:c12 c2 :: c -> c17:c18 -> c1:c2:c3 P :: 0':s -> c17:c18 false :: true:false c3 :: c4:c5:c6:c7 -> c13:c14:c15:c16 -> c1:c2:c3 COND3 :: true:false -> 0':s -> 0':s -> c4:c5:c6:c7 eq :: 0':s -> 0':s -> true:false EQ :: 0':s -> 0':s -> c13:c14:c15:c16 c4 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c5 :: c -> c17:c18 -> c4:c5:c6:c7 c6 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c7 :: c -> c17:c18 -> c4:c5:c6:c7 c8 :: c8:c9:c10 s :: 0':s -> 0':s c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 c13 :: c13:c14:c15:c16 c14 :: c13:c14:c15:c16 c15 :: c13:c14:c15:c16 c16 :: c13:c14:c15:c16 -> c13:c14:c15:c16 c17 :: c17:c18 c18 :: c17:c18 cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond3 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 hole_c1_19 :: c hole_true:false2_19 :: true:false hole_0':s3_19 :: 0':s hole_c1:c2:c34_19 :: c1:c2:c3 hole_c8:c9:c105_19 :: c8:c9:c10 hole_c11:c126_19 :: c11:c12 hole_c17:c187_19 :: c17:c18 hole_c4:c5:c6:c78_19 :: c4:c5:c6:c7 hole_c13:c14:c15:c169_19 :: c13:c14:c15:c16 hole_cond1:cond2:cond310_19 :: cond1:cond2:cond3 gen_0':s11_19 :: Nat -> 0':s gen_c8:c9:c1012_19 :: Nat -> c8:c9:c10 gen_c11:c1213_19 :: Nat -> c11:c12 gen_c13:c14:c15:c1614_19 :: Nat -> c13:c14:c15:c16 Lemmas: gr(gen_0':s11_19(n16_19), gen_0':s11_19(n16_19)) -> false, rt in Omega(0) GR(gen_0':s11_19(n449_19), gen_0':s11_19(n449_19)) -> gen_c8:c9:c1012_19(n449_19), rt in Omega(1 + n449_19) add(gen_0':s11_19(n1165_19), gen_0':s11_19(b)) -> gen_0':s11_19(+(n1165_19, b)), rt in Omega(0) ADD(gen_0':s11_19(n2496_19), gen_0':s11_19(b)) -> gen_c11:c1213_19(n2496_19), rt in Omega(1 + n2496_19) Generator Equations: gen_0':s11_19(0) <=> 0' gen_0':s11_19(+(x, 1)) <=> s(gen_0':s11_19(x)) gen_c8:c9:c1012_19(0) <=> c8 gen_c8:c9:c1012_19(+(x, 1)) <=> c10(gen_c8:c9:c1012_19(x)) gen_c11:c1213_19(0) <=> c11 gen_c11:c1213_19(+(x, 1)) <=> c12(gen_c11:c1213_19(x)) gen_c13:c14:c15:c1614_19(0) <=> c13 gen_c13:c14:c15:c1614_19(+(x, 1)) <=> c16(gen_c13:c14:c15:c1614_19(x)) The following defined symbols remain to be analysed: eq, COND1, COND2, COND3, EQ, cond1, cond2, cond3 They will be analysed ascendingly in the following order: COND1 = COND2 COND1 = COND3 COND2 = COND3 eq < COND2 EQ < COND2 eq < cond2 cond1 = cond2 cond1 = cond3 cond2 = cond3 ---------------------------------------- (33) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: eq(gen_0':s11_19(n3319_19), gen_0':s11_19(n3319_19)) -> true, rt in Omega(0) Induction Base: eq(gen_0':s11_19(0), gen_0':s11_19(0)) ->_R^Omega(0) true Induction Step: eq(gen_0':s11_19(+(n3319_19, 1)), gen_0':s11_19(+(n3319_19, 1))) ->_R^Omega(0) eq(gen_0':s11_19(n3319_19), gen_0':s11_19(n3319_19)) ->_IH true We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (34) Obligation: Innermost TRS: Rules: COND1(true, z0, z1) -> c(COND2(gr(z0, z1), z0, z1), GR(z0, z1)) COND2(true, z0, z1) -> c1(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND2(true, z0, z1) -> c2(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND2(false, z0, z1) -> c3(COND3(eq(z0, z1), z0, z1), EQ(z0, z1)) COND3(true, z0, z1) -> c4(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(true, z0, z1) -> c5(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND3(false, z0, z1) -> c6(COND1(gr(add(z0, z1), 0'), z0, p(z1)), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(false, z0, z1) -> c7(COND1(gr(add(z0, z1), 0'), z0, p(z1)), P(z1)) GR(0', z0) -> c8 GR(s(z0), 0') -> c9 GR(s(z0), s(z1)) -> c10(GR(z0, z1)) ADD(0', z0) -> c11 ADD(s(z0), z1) -> c12(ADD(z0, z1)) EQ(0', 0') -> c13 EQ(0', s(z0)) -> c14 EQ(s(z0), 0') -> c15 EQ(s(z0), s(z1)) -> c16(EQ(z0, z1)) P(0') -> c17 P(s(z0)) -> c18 cond1(true, z0, z1) -> cond2(gr(z0, z1), z0, z1) cond2(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond2(false, z0, z1) -> cond3(eq(z0, z1), z0, z1) cond3(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond3(false, z0, z1) -> cond1(gr(add(z0, z1), 0'), z0, p(z1)) gr(0', z0) -> false gr(s(z0), 0') -> true gr(s(z0), s(z1)) -> gr(z0, z1) add(0', z0) -> z0 add(s(z0), z1) -> s(add(z0, z1)) eq(0', 0') -> true eq(0', s(z0)) -> false eq(s(z0), 0') -> false eq(s(z0), s(z1)) -> eq(z0, z1) p(0') -> 0' p(s(z0)) -> z0 Types: COND1 :: true:false -> 0':s -> 0':s -> c true :: true:false c :: c1:c2:c3 -> c8:c9:c10 -> c COND2 :: true:false -> 0':s -> 0':s -> c1:c2:c3 gr :: 0':s -> 0':s -> true:false GR :: 0':s -> 0':s -> c8:c9:c10 c1 :: c -> c8:c9:c10 -> c11:c12 -> c1:c2:c3 add :: 0':s -> 0':s -> 0':s 0' :: 0':s p :: 0':s -> 0':s ADD :: 0':s -> 0':s -> c11:c12 c2 :: c -> c17:c18 -> c1:c2:c3 P :: 0':s -> c17:c18 false :: true:false c3 :: c4:c5:c6:c7 -> c13:c14:c15:c16 -> c1:c2:c3 COND3 :: true:false -> 0':s -> 0':s -> c4:c5:c6:c7 eq :: 0':s -> 0':s -> true:false EQ :: 0':s -> 0':s -> c13:c14:c15:c16 c4 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c5 :: c -> c17:c18 -> c4:c5:c6:c7 c6 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c7 :: c -> c17:c18 -> c4:c5:c6:c7 c8 :: c8:c9:c10 s :: 0':s -> 0':s c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 c13 :: c13:c14:c15:c16 c14 :: c13:c14:c15:c16 c15 :: c13:c14:c15:c16 c16 :: c13:c14:c15:c16 -> c13:c14:c15:c16 c17 :: c17:c18 c18 :: c17:c18 cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond3 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 hole_c1_19 :: c hole_true:false2_19 :: true:false hole_0':s3_19 :: 0':s hole_c1:c2:c34_19 :: c1:c2:c3 hole_c8:c9:c105_19 :: c8:c9:c10 hole_c11:c126_19 :: c11:c12 hole_c17:c187_19 :: c17:c18 hole_c4:c5:c6:c78_19 :: c4:c5:c6:c7 hole_c13:c14:c15:c169_19 :: c13:c14:c15:c16 hole_cond1:cond2:cond310_19 :: cond1:cond2:cond3 gen_0':s11_19 :: Nat -> 0':s gen_c8:c9:c1012_19 :: Nat -> c8:c9:c10 gen_c11:c1213_19 :: Nat -> c11:c12 gen_c13:c14:c15:c1614_19 :: Nat -> c13:c14:c15:c16 Lemmas: gr(gen_0':s11_19(n16_19), gen_0':s11_19(n16_19)) -> false, rt in Omega(0) GR(gen_0':s11_19(n449_19), gen_0':s11_19(n449_19)) -> gen_c8:c9:c1012_19(n449_19), rt in Omega(1 + n449_19) add(gen_0':s11_19(n1165_19), gen_0':s11_19(b)) -> gen_0':s11_19(+(n1165_19, b)), rt in Omega(0) ADD(gen_0':s11_19(n2496_19), gen_0':s11_19(b)) -> gen_c11:c1213_19(n2496_19), rt in Omega(1 + n2496_19) eq(gen_0':s11_19(n3319_19), gen_0':s11_19(n3319_19)) -> true, rt in Omega(0) Generator Equations: gen_0':s11_19(0) <=> 0' gen_0':s11_19(+(x, 1)) <=> s(gen_0':s11_19(x)) gen_c8:c9:c1012_19(0) <=> c8 gen_c8:c9:c1012_19(+(x, 1)) <=> c10(gen_c8:c9:c1012_19(x)) gen_c11:c1213_19(0) <=> c11 gen_c11:c1213_19(+(x, 1)) <=> c12(gen_c11:c1213_19(x)) gen_c13:c14:c15:c1614_19(0) <=> c13 gen_c13:c14:c15:c1614_19(+(x, 1)) <=> c16(gen_c13:c14:c15:c1614_19(x)) The following defined symbols remain to be analysed: EQ, COND1, COND2, COND3, cond1, cond2, cond3 They will be analysed ascendingly in the following order: COND1 = COND2 COND1 = COND3 COND2 = COND3 EQ < COND2 cond1 = cond2 cond1 = cond3 cond2 = cond3 ---------------------------------------- (35) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: EQ(gen_0':s11_19(n3988_19), gen_0':s11_19(n3988_19)) -> gen_c13:c14:c15:c1614_19(n3988_19), rt in Omega(1 + n3988_19) Induction Base: EQ(gen_0':s11_19(0), gen_0':s11_19(0)) ->_R^Omega(1) c13 Induction Step: EQ(gen_0':s11_19(+(n3988_19, 1)), gen_0':s11_19(+(n3988_19, 1))) ->_R^Omega(1) c16(EQ(gen_0':s11_19(n3988_19), gen_0':s11_19(n3988_19))) ->_IH c16(gen_c13:c14:c15:c1614_19(c3989_19)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (36) Obligation: Innermost TRS: Rules: COND1(true, z0, z1) -> c(COND2(gr(z0, z1), z0, z1), GR(z0, z1)) COND2(true, z0, z1) -> c1(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND2(true, z0, z1) -> c2(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND2(false, z0, z1) -> c3(COND3(eq(z0, z1), z0, z1), EQ(z0, z1)) COND3(true, z0, z1) -> c4(COND1(gr(add(z0, z1), 0'), p(z0), z1), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(true, z0, z1) -> c5(COND1(gr(add(z0, z1), 0'), p(z0), z1), P(z0)) COND3(false, z0, z1) -> c6(COND1(gr(add(z0, z1), 0'), z0, p(z1)), GR(add(z0, z1), 0'), ADD(z0, z1)) COND3(false, z0, z1) -> c7(COND1(gr(add(z0, z1), 0'), z0, p(z1)), P(z1)) GR(0', z0) -> c8 GR(s(z0), 0') -> c9 GR(s(z0), s(z1)) -> c10(GR(z0, z1)) ADD(0', z0) -> c11 ADD(s(z0), z1) -> c12(ADD(z0, z1)) EQ(0', 0') -> c13 EQ(0', s(z0)) -> c14 EQ(s(z0), 0') -> c15 EQ(s(z0), s(z1)) -> c16(EQ(z0, z1)) P(0') -> c17 P(s(z0)) -> c18 cond1(true, z0, z1) -> cond2(gr(z0, z1), z0, z1) cond2(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond2(false, z0, z1) -> cond3(eq(z0, z1), z0, z1) cond3(true, z0, z1) -> cond1(gr(add(z0, z1), 0'), p(z0), z1) cond3(false, z0, z1) -> cond1(gr(add(z0, z1), 0'), z0, p(z1)) gr(0', z0) -> false gr(s(z0), 0') -> true gr(s(z0), s(z1)) -> gr(z0, z1) add(0', z0) -> z0 add(s(z0), z1) -> s(add(z0, z1)) eq(0', 0') -> true eq(0', s(z0)) -> false eq(s(z0), 0') -> false eq(s(z0), s(z1)) -> eq(z0, z1) p(0') -> 0' p(s(z0)) -> z0 Types: COND1 :: true:false -> 0':s -> 0':s -> c true :: true:false c :: c1:c2:c3 -> c8:c9:c10 -> c COND2 :: true:false -> 0':s -> 0':s -> c1:c2:c3 gr :: 0':s -> 0':s -> true:false GR :: 0':s -> 0':s -> c8:c9:c10 c1 :: c -> c8:c9:c10 -> c11:c12 -> c1:c2:c3 add :: 0':s -> 0':s -> 0':s 0' :: 0':s p :: 0':s -> 0':s ADD :: 0':s -> 0':s -> c11:c12 c2 :: c -> c17:c18 -> c1:c2:c3 P :: 0':s -> c17:c18 false :: true:false c3 :: c4:c5:c6:c7 -> c13:c14:c15:c16 -> c1:c2:c3 COND3 :: true:false -> 0':s -> 0':s -> c4:c5:c6:c7 eq :: 0':s -> 0':s -> true:false EQ :: 0':s -> 0':s -> c13:c14:c15:c16 c4 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c5 :: c -> c17:c18 -> c4:c5:c6:c7 c6 :: c -> c8:c9:c10 -> c11:c12 -> c4:c5:c6:c7 c7 :: c -> c17:c18 -> c4:c5:c6:c7 c8 :: c8:c9:c10 s :: 0':s -> 0':s c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 c13 :: c13:c14:c15:c16 c14 :: c13:c14:c15:c16 c15 :: c13:c14:c15:c16 c16 :: c13:c14:c15:c16 -> c13:c14:c15:c16 c17 :: c17:c18 c18 :: c17:c18 cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 cond3 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 hole_c1_19 :: c hole_true:false2_19 :: true:false hole_0':s3_19 :: 0':s hole_c1:c2:c34_19 :: c1:c2:c3 hole_c8:c9:c105_19 :: c8:c9:c10 hole_c11:c126_19 :: c11:c12 hole_c17:c187_19 :: c17:c18 hole_c4:c5:c6:c78_19 :: c4:c5:c6:c7 hole_c13:c14:c15:c169_19 :: c13:c14:c15:c16 hole_cond1:cond2:cond310_19 :: cond1:cond2:cond3 gen_0':s11_19 :: Nat -> 0':s gen_c8:c9:c1012_19 :: Nat -> c8:c9:c10 gen_c11:c1213_19 :: Nat -> c11:c12 gen_c13:c14:c15:c1614_19 :: Nat -> c13:c14:c15:c16 Lemmas: gr(gen_0':s11_19(n16_19), gen_0':s11_19(n16_19)) -> false, rt in Omega(0) GR(gen_0':s11_19(n449_19), gen_0':s11_19(n449_19)) -> gen_c8:c9:c1012_19(n449_19), rt in Omega(1 + n449_19) add(gen_0':s11_19(n1165_19), gen_0':s11_19(b)) -> gen_0':s11_19(+(n1165_19, b)), rt in Omega(0) ADD(gen_0':s11_19(n2496_19), gen_0':s11_19(b)) -> gen_c11:c1213_19(n2496_19), rt in Omega(1 + n2496_19) eq(gen_0':s11_19(n3319_19), gen_0':s11_19(n3319_19)) -> true, rt in Omega(0) EQ(gen_0':s11_19(n3988_19), gen_0':s11_19(n3988_19)) -> gen_c13:c14:c15:c1614_19(n3988_19), rt in Omega(1 + n3988_19) Generator Equations: gen_0':s11_19(0) <=> 0' gen_0':s11_19(+(x, 1)) <=> s(gen_0':s11_19(x)) gen_c8:c9:c1012_19(0) <=> c8 gen_c8:c9:c1012_19(+(x, 1)) <=> c10(gen_c8:c9:c1012_19(x)) gen_c11:c1213_19(0) <=> c11 gen_c11:c1213_19(+(x, 1)) <=> c12(gen_c11:c1213_19(x)) gen_c13:c14:c15:c1614_19(0) <=> c13 gen_c13:c14:c15:c1614_19(+(x, 1)) <=> c16(gen_c13:c14:c15:c1614_19(x)) The following defined symbols remain to be analysed: cond2, COND1, COND2, COND3, cond1, cond3 They will be analysed ascendingly in the following order: COND1 = COND2 COND1 = COND3 COND2 = COND3 cond1 = cond2 cond1 = cond3 cond2 = cond3