/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) 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), 262 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), 71 ms] (14) 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: length(nil) -> 0 length(cons(x, l)) -> s(length(l)) lt(x, 0) -> false lt(0, s(y)) -> true lt(s(x), s(y)) -> lt(x, y) head(cons(x, l)) -> x head(nil) -> undefined tail(nil) -> nil tail(cons(x, l)) -> l reverse(l) -> rev(0, l, nil, l) rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) if(false, x, l, accu, orig) -> accu 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: length(nil) -> 0' length(cons(x, l)) -> s(length(l)) lt(x, 0') -> false lt(0', s(y)) -> true lt(s(x), s(y)) -> lt(x, y) head(cons(x, l)) -> x head(nil) -> undefined tail(nil) -> nil tail(cons(x, l)) -> l reverse(l) -> rev(0', l, nil, l) rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) if(false, x, l, accu, orig) -> accu S is empty. Rewrite Strategy: FULL ---------------------------------------- (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (4) Obligation: TRS: Rules: length(nil) -> 0' length(cons(x, l)) -> s(length(l)) lt(x, 0') -> false lt(0', s(y)) -> true lt(s(x), s(y)) -> lt(x, y) head(cons(x, l)) -> x head(nil) -> undefined tail(nil) -> nil tail(cons(x, l)) -> l reverse(l) -> rev(0', l, nil, l) rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) if(false, x, l, accu, orig) -> accu Types: length :: nil:cons -> 0':s nil :: nil:cons 0' :: 0':s cons :: undefined -> nil:cons -> nil:cons s :: 0':s -> 0':s lt :: 0':s -> 0':s -> false:true false :: false:true true :: false:true head :: nil:cons -> undefined undefined :: undefined tail :: nil:cons -> nil:cons reverse :: nil:cons -> nil:cons rev :: 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons if :: false:true -> 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons hole_0':s1_0 :: 0':s hole_nil:cons2_0 :: nil:cons hole_undefined3_0 :: undefined hole_false:true4_0 :: false:true gen_0':s5_0 :: Nat -> 0':s gen_nil:cons6_0 :: Nat -> nil:cons ---------------------------------------- (5) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: length, lt, rev They will be analysed ascendingly in the following order: length < rev lt < rev ---------------------------------------- (6) Obligation: TRS: Rules: length(nil) -> 0' length(cons(x, l)) -> s(length(l)) lt(x, 0') -> false lt(0', s(y)) -> true lt(s(x), s(y)) -> lt(x, y) head(cons(x, l)) -> x head(nil) -> undefined tail(nil) -> nil tail(cons(x, l)) -> l reverse(l) -> rev(0', l, nil, l) rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) if(false, x, l, accu, orig) -> accu Types: length :: nil:cons -> 0':s nil :: nil:cons 0' :: 0':s cons :: undefined -> nil:cons -> nil:cons s :: 0':s -> 0':s lt :: 0':s -> 0':s -> false:true false :: false:true true :: false:true head :: nil:cons -> undefined undefined :: undefined tail :: nil:cons -> nil:cons reverse :: nil:cons -> nil:cons rev :: 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons if :: false:true -> 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons hole_0':s1_0 :: 0':s hole_nil:cons2_0 :: nil:cons hole_undefined3_0 :: undefined hole_false:true4_0 :: false:true gen_0':s5_0 :: Nat -> 0':s gen_nil:cons6_0 :: Nat -> nil:cons Generator Equations: gen_0':s5_0(0) <=> 0' gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) gen_nil:cons6_0(0) <=> nil gen_nil:cons6_0(+(x, 1)) <=> cons(undefined, gen_nil:cons6_0(x)) The following defined symbols remain to be analysed: length, lt, rev They will be analysed ascendingly in the following order: length < rev lt < rev ---------------------------------------- (7) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: length(gen_nil:cons6_0(n8_0)) -> gen_0':s5_0(n8_0), rt in Omega(1 + n8_0) Induction Base: length(gen_nil:cons6_0(0)) ->_R^Omega(1) 0' Induction Step: length(gen_nil:cons6_0(+(n8_0, 1))) ->_R^Omega(1) s(length(gen_nil:cons6_0(n8_0))) ->_IH s(gen_0':s5_0(c9_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: length(nil) -> 0' length(cons(x, l)) -> s(length(l)) lt(x, 0') -> false lt(0', s(y)) -> true lt(s(x), s(y)) -> lt(x, y) head(cons(x, l)) -> x head(nil) -> undefined tail(nil) -> nil tail(cons(x, l)) -> l reverse(l) -> rev(0', l, nil, l) rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) if(false, x, l, accu, orig) -> accu Types: length :: nil:cons -> 0':s nil :: nil:cons 0' :: 0':s cons :: undefined -> nil:cons -> nil:cons s :: 0':s -> 0':s lt :: 0':s -> 0':s -> false:true false :: false:true true :: false:true head :: nil:cons -> undefined undefined :: undefined tail :: nil:cons -> nil:cons reverse :: nil:cons -> nil:cons rev :: 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons if :: false:true -> 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons hole_0':s1_0 :: 0':s hole_nil:cons2_0 :: nil:cons hole_undefined3_0 :: undefined hole_false:true4_0 :: false:true gen_0':s5_0 :: Nat -> 0':s gen_nil:cons6_0 :: Nat -> nil:cons Generator Equations: gen_0':s5_0(0) <=> 0' gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) gen_nil:cons6_0(0) <=> nil gen_nil:cons6_0(+(x, 1)) <=> cons(undefined, gen_nil:cons6_0(x)) The following defined symbols remain to be analysed: length, lt, rev They will be analysed ascendingly in the following order: length < rev lt < rev ---------------------------------------- (10) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (11) BOUNDS(n^1, INF) ---------------------------------------- (12) Obligation: TRS: Rules: length(nil) -> 0' length(cons(x, l)) -> s(length(l)) lt(x, 0') -> false lt(0', s(y)) -> true lt(s(x), s(y)) -> lt(x, y) head(cons(x, l)) -> x head(nil) -> undefined tail(nil) -> nil tail(cons(x, l)) -> l reverse(l) -> rev(0', l, nil, l) rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) if(false, x, l, accu, orig) -> accu Types: length :: nil:cons -> 0':s nil :: nil:cons 0' :: 0':s cons :: undefined -> nil:cons -> nil:cons s :: 0':s -> 0':s lt :: 0':s -> 0':s -> false:true false :: false:true true :: false:true head :: nil:cons -> undefined undefined :: undefined tail :: nil:cons -> nil:cons reverse :: nil:cons -> nil:cons rev :: 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons if :: false:true -> 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons hole_0':s1_0 :: 0':s hole_nil:cons2_0 :: nil:cons hole_undefined3_0 :: undefined hole_false:true4_0 :: false:true gen_0':s5_0 :: Nat -> 0':s gen_nil:cons6_0 :: Nat -> nil:cons Lemmas: length(gen_nil:cons6_0(n8_0)) -> gen_0':s5_0(n8_0), rt in Omega(1 + n8_0) Generator Equations: gen_0':s5_0(0) <=> 0' gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) gen_nil:cons6_0(0) <=> nil gen_nil:cons6_0(+(x, 1)) <=> cons(undefined, gen_nil:cons6_0(x)) The following defined symbols remain to be analysed: lt, rev They will be analysed ascendingly in the following order: lt < rev ---------------------------------------- (13) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: lt(gen_0':s5_0(n232_0), gen_0':s5_0(n232_0)) -> false, rt in Omega(1 + n232_0) Induction Base: lt(gen_0':s5_0(0), gen_0':s5_0(0)) ->_R^Omega(1) false Induction Step: lt(gen_0':s5_0(+(n232_0, 1)), gen_0':s5_0(+(n232_0, 1))) ->_R^Omega(1) lt(gen_0':s5_0(n232_0), gen_0':s5_0(n232_0)) ->_IH false We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (14) Obligation: TRS: Rules: length(nil) -> 0' length(cons(x, l)) -> s(length(l)) lt(x, 0') -> false lt(0', s(y)) -> true lt(s(x), s(y)) -> lt(x, y) head(cons(x, l)) -> x head(nil) -> undefined tail(nil) -> nil tail(cons(x, l)) -> l reverse(l) -> rev(0', l, nil, l) rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) if(false, x, l, accu, orig) -> accu Types: length :: nil:cons -> 0':s nil :: nil:cons 0' :: 0':s cons :: undefined -> nil:cons -> nil:cons s :: 0':s -> 0':s lt :: 0':s -> 0':s -> false:true false :: false:true true :: false:true head :: nil:cons -> undefined undefined :: undefined tail :: nil:cons -> nil:cons reverse :: nil:cons -> nil:cons rev :: 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons if :: false:true -> 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons hole_0':s1_0 :: 0':s hole_nil:cons2_0 :: nil:cons hole_undefined3_0 :: undefined hole_false:true4_0 :: false:true gen_0':s5_0 :: Nat -> 0':s gen_nil:cons6_0 :: Nat -> nil:cons Lemmas: length(gen_nil:cons6_0(n8_0)) -> gen_0':s5_0(n8_0), rt in Omega(1 + n8_0) lt(gen_0':s5_0(n232_0), gen_0':s5_0(n232_0)) -> false, rt in Omega(1 + n232_0) Generator Equations: gen_0':s5_0(0) <=> 0' gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) gen_nil:cons6_0(0) <=> nil gen_nil:cons6_0(+(x, 1)) <=> cons(undefined, gen_nil:cons6_0(x)) The following defined symbols remain to be analysed: rev