/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: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 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), 276 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), 133 ms] (14) BOUNDS(1, INF) ---------------------------------------- (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: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) less_leaves(u, v) -> if1(isLeaf(u), isLeaf(v), u, v) if1(b, true, u, v) -> false if1(b, false, u, v) -> if2(b, u, v) if2(true, u, v) -> true if2(false, u, v) -> less_leaves(concat(left(u), right(u)), concat(left(v), right(v))) 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: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) less_leaves(u, v) -> if1(isLeaf(u), isLeaf(v), u, v) if1(b, true, u, v) -> false if1(b, false, u, v) -> if2(b, u, v) if2(true, u, v) -> true if2(false, u, v) -> less_leaves(concat(left(u), right(u)), concat(left(v), right(v))) S is empty. Rewrite Strategy: FULL ---------------------------------------- (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (4) Obligation: TRS: Rules: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) less_leaves(u, v) -> if1(isLeaf(u), isLeaf(v), u, v) if1(b, true, u, v) -> false if1(b, false, u, v) -> if2(b, u, v) if2(true, u, v) -> true if2(false, u, v) -> less_leaves(concat(left(u), right(u)), concat(left(v), right(v))) Types: isLeaf :: leaf:cons -> true:false leaf :: leaf:cons true :: true:false cons :: leaf:cons -> leaf:cons -> leaf:cons false :: true:false left :: leaf:cons -> leaf:cons right :: leaf:cons -> leaf:cons concat :: leaf:cons -> leaf:cons -> leaf:cons less_leaves :: leaf:cons -> leaf:cons -> true:false if1 :: true:false -> true:false -> leaf:cons -> leaf:cons -> true:false if2 :: true:false -> leaf:cons -> leaf:cons -> true:false hole_true:false1_0 :: true:false hole_leaf:cons2_0 :: leaf:cons gen_leaf:cons3_0 :: Nat -> leaf:cons ---------------------------------------- (5) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: concat, less_leaves They will be analysed ascendingly in the following order: concat < less_leaves ---------------------------------------- (6) Obligation: TRS: Rules: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) less_leaves(u, v) -> if1(isLeaf(u), isLeaf(v), u, v) if1(b, true, u, v) -> false if1(b, false, u, v) -> if2(b, u, v) if2(true, u, v) -> true if2(false, u, v) -> less_leaves(concat(left(u), right(u)), concat(left(v), right(v))) Types: isLeaf :: leaf:cons -> true:false leaf :: leaf:cons true :: true:false cons :: leaf:cons -> leaf:cons -> leaf:cons false :: true:false left :: leaf:cons -> leaf:cons right :: leaf:cons -> leaf:cons concat :: leaf:cons -> leaf:cons -> leaf:cons less_leaves :: leaf:cons -> leaf:cons -> true:false if1 :: true:false -> true:false -> leaf:cons -> leaf:cons -> true:false if2 :: true:false -> leaf:cons -> leaf:cons -> true:false hole_true:false1_0 :: true:false hole_leaf:cons2_0 :: leaf:cons gen_leaf:cons3_0 :: Nat -> leaf:cons Generator Equations: gen_leaf:cons3_0(0) <=> leaf gen_leaf:cons3_0(+(x, 1)) <=> cons(leaf, gen_leaf:cons3_0(x)) The following defined symbols remain to be analysed: concat, less_leaves They will be analysed ascendingly in the following order: concat < less_leaves ---------------------------------------- (7) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: concat(gen_leaf:cons3_0(n5_0), gen_leaf:cons3_0(b)) -> gen_leaf:cons3_0(+(n5_0, b)), rt in Omega(1 + n5_0) Induction Base: concat(gen_leaf:cons3_0(0), gen_leaf:cons3_0(b)) ->_R^Omega(1) gen_leaf:cons3_0(b) Induction Step: concat(gen_leaf:cons3_0(+(n5_0, 1)), gen_leaf:cons3_0(b)) ->_R^Omega(1) cons(leaf, concat(gen_leaf:cons3_0(n5_0), gen_leaf:cons3_0(b))) ->_IH cons(leaf, gen_leaf:cons3_0(+(b, c6_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: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) less_leaves(u, v) -> if1(isLeaf(u), isLeaf(v), u, v) if1(b, true, u, v) -> false if1(b, false, u, v) -> if2(b, u, v) if2(true, u, v) -> true if2(false, u, v) -> less_leaves(concat(left(u), right(u)), concat(left(v), right(v))) Types: isLeaf :: leaf:cons -> true:false leaf :: leaf:cons true :: true:false cons :: leaf:cons -> leaf:cons -> leaf:cons false :: true:false left :: leaf:cons -> leaf:cons right :: leaf:cons -> leaf:cons concat :: leaf:cons -> leaf:cons -> leaf:cons less_leaves :: leaf:cons -> leaf:cons -> true:false if1 :: true:false -> true:false -> leaf:cons -> leaf:cons -> true:false if2 :: true:false -> leaf:cons -> leaf:cons -> true:false hole_true:false1_0 :: true:false hole_leaf:cons2_0 :: leaf:cons gen_leaf:cons3_0 :: Nat -> leaf:cons Generator Equations: gen_leaf:cons3_0(0) <=> leaf gen_leaf:cons3_0(+(x, 1)) <=> cons(leaf, gen_leaf:cons3_0(x)) The following defined symbols remain to be analysed: concat, less_leaves They will be analysed ascendingly in the following order: concat < less_leaves ---------------------------------------- (10) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (11) BOUNDS(n^1, INF) ---------------------------------------- (12) Obligation: TRS: Rules: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) less_leaves(u, v) -> if1(isLeaf(u), isLeaf(v), u, v) if1(b, true, u, v) -> false if1(b, false, u, v) -> if2(b, u, v) if2(true, u, v) -> true if2(false, u, v) -> less_leaves(concat(left(u), right(u)), concat(left(v), right(v))) Types: isLeaf :: leaf:cons -> true:false leaf :: leaf:cons true :: true:false cons :: leaf:cons -> leaf:cons -> leaf:cons false :: true:false left :: leaf:cons -> leaf:cons right :: leaf:cons -> leaf:cons concat :: leaf:cons -> leaf:cons -> leaf:cons less_leaves :: leaf:cons -> leaf:cons -> true:false if1 :: true:false -> true:false -> leaf:cons -> leaf:cons -> true:false if2 :: true:false -> leaf:cons -> leaf:cons -> true:false hole_true:false1_0 :: true:false hole_leaf:cons2_0 :: leaf:cons gen_leaf:cons3_0 :: Nat -> leaf:cons Lemmas: concat(gen_leaf:cons3_0(n5_0), gen_leaf:cons3_0(b)) -> gen_leaf:cons3_0(+(n5_0, b)), rt in Omega(1 + n5_0) Generator Equations: gen_leaf:cons3_0(0) <=> leaf gen_leaf:cons3_0(+(x, 1)) <=> cons(leaf, gen_leaf:cons3_0(x)) The following defined symbols remain to be analysed: less_leaves ---------------------------------------- (13) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: less_leaves(gen_leaf:cons3_0(+(1, n548_0)), gen_leaf:cons3_0(n548_0)) -> false, rt in Omega(1 + n548_0) Induction Base: less_leaves(gen_leaf:cons3_0(+(1, 0)), gen_leaf:cons3_0(0)) ->_R^Omega(1) if1(isLeaf(gen_leaf:cons3_0(+(1, 0))), isLeaf(gen_leaf:cons3_0(0)), gen_leaf:cons3_0(+(1, 0)), gen_leaf:cons3_0(0)) ->_R^Omega(1) if1(false, isLeaf(gen_leaf:cons3_0(0)), gen_leaf:cons3_0(1), gen_leaf:cons3_0(0)) ->_R^Omega(1) if1(false, true, gen_leaf:cons3_0(1), gen_leaf:cons3_0(0)) ->_R^Omega(1) false Induction Step: less_leaves(gen_leaf:cons3_0(+(1, +(n548_0, 1))), gen_leaf:cons3_0(+(n548_0, 1))) ->_R^Omega(1) if1(isLeaf(gen_leaf:cons3_0(+(1, +(n548_0, 1)))), isLeaf(gen_leaf:cons3_0(+(n548_0, 1))), gen_leaf:cons3_0(+(1, +(n548_0, 1))), gen_leaf:cons3_0(+(n548_0, 1))) ->_R^Omega(1) if1(false, isLeaf(gen_leaf:cons3_0(+(1, n548_0))), gen_leaf:cons3_0(+(2, n548_0)), gen_leaf:cons3_0(+(1, n548_0))) ->_R^Omega(1) if1(false, false, gen_leaf:cons3_0(+(2, n548_0)), gen_leaf:cons3_0(+(1, n548_0))) ->_R^Omega(1) if2(false, gen_leaf:cons3_0(+(2, n548_0)), gen_leaf:cons3_0(+(1, n548_0))) ->_R^Omega(1) less_leaves(concat(left(gen_leaf:cons3_0(+(2, n548_0))), right(gen_leaf:cons3_0(+(2, n548_0)))), concat(left(gen_leaf:cons3_0(+(1, n548_0))), right(gen_leaf:cons3_0(+(1, n548_0))))) ->_R^Omega(1) less_leaves(concat(leaf, right(gen_leaf:cons3_0(+(2, n548_0)))), concat(left(gen_leaf:cons3_0(+(1, n548_0))), right(gen_leaf:cons3_0(+(1, n548_0))))) ->_R^Omega(1) less_leaves(concat(leaf, gen_leaf:cons3_0(+(1, n548_0))), concat(left(gen_leaf:cons3_0(+(1, n548_0))), right(gen_leaf:cons3_0(+(1, n548_0))))) ->_L^Omega(1) less_leaves(gen_leaf:cons3_0(+(0, +(1, n548_0))), concat(left(gen_leaf:cons3_0(+(1, n548_0))), right(gen_leaf:cons3_0(+(1, n548_0))))) ->_R^Omega(1) less_leaves(gen_leaf:cons3_0(+(1, n548_0)), concat(leaf, right(gen_leaf:cons3_0(+(1, n548_0))))) ->_R^Omega(1) less_leaves(gen_leaf:cons3_0(+(1, n548_0)), concat(leaf, gen_leaf:cons3_0(n548_0))) ->_L^Omega(1) less_leaves(gen_leaf:cons3_0(+(1, n548_0)), gen_leaf:cons3_0(+(0, n548_0))) ->_IH false We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (14) BOUNDS(1, INF)