306.91/291.53 WORST_CASE(Omega(n^2), ?) 306.91/291.54 proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml 306.91/291.54 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 306.91/291.54 306.91/291.54 306.91/291.54 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). 306.91/291.54 306.91/291.54 (0) CpxTRS 306.91/291.54 (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 306.91/291.54 (2) CpxTRS 306.91/291.54 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 306.91/291.54 (4) typed CpxTrs 306.91/291.54 (5) OrderProof [LOWER BOUND(ID), 0 ms] 306.91/291.54 (6) typed CpxTrs 306.91/291.54 (7) RewriteLemmaProof [LOWER BOUND(ID), 286 ms] 306.91/291.54 (8) BEST 306.91/291.54 (9) proven lower bound 306.91/291.54 (10) LowerBoundPropagationProof [FINISHED, 0 ms] 306.91/291.54 (11) BOUNDS(n^1, INF) 306.91/291.54 (12) typed CpxTrs 306.91/291.54 (13) RewriteLemmaProof [LOWER BOUND(ID), 89 ms] 306.91/291.54 (14) BEST 306.91/291.54 (15) proven lower bound 306.91/291.54 (16) LowerBoundPropagationProof [FINISHED, 0 ms] 306.91/291.54 (17) BOUNDS(n^2, INF) 306.91/291.54 (18) typed CpxTrs 306.91/291.54 (19) RewriteLemmaProof [LOWER BOUND(ID), 79 ms] 306.91/291.54 (20) typed CpxTrs 306.91/291.54 306.91/291.54 306.91/291.54 ---------------------------------------- 306.91/291.54 306.91/291.54 (0) 306.91/291.54 Obligation: 306.91/291.54 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). 306.91/291.54 306.91/291.54 306.91/291.54 The TRS R consists of the following rules: 306.91/291.54 306.91/291.54 car(cons(x, l)) -> x 306.91/291.54 cddr(nil) -> nil 306.91/291.54 cddr(cons(x, nil)) -> nil 306.91/291.54 cddr(cons(x, cons(y, l))) -> l 306.91/291.54 cadr(cons(x, cons(y, l))) -> y 306.91/291.54 isZero(0) -> true 306.91/291.54 isZero(s(x)) -> false 306.91/291.54 plus(x, y) -> ifplus(isZero(x), x, y) 306.91/291.54 ifplus(true, x, y) -> y 306.91/291.54 ifplus(false, x, y) -> s(plus(p(x), y)) 306.91/291.54 times(x, y) -> iftimes(isZero(x), x, y) 306.91/291.54 iftimes(true, x, y) -> 0 306.91/291.54 iftimes(false, x, y) -> plus(y, times(p(x), y)) 306.91/291.54 p(s(x)) -> x 306.91/291.54 p(0) -> 0 306.91/291.54 shorter(nil, y) -> true 306.91/291.54 shorter(cons(x, l), 0) -> false 306.91/291.54 shorter(cons(x, l), s(y)) -> shorter(l, y) 306.91/291.54 prod(l) -> if(shorter(l, 0), shorter(l, s(0)), l) 306.91/291.54 if(true, b, l) -> s(0) 306.91/291.54 if(false, b, l) -> if2(b, l) 306.91/291.54 if2(true, l) -> car(l) 306.91/291.54 if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) 306.91/291.54 306.91/291.54 S is empty. 306.91/291.54 Rewrite Strategy: FULL 306.91/291.54 ---------------------------------------- 306.91/291.54 306.91/291.54 (1) RenamingProof (BOTH BOUNDS(ID, ID)) 306.91/291.54 Renamed function symbols to avoid clashes with predefined symbol. 306.91/291.54 ---------------------------------------- 306.91/291.54 306.91/291.54 (2) 306.91/291.54 Obligation: 306.91/291.54 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). 306.91/291.54 306.91/291.54 306.91/291.54 The TRS R consists of the following rules: 306.91/291.54 306.91/291.54 car(cons(x, l)) -> x 306.91/291.54 cddr(nil) -> nil 306.91/291.54 cddr(cons(x, nil)) -> nil 306.91/291.54 cddr(cons(x, cons(y, l))) -> l 306.91/291.54 cadr(cons(x, cons(y, l))) -> y 306.91/291.54 isZero(0') -> true 306.91/291.54 isZero(s(x)) -> false 306.91/291.54 plus(x, y) -> ifplus(isZero(x), x, y) 306.91/291.54 ifplus(true, x, y) -> y 306.91/291.54 ifplus(false, x, y) -> s(plus(p(x), y)) 306.91/291.54 times(x, y) -> iftimes(isZero(x), x, y) 306.91/291.54 iftimes(true, x, y) -> 0' 306.91/291.54 iftimes(false, x, y) -> plus(y, times(p(x), y)) 306.91/291.54 p(s(x)) -> x 306.91/291.54 p(0') -> 0' 306.91/291.54 shorter(nil, y) -> true 306.91/291.54 shorter(cons(x, l), 0') -> false 306.91/291.54 shorter(cons(x, l), s(y)) -> shorter(l, y) 306.91/291.54 prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) 306.91/291.54 if(true, b, l) -> s(0') 306.91/291.54 if(false, b, l) -> if2(b, l) 306.91/291.54 if2(true, l) -> car(l) 306.91/291.54 if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) 306.91/291.54 306.91/291.54 S is empty. 306.91/291.54 Rewrite Strategy: FULL 306.91/291.54 ---------------------------------------- 306.91/291.54 306.91/291.54 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 306.91/291.54 Infered types. 306.91/291.54 ---------------------------------------- 306.91/291.54 306.91/291.54 (4) 306.91/291.54 Obligation: 306.91/291.54 TRS: 306.91/291.54 Rules: 306.91/291.54 car(cons(x, l)) -> x 306.91/291.54 cddr(nil) -> nil 306.91/291.54 cddr(cons(x, nil)) -> nil 306.91/291.54 cddr(cons(x, cons(y, l))) -> l 306.91/291.54 cadr(cons(x, cons(y, l))) -> y 306.91/291.54 isZero(0') -> true 306.91/291.54 isZero(s(x)) -> false 306.91/291.54 plus(x, y) -> ifplus(isZero(x), x, y) 306.91/291.54 ifplus(true, x, y) -> y 306.91/291.54 ifplus(false, x, y) -> s(plus(p(x), y)) 306.91/291.54 times(x, y) -> iftimes(isZero(x), x, y) 306.91/291.54 iftimes(true, x, y) -> 0' 306.91/291.54 iftimes(false, x, y) -> plus(y, times(p(x), y)) 306.91/291.54 p(s(x)) -> x 306.91/291.54 p(0') -> 0' 306.91/291.54 shorter(nil, y) -> true 306.91/291.54 shorter(cons(x, l), 0') -> false 306.91/291.54 shorter(cons(x, l), s(y)) -> shorter(l, y) 306.91/291.54 prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) 306.91/291.54 if(true, b, l) -> s(0') 306.91/291.54 if(false, b, l) -> if2(b, l) 306.91/291.54 if2(true, l) -> car(l) 306.91/291.54 if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) 306.91/291.54 306.91/291.54 Types: 306.91/291.54 car :: cons:nil -> 0':s 306.91/291.54 cons :: 0':s -> cons:nil -> cons:nil 306.91/291.54 cddr :: cons:nil -> cons:nil 306.91/291.54 nil :: cons:nil 306.91/291.54 cadr :: cons:nil -> 0':s 306.91/291.54 isZero :: 0':s -> true:false 306.91/291.54 0' :: 0':s 306.91/291.54 true :: true:false 306.91/291.54 s :: 0':s -> 0':s 306.91/291.54 false :: true:false 306.91/291.54 plus :: 0':s -> 0':s -> 0':s 306.91/291.54 ifplus :: true:false -> 0':s -> 0':s -> 0':s 306.91/291.54 p :: 0':s -> 0':s 306.91/291.54 times :: 0':s -> 0':s -> 0':s 306.91/291.54 iftimes :: true:false -> 0':s -> 0':s -> 0':s 306.91/291.54 shorter :: cons:nil -> 0':s -> true:false 306.91/291.54 prod :: cons:nil -> 0':s 306.91/291.54 if :: true:false -> true:false -> cons:nil -> 0':s 306.91/291.54 if2 :: true:false -> cons:nil -> 0':s 306.91/291.54 hole_0':s1_0 :: 0':s 306.91/291.54 hole_cons:nil2_0 :: cons:nil 306.91/291.54 hole_true:false3_0 :: true:false 306.91/291.54 gen_0':s4_0 :: Nat -> 0':s 306.91/291.54 gen_cons:nil5_0 :: Nat -> cons:nil 306.91/291.54 306.91/291.54 ---------------------------------------- 306.91/291.54 306.91/291.54 (5) OrderProof (LOWER BOUND(ID)) 306.91/291.54 Heuristically decided to analyse the following defined symbols: 306.91/291.54 plus, times, shorter, prod 306.91/291.54 306.91/291.54 They will be analysed ascendingly in the following order: 306.91/291.54 plus < times 306.91/291.54 times < prod 306.91/291.54 shorter < prod 306.91/291.54 306.91/291.54 ---------------------------------------- 306.91/291.54 306.91/291.54 (6) 306.91/291.54 Obligation: 306.91/291.54 TRS: 306.91/291.54 Rules: 306.91/291.54 car(cons(x, l)) -> x 306.91/291.54 cddr(nil) -> nil 306.91/291.54 cddr(cons(x, nil)) -> nil 306.91/291.54 cddr(cons(x, cons(y, l))) -> l 306.91/291.54 cadr(cons(x, cons(y, l))) -> y 306.91/291.54 isZero(0') -> true 306.91/291.54 isZero(s(x)) -> false 306.91/291.54 plus(x, y) -> ifplus(isZero(x), x, y) 306.91/291.54 ifplus(true, x, y) -> y 306.91/291.54 ifplus(false, x, y) -> s(plus(p(x), y)) 306.91/291.54 times(x, y) -> iftimes(isZero(x), x, y) 306.91/291.54 iftimes(true, x, y) -> 0' 306.91/291.54 iftimes(false, x, y) -> plus(y, times(p(x), y)) 306.91/291.54 p(s(x)) -> x 306.91/291.54 p(0') -> 0' 306.91/291.54 shorter(nil, y) -> true 306.91/291.54 shorter(cons(x, l), 0') -> false 306.91/291.54 shorter(cons(x, l), s(y)) -> shorter(l, y) 306.91/291.54 prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) 306.91/291.54 if(true, b, l) -> s(0') 306.91/291.54 if(false, b, l) -> if2(b, l) 306.91/291.54 if2(true, l) -> car(l) 306.91/291.54 if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) 306.91/291.54 306.91/291.54 Types: 306.91/291.54 car :: cons:nil -> 0':s 306.91/291.54 cons :: 0':s -> cons:nil -> cons:nil 306.91/291.54 cddr :: cons:nil -> cons:nil 306.91/291.54 nil :: cons:nil 306.91/291.54 cadr :: cons:nil -> 0':s 306.91/291.54 isZero :: 0':s -> true:false 306.91/291.54 0' :: 0':s 306.91/291.54 true :: true:false 306.91/291.54 s :: 0':s -> 0':s 306.91/291.54 false :: true:false 306.91/291.54 plus :: 0':s -> 0':s -> 0':s 306.91/291.54 ifplus :: true:false -> 0':s -> 0':s -> 0':s 306.91/291.54 p :: 0':s -> 0':s 306.91/291.54 times :: 0':s -> 0':s -> 0':s 306.91/291.54 iftimes :: true:false -> 0':s -> 0':s -> 0':s 306.91/291.54 shorter :: cons:nil -> 0':s -> true:false 306.91/291.54 prod :: cons:nil -> 0':s 306.91/291.54 if :: true:false -> true:false -> cons:nil -> 0':s 306.91/291.54 if2 :: true:false -> cons:nil -> 0':s 306.91/291.54 hole_0':s1_0 :: 0':s 306.91/291.54 hole_cons:nil2_0 :: cons:nil 306.91/291.54 hole_true:false3_0 :: true:false 306.91/291.54 gen_0':s4_0 :: Nat -> 0':s 306.91/291.54 gen_cons:nil5_0 :: Nat -> cons:nil 306.91/291.54 306.91/291.54 306.91/291.54 Generator Equations: 306.91/291.54 gen_0':s4_0(0) <=> 0' 306.91/291.54 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 306.91/291.54 gen_cons:nil5_0(0) <=> nil 306.91/291.54 gen_cons:nil5_0(+(x, 1)) <=> cons(0', gen_cons:nil5_0(x)) 306.91/291.54 306.91/291.54 306.91/291.54 The following defined symbols remain to be analysed: 306.91/291.54 plus, times, shorter, prod 306.91/291.54 306.91/291.54 They will be analysed ascendingly in the following order: 306.91/291.54 plus < times 306.91/291.54 times < prod 306.91/291.54 shorter < prod 306.91/291.54 306.91/291.54 ---------------------------------------- 306.91/291.54 306.91/291.54 (7) RewriteLemmaProof (LOWER BOUND(ID)) 306.91/291.54 Proved the following rewrite lemma: 306.91/291.54 plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) -> gen_0':s4_0(+(n7_0, b)), rt in Omega(1 + n7_0) 306.91/291.54 306.91/291.54 Induction Base: 306.91/291.54 plus(gen_0':s4_0(0), gen_0':s4_0(b)) ->_R^Omega(1) 306.91/291.54 ifplus(isZero(gen_0':s4_0(0)), gen_0':s4_0(0), gen_0':s4_0(b)) ->_R^Omega(1) 306.91/291.54 ifplus(true, gen_0':s4_0(0), gen_0':s4_0(b)) ->_R^Omega(1) 306.91/291.54 gen_0':s4_0(b) 306.91/291.54 306.91/291.54 Induction Step: 306.91/291.54 plus(gen_0':s4_0(+(n7_0, 1)), gen_0':s4_0(b)) ->_R^Omega(1) 306.91/291.54 ifplus(isZero(gen_0':s4_0(+(n7_0, 1))), gen_0':s4_0(+(n7_0, 1)), gen_0':s4_0(b)) ->_R^Omega(1) 306.91/291.54 ifplus(false, gen_0':s4_0(+(1, n7_0)), gen_0':s4_0(b)) ->_R^Omega(1) 306.91/291.54 s(plus(p(gen_0':s4_0(+(1, n7_0))), gen_0':s4_0(b))) ->_R^Omega(1) 306.91/291.54 s(plus(gen_0':s4_0(n7_0), gen_0':s4_0(b))) ->_IH 306.91/291.54 s(gen_0':s4_0(+(b, c8_0))) 306.91/291.54 306.91/291.54 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 306.91/291.54 ---------------------------------------- 306.91/291.54 306.91/291.54 (8) 306.91/291.54 Complex Obligation (BEST) 306.91/291.54 306.91/291.54 ---------------------------------------- 306.91/291.54 306.91/291.54 (9) 306.91/291.54 Obligation: 306.91/291.54 Proved the lower bound n^1 for the following obligation: 306.91/291.54 306.91/291.54 TRS: 306.91/291.54 Rules: 306.91/291.54 car(cons(x, l)) -> x 306.91/291.54 cddr(nil) -> nil 306.91/291.54 cddr(cons(x, nil)) -> nil 306.91/291.54 cddr(cons(x, cons(y, l))) -> l 306.91/291.54 cadr(cons(x, cons(y, l))) -> y 306.91/291.54 isZero(0') -> true 306.91/291.54 isZero(s(x)) -> false 306.91/291.54 plus(x, y) -> ifplus(isZero(x), x, y) 306.91/291.54 ifplus(true, x, y) -> y 306.91/291.54 ifplus(false, x, y) -> s(plus(p(x), y)) 306.91/291.54 times(x, y) -> iftimes(isZero(x), x, y) 306.91/291.54 iftimes(true, x, y) -> 0' 306.91/291.54 iftimes(false, x, y) -> plus(y, times(p(x), y)) 306.91/291.54 p(s(x)) -> x 306.91/291.54 p(0') -> 0' 306.91/291.54 shorter(nil, y) -> true 306.91/291.54 shorter(cons(x, l), 0') -> false 306.91/291.54 shorter(cons(x, l), s(y)) -> shorter(l, y) 306.91/291.54 prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) 306.91/291.54 if(true, b, l) -> s(0') 306.91/291.54 if(false, b, l) -> if2(b, l) 306.91/291.54 if2(true, l) -> car(l) 306.91/291.54 if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) 306.91/291.54 306.91/291.54 Types: 306.91/291.54 car :: cons:nil -> 0':s 306.91/291.54 cons :: 0':s -> cons:nil -> cons:nil 306.91/291.54 cddr :: cons:nil -> cons:nil 306.91/291.54 nil :: cons:nil 306.91/291.54 cadr :: cons:nil -> 0':s 306.91/291.54 isZero :: 0':s -> true:false 306.91/291.54 0' :: 0':s 306.91/291.54 true :: true:false 306.91/291.54 s :: 0':s -> 0':s 306.91/291.54 false :: true:false 306.91/291.54 plus :: 0':s -> 0':s -> 0':s 306.91/291.54 ifplus :: true:false -> 0':s -> 0':s -> 0':s 306.91/291.54 p :: 0':s -> 0':s 306.91/291.54 times :: 0':s -> 0':s -> 0':s 306.91/291.54 iftimes :: true:false -> 0':s -> 0':s -> 0':s 306.91/291.54 shorter :: cons:nil -> 0':s -> true:false 306.91/291.54 prod :: cons:nil -> 0':s 306.91/291.54 if :: true:false -> true:false -> cons:nil -> 0':s 306.91/291.54 if2 :: true:false -> cons:nil -> 0':s 306.91/291.54 hole_0':s1_0 :: 0':s 306.91/291.54 hole_cons:nil2_0 :: cons:nil 306.91/291.54 hole_true:false3_0 :: true:false 306.91/291.54 gen_0':s4_0 :: Nat -> 0':s 306.91/291.54 gen_cons:nil5_0 :: Nat -> cons:nil 306.91/291.54 306.91/291.54 306.91/291.54 Generator Equations: 306.91/291.54 gen_0':s4_0(0) <=> 0' 306.91/291.54 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 306.91/291.54 gen_cons:nil5_0(0) <=> nil 306.91/291.54 gen_cons:nil5_0(+(x, 1)) <=> cons(0', gen_cons:nil5_0(x)) 306.91/291.54 306.91/291.54 306.91/291.54 The following defined symbols remain to be analysed: 306.91/291.54 plus, times, shorter, prod 306.91/291.54 306.91/291.54 They will be analysed ascendingly in the following order: 306.91/291.54 plus < times 306.91/291.54 times < prod 306.91/291.54 shorter < prod 306.91/291.54 306.91/291.54 ---------------------------------------- 306.91/291.54 306.91/291.54 (10) LowerBoundPropagationProof (FINISHED) 306.91/291.54 Propagated lower bound. 306.91/291.54 ---------------------------------------- 306.91/291.54 306.91/291.54 (11) 306.91/291.54 BOUNDS(n^1, INF) 306.91/291.54 306.91/291.54 ---------------------------------------- 306.91/291.54 306.91/291.54 (12) 306.91/291.54 Obligation: 306.91/291.54 TRS: 306.91/291.54 Rules: 306.91/291.54 car(cons(x, l)) -> x 306.91/291.54 cddr(nil) -> nil 306.91/291.54 cddr(cons(x, nil)) -> nil 306.91/291.54 cddr(cons(x, cons(y, l))) -> l 306.91/291.54 cadr(cons(x, cons(y, l))) -> y 306.91/291.54 isZero(0') -> true 306.91/291.54 isZero(s(x)) -> false 306.91/291.54 plus(x, y) -> ifplus(isZero(x), x, y) 306.91/291.54 ifplus(true, x, y) -> y 306.91/291.54 ifplus(false, x, y) -> s(plus(p(x), y)) 306.91/291.54 times(x, y) -> iftimes(isZero(x), x, y) 306.91/291.54 iftimes(true, x, y) -> 0' 306.91/291.54 iftimes(false, x, y) -> plus(y, times(p(x), y)) 306.91/291.54 p(s(x)) -> x 306.91/291.54 p(0') -> 0' 306.91/291.54 shorter(nil, y) -> true 306.91/291.54 shorter(cons(x, l), 0') -> false 306.91/291.54 shorter(cons(x, l), s(y)) -> shorter(l, y) 306.91/291.54 prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) 306.91/291.54 if(true, b, l) -> s(0') 306.91/291.54 if(false, b, l) -> if2(b, l) 306.91/291.54 if2(true, l) -> car(l) 306.91/291.54 if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) 306.91/291.54 306.91/291.54 Types: 306.91/291.54 car :: cons:nil -> 0':s 306.91/291.54 cons :: 0':s -> cons:nil -> cons:nil 306.91/291.54 cddr :: cons:nil -> cons:nil 306.91/291.54 nil :: cons:nil 306.91/291.54 cadr :: cons:nil -> 0':s 306.91/291.54 isZero :: 0':s -> true:false 306.91/291.54 0' :: 0':s 306.91/291.54 true :: true:false 306.91/291.54 s :: 0':s -> 0':s 306.91/291.54 false :: true:false 306.91/291.54 plus :: 0':s -> 0':s -> 0':s 306.91/291.54 ifplus :: true:false -> 0':s -> 0':s -> 0':s 306.91/291.54 p :: 0':s -> 0':s 306.91/291.54 times :: 0':s -> 0':s -> 0':s 306.91/291.54 iftimes :: true:false -> 0':s -> 0':s -> 0':s 306.91/291.54 shorter :: cons:nil -> 0':s -> true:false 306.91/291.54 prod :: cons:nil -> 0':s 306.91/291.54 if :: true:false -> true:false -> cons:nil -> 0':s 306.91/291.54 if2 :: true:false -> cons:nil -> 0':s 306.91/291.54 hole_0':s1_0 :: 0':s 306.91/291.54 hole_cons:nil2_0 :: cons:nil 306.91/291.54 hole_true:false3_0 :: true:false 306.91/291.54 gen_0':s4_0 :: Nat -> 0':s 306.91/291.54 gen_cons:nil5_0 :: Nat -> cons:nil 307.00/291.54 307.00/291.54 307.00/291.54 Lemmas: 307.00/291.54 plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) -> gen_0':s4_0(+(n7_0, b)), rt in Omega(1 + n7_0) 307.00/291.54 307.00/291.54 307.00/291.54 Generator Equations: 307.00/291.54 gen_0':s4_0(0) <=> 0' 307.00/291.54 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 307.00/291.54 gen_cons:nil5_0(0) <=> nil 307.00/291.54 gen_cons:nil5_0(+(x, 1)) <=> cons(0', gen_cons:nil5_0(x)) 307.00/291.54 307.00/291.54 307.00/291.54 The following defined symbols remain to be analysed: 307.00/291.54 times, shorter, prod 307.00/291.54 307.00/291.54 They will be analysed ascendingly in the following order: 307.00/291.54 times < prod 307.00/291.54 shorter < prod 307.00/291.54 307.00/291.54 ---------------------------------------- 307.00/291.54 307.00/291.54 (13) RewriteLemmaProof (LOWER BOUND(ID)) 307.00/291.54 Proved the following rewrite lemma: 307.00/291.54 times(gen_0':s4_0(n1253_0), gen_0':s4_0(b)) -> gen_0':s4_0(*(n1253_0, b)), rt in Omega(1 + b*n1253_0 + n1253_0) 307.00/291.54 307.00/291.54 Induction Base: 307.00/291.54 times(gen_0':s4_0(0), gen_0':s4_0(b)) ->_R^Omega(1) 307.00/291.54 iftimes(isZero(gen_0':s4_0(0)), gen_0':s4_0(0), gen_0':s4_0(b)) ->_R^Omega(1) 307.00/291.54 iftimes(true, gen_0':s4_0(0), gen_0':s4_0(b)) ->_R^Omega(1) 307.00/291.54 0' 307.00/291.54 307.00/291.54 Induction Step: 307.00/291.54 times(gen_0':s4_0(+(n1253_0, 1)), gen_0':s4_0(b)) ->_R^Omega(1) 307.00/291.54 iftimes(isZero(gen_0':s4_0(+(n1253_0, 1))), gen_0':s4_0(+(n1253_0, 1)), gen_0':s4_0(b)) ->_R^Omega(1) 307.00/291.54 iftimes(false, gen_0':s4_0(+(1, n1253_0)), gen_0':s4_0(b)) ->_R^Omega(1) 307.00/291.54 plus(gen_0':s4_0(b), times(p(gen_0':s4_0(+(1, n1253_0))), gen_0':s4_0(b))) ->_R^Omega(1) 307.00/291.54 plus(gen_0':s4_0(b), times(gen_0':s4_0(n1253_0), gen_0':s4_0(b))) ->_IH 307.00/291.54 plus(gen_0':s4_0(b), gen_0':s4_0(*(c1254_0, b))) ->_L^Omega(1 + b) 307.00/291.54 gen_0':s4_0(+(b, *(n1253_0, b))) 307.00/291.54 307.00/291.54 We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). 307.00/291.54 ---------------------------------------- 307.00/291.54 307.00/291.54 (14) 307.00/291.54 Complex Obligation (BEST) 307.00/291.54 307.00/291.54 ---------------------------------------- 307.00/291.54 307.00/291.54 (15) 307.00/291.54 Obligation: 307.00/291.54 Proved the lower bound n^2 for the following obligation: 307.00/291.54 307.00/291.54 TRS: 307.00/291.54 Rules: 307.00/291.54 car(cons(x, l)) -> x 307.00/291.54 cddr(nil) -> nil 307.00/291.54 cddr(cons(x, nil)) -> nil 307.00/291.54 cddr(cons(x, cons(y, l))) -> l 307.00/291.54 cadr(cons(x, cons(y, l))) -> y 307.00/291.54 isZero(0') -> true 307.00/291.54 isZero(s(x)) -> false 307.00/291.54 plus(x, y) -> ifplus(isZero(x), x, y) 307.00/291.54 ifplus(true, x, y) -> y 307.00/291.54 ifplus(false, x, y) -> s(plus(p(x), y)) 307.00/291.54 times(x, y) -> iftimes(isZero(x), x, y) 307.00/291.54 iftimes(true, x, y) -> 0' 307.00/291.54 iftimes(false, x, y) -> plus(y, times(p(x), y)) 307.00/291.54 p(s(x)) -> x 307.00/291.54 p(0') -> 0' 307.00/291.54 shorter(nil, y) -> true 307.00/291.54 shorter(cons(x, l), 0') -> false 307.00/291.54 shorter(cons(x, l), s(y)) -> shorter(l, y) 307.00/291.54 prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) 307.00/291.54 if(true, b, l) -> s(0') 307.00/291.54 if(false, b, l) -> if2(b, l) 307.00/291.54 if2(true, l) -> car(l) 307.00/291.54 if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) 307.00/291.54 307.00/291.54 Types: 307.00/291.54 car :: cons:nil -> 0':s 307.00/291.54 cons :: 0':s -> cons:nil -> cons:nil 307.00/291.54 cddr :: cons:nil -> cons:nil 307.00/291.54 nil :: cons:nil 307.00/291.54 cadr :: cons:nil -> 0':s 307.00/291.54 isZero :: 0':s -> true:false 307.00/291.54 0' :: 0':s 307.00/291.54 true :: true:false 307.00/291.54 s :: 0':s -> 0':s 307.00/291.54 false :: true:false 307.00/291.54 plus :: 0':s -> 0':s -> 0':s 307.00/291.54 ifplus :: true:false -> 0':s -> 0':s -> 0':s 307.00/291.54 p :: 0':s -> 0':s 307.00/291.54 times :: 0':s -> 0':s -> 0':s 307.00/291.54 iftimes :: true:false -> 0':s -> 0':s -> 0':s 307.00/291.54 shorter :: cons:nil -> 0':s -> true:false 307.00/291.54 prod :: cons:nil -> 0':s 307.00/291.54 if :: true:false -> true:false -> cons:nil -> 0':s 307.00/291.54 if2 :: true:false -> cons:nil -> 0':s 307.00/291.54 hole_0':s1_0 :: 0':s 307.00/291.54 hole_cons:nil2_0 :: cons:nil 307.00/291.54 hole_true:false3_0 :: true:false 307.00/291.54 gen_0':s4_0 :: Nat -> 0':s 307.00/291.54 gen_cons:nil5_0 :: Nat -> cons:nil 307.00/291.54 307.00/291.54 307.00/291.54 Lemmas: 307.00/291.54 plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) -> gen_0':s4_0(+(n7_0, b)), rt in Omega(1 + n7_0) 307.00/291.54 307.00/291.54 307.00/291.54 Generator Equations: 307.00/291.54 gen_0':s4_0(0) <=> 0' 307.00/291.54 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 307.00/291.54 gen_cons:nil5_0(0) <=> nil 307.00/291.54 gen_cons:nil5_0(+(x, 1)) <=> cons(0', gen_cons:nil5_0(x)) 307.00/291.54 307.00/291.54 307.00/291.54 The following defined symbols remain to be analysed: 307.00/291.54 times, shorter, prod 307.00/291.54 307.00/291.54 They will be analysed ascendingly in the following order: 307.00/291.54 times < prod 307.00/291.54 shorter < prod 307.00/291.54 307.00/291.54 ---------------------------------------- 307.00/291.54 307.00/291.54 (16) LowerBoundPropagationProof (FINISHED) 307.00/291.54 Propagated lower bound. 307.00/291.54 ---------------------------------------- 307.00/291.54 307.00/291.54 (17) 307.00/291.54 BOUNDS(n^2, INF) 307.00/291.54 307.00/291.54 ---------------------------------------- 307.00/291.54 307.00/291.54 (18) 307.00/291.54 Obligation: 307.00/291.54 TRS: 307.00/291.54 Rules: 307.00/291.54 car(cons(x, l)) -> x 307.00/291.54 cddr(nil) -> nil 307.00/291.54 cddr(cons(x, nil)) -> nil 307.00/291.54 cddr(cons(x, cons(y, l))) -> l 307.00/291.54 cadr(cons(x, cons(y, l))) -> y 307.00/291.54 isZero(0') -> true 307.00/291.54 isZero(s(x)) -> false 307.00/291.54 plus(x, y) -> ifplus(isZero(x), x, y) 307.00/291.54 ifplus(true, x, y) -> y 307.00/291.54 ifplus(false, x, y) -> s(plus(p(x), y)) 307.00/291.54 times(x, y) -> iftimes(isZero(x), x, y) 307.00/291.54 iftimes(true, x, y) -> 0' 307.00/291.54 iftimes(false, x, y) -> plus(y, times(p(x), y)) 307.00/291.54 p(s(x)) -> x 307.00/291.54 p(0') -> 0' 307.00/291.54 shorter(nil, y) -> true 307.00/291.54 shorter(cons(x, l), 0') -> false 307.00/291.54 shorter(cons(x, l), s(y)) -> shorter(l, y) 307.00/291.54 prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) 307.00/291.54 if(true, b, l) -> s(0') 307.00/291.54 if(false, b, l) -> if2(b, l) 307.00/291.54 if2(true, l) -> car(l) 307.00/291.54 if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) 307.00/291.54 307.00/291.54 Types: 307.00/291.54 car :: cons:nil -> 0':s 307.00/291.54 cons :: 0':s -> cons:nil -> cons:nil 307.00/291.54 cddr :: cons:nil -> cons:nil 307.00/291.54 nil :: cons:nil 307.00/291.54 cadr :: cons:nil -> 0':s 307.00/291.54 isZero :: 0':s -> true:false 307.00/291.54 0' :: 0':s 307.00/291.54 true :: true:false 307.00/291.54 s :: 0':s -> 0':s 307.00/291.54 false :: true:false 307.00/291.54 plus :: 0':s -> 0':s -> 0':s 307.00/291.54 ifplus :: true:false -> 0':s -> 0':s -> 0':s 307.00/291.54 p :: 0':s -> 0':s 307.00/291.54 times :: 0':s -> 0':s -> 0':s 307.00/291.54 iftimes :: true:false -> 0':s -> 0':s -> 0':s 307.00/291.54 shorter :: cons:nil -> 0':s -> true:false 307.00/291.54 prod :: cons:nil -> 0':s 307.00/291.54 if :: true:false -> true:false -> cons:nil -> 0':s 307.00/291.54 if2 :: true:false -> cons:nil -> 0':s 307.00/291.54 hole_0':s1_0 :: 0':s 307.00/291.54 hole_cons:nil2_0 :: cons:nil 307.00/291.54 hole_true:false3_0 :: true:false 307.00/291.54 gen_0':s4_0 :: Nat -> 0':s 307.00/291.54 gen_cons:nil5_0 :: Nat -> cons:nil 307.00/291.54 307.00/291.54 307.00/291.54 Lemmas: 307.00/291.54 plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) -> gen_0':s4_0(+(n7_0, b)), rt in Omega(1 + n7_0) 307.00/291.54 times(gen_0':s4_0(n1253_0), gen_0':s4_0(b)) -> gen_0':s4_0(*(n1253_0, b)), rt in Omega(1 + b*n1253_0 + n1253_0) 307.00/291.54 307.00/291.54 307.00/291.54 Generator Equations: 307.00/291.54 gen_0':s4_0(0) <=> 0' 307.00/291.54 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 307.00/291.54 gen_cons:nil5_0(0) <=> nil 307.00/291.54 gen_cons:nil5_0(+(x, 1)) <=> cons(0', gen_cons:nil5_0(x)) 307.00/291.54 307.00/291.54 307.00/291.54 The following defined symbols remain to be analysed: 307.00/291.54 shorter, prod 307.00/291.54 307.00/291.54 They will be analysed ascendingly in the following order: 307.00/291.54 shorter < prod 307.00/291.54 307.00/291.54 ---------------------------------------- 307.00/291.54 307.00/291.54 (19) RewriteLemmaProof (LOWER BOUND(ID)) 307.00/291.54 Proved the following rewrite lemma: 307.00/291.54 shorter(gen_cons:nil5_0(n3479_0), gen_0':s4_0(n3479_0)) -> true, rt in Omega(1 + n3479_0) 307.00/291.54 307.00/291.54 Induction Base: 307.00/291.54 shorter(gen_cons:nil5_0(0), gen_0':s4_0(0)) ->_R^Omega(1) 307.00/291.54 true 307.00/291.54 307.00/291.54 Induction Step: 307.00/291.54 shorter(gen_cons:nil5_0(+(n3479_0, 1)), gen_0':s4_0(+(n3479_0, 1))) ->_R^Omega(1) 307.00/291.54 shorter(gen_cons:nil5_0(n3479_0), gen_0':s4_0(n3479_0)) ->_IH 307.00/291.54 true 307.00/291.54 307.00/291.54 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 307.00/291.54 ---------------------------------------- 307.00/291.54 307.00/291.54 (20) 307.00/291.54 Obligation: 307.00/291.54 TRS: 307.00/291.54 Rules: 307.00/291.54 car(cons(x, l)) -> x 307.00/291.54 cddr(nil) -> nil 307.00/291.54 cddr(cons(x, nil)) -> nil 307.00/291.54 cddr(cons(x, cons(y, l))) -> l 307.00/291.54 cadr(cons(x, cons(y, l))) -> y 307.00/291.54 isZero(0') -> true 307.00/291.54 isZero(s(x)) -> false 307.00/291.54 plus(x, y) -> ifplus(isZero(x), x, y) 307.00/291.54 ifplus(true, x, y) -> y 307.00/291.54 ifplus(false, x, y) -> s(plus(p(x), y)) 307.00/291.54 times(x, y) -> iftimes(isZero(x), x, y) 307.00/291.54 iftimes(true, x, y) -> 0' 307.00/291.54 iftimes(false, x, y) -> plus(y, times(p(x), y)) 307.00/291.54 p(s(x)) -> x 307.00/291.54 p(0') -> 0' 307.00/291.54 shorter(nil, y) -> true 307.00/291.54 shorter(cons(x, l), 0') -> false 307.00/291.54 shorter(cons(x, l), s(y)) -> shorter(l, y) 307.00/291.54 prod(l) -> if(shorter(l, 0'), shorter(l, s(0')), l) 307.00/291.54 if(true, b, l) -> s(0') 307.00/291.54 if(false, b, l) -> if2(b, l) 307.00/291.54 if2(true, l) -> car(l) 307.00/291.54 if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) 307.00/291.54 307.00/291.54 Types: 307.00/291.54 car :: cons:nil -> 0':s 307.00/291.54 cons :: 0':s -> cons:nil -> cons:nil 307.00/291.54 cddr :: cons:nil -> cons:nil 307.00/291.54 nil :: cons:nil 307.00/291.54 cadr :: cons:nil -> 0':s 307.00/291.54 isZero :: 0':s -> true:false 307.00/291.54 0' :: 0':s 307.00/291.54 true :: true:false 307.00/291.54 s :: 0':s -> 0':s 307.00/291.54 false :: true:false 307.00/291.54 plus :: 0':s -> 0':s -> 0':s 307.00/291.54 ifplus :: true:false -> 0':s -> 0':s -> 0':s 307.00/291.54 p :: 0':s -> 0':s 307.00/291.54 times :: 0':s -> 0':s -> 0':s 307.00/291.54 iftimes :: true:false -> 0':s -> 0':s -> 0':s 307.00/291.54 shorter :: cons:nil -> 0':s -> true:false 307.00/291.54 prod :: cons:nil -> 0':s 307.00/291.54 if :: true:false -> true:false -> cons:nil -> 0':s 307.00/291.54 if2 :: true:false -> cons:nil -> 0':s 307.00/291.54 hole_0':s1_0 :: 0':s 307.00/291.54 hole_cons:nil2_0 :: cons:nil 307.00/291.54 hole_true:false3_0 :: true:false 307.00/291.54 gen_0':s4_0 :: Nat -> 0':s 307.00/291.54 gen_cons:nil5_0 :: Nat -> cons:nil 307.00/291.54 307.00/291.54 307.00/291.54 Lemmas: 307.00/291.54 plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) -> gen_0':s4_0(+(n7_0, b)), rt in Omega(1 + n7_0) 307.00/291.54 times(gen_0':s4_0(n1253_0), gen_0':s4_0(b)) -> gen_0':s4_0(*(n1253_0, b)), rt in Omega(1 + b*n1253_0 + n1253_0) 307.00/291.54 shorter(gen_cons:nil5_0(n3479_0), gen_0':s4_0(n3479_0)) -> true, rt in Omega(1 + n3479_0) 307.00/291.54 307.00/291.54 307.00/291.54 Generator Equations: 307.00/291.54 gen_0':s4_0(0) <=> 0' 307.00/291.54 gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) 307.00/291.54 gen_cons:nil5_0(0) <=> nil 307.00/291.54 gen_cons:nil5_0(+(x, 1)) <=> cons(0', gen_cons:nil5_0(x)) 307.00/291.54 307.00/291.54 307.00/291.54 The following defined symbols remain to be analysed: 307.00/291.54 prod 307.03/291.57 EOF