WORST_CASE(?, O(n^1)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^1). (0) CpxRelTRS (1) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 181 ms] (2) CpxRelTRS (3) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (4) CdtProblem (5) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (6) CdtProblem (7) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CdtProblem (9) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 39 ms] (10) CdtProblem (11) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 8 ms] (12) CdtProblem (13) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] (14) BOUNDS(1, 1) ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: ordered(Cons(x', Cons(x, xs))) -> ordered[Ite](<(x', x), Cons(x', Cons(x, xs))) ordered(Cons(x, Nil)) -> True ordered(Nil) -> True notEmpty(Cons(x, xs)) -> True notEmpty(Nil) -> False goal(xs) -> ordered(xs) The (relative) TRS S consists of the following rules: <(S(x), S(y)) -> <(x, y) <(0, S(y)) -> True <(x, 0) -> False ordered[Ite](True, Cons(x, xs)) -> ordered(xs) ordered[Ite](False, xs) -> False 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(1, n^1). The TRS R consists of the following rules: ordered(Cons(x', Cons(x, xs))) -> ordered[Ite](<(x', x), Cons(x', Cons(x, xs))) ordered(Cons(x, Nil)) -> True ordered(Nil) -> True notEmpty(Cons(x, xs)) -> True notEmpty(Nil) -> False goal(xs) -> ordered(xs) The (relative) TRS S consists of the following rules: <(S(x), S(y)) -> <(x, y) <(0, S(y)) -> True <(x, 0) -> False ordered[Ite](True, Cons(x, xs)) -> ordered(xs) ordered[Ite](False, xs) -> False Rewrite Strategy: INNERMOST ---------------------------------------- (3) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False ordered[Ite](True, Cons(z0, z1)) -> ordered(z1) ordered[Ite](False, z0) -> False ordered(Cons(z0, Cons(z1, z2))) -> ordered[Ite](<(z0, z1), Cons(z0, Cons(z1, z2))) ordered(Cons(z0, Nil)) -> True ordered(Nil) -> True notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> ordered(z0) Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) <'(0, S(z0)) -> c1 <'(z0, 0) -> c2 ORDERED[ITE](True, Cons(z0, z1)) -> c3(ORDERED(z1)) ORDERED[ITE](False, z0) -> c4 ORDERED(Cons(z0, Cons(z1, z2))) -> c5(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1)) ORDERED(Cons(z0, Nil)) -> c6 ORDERED(Nil) -> c7 NOTEMPTY(Cons(z0, z1)) -> c8 NOTEMPTY(Nil) -> c9 GOAL(z0) -> c10(ORDERED(z0)) S tuples: ORDERED(Cons(z0, Cons(z1, z2))) -> c5(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1)) ORDERED(Cons(z0, Nil)) -> c6 ORDERED(Nil) -> c7 NOTEMPTY(Cons(z0, z1)) -> c8 NOTEMPTY(Nil) -> c9 GOAL(z0) -> c10(ORDERED(z0)) K tuples:none Defined Rule Symbols: ordered_1, notEmpty_1, goal_1, <_2, ordered[Ite]_2 Defined Pair Symbols: <'_2, ORDERED[ITE]_2, ORDERED_1, NOTEMPTY_1, GOAL_1 Compound Symbols: c_1, c1, c2, c3_1, c4, c5_2, c6, c7, c8, c9, c10_1 ---------------------------------------- (5) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 1 leading nodes: GOAL(z0) -> c10(ORDERED(z0)) Removed 5 trailing nodes: NOTEMPTY(Nil) -> c9 ORDERED[ITE](False, z0) -> c4 <'(z0, 0) -> c2 NOTEMPTY(Cons(z0, z1)) -> c8 <'(0, S(z0)) -> c1 ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False ordered[Ite](True, Cons(z0, z1)) -> ordered(z1) ordered[Ite](False, z0) -> False ordered(Cons(z0, Cons(z1, z2))) -> ordered[Ite](<(z0, z1), Cons(z0, Cons(z1, z2))) ordered(Cons(z0, Nil)) -> True ordered(Nil) -> True notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> ordered(z0) Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) ORDERED[ITE](True, Cons(z0, z1)) -> c3(ORDERED(z1)) ORDERED(Cons(z0, Cons(z1, z2))) -> c5(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1)) ORDERED(Cons(z0, Nil)) -> c6 ORDERED(Nil) -> c7 S tuples: ORDERED(Cons(z0, Cons(z1, z2))) -> c5(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1)) ORDERED(Cons(z0, Nil)) -> c6 ORDERED(Nil) -> c7 K tuples:none Defined Rule Symbols: ordered_1, notEmpty_1, goal_1, <_2, ordered[Ite]_2 Defined Pair Symbols: <'_2, ORDERED[ITE]_2, ORDERED_1 Compound Symbols: c_1, c3_1, c5_2, c6, c7 ---------------------------------------- (7) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: ordered[Ite](True, Cons(z0, z1)) -> ordered(z1) ordered[Ite](False, z0) -> False ordered(Cons(z0, Cons(z1, z2))) -> ordered[Ite](<(z0, z1), Cons(z0, Cons(z1, z2))) ordered(Cons(z0, Nil)) -> True ordered(Nil) -> True notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> ordered(z0) ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) ORDERED[ITE](True, Cons(z0, z1)) -> c3(ORDERED(z1)) ORDERED(Cons(z0, Cons(z1, z2))) -> c5(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1)) ORDERED(Cons(z0, Nil)) -> c6 ORDERED(Nil) -> c7 S tuples: ORDERED(Cons(z0, Cons(z1, z2))) -> c5(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1)) ORDERED(Cons(z0, Nil)) -> c6 ORDERED(Nil) -> c7 K tuples:none Defined Rule Symbols: <_2 Defined Pair Symbols: <'_2, ORDERED[ITE]_2, ORDERED_1 Compound Symbols: c_1, c3_1, c5_2, c6, c7 ---------------------------------------- (9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. ORDERED(Cons(z0, Nil)) -> c6 ORDERED(Nil) -> c7 We considered the (Usable) Rules: <(z0, 0) -> False <(0, S(z0)) -> True <(S(z0), S(z1)) -> <(z0, z1) And the Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) ORDERED[ITE](True, Cons(z0, z1)) -> c3(ORDERED(z1)) ORDERED(Cons(z0, Cons(z1, z2))) -> c5(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1)) ORDERED(Cons(z0, Nil)) -> c6 ORDERED(Nil) -> c7 The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [1] POL(<(x_1, x_2)) = 0 POL(<'(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = [1] POL(False) = 0 POL(Nil) = [1] POL(ORDERED(x_1)) = [1] POL(ORDERED[ITE](x_1, x_2)) = x_1 + x_2 POL(S(x_1)) = [1] + x_1 POL(True) = 0 POL(c(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c5(x_1, x_2)) = x_1 + x_2 POL(c6) = 0 POL(c7) = 0 ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules: <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) ORDERED[ITE](True, Cons(z0, z1)) -> c3(ORDERED(z1)) ORDERED(Cons(z0, Cons(z1, z2))) -> c5(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1)) ORDERED(Cons(z0, Nil)) -> c6 ORDERED(Nil) -> c7 S tuples: ORDERED(Cons(z0, Cons(z1, z2))) -> c5(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1)) K tuples: ORDERED(Cons(z0, Nil)) -> c6 ORDERED(Nil) -> c7 Defined Rule Symbols: <_2 Defined Pair Symbols: <'_2, ORDERED[ITE]_2, ORDERED_1 Compound Symbols: c_1, c3_1, c5_2, c6, c7 ---------------------------------------- (11) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. ORDERED(Cons(z0, Cons(z1, z2))) -> c5(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1)) We considered the (Usable) Rules:none And the Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) ORDERED[ITE](True, Cons(z0, z1)) -> c3(ORDERED(z1)) ORDERED(Cons(z0, Cons(z1, z2))) -> c5(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1)) ORDERED(Cons(z0, Nil)) -> c6 ORDERED(Nil) -> c7 The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [3] POL(<(x_1, x_2)) = [3] POL(<'(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = [1] + x_2 POL(False) = [3] POL(Nil) = 0 POL(ORDERED(x_1)) = [1] + x_1 POL(ORDERED[ITE](x_1, x_2)) = x_2 POL(S(x_1)) = [3] + x_1 POL(True) = [3] POL(c(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c5(x_1, x_2)) = x_1 + x_2 POL(c6) = 0 POL(c7) = 0 ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules: <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) ORDERED[ITE](True, Cons(z0, z1)) -> c3(ORDERED(z1)) ORDERED(Cons(z0, Cons(z1, z2))) -> c5(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1)) ORDERED(Cons(z0, Nil)) -> c6 ORDERED(Nil) -> c7 S tuples:none K tuples: ORDERED(Cons(z0, Nil)) -> c6 ORDERED(Nil) -> c7 ORDERED(Cons(z0, Cons(z1, z2))) -> c5(ORDERED[ITE](<(z0, z1), Cons(z0, Cons(z1, z2))), <'(z0, z1)) Defined Rule Symbols: <_2 Defined Pair Symbols: <'_2, ORDERED[ITE]_2, ORDERED_1 Compound Symbols: c_1, c3_1, c5_2, c6, c7 ---------------------------------------- (13) SIsEmptyProof (BOTH BOUNDS(ID, ID)) The set S is empty ---------------------------------------- (14) BOUNDS(1, 1)