/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), ?) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). (0) CpxTRS (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxTRS (3) SlicingProof [LOWER BOUND(ID), 0 ms] (4) CpxTRS (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (6) typed CpxTrs (7) OrderProof [LOWER BOUND(ID), 0 ms] (8) typed CpxTrs (9) RewriteLemmaProof [LOWER BOUND(ID), 254 ms] (10) BEST (11) proven lower bound (12) LowerBoundPropagationProof [FINISHED, 0 ms] (13) BOUNDS(n^1, INF) (14) typed CpxTrs (15) RewriteLemmaProof [LOWER BOUND(ID), 65 ms] (16) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: average(x, y) -> if(ge(x, y), x, y) if(true, x, y) -> averIter(y, x, y) if(false, x, y) -> averIter(x, y, x) averIter(x, y, z) -> ifIter(ge(x, y), x, y, z) ifIter(true, x, y, z) -> z ifIter(false, x, y, z) -> averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0))) append(nil, y) -> y append(cons(n, x), y) -> cons(n, app(x, y)) low(n, nil) -> nil low(n, cons(m, x)) -> if_low(ge(m, n), n, cons(m, x)) if_low(false, n, cons(m, x)) -> cons(m, low(n, x)) if_low(true, n, cons(m, x)) -> low(n, x) high(n, nil) -> nil high(n, cons(m, x)) -> if_high(ge(m, n), n, cons(m, x)) if_high(false, n, cons(m, x)) -> high(n, x) if_high(true, n, cons(m, x)) -> cons(average(m, m), high(n, x)) quicksort(x) -> ifquick(isempty(x), x) ifquick(true, x) -> nil ifquick(false, x) -> append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x))))) plus(0, y) -> y plus(s(x), y) -> s(plus(x, y)) isempty(nil) -> true isempty(cons(n, x)) -> false head(nil) -> error head(cons(n, x)) -> n tail(nil) -> nil tail(cons(n, x)) -> x ge(x, 0) -> true ge(0, s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: average(x, y) -> if(ge(x, y), x, y) if(true, x, y) -> averIter(y, x, y) if(false, x, y) -> averIter(x, y, x) averIter(x, y, z) -> ifIter(ge(x, y), x, y, z) ifIter(true, x, y, z) -> z ifIter(false, x, y, z) -> averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0'))) append(nil, y) -> y append(cons(n, x), y) -> cons(n, app(x, y)) low(n, nil) -> nil low(n, cons(m, x)) -> if_low(ge(m, n), n, cons(m, x)) if_low(false, n, cons(m, x)) -> cons(m, low(n, x)) if_low(true, n, cons(m, x)) -> low(n, x) high(n, nil) -> nil high(n, cons(m, x)) -> if_high(ge(m, n), n, cons(m, x)) if_high(false, n, cons(m, x)) -> high(n, x) if_high(true, n, cons(m, x)) -> cons(average(m, m), high(n, x)) quicksort(x) -> ifquick(isempty(x), x) ifquick(true, x) -> nil ifquick(false, x) -> append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x))))) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) isempty(nil) -> true isempty(cons(n, x)) -> false head(nil) -> error head(cons(n, x)) -> n tail(nil) -> nil tail(cons(n, x)) -> x ge(x, 0') -> true ge(0', s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (3) SlicingProof (LOWER BOUND(ID)) Sliced the following arguments: app/0 app/1 ---------------------------------------- (4) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: average(x, y) -> if(ge(x, y), x, y) if(true, x, y) -> averIter(y, x, y) if(false, x, y) -> averIter(x, y, x) averIter(x, y, z) -> ifIter(ge(x, y), x, y, z) ifIter(true, x, y, z) -> z ifIter(false, x, y, z) -> averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0'))) append(nil, y) -> y append(cons(n, x), y) -> cons(n, app) low(n, nil) -> nil low(n, cons(m, x)) -> if_low(ge(m, n), n, cons(m, x)) if_low(false, n, cons(m, x)) -> cons(m, low(n, x)) if_low(true, n, cons(m, x)) -> low(n, x) high(n, nil) -> nil high(n, cons(m, x)) -> if_high(ge(m, n), n, cons(m, x)) if_high(false, n, cons(m, x)) -> high(n, x) if_high(true, n, cons(m, x)) -> cons(average(m, m), high(n, x)) quicksort(x) -> ifquick(isempty(x), x) ifquick(true, x) -> nil ifquick(false, x) -> append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x))))) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) isempty(nil) -> true isempty(cons(n, x)) -> false head(nil) -> error head(cons(n, x)) -> n tail(nil) -> nil tail(cons(n, x)) -> x ge(x, 0') -> true ge(0', s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (6) Obligation: Innermost TRS: Rules: average(x, y) -> if(ge(x, y), x, y) if(true, x, y) -> averIter(y, x, y) if(false, x, y) -> averIter(x, y, x) averIter(x, y, z) -> ifIter(ge(x, y), x, y, z) ifIter(true, x, y, z) -> z ifIter(false, x, y, z) -> averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0'))) append(nil, y) -> y append(cons(n, x), y) -> cons(n, app) low(n, nil) -> nil low(n, cons(m, x)) -> if_low(ge(m, n), n, cons(m, x)) if_low(false, n, cons(m, x)) -> cons(m, low(n, x)) if_low(true, n, cons(m, x)) -> low(n, x) high(n, nil) -> nil high(n, cons(m, x)) -> if_high(ge(m, n), n, cons(m, x)) if_high(false, n, cons(m, x)) -> high(n, x) if_high(true, n, cons(m, x)) -> cons(average(m, m), high(n, x)) quicksort(x) -> ifquick(isempty(x), x) ifquick(true, x) -> nil ifquick(false, x) -> append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x))))) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) isempty(nil) -> true isempty(cons(n, x)) -> false head(nil) -> error head(cons(n, x)) -> n tail(nil) -> nil tail(cons(n, x)) -> x ge(x, 0') -> true ge(0', s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c Types: average :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error if :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error ge :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> true:false true :: true:false averIter :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error false :: true:false ifIter :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error plus :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error s :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error 0' :: 0':s:nil:cons:app:error append :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error nil :: 0':s:nil:cons:app:error cons :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error app :: 0':s:nil:cons:app:error low :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error if_low :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error high :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error if_high :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error quicksort :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error ifquick :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error isempty :: 0':s:nil:cons:app:error -> true:false head :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error tail :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error error :: 0':s:nil:cons:app:error a :: b:c b :: b:c c :: b:c hole_0':s:nil:cons:app:error1_0 :: 0':s:nil:cons:app:error hole_true:false2_0 :: true:false hole_b:c3_0 :: b:c gen_0':s:nil:cons:app:error4_0 :: Nat -> 0':s:nil:cons:app:error ---------------------------------------- (7) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: ge, averIter, plus, low, high, quicksort They will be analysed ascendingly in the following order: ge < averIter ge < low ge < high plus < averIter low < quicksort high < quicksort ---------------------------------------- (8) Obligation: Innermost TRS: Rules: average(x, y) -> if(ge(x, y), x, y) if(true, x, y) -> averIter(y, x, y) if(false, x, y) -> averIter(x, y, x) averIter(x, y, z) -> ifIter(ge(x, y), x, y, z) ifIter(true, x, y, z) -> z ifIter(false, x, y, z) -> averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0'))) append(nil, y) -> y append(cons(n, x), y) -> cons(n, app) low(n, nil) -> nil low(n, cons(m, x)) -> if_low(ge(m, n), n, cons(m, x)) if_low(false, n, cons(m, x)) -> cons(m, low(n, x)) if_low(true, n, cons(m, x)) -> low(n, x) high(n, nil) -> nil high(n, cons(m, x)) -> if_high(ge(m, n), n, cons(m, x)) if_high(false, n, cons(m, x)) -> high(n, x) if_high(true, n, cons(m, x)) -> cons(average(m, m), high(n, x)) quicksort(x) -> ifquick(isempty(x), x) ifquick(true, x) -> nil ifquick(false, x) -> append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x))))) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) isempty(nil) -> true isempty(cons(n, x)) -> false head(nil) -> error head(cons(n, x)) -> n tail(nil) -> nil tail(cons(n, x)) -> x ge(x, 0') -> true ge(0', s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c Types: average :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error if :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error ge :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> true:false true :: true:false averIter :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error false :: true:false ifIter :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error plus :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error s :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error 0' :: 0':s:nil:cons:app:error append :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error nil :: 0':s:nil:cons:app:error cons :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error app :: 0':s:nil:cons:app:error low :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error if_low :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error high :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error if_high :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error quicksort :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error ifquick :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error isempty :: 0':s:nil:cons:app:error -> true:false head :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error tail :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error error :: 0':s:nil:cons:app:error a :: b:c b :: b:c c :: b:c hole_0':s:nil:cons:app:error1_0 :: 0':s:nil:cons:app:error hole_true:false2_0 :: true:false hole_b:c3_0 :: b:c gen_0':s:nil:cons:app:error4_0 :: Nat -> 0':s:nil:cons:app:error Generator Equations: gen_0':s:nil:cons:app:error4_0(0) <=> 0' gen_0':s:nil:cons:app:error4_0(+(x, 1)) <=> s(gen_0':s:nil:cons:app:error4_0(x)) The following defined symbols remain to be analysed: ge, averIter, plus, low, high, quicksort They will be analysed ascendingly in the following order: ge < averIter ge < low ge < high plus < averIter low < quicksort high < quicksort ---------------------------------------- (9) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) -> true, rt in Omega(1 + n6_0) Induction Base: ge(gen_0':s:nil:cons:app:error4_0(0), gen_0':s:nil:cons:app:error4_0(0)) ->_R^Omega(1) true Induction Step: ge(gen_0':s:nil:cons:app:error4_0(+(n6_0, 1)), gen_0':s:nil:cons:app:error4_0(+(n6_0, 1))) ->_R^Omega(1) ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) ->_IH true We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (10) Complex Obligation (BEST) ---------------------------------------- (11) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: average(x, y) -> if(ge(x, y), x, y) if(true, x, y) -> averIter(y, x, y) if(false, x, y) -> averIter(x, y, x) averIter(x, y, z) -> ifIter(ge(x, y), x, y, z) ifIter(true, x, y, z) -> z ifIter(false, x, y, z) -> averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0'))) append(nil, y) -> y append(cons(n, x), y) -> cons(n, app) low(n, nil) -> nil low(n, cons(m, x)) -> if_low(ge(m, n), n, cons(m, x)) if_low(false, n, cons(m, x)) -> cons(m, low(n, x)) if_low(true, n, cons(m, x)) -> low(n, x) high(n, nil) -> nil high(n, cons(m, x)) -> if_high(ge(m, n), n, cons(m, x)) if_high(false, n, cons(m, x)) -> high(n, x) if_high(true, n, cons(m, x)) -> cons(average(m, m), high(n, x)) quicksort(x) -> ifquick(isempty(x), x) ifquick(true, x) -> nil ifquick(false, x) -> append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x))))) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) isempty(nil) -> true isempty(cons(n, x)) -> false head(nil) -> error head(cons(n, x)) -> n tail(nil) -> nil tail(cons(n, x)) -> x ge(x, 0') -> true ge(0', s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c Types: average :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error if :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error ge :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> true:false true :: true:false averIter :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error false :: true:false ifIter :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error plus :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error s :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error 0' :: 0':s:nil:cons:app:error append :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error nil :: 0':s:nil:cons:app:error cons :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error app :: 0':s:nil:cons:app:error low :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error if_low :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error high :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error if_high :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error quicksort :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error ifquick :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error isempty :: 0':s:nil:cons:app:error -> true:false head :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error tail :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error error :: 0':s:nil:cons:app:error a :: b:c b :: b:c c :: b:c hole_0':s:nil:cons:app:error1_0 :: 0':s:nil:cons:app:error hole_true:false2_0 :: true:false hole_b:c3_0 :: b:c gen_0':s:nil:cons:app:error4_0 :: Nat -> 0':s:nil:cons:app:error Generator Equations: gen_0':s:nil:cons:app:error4_0(0) <=> 0' gen_0':s:nil:cons:app:error4_0(+(x, 1)) <=> s(gen_0':s:nil:cons:app:error4_0(x)) The following defined symbols remain to be analysed: ge, averIter, plus, low, high, quicksort They will be analysed ascendingly in the following order: ge < averIter ge < low ge < high plus < averIter low < quicksort high < quicksort ---------------------------------------- (12) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (13) BOUNDS(n^1, INF) ---------------------------------------- (14) Obligation: Innermost TRS: Rules: average(x, y) -> if(ge(x, y), x, y) if(true, x, y) -> averIter(y, x, y) if(false, x, y) -> averIter(x, y, x) averIter(x, y, z) -> ifIter(ge(x, y), x, y, z) ifIter(true, x, y, z) -> z ifIter(false, x, y, z) -> averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0'))) append(nil, y) -> y append(cons(n, x), y) -> cons(n, app) low(n, nil) -> nil low(n, cons(m, x)) -> if_low(ge(m, n), n, cons(m, x)) if_low(false, n, cons(m, x)) -> cons(m, low(n, x)) if_low(true, n, cons(m, x)) -> low(n, x) high(n, nil) -> nil high(n, cons(m, x)) -> if_high(ge(m, n), n, cons(m, x)) if_high(false, n, cons(m, x)) -> high(n, x) if_high(true, n, cons(m, x)) -> cons(average(m, m), high(n, x)) quicksort(x) -> ifquick(isempty(x), x) ifquick(true, x) -> nil ifquick(false, x) -> append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x))))) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) isempty(nil) -> true isempty(cons(n, x)) -> false head(nil) -> error head(cons(n, x)) -> n tail(nil) -> nil tail(cons(n, x)) -> x ge(x, 0') -> true ge(0', s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c Types: average :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error if :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error ge :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> true:false true :: true:false averIter :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error false :: true:false ifIter :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error plus :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error s :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error 0' :: 0':s:nil:cons:app:error append :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error nil :: 0':s:nil:cons:app:error cons :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error app :: 0':s:nil:cons:app:error low :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error if_low :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error high :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error if_high :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error quicksort :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error ifquick :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error isempty :: 0':s:nil:cons:app:error -> true:false head :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error tail :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error error :: 0':s:nil:cons:app:error a :: b:c b :: b:c c :: b:c hole_0':s:nil:cons:app:error1_0 :: 0':s:nil:cons:app:error hole_true:false2_0 :: true:false hole_b:c3_0 :: b:c gen_0':s:nil:cons:app:error4_0 :: Nat -> 0':s:nil:cons:app:error Lemmas: ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) -> true, rt in Omega(1 + n6_0) Generator Equations: gen_0':s:nil:cons:app:error4_0(0) <=> 0' gen_0':s:nil:cons:app:error4_0(+(x, 1)) <=> s(gen_0':s:nil:cons:app:error4_0(x)) The following defined symbols remain to be analysed: plus, averIter, low, high, quicksort They will be analysed ascendingly in the following order: plus < averIter low < quicksort high < quicksort ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: plus(gen_0':s:nil:cons:app:error4_0(n534_0), gen_0':s:nil:cons:app:error4_0(b)) -> gen_0':s:nil:cons:app:error4_0(+(n534_0, b)), rt in Omega(1 + n534_0) Induction Base: plus(gen_0':s:nil:cons:app:error4_0(0), gen_0':s:nil:cons:app:error4_0(b)) ->_R^Omega(1) gen_0':s:nil:cons:app:error4_0(b) Induction Step: plus(gen_0':s:nil:cons:app:error4_0(+(n534_0, 1)), gen_0':s:nil:cons:app:error4_0(b)) ->_R^Omega(1) s(plus(gen_0':s:nil:cons:app:error4_0(n534_0), gen_0':s:nil:cons:app:error4_0(b))) ->_IH s(gen_0':s:nil:cons:app:error4_0(+(b, c535_0))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (16) Obligation: Innermost TRS: Rules: average(x, y) -> if(ge(x, y), x, y) if(true, x, y) -> averIter(y, x, y) if(false, x, y) -> averIter(x, y, x) averIter(x, y, z) -> ifIter(ge(x, y), x, y, z) ifIter(true, x, y, z) -> z ifIter(false, x, y, z) -> averIter(plus(x, s(s(s(0')))), plus(y, s(0')), plus(z, s(0'))) append(nil, y) -> y append(cons(n, x), y) -> cons(n, app) low(n, nil) -> nil low(n, cons(m, x)) -> if_low(ge(m, n), n, cons(m, x)) if_low(false, n, cons(m, x)) -> cons(m, low(n, x)) if_low(true, n, cons(m, x)) -> low(n, x) high(n, nil) -> nil high(n, cons(m, x)) -> if_high(ge(m, n), n, cons(m, x)) if_high(false, n, cons(m, x)) -> high(n, x) if_high(true, n, cons(m, x)) -> cons(average(m, m), high(n, x)) quicksort(x) -> ifquick(isempty(x), x) ifquick(true, x) -> nil ifquick(false, x) -> append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x))))) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) isempty(nil) -> true isempty(cons(n, x)) -> false head(nil) -> error head(cons(n, x)) -> n tail(nil) -> nil tail(cons(n, x)) -> x ge(x, 0') -> true ge(0', s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c Types: average :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error if :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error ge :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> true:false true :: true:false averIter :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error false :: true:false ifIter :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error plus :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error s :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error 0' :: 0':s:nil:cons:app:error append :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error nil :: 0':s:nil:cons:app:error cons :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error app :: 0':s:nil:cons:app:error low :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error if_low :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error high :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error if_high :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error quicksort :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error ifquick :: true:false -> 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error isempty :: 0':s:nil:cons:app:error -> true:false head :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error tail :: 0':s:nil:cons:app:error -> 0':s:nil:cons:app:error error :: 0':s:nil:cons:app:error a :: b:c b :: b:c c :: b:c hole_0':s:nil:cons:app:error1_0 :: 0':s:nil:cons:app:error hole_true:false2_0 :: true:false hole_b:c3_0 :: b:c gen_0':s:nil:cons:app:error4_0 :: Nat -> 0':s:nil:cons:app:error Lemmas: ge(gen_0':s:nil:cons:app:error4_0(n6_0), gen_0':s:nil:cons:app:error4_0(n6_0)) -> true, rt in Omega(1 + n6_0) plus(gen_0':s:nil:cons:app:error4_0(n534_0), gen_0':s:nil:cons:app:error4_0(b)) -> gen_0':s:nil:cons:app:error4_0(+(n534_0, b)), rt in Omega(1 + n534_0) Generator Equations: gen_0':s:nil:cons:app:error4_0(0) <=> 0' gen_0':s:nil:cons:app:error4_0(+(x, 1)) <=> s(gen_0':s:nil:cons:app:error4_0(x)) The following defined symbols remain to be analysed: averIter, low, high, quicksort They will be analysed ascendingly in the following order: low < quicksort high < quicksort