WORST_CASE(Omega(n^1),?) proof of /export/starexec/sandbox/benchmark/theBenchmark.trs # AProVE Commit ID: c69e44bd14796315568835c1ffa2502984884775 mhark 20210624 unpublished The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). (0) CpxRelTRS (1) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 9021 ms] (2) CpxRelTRS (3) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 3 ms] (4) TRS for Loop Detection (5) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] (6) BEST (7) proven lower bound (8) LowerBoundPropagationProof [FINISHED, 0 ms] (9) BOUNDS(n^1, INF) (10) TRS for Loop Detection ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: ISEMPTY(empty) -> c ISEMPTY(node(z0, z1, z2)) -> c1 LEFT(empty) -> c2 LEFT(node(z0, z1, z2)) -> c3 RIGHT(empty) -> c4 RIGHT(node(z0, z1, z2)) -> c5 ELEM(node(z0, z1, z2)) -> c6 APPEND(nil, z0) -> c7 APPEND(cons(y, z0), z1) -> c8(APPEND(z0, z1)) LISTIFY(z0, z1) -> c9(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ISEMPTY(z0)) LISTIFY(z0, z1) -> c10(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ISEMPTY(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c11(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), RIGHT(z0)) LISTIFY(z0, z1) -> c12(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), LEFT(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c13(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ELEM(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c14(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), RIGHT(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c15(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ELEM(z0)) LISTIFY(z0, z1) -> c16(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), RIGHT(z0)) LISTIFY(z0, z1) -> c17(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), APPEND(z1, z0)) IF(true, z0, z1, z2, z3, z4) -> c18 IF(false, false, z0, z1, z2, z3) -> c19(LISTIFY(z1, z2)) IF(false, true, z0, z1, z2, z3) -> c20(LISTIFY(z0, z3)) TOLIST(z0) -> c21(LISTIFY(z0, nil)) The (relative) TRS S consists of the following rules: isEmpty(empty) -> true isEmpty(node(z0, z1, z2)) -> false left(empty) -> empty left(node(z0, z1, z2)) -> z0 right(empty) -> empty right(node(z0, z1, z2)) -> z2 elem(node(z0, z1, z2)) -> z1 append(nil, z0) -> cons(z0, nil) append(cons(y, z0), z1) -> cons(y, append(z0, z1)) listify(z0, z1) -> if(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)) if(true, z0, z1, z2, z3, z4) -> z3 if(false, false, z0, z1, z2, z3) -> listify(z1, z2) if(false, true, z0, z1, z2, z3) -> listify(z0, z3) toList(z0) -> listify(z0, nil) Rewrite Strategy: INNERMOST ---------------------------------------- (1) SInnermostTerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved innermost termination of relative rules ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: ISEMPTY(empty) -> c ISEMPTY(node(z0, z1, z2)) -> c1 LEFT(empty) -> c2 LEFT(node(z0, z1, z2)) -> c3 RIGHT(empty) -> c4 RIGHT(node(z0, z1, z2)) -> c5 ELEM(node(z0, z1, z2)) -> c6 APPEND(nil, z0) -> c7 APPEND(cons(y, z0), z1) -> c8(APPEND(z0, z1)) LISTIFY(z0, z1) -> c9(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ISEMPTY(z0)) LISTIFY(z0, z1) -> c10(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ISEMPTY(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c11(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), RIGHT(z0)) LISTIFY(z0, z1) -> c12(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), LEFT(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c13(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ELEM(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c14(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), RIGHT(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c15(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ELEM(z0)) LISTIFY(z0, z1) -> c16(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), RIGHT(z0)) LISTIFY(z0, z1) -> c17(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), APPEND(z1, z0)) IF(true, z0, z1, z2, z3, z4) -> c18 IF(false, false, z0, z1, z2, z3) -> c19(LISTIFY(z1, z2)) IF(false, true, z0, z1, z2, z3) -> c20(LISTIFY(z0, z3)) TOLIST(z0) -> c21(LISTIFY(z0, nil)) The (relative) TRS S consists of the following rules: isEmpty(empty) -> true isEmpty(node(z0, z1, z2)) -> false left(empty) -> empty left(node(z0, z1, z2)) -> z0 right(empty) -> empty right(node(z0, z1, z2)) -> z2 elem(node(z0, z1, z2)) -> z1 append(nil, z0) -> cons(z0, nil) append(cons(y, z0), z1) -> cons(y, append(z0, z1)) listify(z0, z1) -> if(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)) if(true, z0, z1, z2, z3, z4) -> z3 if(false, false, z0, z1, z2, z3) -> listify(z1, z2) if(false, true, z0, z1, z2, z3) -> listify(z0, z3) toList(z0) -> listify(z0, nil) Rewrite Strategy: INNERMOST ---------------------------------------- (3) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (4) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: ISEMPTY(empty) -> c ISEMPTY(node(z0, z1, z2)) -> c1 LEFT(empty) -> c2 LEFT(node(z0, z1, z2)) -> c3 RIGHT(empty) -> c4 RIGHT(node(z0, z1, z2)) -> c5 ELEM(node(z0, z1, z2)) -> c6 APPEND(nil, z0) -> c7 APPEND(cons(y, z0), z1) -> c8(APPEND(z0, z1)) LISTIFY(z0, z1) -> c9(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ISEMPTY(z0)) LISTIFY(z0, z1) -> c10(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ISEMPTY(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c11(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), RIGHT(z0)) LISTIFY(z0, z1) -> c12(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), LEFT(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c13(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ELEM(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c14(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), RIGHT(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c15(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ELEM(z0)) LISTIFY(z0, z1) -> c16(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), RIGHT(z0)) LISTIFY(z0, z1) -> c17(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), APPEND(z1, z0)) IF(true, z0, z1, z2, z3, z4) -> c18 IF(false, false, z0, z1, z2, z3) -> c19(LISTIFY(z1, z2)) IF(false, true, z0, z1, z2, z3) -> c20(LISTIFY(z0, z3)) TOLIST(z0) -> c21(LISTIFY(z0, nil)) The (relative) TRS S consists of the following rules: isEmpty(empty) -> true isEmpty(node(z0, z1, z2)) -> false left(empty) -> empty left(node(z0, z1, z2)) -> z0 right(empty) -> empty right(node(z0, z1, z2)) -> z2 elem(node(z0, z1, z2)) -> z1 append(nil, z0) -> cons(z0, nil) append(cons(y, z0), z1) -> cons(y, append(z0, z1)) listify(z0, z1) -> if(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)) if(true, z0, z1, z2, z3, z4) -> z3 if(false, false, z0, z1, z2, z3) -> listify(z1, z2) if(false, true, z0, z1, z2, z3) -> listify(z0, z3) toList(z0) -> listify(z0, nil) Rewrite Strategy: INNERMOST ---------------------------------------- (5) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence APPEND(cons(y, z0), z1) ->^+ c8(APPEND(z0, z1)) gives rise to a decreasing loop by considering the right hand sides subterm at position [0]. The pumping substitution is [z0 / cons(y, z0)]. The result substitution is [ ]. ---------------------------------------- (6) Complex Obligation (BEST) ---------------------------------------- (7) Obligation: Proved the lower bound n^1 for the following obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: ISEMPTY(empty) -> c ISEMPTY(node(z0, z1, z2)) -> c1 LEFT(empty) -> c2 LEFT(node(z0, z1, z2)) -> c3 RIGHT(empty) -> c4 RIGHT(node(z0, z1, z2)) -> c5 ELEM(node(z0, z1, z2)) -> c6 APPEND(nil, z0) -> c7 APPEND(cons(y, z0), z1) -> c8(APPEND(z0, z1)) LISTIFY(z0, z1) -> c9(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ISEMPTY(z0)) LISTIFY(z0, z1) -> c10(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ISEMPTY(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c11(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), RIGHT(z0)) LISTIFY(z0, z1) -> c12(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), LEFT(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c13(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ELEM(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c14(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), RIGHT(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c15(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ELEM(z0)) LISTIFY(z0, z1) -> c16(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), RIGHT(z0)) LISTIFY(z0, z1) -> c17(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), APPEND(z1, z0)) IF(true, z0, z1, z2, z3, z4) -> c18 IF(false, false, z0, z1, z2, z3) -> c19(LISTIFY(z1, z2)) IF(false, true, z0, z1, z2, z3) -> c20(LISTIFY(z0, z3)) TOLIST(z0) -> c21(LISTIFY(z0, nil)) The (relative) TRS S consists of the following rules: isEmpty(empty) -> true isEmpty(node(z0, z1, z2)) -> false left(empty) -> empty left(node(z0, z1, z2)) -> z0 right(empty) -> empty right(node(z0, z1, z2)) -> z2 elem(node(z0, z1, z2)) -> z1 append(nil, z0) -> cons(z0, nil) append(cons(y, z0), z1) -> cons(y, append(z0, z1)) listify(z0, z1) -> if(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)) if(true, z0, z1, z2, z3, z4) -> z3 if(false, false, z0, z1, z2, z3) -> listify(z1, z2) if(false, true, z0, z1, z2, z3) -> listify(z0, z3) toList(z0) -> listify(z0, nil) Rewrite Strategy: INNERMOST ---------------------------------------- (8) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (9) BOUNDS(n^1, INF) ---------------------------------------- (10) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: ISEMPTY(empty) -> c ISEMPTY(node(z0, z1, z2)) -> c1 LEFT(empty) -> c2 LEFT(node(z0, z1, z2)) -> c3 RIGHT(empty) -> c4 RIGHT(node(z0, z1, z2)) -> c5 ELEM(node(z0, z1, z2)) -> c6 APPEND(nil, z0) -> c7 APPEND(cons(y, z0), z1) -> c8(APPEND(z0, z1)) LISTIFY(z0, z1) -> c9(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ISEMPTY(z0)) LISTIFY(z0, z1) -> c10(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ISEMPTY(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c11(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), RIGHT(z0)) LISTIFY(z0, z1) -> c12(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), LEFT(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c13(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ELEM(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c14(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), RIGHT(left(z0)), LEFT(z0)) LISTIFY(z0, z1) -> c15(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), ELEM(z0)) LISTIFY(z0, z1) -> c16(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), RIGHT(z0)) LISTIFY(z0, z1) -> c17(IF(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)), APPEND(z1, z0)) IF(true, z0, z1, z2, z3, z4) -> c18 IF(false, false, z0, z1, z2, z3) -> c19(LISTIFY(z1, z2)) IF(false, true, z0, z1, z2, z3) -> c20(LISTIFY(z0, z3)) TOLIST(z0) -> c21(LISTIFY(z0, nil)) The (relative) TRS S consists of the following rules: isEmpty(empty) -> true isEmpty(node(z0, z1, z2)) -> false left(empty) -> empty left(node(z0, z1, z2)) -> z0 right(empty) -> empty right(node(z0, z1, z2)) -> z2 elem(node(z0, z1, z2)) -> z1 append(nil, z0) -> cons(z0, nil) append(cons(y, z0), z1) -> cons(y, append(z0, z1)) listify(z0, z1) -> if(isEmpty(z0), isEmpty(left(z0)), right(z0), node(left(left(z0)), elem(left(z0)), node(right(left(z0)), elem(z0), right(z0))), z1, append(z1, z0)) if(true, z0, z1, z2, z3, z4) -> z3 if(false, false, z0, z1, z2, z3) -> listify(z1, z2) if(false, true, z0, z1, z2, z3) -> listify(z0, z3) toList(z0) -> listify(z0, nil) Rewrite Strategy: INNERMOST