/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox/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), 2 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 602 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), 291 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), 46 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) minus(x, 0) -> x minus(0, x) -> 0 minus(s(x), s(y)) -> 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, x, y) -> gcd(minus(x, y), y) if_gcd(false, x, y) -> gcd(minus(y, x), 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] minus(x, 0) -> x [1] minus(0, x) -> 0 [1] minus(s(x), s(y)) -> 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, x, y) -> gcd(minus(x, y), y) [1] if_gcd(false, x, y) -> gcd(minus(y, 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: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] minus(x, 0) -> x [1] minus(0, x) -> 0 [1] minus(s(x), s(y)) -> 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, x, y) -> gcd(minus(x, y), y) [1] if_gcd(false, x, y) -> gcd(minus(y, x), 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 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: none And the following fresh constants: none ---------------------------------------- (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] minus(x, 0) -> x [1] minus(0, x) -> 0 [1] minus(s(x), s(y)) -> 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, x, y) -> gcd(minus(x, y), y) [1] if_gcd(false, x, y) -> gcd(minus(y, x), 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 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 ---------------------------------------- (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 => 1 false => 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') -{ 1 }-> 1 + x :|: x >= 0, z = 1 + x, z' = 0 if_gcd(z, z', z'') -{ 1 }-> gcd(minus(x, y), y) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 if_gcd(z, z', z'') -{ 1 }-> gcd(minus(y, x), x) :|: z' = x, z'' = y, x >= 0, y >= 0, z = 0 le(z, z') -{ 1 }-> le(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x le(z, z') -{ 1 }-> 1 :|: y >= 0, z = 0, z' = y le(z, z') -{ 1 }-> 0 :|: x >= 0, z = 1 + x, z' = 0 minus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 minus(z, z') -{ 1 }-> minus(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x minus(z, z') -{ 1 }-> 0 :|: z' = x, x >= 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, V15),0,[le(V1, V, Out)],[V1 >= 0,V >= 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 = 1,V2 >= 0,V1 = 0,V = V2]). eq(le(V1, V, Out),1,[],[Out = 0,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(minus(V1, V, Out),1,[],[Out = V6,V6 >= 0,V1 = V6,V = 0]). eq(minus(V1, V, Out),1,[],[Out = 0,V = V7,V7 >= 0,V1 = 0]). eq(minus(V1, V, Out),1,[minus(V8, V9, Ret1)],[Out = Ret1,V = 1 + V9,V8 >= 0,V9 >= 0,V1 = 1 + 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, Ret0),fun(Ret0, 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, Ret01),gcd(Ret01, V14, Ret3)],[Out = Ret3,V = V16,V15 = V14,V1 = 1,V16 >= 0,V14 >= 0]). eq(fun(V1, V, V15, Out),1,[minus(V18, V17, Ret02),gcd(Ret02, V17, Ret4)],[Out = Ret4,V = V17,V15 = V18,V17 >= 0,V18 >= 0,V1 = 0]). input_output_vars(le(V1,V,Out),[V1,V],[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. recursive : [minus/3] 2. recursive : [fun/4,gcd/3] 3. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into le/3 1. SCC is partially evaluated into minus/3 2. SCC is partially evaluated into gcd/3 3. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations le/3 * CE 15 is refined into CE [16] * CE 14 is refined into CE [17] * CE 13 is refined into CE [18] ### Cost equations --> "Loop" of le/3 * CEs [17] --> Loop 13 * CEs [18] --> Loop 14 * CEs [16] --> Loop 15 ### Ranking functions of CR le(V1,V,Out) * RF of phase [15]: [V,V1] #### Partial ranking functions of CR le(V1,V,Out) * Partial RF of phase [15]: - RF of loop [15:1]: V V1 ### Specialization of cost equations minus/3 * CE 8 is refined into CE [19] * CE 6 is refined into CE [20] * CE 7 is refined into CE [21] ### Cost equations --> "Loop" of minus/3 * CEs [20] --> Loop 16 * CEs [21] --> Loop 17 * CEs [19] --> Loop 18 ### Ranking functions of CR minus(V1,V,Out) * RF of phase [18]: [V,V1] #### Partial ranking functions of CR minus(V1,V,Out) * Partial RF of phase [18]: - RF of loop [18:1]: V V1 ### Specialization of cost equations gcd/3 * CE 12 is refined into CE [22] * CE 11 is refined into CE [23] * CE 10 is refined into CE [24,25,26,27] * CE 9 is refined into CE [28,29] ### Cost equations --> "Loop" of gcd/3 * CEs [29] --> Loop 19 * CEs [26,27] --> Loop 20 * CEs [28] --> Loop 21 * CEs [24,25] --> Loop 22 * CEs [22] --> Loop 23 * CEs [23] --> Loop 24 ### Ranking functions of CR gcd(V1,V,Out) * RF of phase [19,20]: [V1+V-3] * RF of phase [22]: [V1] #### Partial ranking functions of CR gcd(V1,V,Out) * Partial RF of phase [19,20]: - RF of loop [19:1]: V-2 V1/2+V/2-2 - RF of loop [20:1]: V1-1 depends on loops [19:1] V1-V+1 depends on loops [19:1] * Partial RF of phase [22]: - RF of loop [22:1]: V1 ### Specialization of cost equations start/3 * CE 2 is refined into CE [30,31,32,33,34,35,36,37,38] * CE 1 is refined into CE [39,40,41,42,43,44,45,46,47] * CE 3 is refined into CE [48,49,50,51] * CE 4 is refined into CE [52,53,54,55] * CE 5 is refined into CE [56,57,58,59,60,61] ### Cost equations --> "Loop" of start/3 * CEs [60,61] --> Loop 25 * CEs [50,55,59] --> Loop 26 * CEs [35] --> Loop 27 * CEs [33,34] --> Loop 28 * CEs [36,37,38,57] --> Loop 29 * CEs [32,51,54] --> Loop 30 * CEs [30,31] --> Loop 31 * CEs [43] --> Loop 32 * CEs [44] --> Loop 33 * CEs [45] --> Loop 34 * CEs [41,49,53,58] --> Loop 35 * CEs [39,40,42,46,47,48,52,56] --> Loop 36 ### 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 [[15],14]: 1*it(15)+1 Such that:it(15) =< V1 with precondition: [Out=1,V1>=1,V>=V1] * Chain [[15],13]: 1*it(15)+1 Such that:it(15) =< V with precondition: [Out=0,V>=1,V1>=V+1] * Chain [14]: 1 with precondition: [V1=0,Out=1,V>=0] * Chain [13]: 1 with precondition: [V=0,Out=0,V1>=1] #### Cost of chains of minus(V1,V,Out): * Chain [[18],17]: 1*it(18)+1 Such that:it(18) =< V1 with precondition: [Out=0,V1>=1,V>=V1] * Chain [[18],16]: 1*it(18)+1 Such that:it(18) =< V with precondition: [V1=Out+V,V>=1,V1>=V] * Chain [17]: 1 with precondition: [V1=0,Out=0,V>=0] * Chain [16]: 1 with precondition: [V=0,V1=Out,V1>=0] #### Cost of chains of gcd(V1,V,Out): * Chain [[22],24]: 6*it(22)+1 Such that:it(22) =< V1 with precondition: [V=1,Out=1,V1>=1] * Chain [[19,20],24]: 4*it(19)+4*it(20)+2*s(13)+4*s(15)+1 Such that:aux(9) =< V1-V+1 aux(21) =< V1+V aux(22) =< V1+V-Out it(19) =< V1/2+V/2 aux(24) =< V1/2+V/2-Out/2 aux(25) =< V aux(26) =< V-Out aux(8) =< 2*V-2*Out aux(27) =< V1 it(19) =< aux(21) it(20) =< aux(21) s(14) =< aux(21) it(19) =< aux(22) it(20) =< aux(22) s(14) =< aux(22) it(19) =< aux(24) it(20) =< aux(24) aux(6) =< aux(25) it(19) =< aux(25) aux(6) =< aux(26) it(19) =< aux(26) it(20) =< aux(8)+aux(9) it(20) =< aux(6)+aux(27) s(16) =< aux(6)+aux(27) s(16) =< it(20)*aux(25) s(15) =< s(16) s(13) =< s(14) with precondition: [Out>=2,V1>=Out,V>=Out] * Chain [[19,20],21,[22],24]: 4*it(19)+4*it(20)+6*it(22)+2*s(13)+4*s(15)+1*s(17)+5 Such that:s(17) =< 1 aux(9) =< V1-V+1 it(19) =< V1/2+V/2 aux(8) =< 2*V aux(28) =< V1 aux(29) =< V1+V aux(30) =< V it(22) =< aux(30) it(19) =< aux(29) it(20) =< aux(29) it(19) =< aux(30) it(20) =< aux(8)+aux(9) it(20) =< aux(30)+aux(28) s(16) =< aux(30)+aux(28) s(16) =< it(20)*aux(30) s(15) =< s(16) s(13) =< aux(29) with precondition: [Out=1,V1>=2,V>=2,V+V1>=5] * Chain [24]: 1 with precondition: [V1=0,V=Out,V>=0] * Chain [23]: 1 with precondition: [V=0,V1=Out,V1>=1] * Chain [21,[22],24]: 6*it(22)+1*s(17)+5 Such that:s(17) =< 1 it(22) =< V with precondition: [V1=1,Out=1,V>=2] #### Cost of chains of start(V1,V,V15): * Chain [36]: 5*s(18)+8*s(19)+1*s(20)+8*s(22)+4*s(28)+4*s(30)+4*s(42)+4*s(46)+7 Such that:s(20) =< 1 aux(35) =< -2*V+V15+1 aux(36) =< -V+V15 aux(37) =< V aux(38) =< 2*V aux(39) =< V15 aux(40) =< V15/2 s(18) =< aux(39) s(22) =< aux(40) s(19) =< aux(37) s(22) =< aux(39) s(28) =< aux(39) s(22) =< aux(37) s(28) =< aux(38)+aux(35) s(28) =< aux(37)+aux(36) s(29) =< aux(37)+aux(36) s(29) =< s(28)*aux(37) s(30) =< s(29) s(42) =< aux(39) s(42) =< aux(40) s(42) =< aux(38)+aux(35) s(42) =< aux(37)+aux(36) s(45) =< aux(37)+aux(36) s(45) =< s(42)*aux(37) s(46) =< s(45) with precondition: [V1=0,V>=0] * Chain [35]: 3 with precondition: [V=0,V1>=0] * Chain [34]: 1*s(48)+6*s(49)+3 Such that:s(48) =< 1 s(49) =< V15 with precondition: [V1=0,V=1,V15>=2] * Chain [33]: 7*s(50)+1*s(51)+7 Such that:s(51) =< 1 aux(41) =< V s(50) =< aux(41) with precondition: [V1=0,V+1=V15,V>=2] * Chain [32]: 1*s(53)+3 Such that:s(53) =< V15 with precondition: [V1=0,V=V15,V>=1] * Chain [31]: 3 with precondition: [V1=1,V=0,V15>=0] * Chain [30]: 2*s(54)+3 Such that:aux(42) =< V1 s(54) =< aux(42) with precondition: [V1>=1,V>=V1] * Chain [29]: 3*s(56)+16*s(57)+8*s(58)+8*s(61)+4*s(67)+4*s(69)+4*s(81)+4*s(85)+7 Such that:aux(47) =< 1 aux(48) =< V aux(49) =< V-2*V15+1 aux(50) =< V-V15 aux(51) =< V/2 aux(52) =< V15 aux(53) =< 2*V15 s(56) =< aux(47) s(57) =< aux(48) s(61) =< aux(51) s(58) =< aux(52) s(61) =< aux(48) s(67) =< aux(48) s(61) =< aux(52) s(67) =< aux(53)+aux(49) s(67) =< aux(52)+aux(50) s(68) =< aux(52)+aux(50) s(68) =< s(67)*aux(52) s(69) =< s(68) s(81) =< aux(48) s(81) =< aux(51) s(81) =< aux(53)+aux(49) s(81) =< aux(52)+aux(50) s(84) =< aux(52)+aux(50) s(84) =< s(81)*aux(52) s(85) =< s(84) with precondition: [V1=1,V>=2] * Chain [28]: 1*s(89)+1*s(90)+3 Such that:s(89) =< V s(90) =< V15 with precondition: [V1=1,V>=1,V15>=V] * Chain [27]: 7*s(91)+1*s(92)+7 Such that:s(92) =< 1 aux(54) =< V s(91) =< aux(54) with precondition: [V1=1,V=V15+1,V>=3] * Chain [26]: 2*s(94)+6*s(96)+1 Such that:s(96) =< V1 aux(55) =< V s(94) =< aux(55) with precondition: [V>=1,V1>=V] * Chain [25]: 1*s(97)+8*s(99)+6*s(104)+4*s(105)+4*s(107)+4*s(108)+4*s(118)+4*s(122)+5 Such that:s(97) =< 1 aux(59) =< V1 aux(60) =< V1-V+1 aux(61) =< V1+V aux(62) =< V1/2+V/2 aux(63) =< V aux(64) =< 2*V s(99) =< aux(62) s(104) =< aux(63) s(99) =< aux(61) s(105) =< aux(61) s(99) =< aux(63) s(105) =< aux(64)+aux(60) s(105) =< aux(63)+aux(59) s(106) =< aux(63)+aux(59) s(106) =< s(105)*aux(63) s(107) =< s(106) s(108) =< aux(61) s(118) =< aux(61) s(118) =< aux(62) s(118) =< aux(64)+aux(60) s(118) =< aux(63)+aux(59) s(121) =< aux(63)+aux(59) s(121) =< s(118)*aux(63) s(122) =< s(121) with precondition: [V1>=2,V>=2] Closed-form bounds of start(V1,V,V15): ------------------------------------- * Chain [36] with precondition: [V1=0,V>=0] - Upper bound: 16*V+8+nat(V15)*13+nat(-V+V15)*8+nat(V15/2)*8 - Complexity: n * Chain [35] with precondition: [V=0,V1>=0] - Upper bound: 3 - Complexity: constant * Chain [34] with precondition: [V1=0,V=1,V15>=2] - Upper bound: 6*V15+4 - Complexity: n * Chain [33] with precondition: [V1=0,V+1=V15,V>=2] - Upper bound: 7*V+8 - Complexity: n * Chain [32] with precondition: [V1=0,V=V15,V>=1] - Upper bound: V15+3 - Complexity: n * Chain [31] with precondition: [V1=1,V=0,V15>=0] - Upper bound: 3 - Complexity: constant * Chain [30] with precondition: [V1>=1,V>=V1] - Upper bound: 2*V1+3 - Complexity: n * Chain [29] with precondition: [V1=1,V>=2] - Upper bound: 24*V+10+nat(V15)*16+nat(V-V15)*8+4*V - Complexity: n * Chain [28] with precondition: [V1=1,V>=1,V15>=V] - Upper bound: V+V15+3 - Complexity: n * Chain [27] with precondition: [V1=1,V=V15+1,V>=3] - Upper bound: 7*V+8 - Complexity: n * Chain [26] with precondition: [V>=1,V1>=V] - Upper bound: 6*V1+2*V+1 - Complexity: n * Chain [25] with precondition: [V1>=2,V>=2] - Upper bound: 24*V1+30*V+6 - Complexity: n ### Maximum cost of start(V1,V,V15): max([max([2*V1,nat(V15)*5+1+nat(V15)])+2,max([max([6*V1,5*V+5+max([2,7*V+max([24*V1+16*V,2*V+2+nat(V15)*13+max([nat(V15/2)*8+nat(-V+V15)*8,8*V+2+nat(V15)*3+nat(V-V15)*8+4*V])])])])+V,nat(V15)+2])+V])+1 Asymptotic class: n * Total analysis performed in 499 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) minus(x, 0') -> x minus(0', x) -> 0' minus(s(x), s(y)) -> 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, x, y) -> gcd(minus(x, y), y) if_gcd(false, x, y) -> gcd(minus(y, x), 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) minus(x, 0') -> x minus(0', x) -> 0' minus(s(x), s(y)) -> 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, x, y) -> gcd(minus(x, y), y) if_gcd(false, x, y) -> gcd(minus(y, x), x) Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false 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) minus(x, 0') -> x minus(0', x) -> 0' minus(s(x), s(y)) -> 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, x, y) -> gcd(minus(x, y), y) if_gcd(false, x, y) -> gcd(minus(y, x), x) Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false 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) minus(x, 0') -> x minus(0', x) -> 0' minus(s(x), s(y)) -> 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, x, y) -> gcd(minus(x, y), y) if_gcd(false, x, y) -> gcd(minus(y, x), x) Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false 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) minus(x, 0') -> x minus(0', x) -> 0' minus(s(x), s(y)) -> 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, x, y) -> gcd(minus(x, y), y) if_gcd(false, x, y) -> gcd(minus(y, x), x) Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false 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(n306_0), gen_0':s3_0(n306_0)) -> gen_0':s3_0(0), rt in Omega(1 + n306_0) Induction Base: minus(gen_0':s3_0(0), gen_0':s3_0(0)) ->_R^Omega(1) gen_0':s3_0(0) Induction Step: minus(gen_0':s3_0(+(n306_0, 1)), gen_0':s3_0(+(n306_0, 1))) ->_R^Omega(1) minus(gen_0':s3_0(n306_0), gen_0':s3_0(n306_0)) ->_IH gen_0':s3_0(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) minus(x, 0') -> x minus(0', x) -> 0' minus(s(x), s(y)) -> 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, x, y) -> gcd(minus(x, y), y) if_gcd(false, x, y) -> gcd(minus(y, x), x) Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false 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(n306_0), gen_0':s3_0(n306_0)) -> gen_0':s3_0(0), rt in Omega(1 + 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