/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), 3 ms] (4) CdtProblem (5) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (6) CdtProblem (7) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CdtProblem (9) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 31 ms] (10) CdtProblem (11) CdtKnowledgeProof [FINISHED, 0 ms] (12) BOUNDS(1, 1) (13) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxTRS (15) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (16) typed CpxTrs (17) OrderProof [LOWER BOUND(ID), 0 ms] (18) typed CpxTrs (19) RewriteLemmaProof [LOWER BOUND(ID), 876 ms] (20) proven lower bound (21) LowerBoundPropagationProof [FINISHED, 0 ms] (22) BOUNDS(n^1, INF) ---------------------------------------- (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: g(0, f(x, x)) -> x g(x, s(y)) -> g(f(x, y), 0) g(s(x), y) -> g(f(x, y), 0) g(f(x, y), 0) -> f(g(x, 0), g(y, 0)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. As the TRS does not nest defined symbols, 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: g(0, f(x, x)) -> x g(x, s(y)) -> g(f(x, y), 0) g(s(x), y) -> g(f(x, y), 0) g(f(x, y), 0) -> f(g(x, 0), g(y, 0)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (3) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: g(0, f(z0, z0)) -> z0 g(z0, s(z1)) -> g(f(z0, z1), 0) g(s(z0), z1) -> g(f(z0, z1), 0) g(f(z0, z1), 0) -> f(g(z0, 0), g(z1, 0)) Tuples: G(0, f(z0, z0)) -> c G(z0, s(z1)) -> c1(G(f(z0, z1), 0)) G(s(z0), z1) -> c2(G(f(z0, z1), 0)) G(f(z0, z1), 0) -> c3(G(z0, 0), G(z1, 0)) S tuples: G(0, f(z0, z0)) -> c G(z0, s(z1)) -> c1(G(f(z0, z1), 0)) G(s(z0), z1) -> c2(G(f(z0, z1), 0)) G(f(z0, z1), 0) -> c3(G(z0, 0), G(z1, 0)) K tuples:none Defined Rule Symbols: g_2 Defined Pair Symbols: G_2 Compound Symbols: c, c1_1, c2_1, c3_2 ---------------------------------------- (5) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 1 leading nodes: G(z0, s(z1)) -> c1(G(f(z0, z1), 0)) Removed 1 trailing nodes: G(0, f(z0, z0)) -> c ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: g(0, f(z0, z0)) -> z0 g(z0, s(z1)) -> g(f(z0, z1), 0) g(s(z0), z1) -> g(f(z0, z1), 0) g(f(z0, z1), 0) -> f(g(z0, 0), g(z1, 0)) Tuples: G(s(z0), z1) -> c2(G(f(z0, z1), 0)) G(f(z0, z1), 0) -> c3(G(z0, 0), G(z1, 0)) S tuples: G(s(z0), z1) -> c2(G(f(z0, z1), 0)) G(f(z0, z1), 0) -> c3(G(z0, 0), G(z1, 0)) K tuples:none Defined Rule Symbols: g_2 Defined Pair Symbols: G_2 Compound Symbols: c2_1, c3_2 ---------------------------------------- (7) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: g(0, f(z0, z0)) -> z0 g(z0, s(z1)) -> g(f(z0, z1), 0) g(s(z0), z1) -> g(f(z0, z1), 0) g(f(z0, z1), 0) -> f(g(z0, 0), g(z1, 0)) ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: G(s(z0), z1) -> c2(G(f(z0, z1), 0)) G(f(z0, z1), 0) -> c3(G(z0, 0), G(z1, 0)) S tuples: G(s(z0), z1) -> c2(G(f(z0, z1), 0)) G(f(z0, z1), 0) -> c3(G(z0, 0), G(z1, 0)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: G_2 Compound Symbols: c2_1, c3_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(f(z0, z1), 0) -> c3(G(z0, 0), G(z1, 0)) We considered the (Usable) Rules:none And the Tuples: G(s(z0), z1) -> c2(G(f(z0, z1), 0)) G(f(z0, z1), 0) -> c3(G(z0, 0), G(z1, 0)) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(G(x_1, x_2)) = x_1 + x_2 POL(c2(x_1)) = x_1 POL(c3(x_1, x_2)) = x_1 + x_2 POL(f(x_1, x_2)) = [1] + x_1 + x_2 POL(s(x_1)) = [1] + x_1 ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: G(s(z0), z1) -> c2(G(f(z0, z1), 0)) G(f(z0, z1), 0) -> c3(G(z0, 0), G(z1, 0)) S tuples: G(s(z0), z1) -> c2(G(f(z0, z1), 0)) K tuples: G(f(z0, z1), 0) -> c3(G(z0, 0), G(z1, 0)) Defined Rule Symbols:none Defined Pair Symbols: G_2 Compound Symbols: c2_1, c3_2 ---------------------------------------- (11) CdtKnowledgeProof (FINISHED) The following tuples could be moved from S to K by knowledge propagation: G(s(z0), z1) -> c2(G(f(z0, z1), 0)) G(f(z0, z1), 0) -> c3(G(z0, 0), G(z1, 0)) Now S is empty ---------------------------------------- (12) BOUNDS(1, 1) ---------------------------------------- (13) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (14) 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: g(0', f(x, x)) -> x g(x, s(y)) -> g(f(x, y), 0') g(s(x), y) -> g(f(x, y), 0') g(f(x, y), 0') -> f(g(x, 0'), g(y, 0')) S is empty. Rewrite Strategy: FULL ---------------------------------------- (15) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (16) Obligation: TRS: Rules: g(0', f(x, x)) -> x g(x, s(y)) -> g(f(x, y), 0') g(s(x), y) -> g(f(x, y), 0') g(f(x, y), 0') -> f(g(x, 0'), g(y, 0')) Types: g :: 0':f:s -> 0':f:s -> 0':f:s 0' :: 0':f:s f :: 0':f:s -> 0':f:s -> 0':f:s s :: 0':f:s -> 0':f:s hole_0':f:s1_0 :: 0':f:s gen_0':f:s2_0 :: Nat -> 0':f:s ---------------------------------------- (17) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: g ---------------------------------------- (18) Obligation: TRS: Rules: g(0', f(x, x)) -> x g(x, s(y)) -> g(f(x, y), 0') g(s(x), y) -> g(f(x, y), 0') g(f(x, y), 0') -> f(g(x, 0'), g(y, 0')) Types: g :: 0':f:s -> 0':f:s -> 0':f:s 0' :: 0':f:s f :: 0':f:s -> 0':f:s -> 0':f:s s :: 0':f:s -> 0':f:s hole_0':f:s1_0 :: 0':f:s gen_0':f:s2_0 :: Nat -> 0':f:s Generator Equations: gen_0':f:s2_0(0) <=> 0' gen_0':f:s2_0(+(x, 1)) <=> f(0', gen_0':f:s2_0(x)) The following defined symbols remain to be analysed: g ---------------------------------------- (19) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: g(gen_0':f:s2_0(+(1, n4_0)), gen_0':f:s2_0(0)) -> *3_0, rt in Omega(n4_0) Induction Base: g(gen_0':f:s2_0(+(1, 0)), gen_0':f:s2_0(0)) Induction Step: g(gen_0':f:s2_0(+(1, +(n4_0, 1))), gen_0':f:s2_0(0)) ->_R^Omega(1) f(g(0', 0'), g(gen_0':f:s2_0(+(1, n4_0)), 0')) ->_IH f(g(0', 0'), *3_0) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (20) Obligation: Proved the lower bound n^1 for the following obligation: TRS: Rules: g(0', f(x, x)) -> x g(x, s(y)) -> g(f(x, y), 0') g(s(x), y) -> g(f(x, y), 0') g(f(x, y), 0') -> f(g(x, 0'), g(y, 0')) Types: g :: 0':f:s -> 0':f:s -> 0':f:s 0' :: 0':f:s f :: 0':f:s -> 0':f:s -> 0':f:s s :: 0':f:s -> 0':f:s hole_0':f:s1_0 :: 0':f:s gen_0':f:s2_0 :: Nat -> 0':f:s Generator Equations: gen_0':f:s2_0(0) <=> 0' gen_0':f:s2_0(+(x, 1)) <=> f(0', gen_0':f:s2_0(x)) The following defined symbols remain to be analysed: g ---------------------------------------- (21) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (22) BOUNDS(n^1, INF)