/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxTRS (1) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxTRS (3) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (4) CdtProblem (5) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 1 ms] (6) CdtProblem (7) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CdtProblem (9) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 43 ms] (10) CdtProblem (11) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 4 ms] (12) CdtProblem (13) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CdtProblem (15) CdtRhsSimplificationProcessorProof [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)), 0 ms] (22) CdtProblem (23) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] (24) BOUNDS(1, 1) (25) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (26) CpxTRS (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), 282 ms] (32) BEST (33) proven lower bound (34) LowerBoundPropagationProof [FINISHED, 0 ms] (35) BOUNDS(n^1, INF) (36) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: f(x, 0) -> s(0) f(s(x), s(y)) -> s(f(x, y)) g(0, x) -> g(f(x, x), x) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. The duplicating contexts are: g(0, []) The defined contexts are: g([], x1) As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc. ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: f(x, 0) -> s(0) f(s(x), s(y)) -> s(f(x, y)) g(0, x) -> g(f(x, x), x) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (3) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: f(z0, 0) -> s(0) f(s(z0), s(z1)) -> s(f(z0, z1)) g(0, z0) -> g(f(z0, z0), z0) Tuples: F(z0, 0) -> c F(s(z0), s(z1)) -> c1(F(z0, z1)) G(0, z0) -> c2(G(f(z0, z0), z0), F(z0, z0)) S tuples: F(z0, 0) -> c F(s(z0), s(z1)) -> c1(F(z0, z1)) G(0, z0) -> c2(G(f(z0, z0), z0), F(z0, z0)) K tuples:none Defined Rule Symbols: f_2, g_2 Defined Pair Symbols: F_2, G_2 Compound Symbols: c, c1_1, c2_2 ---------------------------------------- (5) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing nodes: F(z0, 0) -> c ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: f(z0, 0) -> s(0) f(s(z0), s(z1)) -> s(f(z0, z1)) g(0, z0) -> g(f(z0, z0), z0) Tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) G(0, z0) -> c2(G(f(z0, z0), z0), F(z0, z0)) S tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) G(0, z0) -> c2(G(f(z0, z0), z0), F(z0, z0)) K tuples:none Defined Rule Symbols: f_2, g_2 Defined Pair Symbols: F_2, G_2 Compound Symbols: c1_1, c2_2 ---------------------------------------- (7) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: g(0, z0) -> g(f(z0, z0), z0) ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: f(z0, 0) -> s(0) f(s(z0), s(z1)) -> s(f(z0, z1)) Tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) G(0, z0) -> c2(G(f(z0, z0), z0), F(z0, z0)) S tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) G(0, z0) -> c2(G(f(z0, z0), z0), F(z0, z0)) K tuples:none Defined Rule Symbols: f_2 Defined Pair Symbols: F_2, G_2 Compound Symbols: c1_1, c2_2 ---------------------------------------- (9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. G(0, z0) -> c2(G(f(z0, z0), z0), F(z0, z0)) We considered the (Usable) Rules: f(s(z0), s(z1)) -> s(f(z0, z1)) f(z0, 0) -> s(0) And the Tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) G(0, z0) -> c2(G(f(z0, z0), z0), F(z0, z0)) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [1] POL(F(x_1, x_2)) = 0 POL(G(x_1, x_2)) = x_1 POL(c1(x_1)) = x_1 POL(c2(x_1, x_2)) = x_1 + x_2 POL(f(x_1, x_2)) = 0 POL(s(x_1)) = 0 ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules: f(z0, 0) -> s(0) f(s(z0), s(z1)) -> s(f(z0, z1)) Tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) G(0, z0) -> c2(G(f(z0, z0), z0), F(z0, z0)) S tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) K tuples: G(0, z0) -> c2(G(f(z0, z0), z0), F(z0, z0)) Defined Rule Symbols: f_2 Defined Pair Symbols: F_2, G_2 Compound Symbols: c1_1, c2_2 ---------------------------------------- (11) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace G(0, z0) -> c2(G(f(z0, z0), z0), F(z0, z0)) by G(0, 0) -> c2(G(s(0), 0), F(0, 0)) G(0, s(z0)) -> c2(G(s(f(z0, z0)), s(z0)), F(s(z0), s(z0))) ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules: f(z0, 0) -> s(0) f(s(z0), s(z1)) -> s(f(z0, z1)) Tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) G(0, 0) -> c2(G(s(0), 0), F(0, 0)) G(0, s(z0)) -> c2(G(s(f(z0, z0)), s(z0)), F(s(z0), s(z0))) S tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) K tuples: G(0, z0) -> c2(G(f(z0, z0), z0), F(z0, z0)) Defined Rule Symbols: f_2 Defined Pair Symbols: F_2, G_2 Compound Symbols: c1_1, c2_2 ---------------------------------------- (13) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing nodes: G(0, 0) -> c2(G(s(0), 0), F(0, 0)) ---------------------------------------- (14) Obligation: Complexity Dependency Tuples Problem Rules: f(z0, 0) -> s(0) f(s(z0), s(z1)) -> s(f(z0, z1)) Tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) G(0, s(z0)) -> c2(G(s(f(z0, z0)), s(z0)), F(s(z0), s(z0))) S tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) K tuples:none Defined Rule Symbols: f_2 Defined Pair Symbols: F_2, G_2 Compound Symbols: c1_1, c2_2 ---------------------------------------- (15) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (16) Obligation: Complexity Dependency Tuples Problem Rules: f(z0, 0) -> s(0) f(s(z0), s(z1)) -> s(f(z0, z1)) Tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) G(0, s(z0)) -> c2(F(s(z0), s(z0))) S tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) K tuples:none Defined Rule Symbols: f_2 Defined Pair Symbols: F_2, G_2 Compound Symbols: c1_1, c2_1 ---------------------------------------- (17) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 1 leading nodes: G(0, s(z0)) -> c2(F(s(z0), s(z0))) ---------------------------------------- (18) Obligation: Complexity Dependency Tuples Problem Rules: f(z0, 0) -> s(0) f(s(z0), s(z1)) -> s(f(z0, z1)) Tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) S tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) K tuples:none Defined Rule Symbols: f_2 Defined Pair Symbols: F_2 Compound Symbols: c1_1 ---------------------------------------- (19) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: f(z0, 0) -> s(0) f(s(z0), s(z1)) -> s(f(z0, z1)) ---------------------------------------- (20) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) S tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: F_2 Compound Symbols: c1_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. F(s(z0), s(z1)) -> c1(F(z0, z1)) We considered the (Usable) Rules:none And the Tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) The order we found is given by the following interpretation: Polynomial interpretation : POL(F(x_1, x_2)) = x_1 POL(c1(x_1)) = x_1 POL(s(x_1)) = [1] + x_1 ---------------------------------------- (22) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) S tuples:none K tuples: F(s(z0), s(z1)) -> c1(F(z0, z1)) Defined Rule Symbols:none Defined Pair Symbols: F_2 Compound Symbols: c1_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 CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: f(x, 0') -> s(0') f(s(x), s(y)) -> s(f(x, y)) g(0', x) -> g(f(x, x), x) S is empty. Rewrite Strategy: FULL ---------------------------------------- (27) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (28) Obligation: TRS: Rules: f(x, 0') -> s(0') f(s(x), s(y)) -> s(f(x, y)) g(0', x) -> g(f(x, x), x) Types: f :: 0':s -> 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s g :: 0':s -> 0':s -> g hole_0':s1_0 :: 0':s hole_g2_0 :: g gen_0':s3_0 :: Nat -> 0':s ---------------------------------------- (29) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: f, g They will be analysed ascendingly in the following order: f < g ---------------------------------------- (30) Obligation: TRS: Rules: f(x, 0') -> s(0') f(s(x), s(y)) -> s(f(x, y)) g(0', x) -> g(f(x, x), x) Types: f :: 0':s -> 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s g :: 0':s -> 0':s -> g hole_0':s1_0 :: 0':s hole_g2_0 :: g gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: f, g They will be analysed ascendingly in the following order: f < g ---------------------------------------- (31) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: f(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> gen_0':s3_0(+(1, n5_0)), rt in Omega(1 + n5_0) Induction Base: f(gen_0':s3_0(0), gen_0':s3_0(0)) ->_R^Omega(1) s(0') Induction Step: f(gen_0':s3_0(+(n5_0, 1)), gen_0':s3_0(+(n5_0, 1))) ->_R^Omega(1) s(f(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0))) ->_IH s(gen_0':s3_0(+(1, c6_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: f(x, 0') -> s(0') f(s(x), s(y)) -> s(f(x, y)) g(0', x) -> g(f(x, x), x) Types: f :: 0':s -> 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s g :: 0':s -> 0':s -> g hole_0':s1_0 :: 0':s hole_g2_0 :: g gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: f, g They will be analysed ascendingly in the following order: f < g ---------------------------------------- (34) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (35) BOUNDS(n^1, INF) ---------------------------------------- (36) Obligation: TRS: Rules: f(x, 0') -> s(0') f(s(x), s(y)) -> s(f(x, y)) g(0', x) -> g(f(x, x), x) Types: f :: 0':s -> 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s g :: 0':s -> 0':s -> g hole_0':s1_0 :: 0':s hole_g2_0 :: g gen_0':s3_0 :: Nat -> 0':s Lemmas: f(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> gen_0':s3_0(+(1, n5_0)), rt in Omega(1 + n5_0) Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: g