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), 166 ms] (4) CpxRelTRS (5) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxRelTRS (7) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (8) CdtProblem (9) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (10) CdtProblem (11) CdtGraphSplitRhsProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CdtProblem (13) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (14) CdtProblem (15) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CdtProblem (17) CdtRuleRemovalProof [UPPER BOUND(ADD(n^2)), 142 ms] (18) CdtProblem (19) CdtRuleRemovalProof [UPPER BOUND(ADD(n^2)), 79 ms] (20) CdtProblem (21) CdtRuleRemovalProof [UPPER BOUND(ADD(n^2)), 55 ms] (22) CdtProblem (23) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] (24) BOUNDS(1, 1) (25) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (26) CpxRelTRS (27) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (28) typed CpxTrs (29) OrderProof [LOWER BOUND(ID), 0 ms] (30) typed CpxTrs (31) RewriteLemmaProof [LOWER BOUND(ID), 442 ms] (32) BEST (33) proven lower bound (34) LowerBoundPropagationProof [FINISHED, 0 ms] (35) BOUNDS(n^1, INF) (36) typed CpxTrs (37) RewriteLemmaProof [LOWER BOUND(ID), 381 ms] (38) BOUNDS(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: g(f(x, y), z) -> f(x, g(y, z)) g(h(x, y), z) -> g(x, f(y, z)) g(x, h(y, z)) -> h(g(x, y), z) 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(f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(h(x_1, x_2)) -> h(encArg(x_1), encArg(x_2)) encArg(cons_g(x_1, x_2)) -> g(encArg(x_1), encArg(x_2)) encode_g(x_1, x_2) -> g(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_h(x_1, x_2) -> h(encArg(x_1), encArg(x_2)) ---------------------------------------- (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: g(f(x, y), z) -> f(x, g(y, z)) g(h(x, y), z) -> g(x, f(y, z)) g(x, h(y, z)) -> h(g(x, y), z) The (relative) TRS S consists of the following rules: encArg(f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(h(x_1, x_2)) -> h(encArg(x_1), encArg(x_2)) encArg(cons_g(x_1, x_2)) -> g(encArg(x_1), encArg(x_2)) encode_g(x_1, x_2) -> g(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_h(x_1, x_2) -> h(encArg(x_1), encArg(x_2)) 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: g(f(x, y), z) -> f(x, g(y, z)) g(h(x, y), z) -> g(x, f(y, z)) g(x, h(y, z)) -> h(g(x, y), z) The (relative) TRS S consists of the following rules: encArg(f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(h(x_1, x_2)) -> h(encArg(x_1), encArg(x_2)) encArg(cons_g(x_1, x_2)) -> g(encArg(x_1), encArg(x_2)) encode_g(x_1, x_2) -> g(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_h(x_1, x_2) -> h(encArg(x_1), encArg(x_2)) Rewrite Strategy: FULL ---------------------------------------- (5) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. As the TRS is a non-duplicating overlay system, we have rc = irc. ---------------------------------------- (6) 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: g(f(x, y), z) -> f(x, g(y, z)) g(h(x, y), z) -> g(x, f(y, z)) g(x, h(y, z)) -> h(g(x, y), z) The (relative) TRS S consists of the following rules: encArg(f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(h(x_1, x_2)) -> h(encArg(x_1), encArg(x_2)) encArg(cons_g(x_1, x_2)) -> g(encArg(x_1), encArg(x_2)) encode_g(x_1, x_2) -> g(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_h(x_1, x_2) -> h(encArg(x_1), encArg(x_2)) Rewrite Strategy: INNERMOST ---------------------------------------- (7) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: encArg(f(z0, z1)) -> f(encArg(z0), encArg(z1)) encArg(h(z0, z1)) -> h(encArg(z0), encArg(z1)) encArg(cons_g(z0, z1)) -> g(encArg(z0), encArg(z1)) encode_g(z0, z1) -> g(encArg(z0), encArg(z1)) encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_h(z0, z1) -> h(encArg(z0), encArg(z1)) g(f(z0, z1), z2) -> f(z0, g(z1, z2)) g(h(z0, z1), z2) -> g(z0, f(z1, z2)) g(z0, h(z1, z2)) -> h(g(z0, z1), z2) Tuples: ENCARG(f(z0, z1)) -> c(ENCARG(z0), ENCARG(z1)) ENCARG(h(z0, z1)) -> c1(ENCARG(z0), ENCARG(z1)) ENCARG(cons_g(z0, z1)) -> c2(G(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) ENCODE_G(z0, z1) -> c3(G(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) ENCODE_F(z0, z1) -> c4(ENCARG(z0), ENCARG(z1)) ENCODE_H(z0, z1) -> c5(ENCARG(z0), ENCARG(z1)) G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) S tuples: G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) K tuples:none Defined Rule Symbols: g_2, encArg_1, encode_g_2, encode_f_2, encode_h_2 Defined Pair Symbols: ENCARG_1, ENCODE_G_2, ENCODE_F_2, ENCODE_H_2, G_2 Compound Symbols: c_2, c1_2, c2_3, c3_3, c4_2, c5_2, c6_1, c7_1, c8_1 ---------------------------------------- (9) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 2 leading nodes: ENCODE_F(z0, z1) -> c4(ENCARG(z0), ENCARG(z1)) ENCODE_H(z0, z1) -> c5(ENCARG(z0), ENCARG(z1)) ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules: encArg(f(z0, z1)) -> f(encArg(z0), encArg(z1)) encArg(h(z0, z1)) -> h(encArg(z0), encArg(z1)) encArg(cons_g(z0, z1)) -> g(encArg(z0), encArg(z1)) encode_g(z0, z1) -> g(encArg(z0), encArg(z1)) encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_h(z0, z1) -> h(encArg(z0), encArg(z1)) g(f(z0, z1), z2) -> f(z0, g(z1, z2)) g(h(z0, z1), z2) -> g(z0, f(z1, z2)) g(z0, h(z1, z2)) -> h(g(z0, z1), z2) Tuples: ENCARG(f(z0, z1)) -> c(ENCARG(z0), ENCARG(z1)) ENCARG(h(z0, z1)) -> c1(ENCARG(z0), ENCARG(z1)) ENCARG(cons_g(z0, z1)) -> c2(G(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) ENCODE_G(z0, z1) -> c3(G(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) S tuples: G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) K tuples:none Defined Rule Symbols: g_2, encArg_1, encode_g_2, encode_f_2, encode_h_2 Defined Pair Symbols: ENCARG_1, ENCODE_G_2, G_2 Compound Symbols: c_2, c1_2, c2_3, c3_3, c6_1, c7_1, c8_1 ---------------------------------------- (11) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID)) Split RHS of tuples not part of any SCC ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules: encArg(f(z0, z1)) -> f(encArg(z0), encArg(z1)) encArg(h(z0, z1)) -> h(encArg(z0), encArg(z1)) encArg(cons_g(z0, z1)) -> g(encArg(z0), encArg(z1)) encode_g(z0, z1) -> g(encArg(z0), encArg(z1)) encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_h(z0, z1) -> h(encArg(z0), encArg(z1)) g(f(z0, z1), z2) -> f(z0, g(z1, z2)) g(h(z0, z1), z2) -> g(z0, f(z1, z2)) g(z0, h(z1, z2)) -> h(g(z0, z1), z2) Tuples: ENCARG(f(z0, z1)) -> c(ENCARG(z0), ENCARG(z1)) ENCARG(h(z0, z1)) -> c1(ENCARG(z0), ENCARG(z1)) ENCARG(cons_g(z0, z1)) -> c2(G(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) ENCODE_G(z0, z1) -> c4(G(encArg(z0), encArg(z1))) ENCODE_G(z0, z1) -> c4(ENCARG(z0)) ENCODE_G(z0, z1) -> c4(ENCARG(z1)) S tuples: G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) K tuples:none Defined Rule Symbols: g_2, encArg_1, encode_g_2, encode_f_2, encode_h_2 Defined Pair Symbols: ENCARG_1, G_2, ENCODE_G_2 Compound Symbols: c_2, c1_2, c2_3, c6_1, c7_1, c8_1, c4_1 ---------------------------------------- (13) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 2 leading nodes: ENCODE_G(z0, z1) -> c4(ENCARG(z0)) ENCODE_G(z0, z1) -> c4(ENCARG(z1)) ---------------------------------------- (14) Obligation: Complexity Dependency Tuples Problem Rules: encArg(f(z0, z1)) -> f(encArg(z0), encArg(z1)) encArg(h(z0, z1)) -> h(encArg(z0), encArg(z1)) encArg(cons_g(z0, z1)) -> g(encArg(z0), encArg(z1)) encode_g(z0, z1) -> g(encArg(z0), encArg(z1)) encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_h(z0, z1) -> h(encArg(z0), encArg(z1)) g(f(z0, z1), z2) -> f(z0, g(z1, z2)) g(h(z0, z1), z2) -> g(z0, f(z1, z2)) g(z0, h(z1, z2)) -> h(g(z0, z1), z2) Tuples: ENCARG(f(z0, z1)) -> c(ENCARG(z0), ENCARG(z1)) ENCARG(h(z0, z1)) -> c1(ENCARG(z0), ENCARG(z1)) ENCARG(cons_g(z0, z1)) -> c2(G(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) ENCODE_G(z0, z1) -> c4(G(encArg(z0), encArg(z1))) S tuples: G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) K tuples:none Defined Rule Symbols: g_2, encArg_1, encode_g_2, encode_f_2, encode_h_2 Defined Pair Symbols: ENCARG_1, G_2, ENCODE_G_2 Compound Symbols: c_2, c1_2, c2_3, c6_1, c7_1, c8_1, c4_1 ---------------------------------------- (15) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: encode_g(z0, z1) -> g(encArg(z0), encArg(z1)) encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_h(z0, z1) -> h(encArg(z0), encArg(z1)) ---------------------------------------- (16) Obligation: Complexity Dependency Tuples Problem Rules: encArg(f(z0, z1)) -> f(encArg(z0), encArg(z1)) encArg(h(z0, z1)) -> h(encArg(z0), encArg(z1)) encArg(cons_g(z0, z1)) -> g(encArg(z0), encArg(z1)) g(f(z0, z1), z2) -> f(z0, g(z1, z2)) g(h(z0, z1), z2) -> g(z0, f(z1, z2)) g(z0, h(z1, z2)) -> h(g(z0, z1), z2) Tuples: ENCARG(f(z0, z1)) -> c(ENCARG(z0), ENCARG(z1)) ENCARG(h(z0, z1)) -> c1(ENCARG(z0), ENCARG(z1)) ENCARG(cons_g(z0, z1)) -> c2(G(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) ENCODE_G(z0, z1) -> c4(G(encArg(z0), encArg(z1))) S tuples: G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) K tuples:none Defined Rule Symbols: encArg_1, g_2 Defined Pair Symbols: ENCARG_1, G_2, ENCODE_G_2 Compound Symbols: c_2, c1_2, c2_3, c6_1, c7_1, c8_1, c4_1 ---------------------------------------- (17) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) We considered the (Usable) Rules: g(h(z0, z1), z2) -> g(z0, f(z1, z2)) g(f(z0, z1), z2) -> f(z0, g(z1, z2)) encArg(h(z0, z1)) -> h(encArg(z0), encArg(z1)) encArg(f(z0, z1)) -> f(encArg(z0), encArg(z1)) g(z0, h(z1, z2)) -> h(g(z0, z1), z2) encArg(cons_g(z0, z1)) -> g(encArg(z0), encArg(z1)) And the Tuples: ENCARG(f(z0, z1)) -> c(ENCARG(z0), ENCARG(z1)) ENCARG(h(z0, z1)) -> c1(ENCARG(z0), ENCARG(z1)) ENCARG(cons_g(z0, z1)) -> c2(G(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) ENCODE_G(z0, z1) -> c4(G(encArg(z0), encArg(z1))) The order we found is given by the following interpretation: Polynomial interpretation : POL(ENCARG(x_1)) = x_1^2 POL(ENCODE_G(x_1, x_2)) = [2] + [2]x_1 + x_2 + [2]x_2^2 + [2]x_1*x_2 + [2]x_1^2 POL(G(x_1, x_2)) = [2]x_1 POL(c(x_1, x_2)) = x_1 + x_2 POL(c1(x_1, x_2)) = x_1 + x_2 POL(c2(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(c4(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(cons_g(x_1, x_2)) = [1] + x_1 + x_2 POL(encArg(x_1)) = x_1 POL(f(x_1, x_2)) = x_1 + x_2 POL(g(x_1, x_2)) = x_1 + x_2 POL(h(x_1, x_2)) = [1] + x_1 + x_2 ---------------------------------------- (18) Obligation: Complexity Dependency Tuples Problem Rules: encArg(f(z0, z1)) -> f(encArg(z0), encArg(z1)) encArg(h(z0, z1)) -> h(encArg(z0), encArg(z1)) encArg(cons_g(z0, z1)) -> g(encArg(z0), encArg(z1)) g(f(z0, z1), z2) -> f(z0, g(z1, z2)) g(h(z0, z1), z2) -> g(z0, f(z1, z2)) g(z0, h(z1, z2)) -> h(g(z0, z1), z2) Tuples: ENCARG(f(z0, z1)) -> c(ENCARG(z0), ENCARG(z1)) ENCARG(h(z0, z1)) -> c1(ENCARG(z0), ENCARG(z1)) ENCARG(cons_g(z0, z1)) -> c2(G(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) ENCODE_G(z0, z1) -> c4(G(encArg(z0), encArg(z1))) S tuples: G(f(z0, z1), z2) -> c6(G(z1, z2)) G(z0, h(z1, z2)) -> c8(G(z0, z1)) K tuples: G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) Defined Rule Symbols: encArg_1, g_2 Defined Pair Symbols: ENCARG_1, G_2, ENCODE_G_2 Compound Symbols: c_2, c1_2, c2_3, c6_1, c7_1, c8_1, c4_1 ---------------------------------------- (19) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. G(f(z0, z1), z2) -> c6(G(z1, z2)) We considered the (Usable) Rules: g(h(z0, z1), z2) -> g(z0, f(z1, z2)) g(f(z0, z1), z2) -> f(z0, g(z1, z2)) encArg(h(z0, z1)) -> h(encArg(z0), encArg(z1)) encArg(f(z0, z1)) -> f(encArg(z0), encArg(z1)) g(z0, h(z1, z2)) -> h(g(z0, z1), z2) encArg(cons_g(z0, z1)) -> g(encArg(z0), encArg(z1)) And the Tuples: ENCARG(f(z0, z1)) -> c(ENCARG(z0), ENCARG(z1)) ENCARG(h(z0, z1)) -> c1(ENCARG(z0), ENCARG(z1)) ENCARG(cons_g(z0, z1)) -> c2(G(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) ENCODE_G(z0, z1) -> c4(G(encArg(z0), encArg(z1))) The order we found is given by the following interpretation: Polynomial interpretation : POL(ENCARG(x_1)) = [2]x_1 + x_1^2 POL(ENCODE_G(x_1, x_2)) = [2] + [2]x_1 + [2]x_2 + [2]x_2^2 + [2]x_1*x_2 + x_1^2 POL(G(x_1, x_2)) = [2]x_1 POL(c(x_1, x_2)) = x_1 + x_2 POL(c1(x_1, x_2)) = x_1 + x_2 POL(c2(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(c4(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(cons_g(x_1, x_2)) = [2] + x_1 + x_2 POL(encArg(x_1)) = x_1 POL(f(x_1, x_2)) = [2] + x_1 + x_2 POL(g(x_1, x_2)) = x_1 + x_2 POL(h(x_1, x_2)) = [2] + x_1 + x_2 ---------------------------------------- (20) Obligation: Complexity Dependency Tuples Problem Rules: encArg(f(z0, z1)) -> f(encArg(z0), encArg(z1)) encArg(h(z0, z1)) -> h(encArg(z0), encArg(z1)) encArg(cons_g(z0, z1)) -> g(encArg(z0), encArg(z1)) g(f(z0, z1), z2) -> f(z0, g(z1, z2)) g(h(z0, z1), z2) -> g(z0, f(z1, z2)) g(z0, h(z1, z2)) -> h(g(z0, z1), z2) Tuples: ENCARG(f(z0, z1)) -> c(ENCARG(z0), ENCARG(z1)) ENCARG(h(z0, z1)) -> c1(ENCARG(z0), ENCARG(z1)) ENCARG(cons_g(z0, z1)) -> c2(G(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) ENCODE_G(z0, z1) -> c4(G(encArg(z0), encArg(z1))) S tuples: G(z0, h(z1, z2)) -> c8(G(z0, z1)) K tuples: G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(f(z0, z1), z2) -> c6(G(z1, z2)) Defined Rule Symbols: encArg_1, g_2 Defined Pair Symbols: ENCARG_1, G_2, ENCODE_G_2 Compound Symbols: c_2, c1_2, c2_3, c6_1, c7_1, c8_1, c4_1 ---------------------------------------- (21) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. G(z0, h(z1, z2)) -> c8(G(z0, z1)) We considered the (Usable) Rules: g(h(z0, z1), z2) -> g(z0, f(z1, z2)) g(f(z0, z1), z2) -> f(z0, g(z1, z2)) encArg(h(z0, z1)) -> h(encArg(z0), encArg(z1)) encArg(f(z0, z1)) -> f(encArg(z0), encArg(z1)) g(z0, h(z1, z2)) -> h(g(z0, z1), z2) encArg(cons_g(z0, z1)) -> g(encArg(z0), encArg(z1)) And the Tuples: ENCARG(f(z0, z1)) -> c(ENCARG(z0), ENCARG(z1)) ENCARG(h(z0, z1)) -> c1(ENCARG(z0), ENCARG(z1)) ENCARG(cons_g(z0, z1)) -> c2(G(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) ENCODE_G(z0, z1) -> c4(G(encArg(z0), encArg(z1))) The order we found is given by the following interpretation: Polynomial interpretation : POL(ENCARG(x_1)) = [1] + x_1^2 POL(ENCODE_G(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(G(x_1, x_2)) = x_1 + x_2 POL(c(x_1, x_2)) = x_1 + x_2 POL(c1(x_1, x_2)) = x_1 + x_2 POL(c2(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(c4(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(cons_g(x_1, x_2)) = [2] + x_1 + x_2 POL(encArg(x_1)) = [1] + [2]x_1 POL(f(x_1, x_2)) = [1] + x_1 + x_2 POL(g(x_1, x_2)) = [1] + x_1 + x_2 POL(h(x_1, x_2)) = [2] + x_1 + x_2 ---------------------------------------- (22) Obligation: Complexity Dependency Tuples Problem Rules: encArg(f(z0, z1)) -> f(encArg(z0), encArg(z1)) encArg(h(z0, z1)) -> h(encArg(z0), encArg(z1)) encArg(cons_g(z0, z1)) -> g(encArg(z0), encArg(z1)) g(f(z0, z1), z2) -> f(z0, g(z1, z2)) g(h(z0, z1), z2) -> g(z0, f(z1, z2)) g(z0, h(z1, z2)) -> h(g(z0, z1), z2) Tuples: ENCARG(f(z0, z1)) -> c(ENCARG(z0), ENCARG(z1)) ENCARG(h(z0, z1)) -> c1(ENCARG(z0), ENCARG(z1)) ENCARG(cons_g(z0, z1)) -> c2(G(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) G(f(z0, z1), z2) -> c6(G(z1, z2)) G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(z0, h(z1, z2)) -> c8(G(z0, z1)) ENCODE_G(z0, z1) -> c4(G(encArg(z0), encArg(z1))) S tuples:none K tuples: G(h(z0, z1), z2) -> c7(G(z0, f(z1, z2))) G(f(z0, z1), z2) -> c6(G(z1, z2)) G(z0, h(z1, z2)) -> c8(G(z0, z1)) Defined Rule Symbols: encArg_1, g_2 Defined Pair Symbols: ENCARG_1, G_2, ENCODE_G_2 Compound Symbols: c_2, c1_2, c2_3, c6_1, c7_1, c8_1, c4_1 ---------------------------------------- (23) SIsEmptyProof (BOTH BOUNDS(ID, ID)) The set S is empty ---------------------------------------- (24) BOUNDS(1, 1) ---------------------------------------- (25) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (26) 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: g(f(x, y), z) -> f(x, g(y, z)) g(h(x, y), z) -> g(x, f(y, z)) g(x, h(y, z)) -> h(g(x, y), z) The (relative) TRS S consists of the following rules: encArg(f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(h(x_1, x_2)) -> h(encArg(x_1), encArg(x_2)) encArg(cons_g(x_1, x_2)) -> g(encArg(x_1), encArg(x_2)) encode_g(x_1, x_2) -> g(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_h(x_1, x_2) -> h(encArg(x_1), encArg(x_2)) Rewrite Strategy: FULL ---------------------------------------- (27) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (28) Obligation: TRS: Rules: g(f(x, y), z) -> f(x, g(y, z)) g(h(x, y), z) -> g(x, f(y, z)) g(x, h(y, z)) -> h(g(x, y), z) encArg(f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(h(x_1, x_2)) -> h(encArg(x_1), encArg(x_2)) encArg(cons_g(x_1, x_2)) -> g(encArg(x_1), encArg(x_2)) encode_g(x_1, x_2) -> g(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_h(x_1, x_2) -> h(encArg(x_1), encArg(x_2)) Types: g :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g f :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g h :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encArg :: f:h:cons_g -> f:h:cons_g cons_g :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encode_g :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encode_f :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encode_h :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g hole_f:h:cons_g1_0 :: f:h:cons_g gen_f:h:cons_g2_0 :: Nat -> f:h:cons_g ---------------------------------------- (29) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: g, encArg They will be analysed ascendingly in the following order: g < encArg ---------------------------------------- (30) Obligation: TRS: Rules: g(f(x, y), z) -> f(x, g(y, z)) g(h(x, y), z) -> g(x, f(y, z)) g(x, h(y, z)) -> h(g(x, y), z) encArg(f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(h(x_1, x_2)) -> h(encArg(x_1), encArg(x_2)) encArg(cons_g(x_1, x_2)) -> g(encArg(x_1), encArg(x_2)) encode_g(x_1, x_2) -> g(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_h(x_1, x_2) -> h(encArg(x_1), encArg(x_2)) Types: g :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g f :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g h :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encArg :: f:h:cons_g -> f:h:cons_g cons_g :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encode_g :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encode_f :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encode_h :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g hole_f:h:cons_g1_0 :: f:h:cons_g gen_f:h:cons_g2_0 :: Nat -> f:h:cons_g Generator Equations: gen_f:h:cons_g2_0(0) <=> hole_f:h:cons_g1_0 gen_f:h:cons_g2_0(+(x, 1)) <=> f(hole_f:h:cons_g1_0, gen_f:h:cons_g2_0(x)) The following defined symbols remain to be analysed: g, encArg They will be analysed ascendingly in the following order: g < encArg ---------------------------------------- (31) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: g(gen_f:h:cons_g2_0(+(1, n4_0)), gen_f:h:cons_g2_0(b)) -> *3_0, rt in Omega(n4_0) Induction Base: g(gen_f:h:cons_g2_0(+(1, 0)), gen_f:h:cons_g2_0(b)) Induction Step: g(gen_f:h:cons_g2_0(+(1, +(n4_0, 1))), gen_f:h:cons_g2_0(b)) ->_R^Omega(1) f(hole_f:h:cons_g1_0, g(gen_f:h:cons_g2_0(+(1, n4_0)), gen_f:h:cons_g2_0(b))) ->_IH f(hole_f:h:cons_g1_0, *3_0) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (32) Complex Obligation (BEST) ---------------------------------------- (33) Obligation: Proved the lower bound n^1 for the following obligation: TRS: Rules: g(f(x, y), z) -> f(x, g(y, z)) g(h(x, y), z) -> g(x, f(y, z)) g(x, h(y, z)) -> h(g(x, y), z) encArg(f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(h(x_1, x_2)) -> h(encArg(x_1), encArg(x_2)) encArg(cons_g(x_1, x_2)) -> g(encArg(x_1), encArg(x_2)) encode_g(x_1, x_2) -> g(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_h(x_1, x_2) -> h(encArg(x_1), encArg(x_2)) Types: g :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g f :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g h :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encArg :: f:h:cons_g -> f:h:cons_g cons_g :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encode_g :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encode_f :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encode_h :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g hole_f:h:cons_g1_0 :: f:h:cons_g gen_f:h:cons_g2_0 :: Nat -> f:h:cons_g Generator Equations: gen_f:h:cons_g2_0(0) <=> hole_f:h:cons_g1_0 gen_f:h:cons_g2_0(+(x, 1)) <=> f(hole_f:h:cons_g1_0, gen_f:h:cons_g2_0(x)) The following defined symbols remain to be analysed: g, encArg They will be analysed ascendingly in the following order: g < encArg ---------------------------------------- (34) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (35) BOUNDS(n^1, INF) ---------------------------------------- (36) Obligation: TRS: Rules: g(f(x, y), z) -> f(x, g(y, z)) g(h(x, y), z) -> g(x, f(y, z)) g(x, h(y, z)) -> h(g(x, y), z) encArg(f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(h(x_1, x_2)) -> h(encArg(x_1), encArg(x_2)) encArg(cons_g(x_1, x_2)) -> g(encArg(x_1), encArg(x_2)) encode_g(x_1, x_2) -> g(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_h(x_1, x_2) -> h(encArg(x_1), encArg(x_2)) Types: g :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g f :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g h :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encArg :: f:h:cons_g -> f:h:cons_g cons_g :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encode_g :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encode_f :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g encode_h :: f:h:cons_g -> f:h:cons_g -> f:h:cons_g hole_f:h:cons_g1_0 :: f:h:cons_g gen_f:h:cons_g2_0 :: Nat -> f:h:cons_g Lemmas: g(gen_f:h:cons_g2_0(+(1, n4_0)), gen_f:h:cons_g2_0(b)) -> *3_0, rt in Omega(n4_0) Generator Equations: gen_f:h:cons_g2_0(0) <=> hole_f:h:cons_g1_0 gen_f:h:cons_g2_0(+(x, 1)) <=> f(hole_f:h:cons_g1_0, gen_f:h:cons_g2_0(x)) The following defined symbols remain to be analysed: encArg ---------------------------------------- (37) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: encArg(gen_f:h:cons_g2_0(+(1, n1180_0))) -> *3_0, rt in Omega(0) Induction Base: encArg(gen_f:h:cons_g2_0(+(1, 0))) Induction Step: encArg(gen_f:h:cons_g2_0(+(1, +(n1180_0, 1)))) ->_R^Omega(0) f(encArg(hole_f:h:cons_g1_0), encArg(gen_f:h:cons_g2_0(+(1, n1180_0)))) ->_IH f(encArg(hole_f:h:cons_g1_0), *3_0) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (38) BOUNDS(1, INF)