23.14/9.41 WORST_CASE(Omega(n^1), O(n^1)) 23.30/9.42 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 23.30/9.42 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 23.30/9.42 23.30/9.42 23.30/9.42 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 23.30/9.42 23.30/9.42 (0) CpxTRS 23.30/9.42 (1) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] 23.30/9.42 (2) CpxTRS 23.30/9.42 (3) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 23.30/9.42 (4) CpxWeightedTrs 23.30/9.42 (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 23.30/9.42 (6) CpxTypedWeightedTrs 23.30/9.42 (7) CompletionProof [UPPER BOUND(ID), 0 ms] 23.30/9.42 (8) CpxTypedWeightedCompleteTrs 23.30/9.42 (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 9 ms] 23.30/9.42 (10) CpxRNTS 23.30/9.42 (11) CompleteCoflocoProof [FINISHED, 289 ms] 23.30/9.42 (12) BOUNDS(1, n^1) 23.30/9.42 (13) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 23.30/9.42 (14) CpxTRS 23.30/9.42 (15) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 23.30/9.42 (16) typed CpxTrs 23.30/9.42 (17) OrderProof [LOWER BOUND(ID), 0 ms] 23.30/9.42 (18) typed CpxTrs 23.30/9.42 (19) RewriteLemmaProof [LOWER BOUND(ID), 1129 ms] 23.30/9.42 (20) BEST 23.30/9.42 (21) proven lower bound 23.30/9.42 (22) LowerBoundPropagationProof [FINISHED, 0 ms] 23.30/9.42 (23) BOUNDS(n^1, INF) 23.30/9.42 (24) typed CpxTrs 23.30/9.42 (25) RewriteLemmaProof [LOWER BOUND(ID), 38 ms] 23.30/9.42 (26) BOUNDS(1, INF) 23.30/9.42 23.30/9.42 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (0) 23.30/9.42 Obligation: 23.30/9.42 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 23.30/9.42 23.30/9.42 23.30/9.42 The TRS R consists of the following rules: 23.30/9.42 23.30/9.42 minus(X, 0) -> X 23.30/9.42 minus(s(X), s(Y)) -> p(minus(X, Y)) 23.30/9.42 p(s(X)) -> X 23.30/9.42 div(0, s(Y)) -> 0 23.30/9.42 div(s(X), s(Y)) -> s(div(minus(X, Y), s(Y))) 23.30/9.42 23.30/9.42 S is empty. 23.30/9.42 Rewrite Strategy: FULL 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (1) RcToIrcProof (BOTH BOUNDS(ID, ID)) 23.30/9.42 Converted rc-obligation to irc-obligation. 23.30/9.42 23.30/9.42 The duplicating contexts are: 23.30/9.42 div(s(X), s([])) 23.30/9.42 23.30/9.42 23.30/9.42 The defined contexts are: 23.30/9.42 p([]) 23.30/9.42 div([], s(x1)) 23.30/9.42 minus([], x1) 23.30/9.42 23.30/9.42 23.30/9.42 As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc. 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (2) 23.30/9.42 Obligation: 23.30/9.42 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). 23.30/9.42 23.30/9.42 23.30/9.42 The TRS R consists of the following rules: 23.30/9.42 23.30/9.42 minus(X, 0) -> X 23.30/9.42 minus(s(X), s(Y)) -> p(minus(X, Y)) 23.30/9.42 p(s(X)) -> X 23.30/9.42 div(0, s(Y)) -> 0 23.30/9.42 div(s(X), s(Y)) -> s(div(minus(X, Y), s(Y))) 23.30/9.42 23.30/9.42 S is empty. 23.30/9.42 Rewrite Strategy: INNERMOST 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (3) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 23.30/9.42 Transformed relative TRS to weighted TRS 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (4) 23.30/9.42 Obligation: 23.30/9.42 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). 23.30/9.42 23.30/9.42 23.30/9.42 The TRS R consists of the following rules: 23.30/9.42 23.30/9.42 minus(X, 0) -> X [1] 23.30/9.42 minus(s(X), s(Y)) -> p(minus(X, Y)) [1] 23.30/9.42 p(s(X)) -> X [1] 23.30/9.42 div(0, s(Y)) -> 0 [1] 23.30/9.42 div(s(X), s(Y)) -> s(div(minus(X, Y), s(Y))) [1] 23.30/9.42 23.30/9.42 Rewrite Strategy: INNERMOST 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 23.30/9.42 Infered types. 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (6) 23.30/9.42 Obligation: 23.30/9.42 Runtime Complexity Weighted TRS with Types. 23.30/9.42 The TRS R consists of the following rules: 23.30/9.42 23.30/9.42 minus(X, 0) -> X [1] 23.30/9.42 minus(s(X), s(Y)) -> p(minus(X, Y)) [1] 23.30/9.42 p(s(X)) -> X [1] 23.30/9.42 div(0, s(Y)) -> 0 [1] 23.30/9.42 div(s(X), s(Y)) -> s(div(minus(X, Y), s(Y))) [1] 23.30/9.42 23.30/9.42 The TRS has the following type information: 23.30/9.42 minus :: 0:s -> 0:s -> 0:s 23.30/9.42 0 :: 0:s 23.30/9.42 s :: 0:s -> 0:s 23.30/9.42 p :: 0:s -> 0:s 23.30/9.42 div :: 0:s -> 0:s -> 0:s 23.30/9.42 23.30/9.42 Rewrite Strategy: INNERMOST 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (7) CompletionProof (UPPER BOUND(ID)) 23.30/9.42 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 23.30/9.42 23.30/9.42 minus(v0, v1) -> null_minus [0] 23.30/9.42 p(v0) -> null_p [0] 23.30/9.42 div(v0, v1) -> null_div [0] 23.30/9.42 23.30/9.42 And the following fresh constants: null_minus, null_p, null_div 23.30/9.42 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (8) 23.30/9.42 Obligation: 23.30/9.42 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 23.30/9.42 23.30/9.42 Runtime Complexity Weighted TRS with Types. 23.30/9.42 The TRS R consists of the following rules: 23.30/9.42 23.30/9.42 minus(X, 0) -> X [1] 23.30/9.42 minus(s(X), s(Y)) -> p(minus(X, Y)) [1] 23.30/9.42 p(s(X)) -> X [1] 23.30/9.42 div(0, s(Y)) -> 0 [1] 23.30/9.42 div(s(X), s(Y)) -> s(div(minus(X, Y), s(Y))) [1] 23.30/9.42 minus(v0, v1) -> null_minus [0] 23.30/9.42 p(v0) -> null_p [0] 23.30/9.42 div(v0, v1) -> null_div [0] 23.30/9.42 23.30/9.42 The TRS has the following type information: 23.30/9.42 minus :: 0:s:null_minus:null_p:null_div -> 0:s:null_minus:null_p:null_div -> 0:s:null_minus:null_p:null_div 23.30/9.42 0 :: 0:s:null_minus:null_p:null_div 23.30/9.42 s :: 0:s:null_minus:null_p:null_div -> 0:s:null_minus:null_p:null_div 23.30/9.42 p :: 0:s:null_minus:null_p:null_div -> 0:s:null_minus:null_p:null_div 23.30/9.42 div :: 0:s:null_minus:null_p:null_div -> 0:s:null_minus:null_p:null_div -> 0:s:null_minus:null_p:null_div 23.30/9.42 null_minus :: 0:s:null_minus:null_p:null_div 23.30/9.42 null_p :: 0:s:null_minus:null_p:null_div 23.30/9.42 null_div :: 0:s:null_minus:null_p:null_div 23.30/9.42 23.30/9.42 Rewrite Strategy: INNERMOST 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 23.30/9.42 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 23.30/9.42 The constant constructors are abstracted as follows: 23.30/9.42 23.30/9.42 0 => 0 23.30/9.42 null_minus => 0 23.30/9.42 null_p => 0 23.30/9.42 null_div => 0 23.30/9.42 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (10) 23.30/9.42 Obligation: 23.30/9.42 Complexity RNTS consisting of the following rules: 23.30/9.42 23.30/9.42 div(z, z') -{ 1 }-> 0 :|: Y >= 0, z' = 1 + Y, z = 0 23.30/9.42 div(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 23.30/9.42 div(z, z') -{ 1 }-> 1 + div(minus(X, Y), 1 + Y) :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0 23.30/9.42 minus(z, z') -{ 1 }-> X :|: X >= 0, z = X, z' = 0 23.30/9.42 minus(z, z') -{ 1 }-> p(minus(X, Y)) :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0 23.30/9.42 minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 23.30/9.42 p(z) -{ 1 }-> X :|: z = 1 + X, X >= 0 23.30/9.42 p(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 23.30/9.42 23.30/9.42 Only complete derivations are relevant for the runtime complexity. 23.30/9.42 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (11) CompleteCoflocoProof (FINISHED) 23.30/9.42 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 23.30/9.42 23.30/9.42 eq(start(V1, V),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). 23.30/9.42 eq(start(V1, V),0,[p(V1, Out)],[V1 >= 0]). 23.30/9.42 eq(start(V1, V),0,[div(V1, V, Out)],[V1 >= 0,V >= 0]). 23.30/9.42 eq(minus(V1, V, Out),1,[],[Out = X1,X1 >= 0,V1 = X1,V = 0]). 23.30/9.42 eq(minus(V1, V, Out),1,[minus(X2, Y1, Ret0),p(Ret0, Ret)],[Out = Ret,V1 = 1 + X2,Y1 >= 0,V = 1 + Y1,X2 >= 0]). 23.30/9.42 eq(p(V1, Out),1,[],[Out = X3,V1 = 1 + X3,X3 >= 0]). 23.30/9.42 eq(div(V1, V, Out),1,[],[Out = 0,Y2 >= 0,V = 1 + Y2,V1 = 0]). 23.30/9.42 eq(div(V1, V, Out),1,[minus(X4, Y3, Ret10),div(Ret10, 1 + Y3, Ret1)],[Out = 1 + Ret1,V1 = 1 + X4,Y3 >= 0,V = 1 + Y3,X4 >= 0]). 23.30/9.42 eq(minus(V1, V, Out),0,[],[Out = 0,V3 >= 0,V2 >= 0,V1 = V3,V = V2]). 23.30/9.42 eq(p(V1, Out),0,[],[Out = 0,V4 >= 0,V1 = V4]). 23.30/9.42 eq(div(V1, V, Out),0,[],[Out = 0,V6 >= 0,V5 >= 0,V1 = V6,V = V5]). 23.30/9.42 input_output_vars(minus(V1,V,Out),[V1,V],[Out]). 23.30/9.42 input_output_vars(p(V1,Out),[V1],[Out]). 23.30/9.42 input_output_vars(div(V1,V,Out),[V1,V],[Out]). 23.30/9.42 23.30/9.42 23.30/9.42 CoFloCo proof output: 23.30/9.42 Preprocessing Cost Relations 23.30/9.42 ===================================== 23.30/9.42 23.30/9.42 #### Computed strongly connected components 23.30/9.42 0. non_recursive : [p/2] 23.30/9.42 1. recursive [non_tail] : [minus/3] 23.30/9.42 2. recursive : [(div)/3] 23.30/9.42 3. non_recursive : [start/2] 23.30/9.42 23.30/9.42 #### Obtained direct recursion through partial evaluation 23.30/9.42 0. SCC is partially evaluated into p/2 23.30/9.42 1. SCC is partially evaluated into minus/3 23.30/9.42 2. SCC is partially evaluated into (div)/3 23.30/9.42 3. SCC is partially evaluated into start/2 23.30/9.42 23.30/9.42 Control-Flow Refinement of Cost Relations 23.30/9.42 ===================================== 23.30/9.42 23.30/9.42 ### Specialization of cost equations p/2 23.30/9.42 * CE 7 is refined into CE [12] 23.30/9.42 * CE 8 is refined into CE [13] 23.30/9.42 23.30/9.42 23.30/9.42 ### Cost equations --> "Loop" of p/2 23.30/9.42 * CEs [12] --> Loop 9 23.30/9.42 * CEs [13] --> Loop 10 23.30/9.42 23.30/9.42 ### Ranking functions of CR p(V1,Out) 23.30/9.42 23.30/9.42 #### Partial ranking functions of CR p(V1,Out) 23.30/9.42 23.30/9.42 23.30/9.42 ### Specialization of cost equations minus/3 23.30/9.42 * CE 6 is refined into CE [14] 23.30/9.42 * CE 4 is refined into CE [15] 23.30/9.42 * CE 5 is refined into CE [16,17] 23.30/9.42 23.30/9.42 23.30/9.42 ### Cost equations --> "Loop" of minus/3 23.30/9.42 * CEs [17] --> Loop 11 23.30/9.42 * CEs [16] --> Loop 12 23.30/9.42 * CEs [14] --> Loop 13 23.30/9.42 * CEs [15] --> Loop 14 23.30/9.42 23.30/9.42 ### Ranking functions of CR minus(V1,V,Out) 23.30/9.42 * RF of phase [11]: [V,V1] 23.30/9.42 * RF of phase [12]: [V,V1] 23.30/9.42 23.30/9.42 #### Partial ranking functions of CR minus(V1,V,Out) 23.30/9.42 * Partial RF of phase [11]: 23.30/9.42 - RF of loop [11:1]: 23.30/9.42 V 23.30/9.42 V1 23.30/9.42 * Partial RF of phase [12]: 23.30/9.42 - RF of loop [12:1]: 23.30/9.42 V 23.30/9.42 V1 23.30/9.42 23.30/9.42 23.30/9.42 ### Specialization of cost equations (div)/3 23.30/9.42 * CE 9 is refined into CE [18] 23.30/9.42 * CE 11 is refined into CE [19] 23.30/9.42 * CE 10 is refined into CE [20,21,22] 23.30/9.42 23.30/9.42 23.30/9.42 ### Cost equations --> "Loop" of (div)/3 23.30/9.42 * CEs [22] --> Loop 15 23.30/9.42 * CEs [21] --> Loop 16 23.30/9.42 * CEs [20] --> Loop 17 23.30/9.42 * CEs [18,19] --> Loop 18 23.30/9.42 23.30/9.42 ### Ranking functions of CR div(V1,V,Out) 23.30/9.42 * RF of phase [15]: [V1/3-2/3,V1/3-2/3*V+2/3] 23.30/9.42 * RF of phase [17]: [V1] 23.30/9.42 23.30/9.42 #### Partial ranking functions of CR div(V1,V,Out) 23.30/9.42 * Partial RF of phase [15]: 23.30/9.42 - RF of loop [15:1]: 23.30/9.42 V1/3-2/3 23.30/9.42 V1/3-2/3*V+2/3 23.30/9.42 * Partial RF of phase [17]: 23.30/9.42 - RF of loop [17:1]: 23.30/9.42 V1 23.30/9.42 23.30/9.42 23.30/9.42 ### Specialization of cost equations start/2 23.30/9.42 * CE 1 is refined into CE [23,24,25] 23.30/9.42 * CE 2 is refined into CE [26,27] 23.30/9.42 * CE 3 is refined into CE [28,29,30,31,32] 23.30/9.42 23.30/9.42 23.30/9.42 ### Cost equations --> "Loop" of start/2 23.30/9.42 * CEs [28] --> Loop 19 23.30/9.42 * CEs [23,24,25,26,27,29,30,31,32] --> Loop 20 23.30/9.42 23.30/9.42 ### Ranking functions of CR start(V1,V) 23.30/9.42 23.30/9.42 #### Partial ranking functions of CR start(V1,V) 23.30/9.42 23.30/9.42 23.30/9.42 Computing Bounds 23.30/9.42 ===================================== 23.30/9.42 23.30/9.42 #### Cost of chains of p(V1,Out): 23.30/9.42 * Chain [10]: 0 23.30/9.42 with precondition: [Out=0,V1>=0] 23.30/9.42 23.30/9.42 * Chain [9]: 1 23.30/9.42 with precondition: [V1=Out+1,V1>=1] 23.30/9.42 23.30/9.42 23.30/9.42 #### Cost of chains of minus(V1,V,Out): 23.30/9.42 * Chain [[12],[11],14]: 3*it(11)+1 23.30/9.42 Such that:aux(1) =< V 23.30/9.42 it(11) =< aux(1) 23.30/9.42 23.30/9.42 with precondition: [Out=0,V>=2,V1>=V+1] 23.30/9.42 23.30/9.42 * Chain [[12],14]: 1*it(12)+1 23.30/9.42 Such that:it(12) =< V 23.30/9.42 23.30/9.42 with precondition: [Out=0,V>=1,V1>=V] 23.30/9.42 23.30/9.42 * Chain [[12],13]: 1*it(12)+0 23.30/9.42 Such that:it(12) =< V 23.30/9.42 23.30/9.42 with precondition: [Out=0,V1>=1,V>=1] 23.30/9.42 23.30/9.42 * Chain [[11],14]: 2*it(11)+1 23.30/9.42 Such that:it(11) =< V 23.30/9.42 23.30/9.42 with precondition: [V1=2*V+Out,V>=1,V1>=2*V] 23.30/9.42 23.30/9.42 * Chain [14]: 1 23.30/9.42 with precondition: [V=0,V1=Out,V1>=0] 23.30/9.42 23.30/9.42 * Chain [13]: 0 23.30/9.42 with precondition: [Out=0,V1>=0,V>=0] 23.30/9.42 23.30/9.42 23.30/9.42 #### Cost of chains of div(V1,V,Out): 23.30/9.42 * Chain [[17],18]: 2*it(17)+1 23.30/9.42 Such that:it(17) =< Out 23.30/9.42 23.30/9.42 with precondition: [V=1,Out>=1,V1>=Out] 23.30/9.42 23.30/9.42 * Chain [[17],16,18]: 2*it(17)+5*s(6)+3 23.30/9.42 Such that:s(5) =< 1 23.30/9.42 it(17) =< Out 23.30/9.42 s(6) =< s(5) 23.30/9.42 23.30/9.42 with precondition: [V=1,Out>=2,V1>=Out] 23.30/9.42 23.30/9.42 * Chain [[15],18]: 2*it(15)+2*s(9)+1 23.30/9.42 Such that:it(15) =< V1/3-2/3*V+2/3 23.30/9.42 s(9) =< 2/3*V1-V/3+2/3 23.30/9.42 23.30/9.42 with precondition: [V>=2,Out>=1,V1+4>=3*Out+2*V] 23.30/9.42 23.30/9.42 * Chain [[15],16,18]: 2*it(15)+5*s(6)+2*s(9)+3 23.30/9.42 Such that:it(15) =< V1/3-2/3*V+2/3 23.30/9.42 s(9) =< 2/3*V1 23.30/9.42 s(5) =< V 23.30/9.42 s(6) =< s(5) 23.30/9.42 23.30/9.42 with precondition: [V>=2,Out>=2,V1+6>=3*Out+2*V] 23.30/9.42 23.30/9.42 * Chain [18]: 1 23.30/9.42 with precondition: [Out=0,V1>=0,V>=0] 23.30/9.42 23.30/9.42 * Chain [16,18]: 5*s(6)+3 23.30/9.42 Such that:s(5) =< V 23.30/9.42 s(6) =< s(5) 23.30/9.42 23.30/9.42 with precondition: [Out=1,V1>=1,V>=1] 23.30/9.42 23.30/9.42 23.30/9.42 #### Cost of chains of start(V1,V): 23.30/9.42 * Chain [20]: 17*s(15)+4*s(19)+2*s(20)+2*s(22)+3 23.30/9.42 Such that:s(22) =< 2/3*V1 23.30/9.42 s(20) =< 2/3*V1-V/3+2/3 23.30/9.42 aux(4) =< V1/3-2/3*V+2/3 23.30/9.42 aux(5) =< V 23.30/9.42 s(19) =< aux(4) 23.30/9.42 s(15) =< aux(5) 23.30/9.42 23.30/9.42 with precondition: [V1>=0] 23.30/9.42 23.30/9.42 * Chain [19]: 4*s(27)+5*s(28)+3 23.30/9.42 Such that:s(25) =< 1 23.30/9.42 s(26) =< V1 23.30/9.42 s(27) =< s(26) 23.30/9.42 s(28) =< s(25) 23.30/9.42 23.30/9.42 with precondition: [V=1,V1>=1] 23.30/9.42 23.30/9.42 23.30/9.42 Closed-form bounds of start(V1,V): 23.30/9.42 ------------------------------------- 23.30/9.42 * Chain [20] with precondition: [V1>=0] 23.30/9.42 - Upper bound: nat(V)*17+3+4/3*V1+nat(2/3*V1-V/3+2/3)*2+nat(V1/3-2/3*V+2/3)*4 23.30/9.42 - Complexity: n 23.30/9.42 * Chain [19] with precondition: [V=1,V1>=1] 23.30/9.42 - Upper bound: 4*V1+8 23.30/9.42 - Complexity: n 23.30/9.42 23.30/9.42 ### Maximum cost of start(V1,V): max([4*V1+5,4/3*V1+nat(V)*17+nat(2/3*V1-V/3+2/3)*2+nat(V1/3-2/3*V+2/3)*4])+3 23.30/9.42 Asymptotic class: n 23.30/9.42 * Total analysis performed in 216 ms. 23.30/9.42 23.30/9.42 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (12) 23.30/9.42 BOUNDS(1, n^1) 23.30/9.42 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (13) RenamingProof (BOTH BOUNDS(ID, ID)) 23.30/9.42 Renamed function symbols to avoid clashes with predefined symbol. 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (14) 23.30/9.42 Obligation: 23.30/9.42 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 23.30/9.42 23.30/9.42 23.30/9.42 The TRS R consists of the following rules: 23.30/9.42 23.30/9.42 minus(X, 0') -> X 23.30/9.42 minus(s(X), s(Y)) -> p(minus(X, Y)) 23.30/9.42 p(s(X)) -> X 23.30/9.42 div(0', s(Y)) -> 0' 23.30/9.42 div(s(X), s(Y)) -> s(div(minus(X, Y), s(Y))) 23.30/9.42 23.30/9.42 S is empty. 23.30/9.42 Rewrite Strategy: FULL 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (15) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 23.30/9.42 Infered types. 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (16) 23.30/9.42 Obligation: 23.30/9.42 TRS: 23.30/9.42 Rules: 23.30/9.42 minus(X, 0') -> X 23.30/9.42 minus(s(X), s(Y)) -> p(minus(X, Y)) 23.30/9.42 p(s(X)) -> X 23.30/9.42 div(0', s(Y)) -> 0' 23.30/9.42 div(s(X), s(Y)) -> s(div(minus(X, Y), s(Y))) 23.30/9.42 23.30/9.42 Types: 23.30/9.42 minus :: 0':s -> 0':s -> 0':s 23.30/9.42 0' :: 0':s 23.30/9.42 s :: 0':s -> 0':s 23.30/9.42 p :: 0':s -> 0':s 23.30/9.42 div :: 0':s -> 0':s -> 0':s 23.30/9.42 hole_0':s1_0 :: 0':s 23.30/9.42 gen_0':s2_0 :: Nat -> 0':s 23.30/9.42 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (17) OrderProof (LOWER BOUND(ID)) 23.30/9.42 Heuristically decided to analyse the following defined symbols: 23.30/9.42 minus, div 23.30/9.42 23.30/9.42 They will be analysed ascendingly in the following order: 23.30/9.42 minus < div 23.30/9.42 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (18) 23.30/9.42 Obligation: 23.30/9.42 TRS: 23.30/9.42 Rules: 23.30/9.42 minus(X, 0') -> X 23.30/9.42 minus(s(X), s(Y)) -> p(minus(X, Y)) 23.30/9.42 p(s(X)) -> X 23.30/9.42 div(0', s(Y)) -> 0' 23.30/9.42 div(s(X), s(Y)) -> s(div(minus(X, Y), s(Y))) 23.30/9.42 23.30/9.42 Types: 23.30/9.42 minus :: 0':s -> 0':s -> 0':s 23.30/9.42 0' :: 0':s 23.30/9.42 s :: 0':s -> 0':s 23.30/9.42 p :: 0':s -> 0':s 23.30/9.42 div :: 0':s -> 0':s -> 0':s 23.30/9.42 hole_0':s1_0 :: 0':s 23.30/9.42 gen_0':s2_0 :: Nat -> 0':s 23.30/9.42 23.30/9.42 23.30/9.42 Generator Equations: 23.30/9.42 gen_0':s2_0(0) <=> 0' 23.30/9.42 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 23.30/9.42 23.30/9.42 23.30/9.42 The following defined symbols remain to be analysed: 23.30/9.42 minus, div 23.30/9.42 23.30/9.42 They will be analysed ascendingly in the following order: 23.30/9.42 minus < div 23.30/9.42 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (19) RewriteLemmaProof (LOWER BOUND(ID)) 23.30/9.42 Proved the following rewrite lemma: 23.30/9.42 minus(gen_0':s2_0(+(1, n4_0)), gen_0':s2_0(+(1, n4_0))) -> *3_0, rt in Omega(n4_0) 23.30/9.42 23.30/9.42 Induction Base: 23.30/9.42 minus(gen_0':s2_0(+(1, 0)), gen_0':s2_0(+(1, 0))) 23.30/9.42 23.30/9.42 Induction Step: 23.30/9.42 minus(gen_0':s2_0(+(1, +(n4_0, 1))), gen_0':s2_0(+(1, +(n4_0, 1)))) ->_R^Omega(1) 23.30/9.42 p(minus(gen_0':s2_0(+(1, n4_0)), gen_0':s2_0(+(1, n4_0)))) ->_IH 23.30/9.42 p(*3_0) 23.30/9.42 23.30/9.42 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (20) 23.30/9.42 Complex Obligation (BEST) 23.30/9.42 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (21) 23.30/9.42 Obligation: 23.30/9.42 Proved the lower bound n^1 for the following obligation: 23.30/9.42 23.30/9.42 TRS: 23.30/9.42 Rules: 23.30/9.42 minus(X, 0') -> X 23.30/9.42 minus(s(X), s(Y)) -> p(minus(X, Y)) 23.30/9.42 p(s(X)) -> X 23.30/9.42 div(0', s(Y)) -> 0' 23.30/9.42 div(s(X), s(Y)) -> s(div(minus(X, Y), s(Y))) 23.30/9.42 23.30/9.42 Types: 23.30/9.42 minus :: 0':s -> 0':s -> 0':s 23.30/9.42 0' :: 0':s 23.30/9.42 s :: 0':s -> 0':s 23.30/9.42 p :: 0':s -> 0':s 23.30/9.42 div :: 0':s -> 0':s -> 0':s 23.30/9.42 hole_0':s1_0 :: 0':s 23.30/9.42 gen_0':s2_0 :: Nat -> 0':s 23.30/9.42 23.30/9.42 23.30/9.42 Generator Equations: 23.30/9.42 gen_0':s2_0(0) <=> 0' 23.30/9.42 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 23.30/9.42 23.30/9.42 23.30/9.42 The following defined symbols remain to be analysed: 23.30/9.42 minus, div 23.30/9.42 23.30/9.42 They will be analysed ascendingly in the following order: 23.30/9.42 minus < div 23.30/9.42 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (22) LowerBoundPropagationProof (FINISHED) 23.30/9.42 Propagated lower bound. 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (23) 23.30/9.42 BOUNDS(n^1, INF) 23.30/9.42 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (24) 23.30/9.42 Obligation: 23.30/9.42 TRS: 23.30/9.42 Rules: 23.30/9.42 minus(X, 0') -> X 23.30/9.42 minus(s(X), s(Y)) -> p(minus(X, Y)) 23.30/9.42 p(s(X)) -> X 23.30/9.42 div(0', s(Y)) -> 0' 23.30/9.42 div(s(X), s(Y)) -> s(div(minus(X, Y), s(Y))) 23.30/9.42 23.30/9.42 Types: 23.30/9.42 minus :: 0':s -> 0':s -> 0':s 23.30/9.42 0' :: 0':s 23.30/9.42 s :: 0':s -> 0':s 23.30/9.42 p :: 0':s -> 0':s 23.30/9.42 div :: 0':s -> 0':s -> 0':s 23.30/9.42 hole_0':s1_0 :: 0':s 23.30/9.42 gen_0':s2_0 :: Nat -> 0':s 23.30/9.42 23.30/9.42 23.30/9.42 Lemmas: 23.30/9.42 minus(gen_0':s2_0(+(1, n4_0)), gen_0':s2_0(+(1, n4_0))) -> *3_0, rt in Omega(n4_0) 23.30/9.42 23.30/9.42 23.30/9.42 Generator Equations: 23.30/9.42 gen_0':s2_0(0) <=> 0' 23.30/9.42 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 23.30/9.42 23.30/9.42 23.30/9.42 The following defined symbols remain to be analysed: 23.30/9.42 div 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (25) RewriteLemmaProof (LOWER BOUND(ID)) 23.30/9.42 Proved the following rewrite lemma: 23.30/9.42 div(gen_0':s2_0(n1747_0), gen_0':s2_0(1)) -> gen_0':s2_0(n1747_0), rt in Omega(1 + n1747_0) 23.30/9.42 23.30/9.42 Induction Base: 23.30/9.42 div(gen_0':s2_0(0), gen_0':s2_0(1)) ->_R^Omega(1) 23.30/9.42 0' 23.30/9.42 23.30/9.42 Induction Step: 23.30/9.42 div(gen_0':s2_0(+(n1747_0, 1)), gen_0':s2_0(1)) ->_R^Omega(1) 23.30/9.42 s(div(minus(gen_0':s2_0(n1747_0), gen_0':s2_0(0)), s(gen_0':s2_0(0)))) ->_R^Omega(1) 23.30/9.42 s(div(gen_0':s2_0(n1747_0), s(gen_0':s2_0(0)))) ->_IH 23.30/9.42 s(gen_0':s2_0(c1748_0)) 23.30/9.42 23.30/9.42 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 23.30/9.42 ---------------------------------------- 23.30/9.42 23.30/9.42 (26) 23.30/9.42 BOUNDS(1, INF) 23.30/9.45 EOF