/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: c69e44bd14796315568835c1ffa2502984884775 mhark 20210624 unpublished Termination w.r.t. Q of the given QTRS could be proven: (0) QTRS (1) DependencyPairsProof [EQUIVALENT, 23 ms] (2) QDP (3) QDPQMonotonicMRRProof [EQUIVALENT, 106 ms] (4) QDP (5) DependencyGraphProof [EQUIVALENT, 0 ms] (6) QDP (7) QDPQMonotonicMRRProof [EQUIVALENT, 50 ms] (8) QDP (9) UsableRulesProof [EQUIVALENT, 0 ms] (10) QDP (11) QReductionProof [EQUIVALENT, 0 ms] (12) QDP (13) QDPSizeChangeProof [EQUIVALENT, 0 ms] (14) YES ---------------------------------------- (0) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: a__filter(cons(X, Y), 0, M) -> cons(0, filter(Y, M, M)) a__filter(cons(X, Y), s(N), M) -> cons(mark(X), filter(Y, N, M)) a__sieve(cons(0, Y)) -> cons(0, sieve(Y)) a__sieve(cons(s(N), Y)) -> cons(s(mark(N)), sieve(filter(Y, N, N))) a__nats(N) -> cons(mark(N), nats(s(N))) a__zprimes -> a__sieve(a__nats(s(s(0)))) mark(filter(X1, X2, X3)) -> a__filter(mark(X1), mark(X2), mark(X3)) mark(sieve(X)) -> a__sieve(mark(X)) mark(nats(X)) -> a__nats(mark(X)) mark(zprimes) -> a__zprimes mark(cons(X1, X2)) -> cons(mark(X1), X2) mark(0) -> 0 mark(s(X)) -> s(mark(X)) a__filter(X1, X2, X3) -> filter(X1, X2, X3) a__sieve(X) -> sieve(X) a__nats(X) -> nats(X) a__zprimes -> zprimes The set Q consists of the following terms: a__nats(x0) a__zprimes mark(filter(x0, x1, x2)) mark(sieve(x0)) mark(nats(x0)) mark(zprimes) mark(cons(x0, x1)) mark(0) mark(s(x0)) a__filter(x0, x1, x2) a__sieve(x0) ---------------------------------------- (1) DependencyPairsProof (EQUIVALENT) Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem. ---------------------------------------- (2) Obligation: Q DP problem: The TRS P consists of the following rules: A__FILTER(cons(X, Y), s(N), M) -> MARK(X) A__SIEVE(cons(s(N), Y)) -> MARK(N) A__NATS(N) -> MARK(N) A__ZPRIMES -> A__SIEVE(a__nats(s(s(0)))) A__ZPRIMES -> A__NATS(s(s(0))) MARK(filter(X1, X2, X3)) -> A__FILTER(mark(X1), mark(X2), mark(X3)) MARK(filter(X1, X2, X3)) -> MARK(X1) MARK(filter(X1, X2, X3)) -> MARK(X2) MARK(filter(X1, X2, X3)) -> MARK(X3) MARK(sieve(X)) -> A__SIEVE(mark(X)) MARK(sieve(X)) -> MARK(X) MARK(nats(X)) -> A__NATS(mark(X)) MARK(nats(X)) -> MARK(X) MARK(zprimes) -> A__ZPRIMES MARK(cons(X1, X2)) -> MARK(X1) MARK(s(X)) -> MARK(X) The TRS R consists of the following rules: a__filter(cons(X, Y), 0, M) -> cons(0, filter(Y, M, M)) a__filter(cons(X, Y), s(N), M) -> cons(mark(X), filter(Y, N, M)) a__sieve(cons(0, Y)) -> cons(0, sieve(Y)) a__sieve(cons(s(N), Y)) -> cons(s(mark(N)), sieve(filter(Y, N, N))) a__nats(N) -> cons(mark(N), nats(s(N))) a__zprimes -> a__sieve(a__nats(s(s(0)))) mark(filter(X1, X2, X3)) -> a__filter(mark(X1), mark(X2), mark(X3)) mark(sieve(X)) -> a__sieve(mark(X)) mark(nats(X)) -> a__nats(mark(X)) mark(zprimes) -> a__zprimes mark(cons(X1, X2)) -> cons(mark(X1), X2) mark(0) -> 0 mark(s(X)) -> s(mark(X)) a__filter(X1, X2, X3) -> filter(X1, X2, X3) a__sieve(X) -> sieve(X) a__nats(X) -> nats(X) a__zprimes -> zprimes The set Q consists of the following terms: a__nats(x0) a__zprimes mark(filter(x0, x1, x2)) mark(sieve(x0)) mark(nats(x0)) mark(zprimes) mark(cons(x0, x1)) mark(0) mark(s(x0)) a__filter(x0, x1, x2) a__sieve(x0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (3) QDPQMonotonicMRRProof (EQUIVALENT) By using the Q-monotonic rule removal processor with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented such that it always occurs at a strongly monotonic position in a (P,Q,R)-chain. Strictly oriented dependency pairs: A__FILTER(cons(X, Y), s(N), M) -> MARK(X) A__ZPRIMES -> A__SIEVE(a__nats(s(s(0)))) A__ZPRIMES -> A__NATS(s(s(0))) MARK(filter(X1, X2, X3)) -> A__FILTER(mark(X1), mark(X2), mark(X3)) MARK(filter(X1, X2, X3)) -> MARK(X1) MARK(filter(X1, X2, X3)) -> MARK(X2) MARK(filter(X1, X2, X3)) -> MARK(X3) MARK(sieve(X)) -> A__SIEVE(mark(X)) MARK(sieve(X)) -> MARK(X) MARK(zprimes) -> A__ZPRIMES Used ordering: Polynomial interpretation [POLO]: POL(0) = 0 POL(A__FILTER(x_1, x_2, x_3)) = 1 + 2*x_1 POL(A__NATS(x_1)) = 2*x_1 POL(A__SIEVE(x_1)) = 2*x_1 POL(A__ZPRIMES) = 2 POL(MARK(x_1)) = 2*x_1 POL(a__filter(x_1, x_2, x_3)) = 1 + x_1 + x_2 + x_3 POL(a__nats(x_1)) = x_1 POL(a__sieve(x_1)) = 2 + x_1 POL(a__zprimes) = 2 POL(cons(x_1, x_2)) = x_1 POL(filter(x_1, x_2, x_3)) = 1 + x_1 + x_2 + x_3 POL(mark(x_1)) = x_1 POL(nats(x_1)) = x_1 POL(s(x_1)) = 2*x_1 POL(sieve(x_1)) = 2 + x_1 POL(zprimes) = 2 ---------------------------------------- (4) Obligation: Q DP problem: The TRS P consists of the following rules: A__SIEVE(cons(s(N), Y)) -> MARK(N) A__NATS(N) -> MARK(N) MARK(nats(X)) -> A__NATS(mark(X)) MARK(nats(X)) -> MARK(X) MARK(cons(X1, X2)) -> MARK(X1) MARK(s(X)) -> MARK(X) The TRS R consists of the following rules: a__filter(cons(X, Y), 0, M) -> cons(0, filter(Y, M, M)) a__filter(cons(X, Y), s(N), M) -> cons(mark(X), filter(Y, N, M)) a__sieve(cons(0, Y)) -> cons(0, sieve(Y)) a__sieve(cons(s(N), Y)) -> cons(s(mark(N)), sieve(filter(Y, N, N))) a__nats(N) -> cons(mark(N), nats(s(N))) a__zprimes -> a__sieve(a__nats(s(s(0)))) mark(filter(X1, X2, X3)) -> a__filter(mark(X1), mark(X2), mark(X3)) mark(sieve(X)) -> a__sieve(mark(X)) mark(nats(X)) -> a__nats(mark(X)) mark(zprimes) -> a__zprimes mark(cons(X1, X2)) -> cons(mark(X1), X2) mark(0) -> 0 mark(s(X)) -> s(mark(X)) a__filter(X1, X2, X3) -> filter(X1, X2, X3) a__sieve(X) -> sieve(X) a__nats(X) -> nats(X) a__zprimes -> zprimes The set Q consists of the following terms: a__nats(x0) a__zprimes mark(filter(x0, x1, x2)) mark(sieve(x0)) mark(nats(x0)) mark(zprimes) mark(cons(x0, x1)) mark(0) mark(s(x0)) a__filter(x0, x1, x2) a__sieve(x0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (5) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node. ---------------------------------------- (6) Obligation: Q DP problem: The TRS P consists of the following rules: MARK(nats(X)) -> A__NATS(mark(X)) A__NATS(N) -> MARK(N) MARK(nats(X)) -> MARK(X) MARK(cons(X1, X2)) -> MARK(X1) MARK(s(X)) -> MARK(X) The TRS R consists of the following rules: a__filter(cons(X, Y), 0, M) -> cons(0, filter(Y, M, M)) a__filter(cons(X, Y), s(N), M) -> cons(mark(X), filter(Y, N, M)) a__sieve(cons(0, Y)) -> cons(0, sieve(Y)) a__sieve(cons(s(N), Y)) -> cons(s(mark(N)), sieve(filter(Y, N, N))) a__nats(N) -> cons(mark(N), nats(s(N))) a__zprimes -> a__sieve(a__nats(s(s(0)))) mark(filter(X1, X2, X3)) -> a__filter(mark(X1), mark(X2), mark(X3)) mark(sieve(X)) -> a__sieve(mark(X)) mark(nats(X)) -> a__nats(mark(X)) mark(zprimes) -> a__zprimes mark(cons(X1, X2)) -> cons(mark(X1), X2) mark(0) -> 0 mark(s(X)) -> s(mark(X)) a__filter(X1, X2, X3) -> filter(X1, X2, X3) a__sieve(X) -> sieve(X) a__nats(X) -> nats(X) a__zprimes -> zprimes The set Q consists of the following terms: a__nats(x0) a__zprimes mark(filter(x0, x1, x2)) mark(sieve(x0)) mark(nats(x0)) mark(zprimes) mark(cons(x0, x1)) mark(0) mark(s(x0)) a__filter(x0, x1, x2) a__sieve(x0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (7) QDPQMonotonicMRRProof (EQUIVALENT) By using the Q-monotonic rule removal processor with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented such that it always occurs at a strongly monotonic position in a (P,Q,R)-chain. Strictly oriented dependency pairs: MARK(nats(X)) -> A__NATS(mark(X)) A__NATS(N) -> MARK(N) MARK(nats(X)) -> MARK(X) Used ordering: Polynomial interpretation [POLO]: POL(0) = 0 POL(A__NATS(x_1)) = 2 + 2*x_1 POL(MARK(x_1)) = 2*x_1 POL(a__filter(x_1, x_2, x_3)) = x_1 POL(a__nats(x_1)) = 2 + 2*x_1 POL(a__sieve(x_1)) = x_1 POL(a__zprimes) = 2 POL(cons(x_1, x_2)) = 2*x_1 POL(filter(x_1, x_2, x_3)) = x_1 POL(mark(x_1)) = x_1 POL(nats(x_1)) = 2 + 2*x_1 POL(s(x_1)) = 2*x_1 POL(sieve(x_1)) = x_1 POL(zprimes) = 2 ---------------------------------------- (8) Obligation: Q DP problem: The TRS P consists of the following rules: MARK(cons(X1, X2)) -> MARK(X1) MARK(s(X)) -> MARK(X) The TRS R consists of the following rules: a__filter(cons(X, Y), 0, M) -> cons(0, filter(Y, M, M)) a__filter(cons(X, Y), s(N), M) -> cons(mark(X), filter(Y, N, M)) a__sieve(cons(0, Y)) -> cons(0, sieve(Y)) a__sieve(cons(s(N), Y)) -> cons(s(mark(N)), sieve(filter(Y, N, N))) a__nats(N) -> cons(mark(N), nats(s(N))) a__zprimes -> a__sieve(a__nats(s(s(0)))) mark(filter(X1, X2, X3)) -> a__filter(mark(X1), mark(X2), mark(X3)) mark(sieve(X)) -> a__sieve(mark(X)) mark(nats(X)) -> a__nats(mark(X)) mark(zprimes) -> a__zprimes mark(cons(X1, X2)) -> cons(mark(X1), X2) mark(0) -> 0 mark(s(X)) -> s(mark(X)) a__filter(X1, X2, X3) -> filter(X1, X2, X3) a__sieve(X) -> sieve(X) a__nats(X) -> nats(X) a__zprimes -> zprimes The set Q consists of the following terms: a__nats(x0) a__zprimes mark(filter(x0, x1, x2)) mark(sieve(x0)) mark(nats(x0)) mark(zprimes) mark(cons(x0, x1)) mark(0) mark(s(x0)) a__filter(x0, x1, x2) a__sieve(x0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (9) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (10) Obligation: Q DP problem: The TRS P consists of the following rules: MARK(cons(X1, X2)) -> MARK(X1) MARK(s(X)) -> MARK(X) R is empty. The set Q consists of the following terms: a__nats(x0) a__zprimes mark(filter(x0, x1, x2)) mark(sieve(x0)) mark(nats(x0)) mark(zprimes) mark(cons(x0, x1)) mark(0) mark(s(x0)) a__filter(x0, x1, x2) a__sieve(x0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (11) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. a__nats(x0) a__zprimes mark(filter(x0, x1, x2)) mark(sieve(x0)) mark(nats(x0)) mark(zprimes) mark(cons(x0, x1)) mark(0) mark(s(x0)) a__filter(x0, x1, x2) a__sieve(x0) ---------------------------------------- (12) Obligation: Q DP problem: The TRS P consists of the following rules: MARK(cons(X1, X2)) -> MARK(X1) MARK(s(X)) -> MARK(X) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (13) QDPSizeChangeProof (EQUIVALENT) By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs: *MARK(cons(X1, X2)) -> MARK(X1) The graph contains the following edges 1 > 1 *MARK(s(X)) -> MARK(X) The graph contains the following edges 1 > 1 ---------------------------------------- (14) YES