/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxTRS (1) CpxTrsToCdtProof [UPPER BOUND(ID), 9 ms] (2) CdtProblem (3) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CdtProblem (5) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 60 ms] (8) CdtProblem (9) CdtKnowledgeProof [FINISHED, 0 ms] (10) BOUNDS(1, 1) (11) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTRS (13) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (14) typed CpxTrs (15) OrderProof [LOWER BOUND(ID), 0 ms] (16) typed CpxTrs (17) RewriteLemmaProof [LOWER BOUND(ID), 402 ms] (18) BEST (19) proven lower bound (20) LowerBoundPropagationProof [FINISHED, 0 ms] (21) BOUNDS(n^1, INF) (22) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: div(0, y) -> 0 div(x, y) -> quot(x, y, y) quot(0, s(y), z) -> 0 quot(s(x), s(y), z) -> quot(x, y, z) quot(x, 0, s(z)) -> s(div(x, s(z))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: div(0, z0) -> 0 div(z0, z1) -> quot(z0, z1, z1) quot(0, s(z0), z1) -> 0 quot(s(z0), s(z1), z2) -> quot(z0, z1, z2) quot(z0, 0, s(z1)) -> s(div(z0, s(z1))) Tuples: DIV(0, z0) -> c DIV(z0, z1) -> c1(QUOT(z0, z1, z1)) QUOT(0, s(z0), z1) -> c2 QUOT(s(z0), s(z1), z2) -> c3(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c4(DIV(z0, s(z1))) S tuples: DIV(0, z0) -> c DIV(z0, z1) -> c1(QUOT(z0, z1, z1)) QUOT(0, s(z0), z1) -> c2 QUOT(s(z0), s(z1), z2) -> c3(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c4(DIV(z0, s(z1))) K tuples:none Defined Rule Symbols: div_2, quot_3 Defined Pair Symbols: DIV_2, QUOT_3 Compound Symbols: c, c1_1, c2, c3_1, c4_1 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing nodes: QUOT(0, s(z0), z1) -> c2 DIV(0, z0) -> c ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: div(0, z0) -> 0 div(z0, z1) -> quot(z0, z1, z1) quot(0, s(z0), z1) -> 0 quot(s(z0), s(z1), z2) -> quot(z0, z1, z2) quot(z0, 0, s(z1)) -> s(div(z0, s(z1))) Tuples: DIV(z0, z1) -> c1(QUOT(z0, z1, z1)) QUOT(s(z0), s(z1), z2) -> c3(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c4(DIV(z0, s(z1))) S tuples: DIV(z0, z1) -> c1(QUOT(z0, z1, z1)) QUOT(s(z0), s(z1), z2) -> c3(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c4(DIV(z0, s(z1))) K tuples:none Defined Rule Symbols: div_2, quot_3 Defined Pair Symbols: DIV_2, QUOT_3 Compound Symbols: c1_1, c3_1, c4_1 ---------------------------------------- (5) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: div(0, z0) -> 0 div(z0, z1) -> quot(z0, z1, z1) quot(0, s(z0), z1) -> 0 quot(s(z0), s(z1), z2) -> quot(z0, z1, z2) quot(z0, 0, s(z1)) -> s(div(z0, s(z1))) ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: DIV(z0, z1) -> c1(QUOT(z0, z1, z1)) QUOT(s(z0), s(z1), z2) -> c3(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c4(DIV(z0, s(z1))) S tuples: DIV(z0, z1) -> c1(QUOT(z0, z1, z1)) QUOT(s(z0), s(z1), z2) -> c3(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c4(DIV(z0, s(z1))) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: DIV_2, QUOT_3 Compound Symbols: c1_1, c3_1, c4_1 ---------------------------------------- (7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. QUOT(s(z0), s(z1), z2) -> c3(QUOT(z0, z1, z2)) We considered the (Usable) Rules:none And the Tuples: DIV(z0, z1) -> c1(QUOT(z0, z1, z1)) QUOT(s(z0), s(z1), z2) -> c3(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c4(DIV(z0, s(z1))) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [1] POL(DIV(x_1, x_2)) = x_1 + x_2 POL(QUOT(x_1, x_2, x_3)) = x_1 + x_3 POL(c1(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c4(x_1)) = x_1 POL(s(x_1)) = [1] + x_1 ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: DIV(z0, z1) -> c1(QUOT(z0, z1, z1)) QUOT(s(z0), s(z1), z2) -> c3(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c4(DIV(z0, s(z1))) S tuples: DIV(z0, z1) -> c1(QUOT(z0, z1, z1)) QUOT(z0, 0, s(z1)) -> c4(DIV(z0, s(z1))) K tuples: QUOT(s(z0), s(z1), z2) -> c3(QUOT(z0, z1, z2)) Defined Rule Symbols:none Defined Pair Symbols: DIV_2, QUOT_3 Compound Symbols: c1_1, c3_1, c4_1 ---------------------------------------- (9) CdtKnowledgeProof (FINISHED) The following tuples could be moved from S to K by knowledge propagation: QUOT(z0, 0, s(z1)) -> c4(DIV(z0, s(z1))) DIV(z0, z1) -> c1(QUOT(z0, z1, z1)) QUOT(s(z0), s(z1), z2) -> c3(QUOT(z0, z1, z2)) Now S is empty ---------------------------------------- (10) BOUNDS(1, 1) ---------------------------------------- (11) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (12) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: div(0', y) -> 0' div(x, y) -> quot(x, y, y) quot(0', s(y), z) -> 0' quot(s(x), s(y), z) -> quot(x, y, z) quot(x, 0', s(z)) -> s(div(x, s(z))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (13) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (14) Obligation: Innermost TRS: Rules: div(0', y) -> 0' div(x, y) -> quot(x, y, y) quot(0', s(y), z) -> 0' quot(s(x), s(y), z) -> quot(x, y, z) quot(x, 0', s(z)) -> s(div(x, s(z))) Types: div :: 0':s -> 0':s -> 0':s 0' :: 0':s quot :: 0':s -> 0':s -> 0':s -> 0':s s :: 0':s -> 0':s hole_0':s1_0 :: 0':s gen_0':s2_0 :: Nat -> 0':s ---------------------------------------- (15) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: div, quot They will be analysed ascendingly in the following order: div = quot ---------------------------------------- (16) Obligation: Innermost TRS: Rules: div(0', y) -> 0' div(x, y) -> quot(x, y, y) quot(0', s(y), z) -> 0' quot(s(x), s(y), z) -> quot(x, y, z) quot(x, 0', s(z)) -> s(div(x, s(z))) Types: div :: 0':s -> 0':s -> 0':s 0' :: 0':s quot :: 0':s -> 0':s -> 0':s -> 0':s s :: 0':s -> 0':s hole_0':s1_0 :: 0':s gen_0':s2_0 :: Nat -> 0':s Generator Equations: gen_0':s2_0(0) <=> 0' gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) The following defined symbols remain to be analysed: quot, div They will be analysed ascendingly in the following order: div = quot ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: quot(gen_0':s2_0(n4_0), gen_0':s2_0(+(1, n4_0)), gen_0':s2_0(c)) -> gen_0':s2_0(0), rt in Omega(1 + n4_0) Induction Base: quot(gen_0':s2_0(0), gen_0':s2_0(+(1, 0)), gen_0':s2_0(c)) ->_R^Omega(1) 0' Induction Step: quot(gen_0':s2_0(+(n4_0, 1)), gen_0':s2_0(+(1, +(n4_0, 1))), gen_0':s2_0(c)) ->_R^Omega(1) quot(gen_0':s2_0(n4_0), gen_0':s2_0(+(1, n4_0)), gen_0':s2_0(c)) ->_IH gen_0':s2_0(0) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (18) Complex Obligation (BEST) ---------------------------------------- (19) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: div(0', y) -> 0' div(x, y) -> quot(x, y, y) quot(0', s(y), z) -> 0' quot(s(x), s(y), z) -> quot(x, y, z) quot(x, 0', s(z)) -> s(div(x, s(z))) Types: div :: 0':s -> 0':s -> 0':s 0' :: 0':s quot :: 0':s -> 0':s -> 0':s -> 0':s s :: 0':s -> 0':s hole_0':s1_0 :: 0':s gen_0':s2_0 :: Nat -> 0':s Generator Equations: gen_0':s2_0(0) <=> 0' gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) The following defined symbols remain to be analysed: quot, div They will be analysed ascendingly in the following order: div = quot ---------------------------------------- (20) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (21) BOUNDS(n^1, INF) ---------------------------------------- (22) Obligation: Innermost TRS: Rules: div(0', y) -> 0' div(x, y) -> quot(x, y, y) quot(0', s(y), z) -> 0' quot(s(x), s(y), z) -> quot(x, y, z) quot(x, 0', s(z)) -> s(div(x, s(z))) Types: div :: 0':s -> 0':s -> 0':s 0' :: 0':s quot :: 0':s -> 0':s -> 0':s -> 0':s s :: 0':s -> 0':s hole_0':s1_0 :: 0':s gen_0':s2_0 :: Nat -> 0':s Lemmas: quot(gen_0':s2_0(n4_0), gen_0':s2_0(+(1, n4_0)), gen_0':s2_0(c)) -> gen_0':s2_0(0), rt in Omega(1 + n4_0) Generator Equations: gen_0':s2_0(0) <=> 0' gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) The following defined symbols remain to be analysed: div They will be analysed ascendingly in the following order: div = quot