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