25.60/7.43 WORST_CASE(Omega(n^2), O(n^2)) 25.60/7.44 proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml 25.60/7.44 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 25.60/7.44 25.60/7.44 25.60/7.44 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, n^2). 25.60/7.44 25.60/7.44 (0) CpxTRS 25.60/7.44 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 25.60/7.44 (2) CpxWeightedTrs 25.60/7.44 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 25.60/7.44 (4) CpxTypedWeightedTrs 25.60/7.44 (5) CompletionProof [UPPER BOUND(ID), 0 ms] 25.60/7.44 (6) CpxTypedWeightedCompleteTrs 25.60/7.44 (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 7 ms] 25.60/7.44 (8) CpxRNTS 25.60/7.44 (9) CompleteCoflocoProof [FINISHED, 145 ms] 25.60/7.44 (10) BOUNDS(1, n^2) 25.60/7.44 (11) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 25.60/7.44 (12) CpxTRS 25.60/7.44 (13) SlicingProof [LOWER BOUND(ID), 0 ms] 25.60/7.44 (14) CpxTRS 25.60/7.44 (15) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 25.60/7.44 (16) typed CpxTrs 25.60/7.44 (17) OrderProof [LOWER BOUND(ID), 0 ms] 25.60/7.44 (18) typed CpxTrs 25.60/7.44 (19) RewriteLemmaProof [LOWER BOUND(ID), 280 ms] 25.60/7.44 (20) BEST 25.60/7.44 (21) proven lower bound 25.60/7.44 (22) LowerBoundPropagationProof [FINISHED, 0 ms] 25.60/7.44 (23) BOUNDS(n^1, INF) 25.60/7.44 (24) typed CpxTrs 25.60/7.44 (25) RewriteLemmaProof [LOWER BOUND(ID), 1813 ms] 25.60/7.44 (26) proven lower bound 25.60/7.44 (27) LowerBoundPropagationProof [FINISHED, 0 ms] 25.60/7.44 (28) BOUNDS(n^2, INF) 25.60/7.44 25.60/7.44 25.60/7.44 ---------------------------------------- 25.60/7.44 25.60/7.44 (0) 25.60/7.44 Obligation: 25.60/7.44 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, n^2). 25.60/7.44 25.60/7.44 25.60/7.44 The TRS R consists of the following rules: 25.60/7.44 25.60/7.44 fac(s(x)) -> *(fac(p(s(x))), s(x)) 25.60/7.44 p(s(0)) -> 0 25.60/7.44 p(s(s(x))) -> s(p(s(x))) 25.60/7.44 25.60/7.44 S is empty. 25.60/7.44 Rewrite Strategy: INNERMOST 25.60/7.44 ---------------------------------------- 25.60/7.44 25.60/7.44 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 25.60/7.44 Transformed relative TRS to weighted TRS 25.60/7.44 ---------------------------------------- 25.60/7.44 25.60/7.44 (2) 25.60/7.44 Obligation: 25.60/7.44 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 25.60/7.44 25.60/7.44 25.60/7.44 The TRS R consists of the following rules: 25.60/7.44 25.60/7.44 fac(s(x)) -> *(fac(p(s(x))), s(x)) [1] 25.60/7.44 p(s(0)) -> 0 [1] 25.60/7.44 p(s(s(x))) -> s(p(s(x))) [1] 25.60/7.44 25.60/7.44 Rewrite Strategy: INNERMOST 25.60/7.44 ---------------------------------------- 25.60/7.44 25.60/7.44 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 25.60/7.44 Infered types. 25.60/7.44 ---------------------------------------- 25.60/7.44 25.60/7.44 (4) 25.60/7.44 Obligation: 25.60/7.44 Runtime Complexity Weighted TRS with Types. 25.60/7.44 The TRS R consists of the following rules: 25.60/7.44 25.60/7.44 fac(s(x)) -> *(fac(p(s(x))), s(x)) [1] 25.60/7.44 p(s(0)) -> 0 [1] 25.60/7.44 p(s(s(x))) -> s(p(s(x))) [1] 25.60/7.44 25.60/7.44 The TRS has the following type information: 25.60/7.44 fac :: s:0 -> * 25.60/7.44 s :: s:0 -> s:0 25.60/7.44 * :: * -> s:0 -> * 25.60/7.44 p :: s:0 -> s:0 25.60/7.44 0 :: s:0 25.60/7.44 25.60/7.44 Rewrite Strategy: INNERMOST 25.60/7.44 ---------------------------------------- 25.60/7.44 25.60/7.44 (5) CompletionProof (UPPER BOUND(ID)) 25.60/7.44 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 25.60/7.44 25.60/7.44 fac(v0) -> null_fac [0] 25.60/7.44 p(v0) -> null_p [0] 25.60/7.44 25.60/7.44 And the following fresh constants: null_fac, null_p 25.60/7.44 25.60/7.44 ---------------------------------------- 25.60/7.44 25.60/7.44 (6) 25.60/7.44 Obligation: 25.60/7.44 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 25.60/7.44 25.60/7.44 Runtime Complexity Weighted TRS with Types. 25.60/7.44 The TRS R consists of the following rules: 25.60/7.44 25.60/7.44 fac(s(x)) -> *(fac(p(s(x))), s(x)) [1] 25.60/7.44 p(s(0)) -> 0 [1] 25.60/7.44 p(s(s(x))) -> s(p(s(x))) [1] 25.60/7.44 fac(v0) -> null_fac [0] 25.60/7.44 p(v0) -> null_p [0] 25.60/7.44 25.60/7.44 The TRS has the following type information: 25.60/7.44 fac :: s:0:null_p -> *:null_fac 25.60/7.44 s :: s:0:null_p -> s:0:null_p 25.60/7.44 * :: *:null_fac -> s:0:null_p -> *:null_fac 25.60/7.44 p :: s:0:null_p -> s:0:null_p 25.60/7.44 0 :: s:0:null_p 25.60/7.44 null_fac :: *:null_fac 25.60/7.44 null_p :: s:0:null_p 25.60/7.44 25.60/7.44 Rewrite Strategy: INNERMOST 25.60/7.44 ---------------------------------------- 25.60/7.44 25.60/7.44 (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 25.60/7.44 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 25.60/7.44 The constant constructors are abstracted as follows: 25.60/7.44 25.60/7.44 0 => 0 25.60/7.44 null_fac => 0 25.60/7.44 null_p => 0 25.60/7.44 25.60/7.44 ---------------------------------------- 25.60/7.44 25.60/7.44 (8) 25.60/7.44 Obligation: 25.60/7.44 Complexity RNTS consisting of the following rules: 25.60/7.44 25.60/7.44 fac(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 25.60/7.44 fac(z) -{ 1 }-> 1 + fac(p(1 + x)) + (1 + x) :|: x >= 0, z = 1 + x 25.60/7.44 p(z) -{ 1 }-> 0 :|: z = 1 + 0 25.60/7.44 p(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 25.60/7.44 p(z) -{ 1 }-> 1 + p(1 + x) :|: x >= 0, z = 1 + (1 + x) 25.60/7.44 25.60/7.44 Only complete derivations are relevant for the runtime complexity. 25.60/7.44 25.60/7.44 ---------------------------------------- 25.60/7.44 25.60/7.44 (9) CompleteCoflocoProof (FINISHED) 25.60/7.44 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 25.60/7.44 25.60/7.44 eq(start(V),0,[fac(V, Out)],[V >= 0]). 25.60/7.44 eq(start(V),0,[p(V, Out)],[V >= 0]). 25.60/7.44 eq(fac(V, Out),1,[p(1 + V1, Ret010),fac(Ret010, Ret01)],[Out = 2 + Ret01 + V1,V1 >= 0,V = 1 + V1]). 25.60/7.44 eq(p(V, Out),1,[],[Out = 0,V = 1]). 25.60/7.44 eq(p(V, Out),1,[p(1 + V2, Ret1)],[Out = 1 + Ret1,V2 >= 0,V = 2 + V2]). 25.60/7.44 eq(fac(V, Out),0,[],[Out = 0,V3 >= 0,V = V3]). 25.60/7.44 eq(p(V, Out),0,[],[Out = 0,V4 >= 0,V = V4]). 25.60/7.44 input_output_vars(fac(V,Out),[V],[Out]). 25.60/7.44 input_output_vars(p(V,Out),[V],[Out]). 25.60/7.44 25.60/7.44 25.60/7.44 CoFloCo proof output: 25.60/7.44 Preprocessing Cost Relations 25.60/7.44 ===================================== 25.60/7.44 25.60/7.44 #### Computed strongly connected components 25.60/7.44 0. recursive : [p/2] 25.60/7.44 1. recursive : [fac/2] 25.60/7.44 2. non_recursive : [start/1] 25.60/7.44 25.60/7.44 #### Obtained direct recursion through partial evaluation 25.60/7.44 0. SCC is partially evaluated into p/2 25.60/7.44 1. SCC is partially evaluated into fac/2 25.60/7.44 2. SCC is partially evaluated into start/1 25.60/7.44 25.60/7.44 Control-Flow Refinement of Cost Relations 25.60/7.44 ===================================== 25.60/7.44 25.60/7.44 ### Specialization of cost equations p/2 25.60/7.44 * CE 5 is refined into CE [8] 25.60/7.44 * CE 7 is refined into CE [9] 25.60/7.44 * CE 6 is refined into CE [10] 25.60/7.44 25.60/7.44 25.60/7.44 ### Cost equations --> "Loop" of p/2 25.60/7.44 * CEs [10] --> Loop 6 25.60/7.44 * CEs [8,9] --> Loop 7 25.60/7.44 25.60/7.44 ### Ranking functions of CR p(V,Out) 25.60/7.44 * RF of phase [6]: [V-1] 25.60/7.44 25.60/7.44 #### Partial ranking functions of CR p(V,Out) 25.60/7.44 * Partial RF of phase [6]: 25.60/7.44 - RF of loop [6:1]: 25.60/7.44 V-1 25.60/7.44 25.60/7.44 25.60/7.44 ### Specialization of cost equations fac/2 25.60/7.44 * CE 4 is refined into CE [11] 25.60/7.44 * CE 3 is refined into CE [12,13] 25.60/7.44 25.60/7.44 25.60/7.44 ### Cost equations --> "Loop" of fac/2 25.60/7.44 * CEs [13] --> Loop 8 25.60/7.44 * CEs [12] --> Loop 9 25.60/7.44 * CEs [11] --> Loop 10 25.60/7.44 25.60/7.44 ### Ranking functions of CR fac(V,Out) 25.60/7.44 * RF of phase [8]: [V-1] 25.60/7.44 25.60/7.44 #### Partial ranking functions of CR fac(V,Out) 25.60/7.44 * Partial RF of phase [8]: 25.60/7.44 - RF of loop [8:1]: 25.60/7.44 V-1 25.60/7.44 25.60/7.44 25.60/7.44 ### Specialization of cost equations start/1 25.60/7.44 * CE 1 is refined into CE [14,15,16] 25.60/7.44 * CE 2 is refined into CE [17,18] 25.60/7.44 25.60/7.44 25.60/7.44 ### Cost equations --> "Loop" of start/1 25.60/7.44 * CEs [14,15,16,17,18] --> Loop 11 25.60/7.44 25.60/7.44 ### Ranking functions of CR start(V) 25.60/7.44 25.60/7.44 #### Partial ranking functions of CR start(V) 25.60/7.44 25.60/7.44 25.60/7.44 Computing Bounds 25.60/7.44 ===================================== 25.60/7.44 25.60/7.44 #### Cost of chains of p(V,Out): 25.60/7.44 * Chain [[6],7]: 1*it(6)+1 25.60/7.44 Such that:it(6) =< Out 25.60/7.44 25.60/7.44 with precondition: [Out>=1,V>=Out+1] 25.60/7.44 25.60/7.44 * Chain [7]: 1 25.60/7.44 with precondition: [Out=0,V>=0] 25.60/7.44 25.60/7.44 25.60/7.44 #### Cost of chains of fac(V,Out): 25.60/7.44 * Chain [[8],10]: 2*it(8)+1*s(3)+0 25.60/7.44 Such that:aux(3) =< V 25.60/7.44 it(8) =< aux(3) 25.60/7.44 s(3) =< it(8)*aux(3) 25.60/7.44 25.60/7.44 with precondition: [V>=2,Out>=V+1] 25.60/7.44 25.60/7.44 * Chain [[8],9,10]: 2*it(8)+1*s(3)+2 25.60/7.44 Such that:aux(4) =< V 25.60/7.44 it(8) =< aux(4) 25.60/7.44 s(3) =< it(8)*aux(4) 25.60/7.44 25.60/7.44 with precondition: [V>=2,Out>=V+3] 25.60/7.44 25.60/7.44 * Chain [10]: 0 25.60/7.44 with precondition: [Out=0,V>=0] 25.60/7.44 25.60/7.44 * Chain [9,10]: 2 25.60/7.44 with precondition: [V+1=Out,V>=1] 25.60/7.44 25.60/7.44 25.60/7.44 #### Cost of chains of start(V): 25.60/7.44 * Chain [11]: 5*s(11)+2*s(12)+2 25.60/7.44 Such that:aux(6) =< V 25.60/7.44 s(11) =< aux(6) 25.60/7.44 s(12) =< s(11)*aux(6) 25.60/7.44 25.60/7.44 with precondition: [V>=0] 25.60/7.44 25.60/7.44 25.60/7.44 Closed-form bounds of start(V): 25.60/7.44 ------------------------------------- 25.60/7.44 * Chain [11] with precondition: [V>=0] 25.60/7.44 - Upper bound: 5*V+2+2*V*V 25.60/7.44 - Complexity: n^2 25.60/7.44 25.60/7.44 ### Maximum cost of start(V): 5*V+2+2*V*V 25.60/7.44 Asymptotic class: n^2 25.60/7.44 * Total analysis performed in 75 ms. 25.60/7.44 25.60/7.44 25.60/7.44 ---------------------------------------- 25.60/7.44 25.60/7.44 (10) 25.60/7.44 BOUNDS(1, n^2) 25.60/7.44 25.60/7.44 ---------------------------------------- 25.60/7.44 25.60/7.44 (11) RenamingProof (BOTH BOUNDS(ID, ID)) 25.60/7.44 Renamed function symbols to avoid clashes with predefined symbol. 25.60/7.44 ---------------------------------------- 25.60/7.44 25.60/7.44 (12) 25.60/7.44 Obligation: 25.60/7.44 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). 25.60/7.44 25.60/7.44 25.60/7.44 The TRS R consists of the following rules: 25.60/7.44 25.60/7.44 fac(s(x)) -> *'(fac(p(s(x))), s(x)) 25.60/7.44 p(s(0')) -> 0' 25.60/7.44 p(s(s(x))) -> s(p(s(x))) 25.60/7.44 25.60/7.44 S is empty. 25.60/7.44 Rewrite Strategy: INNERMOST 25.60/7.44 ---------------------------------------- 25.60/7.44 25.60/7.44 (13) SlicingProof (LOWER BOUND(ID)) 25.60/7.44 Sliced the following arguments: 25.60/7.45 *'/1 25.60/7.45 25.60/7.45 ---------------------------------------- 25.60/7.45 25.60/7.45 (14) 25.60/7.45 Obligation: 25.60/7.45 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). 25.60/7.45 25.60/7.45 25.60/7.45 The TRS R consists of the following rules: 25.60/7.45 25.60/7.45 fac(s(x)) -> *'(fac(p(s(x)))) 25.60/7.45 p(s(0')) -> 0' 25.60/7.45 p(s(s(x))) -> s(p(s(x))) 25.60/7.45 25.60/7.45 S is empty. 25.60/7.45 Rewrite Strategy: INNERMOST 25.60/7.45 ---------------------------------------- 25.60/7.45 25.60/7.45 (15) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 25.60/7.45 Infered types. 25.60/7.45 ---------------------------------------- 25.60/7.45 25.60/7.45 (16) 25.60/7.45 Obligation: 25.60/7.45 Innermost TRS: 25.60/7.45 Rules: 25.60/7.45 fac(s(x)) -> *'(fac(p(s(x)))) 25.60/7.45 p(s(0')) -> 0' 25.60/7.45 p(s(s(x))) -> s(p(s(x))) 25.60/7.45 25.60/7.45 Types: 25.60/7.45 fac :: s:0' -> *' 25.60/7.45 s :: s:0' -> s:0' 25.60/7.45 *' :: *' -> *' 25.60/7.45 p :: s:0' -> s:0' 25.60/7.45 0' :: s:0' 25.60/7.45 hole_*'1_0 :: *' 25.60/7.45 hole_s:0'2_0 :: s:0' 25.60/7.45 gen_*'3_0 :: Nat -> *' 25.60/7.45 gen_s:0'4_0 :: Nat -> s:0' 25.60/7.45 25.60/7.45 ---------------------------------------- 25.60/7.45 25.60/7.45 (17) OrderProof (LOWER BOUND(ID)) 25.60/7.45 Heuristically decided to analyse the following defined symbols: 25.60/7.45 fac, p 25.60/7.45 25.60/7.45 They will be analysed ascendingly in the following order: 25.60/7.45 p < fac 25.60/7.45 25.60/7.45 ---------------------------------------- 25.60/7.45 25.60/7.45 (18) 25.60/7.45 Obligation: 25.60/7.45 Innermost TRS: 25.60/7.45 Rules: 25.60/7.45 fac(s(x)) -> *'(fac(p(s(x)))) 25.60/7.45 p(s(0')) -> 0' 25.60/7.45 p(s(s(x))) -> s(p(s(x))) 25.60/7.45 25.60/7.45 Types: 25.60/7.45 fac :: s:0' -> *' 25.60/7.45 s :: s:0' -> s:0' 25.60/7.45 *' :: *' -> *' 25.60/7.45 p :: s:0' -> s:0' 25.60/7.45 0' :: s:0' 25.60/7.45 hole_*'1_0 :: *' 25.60/7.45 hole_s:0'2_0 :: s:0' 25.60/7.45 gen_*'3_0 :: Nat -> *' 25.60/7.45 gen_s:0'4_0 :: Nat -> s:0' 25.60/7.45 25.60/7.45 25.60/7.45 Generator Equations: 25.60/7.45 gen_*'3_0(0) <=> hole_*'1_0 25.60/7.45 gen_*'3_0(+(x, 1)) <=> *'(gen_*'3_0(x)) 25.60/7.45 gen_s:0'4_0(0) <=> 0' 25.60/7.45 gen_s:0'4_0(+(x, 1)) <=> s(gen_s:0'4_0(x)) 25.60/7.45 25.60/7.45 25.60/7.45 The following defined symbols remain to be analysed: 25.60/7.45 p, fac 25.60/7.45 25.60/7.45 They will be analysed ascendingly in the following order: 25.60/7.45 p < fac 25.60/7.45 25.60/7.45 ---------------------------------------- 25.60/7.45 25.60/7.45 (19) RewriteLemmaProof (LOWER BOUND(ID)) 25.60/7.45 Proved the following rewrite lemma: 25.60/7.45 p(gen_s:0'4_0(+(1, n6_0))) -> gen_s:0'4_0(n6_0), rt in Omega(1 + n6_0) 25.60/7.45 25.60/7.45 Induction Base: 25.60/7.45 p(gen_s:0'4_0(+(1, 0))) ->_R^Omega(1) 25.60/7.45 0' 25.60/7.45 25.60/7.45 Induction Step: 25.60/7.45 p(gen_s:0'4_0(+(1, +(n6_0, 1)))) ->_R^Omega(1) 25.60/7.45 s(p(s(gen_s:0'4_0(n6_0)))) ->_IH 25.60/7.45 s(gen_s:0'4_0(c7_0)) 25.60/7.45 25.60/7.45 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 25.60/7.45 ---------------------------------------- 25.60/7.45 25.60/7.45 (20) 25.60/7.45 Complex Obligation (BEST) 25.60/7.45 25.60/7.45 ---------------------------------------- 25.60/7.45 25.60/7.45 (21) 25.60/7.45 Obligation: 25.60/7.45 Proved the lower bound n^1 for the following obligation: 25.60/7.45 25.60/7.45 Innermost TRS: 25.60/7.45 Rules: 25.60/7.45 fac(s(x)) -> *'(fac(p(s(x)))) 25.60/7.45 p(s(0')) -> 0' 25.60/7.45 p(s(s(x))) -> s(p(s(x))) 25.60/7.45 25.60/7.45 Types: 25.60/7.45 fac :: s:0' -> *' 25.60/7.45 s :: s:0' -> s:0' 25.60/7.45 *' :: *' -> *' 25.60/7.45 p :: s:0' -> s:0' 25.60/7.45 0' :: s:0' 25.60/7.45 hole_*'1_0 :: *' 25.60/7.45 hole_s:0'2_0 :: s:0' 25.60/7.45 gen_*'3_0 :: Nat -> *' 25.60/7.45 gen_s:0'4_0 :: Nat -> s:0' 25.60/7.45 25.60/7.45 25.60/7.45 Generator Equations: 25.60/7.45 gen_*'3_0(0) <=> hole_*'1_0 25.60/7.45 gen_*'3_0(+(x, 1)) <=> *'(gen_*'3_0(x)) 25.60/7.45 gen_s:0'4_0(0) <=> 0' 25.60/7.45 gen_s:0'4_0(+(x, 1)) <=> s(gen_s:0'4_0(x)) 25.60/7.45 25.60/7.45 25.60/7.45 The following defined symbols remain to be analysed: 25.60/7.45 p, fac 25.60/7.45 25.60/7.45 They will be analysed ascendingly in the following order: 25.60/7.45 p < fac 25.60/7.45 25.60/7.45 ---------------------------------------- 25.60/7.45 25.60/7.45 (22) LowerBoundPropagationProof (FINISHED) 25.60/7.45 Propagated lower bound. 25.60/7.45 ---------------------------------------- 25.60/7.45 25.60/7.45 (23) 25.60/7.45 BOUNDS(n^1, INF) 25.60/7.45 25.60/7.45 ---------------------------------------- 25.60/7.45 25.60/7.45 (24) 25.60/7.45 Obligation: 25.60/7.45 Innermost TRS: 25.60/7.45 Rules: 25.60/7.45 fac(s(x)) -> *'(fac(p(s(x)))) 25.60/7.45 p(s(0')) -> 0' 25.60/7.45 p(s(s(x))) -> s(p(s(x))) 25.60/7.45 25.60/7.45 Types: 25.60/7.45 fac :: s:0' -> *' 25.60/7.45 s :: s:0' -> s:0' 25.60/7.45 *' :: *' -> *' 25.60/7.45 p :: s:0' -> s:0' 25.60/7.45 0' :: s:0' 25.60/7.45 hole_*'1_0 :: *' 25.60/7.45 hole_s:0'2_0 :: s:0' 25.60/7.45 gen_*'3_0 :: Nat -> *' 25.60/7.45 gen_s:0'4_0 :: Nat -> s:0' 25.60/7.45 25.60/7.45 25.60/7.45 Lemmas: 25.60/7.45 p(gen_s:0'4_0(+(1, n6_0))) -> gen_s:0'4_0(n6_0), rt in Omega(1 + n6_0) 25.60/7.45 25.60/7.45 25.60/7.45 Generator Equations: 25.60/7.45 gen_*'3_0(0) <=> hole_*'1_0 25.60/7.45 gen_*'3_0(+(x, 1)) <=> *'(gen_*'3_0(x)) 25.60/7.45 gen_s:0'4_0(0) <=> 0' 25.60/7.45 gen_s:0'4_0(+(x, 1)) <=> s(gen_s:0'4_0(x)) 25.60/7.45 25.60/7.45 25.60/7.45 The following defined symbols remain to be analysed: 25.60/7.45 fac 25.60/7.45 ---------------------------------------- 25.60/7.45 25.60/7.45 (25) RewriteLemmaProof (LOWER BOUND(ID)) 25.60/7.45 Proved the following rewrite lemma: 25.60/7.45 fac(gen_s:0'4_0(+(1, n221_0))) -> *5_0, rt in Omega(n221_0 + n221_0^2) 25.60/7.45 25.60/7.45 Induction Base: 25.60/7.45 fac(gen_s:0'4_0(+(1, 0))) 25.60/7.45 25.60/7.45 Induction Step: 25.60/7.45 fac(gen_s:0'4_0(+(1, +(n221_0, 1)))) ->_R^Omega(1) 25.60/7.45 *'(fac(p(s(gen_s:0'4_0(+(1, n221_0)))))) ->_L^Omega(2 + n221_0) 25.60/7.45 *'(fac(gen_s:0'4_0(+(1, n221_0)))) ->_IH 25.60/7.45 *'(*5_0) 25.60/7.45 25.60/7.45 We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). 25.60/7.45 ---------------------------------------- 25.60/7.45 25.60/7.45 (26) 25.60/7.45 Obligation: 25.60/7.45 Proved the lower bound n^2 for the following obligation: 25.60/7.45 25.60/7.45 Innermost TRS: 25.60/7.45 Rules: 25.60/7.45 fac(s(x)) -> *'(fac(p(s(x)))) 25.60/7.45 p(s(0')) -> 0' 25.60/7.45 p(s(s(x))) -> s(p(s(x))) 25.60/7.45 25.60/7.45 Types: 25.60/7.45 fac :: s:0' -> *' 25.60/7.45 s :: s:0' -> s:0' 25.60/7.45 *' :: *' -> *' 25.60/7.45 p :: s:0' -> s:0' 25.60/7.45 0' :: s:0' 25.60/7.45 hole_*'1_0 :: *' 25.60/7.45 hole_s:0'2_0 :: s:0' 25.60/7.45 gen_*'3_0 :: Nat -> *' 25.60/7.45 gen_s:0'4_0 :: Nat -> s:0' 25.60/7.45 25.60/7.45 25.60/7.45 Lemmas: 25.60/7.45 p(gen_s:0'4_0(+(1, n6_0))) -> gen_s:0'4_0(n6_0), rt in Omega(1 + n6_0) 25.60/7.45 25.60/7.45 25.60/7.45 Generator Equations: 25.60/7.45 gen_*'3_0(0) <=> hole_*'1_0 25.60/7.45 gen_*'3_0(+(x, 1)) <=> *'(gen_*'3_0(x)) 25.60/7.45 gen_s:0'4_0(0) <=> 0' 25.60/7.45 gen_s:0'4_0(+(x, 1)) <=> s(gen_s:0'4_0(x)) 25.60/7.45 25.60/7.45 25.60/7.45 The following defined symbols remain to be analysed: 25.60/7.45 fac 25.60/7.45 ---------------------------------------- 25.60/7.45 25.60/7.45 (27) LowerBoundPropagationProof (FINISHED) 25.60/7.45 Propagated lower bound. 25.60/7.45 ---------------------------------------- 25.60/7.45 25.60/7.45 (28) 25.60/7.45 BOUNDS(n^2, INF) 25.77/7.54 EOF