/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), ?) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). (0) CpxTRS (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxTRS (3) SlicingProof [LOWER BOUND(ID), 0 ms] (4) CpxTRS (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (6) typed CpxTrs (7) OrderProof [LOWER BOUND(ID), 0 ms] (8) typed CpxTrs (9) RewriteLemmaProof [LOWER BOUND(ID), 295 ms] (10) BEST (11) proven lower bound (12) LowerBoundPropagationProof [FINISHED, 0 ms] (13) BOUNDS(n^1, INF) (14) typed CpxTrs (15) RewriteLemmaProof [LOWER BOUND(ID), 23 ms] (16) typed CpxTrs (17) RewriteLemmaProof [LOWER BOUND(ID), 56 ms] (18) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: app(x, y) -> helpa(0, plus(length(x), length(y)), x, y) plus(x, 0) -> x plus(x, s(y)) -> s(plus(x, y)) length(nil) -> 0 length(cons(x, y)) -> s(length(y)) helpa(c, l, ys, zs) -> if(ge(c, l), c, l, ys, zs) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) if(true, c, l, ys, zs) -> nil if(false, c, l, ys, zs) -> helpb(c, l, greater(ys, zs), smaller(ys, zs)) greater(ys, zs) -> helpc(ge(length(ys), length(zs)), ys, zs) smaller(ys, zs) -> helpc(ge(length(ys), length(zs)), zs, ys) helpc(true, ys, zs) -> ys helpc(false, ys, zs) -> zs helpb(c, l, cons(y, ys), zs) -> cons(y, helpa(s(c), l, ys, zs)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (2) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: app(x, y) -> helpa(0', plus(length(x), length(y)), x, y) plus(x, 0') -> x plus(x, s(y)) -> s(plus(x, y)) length(nil) -> 0' length(cons(x, y)) -> s(length(y)) helpa(c, l, ys, zs) -> if(ge(c, l), c, l, ys, zs) ge(x, 0') -> true ge(0', s(x)) -> false ge(s(x), s(y)) -> ge(x, y) if(true, c, l, ys, zs) -> nil if(false, c, l, ys, zs) -> helpb(c, l, greater(ys, zs), smaller(ys, zs)) greater(ys, zs) -> helpc(ge(length(ys), length(zs)), ys, zs) smaller(ys, zs) -> helpc(ge(length(ys), length(zs)), zs, ys) helpc(true, ys, zs) -> ys helpc(false, ys, zs) -> zs helpb(c, l, cons(y, ys), zs) -> cons(y, helpa(s(c), l, ys, zs)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (3) SlicingProof (LOWER BOUND(ID)) Sliced the following arguments: cons/0 ---------------------------------------- (4) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: app(x, y) -> helpa(0', plus(length(x), length(y)), x, y) plus(x, 0') -> x plus(x, s(y)) -> s(plus(x, y)) length(nil) -> 0' length(cons(y)) -> s(length(y)) helpa(c, l, ys, zs) -> if(ge(c, l), c, l, ys, zs) ge(x, 0') -> true ge(0', s(x)) -> false ge(s(x), s(y)) -> ge(x, y) if(true, c, l, ys, zs) -> nil if(false, c, l, ys, zs) -> helpb(c, l, greater(ys, zs), smaller(ys, zs)) greater(ys, zs) -> helpc(ge(length(ys), length(zs)), ys, zs) smaller(ys, zs) -> helpc(ge(length(ys), length(zs)), zs, ys) helpc(true, ys, zs) -> ys helpc(false, ys, zs) -> zs helpb(c, l, cons(ys), zs) -> cons(helpa(s(c), l, ys, zs)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (6) Obligation: TRS: Rules: app(x, y) -> helpa(0', plus(length(x), length(y)), x, y) plus(x, 0') -> x plus(x, s(y)) -> s(plus(x, y)) length(nil) -> 0' length(cons(y)) -> s(length(y)) helpa(c, l, ys, zs) -> if(ge(c, l), c, l, ys, zs) ge(x, 0') -> true ge(0', s(x)) -> false ge(s(x), s(y)) -> ge(x, y) if(true, c, l, ys, zs) -> nil if(false, c, l, ys, zs) -> helpb(c, l, greater(ys, zs), smaller(ys, zs)) greater(ys, zs) -> helpc(ge(length(ys), length(zs)), ys, zs) smaller(ys, zs) -> helpc(ge(length(ys), length(zs)), zs, ys) helpc(true, ys, zs) -> ys helpc(false, ys, zs) -> zs helpb(c, l, cons(ys), zs) -> cons(helpa(s(c), l, ys, zs)) Types: app :: nil:cons -> nil:cons -> nil:cons helpa :: 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons 0' :: 0':s plus :: 0':s -> 0':s -> 0':s length :: nil:cons -> 0':s s :: 0':s -> 0':s nil :: nil:cons cons :: nil:cons -> nil:cons if :: true:false -> 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons ge :: 0':s -> 0':s -> true:false true :: true:false false :: true:false helpb :: 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons greater :: nil:cons -> nil:cons -> nil:cons smaller :: nil:cons -> nil:cons -> nil:cons helpc :: true:false -> nil:cons -> nil:cons -> nil:cons hole_nil:cons1_0 :: nil:cons hole_0':s2_0 :: 0':s hole_true:false3_0 :: true:false gen_nil:cons4_0 :: Nat -> nil:cons gen_0':s5_0 :: Nat -> 0':s ---------------------------------------- (7) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: helpa, plus, length, ge, helpb They will be analysed ascendingly in the following order: ge < helpa helpa = helpb ---------------------------------------- (8) Obligation: TRS: Rules: app(x, y) -> helpa(0', plus(length(x), length(y)), x, y) plus(x, 0') -> x plus(x, s(y)) -> s(plus(x, y)) length(nil) -> 0' length(cons(y)) -> s(length(y)) helpa(c, l, ys, zs) -> if(ge(c, l), c, l, ys, zs) ge(x, 0') -> true ge(0', s(x)) -> false ge(s(x), s(y)) -> ge(x, y) if(true, c, l, ys, zs) -> nil if(false, c, l, ys, zs) -> helpb(c, l, greater(ys, zs), smaller(ys, zs)) greater(ys, zs) -> helpc(ge(length(ys), length(zs)), ys, zs) smaller(ys, zs) -> helpc(ge(length(ys), length(zs)), zs, ys) helpc(true, ys, zs) -> ys helpc(false, ys, zs) -> zs helpb(c, l, cons(ys), zs) -> cons(helpa(s(c), l, ys, zs)) Types: app :: nil:cons -> nil:cons -> nil:cons helpa :: 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons 0' :: 0':s plus :: 0':s -> 0':s -> 0':s length :: nil:cons -> 0':s s :: 0':s -> 0':s nil :: nil:cons cons :: nil:cons -> nil:cons if :: true:false -> 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons ge :: 0':s -> 0':s -> true:false true :: true:false false :: true:false helpb :: 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons greater :: nil:cons -> nil:cons -> nil:cons smaller :: nil:cons -> nil:cons -> nil:cons helpc :: true:false -> nil:cons -> nil:cons -> nil:cons hole_nil:cons1_0 :: nil:cons hole_0':s2_0 :: 0':s hole_true:false3_0 :: true:false gen_nil:cons4_0 :: Nat -> nil:cons gen_0':s5_0 :: Nat -> 0':s Generator Equations: gen_nil:cons4_0(0) <=> nil gen_nil:cons4_0(+(x, 1)) <=> cons(gen_nil:cons4_0(x)) gen_0':s5_0(0) <=> 0' gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) The following defined symbols remain to be analysed: plus, helpa, length, ge, helpb They will be analysed ascendingly in the following order: ge < helpa helpa = helpb ---------------------------------------- (9) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) -> gen_0':s5_0(+(n7_0, a)), rt in Omega(1 + n7_0) Induction Base: plus(gen_0':s5_0(a), gen_0':s5_0(0)) ->_R^Omega(1) gen_0':s5_0(a) Induction Step: plus(gen_0':s5_0(a), gen_0':s5_0(+(n7_0, 1))) ->_R^Omega(1) s(plus(gen_0':s5_0(a), gen_0':s5_0(n7_0))) ->_IH s(gen_0':s5_0(+(a, c8_0))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (10) Complex Obligation (BEST) ---------------------------------------- (11) Obligation: Proved the lower bound n^1 for the following obligation: TRS: Rules: app(x, y) -> helpa(0', plus(length(x), length(y)), x, y) plus(x, 0') -> x plus(x, s(y)) -> s(plus(x, y)) length(nil) -> 0' length(cons(y)) -> s(length(y)) helpa(c, l, ys, zs) -> if(ge(c, l), c, l, ys, zs) ge(x, 0') -> true ge(0', s(x)) -> false ge(s(x), s(y)) -> ge(x, y) if(true, c, l, ys, zs) -> nil if(false, c, l, ys, zs) -> helpb(c, l, greater(ys, zs), smaller(ys, zs)) greater(ys, zs) -> helpc(ge(length(ys), length(zs)), ys, zs) smaller(ys, zs) -> helpc(ge(length(ys), length(zs)), zs, ys) helpc(true, ys, zs) -> ys helpc(false, ys, zs) -> zs helpb(c, l, cons(ys), zs) -> cons(helpa(s(c), l, ys, zs)) Types: app :: nil:cons -> nil:cons -> nil:cons helpa :: 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons 0' :: 0':s plus :: 0':s -> 0':s -> 0':s length :: nil:cons -> 0':s s :: 0':s -> 0':s nil :: nil:cons cons :: nil:cons -> nil:cons if :: true:false -> 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons ge :: 0':s -> 0':s -> true:false true :: true:false false :: true:false helpb :: 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons greater :: nil:cons -> nil:cons -> nil:cons smaller :: nil:cons -> nil:cons -> nil:cons helpc :: true:false -> nil:cons -> nil:cons -> nil:cons hole_nil:cons1_0 :: nil:cons hole_0':s2_0 :: 0':s hole_true:false3_0 :: true:false gen_nil:cons4_0 :: Nat -> nil:cons gen_0':s5_0 :: Nat -> 0':s Generator Equations: gen_nil:cons4_0(0) <=> nil gen_nil:cons4_0(+(x, 1)) <=> cons(gen_nil:cons4_0(x)) gen_0':s5_0(0) <=> 0' gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) The following defined symbols remain to be analysed: plus, helpa, length, ge, helpb They will be analysed ascendingly in the following order: ge < helpa helpa = helpb ---------------------------------------- (12) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (13) BOUNDS(n^1, INF) ---------------------------------------- (14) Obligation: TRS: Rules: app(x, y) -> helpa(0', plus(length(x), length(y)), x, y) plus(x, 0') -> x plus(x, s(y)) -> s(plus(x, y)) length(nil) -> 0' length(cons(y)) -> s(length(y)) helpa(c, l, ys, zs) -> if(ge(c, l), c, l, ys, zs) ge(x, 0') -> true ge(0', s(x)) -> false ge(s(x), s(y)) -> ge(x, y) if(true, c, l, ys, zs) -> nil if(false, c, l, ys, zs) -> helpb(c, l, greater(ys, zs), smaller(ys, zs)) greater(ys, zs) -> helpc(ge(length(ys), length(zs)), ys, zs) smaller(ys, zs) -> helpc(ge(length(ys), length(zs)), zs, ys) helpc(true, ys, zs) -> ys helpc(false, ys, zs) -> zs helpb(c, l, cons(ys), zs) -> cons(helpa(s(c), l, ys, zs)) Types: app :: nil:cons -> nil:cons -> nil:cons helpa :: 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons 0' :: 0':s plus :: 0':s -> 0':s -> 0':s length :: nil:cons -> 0':s s :: 0':s -> 0':s nil :: nil:cons cons :: nil:cons -> nil:cons if :: true:false -> 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons ge :: 0':s -> 0':s -> true:false true :: true:false false :: true:false helpb :: 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons greater :: nil:cons -> nil:cons -> nil:cons smaller :: nil:cons -> nil:cons -> nil:cons helpc :: true:false -> nil:cons -> nil:cons -> nil:cons hole_nil:cons1_0 :: nil:cons hole_0':s2_0 :: 0':s hole_true:false3_0 :: true:false gen_nil:cons4_0 :: Nat -> nil:cons gen_0':s5_0 :: Nat -> 0':s Lemmas: plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) -> gen_0':s5_0(+(n7_0, a)), rt in Omega(1 + n7_0) Generator Equations: gen_nil:cons4_0(0) <=> nil gen_nil:cons4_0(+(x, 1)) <=> cons(gen_nil:cons4_0(x)) gen_0':s5_0(0) <=> 0' gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) The following defined symbols remain to be analysed: length, helpa, ge, helpb They will be analysed ascendingly in the following order: ge < helpa helpa = helpb ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: length(gen_nil:cons4_0(n824_0)) -> gen_0':s5_0(n824_0), rt in Omega(1 + n824_0) Induction Base: length(gen_nil:cons4_0(0)) ->_R^Omega(1) 0' Induction Step: length(gen_nil:cons4_0(+(n824_0, 1))) ->_R^Omega(1) s(length(gen_nil:cons4_0(n824_0))) ->_IH s(gen_0':s5_0(c825_0)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (16) Obligation: TRS: Rules: app(x, y) -> helpa(0', plus(length(x), length(y)), x, y) plus(x, 0') -> x plus(x, s(y)) -> s(plus(x, y)) length(nil) -> 0' length(cons(y)) -> s(length(y)) helpa(c, l, ys, zs) -> if(ge(c, l), c, l, ys, zs) ge(x, 0') -> true ge(0', s(x)) -> false ge(s(x), s(y)) -> ge(x, y) if(true, c, l, ys, zs) -> nil if(false, c, l, ys, zs) -> helpb(c, l, greater(ys, zs), smaller(ys, zs)) greater(ys, zs) -> helpc(ge(length(ys), length(zs)), ys, zs) smaller(ys, zs) -> helpc(ge(length(ys), length(zs)), zs, ys) helpc(true, ys, zs) -> ys helpc(false, ys, zs) -> zs helpb(c, l, cons(ys), zs) -> cons(helpa(s(c), l, ys, zs)) Types: app :: nil:cons -> nil:cons -> nil:cons helpa :: 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons 0' :: 0':s plus :: 0':s -> 0':s -> 0':s length :: nil:cons -> 0':s s :: 0':s -> 0':s nil :: nil:cons cons :: nil:cons -> nil:cons if :: true:false -> 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons ge :: 0':s -> 0':s -> true:false true :: true:false false :: true:false helpb :: 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons greater :: nil:cons -> nil:cons -> nil:cons smaller :: nil:cons -> nil:cons -> nil:cons helpc :: true:false -> nil:cons -> nil:cons -> nil:cons hole_nil:cons1_0 :: nil:cons hole_0':s2_0 :: 0':s hole_true:false3_0 :: true:false gen_nil:cons4_0 :: Nat -> nil:cons gen_0':s5_0 :: Nat -> 0':s Lemmas: plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) -> gen_0':s5_0(+(n7_0, a)), rt in Omega(1 + n7_0) length(gen_nil:cons4_0(n824_0)) -> gen_0':s5_0(n824_0), rt in Omega(1 + n824_0) Generator Equations: gen_nil:cons4_0(0) <=> nil gen_nil:cons4_0(+(x, 1)) <=> cons(gen_nil:cons4_0(x)) gen_0':s5_0(0) <=> 0' gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) The following defined symbols remain to be analysed: ge, helpa, helpb They will be analysed ascendingly in the following order: ge < helpa helpa = helpb ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: ge(gen_0':s5_0(n1080_0), gen_0':s5_0(n1080_0)) -> true, rt in Omega(1 + n1080_0) Induction Base: ge(gen_0':s5_0(0), gen_0':s5_0(0)) ->_R^Omega(1) true Induction Step: ge(gen_0':s5_0(+(n1080_0, 1)), gen_0':s5_0(+(n1080_0, 1))) ->_R^Omega(1) ge(gen_0':s5_0(n1080_0), gen_0':s5_0(n1080_0)) ->_IH true We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (18) Obligation: TRS: Rules: app(x, y) -> helpa(0', plus(length(x), length(y)), x, y) plus(x, 0') -> x plus(x, s(y)) -> s(plus(x, y)) length(nil) -> 0' length(cons(y)) -> s(length(y)) helpa(c, l, ys, zs) -> if(ge(c, l), c, l, ys, zs) ge(x, 0') -> true ge(0', s(x)) -> false ge(s(x), s(y)) -> ge(x, y) if(true, c, l, ys, zs) -> nil if(false, c, l, ys, zs) -> helpb(c, l, greater(ys, zs), smaller(ys, zs)) greater(ys, zs) -> helpc(ge(length(ys), length(zs)), ys, zs) smaller(ys, zs) -> helpc(ge(length(ys), length(zs)), zs, ys) helpc(true, ys, zs) -> ys helpc(false, ys, zs) -> zs helpb(c, l, cons(ys), zs) -> cons(helpa(s(c), l, ys, zs)) Types: app :: nil:cons -> nil:cons -> nil:cons helpa :: 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons 0' :: 0':s plus :: 0':s -> 0':s -> 0':s length :: nil:cons -> 0':s s :: 0':s -> 0':s nil :: nil:cons cons :: nil:cons -> nil:cons if :: true:false -> 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons ge :: 0':s -> 0':s -> true:false true :: true:false false :: true:false helpb :: 0':s -> 0':s -> nil:cons -> nil:cons -> nil:cons greater :: nil:cons -> nil:cons -> nil:cons smaller :: nil:cons -> nil:cons -> nil:cons helpc :: true:false -> nil:cons -> nil:cons -> nil:cons hole_nil:cons1_0 :: nil:cons hole_0':s2_0 :: 0':s hole_true:false3_0 :: true:false gen_nil:cons4_0 :: Nat -> nil:cons gen_0':s5_0 :: Nat -> 0':s Lemmas: plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) -> gen_0':s5_0(+(n7_0, a)), rt in Omega(1 + n7_0) length(gen_nil:cons4_0(n824_0)) -> gen_0':s5_0(n824_0), rt in Omega(1 + n824_0) ge(gen_0':s5_0(n1080_0), gen_0':s5_0(n1080_0)) -> true, rt in Omega(1 + n1080_0) Generator Equations: gen_nil:cons4_0(0) <=> nil gen_nil:cons4_0(+(x, 1)) <=> cons(gen_nil:cons4_0(x)) gen_0':s5_0(0) <=> 0' gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) The following defined symbols remain to be analysed: helpb, helpa They will be analysed ascendingly in the following order: helpa = helpb