/export/starexec/sandbox/solver/bin/starexec_run_rcdcRelativeAlsoLower /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^2)) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Derivational Complexity (innermost) of the given DCpxTrs could be proven to be BOUNDS(n^1, n^2). (0) DCpxTrs (1) DerivationalComplexityToRuntimeComplexityProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxRelTRS (3) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 165 ms] (4) CpxRelTRS (5) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (6) CdtProblem (7) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (8) CdtProblem (9) CdtGraphSplitRhsProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CdtProblem (11) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (12) CdtProblem (13) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CdtProblem (15) CdtRuleRemovalProof [UPPER BOUND(ADD(n^2)), 115 ms] (16) CdtProblem (17) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] (18) BOUNDS(1, 1) (19) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (20) CpxRelTRS (21) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (22) typed CpxTrs (23) OrderProof [LOWER BOUND(ID), 0 ms] (24) typed CpxTrs (25) RewriteLemmaProof [LOWER BOUND(ID), 171 ms] (26) BEST (27) proven lower bound (28) LowerBoundPropagationProof [FINISHED, 0 ms] (29) BOUNDS(n^1, INF) (30) typed CpxTrs (31) RewriteLemmaProof [LOWER BOUND(ID), 63 ms] (32) BOUNDS(1, INF) ---------------------------------------- (0) Obligation: The Derivational Complexity (innermost) of the given DCpxTrs could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: f(0, y) -> 0 f(s(x), y) -> f(f(x, y), y) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) DerivationalComplexityToRuntimeComplexityProof (BOTH BOUNDS(ID, ID)) The following rules have been added to S to convert the given derivational complexity problem to a runtime complexity problem: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: f(0, y) -> 0 f(s(x), y) -> f(f(x, y), y) The (relative) TRS S consists of the following rules: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) Rewrite Strategy: INNERMOST ---------------------------------------- (3) SInnermostTerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved innermost termination of relative rules ---------------------------------------- (4) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: f(0, y) -> 0 f(s(x), y) -> f(f(x, y), y) The (relative) TRS S consists of the following rules: encArg(0) -> 0 encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_0 -> 0 encode_s(x_1) -> s(encArg(x_1)) Rewrite Strategy: INNERMOST ---------------------------------------- (5) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: encArg(0) -> 0 encArg(s(z0)) -> s(encArg(z0)) encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_0 -> 0 encode_s(z0) -> s(encArg(z0)) f(0, z0) -> 0 f(s(z0), z1) -> f(f(z0, z1), z1) Tuples: ENCARG(0) -> c ENCARG(s(z0)) -> c1(ENCARG(z0)) ENCARG(cons_f(z0, z1)) -> c2(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) ENCODE_F(z0, z1) -> c3(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) ENCODE_0 -> c4 ENCODE_S(z0) -> c5(ENCARG(z0)) F(0, z0) -> c6 F(s(z0), z1) -> c7(F(f(z0, z1), z1), F(z0, z1)) S tuples: F(0, z0) -> c6 F(s(z0), z1) -> c7(F(f(z0, z1), z1), F(z0, z1)) K tuples:none Defined Rule Symbols: f_2, encArg_1, encode_f_2, encode_0, encode_s_1 Defined Pair Symbols: ENCARG_1, ENCODE_F_2, ENCODE_0, ENCODE_S_1, F_2 Compound Symbols: c, c1_1, c2_3, c3_3, c4, c5_1, c6, c7_2 ---------------------------------------- (7) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 1 leading nodes: ENCODE_S(z0) -> c5(ENCARG(z0)) Removed 2 trailing nodes: ENCARG(0) -> c ENCODE_0 -> c4 ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: encArg(0) -> 0 encArg(s(z0)) -> s(encArg(z0)) encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_0 -> 0 encode_s(z0) -> s(encArg(z0)) f(0, z0) -> 0 f(s(z0), z1) -> f(f(z0, z1), z1) Tuples: ENCARG(s(z0)) -> c1(ENCARG(z0)) ENCARG(cons_f(z0, z1)) -> c2(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) ENCODE_F(z0, z1) -> c3(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) F(0, z0) -> c6 F(s(z0), z1) -> c7(F(f(z0, z1), z1), F(z0, z1)) S tuples: F(0, z0) -> c6 F(s(z0), z1) -> c7(F(f(z0, z1), z1), F(z0, z1)) K tuples:none Defined Rule Symbols: f_2, encArg_1, encode_f_2, encode_0, encode_s_1 Defined Pair Symbols: ENCARG_1, ENCODE_F_2, F_2 Compound Symbols: c1_1, c2_3, c3_3, c6, c7_2 ---------------------------------------- (9) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID)) Split RHS of tuples not part of any SCC ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules: encArg(0) -> 0 encArg(s(z0)) -> s(encArg(z0)) encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_0 -> 0 encode_s(z0) -> s(encArg(z0)) f(0, z0) -> 0 f(s(z0), z1) -> f(f(z0, z1), z1) Tuples: ENCARG(s(z0)) -> c1(ENCARG(z0)) ENCARG(cons_f(z0, z1)) -> c2(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) F(0, z0) -> c6 F(s(z0), z1) -> c7(F(f(z0, z1), z1), F(z0, z1)) ENCODE_F(z0, z1) -> c(F(encArg(z0), encArg(z1))) ENCODE_F(z0, z1) -> c(ENCARG(z0)) ENCODE_F(z0, z1) -> c(ENCARG(z1)) S tuples: F(0, z0) -> c6 F(s(z0), z1) -> c7(F(f(z0, z1), z1), F(z0, z1)) K tuples:none Defined Rule Symbols: f_2, encArg_1, encode_f_2, encode_0, encode_s_1 Defined Pair Symbols: ENCARG_1, F_2, ENCODE_F_2 Compound Symbols: c1_1, c2_3, c6, c7_2, c_1 ---------------------------------------- (11) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 2 leading nodes: ENCODE_F(z0, z1) -> c(ENCARG(z0)) ENCODE_F(z0, z1) -> c(ENCARG(z1)) ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules: encArg(0) -> 0 encArg(s(z0)) -> s(encArg(z0)) encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_0 -> 0 encode_s(z0) -> s(encArg(z0)) f(0, z0) -> 0 f(s(z0), z1) -> f(f(z0, z1), z1) Tuples: ENCARG(s(z0)) -> c1(ENCARG(z0)) ENCARG(cons_f(z0, z1)) -> c2(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) F(0, z0) -> c6 F(s(z0), z1) -> c7(F(f(z0, z1), z1), F(z0, z1)) ENCODE_F(z0, z1) -> c(F(encArg(z0), encArg(z1))) S tuples: F(0, z0) -> c6 F(s(z0), z1) -> c7(F(f(z0, z1), z1), F(z0, z1)) K tuples:none Defined Rule Symbols: f_2, encArg_1, encode_f_2, encode_0, encode_s_1 Defined Pair Symbols: ENCARG_1, F_2, ENCODE_F_2 Compound Symbols: c1_1, c2_3, c6, c7_2, c_1 ---------------------------------------- (13) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_0 -> 0 encode_s(z0) -> s(encArg(z0)) ---------------------------------------- (14) Obligation: Complexity Dependency Tuples Problem Rules: encArg(0) -> 0 encArg(s(z0)) -> s(encArg(z0)) encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) f(0, z0) -> 0 f(s(z0), z1) -> f(f(z0, z1), z1) Tuples: ENCARG(s(z0)) -> c1(ENCARG(z0)) ENCARG(cons_f(z0, z1)) -> c2(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) F(0, z0) -> c6 F(s(z0), z1) -> c7(F(f(z0, z1), z1), F(z0, z1)) ENCODE_F(z0, z1) -> c(F(encArg(z0), encArg(z1))) S tuples: F(0, z0) -> c6 F(s(z0), z1) -> c7(F(f(z0, z1), z1), F(z0, z1)) K tuples:none Defined Rule Symbols: encArg_1, f_2 Defined Pair Symbols: ENCARG_1, F_2, ENCODE_F_2 Compound Symbols: c1_1, c2_3, c6, c7_2, c_1 ---------------------------------------- (15) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. F(0, z0) -> c6 F(s(z0), z1) -> c7(F(f(z0, z1), z1), F(z0, z1)) We considered the (Usable) Rules: f(0, z0) -> 0 encArg(s(z0)) -> s(encArg(z0)) encArg(0) -> 0 f(s(z0), z1) -> f(f(z0, z1), z1) encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) And the Tuples: ENCARG(s(z0)) -> c1(ENCARG(z0)) ENCARG(cons_f(z0, z1)) -> c2(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) F(0, z0) -> c6 F(s(z0), z1) -> c7(F(f(z0, z1), z1), F(z0, z1)) ENCODE_F(z0, z1) -> c(F(encArg(z0), encArg(z1))) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(ENCARG(x_1)) = [2]x_1 + x_1^2 POL(ENCODE_F(x_1, x_2)) = [1] + [2]x_1 + [2]x_2 + x_2^2 + x_1*x_2 + x_1^2 POL(F(x_1, x_2)) = [1] + [2]x_1 POL(c(x_1)) = x_1 POL(c1(x_1)) = x_1 POL(c2(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(c6) = 0 POL(c7(x_1, x_2)) = x_1 + x_2 POL(cons_f(x_1, x_2)) = [2] + x_1 + x_2 POL(encArg(x_1)) = x_1 POL(f(x_1, x_2)) = 0 POL(s(x_1)) = [2] + x_1 ---------------------------------------- (16) Obligation: Complexity Dependency Tuples Problem Rules: encArg(0) -> 0 encArg(s(z0)) -> s(encArg(z0)) encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) f(0, z0) -> 0 f(s(z0), z1) -> f(f(z0, z1), z1) Tuples: ENCARG(s(z0)) -> c1(ENCARG(z0)) ENCARG(cons_f(z0, z1)) -> c2(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) F(0, z0) -> c6 F(s(z0), z1) -> c7(F(f(z0, z1), z1), F(z0, z1)) ENCODE_F(z0, z1) -> c(F(encArg(z0), encArg(z1))) S tuples:none K tuples: F(0, z0) -> c6 F(s(z0), z1) -> c7(F(f(z0, z1), z1), F(z0, z1)) Defined Rule Symbols: encArg_1, f_2 Defined Pair Symbols: ENCARG_1, F_2, ENCODE_F_2 Compound Symbols: c1_1, c2_3, c6, c7_2, c_1 ---------------------------------------- (17) SIsEmptyProof (BOTH BOUNDS(ID, ID)) The set S is empty ---------------------------------------- (18) BOUNDS(1, 1) ---------------------------------------- (19) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (20) 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: f(0', y) -> 0' f(s(x), y) -> f(f(x, y), y) The (relative) TRS S consists of the following rules: encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) Rewrite Strategy: INNERMOST ---------------------------------------- (21) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (22) Obligation: Innermost TRS: Rules: f(0', y) -> 0' f(s(x), y) -> f(f(x, y), y) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) Types: f :: 0':s:cons_f -> 0':s:cons_f -> 0':s:cons_f 0' :: 0':s:cons_f s :: 0':s:cons_f -> 0':s:cons_f encArg :: 0':s:cons_f -> 0':s:cons_f cons_f :: 0':s:cons_f -> 0':s:cons_f -> 0':s:cons_f encode_f :: 0':s:cons_f -> 0':s:cons_f -> 0':s:cons_f encode_0 :: 0':s:cons_f encode_s :: 0':s:cons_f -> 0':s:cons_f hole_0':s:cons_f1_3 :: 0':s:cons_f gen_0':s:cons_f2_3 :: Nat -> 0':s:cons_f ---------------------------------------- (23) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: f, encArg They will be analysed ascendingly in the following order: f < encArg ---------------------------------------- (24) Obligation: Innermost TRS: Rules: f(0', y) -> 0' f(s(x), y) -> f(f(x, y), y) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) Types: f :: 0':s:cons_f -> 0':s:cons_f -> 0':s:cons_f 0' :: 0':s:cons_f s :: 0':s:cons_f -> 0':s:cons_f encArg :: 0':s:cons_f -> 0':s:cons_f cons_f :: 0':s:cons_f -> 0':s:cons_f -> 0':s:cons_f encode_f :: 0':s:cons_f -> 0':s:cons_f -> 0':s:cons_f encode_0 :: 0':s:cons_f encode_s :: 0':s:cons_f -> 0':s:cons_f hole_0':s:cons_f1_3 :: 0':s:cons_f gen_0':s:cons_f2_3 :: Nat -> 0':s:cons_f Generator Equations: gen_0':s:cons_f2_3(0) <=> 0' gen_0':s:cons_f2_3(+(x, 1)) <=> s(gen_0':s:cons_f2_3(x)) The following defined symbols remain to be analysed: f, encArg They will be analysed ascendingly in the following order: f < encArg ---------------------------------------- (25) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: f(gen_0':s:cons_f2_3(n4_3), gen_0':s:cons_f2_3(b)) -> gen_0':s:cons_f2_3(0), rt in Omega(1 + n4_3) Induction Base: f(gen_0':s:cons_f2_3(0), gen_0':s:cons_f2_3(b)) ->_R^Omega(1) 0' Induction Step: f(gen_0':s:cons_f2_3(+(n4_3, 1)), gen_0':s:cons_f2_3(b)) ->_R^Omega(1) f(f(gen_0':s:cons_f2_3(n4_3), gen_0':s:cons_f2_3(b)), gen_0':s:cons_f2_3(b)) ->_IH f(gen_0':s:cons_f2_3(0), gen_0':s:cons_f2_3(b)) ->_R^Omega(1) 0' We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (26) Complex Obligation (BEST) ---------------------------------------- (27) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: f(0', y) -> 0' f(s(x), y) -> f(f(x, y), y) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) Types: f :: 0':s:cons_f -> 0':s:cons_f -> 0':s:cons_f 0' :: 0':s:cons_f s :: 0':s:cons_f -> 0':s:cons_f encArg :: 0':s:cons_f -> 0':s:cons_f cons_f :: 0':s:cons_f -> 0':s:cons_f -> 0':s:cons_f encode_f :: 0':s:cons_f -> 0':s:cons_f -> 0':s:cons_f encode_0 :: 0':s:cons_f encode_s :: 0':s:cons_f -> 0':s:cons_f hole_0':s:cons_f1_3 :: 0':s:cons_f gen_0':s:cons_f2_3 :: Nat -> 0':s:cons_f Generator Equations: gen_0':s:cons_f2_3(0) <=> 0' gen_0':s:cons_f2_3(+(x, 1)) <=> s(gen_0':s:cons_f2_3(x)) The following defined symbols remain to be analysed: f, encArg They will be analysed ascendingly in the following order: f < encArg ---------------------------------------- (28) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (29) BOUNDS(n^1, INF) ---------------------------------------- (30) Obligation: Innermost TRS: Rules: f(0', y) -> 0' f(s(x), y) -> f(f(x, y), y) encArg(0') -> 0' encArg(s(x_1)) -> s(encArg(x_1)) encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_0 -> 0' encode_s(x_1) -> s(encArg(x_1)) Types: f :: 0':s:cons_f -> 0':s:cons_f -> 0':s:cons_f 0' :: 0':s:cons_f s :: 0':s:cons_f -> 0':s:cons_f encArg :: 0':s:cons_f -> 0':s:cons_f cons_f :: 0':s:cons_f -> 0':s:cons_f -> 0':s:cons_f encode_f :: 0':s:cons_f -> 0':s:cons_f -> 0':s:cons_f encode_0 :: 0':s:cons_f encode_s :: 0':s:cons_f -> 0':s:cons_f hole_0':s:cons_f1_3 :: 0':s:cons_f gen_0':s:cons_f2_3 :: Nat -> 0':s:cons_f Lemmas: f(gen_0':s:cons_f2_3(n4_3), gen_0':s:cons_f2_3(b)) -> gen_0':s:cons_f2_3(0), rt in Omega(1 + n4_3) Generator Equations: gen_0':s:cons_f2_3(0) <=> 0' gen_0':s:cons_f2_3(+(x, 1)) <=> s(gen_0':s:cons_f2_3(x)) The following defined symbols remain to be analysed: encArg ---------------------------------------- (31) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: encArg(gen_0':s:cons_f2_3(n395_3)) -> gen_0':s:cons_f2_3(n395_3), rt in Omega(0) Induction Base: encArg(gen_0':s:cons_f2_3(0)) ->_R^Omega(0) 0' Induction Step: encArg(gen_0':s:cons_f2_3(+(n395_3, 1))) ->_R^Omega(0) s(encArg(gen_0':s:cons_f2_3(n395_3))) ->_IH s(gen_0':s:cons_f2_3(c396_3)) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (32) BOUNDS(1, INF)