/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, 2 ms] (4) CdtProblem (5) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 73 ms] (8) CdtProblem (9) CdtRuleRemovalProof [UPPER BOUND(ADD(n^3)), 176 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), 239 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(C(x, y), y') -> add0(mul0(y, y'), y') mul0(Z, y) -> Z add0(C(x, y), y') -> add0(y, C(S, y')) add0(Z, y) -> y second(C(x, y)) -> y isZero(C(x, y)) -> False isZero(Z) -> True 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(C(z0, z1), z2) -> add0(mul0(z1, z2), z2) mul0(Z, z0) -> Z add0(C(z0, z1), z2) -> add0(z1, C(S, z2)) add0(Z, z0) -> z0 second(C(z0, z1)) -> z1 isZero(C(z0, z1)) -> False isZero(Z) -> True goal(z0, z1) -> mul0(z0, z1) Tuples: MUL0(C(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) MUL0(Z, z0) -> c1 ADD0(C(z0, z1), z2) -> c2(ADD0(z1, C(S, z2))) ADD0(Z, z0) -> c3 SECOND(C(z0, z1)) -> c4 ISZERO(C(z0, z1)) -> c5 ISZERO(Z) -> c6 GOAL(z0, z1) -> c7(MUL0(z0, z1)) S tuples: MUL0(C(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) MUL0(Z, z0) -> c1 ADD0(C(z0, z1), z2) -> c2(ADD0(z1, C(S, z2))) ADD0(Z, z0) -> c3 SECOND(C(z0, z1)) -> c4 ISZERO(C(z0, z1)) -> c5 ISZERO(Z) -> c6 GOAL(z0, z1) -> c7(MUL0(z0, z1)) K tuples:none Defined Rule Symbols: mul0_2, add0_2, second_1, isZero_1, goal_2 Defined Pair Symbols: MUL0_2, ADD0_2, SECOND_1, ISZERO_1, GOAL_2 Compound Symbols: c_2, c1, c2_1, c3, c4, c5, c6, c7_1 ---------------------------------------- (3) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 1 leading nodes: GOAL(z0, z1) -> c7(MUL0(z0, z1)) Removed 5 trailing nodes: ISZERO(C(z0, z1)) -> c5 SECOND(C(z0, z1)) -> c4 ADD0(Z, z0) -> c3 MUL0(Z, z0) -> c1 ISZERO(Z) -> c6 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: mul0(C(z0, z1), z2) -> add0(mul0(z1, z2), z2) mul0(Z, z0) -> Z add0(C(z0, z1), z2) -> add0(z1, C(S, z2)) add0(Z, z0) -> z0 second(C(z0, z1)) -> z1 isZero(C(z0, z1)) -> False isZero(Z) -> True goal(z0, z1) -> mul0(z0, z1) Tuples: MUL0(C(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(C(z0, z1), z2) -> c2(ADD0(z1, C(S, z2))) S tuples: MUL0(C(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(C(z0, z1), z2) -> c2(ADD0(z1, C(S, z2))) K tuples:none Defined Rule Symbols: mul0_2, add0_2, second_1, isZero_1, 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: second(C(z0, z1)) -> z1 isZero(C(z0, z1)) -> False isZero(Z) -> True goal(z0, z1) -> mul0(z0, z1) ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: mul0(C(z0, z1), z2) -> add0(mul0(z1, z2), z2) mul0(Z, z0) -> Z add0(C(z0, z1), z2) -> add0(z1, C(S, z2)) add0(Z, z0) -> z0 Tuples: MUL0(C(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(C(z0, z1), z2) -> c2(ADD0(z1, C(S, z2))) S tuples: MUL0(C(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(C(z0, z1), z2) -> c2(ADD0(z1, C(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(C(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) We considered the (Usable) Rules:none And the Tuples: MUL0(C(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(C(z0, z1), z2) -> c2(ADD0(z1, C(S, z2))) The order we found is given by the following interpretation: Polynomial interpretation : POL(ADD0(x_1, x_2)) = 0 POL(C(x_1, x_2)) = [1] + x_1 + x_2 POL(MUL0(x_1, x_2)) = x_1 POL(S) = [1] POL(Z) = [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(C(z0, z1), z2) -> add0(mul0(z1, z2), z2) mul0(Z, z0) -> Z add0(C(z0, z1), z2) -> add0(z1, C(S, z2)) add0(Z, z0) -> z0 Tuples: MUL0(C(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(C(z0, z1), z2) -> c2(ADD0(z1, C(S, z2))) S tuples: ADD0(C(z0, z1), z2) -> c2(ADD0(z1, C(S, z2))) K tuples: MUL0(C(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(C(z0, z1), z2) -> c2(ADD0(z1, C(S, z2))) We considered the (Usable) Rules: mul0(Z, z0) -> Z add0(Z, z0) -> z0 add0(C(z0, z1), z2) -> add0(z1, C(S, z2)) mul0(C(z0, z1), z2) -> add0(mul0(z1, z2), z2) And the Tuples: MUL0(C(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(C(z0, z1), z2) -> c2(ADD0(z1, C(S, z2))) The order we found is given by the following interpretation: Polynomial interpretation : POL(ADD0(x_1, x_2)) = x_1 POL(C(x_1, x_2)) = [1] + x_2 POL(MUL0(x_1, x_2)) = x_1^2*x_2 + x_1*x_2^2 POL(S) = 0 POL(Z) = 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(C(z0, z1), z2) -> add0(mul0(z1, z2), z2) mul0(Z, z0) -> Z add0(C(z0, z1), z2) -> add0(z1, C(S, z2)) add0(Z, z0) -> z0 Tuples: MUL0(C(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(C(z0, z1), z2) -> c2(ADD0(z1, C(S, z2))) S tuples:none K tuples: MUL0(C(z0, z1), z2) -> c(ADD0(mul0(z1, z2), z2), MUL0(z1, z2)) ADD0(C(z0, z1), z2) -> c2(ADD0(z1, C(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(C(x, y), y') -> add0(mul0(y, y'), y') mul0(Z, y) -> Z add0(C(x, y), y') -> add0(y, C(S, y')) add0(Z, y) -> y second(C(x, y)) -> y isZero(C(x, y)) -> False isZero(Z) -> True goal(xs, ys) -> mul0(xs, ys) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (15) SlicingProof (LOWER BOUND(ID)) Sliced the following arguments: C/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(C(y), y') -> add0(mul0(y, y'), y') mul0(Z, y) -> Z add0(C(y), y') -> add0(y, C(y')) add0(Z, y) -> y second(C(y)) -> y isZero(C(y)) -> False isZero(Z) -> True 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(C(y), y') -> add0(mul0(y, y'), y') mul0(Z, y) -> Z add0(C(y), y') -> add0(y, C(y')) add0(Z, y) -> y second(C(y)) -> y isZero(C(y)) -> False isZero(Z) -> True goal(xs, ys) -> mul0(xs, ys) Types: mul0 :: C:Z -> C:Z -> C:Z C :: C:Z -> C:Z add0 :: C:Z -> C:Z -> C:Z Z :: C:Z second :: C:Z -> C:Z isZero :: C:Z -> False:True False :: False:True True :: False:True goal :: C:Z -> C:Z -> C:Z hole_C:Z1_1 :: C:Z hole_False:True2_1 :: False:True gen_C:Z3_1 :: Nat -> C:Z ---------------------------------------- (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(C(y), y') -> add0(mul0(y, y'), y') mul0(Z, y) -> Z add0(C(y), y') -> add0(y, C(y')) add0(Z, y) -> y second(C(y)) -> y isZero(C(y)) -> False isZero(Z) -> True goal(xs, ys) -> mul0(xs, ys) Types: mul0 :: C:Z -> C:Z -> C:Z C :: C:Z -> C:Z add0 :: C:Z -> C:Z -> C:Z Z :: C:Z second :: C:Z -> C:Z isZero :: C:Z -> False:True False :: False:True True :: False:True goal :: C:Z -> C:Z -> C:Z hole_C:Z1_1 :: C:Z hole_False:True2_1 :: False:True gen_C:Z3_1 :: Nat -> C:Z Generator Equations: gen_C:Z3_1(0) <=> Z gen_C:Z3_1(+(x, 1)) <=> C(gen_C:Z3_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_C:Z3_1(n5_1), gen_C:Z3_1(b)) -> gen_C:Z3_1(+(n5_1, b)), rt in Omega(1 + n5_1) Induction Base: add0(gen_C:Z3_1(0), gen_C:Z3_1(b)) ->_R^Omega(1) gen_C:Z3_1(b) Induction Step: add0(gen_C:Z3_1(+(n5_1, 1)), gen_C:Z3_1(b)) ->_R^Omega(1) add0(gen_C:Z3_1(n5_1), C(gen_C:Z3_1(b))) ->_IH gen_C:Z3_1(+(+(b, 1), c6_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(C(y), y') -> add0(mul0(y, y'), y') mul0(Z, y) -> Z add0(C(y), y') -> add0(y, C(y')) add0(Z, y) -> y second(C(y)) -> y isZero(C(y)) -> False isZero(Z) -> True goal(xs, ys) -> mul0(xs, ys) Types: mul0 :: C:Z -> C:Z -> C:Z C :: C:Z -> C:Z add0 :: C:Z -> C:Z -> C:Z Z :: C:Z second :: C:Z -> C:Z isZero :: C:Z -> False:True False :: False:True True :: False:True goal :: C:Z -> C:Z -> C:Z hole_C:Z1_1 :: C:Z hole_False:True2_1 :: False:True gen_C:Z3_1 :: Nat -> C:Z Generator Equations: gen_C:Z3_1(0) <=> Z gen_C:Z3_1(+(x, 1)) <=> C(gen_C:Z3_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(C(y), y') -> add0(mul0(y, y'), y') mul0(Z, y) -> Z add0(C(y), y') -> add0(y, C(y')) add0(Z, y) -> y second(C(y)) -> y isZero(C(y)) -> False isZero(Z) -> True goal(xs, ys) -> mul0(xs, ys) Types: mul0 :: C:Z -> C:Z -> C:Z C :: C:Z -> C:Z add0 :: C:Z -> C:Z -> C:Z Z :: C:Z second :: C:Z -> C:Z isZero :: C:Z -> False:True False :: False:True True :: False:True goal :: C:Z -> C:Z -> C:Z hole_C:Z1_1 :: C:Z hole_False:True2_1 :: False:True gen_C:Z3_1 :: Nat -> C:Z Lemmas: add0(gen_C:Z3_1(n5_1), gen_C:Z3_1(b)) -> gen_C:Z3_1(+(n5_1, b)), rt in Omega(1 + n5_1) Generator Equations: gen_C:Z3_1(0) <=> Z gen_C:Z3_1(+(x, 1)) <=> C(gen_C:Z3_1(x)) The following defined symbols remain to be analysed: mul0 ---------------------------------------- (27) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: mul0(gen_C:Z3_1(n523_1), gen_C:Z3_1(b)) -> gen_C:Z3_1(*(n523_1, b)), rt in Omega(1 + b*n523_1^2 + n523_1) Induction Base: mul0(gen_C:Z3_1(0), gen_C:Z3_1(b)) ->_R^Omega(1) Z Induction Step: mul0(gen_C:Z3_1(+(n523_1, 1)), gen_C:Z3_1(b)) ->_R^Omega(1) add0(mul0(gen_C:Z3_1(n523_1), gen_C:Z3_1(b)), gen_C:Z3_1(b)) ->_IH add0(gen_C:Z3_1(*(c524_1, b)), gen_C:Z3_1(b)) ->_L^Omega(1 + b*n523_1) gen_C:Z3_1(+(*(n523_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(C(y), y') -> add0(mul0(y, y'), y') mul0(Z, y) -> Z add0(C(y), y') -> add0(y, C(y')) add0(Z, y) -> y second(C(y)) -> y isZero(C(y)) -> False isZero(Z) -> True goal(xs, ys) -> mul0(xs, ys) Types: mul0 :: C:Z -> C:Z -> C:Z C :: C:Z -> C:Z add0 :: C:Z -> C:Z -> C:Z Z :: C:Z second :: C:Z -> C:Z isZero :: C:Z -> False:True False :: False:True True :: False:True goal :: C:Z -> C:Z -> C:Z hole_C:Z1_1 :: C:Z hole_False:True2_1 :: False:True gen_C:Z3_1 :: Nat -> C:Z Lemmas: add0(gen_C:Z3_1(n5_1), gen_C:Z3_1(b)) -> gen_C:Z3_1(+(n5_1, b)), rt in Omega(1 + n5_1) Generator Equations: gen_C:Z3_1(0) <=> Z gen_C:Z3_1(+(x, 1)) <=> C(gen_C:Z3_1(x)) The following defined symbols remain to be analysed: mul0 ---------------------------------------- (29) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (30) BOUNDS(n^3, INF)