WORST_CASE(Omega(n^1),O(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, n^1). (0) CpxRelTRS (1) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 342 ms] (2) CpxRelTRS (3) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (4) CdtProblem (5) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (6) CdtProblem (7) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CdtProblem (9) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CdtProblem (11) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 27 ms] (12) CdtProblem (13) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] (14) BOUNDS(1, 1) (15) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (16) TRS for Loop Detection (17) DecreasingLoopProof [LOWER BOUND(ID), 2 ms] (18) BEST (19) proven lower bound (20) LowerBoundPropagationProof [FINISHED, 0 ms] (21) BOUNDS(n^1, INF) (22) TRS for Loop Detection ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0)) -> c7 OP(S(0), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) The (relative) TRS S consists of the following rules: foldl(z0, Cons(S(0), z1)) -> foldl(S(z0), z1) foldl(S(0), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0)) -> S(z0) op(S(0), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), 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, n^1). The TRS R consists of the following rules: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0)) -> c7 OP(S(0), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) The (relative) TRS S consists of the following rules: foldl(z0, Cons(S(0), z1)) -> foldl(S(z0), z1) foldl(S(0), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0)) -> S(z0) op(S(0), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) Rewrite Strategy: INNERMOST ---------------------------------------- (3) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: foldl(z0, Cons(S(0), z1)) -> foldl(S(z0), z1) foldl(S(0), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0)) -> S(z0) op(S(0), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0)) -> c7 OP(S(0), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) Tuples: FOLDL'(z0, Cons(S(0), z1)) -> c11(FOLDL'(S(z0), z1)) FOLDL'(S(0), Cons(z0, z1)) -> c12(FOLDL'(S(z0), z1)) FOLDL'(z0, Nil) -> c13 FOLDR'(z0, Cons(z1, z2)) -> c14(OP'(z1, foldr(z0, z2)), FOLDR'(z0, z2)) FOLDR'(z0, Nil) -> c15 NOTEMPTY'(Cons(z0, z1)) -> c16 NOTEMPTY'(Nil) -> c17 OP'(z0, S(0)) -> c18 OP'(S(0), z0) -> c19 FOLD'(z0, z1) -> c20(FOLDL'(z0, z1), FOLDR'(z0, z1)) FOLDL''(z0, Cons(S(0), z1)) -> c21(FOLDL''(S(z0), z1)) FOLDL''(S(0), Cons(z0, z1)) -> c22(FOLDL''(S(z0), z1)) FOLDL''(z0, Nil) -> c23 FOLDR''(z0, Cons(z1, z2)) -> c24(OP''(z1, foldr(z0, z2)), FOLDR'(z0, z2), FOLDR''(z0, z2)) FOLDR''(z0, Nil) -> c25 NOTEMPTY''(Cons(z0, z1)) -> c26 NOTEMPTY''(Nil) -> c27 OP''(z0, S(0)) -> c28 OP''(S(0), z0) -> c29 FOLD''(z0, z1) -> c30(FOLDL''(z0, z1)) FOLD''(z0, z1) -> c31(FOLDR''(z0, z1)) S tuples: FOLDL''(z0, Cons(S(0), z1)) -> c21(FOLDL''(S(z0), z1)) FOLDL''(S(0), Cons(z0, z1)) -> c22(FOLDL''(S(z0), z1)) FOLDL''(z0, Nil) -> c23 FOLDR''(z0, Cons(z1, z2)) -> c24(OP''(z1, foldr(z0, z2)), FOLDR'(z0, z2), FOLDR''(z0, z2)) FOLDR''(z0, Nil) -> c25 NOTEMPTY''(Cons(z0, z1)) -> c26 NOTEMPTY''(Nil) -> c27 OP''(z0, S(0)) -> c28 OP''(S(0), z0) -> c29 FOLD''(z0, z1) -> c30(FOLDL''(z0, z1)) FOLD''(z0, z1) -> c31(FOLDR''(z0, z1)) K tuples:none Defined Rule Symbols: FOLDL_2, FOLDR_2, NOTEMPTY_1, OP_2, FOLD_2, foldl_2, foldr_2, notEmpty_1, op_2, fold_2 Defined Pair Symbols: FOLDL'_2, FOLDR'_2, NOTEMPTY'_1, OP'_2, FOLD'_2, FOLDL''_2, FOLDR''_2, NOTEMPTY''_1, OP''_2, FOLD''_2 Compound Symbols: c11_1, c12_1, c13, c14_2, c15, c16, c17, c18, c19, c20_2, c21_1, c22_1, c23, c24_3, c25, c26, c27, c28, c29, c30_1, c31_1 ---------------------------------------- (5) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 3 leading nodes: FOLD'(z0, z1) -> c20(FOLDL'(z0, z1), FOLDR'(z0, z1)) FOLD''(z0, z1) -> c31(FOLDR''(z0, z1)) FOLD''(z0, z1) -> c30(FOLDL''(z0, z1)) Removed 12 trailing nodes: OP''(z0, S(0)) -> c28 FOLDL'(z0, Nil) -> c13 NOTEMPTY''(Cons(z0, z1)) -> c26 FOLDL''(z0, Nil) -> c23 OP'(S(0), z0) -> c19 NOTEMPTY'(Cons(z0, z1)) -> c16 NOTEMPTY''(Nil) -> c27 OP'(z0, S(0)) -> c18 OP''(S(0), z0) -> c29 FOLDR''(z0, Nil) -> c25 NOTEMPTY'(Nil) -> c17 FOLDR'(z0, Nil) -> c15 ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: foldl(z0, Cons(S(0), z1)) -> foldl(S(z0), z1) foldl(S(0), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0)) -> S(z0) op(S(0), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0)) -> c7 OP(S(0), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) Tuples: FOLDL'(z0, Cons(S(0), z1)) -> c11(FOLDL'(S(z0), z1)) FOLDL'(S(0), Cons(z0, z1)) -> c12(FOLDL'(S(z0), z1)) FOLDR'(z0, Cons(z1, z2)) -> c14(OP'(z1, foldr(z0, z2)), FOLDR'(z0, z2)) FOLDL''(z0, Cons(S(0), z1)) -> c21(FOLDL''(S(z0), z1)) FOLDL''(S(0), Cons(z0, z1)) -> c22(FOLDL''(S(z0), z1)) FOLDR''(z0, Cons(z1, z2)) -> c24(OP''(z1, foldr(z0, z2)), FOLDR'(z0, z2), FOLDR''(z0, z2)) S tuples: FOLDL''(z0, Cons(S(0), z1)) -> c21(FOLDL''(S(z0), z1)) FOLDL''(S(0), Cons(z0, z1)) -> c22(FOLDL''(S(z0), z1)) FOLDR''(z0, Cons(z1, z2)) -> c24(OP''(z1, foldr(z0, z2)), FOLDR'(z0, z2), FOLDR''(z0, z2)) K tuples:none Defined Rule Symbols: FOLDL_2, FOLDR_2, NOTEMPTY_1, OP_2, FOLD_2, foldl_2, foldr_2, notEmpty_1, op_2, fold_2 Defined Pair Symbols: FOLDL'_2, FOLDR'_2, FOLDL''_2, FOLDR''_2 Compound Symbols: c11_1, c12_1, c14_2, c21_1, c22_1, c24_3 ---------------------------------------- (7) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing tuple parts ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: foldl(z0, Cons(S(0), z1)) -> foldl(S(z0), z1) foldl(S(0), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0)) -> S(z0) op(S(0), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0)) -> c7 OP(S(0), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) Tuples: FOLDL'(z0, Cons(S(0), z1)) -> c11(FOLDL'(S(z0), z1)) FOLDL'(S(0), Cons(z0, z1)) -> c12(FOLDL'(S(z0), z1)) FOLDL''(z0, Cons(S(0), z1)) -> c21(FOLDL''(S(z0), z1)) FOLDL''(S(0), Cons(z0, z1)) -> c22(FOLDL''(S(z0), z1)) FOLDR'(z0, Cons(z1, z2)) -> c14(FOLDR'(z0, z2)) FOLDR''(z0, Cons(z1, z2)) -> c24(FOLDR'(z0, z2), FOLDR''(z0, z2)) S tuples: FOLDL''(z0, Cons(S(0), z1)) -> c21(FOLDL''(S(z0), z1)) FOLDL''(S(0), Cons(z0, z1)) -> c22(FOLDL''(S(z0), z1)) FOLDR''(z0, Cons(z1, z2)) -> c24(FOLDR'(z0, z2), FOLDR''(z0, z2)) K tuples:none Defined Rule Symbols: FOLDL_2, FOLDR_2, NOTEMPTY_1, OP_2, FOLD_2, foldl_2, foldr_2, notEmpty_1, op_2, fold_2 Defined Pair Symbols: FOLDL'_2, FOLDL''_2, FOLDR'_2, FOLDR''_2 Compound Symbols: c11_1, c12_1, c21_1, c22_1, c14_1, c24_2 ---------------------------------------- (9) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: foldl(z0, Cons(S(0), z1)) -> foldl(S(z0), z1) foldl(S(0), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0)) -> S(z0) op(S(0), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0)) -> c7 OP(S(0), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: FOLDL'(z0, Cons(S(0), z1)) -> c11(FOLDL'(S(z0), z1)) FOLDL'(S(0), Cons(z0, z1)) -> c12(FOLDL'(S(z0), z1)) FOLDL''(z0, Cons(S(0), z1)) -> c21(FOLDL''(S(z0), z1)) FOLDL''(S(0), Cons(z0, z1)) -> c22(FOLDL''(S(z0), z1)) FOLDR'(z0, Cons(z1, z2)) -> c14(FOLDR'(z0, z2)) FOLDR''(z0, Cons(z1, z2)) -> c24(FOLDR'(z0, z2), FOLDR''(z0, z2)) S tuples: FOLDL''(z0, Cons(S(0), z1)) -> c21(FOLDL''(S(z0), z1)) FOLDL''(S(0), Cons(z0, z1)) -> c22(FOLDL''(S(z0), z1)) FOLDR''(z0, Cons(z1, z2)) -> c24(FOLDR'(z0, z2), FOLDR''(z0, z2)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: FOLDL'_2, FOLDL''_2, FOLDR'_2, FOLDR''_2 Compound Symbols: c11_1, c12_1, c21_1, c22_1, c14_1, c24_2 ---------------------------------------- (11) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. FOLDL''(z0, Cons(S(0), z1)) -> c21(FOLDL''(S(z0), z1)) FOLDL''(S(0), Cons(z0, z1)) -> c22(FOLDL''(S(z0), z1)) FOLDR''(z0, Cons(z1, z2)) -> c24(FOLDR'(z0, z2), FOLDR''(z0, z2)) We considered the (Usable) Rules:none And the Tuples: FOLDL'(z0, Cons(S(0), z1)) -> c11(FOLDL'(S(z0), z1)) FOLDL'(S(0), Cons(z0, z1)) -> c12(FOLDL'(S(z0), z1)) FOLDL''(z0, Cons(S(0), z1)) -> c21(FOLDL''(S(z0), z1)) FOLDL''(S(0), Cons(z0, z1)) -> c22(FOLDL''(S(z0), z1)) FOLDR'(z0, Cons(z1, z2)) -> c14(FOLDR'(z0, z2)) FOLDR''(z0, Cons(z1, z2)) -> c24(FOLDR'(z0, z2), FOLDR''(z0, z2)) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [1] POL(Cons(x_1, x_2)) = [1] + x_1 + x_2 POL(FOLDL'(x_1, x_2)) = x_1 + x_2 POL(FOLDL''(x_1, x_2)) = x_1 + x_2 POL(FOLDR'(x_1, x_2)) = 0 POL(FOLDR''(x_1, x_2)) = x_2 POL(S(x_1)) = [1] + x_1 POL(c11(x_1)) = x_1 POL(c12(x_1)) = x_1 POL(c14(x_1)) = x_1 POL(c21(x_1)) = x_1 POL(c22(x_1)) = x_1 POL(c24(x_1, x_2)) = x_1 + x_2 ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: FOLDL'(z0, Cons(S(0), z1)) -> c11(FOLDL'(S(z0), z1)) FOLDL'(S(0), Cons(z0, z1)) -> c12(FOLDL'(S(z0), z1)) FOLDL''(z0, Cons(S(0), z1)) -> c21(FOLDL''(S(z0), z1)) FOLDL''(S(0), Cons(z0, z1)) -> c22(FOLDL''(S(z0), z1)) FOLDR'(z0, Cons(z1, z2)) -> c14(FOLDR'(z0, z2)) FOLDR''(z0, Cons(z1, z2)) -> c24(FOLDR'(z0, z2), FOLDR''(z0, z2)) S tuples:none K tuples: FOLDL''(z0, Cons(S(0), z1)) -> c21(FOLDL''(S(z0), z1)) FOLDL''(S(0), Cons(z0, z1)) -> c22(FOLDL''(S(z0), z1)) FOLDR''(z0, Cons(z1, z2)) -> c24(FOLDR'(z0, z2), FOLDR''(z0, z2)) Defined Rule Symbols:none Defined Pair Symbols: FOLDL'_2, FOLDL''_2, FOLDR'_2, FOLDR''_2 Compound Symbols: c11_1, c12_1, c21_1, c22_1, c14_1, c24_2 ---------------------------------------- (13) SIsEmptyProof (BOTH BOUNDS(ID, ID)) The set S is empty ---------------------------------------- (14) BOUNDS(1, 1) ---------------------------------------- (15) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (16) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0)) -> c7 OP(S(0), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) The (relative) TRS S consists of the following rules: foldl(z0, Cons(S(0), z1)) -> foldl(S(z0), z1) foldl(S(0), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0)) -> S(z0) op(S(0), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) Rewrite Strategy: INNERMOST ---------------------------------------- (17) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence FOLDL(z0, Cons(S(0), z1)) ->^+ c(FOLDL(S(z0), z1)) gives rise to a decreasing loop by considering the right hand sides subterm at position [0]. The pumping substitution is [z1 / Cons(S(0), z1)]. The result substitution is [z0 / S(z0)]. ---------------------------------------- (18) Complex Obligation (BEST) ---------------------------------------- (19) 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, n^1). The TRS R consists of the following rules: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0)) -> c7 OP(S(0), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) The (relative) TRS S consists of the following rules: foldl(z0, Cons(S(0), z1)) -> foldl(S(z0), z1) foldl(S(0), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0)) -> S(z0) op(S(0), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) Rewrite Strategy: INNERMOST ---------------------------------------- (20) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (21) BOUNDS(n^1, INF) ---------------------------------------- (22) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: FOLDL(z0, Cons(S(0), z1)) -> c(FOLDL(S(z0), z1)) FOLDL(S(0), Cons(z0, z1)) -> c1(FOLDL(S(z0), z1)) FOLDL(z0, Nil) -> c2 FOLDR(z0, Cons(z1, z2)) -> c3(OP(z1, foldr(z0, z2)), FOLDR(z0, z2)) FOLDR(z0, Nil) -> c4 NOTEMPTY(Cons(z0, z1)) -> c5 NOTEMPTY(Nil) -> c6 OP(z0, S(0)) -> c7 OP(S(0), z0) -> c8 FOLD(z0, z1) -> c9(FOLDL(z0, z1)) FOLD(z0, z1) -> c10(FOLDR(z0, z1)) The (relative) TRS S consists of the following rules: foldl(z0, Cons(S(0), z1)) -> foldl(S(z0), z1) foldl(S(0), Cons(z0, z1)) -> foldl(S(z0), z1) foldl(z0, Nil) -> z0 foldr(z0, Cons(z1, z2)) -> op(z1, foldr(z0, z2)) foldr(z0, Nil) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False op(z0, S(0)) -> S(z0) op(S(0), z0) -> S(z0) fold(z0, z1) -> Cons(foldl(z0, z1), Cons(foldr(z0, z1), Nil)) Rewrite Strategy: INNERMOST