1126.85/291.50 WORST_CASE(Omega(n^3), ?) 1126.85/291.52 proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml 1126.85/291.52 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 1126.85/291.52 1126.85/291.52 1126.85/291.52 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^3, INF). 1126.85/291.52 1126.85/291.52 (0) CpxTRS 1126.85/291.52 (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 1126.85/291.52 (2) CpxTRS 1126.85/291.52 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 1126.85/291.52 (4) typed CpxTrs 1126.85/291.52 (5) OrderProof [LOWER BOUND(ID), 0 ms] 1126.85/291.52 (6) typed CpxTrs 1126.85/291.52 (7) RewriteLemmaProof [LOWER BOUND(ID), 311 ms] 1126.85/291.52 (8) BEST 1126.85/291.52 (9) proven lower bound 1126.85/291.52 (10) LowerBoundPropagationProof [FINISHED, 0 ms] 1126.85/291.52 (11) BOUNDS(n^1, INF) 1126.85/291.52 (12) typed CpxTrs 1126.85/291.52 (13) RewriteLemmaProof [LOWER BOUND(ID), 85 ms] 1126.85/291.52 (14) BEST 1126.85/291.52 (15) proven lower bound 1126.85/291.52 (16) LowerBoundPropagationProof [FINISHED, 0 ms] 1126.85/291.52 (17) BOUNDS(n^2, INF) 1126.85/291.52 (18) typed CpxTrs 1126.85/291.52 (19) RewriteLemmaProof [LOWER BOUND(ID), 609 ms] 1126.85/291.52 (20) typed CpxTrs 1126.85/291.52 (21) RewriteLemmaProof [LOWER BOUND(ID), 266 ms] 1126.85/291.52 (22) proven lower bound 1126.85/291.52 (23) LowerBoundPropagationProof [FINISHED, 0 ms] 1126.85/291.52 (24) BOUNDS(n^3, INF) 1126.85/291.52 1126.85/291.52 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (0) 1126.85/291.52 Obligation: 1126.85/291.52 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^3, INF). 1126.85/291.52 1126.85/291.52 1126.85/291.52 The TRS R consists of the following rules: 1126.85/291.52 1126.85/291.52 plus(0, x) -> x 1126.85/291.52 plus(s(x), y) -> s(plus(x, y)) 1126.85/291.52 times(0, y) -> 0 1126.85/291.52 times(s(x), y) -> plus(y, times(x, y)) 1126.85/291.52 p(s(x)) -> x 1126.85/291.52 p(0) -> 0 1126.85/291.52 minus(x, 0) -> x 1126.85/291.52 minus(0, x) -> 0 1126.85/291.52 minus(x, s(y)) -> p(minus(x, y)) 1126.85/291.52 isZero(0) -> true 1126.85/291.52 isZero(s(x)) -> false 1126.85/291.52 facIter(x, y) -> if(isZero(x), minus(x, s(0)), y, times(y, x)) 1126.85/291.52 if(true, x, y, z) -> y 1126.85/291.52 if(false, x, y, z) -> facIter(x, z) 1126.85/291.52 factorial(x) -> facIter(x, s(0)) 1126.85/291.52 1126.85/291.52 S is empty. 1126.85/291.52 Rewrite Strategy: INNERMOST 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (1) RenamingProof (BOTH BOUNDS(ID, ID)) 1126.85/291.52 Renamed function symbols to avoid clashes with predefined symbol. 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (2) 1126.85/291.52 Obligation: 1126.85/291.52 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^3, INF). 1126.85/291.52 1126.85/291.52 1126.85/291.52 The TRS R consists of the following rules: 1126.85/291.52 1126.85/291.52 plus(0', x) -> x 1126.85/291.52 plus(s(x), y) -> s(plus(x, y)) 1126.85/291.52 times(0', y) -> 0' 1126.85/291.52 times(s(x), y) -> plus(y, times(x, y)) 1126.85/291.52 p(s(x)) -> x 1126.85/291.52 p(0') -> 0' 1126.85/291.52 minus(x, 0') -> x 1126.85/291.52 minus(0', x) -> 0' 1126.85/291.52 minus(x, s(y)) -> p(minus(x, y)) 1126.85/291.52 isZero(0') -> true 1126.85/291.52 isZero(s(x)) -> false 1126.85/291.52 facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) 1126.85/291.52 if(true, x, y, z) -> y 1126.85/291.52 if(false, x, y, z) -> facIter(x, z) 1126.85/291.52 factorial(x) -> facIter(x, s(0')) 1126.85/291.52 1126.85/291.52 S is empty. 1126.85/291.52 Rewrite Strategy: INNERMOST 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 1126.85/291.52 Infered types. 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (4) 1126.85/291.52 Obligation: 1126.85/291.52 Innermost TRS: 1126.85/291.52 Rules: 1126.85/291.52 plus(0', x) -> x 1126.85/291.52 plus(s(x), y) -> s(plus(x, y)) 1126.85/291.52 times(0', y) -> 0' 1126.85/291.52 times(s(x), y) -> plus(y, times(x, y)) 1126.85/291.52 p(s(x)) -> x 1126.85/291.52 p(0') -> 0' 1126.85/291.52 minus(x, 0') -> x 1126.85/291.52 minus(0', x) -> 0' 1126.85/291.52 minus(x, s(y)) -> p(minus(x, y)) 1126.85/291.52 isZero(0') -> true 1126.85/291.52 isZero(s(x)) -> false 1126.85/291.52 facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) 1126.85/291.52 if(true, x, y, z) -> y 1126.85/291.52 if(false, x, y, z) -> facIter(x, z) 1126.85/291.52 factorial(x) -> facIter(x, s(0')) 1126.85/291.52 1126.85/291.52 Types: 1126.85/291.52 plus :: 0':s -> 0':s -> 0':s 1126.85/291.52 0' :: 0':s 1126.85/291.52 s :: 0':s -> 0':s 1126.85/291.52 times :: 0':s -> 0':s -> 0':s 1126.85/291.52 p :: 0':s -> 0':s 1126.85/291.52 minus :: 0':s -> 0':s -> 0':s 1126.85/291.52 isZero :: 0':s -> true:false 1126.85/291.52 true :: true:false 1126.85/291.52 false :: true:false 1126.85/291.52 facIter :: 0':s -> 0':s -> 0':s 1126.85/291.52 if :: true:false -> 0':s -> 0':s -> 0':s -> 0':s 1126.85/291.52 factorial :: 0':s -> 0':s 1126.85/291.52 hole_0':s1_0 :: 0':s 1126.85/291.52 hole_true:false2_0 :: true:false 1126.85/291.52 gen_0':s3_0 :: Nat -> 0':s 1126.85/291.52 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (5) OrderProof (LOWER BOUND(ID)) 1126.85/291.52 Heuristically decided to analyse the following defined symbols: 1126.85/291.52 plus, times, minus, facIter 1126.85/291.52 1126.85/291.52 They will be analysed ascendingly in the following order: 1126.85/291.52 plus < times 1126.85/291.52 times < facIter 1126.85/291.52 minus < facIter 1126.85/291.52 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (6) 1126.85/291.52 Obligation: 1126.85/291.52 Innermost TRS: 1126.85/291.52 Rules: 1126.85/291.52 plus(0', x) -> x 1126.85/291.52 plus(s(x), y) -> s(plus(x, y)) 1126.85/291.52 times(0', y) -> 0' 1126.85/291.52 times(s(x), y) -> plus(y, times(x, y)) 1126.85/291.52 p(s(x)) -> x 1126.85/291.52 p(0') -> 0' 1126.85/291.52 minus(x, 0') -> x 1126.85/291.52 minus(0', x) -> 0' 1126.85/291.52 minus(x, s(y)) -> p(minus(x, y)) 1126.85/291.52 isZero(0') -> true 1126.85/291.52 isZero(s(x)) -> false 1126.85/291.52 facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) 1126.85/291.52 if(true, x, y, z) -> y 1126.85/291.52 if(false, x, y, z) -> facIter(x, z) 1126.85/291.52 factorial(x) -> facIter(x, s(0')) 1126.85/291.52 1126.85/291.52 Types: 1126.85/291.52 plus :: 0':s -> 0':s -> 0':s 1126.85/291.52 0' :: 0':s 1126.85/291.52 s :: 0':s -> 0':s 1126.85/291.52 times :: 0':s -> 0':s -> 0':s 1126.85/291.52 p :: 0':s -> 0':s 1126.85/291.52 minus :: 0':s -> 0':s -> 0':s 1126.85/291.52 isZero :: 0':s -> true:false 1126.85/291.52 true :: true:false 1126.85/291.52 false :: true:false 1126.85/291.52 facIter :: 0':s -> 0':s -> 0':s 1126.85/291.52 if :: true:false -> 0':s -> 0':s -> 0':s -> 0':s 1126.85/291.52 factorial :: 0':s -> 0':s 1126.85/291.52 hole_0':s1_0 :: 0':s 1126.85/291.52 hole_true:false2_0 :: true:false 1126.85/291.52 gen_0':s3_0 :: Nat -> 0':s 1126.85/291.52 1126.85/291.52 1126.85/291.52 Generator Equations: 1126.85/291.52 gen_0':s3_0(0) <=> 0' 1126.85/291.52 gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) 1126.85/291.52 1126.85/291.52 1126.85/291.52 The following defined symbols remain to be analysed: 1126.85/291.52 plus, times, minus, facIter 1126.85/291.52 1126.85/291.52 They will be analysed ascendingly in the following order: 1126.85/291.52 plus < times 1126.85/291.52 times < facIter 1126.85/291.52 minus < facIter 1126.85/291.52 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (7) RewriteLemmaProof (LOWER BOUND(ID)) 1126.85/291.52 Proved the following rewrite lemma: 1126.85/291.52 plus(gen_0':s3_0(n5_0), gen_0':s3_0(b)) -> gen_0':s3_0(+(n5_0, b)), rt in Omega(1 + n5_0) 1126.85/291.52 1126.85/291.52 Induction Base: 1126.85/291.52 plus(gen_0':s3_0(0), gen_0':s3_0(b)) ->_R^Omega(1) 1126.85/291.52 gen_0':s3_0(b) 1126.85/291.52 1126.85/291.52 Induction Step: 1126.85/291.52 plus(gen_0':s3_0(+(n5_0, 1)), gen_0':s3_0(b)) ->_R^Omega(1) 1126.85/291.52 s(plus(gen_0':s3_0(n5_0), gen_0':s3_0(b))) ->_IH 1126.85/291.52 s(gen_0':s3_0(+(b, c6_0))) 1126.85/291.52 1126.85/291.52 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (8) 1126.85/291.52 Complex Obligation (BEST) 1126.85/291.52 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (9) 1126.85/291.52 Obligation: 1126.85/291.52 Proved the lower bound n^1 for the following obligation: 1126.85/291.52 1126.85/291.52 Innermost TRS: 1126.85/291.52 Rules: 1126.85/291.52 plus(0', x) -> x 1126.85/291.52 plus(s(x), y) -> s(plus(x, y)) 1126.85/291.52 times(0', y) -> 0' 1126.85/291.52 times(s(x), y) -> plus(y, times(x, y)) 1126.85/291.52 p(s(x)) -> x 1126.85/291.52 p(0') -> 0' 1126.85/291.52 minus(x, 0') -> x 1126.85/291.52 minus(0', x) -> 0' 1126.85/291.52 minus(x, s(y)) -> p(minus(x, y)) 1126.85/291.52 isZero(0') -> true 1126.85/291.52 isZero(s(x)) -> false 1126.85/291.52 facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) 1126.85/291.52 if(true, x, y, z) -> y 1126.85/291.52 if(false, x, y, z) -> facIter(x, z) 1126.85/291.52 factorial(x) -> facIter(x, s(0')) 1126.85/291.52 1126.85/291.52 Types: 1126.85/291.52 plus :: 0':s -> 0':s -> 0':s 1126.85/291.52 0' :: 0':s 1126.85/291.52 s :: 0':s -> 0':s 1126.85/291.52 times :: 0':s -> 0':s -> 0':s 1126.85/291.52 p :: 0':s -> 0':s 1126.85/291.52 minus :: 0':s -> 0':s -> 0':s 1126.85/291.52 isZero :: 0':s -> true:false 1126.85/291.52 true :: true:false 1126.85/291.52 false :: true:false 1126.85/291.52 facIter :: 0':s -> 0':s -> 0':s 1126.85/291.52 if :: true:false -> 0':s -> 0':s -> 0':s -> 0':s 1126.85/291.52 factorial :: 0':s -> 0':s 1126.85/291.52 hole_0':s1_0 :: 0':s 1126.85/291.52 hole_true:false2_0 :: true:false 1126.85/291.52 gen_0':s3_0 :: Nat -> 0':s 1126.85/291.52 1126.85/291.52 1126.85/291.52 Generator Equations: 1126.85/291.52 gen_0':s3_0(0) <=> 0' 1126.85/291.52 gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) 1126.85/291.52 1126.85/291.52 1126.85/291.52 The following defined symbols remain to be analysed: 1126.85/291.52 plus, times, minus, facIter 1126.85/291.52 1126.85/291.52 They will be analysed ascendingly in the following order: 1126.85/291.52 plus < times 1126.85/291.52 times < facIter 1126.85/291.52 minus < facIter 1126.85/291.52 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (10) LowerBoundPropagationProof (FINISHED) 1126.85/291.52 Propagated lower bound. 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (11) 1126.85/291.52 BOUNDS(n^1, INF) 1126.85/291.52 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (12) 1126.85/291.52 Obligation: 1126.85/291.52 Innermost TRS: 1126.85/291.52 Rules: 1126.85/291.52 plus(0', x) -> x 1126.85/291.52 plus(s(x), y) -> s(plus(x, y)) 1126.85/291.52 times(0', y) -> 0' 1126.85/291.52 times(s(x), y) -> plus(y, times(x, y)) 1126.85/291.52 p(s(x)) -> x 1126.85/291.52 p(0') -> 0' 1126.85/291.52 minus(x, 0') -> x 1126.85/291.52 minus(0', x) -> 0' 1126.85/291.52 minus(x, s(y)) -> p(minus(x, y)) 1126.85/291.52 isZero(0') -> true 1126.85/291.52 isZero(s(x)) -> false 1126.85/291.52 facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) 1126.85/291.52 if(true, x, y, z) -> y 1126.85/291.52 if(false, x, y, z) -> facIter(x, z) 1126.85/291.52 factorial(x) -> facIter(x, s(0')) 1126.85/291.52 1126.85/291.52 Types: 1126.85/291.52 plus :: 0':s -> 0':s -> 0':s 1126.85/291.52 0' :: 0':s 1126.85/291.52 s :: 0':s -> 0':s 1126.85/291.52 times :: 0':s -> 0':s -> 0':s 1126.85/291.52 p :: 0':s -> 0':s 1126.85/291.52 minus :: 0':s -> 0':s -> 0':s 1126.85/291.52 isZero :: 0':s -> true:false 1126.85/291.52 true :: true:false 1126.85/291.52 false :: true:false 1126.85/291.52 facIter :: 0':s -> 0':s -> 0':s 1126.85/291.52 if :: true:false -> 0':s -> 0':s -> 0':s -> 0':s 1126.85/291.52 factorial :: 0':s -> 0':s 1126.85/291.52 hole_0':s1_0 :: 0':s 1126.85/291.52 hole_true:false2_0 :: true:false 1126.85/291.52 gen_0':s3_0 :: Nat -> 0':s 1126.85/291.52 1126.85/291.52 1126.85/291.52 Lemmas: 1126.85/291.52 plus(gen_0':s3_0(n5_0), gen_0':s3_0(b)) -> gen_0':s3_0(+(n5_0, b)), rt in Omega(1 + n5_0) 1126.85/291.52 1126.85/291.52 1126.85/291.52 Generator Equations: 1126.85/291.52 gen_0':s3_0(0) <=> 0' 1126.85/291.52 gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) 1126.85/291.52 1126.85/291.52 1126.85/291.52 The following defined symbols remain to be analysed: 1126.85/291.52 times, minus, facIter 1126.85/291.52 1126.85/291.52 They will be analysed ascendingly in the following order: 1126.85/291.52 times < facIter 1126.85/291.52 minus < facIter 1126.85/291.52 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (13) RewriteLemmaProof (LOWER BOUND(ID)) 1126.85/291.52 Proved the following rewrite lemma: 1126.85/291.52 times(gen_0':s3_0(n706_0), gen_0':s3_0(b)) -> gen_0':s3_0(*(n706_0, b)), rt in Omega(1 + b*n706_0 + n706_0) 1126.85/291.52 1126.85/291.52 Induction Base: 1126.85/291.52 times(gen_0':s3_0(0), gen_0':s3_0(b)) ->_R^Omega(1) 1126.85/291.52 0' 1126.85/291.52 1126.85/291.52 Induction Step: 1126.85/291.52 times(gen_0':s3_0(+(n706_0, 1)), gen_0':s3_0(b)) ->_R^Omega(1) 1126.85/291.52 plus(gen_0':s3_0(b), times(gen_0':s3_0(n706_0), gen_0':s3_0(b))) ->_IH 1126.85/291.52 plus(gen_0':s3_0(b), gen_0':s3_0(*(c707_0, b))) ->_L^Omega(1 + b) 1126.85/291.52 gen_0':s3_0(+(b, *(n706_0, b))) 1126.85/291.52 1126.85/291.52 We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (14) 1126.85/291.52 Complex Obligation (BEST) 1126.85/291.52 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (15) 1126.85/291.52 Obligation: 1126.85/291.52 Proved the lower bound n^2 for the following obligation: 1126.85/291.52 1126.85/291.52 Innermost TRS: 1126.85/291.52 Rules: 1126.85/291.52 plus(0', x) -> x 1126.85/291.52 plus(s(x), y) -> s(plus(x, y)) 1126.85/291.52 times(0', y) -> 0' 1126.85/291.52 times(s(x), y) -> plus(y, times(x, y)) 1126.85/291.52 p(s(x)) -> x 1126.85/291.52 p(0') -> 0' 1126.85/291.52 minus(x, 0') -> x 1126.85/291.52 minus(0', x) -> 0' 1126.85/291.52 minus(x, s(y)) -> p(minus(x, y)) 1126.85/291.52 isZero(0') -> true 1126.85/291.52 isZero(s(x)) -> false 1126.85/291.52 facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) 1126.85/291.52 if(true, x, y, z) -> y 1126.85/291.52 if(false, x, y, z) -> facIter(x, z) 1126.85/291.52 factorial(x) -> facIter(x, s(0')) 1126.85/291.52 1126.85/291.52 Types: 1126.85/291.52 plus :: 0':s -> 0':s -> 0':s 1126.85/291.52 0' :: 0':s 1126.85/291.52 s :: 0':s -> 0':s 1126.85/291.52 times :: 0':s -> 0':s -> 0':s 1126.85/291.52 p :: 0':s -> 0':s 1126.85/291.52 minus :: 0':s -> 0':s -> 0':s 1126.85/291.52 isZero :: 0':s -> true:false 1126.85/291.52 true :: true:false 1126.85/291.52 false :: true:false 1126.85/291.52 facIter :: 0':s -> 0':s -> 0':s 1126.85/291.52 if :: true:false -> 0':s -> 0':s -> 0':s -> 0':s 1126.85/291.52 factorial :: 0':s -> 0':s 1126.85/291.52 hole_0':s1_0 :: 0':s 1126.85/291.52 hole_true:false2_0 :: true:false 1126.85/291.52 gen_0':s3_0 :: Nat -> 0':s 1126.85/291.52 1126.85/291.52 1126.85/291.52 Lemmas: 1126.85/291.52 plus(gen_0':s3_0(n5_0), gen_0':s3_0(b)) -> gen_0':s3_0(+(n5_0, b)), rt in Omega(1 + n5_0) 1126.85/291.52 1126.85/291.52 1126.85/291.52 Generator Equations: 1126.85/291.52 gen_0':s3_0(0) <=> 0' 1126.85/291.52 gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) 1126.85/291.52 1126.85/291.52 1126.85/291.52 The following defined symbols remain to be analysed: 1126.85/291.52 times, minus, facIter 1126.85/291.52 1126.85/291.52 They will be analysed ascendingly in the following order: 1126.85/291.52 times < facIter 1126.85/291.52 minus < facIter 1126.85/291.52 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (16) LowerBoundPropagationProof (FINISHED) 1126.85/291.52 Propagated lower bound. 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (17) 1126.85/291.52 BOUNDS(n^2, INF) 1126.85/291.52 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (18) 1126.85/291.52 Obligation: 1126.85/291.52 Innermost TRS: 1126.85/291.52 Rules: 1126.85/291.52 plus(0', x) -> x 1126.85/291.52 plus(s(x), y) -> s(plus(x, y)) 1126.85/291.52 times(0', y) -> 0' 1126.85/291.52 times(s(x), y) -> plus(y, times(x, y)) 1126.85/291.52 p(s(x)) -> x 1126.85/291.52 p(0') -> 0' 1126.85/291.52 minus(x, 0') -> x 1126.85/291.52 minus(0', x) -> 0' 1126.85/291.52 minus(x, s(y)) -> p(minus(x, y)) 1126.85/291.52 isZero(0') -> true 1126.85/291.52 isZero(s(x)) -> false 1126.85/291.52 facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) 1126.85/291.52 if(true, x, y, z) -> y 1126.85/291.52 if(false, x, y, z) -> facIter(x, z) 1126.85/291.52 factorial(x) -> facIter(x, s(0')) 1126.85/291.52 1126.85/291.52 Types: 1126.85/291.52 plus :: 0':s -> 0':s -> 0':s 1126.85/291.52 0' :: 0':s 1126.85/291.52 s :: 0':s -> 0':s 1126.85/291.52 times :: 0':s -> 0':s -> 0':s 1126.85/291.52 p :: 0':s -> 0':s 1126.85/291.52 minus :: 0':s -> 0':s -> 0':s 1126.85/291.52 isZero :: 0':s -> true:false 1126.85/291.52 true :: true:false 1126.85/291.52 false :: true:false 1126.85/291.52 facIter :: 0':s -> 0':s -> 0':s 1126.85/291.52 if :: true:false -> 0':s -> 0':s -> 0':s -> 0':s 1126.85/291.52 factorial :: 0':s -> 0':s 1126.85/291.52 hole_0':s1_0 :: 0':s 1126.85/291.52 hole_true:false2_0 :: true:false 1126.85/291.52 gen_0':s3_0 :: Nat -> 0':s 1126.85/291.52 1126.85/291.52 1126.85/291.52 Lemmas: 1126.85/291.52 plus(gen_0':s3_0(n5_0), gen_0':s3_0(b)) -> gen_0':s3_0(+(n5_0, b)), rt in Omega(1 + n5_0) 1126.85/291.52 times(gen_0':s3_0(n706_0), gen_0':s3_0(b)) -> gen_0':s3_0(*(n706_0, b)), rt in Omega(1 + b*n706_0 + n706_0) 1126.85/291.52 1126.85/291.52 1126.85/291.52 Generator Equations: 1126.85/291.52 gen_0':s3_0(0) <=> 0' 1126.85/291.52 gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) 1126.85/291.52 1126.85/291.52 1126.85/291.52 The following defined symbols remain to be analysed: 1126.85/291.52 minus, facIter 1126.85/291.52 1126.85/291.52 They will be analysed ascendingly in the following order: 1126.85/291.52 minus < facIter 1126.85/291.52 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (19) RewriteLemmaProof (LOWER BOUND(ID)) 1126.85/291.52 Proved the following rewrite lemma: 1126.85/291.52 minus(gen_0':s3_0(a), gen_0':s3_0(+(1, n1596_0))) -> *4_0, rt in Omega(n1596_0) 1126.85/291.52 1126.85/291.52 Induction Base: 1126.85/291.52 minus(gen_0':s3_0(a), gen_0':s3_0(+(1, 0))) 1126.85/291.52 1126.85/291.52 Induction Step: 1126.85/291.52 minus(gen_0':s3_0(a), gen_0':s3_0(+(1, +(n1596_0, 1)))) ->_R^Omega(1) 1126.85/291.52 p(minus(gen_0':s3_0(a), gen_0':s3_0(+(1, n1596_0)))) ->_IH 1126.85/291.52 p(*4_0) 1126.85/291.52 1126.85/291.52 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (20) 1126.85/291.52 Obligation: 1126.85/291.52 Innermost TRS: 1126.85/291.52 Rules: 1126.85/291.52 plus(0', x) -> x 1126.85/291.52 plus(s(x), y) -> s(plus(x, y)) 1126.85/291.52 times(0', y) -> 0' 1126.85/291.52 times(s(x), y) -> plus(y, times(x, y)) 1126.85/291.52 p(s(x)) -> x 1126.85/291.52 p(0') -> 0' 1126.85/291.52 minus(x, 0') -> x 1126.85/291.52 minus(0', x) -> 0' 1126.85/291.52 minus(x, s(y)) -> p(minus(x, y)) 1126.85/291.52 isZero(0') -> true 1126.85/291.52 isZero(s(x)) -> false 1126.85/291.52 facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) 1126.85/291.52 if(true, x, y, z) -> y 1126.85/291.52 if(false, x, y, z) -> facIter(x, z) 1126.85/291.52 factorial(x) -> facIter(x, s(0')) 1126.85/291.52 1126.85/291.52 Types: 1126.85/291.52 plus :: 0':s -> 0':s -> 0':s 1126.85/291.52 0' :: 0':s 1126.85/291.52 s :: 0':s -> 0':s 1126.85/291.52 times :: 0':s -> 0':s -> 0':s 1126.85/291.52 p :: 0':s -> 0':s 1126.85/291.52 minus :: 0':s -> 0':s -> 0':s 1126.85/291.52 isZero :: 0':s -> true:false 1126.85/291.52 true :: true:false 1126.85/291.52 false :: true:false 1126.85/291.52 facIter :: 0':s -> 0':s -> 0':s 1126.85/291.52 if :: true:false -> 0':s -> 0':s -> 0':s -> 0':s 1126.85/291.52 factorial :: 0':s -> 0':s 1126.85/291.52 hole_0':s1_0 :: 0':s 1126.85/291.52 hole_true:false2_0 :: true:false 1126.85/291.52 gen_0':s3_0 :: Nat -> 0':s 1126.85/291.52 1126.85/291.52 1126.85/291.52 Lemmas: 1126.85/291.52 plus(gen_0':s3_0(n5_0), gen_0':s3_0(b)) -> gen_0':s3_0(+(n5_0, b)), rt in Omega(1 + n5_0) 1126.85/291.52 times(gen_0':s3_0(n706_0), gen_0':s3_0(b)) -> gen_0':s3_0(*(n706_0, b)), rt in Omega(1 + b*n706_0 + n706_0) 1126.85/291.52 minus(gen_0':s3_0(a), gen_0':s3_0(+(1, n1596_0))) -> *4_0, rt in Omega(n1596_0) 1126.85/291.52 1126.85/291.52 1126.85/291.52 Generator Equations: 1126.85/291.52 gen_0':s3_0(0) <=> 0' 1126.85/291.52 gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) 1126.85/291.52 1126.85/291.52 1126.85/291.52 The following defined symbols remain to be analysed: 1126.85/291.52 facIter 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (21) RewriteLemmaProof (LOWER BOUND(ID)) 1126.85/291.52 Proved the following rewrite lemma: 1126.85/291.52 facIter(gen_0':s3_0(n5565_0), gen_0':s3_0(b)) -> *4_0, rt in Omega(n5565_0 + n5565_0^2 + n5565_0^3) 1126.85/291.52 1126.85/291.52 Induction Base: 1126.85/291.52 facIter(gen_0':s3_0(0), gen_0':s3_0(b)) 1126.85/291.52 1126.85/291.52 Induction Step: 1126.85/291.52 facIter(gen_0':s3_0(+(n5565_0, 1)), gen_0':s3_0(b)) ->_R^Omega(1) 1126.85/291.52 if(isZero(gen_0':s3_0(+(n5565_0, 1))), minus(gen_0':s3_0(+(n5565_0, 1)), s(0')), gen_0':s3_0(b), times(gen_0':s3_0(b), gen_0':s3_0(+(n5565_0, 1)))) ->_R^Omega(1) 1126.85/291.52 if(false, minus(gen_0':s3_0(+(1, n5565_0)), s(0')), gen_0':s3_0(b), times(gen_0':s3_0(b), gen_0':s3_0(+(1, n5565_0)))) ->_R^Omega(1) 1126.85/291.52 if(false, p(minus(gen_0':s3_0(+(1, n5565_0)), 0')), gen_0':s3_0(b), times(gen_0':s3_0(b), gen_0':s3_0(+(1, n5565_0)))) ->_R^Omega(1) 1126.85/291.52 if(false, p(gen_0':s3_0(+(1, n5565_0))), gen_0':s3_0(b), times(gen_0':s3_0(b), gen_0':s3_0(+(1, n5565_0)))) ->_R^Omega(1) 1126.85/291.52 if(false, gen_0':s3_0(n5565_0), gen_0':s3_0(b), times(gen_0':s3_0(b), gen_0':s3_0(+(1, n5565_0)))) ->_L^Omega(3 + 3*n5565_0 + n5565_0^2) 1126.85/291.52 if(false, gen_0':s3_0(n5565_0), gen_0':s3_0(+(1, n5565_0)), gen_0':s3_0(*(b, +(1, n5565_0)))) ->_R^Omega(1) 1126.85/291.52 facIter(gen_0':s3_0(n5565_0), gen_0':s3_0(+(b, *(b, n5565_0)))) ->_IH 1126.85/291.52 *4_0 1126.85/291.52 1126.85/291.52 We have rt in Omega(n^3) and sz in O(n). Thus, we have irc_R in Omega(n^3). 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (22) 1126.85/291.52 Obligation: 1126.85/291.52 Proved the lower bound n^3 for the following obligation: 1126.85/291.52 1126.85/291.52 Innermost TRS: 1126.85/291.52 Rules: 1126.85/291.52 plus(0', x) -> x 1126.85/291.52 plus(s(x), y) -> s(plus(x, y)) 1126.85/291.52 times(0', y) -> 0' 1126.85/291.52 times(s(x), y) -> plus(y, times(x, y)) 1126.85/291.52 p(s(x)) -> x 1126.85/291.52 p(0') -> 0' 1126.85/291.52 minus(x, 0') -> x 1126.85/291.52 minus(0', x) -> 0' 1126.85/291.52 minus(x, s(y)) -> p(minus(x, y)) 1126.85/291.52 isZero(0') -> true 1126.85/291.52 isZero(s(x)) -> false 1126.85/291.52 facIter(x, y) -> if(isZero(x), minus(x, s(0')), y, times(y, x)) 1126.85/291.52 if(true, x, y, z) -> y 1126.85/291.52 if(false, x, y, z) -> facIter(x, z) 1126.85/291.52 factorial(x) -> facIter(x, s(0')) 1126.85/291.52 1126.85/291.52 Types: 1126.85/291.52 plus :: 0':s -> 0':s -> 0':s 1126.85/291.52 0' :: 0':s 1126.85/291.52 s :: 0':s -> 0':s 1126.85/291.52 times :: 0':s -> 0':s -> 0':s 1126.85/291.52 p :: 0':s -> 0':s 1126.85/291.52 minus :: 0':s -> 0':s -> 0':s 1126.85/291.52 isZero :: 0':s -> true:false 1126.85/291.52 true :: true:false 1126.85/291.52 false :: true:false 1126.85/291.52 facIter :: 0':s -> 0':s -> 0':s 1126.85/291.52 if :: true:false -> 0':s -> 0':s -> 0':s -> 0':s 1126.85/291.52 factorial :: 0':s -> 0':s 1126.85/291.52 hole_0':s1_0 :: 0':s 1126.85/291.52 hole_true:false2_0 :: true:false 1126.85/291.52 gen_0':s3_0 :: Nat -> 0':s 1126.85/291.52 1126.85/291.52 1126.85/291.52 Lemmas: 1126.85/291.52 plus(gen_0':s3_0(n5_0), gen_0':s3_0(b)) -> gen_0':s3_0(+(n5_0, b)), rt in Omega(1 + n5_0) 1126.85/291.52 times(gen_0':s3_0(n706_0), gen_0':s3_0(b)) -> gen_0':s3_0(*(n706_0, b)), rt in Omega(1 + b*n706_0 + n706_0) 1126.85/291.52 minus(gen_0':s3_0(a), gen_0':s3_0(+(1, n1596_0))) -> *4_0, rt in Omega(n1596_0) 1126.85/291.52 1126.85/291.52 1126.85/291.52 Generator Equations: 1126.85/291.52 gen_0':s3_0(0) <=> 0' 1126.85/291.52 gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) 1126.85/291.52 1126.85/291.52 1126.85/291.52 The following defined symbols remain to be analysed: 1126.85/291.52 facIter 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (23) LowerBoundPropagationProof (FINISHED) 1126.85/291.52 Propagated lower bound. 1126.85/291.52 ---------------------------------------- 1126.85/291.52 1126.85/291.52 (24) 1126.85/291.52 BOUNDS(n^3, INF) 1127.12/291.59 EOF