/export/starexec/sandbox2/solver/bin/starexec_run_rcdcRelativeAlsoLower /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^2), ?) proof of /export/starexec/sandbox2/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^2, INF). (0) DCpxTrs (1) DerivationalComplexityToRuntimeComplexityProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxRelTRS (3) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 270 ms] (4) CpxRelTRS (5) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxRelTRS (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 7 ms] (8) typed CpxTrs (9) OrderProof [LOWER BOUND(ID), 0 ms] (10) typed CpxTrs (11) RewriteLemmaProof [LOWER BOUND(ID), 253 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), 48 ms] (18) typed CpxTrs (19) RewriteLemmaProof [LOWER BOUND(ID), 76 ms] (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 383 ms] (22) BEST (23) proven lower bound (24) LowerBoundPropagationProof [FINISHED, 0 ms] (25) BOUNDS(n^2, INF) (26) typed CpxTrs (27) RewriteLemmaProof [LOWER BOUND(ID), 707 ms] (28) BOUNDS(1, INF) ---------------------------------------- (0) Obligation: The Derivational Complexity (innermost) of the given DCpxTrs could be proven to be BOUNDS(n^2, INF). The TRS R consists of the following rules: isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false last(cons(x, nil)) -> x last(cons(x, cons(y, ys))) -> last(cons(y, ys)) dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) reverse(xs) -> rev(xs, nil) rev(xs, ys) -> if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys) if(true, xs, ys, zs) -> zs if(false, xs, ys, zs) -> rev(xs, ys) 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(true) -> true encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(false) -> false encArg(cons_isEmpty(x_1)) -> isEmpty(encArg(x_1)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encArg(cons_dropLast(x_1)) -> dropLast(encArg(x_1)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_reverse(x_1)) -> reverse(encArg(x_1)) encArg(cons_rev(x_1, x_2)) -> rev(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_isEmpty(x_1) -> isEmpty(encArg(x_1)) encode_nil -> nil encode_true -> true encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_false -> false encode_last(x_1) -> last(encArg(x_1)) encode_dropLast(x_1) -> dropLast(encArg(x_1)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_reverse(x_1) -> reverse(encArg(x_1)) encode_rev(x_1, x_2) -> rev(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^2, INF). The TRS R consists of the following rules: isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false last(cons(x, nil)) -> x last(cons(x, cons(y, ys))) -> last(cons(y, ys)) dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) reverse(xs) -> rev(xs, nil) rev(xs, ys) -> if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys) if(true, xs, ys, zs) -> zs if(false, xs, ys, zs) -> rev(xs, ys) The (relative) TRS S consists of the following rules: encArg(nil) -> nil encArg(true) -> true encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(false) -> false encArg(cons_isEmpty(x_1)) -> isEmpty(encArg(x_1)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encArg(cons_dropLast(x_1)) -> dropLast(encArg(x_1)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_reverse(x_1)) -> reverse(encArg(x_1)) encArg(cons_rev(x_1, x_2)) -> rev(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_isEmpty(x_1) -> isEmpty(encArg(x_1)) encode_nil -> nil encode_true -> true encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_false -> false encode_last(x_1) -> last(encArg(x_1)) encode_dropLast(x_1) -> dropLast(encArg(x_1)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_reverse(x_1) -> reverse(encArg(x_1)) encode_rev(x_1, x_2) -> rev(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) 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^2, INF). The TRS R consists of the following rules: isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false last(cons(x, nil)) -> x last(cons(x, cons(y, ys))) -> last(cons(y, ys)) dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) reverse(xs) -> rev(xs, nil) rev(xs, ys) -> if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys) if(true, xs, ys, zs) -> zs if(false, xs, ys, zs) -> rev(xs, ys) The (relative) TRS S consists of the following rules: encArg(nil) -> nil encArg(true) -> true encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(false) -> false encArg(cons_isEmpty(x_1)) -> isEmpty(encArg(x_1)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encArg(cons_dropLast(x_1)) -> dropLast(encArg(x_1)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_reverse(x_1)) -> reverse(encArg(x_1)) encArg(cons_rev(x_1, x_2)) -> rev(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_isEmpty(x_1) -> isEmpty(encArg(x_1)) encode_nil -> nil encode_true -> true encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_false -> false encode_last(x_1) -> last(encArg(x_1)) encode_dropLast(x_1) -> dropLast(encArg(x_1)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_reverse(x_1) -> reverse(encArg(x_1)) encode_rev(x_1, x_2) -> rev(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) 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^2, INF). The TRS R consists of the following rules: isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false last(cons(x, nil)) -> x last(cons(x, cons(y, ys))) -> last(cons(y, ys)) dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) reverse(xs) -> rev(xs, nil) rev(xs, ys) -> if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys) if(true, xs, ys, zs) -> zs if(false, xs, ys, zs) -> rev(xs, ys) The (relative) TRS S consists of the following rules: encArg(nil) -> nil encArg(true) -> true encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(false) -> false encArg(cons_isEmpty(x_1)) -> isEmpty(encArg(x_1)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encArg(cons_dropLast(x_1)) -> dropLast(encArg(x_1)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_reverse(x_1)) -> reverse(encArg(x_1)) encArg(cons_rev(x_1, x_2)) -> rev(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_isEmpty(x_1) -> isEmpty(encArg(x_1)) encode_nil -> nil encode_true -> true encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_false -> false encode_last(x_1) -> last(encArg(x_1)) encode_dropLast(x_1) -> dropLast(encArg(x_1)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_reverse(x_1) -> reverse(encArg(x_1)) encode_rev(x_1, x_2) -> rev(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (8) Obligation: Innermost TRS: Rules: isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false last(cons(x, nil)) -> x last(cons(x, cons(y, ys))) -> last(cons(y, ys)) dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) reverse(xs) -> rev(xs, nil) rev(xs, ys) -> if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys) if(true, xs, ys, zs) -> zs if(false, xs, ys, zs) -> rev(xs, ys) encArg(nil) -> nil encArg(true) -> true encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(false) -> false encArg(cons_isEmpty(x_1)) -> isEmpty(encArg(x_1)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encArg(cons_dropLast(x_1)) -> dropLast(encArg(x_1)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_reverse(x_1)) -> reverse(encArg(x_1)) encArg(cons_rev(x_1, x_2)) -> rev(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_isEmpty(x_1) -> isEmpty(encArg(x_1)) encode_nil -> nil encode_true -> true encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_false -> false encode_last(x_1) -> last(encArg(x_1)) encode_dropLast(x_1) -> dropLast(encArg(x_1)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_reverse(x_1) -> reverse(encArg(x_1)) encode_rev(x_1, x_2) -> rev(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) Types: isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encArg :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if hole_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if1_0 :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0 :: Nat -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if ---------------------------------------- (9) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: last, dropLast, append, rev, if, encArg They will be analysed ascendingly in the following order: last < rev last < encArg dropLast < rev dropLast < encArg append < rev append < encArg rev = if rev < encArg if < encArg ---------------------------------------- (10) Obligation: Innermost TRS: Rules: isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false last(cons(x, nil)) -> x last(cons(x, cons(y, ys))) -> last(cons(y, ys)) dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) reverse(xs) -> rev(xs, nil) rev(xs, ys) -> if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys) if(true, xs, ys, zs) -> zs if(false, xs, ys, zs) -> rev(xs, ys) encArg(nil) -> nil encArg(true) -> true encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(false) -> false encArg(cons_isEmpty(x_1)) -> isEmpty(encArg(x_1)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encArg(cons_dropLast(x_1)) -> dropLast(encArg(x_1)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_reverse(x_1)) -> reverse(encArg(x_1)) encArg(cons_rev(x_1, x_2)) -> rev(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_isEmpty(x_1) -> isEmpty(encArg(x_1)) encode_nil -> nil encode_true -> true encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_false -> false encode_last(x_1) -> last(encArg(x_1)) encode_dropLast(x_1) -> dropLast(encArg(x_1)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_reverse(x_1) -> reverse(encArg(x_1)) encode_rev(x_1, x_2) -> rev(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) Types: isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encArg :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if hole_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if1_0 :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0 :: Nat -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if Generator Equations: gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0) <=> nil gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(x, 1)) <=> cons(nil, gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(x)) The following defined symbols remain to be analysed: last, dropLast, append, rev, if, encArg They will be analysed ascendingly in the following order: last < rev last < encArg dropLast < rev dropLast < encArg append < rev append < encArg rev = if rev < encArg if < encArg ---------------------------------------- (11) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: last(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, n4_0))) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), rt in Omega(1 + n4_0) Induction Base: last(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, 0))) ->_R^Omega(1) nil Induction Step: last(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, +(n4_0, 1)))) ->_R^Omega(1) last(cons(nil, gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n4_0))) ->_IH gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(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: isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false last(cons(x, nil)) -> x last(cons(x, cons(y, ys))) -> last(cons(y, ys)) dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) reverse(xs) -> rev(xs, nil) rev(xs, ys) -> if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys) if(true, xs, ys, zs) -> zs if(false, xs, ys, zs) -> rev(xs, ys) encArg(nil) -> nil encArg(true) -> true encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(false) -> false encArg(cons_isEmpty(x_1)) -> isEmpty(encArg(x_1)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encArg(cons_dropLast(x_1)) -> dropLast(encArg(x_1)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_reverse(x_1)) -> reverse(encArg(x_1)) encArg(cons_rev(x_1, x_2)) -> rev(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_isEmpty(x_1) -> isEmpty(encArg(x_1)) encode_nil -> nil encode_true -> true encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_false -> false encode_last(x_1) -> last(encArg(x_1)) encode_dropLast(x_1) -> dropLast(encArg(x_1)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_reverse(x_1) -> reverse(encArg(x_1)) encode_rev(x_1, x_2) -> rev(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) Types: isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encArg :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if hole_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if1_0 :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0 :: Nat -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if Generator Equations: gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0) <=> nil gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(x, 1)) <=> cons(nil, gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(x)) The following defined symbols remain to be analysed: last, dropLast, append, rev, if, encArg They will be analysed ascendingly in the following order: last < rev last < encArg dropLast < rev dropLast < encArg append < rev append < encArg rev = if rev < encArg if < encArg ---------------------------------------- (14) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (15) BOUNDS(n^1, INF) ---------------------------------------- (16) Obligation: Innermost TRS: Rules: isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false last(cons(x, nil)) -> x last(cons(x, cons(y, ys))) -> last(cons(y, ys)) dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) reverse(xs) -> rev(xs, nil) rev(xs, ys) -> if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys) if(true, xs, ys, zs) -> zs if(false, xs, ys, zs) -> rev(xs, ys) encArg(nil) -> nil encArg(true) -> true encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(false) -> false encArg(cons_isEmpty(x_1)) -> isEmpty(encArg(x_1)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encArg(cons_dropLast(x_1)) -> dropLast(encArg(x_1)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_reverse(x_1)) -> reverse(encArg(x_1)) encArg(cons_rev(x_1, x_2)) -> rev(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_isEmpty(x_1) -> isEmpty(encArg(x_1)) encode_nil -> nil encode_true -> true encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_false -> false encode_last(x_1) -> last(encArg(x_1)) encode_dropLast(x_1) -> dropLast(encArg(x_1)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_reverse(x_1) -> reverse(encArg(x_1)) encode_rev(x_1, x_2) -> rev(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) Types: isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encArg :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if hole_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if1_0 :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0 :: Nat -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if Lemmas: last(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, n4_0))) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), rt in Omega(1 + n4_0) Generator Equations: gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0) <=> nil gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(x, 1)) <=> cons(nil, gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(x)) The following defined symbols remain to be analysed: dropLast, append, rev, if, encArg They will be analysed ascendingly in the following order: dropLast < rev dropLast < encArg append < rev append < encArg rev = if rev < encArg if < encArg ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: dropLast(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, n425_0))) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n425_0), rt in Omega(1 + n425_0) Induction Base: dropLast(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, 0))) ->_R^Omega(1) nil Induction Step: dropLast(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, +(n425_0, 1)))) ->_R^Omega(1) cons(nil, dropLast(cons(nil, gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n425_0)))) ->_IH cons(nil, gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(c426_0)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (18) Obligation: Innermost TRS: Rules: isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false last(cons(x, nil)) -> x last(cons(x, cons(y, ys))) -> last(cons(y, ys)) dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) reverse(xs) -> rev(xs, nil) rev(xs, ys) -> if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys) if(true, xs, ys, zs) -> zs if(false, xs, ys, zs) -> rev(xs, ys) encArg(nil) -> nil encArg(true) -> true encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(false) -> false encArg(cons_isEmpty(x_1)) -> isEmpty(encArg(x_1)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encArg(cons_dropLast(x_1)) -> dropLast(encArg(x_1)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_reverse(x_1)) -> reverse(encArg(x_1)) encArg(cons_rev(x_1, x_2)) -> rev(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_isEmpty(x_1) -> isEmpty(encArg(x_1)) encode_nil -> nil encode_true -> true encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_false -> false encode_last(x_1) -> last(encArg(x_1)) encode_dropLast(x_1) -> dropLast(encArg(x_1)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_reverse(x_1) -> reverse(encArg(x_1)) encode_rev(x_1, x_2) -> rev(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) Types: isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encArg :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if hole_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if1_0 :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0 :: Nat -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if Lemmas: last(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, n4_0))) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), rt in Omega(1 + n4_0) dropLast(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, n425_0))) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n425_0), rt in Omega(1 + n425_0) Generator Equations: gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0) <=> nil gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(x, 1)) <=> cons(nil, gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(x)) The following defined symbols remain to be analysed: append, rev, if, encArg They will be analysed ascendingly in the following order: append < rev append < encArg rev = if rev < encArg if < encArg ---------------------------------------- (19) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: append(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n1000_0), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(b)) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(n1000_0, b)), rt in Omega(1 + n1000_0) Induction Base: append(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(b)) ->_R^Omega(1) gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(b) Induction Step: append(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(n1000_0, 1)), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(b)) ->_R^Omega(1) cons(nil, append(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n1000_0), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(b))) ->_IH cons(nil, gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(b, c1001_0))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (20) Obligation: Innermost TRS: Rules: isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false last(cons(x, nil)) -> x last(cons(x, cons(y, ys))) -> last(cons(y, ys)) dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) reverse(xs) -> rev(xs, nil) rev(xs, ys) -> if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys) if(true, xs, ys, zs) -> zs if(false, xs, ys, zs) -> rev(xs, ys) encArg(nil) -> nil encArg(true) -> true encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(false) -> false encArg(cons_isEmpty(x_1)) -> isEmpty(encArg(x_1)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encArg(cons_dropLast(x_1)) -> dropLast(encArg(x_1)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_reverse(x_1)) -> reverse(encArg(x_1)) encArg(cons_rev(x_1, x_2)) -> rev(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_isEmpty(x_1) -> isEmpty(encArg(x_1)) encode_nil -> nil encode_true -> true encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_false -> false encode_last(x_1) -> last(encArg(x_1)) encode_dropLast(x_1) -> dropLast(encArg(x_1)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_reverse(x_1) -> reverse(encArg(x_1)) encode_rev(x_1, x_2) -> rev(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) Types: isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encArg :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if hole_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if1_0 :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0 :: Nat -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if Lemmas: last(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, n4_0))) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), rt in Omega(1 + n4_0) dropLast(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, n425_0))) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n425_0), rt in Omega(1 + n425_0) append(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n1000_0), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(b)) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(n1000_0, b)), rt in Omega(1 + n1000_0) Generator Equations: gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0) <=> nil gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(x, 1)) <=> cons(nil, gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(x)) The following defined symbols remain to be analysed: if, rev, encArg They will be analysed ascendingly in the following order: rev = if rev < encArg if < encArg ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: rev(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n2304_0), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), rt in Omega(1 + n2304_0 + n2304_0^2) Induction Base: rev(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)) ->_R^Omega(1) if(isEmpty(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)), dropLast(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)), append(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), last(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0))), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)) ->_R^Omega(1) if(true, dropLast(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)), append(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), last(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0))), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)) ->_R^Omega(1) if(true, nil, append(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), last(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0))), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)) ->_R^Omega(1) if(true, nil, last(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)) ->_R^Omega(1) gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0) Induction Step: rev(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(n2304_0, 1)), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)) ->_R^Omega(1) if(isEmpty(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(n2304_0, 1))), dropLast(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(n2304_0, 1))), append(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), last(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(n2304_0, 1)))), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)) ->_R^Omega(1) if(false, dropLast(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, n2304_0))), append(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), last(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, n2304_0)))), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)) ->_L^Omega(1 + n2304_0) if(false, gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n2304_0), append(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), last(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, n2304_0)))), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)) ->_L^Omega(1 + n2304_0) if(false, gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n2304_0), append(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)) ->_L^Omega(1) if(false, gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n2304_0), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(0, 0)), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)) ->_R^Omega(1) rev(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n2304_0), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)) ->_IH gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0) We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). ---------------------------------------- (22) Complex Obligation (BEST) ---------------------------------------- (23) Obligation: Proved the lower bound n^2 for the following obligation: Innermost TRS: Rules: isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false last(cons(x, nil)) -> x last(cons(x, cons(y, ys))) -> last(cons(y, ys)) dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) reverse(xs) -> rev(xs, nil) rev(xs, ys) -> if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys) if(true, xs, ys, zs) -> zs if(false, xs, ys, zs) -> rev(xs, ys) encArg(nil) -> nil encArg(true) -> true encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(false) -> false encArg(cons_isEmpty(x_1)) -> isEmpty(encArg(x_1)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encArg(cons_dropLast(x_1)) -> dropLast(encArg(x_1)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_reverse(x_1)) -> reverse(encArg(x_1)) encArg(cons_rev(x_1, x_2)) -> rev(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_isEmpty(x_1) -> isEmpty(encArg(x_1)) encode_nil -> nil encode_true -> true encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_false -> false encode_last(x_1) -> last(encArg(x_1)) encode_dropLast(x_1) -> dropLast(encArg(x_1)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_reverse(x_1) -> reverse(encArg(x_1)) encode_rev(x_1, x_2) -> rev(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) Types: isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encArg :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if hole_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if1_0 :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0 :: Nat -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if Lemmas: last(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, n4_0))) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), rt in Omega(1 + n4_0) dropLast(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, n425_0))) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n425_0), rt in Omega(1 + n425_0) append(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n1000_0), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(b)) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(n1000_0, b)), rt in Omega(1 + n1000_0) Generator Equations: gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0) <=> nil gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(x, 1)) <=> cons(nil, gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(x)) The following defined symbols remain to be analysed: rev, encArg They will be analysed ascendingly in the following order: rev = if rev < encArg if < encArg ---------------------------------------- (24) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (25) BOUNDS(n^2, INF) ---------------------------------------- (26) Obligation: Innermost TRS: Rules: isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false last(cons(x, nil)) -> x last(cons(x, cons(y, ys))) -> last(cons(y, ys)) dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) reverse(xs) -> rev(xs, nil) rev(xs, ys) -> if(isEmpty(xs), dropLast(xs), append(ys, last(xs)), ys) if(true, xs, ys, zs) -> zs if(false, xs, ys, zs) -> rev(xs, ys) encArg(nil) -> nil encArg(true) -> true encArg(cons(x_1, x_2)) -> cons(encArg(x_1), encArg(x_2)) encArg(false) -> false encArg(cons_isEmpty(x_1)) -> isEmpty(encArg(x_1)) encArg(cons_last(x_1)) -> last(encArg(x_1)) encArg(cons_dropLast(x_1)) -> dropLast(encArg(x_1)) encArg(cons_append(x_1, x_2)) -> append(encArg(x_1), encArg(x_2)) encArg(cons_reverse(x_1)) -> reverse(encArg(x_1)) encArg(cons_rev(x_1, x_2)) -> rev(encArg(x_1), encArg(x_2)) encArg(cons_if(x_1, x_2, x_3, x_4)) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) encode_isEmpty(x_1) -> isEmpty(encArg(x_1)) encode_nil -> nil encode_true -> true encode_cons(x_1, x_2) -> cons(encArg(x_1), encArg(x_2)) encode_false -> false encode_last(x_1) -> last(encArg(x_1)) encode_dropLast(x_1) -> dropLast(encArg(x_1)) encode_append(x_1, x_2) -> append(encArg(x_1), encArg(x_2)) encode_reverse(x_1) -> reverse(encArg(x_1)) encode_rev(x_1, x_2) -> rev(encArg(x_1), encArg(x_2)) encode_if(x_1, x_2, x_3, x_4) -> if(encArg(x_1), encArg(x_2), encArg(x_3), encArg(x_4)) Types: isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encArg :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if cons_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_isEmpty :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_nil :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_true :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_cons :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_false :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_last :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_dropLast :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_append :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_reverse :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_rev :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if encode_if :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if hole_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if1_0 :: nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0 :: Nat -> nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if Lemmas: last(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, n4_0))) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), rt in Omega(1 + n4_0) dropLast(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(1, n425_0))) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n425_0), rt in Omega(1 + n425_0) append(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n1000_0), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(b)) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(n1000_0, b)), rt in Omega(1 + n1000_0) rev(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n2304_0), gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0), rt in Omega(1 + n2304_0 + n2304_0^2) Generator Equations: gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0) <=> nil gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(x, 1)) <=> cons(nil, gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(x)) The following defined symbols remain to be analysed: if, encArg They will be analysed ascendingly in the following order: rev = if rev < encArg if < encArg ---------------------------------------- (27) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: encArg(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n8532_0)) -> gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n8532_0), rt in Omega(0) Induction Base: encArg(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(0)) ->_R^Omega(0) nil Induction Step: encArg(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(+(n8532_0, 1))) ->_R^Omega(0) cons(encArg(nil), encArg(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n8532_0))) ->_R^Omega(0) cons(nil, encArg(gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(n8532_0))) ->_IH cons(nil, gen_nil:true:cons:false:cons_isEmpty:cons_last:cons_dropLast:cons_append:cons_reverse:cons_rev:cons_if2_0(c8533_0)) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (28) BOUNDS(1, INF)