/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), ?) proof of /export/starexec/sandbox2/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) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) typed CpxTrs (5) OrderProof [LOWER BOUND(ID), 0 ms] (6) typed CpxTrs (7) RewriteLemmaProof [LOWER BOUND(ID), 364 ms] (8) BEST (9) proven lower bound (10) LowerBoundPropagationProof [FINISHED, 0 ms] (11) BOUNDS(n^1, INF) (12) typed CpxTrs (13) RewriteLemmaProof [LOWER BOUND(ID), 36 ms] (14) typed CpxTrs (15) RewriteLemmaProof [LOWER BOUND(ID), 53 ms] (16) 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: prod(xs) -> prodIter(xs, s(0)) prodIter(xs, x) -> ifProd(isempty(xs), xs, x) ifProd(true, xs, x) -> x ifProd(false, xs, x) -> prodIter(tail(xs), times(x, head(xs))) plus(0, y) -> y plus(s(x), y) -> s(plus(x, y)) times(x, y) -> timesIter(x, y, 0, 0) timesIter(x, y, z, u) -> ifTimes(ge(u, x), x, y, z, u) ifTimes(true, x, y, z, u) -> z ifTimes(false, x, y, z, u) -> timesIter(x, y, plus(y, z), s(u)) isempty(nil) -> true isempty(cons(x, xs)) -> false head(nil) -> error head(cons(x, xs)) -> x tail(nil) -> nil tail(cons(x, xs)) -> xs ge(x, 0) -> true ge(0, s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c S is empty. Rewrite Strategy: 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: prod(xs) -> prodIter(xs, s(0')) prodIter(xs, x) -> ifProd(isempty(xs), xs, x) ifProd(true, xs, x) -> x ifProd(false, xs, x) -> prodIter(tail(xs), times(x, head(xs))) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) times(x, y) -> timesIter(x, y, 0', 0') timesIter(x, y, z, u) -> ifTimes(ge(u, x), x, y, z, u) ifTimes(true, x, y, z, u) -> z ifTimes(false, x, y, z, u) -> timesIter(x, y, plus(y, z), s(u)) isempty(nil) -> true isempty(cons(x, xs)) -> false head(nil) -> error head(cons(x, xs)) -> x tail(nil) -> nil tail(cons(x, xs)) -> xs ge(x, 0') -> true ge(0', s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c S is empty. Rewrite Strategy: FULL ---------------------------------------- (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (4) Obligation: TRS: Rules: prod(xs) -> prodIter(xs, s(0')) prodIter(xs, x) -> ifProd(isempty(xs), xs, x) ifProd(true, xs, x) -> x ifProd(false, xs, x) -> prodIter(tail(xs), times(x, head(xs))) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) times(x, y) -> timesIter(x, y, 0', 0') timesIter(x, y, z, u) -> ifTimes(ge(u, x), x, y, z, u) ifTimes(true, x, y, z, u) -> z ifTimes(false, x, y, z, u) -> timesIter(x, y, plus(y, z), s(u)) isempty(nil) -> true isempty(cons(x, xs)) -> false head(nil) -> error head(cons(x, xs)) -> x tail(nil) -> nil tail(cons(x, xs)) -> xs ge(x, 0') -> true ge(0', s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c Types: prod :: nil:cons -> 0':s:error prodIter :: nil:cons -> 0':s:error -> 0':s:error s :: 0':s:error -> 0':s:error 0' :: 0':s:error ifProd :: true:false -> nil:cons -> 0':s:error -> 0':s:error isempty :: nil:cons -> true:false true :: true:false false :: true:false tail :: nil:cons -> nil:cons times :: 0':s:error -> 0':s:error -> 0':s:error head :: nil:cons -> 0':s:error plus :: 0':s:error -> 0':s:error -> 0':s:error timesIter :: 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error ifTimes :: true:false -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error ge :: 0':s:error -> 0':s:error -> true:false nil :: nil:cons cons :: 0':s:error -> nil:cons -> nil:cons error :: 0':s:error a :: b:c b :: b:c c :: b:c hole_0':s:error1_0 :: 0':s:error hole_nil:cons2_0 :: nil:cons hole_true:false3_0 :: true:false hole_b:c4_0 :: b:c gen_0':s:error5_0 :: Nat -> 0':s:error gen_nil:cons6_0 :: Nat -> nil:cons ---------------------------------------- (5) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: prodIter, plus, timesIter, ge They will be analysed ascendingly in the following order: plus < timesIter ge < timesIter ---------------------------------------- (6) Obligation: TRS: Rules: prod(xs) -> prodIter(xs, s(0')) prodIter(xs, x) -> ifProd(isempty(xs), xs, x) ifProd(true, xs, x) -> x ifProd(false, xs, x) -> prodIter(tail(xs), times(x, head(xs))) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) times(x, y) -> timesIter(x, y, 0', 0') timesIter(x, y, z, u) -> ifTimes(ge(u, x), x, y, z, u) ifTimes(true, x, y, z, u) -> z ifTimes(false, x, y, z, u) -> timesIter(x, y, plus(y, z), s(u)) isempty(nil) -> true isempty(cons(x, xs)) -> false head(nil) -> error head(cons(x, xs)) -> x tail(nil) -> nil tail(cons(x, xs)) -> xs ge(x, 0') -> true ge(0', s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c Types: prod :: nil:cons -> 0':s:error prodIter :: nil:cons -> 0':s:error -> 0':s:error s :: 0':s:error -> 0':s:error 0' :: 0':s:error ifProd :: true:false -> nil:cons -> 0':s:error -> 0':s:error isempty :: nil:cons -> true:false true :: true:false false :: true:false tail :: nil:cons -> nil:cons times :: 0':s:error -> 0':s:error -> 0':s:error head :: nil:cons -> 0':s:error plus :: 0':s:error -> 0':s:error -> 0':s:error timesIter :: 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error ifTimes :: true:false -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error ge :: 0':s:error -> 0':s:error -> true:false nil :: nil:cons cons :: 0':s:error -> nil:cons -> nil:cons error :: 0':s:error a :: b:c b :: b:c c :: b:c hole_0':s:error1_0 :: 0':s:error hole_nil:cons2_0 :: nil:cons hole_true:false3_0 :: true:false hole_b:c4_0 :: b:c gen_0':s:error5_0 :: Nat -> 0':s:error gen_nil:cons6_0 :: Nat -> nil:cons Generator Equations: gen_0':s:error5_0(0) <=> 0' gen_0':s:error5_0(+(x, 1)) <=> s(gen_0':s:error5_0(x)) gen_nil:cons6_0(0) <=> nil gen_nil:cons6_0(+(x, 1)) <=> cons(0', gen_nil:cons6_0(x)) The following defined symbols remain to be analysed: prodIter, plus, timesIter, ge They will be analysed ascendingly in the following order: plus < timesIter ge < timesIter ---------------------------------------- (7) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: prodIter(gen_nil:cons6_0(n8_0), gen_0':s:error5_0(0)) -> gen_0':s:error5_0(0), rt in Omega(1 + n8_0) Induction Base: prodIter(gen_nil:cons6_0(0), gen_0':s:error5_0(0)) ->_R^Omega(1) ifProd(isempty(gen_nil:cons6_0(0)), gen_nil:cons6_0(0), gen_0':s:error5_0(0)) ->_R^Omega(1) ifProd(true, gen_nil:cons6_0(0), gen_0':s:error5_0(0)) ->_R^Omega(1) gen_0':s:error5_0(0) Induction Step: prodIter(gen_nil:cons6_0(+(n8_0, 1)), gen_0':s:error5_0(0)) ->_R^Omega(1) ifProd(isempty(gen_nil:cons6_0(+(n8_0, 1))), gen_nil:cons6_0(+(n8_0, 1)), gen_0':s:error5_0(0)) ->_R^Omega(1) ifProd(false, gen_nil:cons6_0(+(1, n8_0)), gen_0':s:error5_0(0)) ->_R^Omega(1) prodIter(tail(gen_nil:cons6_0(+(1, n8_0))), times(gen_0':s:error5_0(0), head(gen_nil:cons6_0(+(1, n8_0))))) ->_R^Omega(1) prodIter(gen_nil:cons6_0(n8_0), times(gen_0':s:error5_0(0), head(gen_nil:cons6_0(+(1, n8_0))))) ->_R^Omega(1) prodIter(gen_nil:cons6_0(n8_0), times(gen_0':s:error5_0(0), 0')) ->_R^Omega(1) prodIter(gen_nil:cons6_0(n8_0), timesIter(gen_0':s:error5_0(0), 0', 0', 0')) ->_R^Omega(1) prodIter(gen_nil:cons6_0(n8_0), ifTimes(ge(0', gen_0':s:error5_0(0)), gen_0':s:error5_0(0), 0', 0', 0')) ->_R^Omega(1) prodIter(gen_nil:cons6_0(n8_0), ifTimes(true, gen_0':s:error5_0(0), 0', 0', 0')) ->_R^Omega(1) prodIter(gen_nil:cons6_0(n8_0), 0') ->_IH gen_0':s:error5_0(0) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (8) Complex Obligation (BEST) ---------------------------------------- (9) Obligation: Proved the lower bound n^1 for the following obligation: TRS: Rules: prod(xs) -> prodIter(xs, s(0')) prodIter(xs, x) -> ifProd(isempty(xs), xs, x) ifProd(true, xs, x) -> x ifProd(false, xs, x) -> prodIter(tail(xs), times(x, head(xs))) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) times(x, y) -> timesIter(x, y, 0', 0') timesIter(x, y, z, u) -> ifTimes(ge(u, x), x, y, z, u) ifTimes(true, x, y, z, u) -> z ifTimes(false, x, y, z, u) -> timesIter(x, y, plus(y, z), s(u)) isempty(nil) -> true isempty(cons(x, xs)) -> false head(nil) -> error head(cons(x, xs)) -> x tail(nil) -> nil tail(cons(x, xs)) -> xs ge(x, 0') -> true ge(0', s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c Types: prod :: nil:cons -> 0':s:error prodIter :: nil:cons -> 0':s:error -> 0':s:error s :: 0':s:error -> 0':s:error 0' :: 0':s:error ifProd :: true:false -> nil:cons -> 0':s:error -> 0':s:error isempty :: nil:cons -> true:false true :: true:false false :: true:false tail :: nil:cons -> nil:cons times :: 0':s:error -> 0':s:error -> 0':s:error head :: nil:cons -> 0':s:error plus :: 0':s:error -> 0':s:error -> 0':s:error timesIter :: 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error ifTimes :: true:false -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error ge :: 0':s:error -> 0':s:error -> true:false nil :: nil:cons cons :: 0':s:error -> nil:cons -> nil:cons error :: 0':s:error a :: b:c b :: b:c c :: b:c hole_0':s:error1_0 :: 0':s:error hole_nil:cons2_0 :: nil:cons hole_true:false3_0 :: true:false hole_b:c4_0 :: b:c gen_0':s:error5_0 :: Nat -> 0':s:error gen_nil:cons6_0 :: Nat -> nil:cons Generator Equations: gen_0':s:error5_0(0) <=> 0' gen_0':s:error5_0(+(x, 1)) <=> s(gen_0':s:error5_0(x)) gen_nil:cons6_0(0) <=> nil gen_nil:cons6_0(+(x, 1)) <=> cons(0', gen_nil:cons6_0(x)) The following defined symbols remain to be analysed: prodIter, plus, timesIter, ge They will be analysed ascendingly in the following order: plus < timesIter ge < timesIter ---------------------------------------- (10) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (11) BOUNDS(n^1, INF) ---------------------------------------- (12) Obligation: TRS: Rules: prod(xs) -> prodIter(xs, s(0')) prodIter(xs, x) -> ifProd(isempty(xs), xs, x) ifProd(true, xs, x) -> x ifProd(false, xs, x) -> prodIter(tail(xs), times(x, head(xs))) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) times(x, y) -> timesIter(x, y, 0', 0') timesIter(x, y, z, u) -> ifTimes(ge(u, x), x, y, z, u) ifTimes(true, x, y, z, u) -> z ifTimes(false, x, y, z, u) -> timesIter(x, y, plus(y, z), s(u)) isempty(nil) -> true isempty(cons(x, xs)) -> false head(nil) -> error head(cons(x, xs)) -> x tail(nil) -> nil tail(cons(x, xs)) -> xs ge(x, 0') -> true ge(0', s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c Types: prod :: nil:cons -> 0':s:error prodIter :: nil:cons -> 0':s:error -> 0':s:error s :: 0':s:error -> 0':s:error 0' :: 0':s:error ifProd :: true:false -> nil:cons -> 0':s:error -> 0':s:error isempty :: nil:cons -> true:false true :: true:false false :: true:false tail :: nil:cons -> nil:cons times :: 0':s:error -> 0':s:error -> 0':s:error head :: nil:cons -> 0':s:error plus :: 0':s:error -> 0':s:error -> 0':s:error timesIter :: 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error ifTimes :: true:false -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error ge :: 0':s:error -> 0':s:error -> true:false nil :: nil:cons cons :: 0':s:error -> nil:cons -> nil:cons error :: 0':s:error a :: b:c b :: b:c c :: b:c hole_0':s:error1_0 :: 0':s:error hole_nil:cons2_0 :: nil:cons hole_true:false3_0 :: true:false hole_b:c4_0 :: b:c gen_0':s:error5_0 :: Nat -> 0':s:error gen_nil:cons6_0 :: Nat -> nil:cons Lemmas: prodIter(gen_nil:cons6_0(n8_0), gen_0':s:error5_0(0)) -> gen_0':s:error5_0(0), rt in Omega(1 + n8_0) Generator Equations: gen_0':s:error5_0(0) <=> 0' gen_0':s:error5_0(+(x, 1)) <=> s(gen_0':s:error5_0(x)) gen_nil:cons6_0(0) <=> nil gen_nil:cons6_0(+(x, 1)) <=> cons(0', gen_nil:cons6_0(x)) The following defined symbols remain to be analysed: plus, timesIter, ge They will be analysed ascendingly in the following order: plus < timesIter ge < timesIter ---------------------------------------- (13) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: plus(gen_0':s:error5_0(n1637_0), gen_0':s:error5_0(b)) -> gen_0':s:error5_0(+(n1637_0, b)), rt in Omega(1 + n1637_0) Induction Base: plus(gen_0':s:error5_0(0), gen_0':s:error5_0(b)) ->_R^Omega(1) gen_0':s:error5_0(b) Induction Step: plus(gen_0':s:error5_0(+(n1637_0, 1)), gen_0':s:error5_0(b)) ->_R^Omega(1) s(plus(gen_0':s:error5_0(n1637_0), gen_0':s:error5_0(b))) ->_IH s(gen_0':s:error5_0(+(b, c1638_0))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (14) Obligation: TRS: Rules: prod(xs) -> prodIter(xs, s(0')) prodIter(xs, x) -> ifProd(isempty(xs), xs, x) ifProd(true, xs, x) -> x ifProd(false, xs, x) -> prodIter(tail(xs), times(x, head(xs))) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) times(x, y) -> timesIter(x, y, 0', 0') timesIter(x, y, z, u) -> ifTimes(ge(u, x), x, y, z, u) ifTimes(true, x, y, z, u) -> z ifTimes(false, x, y, z, u) -> timesIter(x, y, plus(y, z), s(u)) isempty(nil) -> true isempty(cons(x, xs)) -> false head(nil) -> error head(cons(x, xs)) -> x tail(nil) -> nil tail(cons(x, xs)) -> xs ge(x, 0') -> true ge(0', s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c Types: prod :: nil:cons -> 0':s:error prodIter :: nil:cons -> 0':s:error -> 0':s:error s :: 0':s:error -> 0':s:error 0' :: 0':s:error ifProd :: true:false -> nil:cons -> 0':s:error -> 0':s:error isempty :: nil:cons -> true:false true :: true:false false :: true:false tail :: nil:cons -> nil:cons times :: 0':s:error -> 0':s:error -> 0':s:error head :: nil:cons -> 0':s:error plus :: 0':s:error -> 0':s:error -> 0':s:error timesIter :: 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error ifTimes :: true:false -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error ge :: 0':s:error -> 0':s:error -> true:false nil :: nil:cons cons :: 0':s:error -> nil:cons -> nil:cons error :: 0':s:error a :: b:c b :: b:c c :: b:c hole_0':s:error1_0 :: 0':s:error hole_nil:cons2_0 :: nil:cons hole_true:false3_0 :: true:false hole_b:c4_0 :: b:c gen_0':s:error5_0 :: Nat -> 0':s:error gen_nil:cons6_0 :: Nat -> nil:cons Lemmas: prodIter(gen_nil:cons6_0(n8_0), gen_0':s:error5_0(0)) -> gen_0':s:error5_0(0), rt in Omega(1 + n8_0) plus(gen_0':s:error5_0(n1637_0), gen_0':s:error5_0(b)) -> gen_0':s:error5_0(+(n1637_0, b)), rt in Omega(1 + n1637_0) Generator Equations: gen_0':s:error5_0(0) <=> 0' gen_0':s:error5_0(+(x, 1)) <=> s(gen_0':s:error5_0(x)) gen_nil:cons6_0(0) <=> nil gen_nil:cons6_0(+(x, 1)) <=> cons(0', gen_nil:cons6_0(x)) The following defined symbols remain to be analysed: ge, timesIter They will be analysed ascendingly in the following order: ge < timesIter ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: ge(gen_0':s:error5_0(n2462_0), gen_0':s:error5_0(n2462_0)) -> true, rt in Omega(1 + n2462_0) Induction Base: ge(gen_0':s:error5_0(0), gen_0':s:error5_0(0)) ->_R^Omega(1) true Induction Step: ge(gen_0':s:error5_0(+(n2462_0, 1)), gen_0':s:error5_0(+(n2462_0, 1))) ->_R^Omega(1) ge(gen_0':s:error5_0(n2462_0), gen_0':s:error5_0(n2462_0)) ->_IH true We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (16) Obligation: TRS: Rules: prod(xs) -> prodIter(xs, s(0')) prodIter(xs, x) -> ifProd(isempty(xs), xs, x) ifProd(true, xs, x) -> x ifProd(false, xs, x) -> prodIter(tail(xs), times(x, head(xs))) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) times(x, y) -> timesIter(x, y, 0', 0') timesIter(x, y, z, u) -> ifTimes(ge(u, x), x, y, z, u) ifTimes(true, x, y, z, u) -> z ifTimes(false, x, y, z, u) -> timesIter(x, y, plus(y, z), s(u)) isempty(nil) -> true isempty(cons(x, xs)) -> false head(nil) -> error head(cons(x, xs)) -> x tail(nil) -> nil tail(cons(x, xs)) -> xs ge(x, 0') -> true ge(0', s(y)) -> false ge(s(x), s(y)) -> ge(x, y) a -> b a -> c Types: prod :: nil:cons -> 0':s:error prodIter :: nil:cons -> 0':s:error -> 0':s:error s :: 0':s:error -> 0':s:error 0' :: 0':s:error ifProd :: true:false -> nil:cons -> 0':s:error -> 0':s:error isempty :: nil:cons -> true:false true :: true:false false :: true:false tail :: nil:cons -> nil:cons times :: 0':s:error -> 0':s:error -> 0':s:error head :: nil:cons -> 0':s:error plus :: 0':s:error -> 0':s:error -> 0':s:error timesIter :: 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error ifTimes :: true:false -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error -> 0':s:error ge :: 0':s:error -> 0':s:error -> true:false nil :: nil:cons cons :: 0':s:error -> nil:cons -> nil:cons error :: 0':s:error a :: b:c b :: b:c c :: b:c hole_0':s:error1_0 :: 0':s:error hole_nil:cons2_0 :: nil:cons hole_true:false3_0 :: true:false hole_b:c4_0 :: b:c gen_0':s:error5_0 :: Nat -> 0':s:error gen_nil:cons6_0 :: Nat -> nil:cons Lemmas: prodIter(gen_nil:cons6_0(n8_0), gen_0':s:error5_0(0)) -> gen_0':s:error5_0(0), rt in Omega(1 + n8_0) plus(gen_0':s:error5_0(n1637_0), gen_0':s:error5_0(b)) -> gen_0':s:error5_0(+(n1637_0, b)), rt in Omega(1 + n1637_0) ge(gen_0':s:error5_0(n2462_0), gen_0':s:error5_0(n2462_0)) -> true, rt in Omega(1 + n2462_0) Generator Equations: gen_0':s:error5_0(0) <=> 0' gen_0':s:error5_0(+(x, 1)) <=> s(gen_0':s:error5_0(x)) gen_nil:cons6_0(0) <=> nil gen_nil:cons6_0(+(x, 1)) <=> cons(0', gen_nil:cons6_0(x)) The following defined symbols remain to be analysed: timesIter