1121.53/291.53 WORST_CASE(Omega(n^2), ?) 1121.53/291.54 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 1121.53/291.54 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 1121.53/291.54 1121.53/291.54 1121.53/291.54 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). 1121.53/291.54 1121.53/291.54 (0) CpxTRS 1121.53/291.54 (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 1121.53/291.54 (2) CpxTRS 1121.53/291.54 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 1121.53/291.54 (4) typed CpxTrs 1121.53/291.54 (5) OrderProof [LOWER BOUND(ID), 0 ms] 1121.53/291.54 (6) typed CpxTrs 1121.53/291.54 (7) RewriteLemmaProof [LOWER BOUND(ID), 283 ms] 1121.53/291.54 (8) BEST 1121.53/291.54 (9) proven lower bound 1121.53/291.54 (10) LowerBoundPropagationProof [FINISHED, 0 ms] 1121.53/291.54 (11) BOUNDS(n^1, INF) 1121.53/291.54 (12) typed CpxTrs 1121.53/291.54 (13) RewriteLemmaProof [LOWER BOUND(ID), 47 ms] 1121.53/291.54 (14) typed CpxTrs 1121.53/291.54 (15) RewriteLemmaProof [LOWER BOUND(ID), 123 ms] 1121.53/291.54 (16) proven lower bound 1121.53/291.54 (17) LowerBoundPropagationProof [FINISHED, 0 ms] 1121.53/291.54 (18) BOUNDS(n^2, INF) 1121.53/291.54 1121.53/291.54 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (0) 1121.53/291.54 Obligation: 1121.53/291.54 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). 1121.53/291.54 1121.53/291.54 1121.53/291.54 The TRS R consists of the following rules: 1121.53/291.54 1121.53/291.54 isEmpty(cons(x, xs)) -> false 1121.53/291.54 isEmpty(nil) -> true 1121.53/291.54 isZero(0) -> true 1121.53/291.54 isZero(s(x)) -> false 1121.53/291.54 head(cons(x, xs)) -> x 1121.53/291.54 tail(cons(x, xs)) -> xs 1121.53/291.54 tail(nil) -> nil 1121.53/291.54 p(s(s(x))) -> s(p(s(x))) 1121.53/291.54 p(s(0)) -> 0 1121.53/291.54 p(0) -> 0 1121.53/291.54 inc(s(x)) -> s(inc(x)) 1121.53/291.54 inc(0) -> s(0) 1121.53/291.54 sumList(xs, y) -> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y)) 1121.53/291.54 if(true, b, y, xs, ys, x) -> y 1121.53/291.54 if(false, true, y, xs, ys, x) -> sumList(xs, y) 1121.53/291.54 if(false, false, y, xs, ys, x) -> sumList(ys, x) 1121.53/291.54 sum(xs) -> sumList(xs, 0) 1121.53/291.54 1121.53/291.54 S is empty. 1121.53/291.54 Rewrite Strategy: INNERMOST 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (1) RenamingProof (BOTH BOUNDS(ID, ID)) 1121.53/291.54 Renamed function symbols to avoid clashes with predefined symbol. 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (2) 1121.53/291.54 Obligation: 1121.53/291.54 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). 1121.53/291.54 1121.53/291.54 1121.53/291.54 The TRS R consists of the following rules: 1121.53/291.54 1121.53/291.54 isEmpty(cons(x, xs)) -> false 1121.53/291.54 isEmpty(nil) -> true 1121.53/291.54 isZero(0') -> true 1121.53/291.54 isZero(s(x)) -> false 1121.53/291.54 head(cons(x, xs)) -> x 1121.53/291.54 tail(cons(x, xs)) -> xs 1121.53/291.54 tail(nil) -> nil 1121.53/291.54 p(s(s(x))) -> s(p(s(x))) 1121.53/291.54 p(s(0')) -> 0' 1121.53/291.54 p(0') -> 0' 1121.53/291.54 inc(s(x)) -> s(inc(x)) 1121.53/291.54 inc(0') -> s(0') 1121.53/291.54 sumList(xs, y) -> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y)) 1121.53/291.54 if(true, b, y, xs, ys, x) -> y 1121.53/291.54 if(false, true, y, xs, ys, x) -> sumList(xs, y) 1121.53/291.54 if(false, false, y, xs, ys, x) -> sumList(ys, x) 1121.53/291.54 sum(xs) -> sumList(xs, 0') 1121.53/291.54 1121.53/291.54 S is empty. 1121.53/291.54 Rewrite Strategy: INNERMOST 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 1121.53/291.54 Infered types. 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (4) 1121.53/291.54 Obligation: 1121.53/291.54 Innermost TRS: 1121.53/291.54 Rules: 1121.53/291.54 isEmpty(cons(x, xs)) -> false 1121.53/291.54 isEmpty(nil) -> true 1121.53/291.54 isZero(0') -> true 1121.53/291.54 isZero(s(x)) -> false 1121.53/291.54 head(cons(x, xs)) -> x 1121.53/291.54 tail(cons(x, xs)) -> xs 1121.53/291.54 tail(nil) -> nil 1121.53/291.54 p(s(s(x))) -> s(p(s(x))) 1121.53/291.54 p(s(0')) -> 0' 1121.53/291.54 p(0') -> 0' 1121.53/291.54 inc(s(x)) -> s(inc(x)) 1121.53/291.54 inc(0') -> s(0') 1121.53/291.54 sumList(xs, y) -> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y)) 1121.53/291.54 if(true, b, y, xs, ys, x) -> y 1121.53/291.54 if(false, true, y, xs, ys, x) -> sumList(xs, y) 1121.53/291.54 if(false, false, y, xs, ys, x) -> sumList(ys, x) 1121.53/291.54 sum(xs) -> sumList(xs, 0') 1121.53/291.54 1121.53/291.54 Types: 1121.53/291.54 isEmpty :: cons:nil -> false:true 1121.53/291.54 cons :: 0':s -> cons:nil -> cons:nil 1121.53/291.54 false :: false:true 1121.53/291.54 nil :: cons:nil 1121.53/291.54 true :: false:true 1121.53/291.54 isZero :: 0':s -> false:true 1121.53/291.54 0' :: 0':s 1121.53/291.54 s :: 0':s -> 0':s 1121.53/291.54 head :: cons:nil -> 0':s 1121.53/291.54 tail :: cons:nil -> cons:nil 1121.53/291.54 p :: 0':s -> 0':s 1121.53/291.54 inc :: 0':s -> 0':s 1121.53/291.54 sumList :: cons:nil -> 0':s -> 0':s 1121.53/291.54 if :: false:true -> false:true -> 0':s -> cons:nil -> cons:nil -> 0':s -> 0':s 1121.53/291.54 sum :: cons:nil -> 0':s 1121.53/291.54 hole_false:true1_0 :: false:true 1121.53/291.54 hole_cons:nil2_0 :: cons:nil 1121.53/291.54 hole_0':s3_0 :: 0':s 1121.53/291.54 gen_cons:nil4_0 :: Nat -> cons:nil 1121.53/291.54 gen_0':s5_0 :: Nat -> 0':s 1121.53/291.54 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (5) OrderProof (LOWER BOUND(ID)) 1121.53/291.54 Heuristically decided to analyse the following defined symbols: 1121.53/291.54 p, inc, sumList 1121.53/291.54 1121.53/291.54 They will be analysed ascendingly in the following order: 1121.53/291.54 p < sumList 1121.53/291.54 inc < sumList 1121.53/291.54 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (6) 1121.53/291.54 Obligation: 1121.53/291.54 Innermost TRS: 1121.53/291.54 Rules: 1121.53/291.54 isEmpty(cons(x, xs)) -> false 1121.53/291.54 isEmpty(nil) -> true 1121.53/291.54 isZero(0') -> true 1121.53/291.54 isZero(s(x)) -> false 1121.53/291.54 head(cons(x, xs)) -> x 1121.53/291.54 tail(cons(x, xs)) -> xs 1121.53/291.54 tail(nil) -> nil 1121.53/291.54 p(s(s(x))) -> s(p(s(x))) 1121.53/291.54 p(s(0')) -> 0' 1121.53/291.54 p(0') -> 0' 1121.53/291.54 inc(s(x)) -> s(inc(x)) 1121.53/291.54 inc(0') -> s(0') 1121.53/291.54 sumList(xs, y) -> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y)) 1121.53/291.54 if(true, b, y, xs, ys, x) -> y 1121.53/291.54 if(false, true, y, xs, ys, x) -> sumList(xs, y) 1121.53/291.54 if(false, false, y, xs, ys, x) -> sumList(ys, x) 1121.53/291.54 sum(xs) -> sumList(xs, 0') 1121.53/291.54 1121.53/291.54 Types: 1121.53/291.54 isEmpty :: cons:nil -> false:true 1121.53/291.54 cons :: 0':s -> cons:nil -> cons:nil 1121.53/291.54 false :: false:true 1121.53/291.54 nil :: cons:nil 1121.53/291.54 true :: false:true 1121.53/291.54 isZero :: 0':s -> false:true 1121.53/291.54 0' :: 0':s 1121.53/291.54 s :: 0':s -> 0':s 1121.53/291.54 head :: cons:nil -> 0':s 1121.53/291.54 tail :: cons:nil -> cons:nil 1121.53/291.54 p :: 0':s -> 0':s 1121.53/291.54 inc :: 0':s -> 0':s 1121.53/291.54 sumList :: cons:nil -> 0':s -> 0':s 1121.53/291.54 if :: false:true -> false:true -> 0':s -> cons:nil -> cons:nil -> 0':s -> 0':s 1121.53/291.54 sum :: cons:nil -> 0':s 1121.53/291.54 hole_false:true1_0 :: false:true 1121.53/291.54 hole_cons:nil2_0 :: cons:nil 1121.53/291.54 hole_0':s3_0 :: 0':s 1121.53/291.54 gen_cons:nil4_0 :: Nat -> cons:nil 1121.53/291.54 gen_0':s5_0 :: Nat -> 0':s 1121.53/291.54 1121.53/291.54 1121.53/291.54 Generator Equations: 1121.53/291.54 gen_cons:nil4_0(0) <=> nil 1121.53/291.54 gen_cons:nil4_0(+(x, 1)) <=> cons(0', gen_cons:nil4_0(x)) 1121.53/291.54 gen_0':s5_0(0) <=> 0' 1121.53/291.54 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 1121.53/291.54 1121.53/291.54 1121.53/291.54 The following defined symbols remain to be analysed: 1121.53/291.54 p, inc, sumList 1121.53/291.54 1121.53/291.54 They will be analysed ascendingly in the following order: 1121.53/291.54 p < sumList 1121.53/291.54 inc < sumList 1121.53/291.54 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (7) RewriteLemmaProof (LOWER BOUND(ID)) 1121.53/291.54 Proved the following rewrite lemma: 1121.53/291.54 p(gen_0':s5_0(+(1, n7_0))) -> gen_0':s5_0(n7_0), rt in Omega(1 + n7_0) 1121.53/291.54 1121.53/291.54 Induction Base: 1121.53/291.54 p(gen_0':s5_0(+(1, 0))) ->_R^Omega(1) 1121.53/291.54 0' 1121.53/291.54 1121.53/291.54 Induction Step: 1121.53/291.54 p(gen_0':s5_0(+(1, +(n7_0, 1)))) ->_R^Omega(1) 1121.53/291.54 s(p(s(gen_0':s5_0(n7_0)))) ->_IH 1121.53/291.54 s(gen_0':s5_0(c8_0)) 1121.53/291.54 1121.53/291.54 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (8) 1121.53/291.54 Complex Obligation (BEST) 1121.53/291.54 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (9) 1121.53/291.54 Obligation: 1121.53/291.54 Proved the lower bound n^1 for the following obligation: 1121.53/291.54 1121.53/291.54 Innermost TRS: 1121.53/291.54 Rules: 1121.53/291.54 isEmpty(cons(x, xs)) -> false 1121.53/291.54 isEmpty(nil) -> true 1121.53/291.54 isZero(0') -> true 1121.53/291.54 isZero(s(x)) -> false 1121.53/291.54 head(cons(x, xs)) -> x 1121.53/291.54 tail(cons(x, xs)) -> xs 1121.53/291.54 tail(nil) -> nil 1121.53/291.54 p(s(s(x))) -> s(p(s(x))) 1121.53/291.54 p(s(0')) -> 0' 1121.53/291.54 p(0') -> 0' 1121.53/291.54 inc(s(x)) -> s(inc(x)) 1121.53/291.54 inc(0') -> s(0') 1121.53/291.54 sumList(xs, y) -> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y)) 1121.53/291.54 if(true, b, y, xs, ys, x) -> y 1121.53/291.54 if(false, true, y, xs, ys, x) -> sumList(xs, y) 1121.53/291.54 if(false, false, y, xs, ys, x) -> sumList(ys, x) 1121.53/291.54 sum(xs) -> sumList(xs, 0') 1121.53/291.54 1121.53/291.54 Types: 1121.53/291.54 isEmpty :: cons:nil -> false:true 1121.53/291.54 cons :: 0':s -> cons:nil -> cons:nil 1121.53/291.54 false :: false:true 1121.53/291.54 nil :: cons:nil 1121.53/291.54 true :: false:true 1121.53/291.54 isZero :: 0':s -> false:true 1121.53/291.54 0' :: 0':s 1121.53/291.54 s :: 0':s -> 0':s 1121.53/291.54 head :: cons:nil -> 0':s 1121.53/291.54 tail :: cons:nil -> cons:nil 1121.53/291.54 p :: 0':s -> 0':s 1121.53/291.54 inc :: 0':s -> 0':s 1121.53/291.54 sumList :: cons:nil -> 0':s -> 0':s 1121.53/291.54 if :: false:true -> false:true -> 0':s -> cons:nil -> cons:nil -> 0':s -> 0':s 1121.53/291.54 sum :: cons:nil -> 0':s 1121.53/291.54 hole_false:true1_0 :: false:true 1121.53/291.54 hole_cons:nil2_0 :: cons:nil 1121.53/291.54 hole_0':s3_0 :: 0':s 1121.53/291.54 gen_cons:nil4_0 :: Nat -> cons:nil 1121.53/291.54 gen_0':s5_0 :: Nat -> 0':s 1121.53/291.54 1121.53/291.54 1121.53/291.54 Generator Equations: 1121.53/291.54 gen_cons:nil4_0(0) <=> nil 1121.53/291.54 gen_cons:nil4_0(+(x, 1)) <=> cons(0', gen_cons:nil4_0(x)) 1121.53/291.54 gen_0':s5_0(0) <=> 0' 1121.53/291.54 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 1121.53/291.54 1121.53/291.54 1121.53/291.54 The following defined symbols remain to be analysed: 1121.53/291.54 p, inc, sumList 1121.53/291.54 1121.53/291.54 They will be analysed ascendingly in the following order: 1121.53/291.54 p < sumList 1121.53/291.54 inc < sumList 1121.53/291.54 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (10) LowerBoundPropagationProof (FINISHED) 1121.53/291.54 Propagated lower bound. 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (11) 1121.53/291.54 BOUNDS(n^1, INF) 1121.53/291.54 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (12) 1121.53/291.54 Obligation: 1121.53/291.54 Innermost TRS: 1121.53/291.54 Rules: 1121.53/291.54 isEmpty(cons(x, xs)) -> false 1121.53/291.54 isEmpty(nil) -> true 1121.53/291.54 isZero(0') -> true 1121.53/291.54 isZero(s(x)) -> false 1121.53/291.54 head(cons(x, xs)) -> x 1121.53/291.54 tail(cons(x, xs)) -> xs 1121.53/291.54 tail(nil) -> nil 1121.53/291.54 p(s(s(x))) -> s(p(s(x))) 1121.53/291.54 p(s(0')) -> 0' 1121.53/291.54 p(0') -> 0' 1121.53/291.54 inc(s(x)) -> s(inc(x)) 1121.53/291.54 inc(0') -> s(0') 1121.53/291.54 sumList(xs, y) -> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y)) 1121.53/291.54 if(true, b, y, xs, ys, x) -> y 1121.53/291.54 if(false, true, y, xs, ys, x) -> sumList(xs, y) 1121.53/291.54 if(false, false, y, xs, ys, x) -> sumList(ys, x) 1121.53/291.54 sum(xs) -> sumList(xs, 0') 1121.53/291.54 1121.53/291.54 Types: 1121.53/291.54 isEmpty :: cons:nil -> false:true 1121.53/291.54 cons :: 0':s -> cons:nil -> cons:nil 1121.53/291.54 false :: false:true 1121.53/291.54 nil :: cons:nil 1121.53/291.54 true :: false:true 1121.53/291.54 isZero :: 0':s -> false:true 1121.53/291.54 0' :: 0':s 1121.53/291.54 s :: 0':s -> 0':s 1121.53/291.54 head :: cons:nil -> 0':s 1121.53/291.54 tail :: cons:nil -> cons:nil 1121.53/291.54 p :: 0':s -> 0':s 1121.53/291.54 inc :: 0':s -> 0':s 1121.53/291.54 sumList :: cons:nil -> 0':s -> 0':s 1121.53/291.54 if :: false:true -> false:true -> 0':s -> cons:nil -> cons:nil -> 0':s -> 0':s 1121.53/291.54 sum :: cons:nil -> 0':s 1121.53/291.54 hole_false:true1_0 :: false:true 1121.53/291.54 hole_cons:nil2_0 :: cons:nil 1121.53/291.54 hole_0':s3_0 :: 0':s 1121.53/291.54 gen_cons:nil4_0 :: Nat -> cons:nil 1121.53/291.54 gen_0':s5_0 :: Nat -> 0':s 1121.53/291.54 1121.53/291.54 1121.53/291.54 Lemmas: 1121.53/291.54 p(gen_0':s5_0(+(1, n7_0))) -> gen_0':s5_0(n7_0), rt in Omega(1 + n7_0) 1121.53/291.54 1121.53/291.54 1121.53/291.54 Generator Equations: 1121.53/291.54 gen_cons:nil4_0(0) <=> nil 1121.53/291.54 gen_cons:nil4_0(+(x, 1)) <=> cons(0', gen_cons:nil4_0(x)) 1121.53/291.54 gen_0':s5_0(0) <=> 0' 1121.53/291.54 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 1121.53/291.54 1121.53/291.54 1121.53/291.54 The following defined symbols remain to be analysed: 1121.53/291.54 inc, sumList 1121.53/291.54 1121.53/291.54 They will be analysed ascendingly in the following order: 1121.53/291.54 inc < sumList 1121.53/291.54 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (13) RewriteLemmaProof (LOWER BOUND(ID)) 1121.53/291.54 Proved the following rewrite lemma: 1121.53/291.54 inc(gen_0':s5_0(n308_0)) -> gen_0':s5_0(+(1, n308_0)), rt in Omega(1 + n308_0) 1121.53/291.54 1121.53/291.54 Induction Base: 1121.53/291.54 inc(gen_0':s5_0(0)) ->_R^Omega(1) 1121.53/291.54 s(0') 1121.53/291.54 1121.53/291.54 Induction Step: 1121.53/291.54 inc(gen_0':s5_0(+(n308_0, 1))) ->_R^Omega(1) 1121.53/291.54 s(inc(gen_0':s5_0(n308_0))) ->_IH 1121.53/291.54 s(gen_0':s5_0(+(1, c309_0))) 1121.53/291.54 1121.53/291.54 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (14) 1121.53/291.54 Obligation: 1121.53/291.54 Innermost TRS: 1121.53/291.54 Rules: 1121.53/291.54 isEmpty(cons(x, xs)) -> false 1121.53/291.54 isEmpty(nil) -> true 1121.53/291.54 isZero(0') -> true 1121.53/291.54 isZero(s(x)) -> false 1121.53/291.54 head(cons(x, xs)) -> x 1121.53/291.54 tail(cons(x, xs)) -> xs 1121.53/291.54 tail(nil) -> nil 1121.53/291.54 p(s(s(x))) -> s(p(s(x))) 1121.53/291.54 p(s(0')) -> 0' 1121.53/291.54 p(0') -> 0' 1121.53/291.54 inc(s(x)) -> s(inc(x)) 1121.53/291.54 inc(0') -> s(0') 1121.53/291.54 sumList(xs, y) -> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y)) 1121.53/291.54 if(true, b, y, xs, ys, x) -> y 1121.53/291.54 if(false, true, y, xs, ys, x) -> sumList(xs, y) 1121.53/291.54 if(false, false, y, xs, ys, x) -> sumList(ys, x) 1121.53/291.54 sum(xs) -> sumList(xs, 0') 1121.53/291.54 1121.53/291.54 Types: 1121.53/291.54 isEmpty :: cons:nil -> false:true 1121.53/291.54 cons :: 0':s -> cons:nil -> cons:nil 1121.53/291.54 false :: false:true 1121.53/291.54 nil :: cons:nil 1121.53/291.54 true :: false:true 1121.53/291.54 isZero :: 0':s -> false:true 1121.53/291.54 0' :: 0':s 1121.53/291.54 s :: 0':s -> 0':s 1121.53/291.54 head :: cons:nil -> 0':s 1121.53/291.54 tail :: cons:nil -> cons:nil 1121.53/291.54 p :: 0':s -> 0':s 1121.53/291.54 inc :: 0':s -> 0':s 1121.53/291.54 sumList :: cons:nil -> 0':s -> 0':s 1121.53/291.54 if :: false:true -> false:true -> 0':s -> cons:nil -> cons:nil -> 0':s -> 0':s 1121.53/291.54 sum :: cons:nil -> 0':s 1121.53/291.54 hole_false:true1_0 :: false:true 1121.53/291.54 hole_cons:nil2_0 :: cons:nil 1121.53/291.54 hole_0':s3_0 :: 0':s 1121.53/291.54 gen_cons:nil4_0 :: Nat -> cons:nil 1121.53/291.54 gen_0':s5_0 :: Nat -> 0':s 1121.53/291.54 1121.53/291.54 1121.53/291.54 Lemmas: 1121.53/291.54 p(gen_0':s5_0(+(1, n7_0))) -> gen_0':s5_0(n7_0), rt in Omega(1 + n7_0) 1121.53/291.54 inc(gen_0':s5_0(n308_0)) -> gen_0':s5_0(+(1, n308_0)), rt in Omega(1 + n308_0) 1121.53/291.54 1121.53/291.54 1121.53/291.54 Generator Equations: 1121.53/291.54 gen_cons:nil4_0(0) <=> nil 1121.53/291.54 gen_cons:nil4_0(+(x, 1)) <=> cons(0', gen_cons:nil4_0(x)) 1121.53/291.54 gen_0':s5_0(0) <=> 0' 1121.53/291.54 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 1121.53/291.54 1121.53/291.54 1121.53/291.54 The following defined symbols remain to be analysed: 1121.53/291.54 sumList 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (15) RewriteLemmaProof (LOWER BOUND(ID)) 1121.53/291.54 Proved the following rewrite lemma: 1121.53/291.54 sumList(gen_cons:nil4_0(n619_0), gen_0':s5_0(b)) -> gen_0':s5_0(b), rt in Omega(1 + b + b*n619_0 + n619_0) 1121.53/291.54 1121.53/291.54 Induction Base: 1121.53/291.54 sumList(gen_cons:nil4_0(0), gen_0':s5_0(b)) ->_R^Omega(1) 1121.53/291.54 if(isEmpty(gen_cons:nil4_0(0)), isZero(head(gen_cons:nil4_0(0))), gen_0':s5_0(b), tail(gen_cons:nil4_0(0)), cons(p(head(gen_cons:nil4_0(0))), tail(gen_cons:nil4_0(0))), inc(gen_0':s5_0(b))) ->_R^Omega(1) 1121.53/291.54 if(true, isZero(head(gen_cons:nil4_0(0))), gen_0':s5_0(b), tail(gen_cons:nil4_0(0)), cons(p(head(gen_cons:nil4_0(0))), tail(gen_cons:nil4_0(0))), inc(gen_0':s5_0(b))) ->_R^Omega(1) 1121.53/291.54 if(true, isZero(head(gen_cons:nil4_0(0))), gen_0':s5_0(b), nil, cons(p(head(gen_cons:nil4_0(0))), tail(gen_cons:nil4_0(0))), inc(gen_0':s5_0(b))) ->_R^Omega(1) 1121.53/291.54 if(true, isZero(head(gen_cons:nil4_0(0))), gen_0':s5_0(b), nil, cons(p(head(gen_cons:nil4_0(0))), nil), inc(gen_0':s5_0(b))) ->_L^Omega(1 + b) 1121.53/291.54 if(true, isZero(head(gen_cons:nil4_0(0))), gen_0':s5_0(b), nil, cons(p(head(gen_cons:nil4_0(0))), nil), gen_0':s5_0(+(1, b))) ->_R^Omega(1) 1121.53/291.54 gen_0':s5_0(b) 1121.53/291.54 1121.53/291.54 Induction Step: 1121.53/291.54 sumList(gen_cons:nil4_0(+(n619_0, 1)), gen_0':s5_0(b)) ->_R^Omega(1) 1121.53/291.54 if(isEmpty(gen_cons:nil4_0(+(n619_0, 1))), isZero(head(gen_cons:nil4_0(+(n619_0, 1)))), gen_0':s5_0(b), tail(gen_cons:nil4_0(+(n619_0, 1))), cons(p(head(gen_cons:nil4_0(+(n619_0, 1)))), tail(gen_cons:nil4_0(+(n619_0, 1)))), inc(gen_0':s5_0(b))) ->_R^Omega(1) 1121.53/291.54 if(false, isZero(head(gen_cons:nil4_0(+(1, n619_0)))), gen_0':s5_0(b), tail(gen_cons:nil4_0(+(1, n619_0))), cons(p(head(gen_cons:nil4_0(+(1, n619_0)))), tail(gen_cons:nil4_0(+(1, n619_0)))), inc(gen_0':s5_0(b))) ->_R^Omega(1) 1121.53/291.54 if(false, isZero(0'), gen_0':s5_0(b), tail(gen_cons:nil4_0(+(1, n619_0))), cons(p(head(gen_cons:nil4_0(+(1, n619_0)))), tail(gen_cons:nil4_0(+(1, n619_0)))), inc(gen_0':s5_0(b))) ->_R^Omega(1) 1121.53/291.54 if(false, true, gen_0':s5_0(b), tail(gen_cons:nil4_0(+(1, n619_0))), cons(p(head(gen_cons:nil4_0(+(1, n619_0)))), tail(gen_cons:nil4_0(+(1, n619_0)))), inc(gen_0':s5_0(b))) ->_R^Omega(1) 1121.53/291.54 if(false, true, gen_0':s5_0(b), gen_cons:nil4_0(n619_0), cons(p(head(gen_cons:nil4_0(+(1, n619_0)))), tail(gen_cons:nil4_0(+(1, n619_0)))), inc(gen_0':s5_0(b))) ->_R^Omega(1) 1121.53/291.54 if(false, true, gen_0':s5_0(b), gen_cons:nil4_0(n619_0), cons(p(0'), tail(gen_cons:nil4_0(+(1, n619_0)))), inc(gen_0':s5_0(b))) ->_R^Omega(1) 1121.53/291.54 if(false, true, gen_0':s5_0(b), gen_cons:nil4_0(n619_0), cons(0', tail(gen_cons:nil4_0(+(1, n619_0)))), inc(gen_0':s5_0(b))) ->_R^Omega(1) 1121.53/291.54 if(false, true, gen_0':s5_0(b), gen_cons:nil4_0(n619_0), cons(0', gen_cons:nil4_0(n619_0)), inc(gen_0':s5_0(b))) ->_L^Omega(1 + b) 1121.53/291.54 if(false, true, gen_0':s5_0(b), gen_cons:nil4_0(n619_0), cons(0', gen_cons:nil4_0(n619_0)), gen_0':s5_0(+(1, b))) ->_R^Omega(1) 1121.53/291.54 sumList(gen_cons:nil4_0(n619_0), gen_0':s5_0(b)) ->_IH 1121.53/291.54 gen_0':s5_0(b) 1121.53/291.54 1121.53/291.54 We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (16) 1121.53/291.54 Obligation: 1121.53/291.54 Proved the lower bound n^2 for the following obligation: 1121.53/291.54 1121.53/291.54 Innermost TRS: 1121.53/291.54 Rules: 1121.53/291.54 isEmpty(cons(x, xs)) -> false 1121.53/291.54 isEmpty(nil) -> true 1121.53/291.54 isZero(0') -> true 1121.53/291.54 isZero(s(x)) -> false 1121.53/291.54 head(cons(x, xs)) -> x 1121.53/291.54 tail(cons(x, xs)) -> xs 1121.53/291.54 tail(nil) -> nil 1121.53/291.54 p(s(s(x))) -> s(p(s(x))) 1121.53/291.54 p(s(0')) -> 0' 1121.53/291.54 p(0') -> 0' 1121.53/291.54 inc(s(x)) -> s(inc(x)) 1121.53/291.54 inc(0') -> s(0') 1121.53/291.54 sumList(xs, y) -> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y)) 1121.53/291.54 if(true, b, y, xs, ys, x) -> y 1121.53/291.54 if(false, true, y, xs, ys, x) -> sumList(xs, y) 1121.53/291.54 if(false, false, y, xs, ys, x) -> sumList(ys, x) 1121.53/291.54 sum(xs) -> sumList(xs, 0') 1121.53/291.54 1121.53/291.54 Types: 1121.53/291.54 isEmpty :: cons:nil -> false:true 1121.53/291.54 cons :: 0':s -> cons:nil -> cons:nil 1121.53/291.54 false :: false:true 1121.53/291.54 nil :: cons:nil 1121.53/291.54 true :: false:true 1121.53/291.54 isZero :: 0':s -> false:true 1121.53/291.54 0' :: 0':s 1121.53/291.54 s :: 0':s -> 0':s 1121.53/291.54 head :: cons:nil -> 0':s 1121.53/291.54 tail :: cons:nil -> cons:nil 1121.53/291.54 p :: 0':s -> 0':s 1121.53/291.54 inc :: 0':s -> 0':s 1121.53/291.54 sumList :: cons:nil -> 0':s -> 0':s 1121.53/291.54 if :: false:true -> false:true -> 0':s -> cons:nil -> cons:nil -> 0':s -> 0':s 1121.53/291.54 sum :: cons:nil -> 0':s 1121.53/291.54 hole_false:true1_0 :: false:true 1121.53/291.54 hole_cons:nil2_0 :: cons:nil 1121.53/291.54 hole_0':s3_0 :: 0':s 1121.53/291.54 gen_cons:nil4_0 :: Nat -> cons:nil 1121.53/291.54 gen_0':s5_0 :: Nat -> 0':s 1121.53/291.54 1121.53/291.54 1121.53/291.54 Lemmas: 1121.53/291.54 p(gen_0':s5_0(+(1, n7_0))) -> gen_0':s5_0(n7_0), rt in Omega(1 + n7_0) 1121.53/291.54 inc(gen_0':s5_0(n308_0)) -> gen_0':s5_0(+(1, n308_0)), rt in Omega(1 + n308_0) 1121.53/291.54 1121.53/291.54 1121.53/291.54 Generator Equations: 1121.53/291.54 gen_cons:nil4_0(0) <=> nil 1121.53/291.54 gen_cons:nil4_0(+(x, 1)) <=> cons(0', gen_cons:nil4_0(x)) 1121.53/291.54 gen_0':s5_0(0) <=> 0' 1121.53/291.54 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 1121.53/291.54 1121.53/291.54 1121.53/291.54 The following defined symbols remain to be analysed: 1121.53/291.54 sumList 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (17) LowerBoundPropagationProof (FINISHED) 1121.53/291.54 Propagated lower bound. 1121.53/291.54 ---------------------------------------- 1121.53/291.54 1121.53/291.54 (18) 1121.53/291.54 BOUNDS(n^2, INF) 1121.80/291.62 EOF