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), 1276 ms] (2) CpxRelTRS (3) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (4) TRS for Loop Detection (5) DecreasingLoopProof [LOWER BOUND(ID), 2 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: MIN(0, z0) -> c MIN(s(z0), 0) -> c1 MIN(s(z0), s(z1)) -> c2(MIN(z0, z1)) LEN(nil) -> c3 LEN(cons(z0, z1)) -> c4(LEN(z1)) SUM(z0, 0) -> c5 SUM(z0, s(z1)) -> c6(SUM(z0, z1)) LE(0, z0) -> c7 LE(s(z0), 0) -> c8 LE(s(z0), s(z1)) -> c9(LE(z0, z1)) TAKE(0, cons(z0, z1)) -> c10 TAKE(s(z0), cons(z1, z2)) -> c11(TAKE(z0, z2)) ADDLIST(z0, z1) -> c12(IF(le(0, min(len(z0), len(z1))), 0, z0, z1, nil), LE(0, min(len(z0), len(z1))), MIN(len(z0), len(z1)), LEN(z0)) ADDLIST(z0, z1) -> c13(IF(le(0, min(len(z0), len(z1))), 0, z0, z1, nil), LE(0, min(len(z0), len(z1))), MIN(len(z0), len(z1)), LEN(z1)) IF(false, z0, z1, z2, z3) -> c14 IF(true, z0, z1, z2, z3) -> c15(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), LE(s(z0), min(len(z1), len(z2))), MIN(len(z1), len(z2)), LEN(z1)) IF(true, z0, z1, z2, z3) -> c16(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), LE(s(z0), min(len(z1), len(z2))), MIN(len(z1), len(z2)), LEN(z2)) IF(true, z0, z1, z2, z3) -> c17(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), SUM(take(z0, z1), take(z0, z2)), TAKE(z0, z1)) IF(true, z0, z1, z2, z3) -> c18(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), SUM(take(z0, z1), take(z0, z2)), TAKE(z0, z2)) The (relative) TRS S consists of the following rules: min(0, z0) -> 0 min(s(z0), 0) -> 0 min(s(z0), s(z1)) -> min(z0, z1) len(nil) -> 0 len(cons(z0, z1)) -> s(len(z1)) sum(z0, 0) -> z0 sum(z0, s(z1)) -> s(sum(z0, z1)) le(0, z0) -> true le(s(z0), 0) -> false le(s(z0), s(z1)) -> le(z0, z1) take(0, cons(z0, z1)) -> z0 take(s(z0), cons(z1, z2)) -> take(z0, z2) addList(z0, z1) -> if(le(0, min(len(z0), len(z1))), 0, z0, z1, nil) if(false, z0, z1, z2, z3) -> z3 if(true, z0, z1, z2, z3) -> if(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)) 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: MIN(0, z0) -> c MIN(s(z0), 0) -> c1 MIN(s(z0), s(z1)) -> c2(MIN(z0, z1)) LEN(nil) -> c3 LEN(cons(z0, z1)) -> c4(LEN(z1)) SUM(z0, 0) -> c5 SUM(z0, s(z1)) -> c6(SUM(z0, z1)) LE(0, z0) -> c7 LE(s(z0), 0) -> c8 LE(s(z0), s(z1)) -> c9(LE(z0, z1)) TAKE(0, cons(z0, z1)) -> c10 TAKE(s(z0), cons(z1, z2)) -> c11(TAKE(z0, z2)) ADDLIST(z0, z1) -> c12(IF(le(0, min(len(z0), len(z1))), 0, z0, z1, nil), LE(0, min(len(z0), len(z1))), MIN(len(z0), len(z1)), LEN(z0)) ADDLIST(z0, z1) -> c13(IF(le(0, min(len(z0), len(z1))), 0, z0, z1, nil), LE(0, min(len(z0), len(z1))), MIN(len(z0), len(z1)), LEN(z1)) IF(false, z0, z1, z2, z3) -> c14 IF(true, z0, z1, z2, z3) -> c15(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), LE(s(z0), min(len(z1), len(z2))), MIN(len(z1), len(z2)), LEN(z1)) IF(true, z0, z1, z2, z3) -> c16(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), LE(s(z0), min(len(z1), len(z2))), MIN(len(z1), len(z2)), LEN(z2)) IF(true, z0, z1, z2, z3) -> c17(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), SUM(take(z0, z1), take(z0, z2)), TAKE(z0, z1)) IF(true, z0, z1, z2, z3) -> c18(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), SUM(take(z0, z1), take(z0, z2)), TAKE(z0, z2)) The (relative) TRS S consists of the following rules: min(0, z0) -> 0 min(s(z0), 0) -> 0 min(s(z0), s(z1)) -> min(z0, z1) len(nil) -> 0 len(cons(z0, z1)) -> s(len(z1)) sum(z0, 0) -> z0 sum(z0, s(z1)) -> s(sum(z0, z1)) le(0, z0) -> true le(s(z0), 0) -> false le(s(z0), s(z1)) -> le(z0, z1) take(0, cons(z0, z1)) -> z0 take(s(z0), cons(z1, z2)) -> take(z0, z2) addList(z0, z1) -> if(le(0, min(len(z0), len(z1))), 0, z0, z1, nil) if(false, z0, z1, z2, z3) -> z3 if(true, z0, z1, z2, z3) -> if(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)) 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: MIN(0, z0) -> c MIN(s(z0), 0) -> c1 MIN(s(z0), s(z1)) -> c2(MIN(z0, z1)) LEN(nil) -> c3 LEN(cons(z0, z1)) -> c4(LEN(z1)) SUM(z0, 0) -> c5 SUM(z0, s(z1)) -> c6(SUM(z0, z1)) LE(0, z0) -> c7 LE(s(z0), 0) -> c8 LE(s(z0), s(z1)) -> c9(LE(z0, z1)) TAKE(0, cons(z0, z1)) -> c10 TAKE(s(z0), cons(z1, z2)) -> c11(TAKE(z0, z2)) ADDLIST(z0, z1) -> c12(IF(le(0, min(len(z0), len(z1))), 0, z0, z1, nil), LE(0, min(len(z0), len(z1))), MIN(len(z0), len(z1)), LEN(z0)) ADDLIST(z0, z1) -> c13(IF(le(0, min(len(z0), len(z1))), 0, z0, z1, nil), LE(0, min(len(z0), len(z1))), MIN(len(z0), len(z1)), LEN(z1)) IF(false, z0, z1, z2, z3) -> c14 IF(true, z0, z1, z2, z3) -> c15(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), LE(s(z0), min(len(z1), len(z2))), MIN(len(z1), len(z2)), LEN(z1)) IF(true, z0, z1, z2, z3) -> c16(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), LE(s(z0), min(len(z1), len(z2))), MIN(len(z1), len(z2)), LEN(z2)) IF(true, z0, z1, z2, z3) -> c17(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), SUM(take(z0, z1), take(z0, z2)), TAKE(z0, z1)) IF(true, z0, z1, z2, z3) -> c18(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), SUM(take(z0, z1), take(z0, z2)), TAKE(z0, z2)) The (relative) TRS S consists of the following rules: min(0, z0) -> 0 min(s(z0), 0) -> 0 min(s(z0), s(z1)) -> min(z0, z1) len(nil) -> 0 len(cons(z0, z1)) -> s(len(z1)) sum(z0, 0) -> z0 sum(z0, s(z1)) -> s(sum(z0, z1)) le(0, z0) -> true le(s(z0), 0) -> false le(s(z0), s(z1)) -> le(z0, z1) take(0, cons(z0, z1)) -> z0 take(s(z0), cons(z1, z2)) -> take(z0, z2) addList(z0, z1) -> if(le(0, min(len(z0), len(z1))), 0, z0, z1, nil) if(false, z0, z1, z2, z3) -> z3 if(true, z0, z1, z2, z3) -> if(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)) 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 SUM(z0, s(z1)) ->^+ c6(SUM(z0, z1)) gives rise to a decreasing loop by considering the right hand sides subterm at position [0]. The pumping substitution is [z1 / s(z1)]. 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: MIN(0, z0) -> c MIN(s(z0), 0) -> c1 MIN(s(z0), s(z1)) -> c2(MIN(z0, z1)) LEN(nil) -> c3 LEN(cons(z0, z1)) -> c4(LEN(z1)) SUM(z0, 0) -> c5 SUM(z0, s(z1)) -> c6(SUM(z0, z1)) LE(0, z0) -> c7 LE(s(z0), 0) -> c8 LE(s(z0), s(z1)) -> c9(LE(z0, z1)) TAKE(0, cons(z0, z1)) -> c10 TAKE(s(z0), cons(z1, z2)) -> c11(TAKE(z0, z2)) ADDLIST(z0, z1) -> c12(IF(le(0, min(len(z0), len(z1))), 0, z0, z1, nil), LE(0, min(len(z0), len(z1))), MIN(len(z0), len(z1)), LEN(z0)) ADDLIST(z0, z1) -> c13(IF(le(0, min(len(z0), len(z1))), 0, z0, z1, nil), LE(0, min(len(z0), len(z1))), MIN(len(z0), len(z1)), LEN(z1)) IF(false, z0, z1, z2, z3) -> c14 IF(true, z0, z1, z2, z3) -> c15(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), LE(s(z0), min(len(z1), len(z2))), MIN(len(z1), len(z2)), LEN(z1)) IF(true, z0, z1, z2, z3) -> c16(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), LE(s(z0), min(len(z1), len(z2))), MIN(len(z1), len(z2)), LEN(z2)) IF(true, z0, z1, z2, z3) -> c17(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), SUM(take(z0, z1), take(z0, z2)), TAKE(z0, z1)) IF(true, z0, z1, z2, z3) -> c18(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), SUM(take(z0, z1), take(z0, z2)), TAKE(z0, z2)) The (relative) TRS S consists of the following rules: min(0, z0) -> 0 min(s(z0), 0) -> 0 min(s(z0), s(z1)) -> min(z0, z1) len(nil) -> 0 len(cons(z0, z1)) -> s(len(z1)) sum(z0, 0) -> z0 sum(z0, s(z1)) -> s(sum(z0, z1)) le(0, z0) -> true le(s(z0), 0) -> false le(s(z0), s(z1)) -> le(z0, z1) take(0, cons(z0, z1)) -> z0 take(s(z0), cons(z1, z2)) -> take(z0, z2) addList(z0, z1) -> if(le(0, min(len(z0), len(z1))), 0, z0, z1, nil) if(false, z0, z1, z2, z3) -> z3 if(true, z0, z1, z2, z3) -> if(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)) 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: MIN(0, z0) -> c MIN(s(z0), 0) -> c1 MIN(s(z0), s(z1)) -> c2(MIN(z0, z1)) LEN(nil) -> c3 LEN(cons(z0, z1)) -> c4(LEN(z1)) SUM(z0, 0) -> c5 SUM(z0, s(z1)) -> c6(SUM(z0, z1)) LE(0, z0) -> c7 LE(s(z0), 0) -> c8 LE(s(z0), s(z1)) -> c9(LE(z0, z1)) TAKE(0, cons(z0, z1)) -> c10 TAKE(s(z0), cons(z1, z2)) -> c11(TAKE(z0, z2)) ADDLIST(z0, z1) -> c12(IF(le(0, min(len(z0), len(z1))), 0, z0, z1, nil), LE(0, min(len(z0), len(z1))), MIN(len(z0), len(z1)), LEN(z0)) ADDLIST(z0, z1) -> c13(IF(le(0, min(len(z0), len(z1))), 0, z0, z1, nil), LE(0, min(len(z0), len(z1))), MIN(len(z0), len(z1)), LEN(z1)) IF(false, z0, z1, z2, z3) -> c14 IF(true, z0, z1, z2, z3) -> c15(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), LE(s(z0), min(len(z1), len(z2))), MIN(len(z1), len(z2)), LEN(z1)) IF(true, z0, z1, z2, z3) -> c16(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), LE(s(z0), min(len(z1), len(z2))), MIN(len(z1), len(z2)), LEN(z2)) IF(true, z0, z1, z2, z3) -> c17(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), SUM(take(z0, z1), take(z0, z2)), TAKE(z0, z1)) IF(true, z0, z1, z2, z3) -> c18(IF(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)), SUM(take(z0, z1), take(z0, z2)), TAKE(z0, z2)) The (relative) TRS S consists of the following rules: min(0, z0) -> 0 min(s(z0), 0) -> 0 min(s(z0), s(z1)) -> min(z0, z1) len(nil) -> 0 len(cons(z0, z1)) -> s(len(z1)) sum(z0, 0) -> z0 sum(z0, s(z1)) -> s(sum(z0, z1)) le(0, z0) -> true le(s(z0), 0) -> false le(s(z0), s(z1)) -> le(z0, z1) take(0, cons(z0, z1)) -> z0 take(s(z0), cons(z1, z2)) -> take(z0, z2) addList(z0, z1) -> if(le(0, min(len(z0), len(z1))), 0, z0, z1, nil) if(false, z0, z1, z2, z3) -> z3 if(true, z0, z1, z2, z3) -> if(le(s(z0), min(len(z1), len(z2))), s(z0), z1, z2, cons(sum(take(z0, z1), take(z0, z2)), z3)) Rewrite Strategy: INNERMOST