3.62/1.73 YES 3.77/1.74 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 3.77/1.74 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 3.77/1.74 3.77/1.74 3.77/1.74 Termination w.r.t. Q of the given QTRS could be proven: 3.77/1.74 3.77/1.74 (0) QTRS 3.77/1.74 (1) QTRSToCSRProof [SOUND, 0 ms] 3.77/1.74 (2) CSR 3.77/1.74 (3) CSRRRRProof [EQUIVALENT, 87 ms] 3.77/1.74 (4) CSR 3.77/1.74 (5) CSRRRRProof [EQUIVALENT, 0 ms] 3.77/1.74 (6) CSR 3.77/1.74 (7) RisEmptyProof [EQUIVALENT, 0 ms] 3.77/1.74 (8) YES 3.77/1.74 3.77/1.74 3.77/1.74 ---------------------------------------- 3.77/1.74 3.77/1.74 (0) 3.77/1.74 Obligation: 3.77/1.74 Q restricted rewrite system: 3.77/1.74 The TRS R consists of the following rules: 3.77/1.74 3.77/1.74 active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M))) 3.77/1.74 active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M))) 3.77/1.74 active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y))) 3.77/1.74 active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N)))) 3.77/1.74 active(nats(N)) -> mark(cons(N, nats(s(N)))) 3.77/1.74 active(zprimes) -> mark(sieve(nats(s(s(0))))) 3.77/1.74 active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3) 3.77/1.74 active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3) 3.77/1.74 active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3)) 3.77/1.74 active(cons(X1, X2)) -> cons(active(X1), X2) 3.77/1.74 active(s(X)) -> s(active(X)) 3.77/1.74 active(sieve(X)) -> sieve(active(X)) 3.77/1.74 active(nats(X)) -> nats(active(X)) 3.77/1.74 filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3)) 3.77/1.74 filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3)) 3.77/1.74 filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3)) 3.77/1.74 cons(mark(X1), X2) -> mark(cons(X1, X2)) 3.77/1.74 s(mark(X)) -> mark(s(X)) 3.77/1.74 sieve(mark(X)) -> mark(sieve(X)) 3.77/1.74 nats(mark(X)) -> mark(nats(X)) 3.77/1.74 proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3)) 3.77/1.74 proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) 3.77/1.74 proper(0) -> ok(0) 3.77/1.74 proper(s(X)) -> s(proper(X)) 3.77/1.74 proper(sieve(X)) -> sieve(proper(X)) 3.77/1.74 proper(nats(X)) -> nats(proper(X)) 3.77/1.74 proper(zprimes) -> ok(zprimes) 3.77/1.74 filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3)) 3.77/1.74 cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) 3.77/1.74 s(ok(X)) -> ok(s(X)) 3.77/1.74 sieve(ok(X)) -> ok(sieve(X)) 3.77/1.74 nats(ok(X)) -> ok(nats(X)) 3.77/1.74 top(mark(X)) -> top(proper(X)) 3.77/1.74 top(ok(X)) -> top(active(X)) 3.77/1.74 3.77/1.74 The set Q consists of the following terms: 3.77/1.74 3.77/1.74 active(nats(x0)) 3.77/1.74 active(zprimes) 3.77/1.74 active(filter(x0, x1, x2)) 3.77/1.74 active(cons(x0, x1)) 3.77/1.74 active(s(x0)) 3.77/1.74 active(sieve(x0)) 3.77/1.74 filter(mark(x0), x1, x2) 3.77/1.74 filter(x0, mark(x1), x2) 3.77/1.74 filter(x0, x1, mark(x2)) 3.77/1.74 cons(mark(x0), x1) 3.77/1.74 s(mark(x0)) 3.77/1.74 sieve(mark(x0)) 3.77/1.74 nats(mark(x0)) 3.77/1.74 proper(filter(x0, x1, x2)) 3.77/1.74 proper(cons(x0, x1)) 3.77/1.74 proper(0) 3.77/1.74 proper(s(x0)) 3.77/1.74 proper(sieve(x0)) 3.77/1.74 proper(nats(x0)) 3.77/1.74 proper(zprimes) 3.77/1.74 filter(ok(x0), ok(x1), ok(x2)) 3.77/1.74 cons(ok(x0), ok(x1)) 3.77/1.74 s(ok(x0)) 3.77/1.74 sieve(ok(x0)) 3.77/1.74 nats(ok(x0)) 3.77/1.74 top(mark(x0)) 3.77/1.74 top(ok(x0)) 3.77/1.74 3.77/1.74 3.77/1.74 ---------------------------------------- 3.77/1.74 3.77/1.74 (1) QTRSToCSRProof (SOUND) 3.77/1.74 The following Q TRS is given: Q restricted rewrite system: 3.77/1.74 The TRS R consists of the following rules: 3.77/1.74 3.77/1.74 active(filter(cons(X, Y), 0, M)) -> mark(cons(0, filter(Y, M, M))) 3.77/1.74 active(filter(cons(X, Y), s(N), M)) -> mark(cons(X, filter(Y, N, M))) 3.77/1.74 active(sieve(cons(0, Y))) -> mark(cons(0, sieve(Y))) 3.77/1.74 active(sieve(cons(s(N), Y))) -> mark(cons(s(N), sieve(filter(Y, N, N)))) 3.77/1.74 active(nats(N)) -> mark(cons(N, nats(s(N)))) 3.77/1.74 active(zprimes) -> mark(sieve(nats(s(s(0))))) 3.77/1.74 active(filter(X1, X2, X3)) -> filter(active(X1), X2, X3) 3.77/1.74 active(filter(X1, X2, X3)) -> filter(X1, active(X2), X3) 3.77/1.74 active(filter(X1, X2, X3)) -> filter(X1, X2, active(X3)) 3.77/1.74 active(cons(X1, X2)) -> cons(active(X1), X2) 3.77/1.74 active(s(X)) -> s(active(X)) 3.77/1.74 active(sieve(X)) -> sieve(active(X)) 3.77/1.74 active(nats(X)) -> nats(active(X)) 3.77/1.74 filter(mark(X1), X2, X3) -> mark(filter(X1, X2, X3)) 3.77/1.74 filter(X1, mark(X2), X3) -> mark(filter(X1, X2, X3)) 3.77/1.74 filter(X1, X2, mark(X3)) -> mark(filter(X1, X2, X3)) 3.77/1.74 cons(mark(X1), X2) -> mark(cons(X1, X2)) 3.77/1.74 s(mark(X)) -> mark(s(X)) 3.77/1.74 sieve(mark(X)) -> mark(sieve(X)) 3.77/1.74 nats(mark(X)) -> mark(nats(X)) 3.77/1.74 proper(filter(X1, X2, X3)) -> filter(proper(X1), proper(X2), proper(X3)) 3.77/1.74 proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) 3.77/1.74 proper(0) -> ok(0) 3.77/1.74 proper(s(X)) -> s(proper(X)) 3.77/1.74 proper(sieve(X)) -> sieve(proper(X)) 3.77/1.74 proper(nats(X)) -> nats(proper(X)) 3.77/1.74 proper(zprimes) -> ok(zprimes) 3.77/1.74 filter(ok(X1), ok(X2), ok(X3)) -> ok(filter(X1, X2, X3)) 3.77/1.74 cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) 3.77/1.74 s(ok(X)) -> ok(s(X)) 3.77/1.74 sieve(ok(X)) -> ok(sieve(X)) 3.77/1.74 nats(ok(X)) -> ok(nats(X)) 3.77/1.74 top(mark(X)) -> top(proper(X)) 3.77/1.74 top(ok(X)) -> top(active(X)) 3.77/1.74 3.77/1.74 The set Q consists of the following terms: 3.77/1.74 3.77/1.74 active(nats(x0)) 3.77/1.74 active(zprimes) 3.77/1.74 active(filter(x0, x1, x2)) 3.77/1.74 active(cons(x0, x1)) 3.77/1.74 active(s(x0)) 3.77/1.74 active(sieve(x0)) 3.77/1.74 filter(mark(x0), x1, x2) 3.77/1.74 filter(x0, mark(x1), x2) 3.77/1.74 filter(x0, x1, mark(x2)) 3.77/1.74 cons(mark(x0), x1) 3.77/1.74 s(mark(x0)) 3.77/1.74 sieve(mark(x0)) 3.77/1.74 nats(mark(x0)) 3.77/1.74 proper(filter(x0, x1, x2)) 3.77/1.74 proper(cons(x0, x1)) 3.77/1.74 proper(0) 3.77/1.74 proper(s(x0)) 3.77/1.74 proper(sieve(x0)) 3.77/1.74 proper(nats(x0)) 3.77/1.74 proper(zprimes) 3.77/1.74 filter(ok(x0), ok(x1), ok(x2)) 3.77/1.74 cons(ok(x0), ok(x1)) 3.77/1.74 s(ok(x0)) 3.77/1.74 sieve(ok(x0)) 3.77/1.74 nats(ok(x0)) 3.77/1.74 top(mark(x0)) 3.77/1.74 top(ok(x0)) 3.77/1.74 3.77/1.74 Special symbols used for the transformation (see [GM04]): 3.77/1.74 top: top_1, active: active_1, mark: mark_1, ok: ok_1, proper: proper_1 3.77/1.74 The replacement map contains the following entries: 3.77/1.74 3.77/1.74 filter: {1, 2, 3} 3.77/1.74 cons: {1} 3.77/1.74 0: empty set 3.77/1.74 s: {1} 3.77/1.74 sieve: {1} 3.77/1.74 nats: {1} 3.77/1.74 zprimes: empty set 3.77/1.74 The QTRS contained just a subset of rules created by the complete Giesl-Middeldorp transformation. Therefore, the inverse transformation is sound, but not necessarily complete. 3.77/1.74 ---------------------------------------- 3.77/1.74 3.77/1.74 (2) 3.77/1.74 Obligation: 3.77/1.74 Context-sensitive rewrite system: 3.77/1.74 The TRS R consists of the following rules: 3.77/1.74 3.77/1.74 filter(cons(X, Y), 0, M) -> cons(0, filter(Y, M, M)) 3.77/1.74 filter(cons(X, Y), s(N), M) -> cons(X, filter(Y, N, M)) 3.77/1.74 sieve(cons(0, Y)) -> cons(0, sieve(Y)) 3.77/1.74 sieve(cons(s(N), Y)) -> cons(s(N), sieve(filter(Y, N, N))) 3.77/1.74 nats(N) -> cons(N, nats(s(N))) 3.77/1.74 zprimes -> sieve(nats(s(s(0)))) 3.77/1.74 3.77/1.74 The replacement map contains the following entries: 3.77/1.74 3.77/1.74 filter: {1, 2, 3} 3.77/1.74 cons: {1} 3.77/1.74 0: empty set 3.77/1.74 s: {1} 3.77/1.74 sieve: {1} 3.77/1.74 nats: {1} 3.77/1.74 zprimes: empty set 3.77/1.74 3.77/1.74 ---------------------------------------- 3.77/1.74 3.77/1.74 (3) CSRRRRProof (EQUIVALENT) 3.77/1.74 The following CSR is given: Context-sensitive rewrite system: 3.77/1.74 The TRS R consists of the following rules: 3.77/1.74 3.77/1.74 filter(cons(X, Y), 0, M) -> cons(0, filter(Y, M, M)) 3.77/1.74 filter(cons(X, Y), s(N), M) -> cons(X, filter(Y, N, M)) 3.77/1.74 sieve(cons(0, Y)) -> cons(0, sieve(Y)) 3.77/1.74 sieve(cons(s(N), Y)) -> cons(s(N), sieve(filter(Y, N, N))) 3.77/1.74 nats(N) -> cons(N, nats(s(N))) 3.77/1.74 zprimes -> sieve(nats(s(s(0)))) 3.77/1.74 3.77/1.74 The replacement map contains the following entries: 3.77/1.74 3.77/1.74 filter: {1, 2, 3} 3.77/1.74 cons: {1} 3.77/1.74 0: empty set 3.77/1.74 s: {1} 3.77/1.74 sieve: {1} 3.77/1.74 nats: {1} 3.77/1.74 zprimes: empty set 3.77/1.74 Used ordering: 3.77/1.74 Polynomial interpretation [POLO]: 3.77/1.74 3.77/1.74 POL(0) = 0 3.77/1.74 POL(cons(x_1, x_2)) = x_1 3.77/1.74 POL(filter(x_1, x_2, x_3)) = x_1 + x_2 + x_3 3.77/1.74 POL(nats(x_1)) = x_1 3.77/1.74 POL(s(x_1)) = x_1 3.77/1.74 POL(sieve(x_1)) = 1 + x_1 3.77/1.74 POL(zprimes) = 1 3.77/1.74 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: 3.77/1.74 3.77/1.74 sieve(cons(0, Y)) -> cons(0, sieve(Y)) 3.77/1.74 sieve(cons(s(N), Y)) -> cons(s(N), sieve(filter(Y, N, N))) 3.77/1.74 3.77/1.74 3.77/1.74 3.77/1.74 3.77/1.74 ---------------------------------------- 3.77/1.74 3.77/1.74 (4) 3.77/1.74 Obligation: 3.77/1.74 Context-sensitive rewrite system: 3.77/1.74 The TRS R consists of the following rules: 3.77/1.74 3.77/1.74 filter(cons(X, Y), 0, M) -> cons(0, filter(Y, M, M)) 3.77/1.74 filter(cons(X, Y), s(N), M) -> cons(X, filter(Y, N, M)) 3.77/1.74 nats(N) -> cons(N, nats(s(N))) 3.77/1.74 zprimes -> sieve(nats(s(s(0)))) 3.77/1.74 3.77/1.74 The replacement map contains the following entries: 3.77/1.74 3.77/1.74 filter: {1, 2, 3} 3.77/1.74 cons: {1} 3.77/1.74 0: empty set 3.77/1.74 s: {1} 3.77/1.74 sieve: {1} 3.77/1.74 nats: {1} 3.77/1.74 zprimes: empty set 3.77/1.74 3.77/1.74 ---------------------------------------- 3.77/1.74 3.77/1.74 (5) CSRRRRProof (EQUIVALENT) 3.77/1.74 The following CSR is given: Context-sensitive rewrite system: 3.77/1.74 The TRS R consists of the following rules: 3.77/1.74 3.77/1.74 filter(cons(X, Y), 0, M) -> cons(0, filter(Y, M, M)) 3.77/1.74 filter(cons(X, Y), s(N), M) -> cons(X, filter(Y, N, M)) 3.77/1.74 nats(N) -> cons(N, nats(s(N))) 3.77/1.74 zprimes -> sieve(nats(s(s(0)))) 3.77/1.74 3.77/1.74 The replacement map contains the following entries: 3.77/1.74 3.77/1.74 filter: {1, 2, 3} 3.77/1.74 cons: {1} 3.77/1.74 0: empty set 3.77/1.74 s: {1} 3.77/1.74 sieve: {1} 3.77/1.74 nats: {1} 3.77/1.74 zprimes: empty set 3.77/1.74 Used ordering: 3.77/1.74 Polynomial interpretation [POLO]: 3.77/1.74 3.77/1.74 POL(0) = 0 3.77/1.74 POL(cons(x_1, x_2)) = x_1 3.77/1.74 POL(filter(x_1, x_2, x_3)) = 1 + x_1 + 2*x_2 + 2*x_3 3.77/1.74 POL(nats(x_1)) = 1 + x_1 3.77/1.74 POL(s(x_1)) = x_1 3.77/1.74 POL(sieve(x_1)) = x_1 3.77/1.74 POL(zprimes) = 2 3.77/1.74 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: 3.77/1.74 3.77/1.74 filter(cons(X, Y), 0, M) -> cons(0, filter(Y, M, M)) 3.77/1.74 filter(cons(X, Y), s(N), M) -> cons(X, filter(Y, N, M)) 3.77/1.74 nats(N) -> cons(N, nats(s(N))) 3.77/1.74 zprimes -> sieve(nats(s(s(0)))) 3.77/1.74 3.77/1.74 3.77/1.74 3.77/1.74 3.77/1.74 ---------------------------------------- 3.77/1.74 3.77/1.74 (6) 3.77/1.74 Obligation: 3.77/1.74 Context-sensitive rewrite system: 3.77/1.74 R is empty. 3.77/1.74 3.77/1.74 ---------------------------------------- 3.77/1.74 3.77/1.74 (7) RisEmptyProof (EQUIVALENT) 3.77/1.74 The CSR R is empty. Hence, termination is trivially proven. 3.77/1.74 ---------------------------------------- 3.77/1.74 3.77/1.74 (8) 3.77/1.74 YES 3.77/1.79 EOF