WORST_CASE(Omega(n^1), O(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, n^1). (0) CpxTRS (1) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxTRS (3) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (4) CdtProblem (5) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CdtProblem (9) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 18 ms] (10) CdtProblem (11) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] (12) BOUNDS(1, 1) (13) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (14) TRS for Loop Detection (15) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] (16) BEST (17) proven lower bound (18) LowerBoundPropagationProof [FINISHED, 0 ms] (19) BOUNDS(n^1, INF) (20) TRS for Loop Detection ---------------------------------------- (0) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: is_empty(nil) -> true is_empty(cons(x, l)) -> false hd(cons(x, l)) -> x tl(cons(x, l)) -> l append(l1, l2) -> ifappend(l1, l2, l1) ifappend(l1, l2, nil) -> l2 ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. As the TRS does not nest defined symbols, we have rc = irc. ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: is_empty(nil) -> true is_empty(cons(x, l)) -> false hd(cons(x, l)) -> x tl(cons(x, l)) -> l append(l1, l2) -> ifappend(l1, l2, l1) ifappend(l1, l2, nil) -> l2 ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (3) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, z0) ifappend(z0, z1, nil) -> z1 ifappend(z0, z1, cons(z2, z3)) -> cons(z2, append(z3, z1)) Tuples: IS_EMPTY(nil) -> c IS_EMPTY(cons(z0, z1)) -> c1 HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, nil) -> c5 IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) S tuples: IS_EMPTY(nil) -> c IS_EMPTY(cons(z0, z1)) -> c1 HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, nil) -> c5 IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) K tuples:none Defined Rule Symbols: is_empty_1, hd_1, tl_1, append_2, ifappend_3 Defined Pair Symbols: IS_EMPTY_1, HD_1, TL_1, APPEND_2, IFAPPEND_3 Compound Symbols: c, c1, c2, c3, c4_1, c5, c6_1 ---------------------------------------- (5) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 5 trailing nodes: IS_EMPTY(cons(z0, z1)) -> c1 IFAPPEND(z0, z1, nil) -> c5 TL(cons(z0, z1)) -> c3 HD(cons(z0, z1)) -> c2 IS_EMPTY(nil) -> c ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, z0) ifappend(z0, z1, nil) -> z1 ifappend(z0, z1, cons(z2, z3)) -> cons(z2, append(z3, z1)) Tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) S tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) K tuples:none Defined Rule Symbols: is_empty_1, hd_1, tl_1, append_2, ifappend_3 Defined Pair Symbols: APPEND_2, IFAPPEND_3 Compound Symbols: c4_1, c6_1 ---------------------------------------- (7) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, z0) ifappend(z0, z1, nil) -> z1 ifappend(z0, z1, cons(z2, z3)) -> cons(z2, append(z3, z1)) ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) S tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: APPEND_2, IFAPPEND_3 Compound Symbols: c4_1, c6_1 ---------------------------------------- (9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) We considered the (Usable) Rules:none And the Tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) The order we found is given by the following interpretation: Polynomial interpretation : POL(APPEND(x_1, x_2)) = [3] + [2]x_1 POL(IFAPPEND(x_1, x_2, x_3)) = [2]x_3 POL(c4(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(cons(x_1, x_2)) = [3] + x_2 ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) S tuples:none K tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) Defined Rule Symbols:none Defined Pair Symbols: APPEND_2, IFAPPEND_3 Compound Symbols: c4_1, c6_1 ---------------------------------------- (11) SIsEmptyProof (BOTH BOUNDS(ID, ID)) The set S is empty ---------------------------------------- (12) BOUNDS(1, 1) ---------------------------------------- (13) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (14) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: is_empty(nil) -> true is_empty(cons(x, l)) -> false hd(cons(x, l)) -> x tl(cons(x, l)) -> l append(l1, l2) -> ifappend(l1, l2, l1) ifappend(l1, l2, nil) -> l2 ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (15) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence append(cons(x3_0, l4_0), l2) ->^+ cons(x3_0, append(l4_0, l2)) gives rise to a decreasing loop by considering the right hand sides subterm at position [1]. The pumping substitution is [l4_0 / cons(x3_0, l4_0)]. The result substitution is [ ]. ---------------------------------------- (16) Complex Obligation (BEST) ---------------------------------------- (17) Obligation: Proved the lower bound n^1 for the following obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: is_empty(nil) -> true is_empty(cons(x, l)) -> false hd(cons(x, l)) -> x tl(cons(x, l)) -> l append(l1, l2) -> ifappend(l1, l2, l1) ifappend(l1, l2, nil) -> l2 ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (18) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (19) BOUNDS(n^1, INF) ---------------------------------------- (20) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: is_empty(nil) -> true is_empty(cons(x, l)) -> false hd(cons(x, l)) -> x tl(cons(x, l)) -> l append(l1, l2) -> ifappend(l1, l2, l1) ifappend(l1, l2, nil) -> l2 ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) S is empty. Rewrite Strategy: FULL