WORST_CASE(?,O(n^1)) proof of input_DcsXBOniet.trs # AProVE Commit ID: 5b976082cb74a395683ed8cc7acf94bd611ab29f fuhs 20230524 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). (0) CpxTRS (1) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (2) CdtProblem (3) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CdtProblem (5) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTRS (9) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (10) CpxTRS (11) CpxTrsMatchBoundsTAProof [FINISHED, 30 ms] (12) BOUNDS(1, n^1) ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: fst(0, Z) -> nil fst(s(X), cons(Y, Z)) -> cons(Y, n__fst(activate(X), activate(Z))) from(X) -> cons(X, n__from(s(X))) add(0, X) -> X add(s(X), Y) -> s(n__add(activate(X), Y)) len(nil) -> 0 len(cons(X, Z)) -> s(n__len(activate(Z))) fst(X1, X2) -> n__fst(X1, X2) from(X) -> n__from(X) add(X1, X2) -> n__add(X1, X2) len(X) -> n__len(X) activate(n__fst(X1, X2)) -> fst(X1, X2) activate(n__from(X)) -> from(X) activate(n__add(X1, X2)) -> add(X1, X2) activate(n__len(X)) -> len(X) activate(X) -> X S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: fst(0, z0) -> nil fst(s(z0), cons(z1, z2)) -> cons(z1, n__fst(activate(z0), activate(z2))) fst(z0, z1) -> n__fst(z0, z1) from(z0) -> cons(z0, n__from(s(z0))) from(z0) -> n__from(z0) add(0, z0) -> z0 add(s(z0), z1) -> s(n__add(activate(z0), z1)) add(z0, z1) -> n__add(z0, z1) len(nil) -> 0 len(cons(z0, z1)) -> s(n__len(activate(z1))) len(z0) -> n__len(z0) activate(n__fst(z0, z1)) -> fst(z0, z1) activate(n__from(z0)) -> from(z0) activate(n__add(z0, z1)) -> add(z0, z1) activate(n__len(z0)) -> len(z0) activate(z0) -> z0 Tuples: FST(0, z0) -> c FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0)) FST(s(z0), cons(z1, z2)) -> c2(ACTIVATE(z2)) FST(z0, z1) -> c3 FROM(z0) -> c4 FROM(z0) -> c5 ADD(0, z0) -> c6 ADD(s(z0), z1) -> c7(ACTIVATE(z0)) ADD(z0, z1) -> c8 LEN(nil) -> c9 LEN(cons(z0, z1)) -> c10(ACTIVATE(z1)) LEN(z0) -> c11 ACTIVATE(n__fst(z0, z1)) -> c12(FST(z0, z1)) ACTIVATE(n__from(z0)) -> c13(FROM(z0)) ACTIVATE(n__add(z0, z1)) -> c14(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c15(LEN(z0)) ACTIVATE(z0) -> c16 S tuples: FST(0, z0) -> c FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0)) FST(s(z0), cons(z1, z2)) -> c2(ACTIVATE(z2)) FST(z0, z1) -> c3 FROM(z0) -> c4 FROM(z0) -> c5 ADD(0, z0) -> c6 ADD(s(z0), z1) -> c7(ACTIVATE(z0)) ADD(z0, z1) -> c8 LEN(nil) -> c9 LEN(cons(z0, z1)) -> c10(ACTIVATE(z1)) LEN(z0) -> c11 ACTIVATE(n__fst(z0, z1)) -> c12(FST(z0, z1)) ACTIVATE(n__from(z0)) -> c13(FROM(z0)) ACTIVATE(n__add(z0, z1)) -> c14(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c15(LEN(z0)) ACTIVATE(z0) -> c16 K tuples:none Defined Rule Symbols: fst_2, from_1, add_2, len_1, activate_1 Defined Pair Symbols: FST_2, FROM_1, ADD_2, LEN_1, ACTIVATE_1 Compound Symbols: c, c1_1, c2_1, c3, c4, c5, c6, c7_1, c8, c9, c10_1, c11, c12_1, c13_1, c14_1, c15_1, c16 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 10 trailing nodes: ACTIVATE(z0) -> c16 ADD(z0, z1) -> c8 LEN(z0) -> c11 ACTIVATE(n__from(z0)) -> c13(FROM(z0)) ADD(0, z0) -> c6 FROM(z0) -> c4 FROM(z0) -> c5 FST(z0, z1) -> c3 LEN(nil) -> c9 FST(0, z0) -> c ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: fst(0, z0) -> nil fst(s(z0), cons(z1, z2)) -> cons(z1, n__fst(activate(z0), activate(z2))) fst(z0, z1) -> n__fst(z0, z1) from(z0) -> cons(z0, n__from(s(z0))) from(z0) -> n__from(z0) add(0, z0) -> z0 add(s(z0), z1) -> s(n__add(activate(z0), z1)) add(z0, z1) -> n__add(z0, z1) len(nil) -> 0 len(cons(z0, z1)) -> s(n__len(activate(z1))) len(z0) -> n__len(z0) activate(n__fst(z0, z1)) -> fst(z0, z1) activate(n__from(z0)) -> from(z0) activate(n__add(z0, z1)) -> add(z0, z1) activate(n__len(z0)) -> len(z0) activate(z0) -> z0 Tuples: FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0)) FST(s(z0), cons(z1, z2)) -> c2(ACTIVATE(z2)) ADD(s(z0), z1) -> c7(ACTIVATE(z0)) LEN(cons(z0, z1)) -> c10(ACTIVATE(z1)) ACTIVATE(n__fst(z0, z1)) -> c12(FST(z0, z1)) ACTIVATE(n__add(z0, z1)) -> c14(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c15(LEN(z0)) S tuples: FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0)) FST(s(z0), cons(z1, z2)) -> c2(ACTIVATE(z2)) ADD(s(z0), z1) -> c7(ACTIVATE(z0)) LEN(cons(z0, z1)) -> c10(ACTIVATE(z1)) ACTIVATE(n__fst(z0, z1)) -> c12(FST(z0, z1)) ACTIVATE(n__add(z0, z1)) -> c14(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c15(LEN(z0)) K tuples:none Defined Rule Symbols: fst_2, from_1, add_2, len_1, activate_1 Defined Pair Symbols: FST_2, ADD_2, LEN_1, ACTIVATE_1 Compound Symbols: c1_1, c2_1, c7_1, c10_1, c12_1, c14_1, c15_1 ---------------------------------------- (5) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: fst(0, z0) -> nil fst(s(z0), cons(z1, z2)) -> cons(z1, n__fst(activate(z0), activate(z2))) fst(z0, z1) -> n__fst(z0, z1) from(z0) -> cons(z0, n__from(s(z0))) from(z0) -> n__from(z0) add(0, z0) -> z0 add(s(z0), z1) -> s(n__add(activate(z0), z1)) add(z0, z1) -> n__add(z0, z1) len(nil) -> 0 len(cons(z0, z1)) -> s(n__len(activate(z1))) len(z0) -> n__len(z0) activate(n__fst(z0, z1)) -> fst(z0, z1) activate(n__from(z0)) -> from(z0) activate(n__add(z0, z1)) -> add(z0, z1) activate(n__len(z0)) -> len(z0) activate(z0) -> z0 ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0)) FST(s(z0), cons(z1, z2)) -> c2(ACTIVATE(z2)) ADD(s(z0), z1) -> c7(ACTIVATE(z0)) LEN(cons(z0, z1)) -> c10(ACTIVATE(z1)) ACTIVATE(n__fst(z0, z1)) -> c12(FST(z0, z1)) ACTIVATE(n__add(z0, z1)) -> c14(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c15(LEN(z0)) S tuples: FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0)) FST(s(z0), cons(z1, z2)) -> c2(ACTIVATE(z2)) ADD(s(z0), z1) -> c7(ACTIVATE(z0)) LEN(cons(z0, z1)) -> c10(ACTIVATE(z1)) ACTIVATE(n__fst(z0, z1)) -> c12(FST(z0, z1)) ACTIVATE(n__add(z0, z1)) -> c14(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c15(LEN(z0)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: FST_2, ADD_2, LEN_1, ACTIVATE_1 Compound Symbols: c1_1, c2_1, c7_1, c10_1, c12_1, c14_1, c15_1 ---------------------------------------- (7) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (8) 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: FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0)) FST(s(z0), cons(z1, z2)) -> c2(ACTIVATE(z2)) ADD(s(z0), z1) -> c7(ACTIVATE(z0)) LEN(cons(z0, z1)) -> c10(ACTIVATE(z1)) ACTIVATE(n__fst(z0, z1)) -> c12(FST(z0, z1)) ACTIVATE(n__add(z0, z1)) -> c14(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c15(LEN(z0)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (9) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (10) 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: FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0)) FST(s(z0), cons(z1, z2)) -> c2(ACTIVATE(z2)) ADD(s(z0), z1) -> c7(ACTIVATE(z0)) LEN(cons(z0, z1)) -> c10(ACTIVATE(z1)) ACTIVATE(n__fst(z0, z1)) -> c12(FST(z0, z1)) ACTIVATE(n__add(z0, z1)) -> c14(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c15(LEN(z0)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (11) CpxTrsMatchBoundsTAProof (FINISHED) A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 1. The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by: final states : [1, 2, 3, 4] transitions: s0(0) -> 0 cons0(0, 0) -> 0 c10(0) -> 0 c20(0) -> 0 c70(0) -> 0 c100(0) -> 0 n__fst0(0, 0) -> 0 c120(0) -> 0 n__add0(0, 0) -> 0 c140(0) -> 0 n__len0(0) -> 0 c150(0) -> 0 FST0(0, 0) -> 1 ADD0(0, 0) -> 2 LEN0(0) -> 3 ACTIVATE0(0) -> 4 ACTIVATE1(0) -> 5 c11(5) -> 1 ACTIVATE1(0) -> 6 c21(6) -> 1 ACTIVATE1(0) -> 7 c71(7) -> 2 ACTIVATE1(0) -> 8 c101(8) -> 3 FST1(0, 0) -> 9 c121(9) -> 4 ADD1(0, 0) -> 10 c141(10) -> 4 LEN1(0) -> 11 c151(11) -> 4 c11(5) -> 9 c21(6) -> 9 c71(7) -> 10 c101(8) -> 11 c121(9) -> 5 c121(9) -> 6 c121(9) -> 7 c121(9) -> 8 c141(10) -> 5 c141(10) -> 6 c141(10) -> 7 c141(10) -> 8 c151(11) -> 5 c151(11) -> 6 c151(11) -> 7 c151(11) -> 8 ---------------------------------------- (12) BOUNDS(1, n^1)