/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxTRS (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxWeightedTrs (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTypedWeightedTrs (5) CompletionProof [UPPER BOUND(ID), 0 ms] (6) CpxTypedWeightedCompleteTrs (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 1444 ms] (10) BOUNDS(1, n^1) (11) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTRS (13) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (14) typed CpxTrs (15) OrderProof [LOWER BOUND(ID), 0 ms] (16) typed CpxTrs (17) RewriteLemmaProof [LOWER BOUND(ID), 290 ms] (18) BEST (19) proven lower bound (20) LowerBoundPropagationProof [FINISHED, 0 ms] (21) BOUNDS(n^1, INF) (22) typed CpxTrs (23) RewriteLemmaProof [LOWER BOUND(ID), 773 ms] (24) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) pred(s(x)) -> x minus(x, 0) -> x minus(x, s(y)) -> pred(minus(x, y)) gcd(0, y) -> y gcd(s(x), 0) -> s(x) gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, 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^1). The TRS R consists of the following rules: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] pred(s(x)) -> x [1] minus(x, 0) -> x [1] minus(x, s(y)) -> pred(minus(x, y)) [1] gcd(0, y) -> y [1] gcd(s(x), 0) -> s(x) [1] gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) [1] if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) [1] if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(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: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] pred(s(x)) -> x [1] minus(x, 0) -> x [1] minus(x, s(y)) -> pred(minus(x, y)) [1] gcd(0, y) -> y [1] gcd(s(x), 0) -> s(x) [1] gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) [1] if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) [1] if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) [1] The TRS has the following type information: le :: 0:s -> 0:s -> true:false 0 :: 0:s true :: true:false s :: 0:s -> 0:s false :: true:false pred :: 0:s -> 0:s minus :: 0:s -> 0:s -> 0:s gcd :: 0:s -> 0:s -> 0:s if_gcd :: true:false -> 0: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: pred(v0) -> null_pred [0] if_gcd(v0, v1, v2) -> null_if_gcd [0] le(v0, v1) -> null_le [0] minus(v0, v1) -> null_minus [0] gcd(v0, v1) -> null_gcd [0] And the following fresh constants: null_pred, null_if_gcd, null_le, null_minus, null_gcd ---------------------------------------- (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: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] pred(s(x)) -> x [1] minus(x, 0) -> x [1] minus(x, s(y)) -> pred(minus(x, y)) [1] gcd(0, y) -> y [1] gcd(s(x), 0) -> s(x) [1] gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) [1] if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) [1] if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) [1] pred(v0) -> null_pred [0] if_gcd(v0, v1, v2) -> null_if_gcd [0] le(v0, v1) -> null_le [0] minus(v0, v1) -> null_minus [0] gcd(v0, v1) -> null_gcd [0] The TRS has the following type information: le :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd -> 0:s:null_pred:null_if_gcd:null_minus:null_gcd -> true:false:null_le 0 :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd true :: true:false:null_le s :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd -> 0:s:null_pred:null_if_gcd:null_minus:null_gcd false :: true:false:null_le pred :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd -> 0:s:null_pred:null_if_gcd:null_minus:null_gcd minus :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd -> 0:s:null_pred:null_if_gcd:null_minus:null_gcd -> 0:s:null_pred:null_if_gcd:null_minus:null_gcd gcd :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd -> 0:s:null_pred:null_if_gcd:null_minus:null_gcd -> 0:s:null_pred:null_if_gcd:null_minus:null_gcd if_gcd :: true:false:null_le -> 0:s:null_pred:null_if_gcd:null_minus:null_gcd -> 0:s:null_pred:null_if_gcd:null_minus:null_gcd -> 0:s:null_pred:null_if_gcd:null_minus:null_gcd null_pred :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd null_if_gcd :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd null_le :: true:false:null_le null_minus :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd null_gcd :: 0:s:null_pred:null_if_gcd:null_minus:null_gcd 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: 0 => 0 true => 2 false => 1 null_pred => 0 null_if_gcd => 0 null_le => 0 null_minus => 0 null_gcd => 0 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: gcd(z, z') -{ 1 }-> y :|: y >= 0, z = 0, z' = y gcd(z, z') -{ 1 }-> if_gcd(le(y, x), 1 + x, 1 + y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x gcd(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 gcd(z, z') -{ 1 }-> 1 + x :|: x >= 0, z = 1 + x, z' = 0 if_gcd(z, z', z'') -{ 1 }-> gcd(minus(x, y), 1 + y) :|: z = 2, z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y if_gcd(z, z', z'') -{ 1 }-> gcd(minus(y, x), 1 + x) :|: z' = 1 + x, z = 1, x >= 0, y >= 0, z'' = 1 + y if_gcd(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 le(z, z') -{ 1 }-> le(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x le(z, z') -{ 1 }-> 2 :|: y >= 0, z = 0, z' = y le(z, z') -{ 1 }-> 1 :|: x >= 0, z = 1 + x, z' = 0 le(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 minus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 minus(z, z') -{ 1 }-> pred(minus(x, y)) :|: z' = 1 + y, x >= 0, y >= 0, z = x minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 pred(z) -{ 1 }-> x :|: x >= 0, z = 1 + x pred(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 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, V15),0,[le(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V15),0,[pred(V1, Out)],[V1 >= 0]). eq(start(V1, V, V15),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V15),0,[gcd(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V15),0,[fun(V1, V, V15, Out)],[V1 >= 0,V >= 0,V15 >= 0]). eq(le(V1, V, Out),1,[],[Out = 2,V2 >= 0,V1 = 0,V = V2]). eq(le(V1, V, Out),1,[],[Out = 1,V3 >= 0,V1 = 1 + V3,V = 0]). eq(le(V1, V, Out),1,[le(V4, V5, Ret)],[Out = Ret,V = 1 + V5,V4 >= 0,V5 >= 0,V1 = 1 + V4]). eq(pred(V1, Out),1,[],[Out = V6,V6 >= 0,V1 = 1 + V6]). eq(minus(V1, V, Out),1,[],[Out = V7,V7 >= 0,V1 = V7,V = 0]). eq(minus(V1, V, Out),1,[minus(V8, V9, Ret0),pred(Ret0, Ret1)],[Out = Ret1,V = 1 + V9,V8 >= 0,V9 >= 0,V1 = V8]). eq(gcd(V1, V, Out),1,[],[Out = V10,V10 >= 0,V1 = 0,V = V10]). eq(gcd(V1, V, Out),1,[],[Out = 1 + V11,V11 >= 0,V1 = 1 + V11,V = 0]). eq(gcd(V1, V, Out),1,[le(V12, V13, Ret01),fun(Ret01, 1 + V13, 1 + V12, Ret2)],[Out = Ret2,V = 1 + V12,V13 >= 0,V12 >= 0,V1 = 1 + V13]). eq(fun(V1, V, V15, Out),1,[minus(V16, V14, Ret02),gcd(Ret02, 1 + V14, Ret3)],[Out = Ret3,V1 = 2,V = 1 + V16,V16 >= 0,V14 >= 0,V15 = 1 + V14]). eq(fun(V1, V, V15, Out),1,[minus(V18, V17, Ret03),gcd(Ret03, 1 + V17, Ret4)],[Out = Ret4,V = 1 + V17,V1 = 1,V17 >= 0,V18 >= 0,V15 = 1 + V18]). eq(pred(V1, Out),0,[],[Out = 0,V19 >= 0,V1 = V19]). eq(fun(V1, V, V15, Out),0,[],[Out = 0,V21 >= 0,V15 = V22,V20 >= 0,V1 = V21,V = V20,V22 >= 0]). eq(le(V1, V, Out),0,[],[Out = 0,V24 >= 0,V23 >= 0,V1 = V24,V = V23]). eq(minus(V1, V, Out),0,[],[Out = 0,V25 >= 0,V26 >= 0,V1 = V25,V = V26]). eq(gcd(V1, V, Out),0,[],[Out = 0,V27 >= 0,V28 >= 0,V1 = V27,V = V28]). input_output_vars(le(V1,V,Out),[V1,V],[Out]). input_output_vars(pred(V1,Out),[V1],[Out]). input_output_vars(minus(V1,V,Out),[V1,V],[Out]). input_output_vars(gcd(V1,V,Out),[V1,V],[Out]). input_output_vars(fun(V1,V,V15,Out),[V1,V,V15],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [le/3] 1. non_recursive : [pred/2] 2. recursive [non_tail] : [minus/3] 3. recursive : [fun/4,gcd/3] 4. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into le/3 1. SCC is partially evaluated into pred/2 2. SCC is partially evaluated into minus/3 3. SCC is partially evaluated into gcd/3 4. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations le/3 * CE 20 is refined into CE [23] * CE 18 is refined into CE [24] * CE 17 is refined into CE [25] * CE 19 is refined into CE [26] ### Cost equations --> "Loop" of le/3 * CEs [26] --> Loop 17 * CEs [23] --> Loop 18 * CEs [24] --> Loop 19 * CEs [25] --> Loop 20 ### Ranking functions of CR le(V1,V,Out) * RF of phase [17]: [V,V1] #### Partial ranking functions of CR le(V1,V,Out) * Partial RF of phase [17]: - RF of loop [17:1]: V V1 ### Specialization of cost equations pred/2 * CE 21 is refined into CE [27] * CE 22 is refined into CE [28] ### Cost equations --> "Loop" of pred/2 * CEs [27] --> Loop 21 * CEs [28] --> Loop 22 ### Ranking functions of CR pred(V1,Out) #### Partial ranking functions of CR pred(V1,Out) ### Specialization of cost equations minus/3 * CE 10 is refined into CE [29] * CE 8 is refined into CE [30] * CE 9 is refined into CE [31,32] ### Cost equations --> "Loop" of minus/3 * CEs [32] --> Loop 23 * CEs [31] --> Loop 24 * CEs [29] --> Loop 25 * CEs [30] --> Loop 26 ### Ranking functions of CR minus(V1,V,Out) * RF of phase [23]: [V] * RF of phase [24]: [V] #### Partial ranking functions of CR minus(V1,V,Out) * Partial RF of phase [23]: - RF of loop [23:1]: V * Partial RF of phase [24]: - RF of loop [24:1]: V ### Specialization of cost equations gcd/3 * CE 11 is refined into CE [33,34,35,36,37] * CE 16 is refined into CE [38] * CE 15 is refined into CE [39] * CE 14 is refined into CE [40] * CE 13 is refined into CE [41,42,43,44] * CE 12 is refined into CE [45,46,47,48] ### Cost equations --> "Loop" of gcd/3 * CEs [48] --> Loop 27 * CEs [44] --> Loop 28 * CEs [47] --> Loop 29 * CEs [43] --> Loop 30 * CEs [41] --> Loop 31 * CEs [42] --> Loop 32 * CEs [45] --> Loop 33 * CEs [46] --> Loop 34 * CEs [33] --> Loop 35 * CEs [39] --> Loop 36 * CEs [34,35,36,37,38] --> Loop 37 * CEs [40] --> Loop 38 ### Ranking functions of CR gcd(V1,V,Out) * RF of phase [27,28]: [V1+V-3] * RF of phase [31]: [V1] #### Partial ranking functions of CR gcd(V1,V,Out) * Partial RF of phase [27,28]: - RF of loop [27:1]: V-2 V1/2+V/2-2 - RF of loop [28:1]: V1-1 depends on loops [27:1] V1-V+1 depends on loops [27:1] * Partial RF of phase [31]: - RF of loop [31:1]: V1 ### Specialization of cost equations start/3 * CE 3 is refined into CE [49,50,51,52,53,54,55,56,57,58,59,60] * CE 1 is refined into CE [61] * CE 2 is refined into CE [62,63,64,65,66,67,68,69,70,71,72,73] * CE 4 is refined into CE [74,75,76,77,78] * CE 5 is refined into CE [79,80] * CE 6 is refined into CE [81,82,83] * CE 7 is refined into CE [84,85,86,87,88,89,90,91,92] ### Cost equations --> "Loop" of start/3 * CEs [88,89] --> Loop 39 * CEs [75,81,87] --> Loop 40 * CEs [57] --> Loop 41 * CEs [55] --> Loop 42 * CEs [49,50,51,52,53,54,56,58,59,60] --> Loop 43 * CEs [68] --> Loop 44 * CEs [70,86] --> Loop 45 * CEs [62,63,64,65,66,67,69,71,72,73] --> Loop 46 * CEs [61,74,76,77,78,79,80,82,83,84,85,90,91,92] --> Loop 47 ### Ranking functions of CR start(V1,V,V15) #### Partial ranking functions of CR start(V1,V,V15) Computing Bounds ===================================== #### Cost of chains of le(V1,V,Out): * Chain [[17],20]: 1*it(17)+1 Such that:it(17) =< V1 with precondition: [Out=2,V1>=1,V>=V1] * Chain [[17],19]: 1*it(17)+1 Such that:it(17) =< V with precondition: [Out=1,V>=1,V1>=V+1] * Chain [[17],18]: 1*it(17)+0 Such that:it(17) =< V with precondition: [Out=0,V1>=1,V>=1] * Chain [20]: 1 with precondition: [V1=0,Out=2,V>=0] * Chain [19]: 1 with precondition: [V=0,Out=1,V1>=1] * Chain [18]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of pred(V1,Out): * Chain [22]: 0 with precondition: [Out=0,V1>=0] * Chain [21]: 1 with precondition: [V1=Out+1,V1>=1] #### Cost of chains of minus(V1,V,Out): * Chain [[24],[23],26]: 3*it(23)+1 Such that:aux(1) =< V it(23) =< aux(1) with precondition: [Out=0,V1>=1,V>=2] * Chain [[24],26]: 1*it(24)+1 Such that:it(24) =< V with precondition: [Out=0,V1>=0,V>=1] * Chain [[24],25]: 1*it(24)+0 Such that:it(24) =< V with precondition: [Out=0,V1>=0,V>=1] * Chain [[23],26]: 2*it(23)+1 Such that:it(23) =< V with precondition: [V1=Out+V,V>=1,V1>=V] * Chain [26]: 1 with precondition: [V=0,V1=Out,V1>=0] * Chain [25]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of gcd(V1,V,Out): * Chain [[31],38]: 4*it(31)+1 Such that:it(31) =< V1 with precondition: [V=1,Out=1,V1>=1] * Chain [[31],37]: 6*it(31)+1*s(8)+2 Such that:s(8) =< 1 aux(4) =< V1 it(31) =< aux(4) with precondition: [V=1,Out=0,V1>=1] * Chain [[31],35]: 4*it(31)+2 Such that:it(31) =< V1 with precondition: [V=1,Out=0,V1>=2] * Chain [[31],32,38]: 4*it(31)+5 Such that:it(31) =< V1 with precondition: [V=1,Out=1,V1>=2] * Chain [[31],32,37]: 4*it(31)+1*s(8)+6 Such that:s(8) =< 1 it(31) =< V1 with precondition: [V=1,Out=0,V1>=2] * Chain [[27,28],38]: 4*it(27)+4*it(28)+3*s(19)+3*s(21)+1 Such that:aux(10) =< V1-V+1 aux(22) =< V1+V aux(23) =< V1+V-Out it(27) =< V1/2+V/2 aux(25) =< V1/2+V/2-Out/2 aux(26) =< V aux(27) =< V-Out aux(9) =< 2*V-2*Out aux(28) =< V1 it(27) =< aux(22) it(28) =< aux(22) s(20) =< aux(22) it(27) =< aux(23) it(28) =< aux(23) s(20) =< aux(23) it(27) =< aux(25) it(28) =< aux(25) aux(7) =< aux(26) it(27) =< aux(26) aux(7) =< aux(27) it(27) =< aux(27) it(28) =< aux(9)+aux(10) it(28) =< aux(7)+aux(28) s(22) =< aux(7)+aux(28) s(22) =< it(28)*aux(26) s(21) =< s(22) s(19) =< s(20) with precondition: [Out>=2,V1>=Out,V>=Out] * Chain [[27,28],37]: 4*it(27)+4*it(28)+6*s(6)+3*s(21)+2 Such that:aux(10) =< V1-V+1 it(27) =< V1/2+V/2 aux(9) =< 2*V aux(29) =< V1 aux(30) =< V1+V aux(31) =< V s(6) =< aux(30) it(27) =< aux(30) it(28) =< aux(30) it(27) =< aux(31) it(28) =< aux(9)+aux(10) it(28) =< aux(31)+aux(29) s(22) =< aux(31)+aux(29) s(22) =< it(28)*aux(31) s(21) =< s(22) with precondition: [Out=0,V1>=2,V>=2] * Chain [[27,28],34,38]: 4*it(27)+4*it(28)+3*s(19)+3*s(21)+5 Such that:aux(10) =< V1-V+1 aux(9) =< 2*V aux(32) =< V1 aux(33) =< V1+V aux(34) =< V1/2+V/2 aux(35) =< V it(27) =< aux(34) it(27) =< aux(33) it(28) =< aux(33) it(28) =< aux(34) it(27) =< aux(35) it(28) =< aux(9)+aux(10) it(28) =< aux(35)+aux(32) s(22) =< aux(35)+aux(32) s(22) =< it(28)*aux(35) s(21) =< s(22) s(19) =< aux(33) with precondition: [Out=1,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],34,37]: 4*it(27)+4*it(28)+1*s(8)+3*s(19)+3*s(21)+6 Such that:s(8) =< 1 aux(10) =< V1-V+1 aux(9) =< 2*V aux(36) =< V1 aux(37) =< V1+V aux(38) =< V1/2+V/2 aux(39) =< V it(27) =< aux(38) it(27) =< aux(37) it(28) =< aux(37) it(28) =< aux(38) it(27) =< aux(39) it(28) =< aux(9)+aux(10) it(28) =< aux(39)+aux(36) s(22) =< aux(39)+aux(36) s(22) =< it(28)*aux(39) s(21) =< s(22) s(19) =< aux(37) with precondition: [Out=0,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],33,[31],38]: 4*it(27)+4*it(28)+4*it(31)+3*s(19)+3*s(21)+5 Such that:aux(10) =< V1-V+1 it(27) =< V1/2+V/2 aux(9) =< 2*V aux(40) =< V1 aux(41) =< V1+V aux(42) =< V it(31) =< aux(42) it(27) =< aux(41) it(28) =< aux(41) it(27) =< aux(42) it(28) =< aux(9)+aux(10) it(28) =< aux(42)+aux(40) s(22) =< aux(42)+aux(40) s(22) =< it(28)*aux(42) s(21) =< s(22) s(19) =< aux(41) with precondition: [Out=1,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],33,[31],37]: 4*it(27)+4*it(28)+6*it(31)+1*s(8)+3*s(19)+3*s(21)+6 Such that:s(8) =< 1 aux(10) =< V1-V+1 it(27) =< V1/2+V/2 aux(43) =< V1 aux(44) =< V1+V aux(45) =< V aux(46) =< 2*V it(31) =< aux(46) it(27) =< aux(44) it(28) =< aux(44) it(27) =< aux(45) it(28) =< aux(46)+aux(10) it(28) =< aux(45)+aux(43) s(22) =< aux(45)+aux(43) s(22) =< it(28)*aux(45) s(21) =< s(22) s(19) =< aux(44) with precondition: [Out=0,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],33,[31],35]: 4*it(27)+4*it(28)+4*it(31)+3*s(19)+3*s(21)+6 Such that:aux(10) =< V1-V+1 it(27) =< V1/2+V/2 aux(9) =< 2*V aux(47) =< V1 aux(48) =< V1+V aux(49) =< V it(31) =< aux(49) it(27) =< aux(48) it(28) =< aux(48) it(27) =< aux(49) it(28) =< aux(9)+aux(10) it(28) =< aux(49)+aux(47) s(22) =< aux(49)+aux(47) s(22) =< it(28)*aux(49) s(21) =< s(22) s(19) =< aux(48) with precondition: [Out=0,V1>=3,V>=3,V+V1>=7] * Chain [[27,28],33,[31],32,38]: 4*it(27)+4*it(28)+4*it(31)+3*s(19)+3*s(21)+9 Such that:aux(10) =< V1-V+1 it(27) =< V1/2+V/2 aux(9) =< 2*V aux(50) =< V1 aux(51) =< V1+V aux(52) =< V it(31) =< aux(52) it(27) =< aux(51) it(28) =< aux(51) it(27) =< aux(52) it(28) =< aux(9)+aux(10) it(28) =< aux(52)+aux(50) s(22) =< aux(52)+aux(50) s(22) =< it(28)*aux(52) s(21) =< s(22) s(19) =< aux(51) with precondition: [Out=1,V1>=3,V>=3,V+V1>=7] * Chain [[27,28],33,[31],32,37]: 4*it(27)+4*it(28)+4*it(31)+1*s(8)+3*s(19)+3*s(21)+10 Such that:s(8) =< 1 aux(10) =< V1-V+1 it(27) =< V1/2+V/2 aux(9) =< 2*V aux(53) =< V1 aux(54) =< V1+V aux(55) =< V it(31) =< aux(55) it(27) =< aux(54) it(28) =< aux(54) it(27) =< aux(55) it(28) =< aux(9)+aux(10) it(28) =< aux(55)+aux(53) s(22) =< aux(55)+aux(53) s(22) =< it(28)*aux(55) s(21) =< s(22) s(19) =< aux(54) with precondition: [Out=0,V1>=3,V>=3,V+V1>=7] * Chain [[27,28],33,37]: 4*it(27)+4*it(28)+2*s(6)+1*s(8)+3*s(19)+3*s(21)+6 Such that:s(8) =< 1 aux(10) =< V1-V+1 it(27) =< V1/2+V/2 aux(56) =< V1 aux(57) =< V1+V aux(58) =< V aux(59) =< 2*V s(6) =< aux(59) it(27) =< aux(57) it(28) =< aux(57) it(27) =< aux(58) it(28) =< aux(59)+aux(10) it(28) =< aux(58)+aux(56) s(22) =< aux(58)+aux(56) s(22) =< it(28)*aux(58) s(21) =< s(22) s(19) =< aux(57) with precondition: [Out=0,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],33,35]: 4*it(27)+4*it(28)+3*s(19)+3*s(21)+6 Such that:aux(10) =< V1-V+1 aux(9) =< 2*V aux(60) =< V1 aux(61) =< V1+V aux(62) =< V1/2+V/2 aux(63) =< V it(27) =< aux(62) it(27) =< aux(61) it(28) =< aux(61) it(28) =< aux(62) it(27) =< aux(63) it(28) =< aux(9)+aux(10) it(28) =< aux(63)+aux(60) s(22) =< aux(63)+aux(60) s(22) =< it(28)*aux(63) s(21) =< s(22) s(19) =< aux(61) with precondition: [Out=0,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],33,32,38]: 4*it(27)+4*it(28)+3*s(19)+3*s(21)+9 Such that:aux(10) =< V1-V+1 aux(9) =< 2*V aux(64) =< V1 aux(65) =< V1+V aux(66) =< V1/2+V/2 aux(67) =< V it(27) =< aux(66) it(27) =< aux(65) it(28) =< aux(65) it(28) =< aux(66) it(27) =< aux(67) it(28) =< aux(9)+aux(10) it(28) =< aux(67)+aux(64) s(22) =< aux(67)+aux(64) s(22) =< it(28)*aux(67) s(21) =< s(22) s(19) =< aux(65) with precondition: [Out=1,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],33,32,37]: 4*it(27)+4*it(28)+1*s(8)+3*s(19)+3*s(21)+10 Such that:s(8) =< 1 aux(10) =< V1-V+1 aux(9) =< 2*V aux(68) =< V1 aux(69) =< V1+V aux(70) =< V1/2+V/2 aux(71) =< V it(27) =< aux(70) it(27) =< aux(69) it(28) =< aux(69) it(28) =< aux(70) it(27) =< aux(71) it(28) =< aux(9)+aux(10) it(28) =< aux(71)+aux(68) s(22) =< aux(71)+aux(68) s(22) =< it(28)*aux(71) s(21) =< s(22) s(19) =< aux(69) with precondition: [Out=0,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],30,38]: 4*it(27)+4*it(28)+3*s(19)+3*s(21)+6*s(25)+5 Such that:aux(21) =< V1 aux(10) =< V1-V+1 aux(22) =< V1+V aux(23) =< V1+V-2*Out aux(24) =< V1-Out it(27) =< V1/2+V/2 aux(25) =< V1/2+V/2-Out aux(26) =< V aux(27) =< V-Out aux(9) =< 2*V-2*Out aux(72) =< Out s(25) =< aux(72) it(27) =< aux(22) it(28) =< aux(22) s(20) =< aux(22) it(27) =< aux(23) it(28) =< aux(23) s(20) =< aux(23) it(27) =< aux(25) it(28) =< aux(25) aux(7) =< aux(26) it(27) =< aux(26) aux(7) =< aux(27) it(27) =< aux(27) it(28) =< aux(9)+aux(10) it(28) =< aux(7)+aux(21) s(22) =< aux(7)+aux(24) s(22) =< aux(7)+aux(21) it(28) =< aux(7)+aux(24) s(22) =< it(28)*aux(26) s(21) =< s(22) s(19) =< s(20) with precondition: [Out>=2,V1>=Out,V>=Out,V+V1>=3*Out] * Chain [[27,28],30,37]: 4*it(27)+4*it(28)+7*s(8)+3*s(19)+3*s(21)+6 Such that:aux(10) =< V1-V+1 aux(9) =< 2*V aux(74) =< V1 aux(75) =< V1+V aux(76) =< V1/2+V/2 aux(77) =< V it(27) =< aux(76) s(8) =< aux(77) it(27) =< aux(75) it(28) =< aux(75) it(28) =< aux(76) it(27) =< aux(77) it(28) =< aux(9)+aux(10) it(28) =< aux(77)+aux(74) s(22) =< aux(77)+aux(74) s(22) =< it(28)*aux(77) s(21) =< s(22) s(19) =< aux(75) with precondition: [Out=0,V1>=2,V>=2,V+V1>=6] * Chain [[27,28],29,38]: 4*it(27)+4*it(28)+3*s(19)+3*s(21)+6*s(28)+5 Such that:aux(21) =< V1 aux(10) =< V1-V+1 aux(22) =< V1+V aux(23) =< V1+V-2*Out aux(24) =< V1-Out it(27) =< V1/2+V/2 aux(25) =< V1/2+V/2-Out aux(26) =< V aux(27) =< V-Out aux(9) =< 2*V-2*Out aux(78) =< Out s(28) =< aux(78) it(27) =< aux(22) it(28) =< aux(22) s(20) =< aux(22) it(27) =< aux(23) it(28) =< aux(23) s(20) =< aux(23) it(27) =< aux(25) it(28) =< aux(25) aux(7) =< aux(26) it(27) =< aux(26) aux(7) =< aux(27) it(27) =< aux(27) it(28) =< aux(9)+aux(10) it(28) =< aux(7)+aux(21) s(22) =< aux(7)+aux(24) s(22) =< aux(7)+aux(21) it(28) =< aux(7)+aux(24) s(22) =< it(28)*aux(26) s(21) =< s(22) s(19) =< s(20) with precondition: [Out>=2,V1>=Out+1,V>=Out+1,V+V1>=3*Out+2] * Chain [[27,28],29,37]: 4*it(27)+4*it(28)+7*s(8)+3*s(19)+3*s(21)+6 Such that:aux(10) =< V1-V+1 aux(9) =< 2*V aux(80) =< V1 aux(81) =< V1+V aux(82) =< V1/2+V/2 aux(83) =< V it(27) =< aux(82) s(8) =< aux(80) it(27) =< aux(81) it(28) =< aux(81) it(28) =< aux(82) it(27) =< aux(83) it(28) =< aux(9)+aux(10) it(28) =< aux(83)+aux(80) s(22) =< aux(83)+aux(80) s(22) =< it(28)*aux(83) s(21) =< s(22) s(19) =< aux(81) with precondition: [Out=0,V1>=3,V>=3,V+V1>=8] * Chain [38]: 1 with precondition: [V1=0,V=Out,V>=0] * Chain [37]: 2*s(6)+1*s(8)+2 Such that:s(8) =< V aux(3) =< V1 s(6) =< aux(3) with precondition: [Out=0,V1>=0,V>=0] * Chain [36]: 1 with precondition: [V=0,V1=Out,V1>=1] * Chain [35]: 2 with precondition: [V=1,Out=0,V1>=1] * Chain [34,38]: 5 with precondition: [V1=1,Out=1,V>=2] * Chain [34,37]: 1*s(8)+6 Such that:s(8) =< 1 with precondition: [V1=1,Out=0,V>=2] * Chain [33,[31],38]: 4*it(31)+5 Such that:it(31) =< V with precondition: [V1=1,Out=1,V>=2] * Chain [33,[31],37]: 6*it(31)+1*s(8)+6 Such that:s(8) =< 1 aux(4) =< V it(31) =< aux(4) with precondition: [V1=1,Out=0,V>=2] * Chain [33,[31],35]: 4*it(31)+6 Such that:it(31) =< V with precondition: [V1=1,Out=0,V>=3] * Chain [33,[31],32,38]: 4*it(31)+9 Such that:it(31) =< V with precondition: [V1=1,Out=1,V>=3] * Chain [33,[31],32,37]: 4*it(31)+1*s(8)+10 Such that:s(8) =< 1 it(31) =< V with precondition: [V1=1,Out=0,V>=3] * Chain [33,37]: 2*s(6)+1*s(8)+6 Such that:s(8) =< 1 aux(3) =< V s(6) =< aux(3) with precondition: [V1=1,Out=0,V>=2] * Chain [33,35]: 6 with precondition: [V1=1,Out=0,V>=2] * Chain [33,32,38]: 9 with precondition: [V1=1,Out=1,V>=2] * Chain [33,32,37]: 1*s(8)+10 Such that:s(8) =< 1 with precondition: [V1=1,Out=0,V>=2] * Chain [32,38]: 5 with precondition: [V=1,Out=1,V1>=1] * Chain [32,37]: 1*s(8)+6 Such that:s(8) =< 1 with precondition: [V=1,Out=0,V1>=1] * Chain [30,38]: 6*s(25)+5 Such that:aux(72) =< Out s(25) =< aux(72) with precondition: [V=Out,V>=2,V1>=V] * Chain [30,37]: 7*s(8)+6 Such that:aux(73) =< V s(8) =< aux(73) with precondition: [Out=0,V>=2,V1>=V] * Chain [29,38]: 6*s(28)+5 Such that:aux(78) =< Out s(28) =< aux(78) with precondition: [V1=Out,V1>=2,V>=V1+1] * Chain [29,37]: 7*s(8)+6 Such that:aux(79) =< V1 s(8) =< aux(79) with precondition: [Out=0,V1>=2,V>=V1+1] #### Cost of chains of start(V1,V,V15): * Chain [47]: 62*s(273)+17*s(275)+10*s(286)+68*s(287)+36*s(289)+27*s(291)+72*s(292)+8*s(293)+32*s(294)+24*s(296)+10 Such that:s(279) =< 1 aux(116) =< V1 aux(117) =< V1-V+1 aux(118) =< V1+V aux(119) =< V1/2+V/2 aux(120) =< V aux(121) =< 2*V s(275) =< aux(116) s(273) =< aux(120) s(286) =< s(279) s(287) =< aux(119) s(287) =< aux(118) s(289) =< aux(118) s(289) =< aux(119) s(287) =< aux(120) s(289) =< aux(121)+aux(117) s(289) =< aux(120)+aux(116) s(290) =< aux(120)+aux(116) s(290) =< s(289)*aux(120) s(291) =< s(290) s(292) =< aux(118) s(293) =< aux(121) s(294) =< aux(118) s(294) =< aux(121)+aux(117) s(294) =< aux(120)+aux(116) s(295) =< aux(120)+aux(116) s(295) =< s(294)*aux(120) s(296) =< s(295) with precondition: [V1>=0] * Chain [46]: 72*s(349)+40*s(350)+20*s(352)+15*s(354)+143*s(355)+8*s(356)+20*s(357)+15*s(359)+143*s(368)+40*s(379)+20*s(381)+15*s(383)+16*s(385)+20*s(386)+15*s(388)+68*s(399)+36*s(401)+27*s(403)+32*s(406)+24*s(408)+16*s(409)+12 Such that:s(348) =< 2 s(373) =< -V+1 s(375) =< V/2 aux(132) =< 1 aux(133) =< -2*V+V15+1 aux(134) =< -V+V15 aux(135) =< V aux(136) =< 2*V aux(137) =< V15 aux(138) =< V15/2 s(349) =< aux(132) s(355) =< aux(137) s(379) =< s(375) s(368) =< aux(135) s(379) =< aux(135) s(381) =< aux(135) s(381) =< s(375) s(381) =< aux(136)+s(373) s(382) =< aux(135) s(382) =< s(381)*aux(135) s(383) =< s(382) s(385) =< aux(136) s(386) =< aux(135) s(386) =< aux(136)+s(373) s(387) =< aux(135) s(387) =< s(386)*aux(135) s(388) =< s(387) s(399) =< aux(138) s(399) =< aux(137) s(401) =< aux(137) s(401) =< aux(138) s(399) =< aux(135) s(401) =< aux(136)+aux(133) s(401) =< aux(135)+aux(134) s(402) =< aux(135)+aux(134) s(402) =< s(401)*aux(135) s(403) =< s(402) s(406) =< aux(137) s(406) =< aux(136)+aux(133) s(406) =< aux(135)+aux(134) s(407) =< aux(135)+aux(134) s(407) =< s(406)*aux(135) s(408) =< s(407) s(409) =< aux(134) s(350) =< aux(138) s(350) =< aux(137) s(352) =< aux(137) s(352) =< aux(138) s(350) =< aux(132) s(352) =< s(348)+aux(137) s(352) =< aux(132)+aux(137) s(353) =< aux(132)+aux(137) s(353) =< s(352)*aux(132) s(354) =< s(353) s(356) =< s(348) s(357) =< aux(137) s(357) =< s(348)+aux(137) s(357) =< aux(132)+aux(137) s(358) =< aux(132)+aux(137) s(358) =< s(357)*aux(132) s(359) =< s(358) with precondition: [V1=1,V>=1,V15>=1] * Chain [45]: 10*s(457)+8*s(461)+11 Such that:s(460) =< V aux(139) =< V15 s(461) =< s(460) s(457) =< aux(139) with precondition: [V1=1,V>=2] * Chain [44]: 2*s(462)+3 Such that:s(462) =< V15 with precondition: [V1=1,V=V15,V>=2] * Chain [43]: 72*s(470)+40*s(471)+20*s(473)+15*s(475)+143*s(476)+8*s(477)+20*s(478)+15*s(480)+143*s(489)+40*s(500)+20*s(502)+15*s(504)+16*s(506)+20*s(507)+15*s(509)+68*s(520)+36*s(522)+27*s(524)+32*s(527)+24*s(529)+16*s(530)+12 Such that:s(469) =< 2 s(494) =< -V15+1 s(496) =< V15/2 aux(150) =< 1 aux(151) =< V aux(152) =< V-2*V15+1 aux(153) =< V-V15 aux(154) =< V/2 aux(155) =< V15 aux(156) =< 2*V15 s(470) =< aux(150) s(476) =< aux(151) s(500) =< s(496) s(489) =< aux(155) s(500) =< aux(155) s(502) =< aux(155) s(502) =< s(496) s(502) =< aux(156)+s(494) s(503) =< aux(155) s(503) =< s(502)*aux(155) s(504) =< s(503) s(506) =< aux(156) s(507) =< aux(155) s(507) =< aux(156)+s(494) s(508) =< aux(155) s(508) =< s(507)*aux(155) s(509) =< s(508) s(520) =< aux(154) s(520) =< aux(151) s(522) =< aux(151) s(522) =< aux(154) s(520) =< aux(155) s(522) =< aux(156)+aux(152) s(522) =< aux(155)+aux(153) s(523) =< aux(155)+aux(153) s(523) =< s(522)*aux(155) s(524) =< s(523) s(527) =< aux(151) s(527) =< aux(156)+aux(152) s(527) =< aux(155)+aux(153) s(528) =< aux(155)+aux(153) s(528) =< s(527)*aux(155) s(529) =< s(528) s(530) =< aux(153) s(471) =< aux(154) s(471) =< aux(151) s(473) =< aux(151) s(473) =< aux(154) s(471) =< aux(150) s(473) =< s(469)+aux(151) s(473) =< aux(150)+aux(151) s(474) =< aux(150)+aux(151) s(474) =< s(473)*aux(150) s(475) =< s(474) s(477) =< s(469) s(478) =< aux(151) s(478) =< s(469)+aux(151) s(478) =< aux(150)+aux(151) s(479) =< aux(150)+aux(151) s(479) =< s(478)*aux(150) s(480) =< s(479) with precondition: [V1=2,V>=1,V15>=1] * Chain [42]: 2*s(578)+3 Such that:s(578) =< V15 with precondition: [V1=2,V=V15,V>=2] * Chain [41]: 10*s(579)+11 Such that:aux(157) =< V15 s(579) =< aux(157) with precondition: [V1=2,V=V15+1,V>=3] * Chain [40]: 1 with precondition: [V=0,V1>=0] * Chain [39]: 3*s(584)+22*s(585)+6 Such that:s(582) =< 1 aux(158) =< V1 s(584) =< s(582) s(585) =< aux(158) with precondition: [V=1,V1>=1] Closed-form bounds of start(V1,V,V15): ------------------------------------- * Chain [47] with precondition: [V1>=0] - Upper bound: 68*V1+20+nat(V)*113+nat(2*V)*8+nat(V1+V)*140+nat(V1/2+V/2)*68 - Complexity: n * Chain [46] with precondition: [V1=1,V>=1,V15>=1] - Upper bound: 296*V+281*V15+170+nat(-V+V15)*67+20*V+34*V15 - Complexity: n * Chain [45] with precondition: [V1=1,V>=2] - Upper bound: 8*V+11+nat(V15)*10 - Complexity: n * Chain [44] with precondition: [V1=1,V=V15,V>=2] - Upper bound: 2*V15+3 - Complexity: n * Chain [43] with precondition: [V1=2,V>=1,V15>=1] - Upper bound: 281*V+296*V15+170+nat(V-V15)*67+34*V+20*V15 - Complexity: n * Chain [42] with precondition: [V1=2,V=V15,V>=2] - Upper bound: 2*V15+3 - Complexity: n * Chain [41] with precondition: [V1=2,V=V15+1,V>=3] - Upper bound: 10*V15+11 - Complexity: n * Chain [40] with precondition: [V=0,V1>=0] - Upper bound: 1 - Complexity: constant * Chain [39] with precondition: [V=1,V1>=1] - Upper bound: 22*V1+9 - Complexity: n ### Maximum cost of start(V1,V,V15): max([46*V1+11+nat(V)*113+nat(2*V)*8+nat(V1+V)*140+nat(V1/2+V/2)*68+(22*V1+8),nat(V)*256+159+nat(V15)*254+nat(V/2)*40+nat(V15/2)*40+max([nat(2*V)*16+nat(V15)*17+nat(-V+V15)*67+nat(V15/2)*28,nat(2*V15)*16+nat(V)*17+nat(V-V15)*67+nat(V/2)*28])+nat(V)*8+(nat(V15)*8+8)+(nat(V15)*2+2)])+1 Asymptotic class: n * Total analysis performed in 1289 ms. ---------------------------------------- (10) BOUNDS(1, n^1) ---------------------------------------- (11) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (12) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) pred(s(x)) -> x minus(x, 0') -> x minus(x, s(y)) -> pred(minus(x, y)) gcd(0', y) -> y gcd(s(x), 0') -> s(x) gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (13) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (14) Obligation: Innermost TRS: Rules: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) pred(s(x)) -> x minus(x, 0') -> x minus(x, s(y)) -> pred(minus(x, y)) gcd(0', y) -> y gcd(s(x), 0') -> s(x) gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false pred :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s gcd :: 0':s -> 0':s -> 0':s if_gcd :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s ---------------------------------------- (15) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: le, minus, gcd They will be analysed ascendingly in the following order: le < gcd minus < gcd ---------------------------------------- (16) Obligation: Innermost TRS: Rules: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) pred(s(x)) -> x minus(x, 0') -> x minus(x, s(y)) -> pred(minus(x, y)) gcd(0', y) -> y gcd(s(x), 0') -> s(x) gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false pred :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s gcd :: 0':s -> 0':s -> 0':s if_gcd :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: le, minus, gcd They will be analysed ascendingly in the following order: le < gcd minus < gcd ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: le(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> true, rt in Omega(1 + n5_0) Induction Base: le(gen_0':s3_0(0), gen_0':s3_0(0)) ->_R^Omega(1) true Induction Step: le(gen_0':s3_0(+(n5_0, 1)), gen_0':s3_0(+(n5_0, 1))) ->_R^Omega(1) le(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) ->_IH true We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (18) Complex Obligation (BEST) ---------------------------------------- (19) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) pred(s(x)) -> x minus(x, 0') -> x minus(x, s(y)) -> pred(minus(x, y)) gcd(0', y) -> y gcd(s(x), 0') -> s(x) gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false pred :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s gcd :: 0':s -> 0':s -> 0':s if_gcd :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: le, minus, gcd They will be analysed ascendingly in the following order: le < gcd minus < gcd ---------------------------------------- (20) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (21) BOUNDS(n^1, INF) ---------------------------------------- (22) Obligation: Innermost TRS: Rules: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) pred(s(x)) -> x minus(x, 0') -> x minus(x, s(y)) -> pred(minus(x, y)) gcd(0', y) -> y gcd(s(x), 0') -> s(x) gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false pred :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s gcd :: 0':s -> 0':s -> 0':s if_gcd :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Lemmas: le(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> true, rt in Omega(1 + n5_0) Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: minus, gcd They will be analysed ascendingly in the following order: minus < gcd ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: minus(gen_0':s3_0(a), gen_0':s3_0(+(1, n306_0))) -> *4_0, rt in Omega(n306_0) Induction Base: minus(gen_0':s3_0(a), gen_0':s3_0(+(1, 0))) Induction Step: minus(gen_0':s3_0(a), gen_0':s3_0(+(1, +(n306_0, 1)))) ->_R^Omega(1) pred(minus(gen_0':s3_0(a), gen_0':s3_0(+(1, n306_0)))) ->_IH pred(*4_0) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (24) Obligation: Innermost TRS: Rules: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) pred(s(x)) -> x minus(x, 0') -> x minus(x, s(y)) -> pred(minus(x, y)) gcd(0', y) -> y gcd(s(x), 0') -> s(x) gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false pred :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s gcd :: 0':s -> 0':s -> 0':s if_gcd :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Lemmas: le(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> true, rt in Omega(1 + n5_0) minus(gen_0':s3_0(a), gen_0':s3_0(+(1, n306_0))) -> *4_0, rt in Omega(n306_0) Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: gcd