903.00/291.48 WORST_CASE(Omega(n^1), O(n^2)) 903.00/291.49 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 903.00/291.49 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 903.00/291.49 903.00/291.49 903.00/291.49 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 903.00/291.49 903.00/291.49 (0) CpxTRS 903.00/291.49 (1) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] 903.00/291.49 (2) CpxTRS 903.00/291.49 (3) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 903.00/291.49 (4) CpxWeightedTrs 903.00/291.49 (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 903.00/291.49 (6) CpxTypedWeightedTrs 903.00/291.49 (7) CompletionProof [UPPER BOUND(ID), 0 ms] 903.00/291.49 (8) CpxTypedWeightedCompleteTrs 903.00/291.49 (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 903.00/291.49 (10) CpxRNTS 903.00/291.49 (11) CompleteCoflocoProof [FINISHED, 219 ms] 903.00/291.49 (12) BOUNDS(1, n^2) 903.00/291.49 (13) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 903.00/291.49 (14) CpxTRS 903.00/291.49 (15) SlicingProof [LOWER BOUND(ID), 0 ms] 903.00/291.49 (16) CpxTRS 903.00/291.49 (17) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 903.00/291.49 (18) typed CpxTrs 903.00/291.49 (19) OrderProof [LOWER BOUND(ID), 0 ms] 903.00/291.49 (20) typed CpxTrs 903.00/291.49 (21) RewriteLemmaProof [LOWER BOUND(ID), 305 ms] 903.00/291.49 (22) BEST 903.00/291.49 (23) proven lower bound 903.00/291.49 (24) LowerBoundPropagationProof [FINISHED, 0 ms] 903.00/291.49 (25) BOUNDS(n^1, INF) 903.00/291.49 (26) typed CpxTrs 903.00/291.49 903.00/291.49 903.00/291.49 ---------------------------------------- 903.00/291.49 903.00/291.49 (0) 903.00/291.49 Obligation: 903.00/291.49 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 903.00/291.49 903.00/291.49 903.00/291.49 The TRS R consists of the following rules: 903.00/291.49 903.00/291.49 le(0, y) -> true 903.00/291.49 le(s(x), 0) -> false 903.00/291.49 le(s(x), s(y)) -> le(x, y) 903.00/291.49 int(x, y) -> if(le(x, y), x, y) 903.00/291.49 if(true, x, y) -> cons(x, int(s(x), y)) 903.00/291.49 if(false, x, y) -> nil 903.00/291.49 903.00/291.49 S is empty. 903.00/291.49 Rewrite Strategy: FULL 903.00/291.49 ---------------------------------------- 903.00/291.49 903.00/291.49 (1) RcToIrcProof (BOTH BOUNDS(ID, ID)) 903.00/291.49 Converted rc-obligation to irc-obligation. 903.00/291.49 903.00/291.49 The duplicating contexts are: 903.00/291.49 int([], y) 903.00/291.49 int(x, []) 903.00/291.49 if(true, [], y) 903.00/291.49 903.00/291.49 903.00/291.49 The defined contexts are: 903.00/291.49 if([], x1, x2) 903.00/291.49 903.00/291.49 903.00/291.49 [] just represents basic- or constructor-terms in the following defined contexts: 903.00/291.49 if([], x1, x2) 903.00/291.49 903.00/291.49 903.00/291.49 As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc. 903.00/291.49 ---------------------------------------- 903.00/291.49 903.00/291.49 (2) 903.00/291.49 Obligation: 903.00/291.49 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2). 903.00/291.49 903.00/291.49 903.00/291.49 The TRS R consists of the following rules: 903.00/291.49 903.00/291.49 le(0, y) -> true 903.00/291.49 le(s(x), 0) -> false 903.00/291.49 le(s(x), s(y)) -> le(x, y) 903.00/291.49 int(x, y) -> if(le(x, y), x, y) 903.00/291.49 if(true, x, y) -> cons(x, int(s(x), y)) 903.00/291.49 if(false, x, y) -> nil 903.00/291.49 903.00/291.49 S is empty. 903.00/291.49 Rewrite Strategy: INNERMOST 903.00/291.49 ---------------------------------------- 903.00/291.49 903.00/291.49 (3) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 903.00/291.49 Transformed relative TRS to weighted TRS 903.00/291.49 ---------------------------------------- 903.00/291.49 903.00/291.49 (4) 903.00/291.49 Obligation: 903.00/291.49 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 903.00/291.49 903.00/291.49 903.00/291.49 The TRS R consists of the following rules: 903.00/291.49 903.00/291.49 le(0, y) -> true [1] 903.00/291.49 le(s(x), 0) -> false [1] 903.00/291.49 le(s(x), s(y)) -> le(x, y) [1] 903.00/291.49 int(x, y) -> if(le(x, y), x, y) [1] 903.00/291.49 if(true, x, y) -> cons(x, int(s(x), y)) [1] 903.00/291.49 if(false, x, y) -> nil [1] 903.00/291.49 903.00/291.49 Rewrite Strategy: INNERMOST 903.00/291.49 ---------------------------------------- 903.00/291.49 903.00/291.49 (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 903.00/291.49 Infered types. 903.00/291.49 ---------------------------------------- 903.00/291.49 903.00/291.49 (6) 903.00/291.49 Obligation: 903.00/291.49 Runtime Complexity Weighted TRS with Types. 903.00/291.49 The TRS R consists of the following rules: 903.00/291.49 903.00/291.49 le(0, y) -> true [1] 903.00/291.49 le(s(x), 0) -> false [1] 903.00/291.49 le(s(x), s(y)) -> le(x, y) [1] 903.00/291.49 int(x, y) -> if(le(x, y), x, y) [1] 903.00/291.49 if(true, x, y) -> cons(x, int(s(x), y)) [1] 903.00/291.49 if(false, x, y) -> nil [1] 903.00/291.49 903.00/291.49 The TRS has the following type information: 903.00/291.49 le :: 0:s -> 0:s -> true:false 903.00/291.49 0 :: 0:s 903.00/291.49 true :: true:false 903.00/291.49 s :: 0:s -> 0:s 903.00/291.49 false :: true:false 903.00/291.49 int :: 0:s -> 0:s -> cons:nil 903.00/291.49 if :: true:false -> 0:s -> 0:s -> cons:nil 903.00/291.49 cons :: 0:s -> cons:nil -> cons:nil 903.00/291.49 nil :: cons:nil 903.00/291.49 903.00/291.49 Rewrite Strategy: INNERMOST 903.00/291.49 ---------------------------------------- 903.00/291.49 903.00/291.49 (7) CompletionProof (UPPER BOUND(ID)) 903.00/291.49 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 903.00/291.49 none 903.00/291.49 903.00/291.49 And the following fresh constants: none 903.00/291.49 903.00/291.49 ---------------------------------------- 903.00/291.49 903.00/291.49 (8) 903.00/291.49 Obligation: 903.00/291.49 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 903.00/291.49 903.00/291.49 Runtime Complexity Weighted TRS with Types. 903.00/291.49 The TRS R consists of the following rules: 903.00/291.49 903.00/291.49 le(0, y) -> true [1] 903.00/291.49 le(s(x), 0) -> false [1] 903.00/291.49 le(s(x), s(y)) -> le(x, y) [1] 903.00/291.49 int(x, y) -> if(le(x, y), x, y) [1] 903.00/291.49 if(true, x, y) -> cons(x, int(s(x), y)) [1] 903.00/291.49 if(false, x, y) -> nil [1] 903.00/291.49 903.00/291.49 The TRS has the following type information: 903.00/291.49 le :: 0:s -> 0:s -> true:false 903.00/291.49 0 :: 0:s 903.00/291.49 true :: true:false 903.00/291.49 s :: 0:s -> 0:s 903.00/291.49 false :: true:false 903.00/291.49 int :: 0:s -> 0:s -> cons:nil 903.00/291.49 if :: true:false -> 0:s -> 0:s -> cons:nil 903.00/291.49 cons :: 0:s -> cons:nil -> cons:nil 903.00/291.49 nil :: cons:nil 903.00/291.49 903.00/291.49 Rewrite Strategy: INNERMOST 903.00/291.49 ---------------------------------------- 903.00/291.49 903.00/291.49 (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 903.00/291.49 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 903.00/291.49 The constant constructors are abstracted as follows: 903.00/291.49 903.00/291.49 0 => 0 903.00/291.49 true => 1 903.00/291.49 false => 0 903.00/291.49 nil => 0 903.00/291.49 903.00/291.49 ---------------------------------------- 903.00/291.49 903.00/291.49 (10) 903.00/291.49 Obligation: 903.00/291.49 Complexity RNTS consisting of the following rules: 903.00/291.49 903.00/291.49 if(z, z', z'') -{ 1 }-> 0 :|: z' = x, z'' = y, x >= 0, y >= 0, z = 0 903.00/291.49 if(z, z', z'') -{ 1 }-> 1 + x + int(1 + x, y) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 903.00/291.49 int(z, z') -{ 1 }-> if(le(x, y), x, y) :|: x >= 0, y >= 0, z = x, z' = y 903.00/291.49 le(z, z') -{ 1 }-> le(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 903.00/291.49 le(z, z') -{ 1 }-> 1 :|: y >= 0, z = 0, z' = y 903.00/291.49 le(z, z') -{ 1 }-> 0 :|: x >= 0, z = 1 + x, z' = 0 903.00/291.49 903.00/291.49 Only complete derivations are relevant for the runtime complexity. 903.00/291.49 903.00/291.49 ---------------------------------------- 903.00/291.49 903.00/291.49 (11) CompleteCoflocoProof (FINISHED) 903.00/291.49 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 903.00/291.49 903.00/291.49 eq(start(V1, V, V10),0,[le(V1, V, Out)],[V1 >= 0,V >= 0]). 903.00/291.49 eq(start(V1, V, V10),0,[int(V1, V, Out)],[V1 >= 0,V >= 0]). 903.00/291.49 eq(start(V1, V, V10),0,[if(V1, V, V10, Out)],[V1 >= 0,V >= 0,V10 >= 0]). 903.00/291.49 eq(le(V1, V, Out),1,[],[Out = 1,V2 >= 0,V1 = 0,V = V2]). 903.00/291.49 eq(le(V1, V, Out),1,[],[Out = 0,V3 >= 0,V1 = 1 + V3,V = 0]). 903.00/291.49 eq(le(V1, V, Out),1,[le(V4, V5, Ret)],[Out = Ret,V = 1 + V5,V4 >= 0,V5 >= 0,V1 = 1 + V4]). 903.00/291.49 eq(int(V1, V, Out),1,[le(V7, V6, Ret0),if(Ret0, V7, V6, Ret1)],[Out = Ret1,V7 >= 0,V6 >= 0,V1 = V7,V = V6]). 903.00/291.49 eq(if(V1, V, V10, Out),1,[int(1 + V8, V9, Ret11)],[Out = 1 + Ret11 + V8,V = V8,V10 = V9,V1 = 1,V8 >= 0,V9 >= 0]). 903.00/291.49 eq(if(V1, V, V10, Out),1,[],[Out = 0,V = V12,V10 = V11,V12 >= 0,V11 >= 0,V1 = 0]). 903.00/291.49 input_output_vars(le(V1,V,Out),[V1,V],[Out]). 903.00/291.49 input_output_vars(int(V1,V,Out),[V1,V],[Out]). 903.00/291.49 input_output_vars(if(V1,V,V10,Out),[V1,V,V10],[Out]). 903.00/291.49 903.00/291.49 903.00/291.49 CoFloCo proof output: 903.00/291.49 Preprocessing Cost Relations 903.00/291.49 ===================================== 903.00/291.49 903.00/291.49 #### Computed strongly connected components 903.00/291.49 0. recursive : [le/3] 903.00/291.49 1. recursive : [if/4,int/3] 903.00/291.49 2. non_recursive : [start/3] 903.00/291.49 903.00/291.49 #### Obtained direct recursion through partial evaluation 903.00/291.49 0. SCC is partially evaluated into le/3 903.00/291.49 1. SCC is partially evaluated into int/3 903.00/291.49 2. SCC is partially evaluated into start/3 903.00/291.49 903.00/291.49 Control-Flow Refinement of Cost Relations 903.00/291.49 ===================================== 903.00/291.49 903.00/291.49 ### Specialization of cost equations le/3 903.00/291.49 * CE 9 is refined into CE [10] 903.00/291.49 * CE 8 is refined into CE [11] 903.00/291.49 * CE 7 is refined into CE [12] 903.00/291.49 903.00/291.49 903.00/291.49 ### Cost equations --> "Loop" of le/3 903.00/291.49 * CEs [11] --> Loop 8 903.00/291.49 * CEs [12] --> Loop 9 903.00/291.49 * CEs [10] --> Loop 10 903.00/291.49 903.00/291.49 ### Ranking functions of CR le(V1,V,Out) 903.00/291.49 * RF of phase [10]: [V,V1] 903.00/291.49 903.00/291.49 #### Partial ranking functions of CR le(V1,V,Out) 903.00/291.49 * Partial RF of phase [10]: 903.00/291.49 - RF of loop [10:1]: 903.00/291.49 V 903.00/291.49 V1 903.00/291.49 903.00/291.49 903.00/291.49 ### Specialization of cost equations int/3 903.00/291.49 * CE 6 is refined into CE [13,14] 903.00/291.49 * CE 5 is refined into CE [15,16] 903.00/291.49 903.00/291.49 903.00/291.49 ### Cost equations --> "Loop" of int/3 903.00/291.49 * CEs [16] --> Loop 11 903.00/291.49 * CEs [15] --> Loop 12 903.00/291.49 * CEs [14] --> Loop 13 903.00/291.49 * CEs [13] --> Loop 14 903.00/291.49 903.00/291.49 ### Ranking functions of CR int(V1,V,Out) 903.00/291.49 * RF of phase [13]: [-V1+V+1] 903.00/291.49 903.00/291.49 #### Partial ranking functions of CR int(V1,V,Out) 903.00/291.49 * Partial RF of phase [13]: 903.00/291.49 - RF of loop [13:1]: 903.00/291.49 -V1+V+1 903.00/291.49 903.00/291.49 903.00/291.49 ### Specialization of cost equations start/3 903.00/291.49 * CE 2 is refined into CE [17,18,19] 903.00/291.49 * CE 1 is refined into CE [20] 903.00/291.49 * CE 3 is refined into CE [21,22,23,24] 903.00/291.49 * CE 4 is refined into CE [25,26,27,28,29] 903.00/291.49 903.00/291.49 903.00/291.49 ### Cost equations --> "Loop" of start/3 903.00/291.49 * CEs [23,28] --> Loop 15 903.00/291.49 * CEs [22,27] --> Loop 16 903.00/291.49 * CEs [18,24,29] --> Loop 17 903.00/291.49 * CEs [19] --> Loop 18 903.00/291.49 * CEs [17] --> Loop 19 903.00/291.49 * CEs [20,21,25,26] --> Loop 20 903.00/291.49 903.00/291.49 ### Ranking functions of CR start(V1,V,V10) 903.00/291.49 903.00/291.49 #### Partial ranking functions of CR start(V1,V,V10) 903.00/291.49 903.00/291.49 903.00/291.49 Computing Bounds 903.00/291.49 ===================================== 903.00/291.49 903.00/291.49 #### Cost of chains of le(V1,V,Out): 903.00/291.49 * Chain [[10],9]: 1*it(10)+1 903.00/291.49 Such that:it(10) =< V1 903.00/291.49 903.00/291.49 with precondition: [Out=1,V1>=1,V>=V1] 903.00/291.49 903.00/291.49 * Chain [[10],8]: 1*it(10)+1 903.00/291.49 Such that:it(10) =< V 903.00/291.49 903.00/291.49 with precondition: [Out=0,V>=1,V1>=V+1] 903.00/291.49 903.00/291.49 * Chain [9]: 1 903.00/291.49 with precondition: [V1=0,Out=1,V>=0] 903.00/291.49 903.00/291.49 * Chain [8]: 1 903.00/291.49 with precondition: [V=0,Out=0,V1>=1] 903.00/291.49 903.00/291.49 903.00/291.49 #### Cost of chains of int(V1,V,Out): 903.00/291.49 * Chain [[13],11]: 3*it(13)+1*s(1)+1*s(4)+3 903.00/291.49 Such that:it(13) =< -V1+V+1 903.00/291.49 s(1) =< V 903.00/291.49 aux(1) =< V+1 903.00/291.49 s(4) =< it(13)*aux(1) 903.00/291.49 903.00/291.49 with precondition: [V1>=1,V>=V1,Out+2*V1>=3*V+1] 903.00/291.49 903.00/291.49 * Chain [14,[13],11]: 4*it(13)+1*s(4)+6 903.00/291.49 Such that:aux(1) =< V+1 903.00/291.49 aux(2) =< V 903.00/291.49 it(13) =< aux(2) 903.00/291.49 s(4) =< it(13)*aux(1) 903.00/291.49 903.00/291.49 with precondition: [V1=0,V>=1,Out>=3*V] 903.00/291.49 903.00/291.49 * Chain [14,12]: 6 903.00/291.49 with precondition: [V1=0,V=0,Out=1] 903.00/291.49 903.00/291.49 * Chain [12]: 3 903.00/291.49 with precondition: [V=0,Out=0,V1>=1] 903.00/291.49 903.00/291.49 * Chain [11]: 1*s(1)+3 903.00/291.49 Such that:s(1) =< V 903.00/291.49 903.00/291.49 with precondition: [Out=0,V>=1,V1>=V+1] 903.00/291.49 903.00/291.49 903.00/291.49 #### Cost of chains of start(V1,V,V10): 903.00/291.49 * Chain [20]: 4*s(7)+1*s(8)+6 903.00/291.49 Such that:s(6) =< V 903.00/291.49 s(5) =< V+1 903.00/291.49 s(7) =< s(6) 903.00/291.49 s(8) =< s(7)*s(5) 903.00/291.49 903.00/291.49 with precondition: [V1=0,V>=0] 903.00/291.49 903.00/291.49 * Chain [19]: 4 903.00/291.49 with precondition: [V1=1,V10=0,V>=0] 903.00/291.49 903.00/291.49 * Chain [18]: 3*s(9)+1*s(10)+1*s(12)+4 903.00/291.49 Such that:s(9) =< -V+V10 903.00/291.49 s(10) =< V10 903.00/291.49 s(11) =< V10+1 903.00/291.49 s(12) =< s(9)*s(11) 903.00/291.49 903.00/291.49 with precondition: [V1=1,V>=0,V10>=V+1] 903.00/291.49 903.00/291.49 * Chain [17]: 1*s(13)+1*s(14)+3*s(15)+1*s(16)+1*s(18)+4 903.00/291.49 Such that:s(15) =< -V1+V+1 903.00/291.49 s(14) =< V1 903.00/291.49 s(16) =< V 903.00/291.49 s(17) =< V+1 903.00/291.49 s(13) =< V10 903.00/291.49 s(18) =< s(15)*s(17) 903.00/291.49 903.00/291.49 with precondition: [V1>=1,V>=V1] 903.00/291.49 903.00/291.49 * Chain [16]: 3 903.00/291.49 with precondition: [V=0,V1>=1] 903.00/291.49 903.00/291.49 * Chain [15]: 2*s(19)+3 903.00/291.49 Such that:aux(3) =< V 903.00/291.49 s(19) =< aux(3) 903.00/291.49 903.00/291.49 with precondition: [V>=1,V1>=V+1] 903.00/291.49 903.00/291.49 903.00/291.49 Closed-form bounds of start(V1,V,V10): 903.00/291.49 ------------------------------------- 903.00/291.49 * Chain [20] with precondition: [V1=0,V>=0] 903.00/291.49 - Upper bound: 4*V+6+(V+1)*V 903.00/291.49 - Complexity: n^2 903.00/291.49 * Chain [19] with precondition: [V1=1,V10=0,V>=0] 903.00/291.49 - Upper bound: 4 903.00/291.49 - Complexity: constant 903.00/291.49 * Chain [18] with precondition: [V1=1,V>=0,V10>=V+1] 903.00/291.49 - Upper bound: V10+4+(-V+V10)*(V10+1)+(-3*V+3*V10) 903.00/291.49 - Complexity: n^2 903.00/291.49 * Chain [17] with precondition: [V1>=1,V>=V1] 903.00/291.49 - Upper bound: V1+V+4+nat(V10)+(-V1+V+1)*(V+1)+(-3*V1+3*V+3) 903.00/291.49 - Complexity: n^2 903.00/291.49 * Chain [16] with precondition: [V=0,V1>=1] 903.00/291.49 - Upper bound: 3 903.00/291.49 - Complexity: constant 903.00/291.49 * Chain [15] with precondition: [V>=1,V1>=V+1] 903.00/291.49 - Upper bound: 2*V+3 903.00/291.49 - Complexity: n 903.00/291.49 903.00/291.49 ### Maximum cost of start(V1,V,V10): max([max([1,nat(V10)+1+nat(-V+V10)*nat(V10+1)+nat(-V+V10)*3]),max([2*V+3+(V+1)*V+V,V1+1+nat(V10)+(V+1)*nat(-V1+V+1)+nat(-V1+V+1)*3])+V])+3 903.00/291.49 Asymptotic class: n^2 903.00/291.49 * Total analysis performed in 172 ms. 903.00/291.50 903.00/291.50 903.00/291.50 ---------------------------------------- 903.00/291.50 903.00/291.50 (12) 903.00/291.50 BOUNDS(1, n^2) 903.00/291.50 903.00/291.50 ---------------------------------------- 903.00/291.50 903.00/291.50 (13) RenamingProof (BOTH BOUNDS(ID, ID)) 903.00/291.50 Renamed function symbols to avoid clashes with predefined symbol. 903.00/291.50 ---------------------------------------- 903.00/291.50 903.00/291.50 (14) 903.00/291.50 Obligation: 903.00/291.50 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 903.00/291.50 903.00/291.50 903.00/291.50 The TRS R consists of the following rules: 903.00/291.50 903.00/291.50 le(0', y) -> true 903.00/291.50 le(s(x), 0') -> false 903.00/291.50 le(s(x), s(y)) -> le(x, y) 903.00/291.50 int(x, y) -> if(le(x, y), x, y) 903.00/291.50 if(true, x, y) -> cons(x, int(s(x), y)) 903.00/291.50 if(false, x, y) -> nil 903.00/291.50 903.00/291.50 S is empty. 903.00/291.50 Rewrite Strategy: FULL 903.00/291.50 ---------------------------------------- 903.00/291.50 903.00/291.50 (15) SlicingProof (LOWER BOUND(ID)) 903.00/291.50 Sliced the following arguments: 903.00/291.50 cons/0 903.00/291.50 903.00/291.50 ---------------------------------------- 903.00/291.50 903.00/291.50 (16) 903.00/291.50 Obligation: 903.00/291.50 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 903.00/291.50 903.00/291.50 903.00/291.50 The TRS R consists of the following rules: 903.00/291.50 903.00/291.50 le(0', y) -> true 903.00/291.50 le(s(x), 0') -> false 903.00/291.50 le(s(x), s(y)) -> le(x, y) 903.00/291.50 int(x, y) -> if(le(x, y), x, y) 903.00/291.50 if(true, x, y) -> cons(int(s(x), y)) 903.00/291.50 if(false, x, y) -> nil 903.00/291.50 903.00/291.50 S is empty. 903.00/291.50 Rewrite Strategy: FULL 903.00/291.50 ---------------------------------------- 903.00/291.50 903.00/291.50 (17) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 903.00/291.50 Infered types. 903.00/291.50 ---------------------------------------- 903.00/291.50 903.00/291.50 (18) 903.00/291.50 Obligation: 903.00/291.50 TRS: 903.00/291.50 Rules: 903.00/291.50 le(0', y) -> true 903.00/291.50 le(s(x), 0') -> false 903.00/291.50 le(s(x), s(y)) -> le(x, y) 903.00/291.50 int(x, y) -> if(le(x, y), x, y) 903.00/291.50 if(true, x, y) -> cons(int(s(x), y)) 903.00/291.50 if(false, x, y) -> nil 903.00/291.50 903.00/291.50 Types: 903.00/291.50 le :: 0':s -> 0':s -> true:false 903.00/291.50 0' :: 0':s 903.00/291.50 true :: true:false 903.00/291.50 s :: 0':s -> 0':s 903.00/291.50 false :: true:false 903.00/291.50 int :: 0':s -> 0':s -> cons:nil 903.00/291.50 if :: true:false -> 0':s -> 0':s -> cons:nil 903.00/291.50 cons :: cons:nil -> cons:nil 903.00/291.50 nil :: cons:nil 903.00/291.50 hole_true:false1_0 :: true:false 903.00/291.50 hole_0':s2_0 :: 0':s 903.00/291.50 hole_cons:nil3_0 :: cons:nil 903.00/291.50 gen_0':s4_0 :: Nat -> 0':s 903.00/291.50 gen_cons:nil5_0 :: Nat -> cons:nil 903.00/291.50 903.00/291.50 ---------------------------------------- 903.00/291.50 903.00/291.50 (19) OrderProof (LOWER BOUND(ID)) 903.00/291.50 Heuristically decided to analyse the following defined symbols: 903.00/291.50 le, int 903.00/291.50 903.00/291.50 They will be analysed ascendingly in the following order: 903.00/291.50 le < int 903.00/291.50 903.00/291.50 ---------------------------------------- 903.00/291.50 903.00/291.50 (20) 903.00/291.50 Obligation: 903.00/291.50 TRS: 903.00/291.50 Rules: 903.00/291.50 le(0', y) -> true 903.00/291.50 le(s(x), 0') -> false 903.00/291.50 le(s(x), s(y)) -> le(x, y) 903.00/291.50 int(x, y) -> if(le(x, y), x, y) 903.00/291.50 if(true, x, y) -> cons(int(s(x), y)) 903.00/291.50 if(false, x, y) -> nil 903.00/291.50 903.00/291.50 Types: 903.00/291.50 le :: 0':s -> 0':s -> true:false 903.00/291.50 0' :: 0':s 903.00/291.50 true :: true:false 903.00/291.50 s :: 0':s -> 0':s 903.00/291.50 false :: true:false 903.00/291.50 int :: 0':s -> 0':s -> cons:nil 903.00/291.50 if :: true:false -> 0':s -> 0':s -> cons:nil 903.00/291.50 cons :: cons:nil -> cons:nil 903.00/291.50 nil :: cons:nil 903.00/291.50 hole_true:false1_0 :: true:false 903.00/291.50 hole_0':s2_0 :: 0':s 903.00/291.50 hole_cons:nil3_0 :: cons:nil 903.00/291.50 gen_0':s4_0 :: Nat -> 0':s 903.00/291.50 gen_cons:nil5_0 :: Nat -> cons:nil 903.00/291.50 903.00/291.50 903.00/291.50 Generator Equations: 903.00/291.50 gen_0':s4_0(0) <=> 0' 903.00/291.50 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 903.00/291.50 gen_cons:nil5_0(0) <=> nil 903.00/291.50 gen_cons:nil5_0(+(x, 1)) <=> cons(gen_cons:nil5_0(x)) 903.00/291.50 903.00/291.50 903.00/291.50 The following defined symbols remain to be analysed: 903.00/291.50 le, int 903.00/291.50 903.00/291.50 They will be analysed ascendingly in the following order: 903.00/291.50 le < int 903.00/291.50 903.00/291.50 ---------------------------------------- 903.00/291.50 903.00/291.50 (21) RewriteLemmaProof (LOWER BOUND(ID)) 903.00/291.50 Proved the following rewrite lemma: 903.00/291.50 le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) -> true, rt in Omega(1 + n7_0) 903.00/291.50 903.00/291.50 Induction Base: 903.00/291.50 le(gen_0':s4_0(0), gen_0':s4_0(0)) ->_R^Omega(1) 903.00/291.50 true 903.00/291.50 903.00/291.50 Induction Step: 903.00/291.50 le(gen_0':s4_0(+(n7_0, 1)), gen_0':s4_0(+(n7_0, 1))) ->_R^Omega(1) 903.00/291.50 le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) ->_IH 903.00/291.50 true 903.00/291.50 903.00/291.50 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 903.00/291.50 ---------------------------------------- 903.00/291.50 903.00/291.50 (22) 903.00/291.50 Complex Obligation (BEST) 903.00/291.50 903.00/291.50 ---------------------------------------- 903.00/291.50 903.00/291.50 (23) 903.00/291.50 Obligation: 903.00/291.50 Proved the lower bound n^1 for the following obligation: 903.00/291.50 903.00/291.50 TRS: 903.00/291.50 Rules: 903.00/291.50 le(0', y) -> true 903.00/291.50 le(s(x), 0') -> false 903.00/291.50 le(s(x), s(y)) -> le(x, y) 903.00/291.50 int(x, y) -> if(le(x, y), x, y) 903.00/291.50 if(true, x, y) -> cons(int(s(x), y)) 903.00/291.50 if(false, x, y) -> nil 903.00/291.50 903.00/291.50 Types: 903.00/291.50 le :: 0':s -> 0':s -> true:false 903.00/291.50 0' :: 0':s 903.00/291.50 true :: true:false 903.00/291.50 s :: 0':s -> 0':s 903.00/291.50 false :: true:false 903.00/291.50 int :: 0':s -> 0':s -> cons:nil 903.00/291.50 if :: true:false -> 0':s -> 0':s -> cons:nil 903.00/291.50 cons :: cons:nil -> cons:nil 903.00/291.50 nil :: cons:nil 903.00/291.50 hole_true:false1_0 :: true:false 903.00/291.50 hole_0':s2_0 :: 0':s 903.00/291.50 hole_cons:nil3_0 :: cons:nil 903.00/291.50 gen_0':s4_0 :: Nat -> 0':s 903.00/291.50 gen_cons:nil5_0 :: Nat -> cons:nil 903.00/291.50 903.00/291.50 903.00/291.50 Generator Equations: 903.00/291.50 gen_0':s4_0(0) <=> 0' 903.00/291.50 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 903.00/291.50 gen_cons:nil5_0(0) <=> nil 903.00/291.50 gen_cons:nil5_0(+(x, 1)) <=> cons(gen_cons:nil5_0(x)) 903.00/291.50 903.00/291.50 903.00/291.50 The following defined symbols remain to be analysed: 903.00/291.50 le, int 903.00/291.50 903.00/291.50 They will be analysed ascendingly in the following order: 903.00/291.50 le < int 903.00/291.50 903.00/291.50 ---------------------------------------- 903.00/291.50 903.00/291.50 (24) LowerBoundPropagationProof (FINISHED) 903.00/291.50 Propagated lower bound. 903.00/291.50 ---------------------------------------- 903.00/291.50 903.00/291.50 (25) 903.00/291.50 BOUNDS(n^1, INF) 903.00/291.50 903.00/291.50 ---------------------------------------- 903.00/291.50 903.00/291.50 (26) 903.00/291.50 Obligation: 903.00/291.50 TRS: 903.00/291.50 Rules: 903.00/291.50 le(0', y) -> true 903.00/291.50 le(s(x), 0') -> false 903.00/291.50 le(s(x), s(y)) -> le(x, y) 903.00/291.50 int(x, y) -> if(le(x, y), x, y) 903.00/291.50 if(true, x, y) -> cons(int(s(x), y)) 903.00/291.50 if(false, x, y) -> nil 903.00/291.50 903.00/291.50 Types: 903.00/291.50 le :: 0':s -> 0':s -> true:false 903.00/291.50 0' :: 0':s 903.00/291.50 true :: true:false 903.00/291.50 s :: 0':s -> 0':s 903.00/291.50 false :: true:false 903.00/291.50 int :: 0':s -> 0':s -> cons:nil 903.00/291.50 if :: true:false -> 0':s -> 0':s -> cons:nil 903.00/291.50 cons :: cons:nil -> cons:nil 903.00/291.50 nil :: cons:nil 903.00/291.50 hole_true:false1_0 :: true:false 903.00/291.50 hole_0':s2_0 :: 0':s 903.00/291.50 hole_cons:nil3_0 :: cons:nil 903.00/291.50 gen_0':s4_0 :: Nat -> 0':s 903.00/291.50 gen_cons:nil5_0 :: Nat -> cons:nil 903.00/291.50 903.00/291.50 903.00/291.50 Lemmas: 903.00/291.50 le(gen_0':s4_0(n7_0), gen_0':s4_0(n7_0)) -> true, rt in Omega(1 + n7_0) 903.00/291.50 903.00/291.50 903.00/291.50 Generator Equations: 903.00/291.50 gen_0':s4_0(0) <=> 0' 903.00/291.50 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 903.00/291.50 gen_cons:nil5_0(0) <=> nil 903.00/291.50 gen_cons:nil5_0(+(x, 1)) <=> cons(gen_cons:nil5_0(x)) 903.00/291.50 903.00/291.50 903.00/291.50 The following defined symbols remain to be analysed: 903.00/291.50 int 903.28/291.53 EOF