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