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), 875 ms] (2) CpxRelTRS (3) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 1 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: MERGESORT(Cons(z0, Cons(z1, z2))) -> c5(SPLITMERGE(Cons(z0, Cons(z1, z2)), Nil, Nil)) MERGESORT(Cons(z0, Nil)) -> c6 MERGESORT(Nil) -> c7 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c8(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Cons(z0, z1), Nil) -> c9 MERGE(Nil, z0) -> c10 SPLITMERGE(Cons(z0, z1), z2, z3) -> c11(SPLITMERGE(z1, Cons(z0, z3), z2)) SPLITMERGE(Nil, z0, z1) -> c12(MERGE(mergesort(z0), mergesort(z1)), MERGESORT(z0)) SPLITMERGE(Nil, z0, z1) -> c13(MERGE(mergesort(z0), mergesort(z1)), MERGESORT(z1)) NOTEMPTY(Cons(z0, z1)) -> c14 NOTEMPTY(Nil) -> c15 GOAL(z0) -> c16(MERGESORT(z0)) The (relative) TRS S consists of the following rules: <='(S(z0), S(z1)) -> c(<='(z0, z1)) <='(0, z0) -> c1 <='(S(z0), 0) -> c2 MERGE[ITE](False, z0, Cons(z1, z2)) -> c3(MERGE(z0, z2)) MERGE[ITE](True, Cons(z0, z1), z2) -> c4(MERGE(z1, z2)) <=(S(z0), S(z1)) -> <=(z0, z1) <=(0, z0) -> True <=(S(z0), 0) -> False merge[Ite](False, z0, Cons(z1, z2)) -> Cons(z1, merge(z0, z2)) merge[Ite](True, Cons(z0, z1), z2) -> Cons(z0, merge(z1, z2)) mergesort(Cons(z0, Cons(z1, z2))) -> splitmerge(Cons(z0, Cons(z1, z2)), Nil, Nil) mergesort(Cons(z0, Nil)) -> Cons(z0, Nil) mergesort(Nil) -> Nil merge(Cons(z0, z1), Cons(z2, z3)) -> merge[Ite](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)) merge(Cons(z0, z1), Nil) -> Cons(z0, z1) merge(Nil, z0) -> z0 splitmerge(Cons(z0, z1), z2, z3) -> splitmerge(z1, Cons(z0, z3), z2) splitmerge(Nil, z0, z1) -> merge(mergesort(z0), mergesort(z1)) notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> mergesort(z0) 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: MERGESORT(Cons(z0, Cons(z1, z2))) -> c5(SPLITMERGE(Cons(z0, Cons(z1, z2)), Nil, Nil)) MERGESORT(Cons(z0, Nil)) -> c6 MERGESORT(Nil) -> c7 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c8(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Cons(z0, z1), Nil) -> c9 MERGE(Nil, z0) -> c10 SPLITMERGE(Cons(z0, z1), z2, z3) -> c11(SPLITMERGE(z1, Cons(z0, z3), z2)) SPLITMERGE(Nil, z0, z1) -> c12(MERGE(mergesort(z0), mergesort(z1)), MERGESORT(z0)) SPLITMERGE(Nil, z0, z1) -> c13(MERGE(mergesort(z0), mergesort(z1)), MERGESORT(z1)) NOTEMPTY(Cons(z0, z1)) -> c14 NOTEMPTY(Nil) -> c15 GOAL(z0) -> c16(MERGESORT(z0)) The (relative) TRS S consists of the following rules: <='(S(z0), S(z1)) -> c(<='(z0, z1)) <='(0, z0) -> c1 <='(S(z0), 0) -> c2 MERGE[ITE](False, z0, Cons(z1, z2)) -> c3(MERGE(z0, z2)) MERGE[ITE](True, Cons(z0, z1), z2) -> c4(MERGE(z1, z2)) <=(S(z0), S(z1)) -> <=(z0, z1) <=(0, z0) -> True <=(S(z0), 0) -> False merge[Ite](False, z0, Cons(z1, z2)) -> Cons(z1, merge(z0, z2)) merge[Ite](True, Cons(z0, z1), z2) -> Cons(z0, merge(z1, z2)) mergesort(Cons(z0, Cons(z1, z2))) -> splitmerge(Cons(z0, Cons(z1, z2)), Nil, Nil) mergesort(Cons(z0, Nil)) -> Cons(z0, Nil) mergesort(Nil) -> Nil merge(Cons(z0, z1), Cons(z2, z3)) -> merge[Ite](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)) merge(Cons(z0, z1), Nil) -> Cons(z0, z1) merge(Nil, z0) -> z0 splitmerge(Cons(z0, z1), z2, z3) -> splitmerge(z1, Cons(z0, z3), z2) splitmerge(Nil, z0, z1) -> merge(mergesort(z0), mergesort(z1)) notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> mergesort(z0) 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: MERGESORT(Cons(z0, Cons(z1, z2))) -> c5(SPLITMERGE(Cons(z0, Cons(z1, z2)), Nil, Nil)) MERGESORT(Cons(z0, Nil)) -> c6 MERGESORT(Nil) -> c7 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c8(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Cons(z0, z1), Nil) -> c9 MERGE(Nil, z0) -> c10 SPLITMERGE(Cons(z0, z1), z2, z3) -> c11(SPLITMERGE(z1, Cons(z0, z3), z2)) SPLITMERGE(Nil, z0, z1) -> c12(MERGE(mergesort(z0), mergesort(z1)), MERGESORT(z0)) SPLITMERGE(Nil, z0, z1) -> c13(MERGE(mergesort(z0), mergesort(z1)), MERGESORT(z1)) NOTEMPTY(Cons(z0, z1)) -> c14 NOTEMPTY(Nil) -> c15 GOAL(z0) -> c16(MERGESORT(z0)) The (relative) TRS S consists of the following rules: <='(S(z0), S(z1)) -> c(<='(z0, z1)) <='(0, z0) -> c1 <='(S(z0), 0) -> c2 MERGE[ITE](False, z0, Cons(z1, z2)) -> c3(MERGE(z0, z2)) MERGE[ITE](True, Cons(z0, z1), z2) -> c4(MERGE(z1, z2)) <=(S(z0), S(z1)) -> <=(z0, z1) <=(0, z0) -> True <=(S(z0), 0) -> False merge[Ite](False, z0, Cons(z1, z2)) -> Cons(z1, merge(z0, z2)) merge[Ite](True, Cons(z0, z1), z2) -> Cons(z0, merge(z1, z2)) mergesort(Cons(z0, Cons(z1, z2))) -> splitmerge(Cons(z0, Cons(z1, z2)), Nil, Nil) mergesort(Cons(z0, Nil)) -> Cons(z0, Nil) mergesort(Nil) -> Nil merge(Cons(z0, z1), Cons(z2, z3)) -> merge[Ite](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)) merge(Cons(z0, z1), Nil) -> Cons(z0, z1) merge(Nil, z0) -> z0 splitmerge(Cons(z0, z1), z2, z3) -> splitmerge(z1, Cons(z0, z3), z2) splitmerge(Nil, z0, z1) -> merge(mergesort(z0), mergesort(z1)) notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> mergesort(z0) 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 SPLITMERGE(Cons(z0, z1), z2, z3) ->^+ c11(SPLITMERGE(z1, Cons(z0, z3), z2)) gives rise to a decreasing loop by considering the right hand sides subterm at position [0]. The pumping substitution is [z1 / Cons(z0, z1)]. The result substitution is [z2 / Cons(z0, z3), z3 / z2]. ---------------------------------------- (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: MERGESORT(Cons(z0, Cons(z1, z2))) -> c5(SPLITMERGE(Cons(z0, Cons(z1, z2)), Nil, Nil)) MERGESORT(Cons(z0, Nil)) -> c6 MERGESORT(Nil) -> c7 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c8(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Cons(z0, z1), Nil) -> c9 MERGE(Nil, z0) -> c10 SPLITMERGE(Cons(z0, z1), z2, z3) -> c11(SPLITMERGE(z1, Cons(z0, z3), z2)) SPLITMERGE(Nil, z0, z1) -> c12(MERGE(mergesort(z0), mergesort(z1)), MERGESORT(z0)) SPLITMERGE(Nil, z0, z1) -> c13(MERGE(mergesort(z0), mergesort(z1)), MERGESORT(z1)) NOTEMPTY(Cons(z0, z1)) -> c14 NOTEMPTY(Nil) -> c15 GOAL(z0) -> c16(MERGESORT(z0)) The (relative) TRS S consists of the following rules: <='(S(z0), S(z1)) -> c(<='(z0, z1)) <='(0, z0) -> c1 <='(S(z0), 0) -> c2 MERGE[ITE](False, z0, Cons(z1, z2)) -> c3(MERGE(z0, z2)) MERGE[ITE](True, Cons(z0, z1), z2) -> c4(MERGE(z1, z2)) <=(S(z0), S(z1)) -> <=(z0, z1) <=(0, z0) -> True <=(S(z0), 0) -> False merge[Ite](False, z0, Cons(z1, z2)) -> Cons(z1, merge(z0, z2)) merge[Ite](True, Cons(z0, z1), z2) -> Cons(z0, merge(z1, z2)) mergesort(Cons(z0, Cons(z1, z2))) -> splitmerge(Cons(z0, Cons(z1, z2)), Nil, Nil) mergesort(Cons(z0, Nil)) -> Cons(z0, Nil) mergesort(Nil) -> Nil merge(Cons(z0, z1), Cons(z2, z3)) -> merge[Ite](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)) merge(Cons(z0, z1), Nil) -> Cons(z0, z1) merge(Nil, z0) -> z0 splitmerge(Cons(z0, z1), z2, z3) -> splitmerge(z1, Cons(z0, z3), z2) splitmerge(Nil, z0, z1) -> merge(mergesort(z0), mergesort(z1)) notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> mergesort(z0) 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: MERGESORT(Cons(z0, Cons(z1, z2))) -> c5(SPLITMERGE(Cons(z0, Cons(z1, z2)), Nil, Nil)) MERGESORT(Cons(z0, Nil)) -> c6 MERGESORT(Nil) -> c7 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c8(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Cons(z0, z1), Nil) -> c9 MERGE(Nil, z0) -> c10 SPLITMERGE(Cons(z0, z1), z2, z3) -> c11(SPLITMERGE(z1, Cons(z0, z3), z2)) SPLITMERGE(Nil, z0, z1) -> c12(MERGE(mergesort(z0), mergesort(z1)), MERGESORT(z0)) SPLITMERGE(Nil, z0, z1) -> c13(MERGE(mergesort(z0), mergesort(z1)), MERGESORT(z1)) NOTEMPTY(Cons(z0, z1)) -> c14 NOTEMPTY(Nil) -> c15 GOAL(z0) -> c16(MERGESORT(z0)) The (relative) TRS S consists of the following rules: <='(S(z0), S(z1)) -> c(<='(z0, z1)) <='(0, z0) -> c1 <='(S(z0), 0) -> c2 MERGE[ITE](False, z0, Cons(z1, z2)) -> c3(MERGE(z0, z2)) MERGE[ITE](True, Cons(z0, z1), z2) -> c4(MERGE(z1, z2)) <=(S(z0), S(z1)) -> <=(z0, z1) <=(0, z0) -> True <=(S(z0), 0) -> False merge[Ite](False, z0, Cons(z1, z2)) -> Cons(z1, merge(z0, z2)) merge[Ite](True, Cons(z0, z1), z2) -> Cons(z0, merge(z1, z2)) mergesort(Cons(z0, Cons(z1, z2))) -> splitmerge(Cons(z0, Cons(z1, z2)), Nil, Nil) mergesort(Cons(z0, Nil)) -> Cons(z0, Nil) mergesort(Nil) -> Nil merge(Cons(z0, z1), Cons(z2, z3)) -> merge[Ite](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)) merge(Cons(z0, z1), Nil) -> Cons(z0, z1) merge(Nil, z0) -> z0 splitmerge(Cons(z0, z1), z2, z3) -> splitmerge(z1, Cons(z0, z3), z2) splitmerge(Nil, z0, z1) -> merge(mergesort(z0), mergesort(z1)) notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> mergesort(z0) Rewrite Strategy: INNERMOST