WORST_CASE(Omega(n^1), ?) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Derivational Complexity (innermost) of the given DCpxTrs could be proven to be BOUNDS(n^1, INF). (0) DCpxTrs (1) DerivationalComplexityToRuntimeComplexityProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxRelTRS (3) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 412 ms] (4) CpxRelTRS (5) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxRelTRS (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (8) typed CpxTrs (9) OrderProof [LOWER BOUND(ID), 0 ms] (10) typed CpxTrs (11) RewriteLemmaProof [LOWER BOUND(ID), 234 ms] (12) BEST (13) proven lower bound (14) LowerBoundPropagationProof [FINISHED, 0 ms] (15) BOUNDS(n^1, INF) (16) typed CpxTrs (17) RewriteLemmaProof [LOWER BOUND(ID), 9769 ms] (18) BOUNDS(1, INF) ---------------------------------------- (0) Obligation: The Derivational Complexity (innermost) of the given DCpxTrs could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) DerivationalComplexityToRuntimeComplexityProof (BOTH BOUNDS(ID, ID)) The following rules have been added to S to convert the given derivational complexity problem to a runtime complexity problem: encArg(nil) -> nil encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(true) -> true encArg(false) -> false encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(ys) -> ys encArg(cons_qsort(x_1)) -> qsort(encArg(x_1)) encArg(cons_filterlow(x_1, x_2)) -> filterlow(encArg(x_1), encArg(x_2)) encArg(cons_if1(x_1, x_2, x_3, x_4)) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_filterhigh(x_1, x_2)) -> filterhigh(encArg(x_1), encArg(x_2)) encArg(cons_if2(x_1, x_2, x_3, x_4)) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_ge(x_1, x_2)) -> ge(encArg(x_1), encArg(x_2)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encode_qsort(x_1) -> qsort(encArg(x_1)) encode_nil -> nil encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_filterlow(x_1, x_2) -> filterlow(encArg(x_1), encArg(x_2)) encode_last(x_1) -> last(encArg(x_1)) encode_filterhigh(x_1, x_2) -> filterhigh(encArg(x_1), encArg(x_2)) encode_if1(x_1, x_2, x_3, x_4) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_ge(x_1, x_2) -> ge(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_if2(x_1, x_2, x_3, x_4) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_ys -> ys ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) The (relative) TRS S consists of the following rules: encArg(nil) -> nil encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(true) -> true encArg(false) -> false encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(ys) -> ys encArg(cons_qsort(x_1)) -> qsort(encArg(x_1)) encArg(cons_filterlow(x_1, x_2)) -> filterlow(encArg(x_1), encArg(x_2)) encArg(cons_if1(x_1, x_2, x_3, x_4)) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_filterhigh(x_1, x_2)) -> filterhigh(encArg(x_1), encArg(x_2)) encArg(cons_if2(x_1, x_2, x_3, x_4)) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_ge(x_1, x_2)) -> ge(encArg(x_1), encArg(x_2)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encode_qsort(x_1) -> qsort(encArg(x_1)) encode_nil -> nil encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_filterlow(x_1, x_2) -> filterlow(encArg(x_1), encArg(x_2)) encode_last(x_1) -> last(encArg(x_1)) encode_filterhigh(x_1, x_2) -> filterhigh(encArg(x_1), encArg(x_2)) encode_if1(x_1, x_2, x_3, x_4) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_ge(x_1, x_2) -> ge(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_if2(x_1, x_2, x_3, x_4) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_ys -> ys Rewrite Strategy: INNERMOST ---------------------------------------- (3) SInnermostTerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved innermost termination of relative rules ---------------------------------------- (4) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) The (relative) TRS S consists of the following rules: encArg(nil) -> nil encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(true) -> true encArg(false) -> false encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(ys) -> ys encArg(cons_qsort(x_1)) -> qsort(encArg(x_1)) encArg(cons_filterlow(x_1, x_2)) -> filterlow(encArg(x_1), encArg(x_2)) encArg(cons_if1(x_1, x_2, x_3, x_4)) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_filterhigh(x_1, x_2)) -> filterhigh(encArg(x_1), encArg(x_2)) encArg(cons_if2(x_1, x_2, x_3, x_4)) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_ge(x_1, x_2)) -> ge(encArg(x_1), encArg(x_2)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encode_qsort(x_1) -> qsort(encArg(x_1)) encode_nil -> nil encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_filterlow(x_1, x_2) -> filterlow(encArg(x_1), encArg(x_2)) encode_last(x_1) -> last(encArg(x_1)) encode_filterhigh(x_1, x_2) -> filterhigh(encArg(x_1), encArg(x_2)) encode_if1(x_1, x_2, x_3, x_4) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_ge(x_1, x_2) -> ge(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_if2(x_1, x_2, x_3, x_4) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) encode_ys -> ys Rewrite Strategy: INNERMOST ---------------------------------------- (5) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (6) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0') -> true ge(0', s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0' last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) The (relative) TRS S consists of the following rules: encArg(nil) -> nil encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(true) -> true encArg(false) -> false encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(ys) -> ys encArg(cons_qsort(x_1)) -> qsort(encArg(x_1)) encArg(cons_filterlow(x_1, x_2)) -> filterlow(encArg(x_1), encArg(x_2)) encArg(cons_if1(x_1, x_2, x_3, x_4)) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_filterhigh(x_1, x_2)) -> filterhigh(encArg(x_1), encArg(x_2)) encArg(cons_if2(x_1, x_2, x_3, x_4)) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_ge(x_1, x_2)) -> ge(encArg(x_1), encArg(x_2)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encode_qsort(x_1) -> qsort(encArg(x_1)) encode_nil -> nil encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_filterlow(x_1, x_2) -> filterlow(encArg(x_1), encArg(x_2)) encode_last(x_1) -> last(encArg(x_1)) encode_filterhigh(x_1, x_2) -> filterhigh(encArg(x_1), encArg(x_2)) encode_if1(x_1, x_2, x_3, x_4) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_ge(x_1, x_2) -> ge(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_if2(x_1, x_2, x_3, x_4) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_ys -> ys Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (8) Obligation: Innermost TRS: Rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0') -> true ge(0', s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0' last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) encArg(nil) -> nil encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(true) -> true encArg(false) -> false encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(ys) -> ys encArg(cons_qsort(x_1)) -> qsort(encArg(x_1)) encArg(cons_filterlow(x_1, x_2)) -> filterlow(encArg(x_1), encArg(x_2)) encArg(cons_if1(x_1, x_2, x_3, x_4)) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_filterhigh(x_1, x_2)) -> filterhigh(encArg(x_1), encArg(x_2)) encArg(cons_if2(x_1, x_2, x_3, x_4)) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_ge(x_1, x_2)) -> ge(encArg(x_1), encArg(x_2)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encode_qsort(x_1) -> qsort(encArg(x_1)) encode_nil -> nil encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_filterlow(x_1, x_2) -> filterlow(encArg(x_1), encArg(x_2)) encode_last(x_1) -> last(encArg(x_1)) encode_filterhigh(x_1, x_2) -> filterhigh(encArg(x_1), encArg(x_2)) encode_if1(x_1, x_2, x_3, x_4) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_ge(x_1, x_2) -> ge(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_if2(x_1, x_2, x_3, x_4) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_ys -> ys Types: qsort :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last nil :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last append :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last filterlow :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last last :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last filterhigh :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last if1 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last ge :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last true :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last false :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last if2 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last 0' :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last s :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last ys :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encArg :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_qsort :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_filterlow :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_if1 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_filterhigh :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_if2 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_ge :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_append :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_last :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_qsort :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_nil :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_cons :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_append :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_filterlow :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_last :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_filterhigh :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_if1 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_ge :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_true :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_false :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_if2 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_0 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_s :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_ys :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last hole_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last1_5 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5 :: Nat -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last ---------------------------------------- (9) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: qsort, append, filterlow, last, filterhigh, if1, ge, if2, encArg They will be analysed ascendingly in the following order: append < qsort filterlow < qsort last < qsort filterhigh < qsort qsort < encArg append < encArg filterlow = if1 ge < filterlow filterlow < encArg last < encArg ge < filterhigh filterhigh = if2 filterhigh < encArg if1 < encArg ge < encArg if2 < encArg ---------------------------------------- (10) Obligation: Innermost TRS: Rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0') -> true ge(0', s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0' last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) encArg(nil) -> nil encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(true) -> true encArg(false) -> false encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(ys) -> ys encArg(cons_qsort(x_1)) -> qsort(encArg(x_1)) encArg(cons_filterlow(x_1, x_2)) -> filterlow(encArg(x_1), encArg(x_2)) encArg(cons_if1(x_1, x_2, x_3, x_4)) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_filterhigh(x_1, x_2)) -> filterhigh(encArg(x_1), encArg(x_2)) encArg(cons_if2(x_1, x_2, x_3, x_4)) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_ge(x_1, x_2)) -> ge(encArg(x_1), encArg(x_2)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encode_qsort(x_1) -> qsort(encArg(x_1)) encode_nil -> nil encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_filterlow(x_1, x_2) -> filterlow(encArg(x_1), encArg(x_2)) encode_last(x_1) -> last(encArg(x_1)) encode_filterhigh(x_1, x_2) -> filterhigh(encArg(x_1), encArg(x_2)) encode_if1(x_1, x_2, x_3, x_4) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_ge(x_1, x_2) -> ge(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_if2(x_1, x_2, x_3, x_4) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_ys -> ys Types: qsort :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last nil :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last append :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last filterlow :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last last :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last filterhigh :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last if1 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last ge :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last true :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last false :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last if2 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last 0' :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last s :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last ys :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encArg :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_qsort :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_filterlow :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_if1 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_filterhigh :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_if2 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_ge :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_append :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_last :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_qsort :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_nil :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_cons :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_append :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_filterlow :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_last :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_filterhigh :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_if1 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_ge :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_true :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_false :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_if2 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_0 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_s :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_ys :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last hole_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last1_5 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5 :: Nat -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last Generator Equations: gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(0) <=> nil gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(+(x, 1)) <=> cons(nil, gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(x)) The following defined symbols remain to be analysed: append, qsort, filterlow, last, filterhigh, if1, ge, if2, encArg They will be analysed ascendingly in the following order: append < qsort filterlow < qsort last < qsort filterhigh < qsort qsort < encArg append < encArg filterlow = if1 ge < filterlow filterlow < encArg last < encArg ge < filterhigh filterhigh = if2 filterhigh < encArg if1 < encArg ge < encArg if2 < encArg ---------------------------------------- (11) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: last(gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(+(1, n14_5))) -> gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(0), rt in Omega(1 + n14_5) Induction Base: last(gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(+(1, 0))) ->_R^Omega(1) nil Induction Step: last(gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(+(1, +(n14_5, 1)))) ->_R^Omega(1) last(cons(nil, gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(n14_5))) ->_IH gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(0) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (12) Complex Obligation (BEST) ---------------------------------------- (13) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0') -> true ge(0', s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0' last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) encArg(nil) -> nil encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(true) -> true encArg(false) -> false encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(ys) -> ys encArg(cons_qsort(x_1)) -> qsort(encArg(x_1)) encArg(cons_filterlow(x_1, x_2)) -> filterlow(encArg(x_1), encArg(x_2)) encArg(cons_if1(x_1, x_2, x_3, x_4)) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_filterhigh(x_1, x_2)) -> filterhigh(encArg(x_1), encArg(x_2)) encArg(cons_if2(x_1, x_2, x_3, x_4)) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_ge(x_1, x_2)) -> ge(encArg(x_1), encArg(x_2)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encode_qsort(x_1) -> qsort(encArg(x_1)) encode_nil -> nil encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_filterlow(x_1, x_2) -> filterlow(encArg(x_1), encArg(x_2)) encode_last(x_1) -> last(encArg(x_1)) encode_filterhigh(x_1, x_2) -> filterhigh(encArg(x_1), encArg(x_2)) encode_if1(x_1, x_2, x_3, x_4) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_ge(x_1, x_2) -> ge(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_if2(x_1, x_2, x_3, x_4) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_ys -> ys Types: qsort :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last nil :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last append :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last filterlow :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last last :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last filterhigh :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last if1 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last ge :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last true :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last false :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last if2 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last 0' :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last s :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last ys :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encArg :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_qsort :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_filterlow :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_if1 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_filterhigh :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_if2 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_ge :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_append :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_last :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_qsort :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_nil :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_cons :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_append :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_filterlow :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_last :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_filterhigh :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_if1 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_ge :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_true :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_false :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_if2 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_0 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_s :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_ys :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last hole_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last1_5 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5 :: Nat -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last Generator Equations: gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(0) <=> nil gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(+(x, 1)) <=> cons(nil, gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(x)) The following defined symbols remain to be analysed: last, qsort, filterlow, filterhigh, if1, ge, if2, encArg They will be analysed ascendingly in the following order: filterlow < qsort last < qsort filterhigh < qsort qsort < encArg filterlow = if1 ge < filterlow filterlow < encArg last < encArg ge < filterhigh filterhigh = if2 filterhigh < encArg if1 < encArg ge < encArg if2 < encArg ---------------------------------------- (14) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (15) BOUNDS(n^1, INF) ---------------------------------------- (16) Obligation: Innermost TRS: Rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0') -> true ge(0', s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0' last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) encArg(nil) -> nil encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(true) -> true encArg(false) -> false encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(ys) -> ys encArg(cons_qsort(x_1)) -> qsort(encArg(x_1)) encArg(cons_filterlow(x_1, x_2)) -> filterlow(encArg(x_1), encArg(x_2)) encArg(cons_if1(x_1, x_2, x_3, x_4)) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_filterhigh(x_1, x_2)) -> filterhigh(encArg(x_1), encArg(x_2)) encArg(cons_if2(x_1, x_2, x_3, x_4)) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encArg(cons_ge(x_1, x_2)) -> ge(encArg(x_1), encArg(x_2)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encode_qsort(x_1) -> qsort(encArg(x_1)) encode_nil -> nil encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_filterlow(x_1, x_2) -> filterlow(encArg(x_1), encArg(x_2)) encode_last(x_1) -> last(encArg(x_1)) encode_filterhigh(x_1, x_2) -> filterhigh(encArg(x_1), encArg(x_2)) encode_if1(x_1, x_2, x_3, x_4) -> if1(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_ge(x_1, x_2) -> ge(encArg(x_1), encArg(x_2)) encode_true -> true encode_false -> false encode_if2(x_1, x_2, x_3, x_4) -> if2(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) encode_ys -> ys Types: qsort :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last nil :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last append :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last filterlow :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last last :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last filterhigh :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last if1 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last ge :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last true :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last false :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last if2 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last 0' :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last s :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last ys :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encArg :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_qsort :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_filterlow :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_if1 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_filterhigh :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_if2 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_ge :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_append :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last cons_last :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_qsort :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_nil :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_cons :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_append :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_filterlow :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_last :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_filterhigh :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_if1 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_ge :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_true :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_false :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_if2 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_0 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_s :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last encode_ys :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last hole_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last1_5 :: nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5 :: Nat -> nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last Lemmas: last(gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(+(1, n14_5))) -> gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(0), rt in Omega(1 + n14_5) Generator Equations: gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(0) <=> nil gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(+(x, 1)) <=> cons(nil, gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(x)) The following defined symbols remain to be analysed: ge, qsort, filterlow, filterhigh, if1, if2, encArg They will be analysed ascendingly in the following order: filterlow < qsort filterhigh < qsort qsort < encArg filterlow = if1 ge < filterlow filterlow < encArg ge < filterhigh filterhigh = if2 filterhigh < encArg if1 < encArg ge < encArg if2 < encArg ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: encArg(gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(n1800_5)) -> gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(n1800_5), rt in Omega(0) Induction Base: encArg(gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(0)) ->_R^Omega(0) nil Induction Step: encArg(gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(+(n1800_5, 1))) ->_R^Omega(0) cons(encArg(nil), encArg(gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(n1800_5))) ->_R^Omega(0) cons(nil, encArg(gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(n1800_5))) ->_IH cons(nil, gen_nil:cons:true:false:0':s:ys:cons_qsort:cons_filterlow:cons_if1:cons_filterhigh:cons_if2:cons_ge:cons_append:cons_last2_5(c1801_5)) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (18) BOUNDS(1, INF)