/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^3), O(n^3)) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^3, n^3). (0) CpxTRS (1) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (2) CdtProblem (3) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (4) CdtProblem (5) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 61 ms] (8) CdtProblem (9) CdtRuleRemovalProof [UPPER BOUND(ADD(n^3)), 210 ms] (10) CdtProblem (11) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] (12) BOUNDS(1, 1) (13) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxTRS (15) SlicingProof [LOWER BOUND(ID), 0 ms] (16) CpxTRS (17) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (18) typed CpxTrs (19) OrderProof [LOWER BOUND(ID), 0 ms] (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 256 ms] (22) BEST (23) proven lower bound (24) LowerBoundPropagationProof [FINISHED, 0 ms] (25) BOUNDS(n^1, INF) (26) typed CpxTrs (27) RewriteLemmaProof [LOWER BOUND(ID), 63 ms] (28) proven lower bound (29) LowerBoundPropagationProof [FINISHED, 0 ms] (30) BOUNDS(n^3, INF) ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^3, n^3). The TRS R consists of the following rules: mul0(Cons(x, xs), y) -> add0(mul0(xs, y), y) add0(Cons(x, xs), y) -> add0(xs, Cons(S, y)) mul0(Nil, y) -> Nil add0(Nil, y) -> y goal(xs, ys) -> mul0(xs, ys) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: mul0(Cons(z0, z1), z2) -> add0(mul0(z1, z2), z2) mul0(Nil, z0) -> Nil add0(Cons(z0, z1), z2) -> add0(z1, Cons(S, z2)) add0(Nil, z0) -> z0 goal(z0, z1) -> mul0(z0, z1) Tuples: MUL0(Cons(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) MUL0(Nil, z0) -> c1 ADD0(Cons(z0, z1), z2) -> c2(ADD0(z1, Cons(S, z2))) ADD0(Nil, z0) -> c3 GOAL(z0, z1) -> c4(MUL0(z0, z1)) S tuples: MUL0(Cons(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) MUL0(Nil, z0) -> c1 ADD0(Cons(z0, z1), z2) -> c2(ADD0(z1, Cons(S, z2))) ADD0(Nil, z0) -> c3 GOAL(z0, z1) -> c4(MUL0(z0, z1)) K tuples:none Defined Rule Symbols: mul0_2, add0_2, goal_2 Defined Pair Symbols: MUL0_2, ADD0_2, GOAL_2 Compound Symbols: c_2, c1, c2_1, c3, c4_1 ---------------------------------------- (3) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 1 leading nodes: GOAL(z0, z1) -> c4(MUL0(z0, z1)) Removed 2 trailing nodes: MUL0(Nil, z0) -> c1 ADD0(Nil, z0) -> c3 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: mul0(Cons(z0, z1), z2) -> add0(mul0(z1, z2), z2) mul0(Nil, z0) -> Nil add0(Cons(z0, z1), z2) -> add0(z1, Cons(S, z2)) add0(Nil, z0) -> z0 goal(z0, z1) -> mul0(z0, z1) Tuples: MUL0(Cons(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(Cons(z0, z1), z2) -> c2(ADD0(z1, Cons(S, z2))) S tuples: MUL0(Cons(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(Cons(z0, z1), z2) -> c2(ADD0(z1, Cons(S, z2))) K tuples:none Defined Rule Symbols: mul0_2, add0_2, goal_2 Defined Pair Symbols: MUL0_2, ADD0_2 Compound Symbols: c_2, c2_1 ---------------------------------------- (5) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: goal(z0, z1) -> mul0(z0, z1) ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: mul0(Cons(z0, z1), z2) -> add0(mul0(z1, z2), z2) mul0(Nil, z0) -> Nil add0(Cons(z0, z1), z2) -> add0(z1, Cons(S, z2)) add0(Nil, z0) -> z0 Tuples: MUL0(Cons(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(Cons(z0, z1), z2) -> c2(ADD0(z1, Cons(S, z2))) S tuples: MUL0(Cons(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(Cons(z0, z1), z2) -> c2(ADD0(z1, Cons(S, z2))) K tuples:none Defined Rule Symbols: mul0_2, add0_2 Defined Pair Symbols: MUL0_2, ADD0_2 Compound Symbols: c_2, c2_1 ---------------------------------------- (7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. MUL0(Cons(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) We considered the (Usable) Rules:none And the Tuples: MUL0(Cons(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(Cons(z0, z1), z2) -> c2(ADD0(z1, Cons(S, z2))) The order we found is given by the following interpretation: Polynomial interpretation : POL(ADD0(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = [1] + x_1 + x_2 POL(MUL0(x_1, x_2)) = x_1 POL(Nil) = [1] POL(S) = [1] POL(add0(x_1, x_2)) = [1] + x_1 + x_2 POL(c(x_1, x_2)) = x_1 + x_2 POL(c2(x_1)) = x_1 POL(mul0(x_1, x_2)) = [1] + x_1 + x_2 ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: mul0(Cons(z0, z1), z2) -> add0(mul0(z1, z2), z2) mul0(Nil, z0) -> Nil add0(Cons(z0, z1), z2) -> add0(z1, Cons(S, z2)) add0(Nil, z0) -> z0 Tuples: MUL0(Cons(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(Cons(z0, z1), z2) -> c2(ADD0(z1, Cons(S, z2))) S tuples: ADD0(Cons(z0, z1), z2) -> c2(ADD0(z1, Cons(S, z2))) K tuples: MUL0(Cons(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) Defined Rule Symbols: mul0_2, add0_2 Defined Pair Symbols: MUL0_2, ADD0_2 Compound Symbols: c_2, c2_1 ---------------------------------------- (9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^3))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. ADD0(Cons(z0, z1), z2) -> c2(ADD0(z1, Cons(S, z2))) We considered the (Usable) Rules: mul0(Nil, z0) -> Nil add0(Cons(z0, z1), z2) -> add0(z1, Cons(S, z2)) add0(Nil, z0) -> z0 mul0(Cons(z0, z1), z2) -> add0(mul0(z1, z2), z2) And the Tuples: MUL0(Cons(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(Cons(z0, z1), z2) -> c2(ADD0(z1, Cons(S, z2))) The order we found is given by the following interpretation: Polynomial interpretation : POL(ADD0(x_1, x_2)) = x_1 POL(Cons(x_1, x_2)) = [1] + x_2 POL(MUL0(x_1, x_2)) = x_1^2*x_2 + x_1*x_2^2 POL(Nil) = 0 POL(S) = 0 POL(add0(x_1, x_2)) = x_1 + x_2 POL(c(x_1, x_2)) = x_1 + x_2 POL(c2(x_1)) = x_1 POL(mul0(x_1, x_2)) = x_2 + x_1*x_2 ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules: mul0(Cons(z0, z1), z2) -> add0(mul0(z1, z2), z2) mul0(Nil, z0) -> Nil add0(Cons(z0, z1), z2) -> add0(z1, Cons(S, z2)) add0(Nil, z0) -> z0 Tuples: MUL0(Cons(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(Cons(z0, z1), z2) -> c2(ADD0(z1, Cons(S, z2))) S tuples:none K tuples: MUL0(Cons(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(Cons(z0, z1), z2) -> c2(ADD0(z1, Cons(S, z2))) Defined Rule Symbols: mul0_2, add0_2 Defined Pair Symbols: MUL0_2, ADD0_2 Compound Symbols: c_2, c2_1 ---------------------------------------- (11) SIsEmptyProof (BOTH BOUNDS(ID, ID)) The set 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 (innermost) of the given CpxTRS could be proven to be BOUNDS(n^3, INF). The TRS R consists of the following rules: mul0(Cons(x, xs), y) -> add0(mul0(xs, y), y) add0(Cons(x, xs), y) -> add0(xs, Cons(S, y)) mul0(Nil, y) -> Nil add0(Nil, y) -> y goal(xs, ys) -> mul0(xs, ys) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (15) SlicingProof (LOWER BOUND(ID)) Sliced the following arguments: Cons/0 ---------------------------------------- (16) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^3, INF). The TRS R consists of the following rules: mul0(Cons(xs), y) -> add0(mul0(xs, y), y) add0(Cons(xs), y) -> add0(xs, Cons(y)) mul0(Nil, y) -> Nil add0(Nil, y) -> y goal(xs, ys) -> mul0(xs, ys) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (17) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (18) Obligation: Innermost TRS: Rules: mul0(Cons(xs), y) -> add0(mul0(xs, y), y) add0(Cons(xs), y) -> add0(xs, Cons(y)) mul0(Nil, y) -> Nil add0(Nil, y) -> y goal(xs, ys) -> mul0(xs, ys) Types: mul0 :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil add0 :: Cons:Nil -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil goal :: Cons:Nil -> Cons:Nil -> Cons:Nil hole_Cons:Nil1_1 :: Cons:Nil gen_Cons:Nil2_1 :: Nat -> Cons:Nil ---------------------------------------- (19) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: mul0, add0 They will be analysed ascendingly in the following order: add0 < mul0 ---------------------------------------- (20) Obligation: Innermost TRS: Rules: mul0(Cons(xs), y) -> add0(mul0(xs, y), y) add0(Cons(xs), y) -> add0(xs, Cons(y)) mul0(Nil, y) -> Nil add0(Nil, y) -> y goal(xs, ys) -> mul0(xs, ys) Types: mul0 :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil add0 :: Cons:Nil -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil goal :: Cons:Nil -> Cons:Nil -> Cons:Nil hole_Cons:Nil1_1 :: Cons:Nil gen_Cons:Nil2_1 :: Nat -> Cons:Nil Generator Equations: gen_Cons:Nil2_1(0) <=> Nil gen_Cons:Nil2_1(+(x, 1)) <=> Cons(gen_Cons:Nil2_1(x)) The following defined symbols remain to be analysed: add0, mul0 They will be analysed ascendingly in the following order: add0 < mul0 ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: add0(gen_Cons:Nil2_1(n4_1), gen_Cons:Nil2_1(b)) -> gen_Cons:Nil2_1(+(n4_1, b)), rt in Omega(1 + n4_1) Induction Base: add0(gen_Cons:Nil2_1(0), gen_Cons:Nil2_1(b)) ->_R^Omega(1) gen_Cons:Nil2_1(b) Induction Step: add0(gen_Cons:Nil2_1(+(n4_1, 1)), gen_Cons:Nil2_1(b)) ->_R^Omega(1) add0(gen_Cons:Nil2_1(n4_1), Cons(gen_Cons:Nil2_1(b))) ->_IH gen_Cons:Nil2_1(+(+(b, 1), c5_1)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (22) Complex Obligation (BEST) ---------------------------------------- (23) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: mul0(Cons(xs), y) -> add0(mul0(xs, y), y) add0(Cons(xs), y) -> add0(xs, Cons(y)) mul0(Nil, y) -> Nil add0(Nil, y) -> y goal(xs, ys) -> mul0(xs, ys) Types: mul0 :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil add0 :: Cons:Nil -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil goal :: Cons:Nil -> Cons:Nil -> Cons:Nil hole_Cons:Nil1_1 :: Cons:Nil gen_Cons:Nil2_1 :: Nat -> Cons:Nil Generator Equations: gen_Cons:Nil2_1(0) <=> Nil gen_Cons:Nil2_1(+(x, 1)) <=> Cons(gen_Cons:Nil2_1(x)) The following defined symbols remain to be analysed: add0, mul0 They will be analysed ascendingly in the following order: add0 < mul0 ---------------------------------------- (24) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (25) BOUNDS(n^1, INF) ---------------------------------------- (26) Obligation: Innermost TRS: Rules: mul0(Cons(xs), y) -> add0(mul0(xs, y), y) add0(Cons(xs), y) -> add0(xs, Cons(y)) mul0(Nil, y) -> Nil add0(Nil, y) -> y goal(xs, ys) -> mul0(xs, ys) Types: mul0 :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil add0 :: Cons:Nil -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil goal :: Cons:Nil -> Cons:Nil -> Cons:Nil hole_Cons:Nil1_1 :: Cons:Nil gen_Cons:Nil2_1 :: Nat -> Cons:Nil Lemmas: add0(gen_Cons:Nil2_1(n4_1), gen_Cons:Nil2_1(b)) -> gen_Cons:Nil2_1(+(n4_1, b)), rt in Omega(1 + n4_1) Generator Equations: gen_Cons:Nil2_1(0) <=> Nil gen_Cons:Nil2_1(+(x, 1)) <=> Cons(gen_Cons:Nil2_1(x)) The following defined symbols remain to be analysed: mul0 ---------------------------------------- (27) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: mul0(gen_Cons:Nil2_1(n457_1), gen_Cons:Nil2_1(b)) -> gen_Cons:Nil2_1(*(n457_1, b)), rt in Omega(1 + b*n457_1^2 + n457_1) Induction Base: mul0(gen_Cons:Nil2_1(0), gen_Cons:Nil2_1(b)) ->_R^Omega(1) Nil Induction Step: mul0(gen_Cons:Nil2_1(+(n457_1, 1)), gen_Cons:Nil2_1(b)) ->_R^Omega(1) add0(mul0(gen_Cons:Nil2_1(n457_1), gen_Cons:Nil2_1(b)), gen_Cons:Nil2_1(b)) ->_IH add0(gen_Cons:Nil2_1(*(c458_1, b)), gen_Cons:Nil2_1(b)) ->_L^Omega(1 + b*n457_1) gen_Cons:Nil2_1(+(*(n457_1, b), b)) We have rt in Omega(n^3) and sz in O(n). Thus, we have irc_R in Omega(n^3). ---------------------------------------- (28) Obligation: Proved the lower bound n^3 for the following obligation: Innermost TRS: Rules: mul0(Cons(xs), y) -> add0(mul0(xs, y), y) add0(Cons(xs), y) -> add0(xs, Cons(y)) mul0(Nil, y) -> Nil add0(Nil, y) -> y goal(xs, ys) -> mul0(xs, ys) Types: mul0 :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil add0 :: Cons:Nil -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil goal :: Cons:Nil -> Cons:Nil -> Cons:Nil hole_Cons:Nil1_1 :: Cons:Nil gen_Cons:Nil2_1 :: Nat -> Cons:Nil Lemmas: add0(gen_Cons:Nil2_1(n4_1), gen_Cons:Nil2_1(b)) -> gen_Cons:Nil2_1(+(n4_1, b)), rt in Omega(1 + n4_1) Generator Equations: gen_Cons:Nil2_1(0) <=> Nil gen_Cons:Nil2_1(+(x, 1)) <=> Cons(gen_Cons:Nil2_1(x)) The following defined symbols remain to be analysed: mul0 ---------------------------------------- (29) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (30) BOUNDS(n^3, INF)