/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 (full) 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), 159 ms] (4) CpxRelTRS (5) NonCtorToCtorProof [UPPER BOUND(ID), 0 ms] (6) CpxRelTRS (7) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxRelTRS (9) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (10) CdtProblem (11) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CdtProblem (13) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CdtProblem (15) CdtGraphSplitRhsProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CdtProblem (17) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (18) CdtProblem (19) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (20) CdtProblem (21) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 59 ms] (22) CdtProblem (23) CdtRuleRemovalProof [UPPER BOUND(ADD(n^2)), 230 ms] (24) CdtProblem (25) CdtRuleRemovalProof [UPPER BOUND(ADD(n^2)), 106 ms] (26) CdtProblem (27) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] (28) BOUNDS(1, 1) (29) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (30) CpxRelTRS (31) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (32) typed CpxTrs (33) OrderProof [LOWER BOUND(ID), 0 ms] (34) typed CpxTrs (35) RewriteLemmaProof [LOWER BOUND(ID), 217 ms] (36) proven lower bound (37) LowerBoundPropagationProof [FINISHED, 0 ms] (38) BOUNDS(n^1, INF) ---------------------------------------- (0) Obligation: The Derivational Complexity (full) of the given DCpxTrs could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: app(id, x) -> x app(plus, 0) -> id app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (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(id) -> id encArg(plus) -> plus encArg(0) -> 0 encArg(s) -> s encArg(cons_app(x_1, x_2)) -> app(encArg(x_1), encArg(x_2)) encode_app(x_1, x_2) -> app(encArg(x_1), encArg(x_2)) encode_id -> id encode_plus -> plus encode_0 -> 0 encode_s -> s ---------------------------------------- (2) Obligation: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: app(id, x) -> x app(plus, 0) -> id app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y)) The (relative) TRS S consists of the following rules: encArg(id) -> id encArg(plus) -> plus encArg(0) -> 0 encArg(s) -> s encArg(cons_app(x_1, x_2)) -> app(encArg(x_1), encArg(x_2)) encode_app(x_1, x_2) -> app(encArg(x_1), encArg(x_2)) encode_id -> id encode_plus -> plus encode_0 -> 0 encode_s -> s Rewrite Strategy: FULL ---------------------------------------- (3) SInnermostTerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved innermost termination of relative rules ---------------------------------------- (4) Obligation: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: app(id, x) -> x app(plus, 0) -> id app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y)) The (relative) TRS S consists of the following rules: encArg(id) -> id encArg(plus) -> plus encArg(0) -> 0 encArg(s) -> s encArg(cons_app(x_1, x_2)) -> app(encArg(x_1), encArg(x_2)) encode_app(x_1, x_2) -> app(encArg(x_1), encArg(x_2)) encode_id -> id encode_plus -> plus encode_0 -> 0 encode_s -> s Rewrite Strategy: FULL ---------------------------------------- (5) NonCtorToCtorProof (UPPER BOUND(ID)) transformed non-ctor to ctor-system ---------------------------------------- (6) Obligation: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: app(id, x) -> x app(plus, 0) -> id app(c_app(plus, c_app(s, x)), y) -> app(s, app(app(plus, x), y)) The (relative) TRS S consists of the following rules: encArg(id) -> id encArg(plus) -> plus encArg(0) -> 0 encArg(s) -> s encArg(cons_app(x_1, x_2)) -> app(encArg(x_1), encArg(x_2)) encode_app(x_1, x_2) -> app(encArg(x_1), encArg(x_2)) encode_id -> id encode_plus -> plus encode_0 -> 0 encode_s -> s app(x0, x1) -> c_app(x0, x1) Rewrite Strategy: FULL ---------------------------------------- (7) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. As the TRS is a non-duplicating overlay system, we have rc = irc. ---------------------------------------- (8) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: app(id, x) -> x app(plus, 0) -> id app(c_app(plus, c_app(s, x)), y) -> app(s, app(app(plus, x), y)) The (relative) TRS S consists of the following rules: encArg(id) -> id encArg(plus) -> plus encArg(0) -> 0 encArg(s) -> s encArg(cons_app(x_1, x_2)) -> app(encArg(x_1), encArg(x_2)) encode_app(x_1, x_2) -> app(encArg(x_1), encArg(x_2)) encode_id -> id encode_plus -> plus encode_0 -> 0 encode_s -> s app(x0, x1) -> c_app(x0, x1) Rewrite Strategy: INNERMOST ---------------------------------------- (9) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules: encArg(id) -> id encArg(plus) -> plus encArg(0) -> 0 encArg(s) -> s encArg(cons_app(z0, z1)) -> app(encArg(z0), encArg(z1)) encode_app(z0, z1) -> app(encArg(z0), encArg(z1)) encode_id -> id encode_plus -> plus encode_0 -> 0 encode_s -> s app(z0, z1) -> c_app(z0, z1) app(id, z0) -> z0 app(plus, 0) -> id app(c_app(plus, c_app(s, z0)), z1) -> app(s, app(app(plus, z0), z1)) Tuples: ENCARG(id) -> c ENCARG(plus) -> c1 ENCARG(0) -> c2 ENCARG(s) -> c3 ENCARG(cons_app(z0, z1)) -> c4(APP(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) ENCODE_APP(z0, z1) -> c5(APP(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) ENCODE_ID -> c6 ENCODE_PLUS -> c7 ENCODE_0 -> c8 ENCODE_S -> c9 APP(z0, z1) -> c10 APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(s, app(app(plus, z0), z1)), APP(app(plus, z0), z1), APP(plus, z0)) S tuples: APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(s, app(app(plus, z0), z1)), APP(app(plus, z0), z1), APP(plus, z0)) K tuples:none Defined Rule Symbols: app_2, encArg_1, encode_app_2, encode_id, encode_plus, encode_0, encode_s Defined Pair Symbols: ENCARG_1, ENCODE_APP_2, ENCODE_ID, ENCODE_PLUS, ENCODE_0, ENCODE_S, APP_2 Compound Symbols: c, c1, c2, c3, c4_3, c5_3, c6, c7, c8, c9, c10, c11, c12, c13_3 ---------------------------------------- (11) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 9 trailing nodes: ENCARG(s) -> c3 ENCARG(plus) -> c1 ENCARG(id) -> c ENCARG(0) -> c2 ENCODE_ID -> c6 ENCODE_S -> c9 ENCODE_PLUS -> c7 APP(z0, z1) -> c10 ENCODE_0 -> c8 ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules: encArg(id) -> id encArg(plus) -> plus encArg(0) -> 0 encArg(s) -> s encArg(cons_app(z0, z1)) -> app(encArg(z0), encArg(z1)) encode_app(z0, z1) -> app(encArg(z0), encArg(z1)) encode_id -> id encode_plus -> plus encode_0 -> 0 encode_s -> s app(z0, z1) -> c_app(z0, z1) app(id, z0) -> z0 app(plus, 0) -> id app(c_app(plus, c_app(s, z0)), z1) -> app(s, app(app(plus, z0), z1)) Tuples: ENCARG(cons_app(z0, z1)) -> c4(APP(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) ENCODE_APP(z0, z1) -> c5(APP(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(s, app(app(plus, z0), z1)), APP(app(plus, z0), z1), APP(plus, z0)) S tuples: APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(s, app(app(plus, z0), z1)), APP(app(plus, z0), z1), APP(plus, z0)) K tuples:none Defined Rule Symbols: app_2, encArg_1, encode_app_2, encode_id, encode_plus, encode_0, encode_s Defined Pair Symbols: ENCARG_1, ENCODE_APP_2, APP_2 Compound Symbols: c4_3, c5_3, c11, c12, c13_3 ---------------------------------------- (13) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (14) Obligation: Complexity Dependency Tuples Problem Rules: encArg(id) -> id encArg(plus) -> plus encArg(0) -> 0 encArg(s) -> s encArg(cons_app(z0, z1)) -> app(encArg(z0), encArg(z1)) encode_app(z0, z1) -> app(encArg(z0), encArg(z1)) encode_id -> id encode_plus -> plus encode_0 -> 0 encode_s -> s app(z0, z1) -> c_app(z0, z1) app(id, z0) -> z0 app(plus, 0) -> id app(c_app(plus, c_app(s, z0)), z1) -> app(s, app(app(plus, z0), z1)) Tuples: ENCARG(cons_app(z0, z1)) -> c4(APP(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) ENCODE_APP(z0, z1) -> c5(APP(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) S tuples: APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) K tuples:none Defined Rule Symbols: app_2, encArg_1, encode_app_2, encode_id, encode_plus, encode_0, encode_s Defined Pair Symbols: ENCARG_1, ENCODE_APP_2, APP_2 Compound Symbols: c4_3, c5_3, c11, c12, c13_2 ---------------------------------------- (15) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID)) Split RHS of tuples not part of any SCC ---------------------------------------- (16) Obligation: Complexity Dependency Tuples Problem Rules: encArg(id) -> id encArg(plus) -> plus encArg(0) -> 0 encArg(s) -> s encArg(cons_app(z0, z1)) -> app(encArg(z0), encArg(z1)) encode_app(z0, z1) -> app(encArg(z0), encArg(z1)) encode_id -> id encode_plus -> plus encode_0 -> 0 encode_s -> s app(z0, z1) -> c_app(z0, z1) app(id, z0) -> z0 app(plus, 0) -> id app(c_app(plus, c_app(s, z0)), z1) -> app(s, app(app(plus, z0), z1)) Tuples: ENCARG(cons_app(z0, z1)) -> c4(APP(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) ENCODE_APP(z0, z1) -> c(APP(encArg(z0), encArg(z1))) ENCODE_APP(z0, z1) -> c(ENCARG(z0)) ENCODE_APP(z0, z1) -> c(ENCARG(z1)) S tuples: APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) K tuples:none Defined Rule Symbols: app_2, encArg_1, encode_app_2, encode_id, encode_plus, encode_0, encode_s Defined Pair Symbols: ENCARG_1, APP_2, ENCODE_APP_2 Compound Symbols: c4_3, c11, c12, c13_2, c_1 ---------------------------------------- (17) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 2 leading nodes: ENCODE_APP(z0, z1) -> c(ENCARG(z0)) ENCODE_APP(z0, z1) -> c(ENCARG(z1)) ---------------------------------------- (18) Obligation: Complexity Dependency Tuples Problem Rules: encArg(id) -> id encArg(plus) -> plus encArg(0) -> 0 encArg(s) -> s encArg(cons_app(z0, z1)) -> app(encArg(z0), encArg(z1)) encode_app(z0, z1) -> app(encArg(z0), encArg(z1)) encode_id -> id encode_plus -> plus encode_0 -> 0 encode_s -> s app(z0, z1) -> c_app(z0, z1) app(id, z0) -> z0 app(plus, 0) -> id app(c_app(plus, c_app(s, z0)), z1) -> app(s, app(app(plus, z0), z1)) Tuples: ENCARG(cons_app(z0, z1)) -> c4(APP(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) ENCODE_APP(z0, z1) -> c(APP(encArg(z0), encArg(z1))) S tuples: APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) K tuples:none Defined Rule Symbols: app_2, encArg_1, encode_app_2, encode_id, encode_plus, encode_0, encode_s Defined Pair Symbols: ENCARG_1, APP_2, ENCODE_APP_2 Compound Symbols: c4_3, c11, c12, c13_2, c_1 ---------------------------------------- (19) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: encode_app(z0, z1) -> app(encArg(z0), encArg(z1)) encode_id -> id encode_plus -> plus encode_0 -> 0 encode_s -> s ---------------------------------------- (20) Obligation: Complexity Dependency Tuples Problem Rules: encArg(id) -> id encArg(plus) -> plus encArg(0) -> 0 encArg(s) -> s encArg(cons_app(z0, z1)) -> app(encArg(z0), encArg(z1)) app(z0, z1) -> c_app(z0, z1) app(id, z0) -> z0 app(plus, 0) -> id app(c_app(plus, c_app(s, z0)), z1) -> app(s, app(app(plus, z0), z1)) Tuples: ENCARG(cons_app(z0, z1)) -> c4(APP(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) ENCODE_APP(z0, z1) -> c(APP(encArg(z0), encArg(z1))) S tuples: APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) K tuples:none Defined Rule Symbols: encArg_1, app_2 Defined Pair Symbols: ENCARG_1, APP_2, ENCODE_APP_2 Compound Symbols: c4_3, c11, c12, c13_2, c_1 ---------------------------------------- (21) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. APP(id, z0) -> c11 We considered the (Usable) Rules: app(z0, z1) -> c_app(z0, z1) encArg(plus) -> plus encArg(cons_app(z0, z1)) -> app(encArg(z0), encArg(z1)) encArg(id) -> id app(c_app(plus, c_app(s, z0)), z1) -> app(s, app(app(plus, z0), z1)) encArg(s) -> s encArg(0) -> 0 app(id, z0) -> z0 app(plus, 0) -> id And the Tuples: ENCARG(cons_app(z0, z1)) -> c4(APP(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) ENCODE_APP(z0, z1) -> c(APP(encArg(z0), encArg(z1))) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [1] POL(APP(x_1, x_2)) = x_1 POL(ENCARG(x_1)) = x_1 POL(ENCODE_APP(x_1, x_2)) = [1] POL(app(x_1, x_2)) = x_2 POL(c(x_1)) = x_1 POL(c11) = 0 POL(c12) = 0 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c4(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(c_app(x_1, x_2)) = x_2 POL(cons_app(x_1, x_2)) = [1] + x_1 + x_2 POL(encArg(x_1)) = [1] POL(id) = [1] POL(plus) = 0 POL(s) = 0 ---------------------------------------- (22) Obligation: Complexity Dependency Tuples Problem Rules: encArg(id) -> id encArg(plus) -> plus encArg(0) -> 0 encArg(s) -> s encArg(cons_app(z0, z1)) -> app(encArg(z0), encArg(z1)) app(z0, z1) -> c_app(z0, z1) app(id, z0) -> z0 app(plus, 0) -> id app(c_app(plus, c_app(s, z0)), z1) -> app(s, app(app(plus, z0), z1)) Tuples: ENCARG(cons_app(z0, z1)) -> c4(APP(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) ENCODE_APP(z0, z1) -> c(APP(encArg(z0), encArg(z1))) S tuples: APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) K tuples: APP(id, z0) -> c11 Defined Rule Symbols: encArg_1, app_2 Defined Pair Symbols: ENCARG_1, APP_2, ENCODE_APP_2 Compound Symbols: c4_3, c11, c12, c13_2, c_1 ---------------------------------------- (23) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) We considered the (Usable) Rules: app(z0, z1) -> c_app(z0, z1) encArg(plus) -> plus encArg(cons_app(z0, z1)) -> app(encArg(z0), encArg(z1)) encArg(id) -> id app(c_app(plus, c_app(s, z0)), z1) -> app(s, app(app(plus, z0), z1)) encArg(s) -> s encArg(0) -> 0 app(id, z0) -> z0 app(plus, 0) -> id And the Tuples: ENCARG(cons_app(z0, z1)) -> c4(APP(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) ENCODE_APP(z0, z1) -> c(APP(encArg(z0), encArg(z1))) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(APP(x_1, x_2)) = [2]x_1 POL(ENCARG(x_1)) = [2]x_1 + x_1^2 POL(ENCODE_APP(x_1, x_2)) = [2] + [2]x_1 + [2]x_2 + [2]x_2^2 + [2]x_1*x_2 + [2]x_1^2 POL(app(x_1, x_2)) = x_1 + x_2 POL(c(x_1)) = x_1 POL(c11) = 0 POL(c12) = 0 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c4(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(c_app(x_1, x_2)) = x_1 + x_2 POL(cons_app(x_1, x_2)) = [2] + x_1 + x_2 POL(encArg(x_1)) = x_1 POL(id) = 0 POL(plus) = 0 POL(s) = [1] ---------------------------------------- (24) Obligation: Complexity Dependency Tuples Problem Rules: encArg(id) -> id encArg(plus) -> plus encArg(0) -> 0 encArg(s) -> s encArg(cons_app(z0, z1)) -> app(encArg(z0), encArg(z1)) app(z0, z1) -> c_app(z0, z1) app(id, z0) -> z0 app(plus, 0) -> id app(c_app(plus, c_app(s, z0)), z1) -> app(s, app(app(plus, z0), z1)) Tuples: ENCARG(cons_app(z0, z1)) -> c4(APP(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) ENCODE_APP(z0, z1) -> c(APP(encArg(z0), encArg(z1))) S tuples: APP(plus, 0) -> c12 K tuples: APP(id, z0) -> c11 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) Defined Rule Symbols: encArg_1, app_2 Defined Pair Symbols: ENCARG_1, APP_2, ENCODE_APP_2 Compound Symbols: c4_3, c11, c12, c13_2, c_1 ---------------------------------------- (25) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. APP(plus, 0) -> c12 We considered the (Usable) Rules: app(z0, z1) -> c_app(z0, z1) encArg(plus) -> plus encArg(cons_app(z0, z1)) -> app(encArg(z0), encArg(z1)) encArg(id) -> id app(c_app(plus, c_app(s, z0)), z1) -> app(s, app(app(plus, z0), z1)) encArg(s) -> s encArg(0) -> 0 app(id, z0) -> z0 app(plus, 0) -> id And the Tuples: ENCARG(cons_app(z0, z1)) -> c4(APP(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) ENCODE_APP(z0, z1) -> c(APP(encArg(z0), encArg(z1))) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(APP(x_1, x_2)) = [2]x_1 POL(ENCARG(x_1)) = x_1^2 POL(ENCODE_APP(x_1, x_2)) = [2] + [2]x_1 + [2]x_2^2 + [2]x_1*x_2 + [2]x_1^2 POL(app(x_1, x_2)) = x_1 + x_2 POL(c(x_1)) = x_1 POL(c11) = 0 POL(c12) = 0 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c4(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(c_app(x_1, x_2)) = x_1 + x_2 POL(cons_app(x_1, x_2)) = [1] + x_1 + x_2 POL(encArg(x_1)) = x_1 POL(id) = 0 POL(plus) = [1] POL(s) = [1] ---------------------------------------- (26) Obligation: Complexity Dependency Tuples Problem Rules: encArg(id) -> id encArg(plus) -> plus encArg(0) -> 0 encArg(s) -> s encArg(cons_app(z0, z1)) -> app(encArg(z0), encArg(z1)) app(z0, z1) -> c_app(z0, z1) app(id, z0) -> z0 app(plus, 0) -> id app(c_app(plus, c_app(s, z0)), z1) -> app(s, app(app(plus, z0), z1)) Tuples: ENCARG(cons_app(z0, z1)) -> c4(APP(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) APP(id, z0) -> c11 APP(plus, 0) -> c12 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) ENCODE_APP(z0, z1) -> c(APP(encArg(z0), encArg(z1))) S tuples:none K tuples: APP(id, z0) -> c11 APP(c_app(plus, c_app(s, z0)), z1) -> c13(APP(app(plus, z0), z1), APP(plus, z0)) APP(plus, 0) -> c12 Defined Rule Symbols: encArg_1, app_2 Defined Pair Symbols: ENCARG_1, APP_2, ENCODE_APP_2 Compound Symbols: c4_3, c11, c12, c13_2, c_1 ---------------------------------------- (27) SIsEmptyProof (BOTH BOUNDS(ID, ID)) The set S is empty ---------------------------------------- (28) BOUNDS(1, 1) ---------------------------------------- (29) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (30) Obligation: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: app(id, x) -> x app(plus, 0') -> id app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y)) The (relative) TRS S consists of the following rules: encArg(id) -> id encArg(plus) -> plus encArg(0') -> 0' encArg(s) -> s encArg(cons_app(x_1, x_2)) -> app(encArg(x_1), encArg(x_2)) encode_app(x_1, x_2) -> app(encArg(x_1), encArg(x_2)) encode_id -> id encode_plus -> plus encode_0 -> 0' encode_s -> s Rewrite Strategy: FULL ---------------------------------------- (31) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (32) Obligation: TRS: Rules: app(id, x) -> x app(plus, 0') -> id app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y)) encArg(id) -> id encArg(plus) -> plus encArg(0') -> 0' encArg(s) -> s encArg(cons_app(x_1, x_2)) -> app(encArg(x_1), encArg(x_2)) encode_app(x_1, x_2) -> app(encArg(x_1), encArg(x_2)) encode_id -> id encode_plus -> plus encode_0 -> 0' encode_s -> s Types: app :: id:plus:0':s:cons_app -> id:plus:0':s:cons_app -> id:plus:0':s:cons_app id :: id:plus:0':s:cons_app plus :: id:plus:0':s:cons_app 0' :: id:plus:0':s:cons_app s :: id:plus:0':s:cons_app encArg :: id:plus:0':s:cons_app -> id:plus:0':s:cons_app cons_app :: id:plus:0':s:cons_app -> id:plus:0':s:cons_app -> id:plus:0':s:cons_app encode_app :: id:plus:0':s:cons_app -> id:plus:0':s:cons_app -> id:plus:0':s:cons_app encode_id :: id:plus:0':s:cons_app encode_plus :: id:plus:0':s:cons_app encode_0 :: id:plus:0':s:cons_app encode_s :: id:plus:0':s:cons_app hole_id:plus:0':s:cons_app1_3 :: id:plus:0':s:cons_app gen_id:plus:0':s:cons_app2_3 :: Nat -> id:plus:0':s:cons_app ---------------------------------------- (33) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: app, encArg They will be analysed ascendingly in the following order: app < encArg ---------------------------------------- (34) Obligation: TRS: Rules: app(id, x) -> x app(plus, 0') -> id app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y)) encArg(id) -> id encArg(plus) -> plus encArg(0') -> 0' encArg(s) -> s encArg(cons_app(x_1, x_2)) -> app(encArg(x_1), encArg(x_2)) encode_app(x_1, x_2) -> app(encArg(x_1), encArg(x_2)) encode_id -> id encode_plus -> plus encode_0 -> 0' encode_s -> s Types: app :: id:plus:0':s:cons_app -> id:plus:0':s:cons_app -> id:plus:0':s:cons_app id :: id:plus:0':s:cons_app plus :: id:plus:0':s:cons_app 0' :: id:plus:0':s:cons_app s :: id:plus:0':s:cons_app encArg :: id:plus:0':s:cons_app -> id:plus:0':s:cons_app cons_app :: id:plus:0':s:cons_app -> id:plus:0':s:cons_app -> id:plus:0':s:cons_app encode_app :: id:plus:0':s:cons_app -> id:plus:0':s:cons_app -> id:plus:0':s:cons_app encode_id :: id:plus:0':s:cons_app encode_plus :: id:plus:0':s:cons_app encode_0 :: id:plus:0':s:cons_app encode_s :: id:plus:0':s:cons_app hole_id:plus:0':s:cons_app1_3 :: id:plus:0':s:cons_app gen_id:plus:0':s:cons_app2_3 :: Nat -> id:plus:0':s:cons_app Generator Equations: gen_id:plus:0':s:cons_app2_3(0) <=> id gen_id:plus:0':s:cons_app2_3(+(x, 1)) <=> cons_app(id, gen_id:plus:0':s:cons_app2_3(x)) The following defined symbols remain to be analysed: app, encArg They will be analysed ascendingly in the following order: app < encArg ---------------------------------------- (35) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: encArg(gen_id:plus:0':s:cons_app2_3(n20_3)) -> gen_id:plus:0':s:cons_app2_3(0), rt in Omega(n20_3) Induction Base: encArg(gen_id:plus:0':s:cons_app2_3(0)) ->_R^Omega(0) id Induction Step: encArg(gen_id:plus:0':s:cons_app2_3(+(n20_3, 1))) ->_R^Omega(0) app(encArg(id), encArg(gen_id:plus:0':s:cons_app2_3(n20_3))) ->_R^Omega(0) app(id, encArg(gen_id:plus:0':s:cons_app2_3(n20_3))) ->_IH app(id, gen_id:plus:0':s:cons_app2_3(0)) ->_R^Omega(1) gen_id:plus:0':s:cons_app2_3(0) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (36) Obligation: Proved the lower bound n^1 for the following obligation: TRS: Rules: app(id, x) -> x app(plus, 0') -> id app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y)) encArg(id) -> id encArg(plus) -> plus encArg(0') -> 0' encArg(s) -> s encArg(cons_app(x_1, x_2)) -> app(encArg(x_1), encArg(x_2)) encode_app(x_1, x_2) -> app(encArg(x_1), encArg(x_2)) encode_id -> id encode_plus -> plus encode_0 -> 0' encode_s -> s Types: app :: id:plus:0':s:cons_app -> id:plus:0':s:cons_app -> id:plus:0':s:cons_app id :: id:plus:0':s:cons_app plus :: id:plus:0':s:cons_app 0' :: id:plus:0':s:cons_app s :: id:plus:0':s:cons_app encArg :: id:plus:0':s:cons_app -> id:plus:0':s:cons_app cons_app :: id:plus:0':s:cons_app -> id:plus:0':s:cons_app -> id:plus:0':s:cons_app encode_app :: id:plus:0':s:cons_app -> id:plus:0':s:cons_app -> id:plus:0':s:cons_app encode_id :: id:plus:0':s:cons_app encode_plus :: id:plus:0':s:cons_app encode_0 :: id:plus:0':s:cons_app encode_s :: id:plus:0':s:cons_app hole_id:plus:0':s:cons_app1_3 :: id:plus:0':s:cons_app gen_id:plus:0':s:cons_app2_3 :: Nat -> id:plus:0':s:cons_app Generator Equations: gen_id:plus:0':s:cons_app2_3(0) <=> id gen_id:plus:0':s:cons_app2_3(+(x, 1)) <=> cons_app(id, gen_id:plus:0':s:cons_app2_3(x)) The following defined symbols remain to be analysed: encArg ---------------------------------------- (37) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (38) BOUNDS(n^1, INF)