/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: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Termination w.r.t. Q of the given QTRS could be proven: (0) QTRS (1) QTRSToCSRProof [EQUIVALENT, 0 ms] (2) CSR (3) CSRRRRProof [EQUIVALENT, 45 ms] (4) CSR (5) CSRRRRProof [EQUIVALENT, 0 ms] (6) CSR (7) CSRRRRProof [EQUIVALENT, 4 ms] (8) CSR (9) CSRRRRProof [EQUIVALENT, 0 ms] (10) CSR (11) RisEmptyProof [EQUIVALENT, 0 ms] (12) YES ---------------------------------------- (0) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: active(terms(N)) -> mark(cons(recip(sqr(N)), terms(s(N)))) active(sqr(0)) -> mark(0) active(sqr(s(X))) -> mark(s(add(sqr(X), dbl(X)))) active(dbl(0)) -> mark(0) active(dbl(s(X))) -> mark(s(s(dbl(X)))) active(add(0, X)) -> mark(X) active(add(s(X), Y)) -> mark(s(add(X, Y))) active(first(0, X)) -> mark(nil) active(first(s(X), cons(Y, Z))) -> mark(cons(Y, first(X, Z))) active(terms(X)) -> terms(active(X)) active(cons(X1, X2)) -> cons(active(X1), X2) active(recip(X)) -> recip(active(X)) active(sqr(X)) -> sqr(active(X)) active(add(X1, X2)) -> add(active(X1), X2) active(add(X1, X2)) -> add(X1, active(X2)) active(dbl(X)) -> dbl(active(X)) active(first(X1, X2)) -> first(active(X1), X2) active(first(X1, X2)) -> first(X1, active(X2)) terms(mark(X)) -> mark(terms(X)) cons(mark(X1), X2) -> mark(cons(X1, X2)) recip(mark(X)) -> mark(recip(X)) sqr(mark(X)) -> mark(sqr(X)) add(mark(X1), X2) -> mark(add(X1, X2)) add(X1, mark(X2)) -> mark(add(X1, X2)) dbl(mark(X)) -> mark(dbl(X)) first(mark(X1), X2) -> mark(first(X1, X2)) first(X1, mark(X2)) -> mark(first(X1, X2)) proper(terms(X)) -> terms(proper(X)) proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) proper(recip(X)) -> recip(proper(X)) proper(sqr(X)) -> sqr(proper(X)) proper(s(X)) -> s(proper(X)) proper(0) -> ok(0) proper(add(X1, X2)) -> add(proper(X1), proper(X2)) proper(dbl(X)) -> dbl(proper(X)) proper(first(X1, X2)) -> first(proper(X1), proper(X2)) proper(nil) -> ok(nil) terms(ok(X)) -> ok(terms(X)) cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) recip(ok(X)) -> ok(recip(X)) sqr(ok(X)) -> ok(sqr(X)) s(ok(X)) -> ok(s(X)) add(ok(X1), ok(X2)) -> ok(add(X1, X2)) dbl(ok(X)) -> ok(dbl(X)) first(ok(X1), ok(X2)) -> ok(first(X1, X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Q is empty. ---------------------------------------- (1) QTRSToCSRProof (EQUIVALENT) The following Q TRS is given: Q restricted rewrite system: The TRS R consists of the following rules: active(terms(N)) -> mark(cons(recip(sqr(N)), terms(s(N)))) active(sqr(0)) -> mark(0) active(sqr(s(X))) -> mark(s(add(sqr(X), dbl(X)))) active(dbl(0)) -> mark(0) active(dbl(s(X))) -> mark(s(s(dbl(X)))) active(add(0, X)) -> mark(X) active(add(s(X), Y)) -> mark(s(add(X, Y))) active(first(0, X)) -> mark(nil) active(first(s(X), cons(Y, Z))) -> mark(cons(Y, first(X, Z))) active(terms(X)) -> terms(active(X)) active(cons(X1, X2)) -> cons(active(X1), X2) active(recip(X)) -> recip(active(X)) active(sqr(X)) -> sqr(active(X)) active(add(X1, X2)) -> add(active(X1), X2) active(add(X1, X2)) -> add(X1, active(X2)) active(dbl(X)) -> dbl(active(X)) active(first(X1, X2)) -> first(active(X1), X2) active(first(X1, X2)) -> first(X1, active(X2)) terms(mark(X)) -> mark(terms(X)) cons(mark(X1), X2) -> mark(cons(X1, X2)) recip(mark(X)) -> mark(recip(X)) sqr(mark(X)) -> mark(sqr(X)) add(mark(X1), X2) -> mark(add(X1, X2)) add(X1, mark(X2)) -> mark(add(X1, X2)) dbl(mark(X)) -> mark(dbl(X)) first(mark(X1), X2) -> mark(first(X1, X2)) first(X1, mark(X2)) -> mark(first(X1, X2)) proper(terms(X)) -> terms(proper(X)) proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) proper(recip(X)) -> recip(proper(X)) proper(sqr(X)) -> sqr(proper(X)) proper(s(X)) -> s(proper(X)) proper(0) -> ok(0) proper(add(X1, X2)) -> add(proper(X1), proper(X2)) proper(dbl(X)) -> dbl(proper(X)) proper(first(X1, X2)) -> first(proper(X1), proper(X2)) proper(nil) -> ok(nil) terms(ok(X)) -> ok(terms(X)) cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) recip(ok(X)) -> ok(recip(X)) sqr(ok(X)) -> ok(sqr(X)) s(ok(X)) -> ok(s(X)) add(ok(X1), ok(X2)) -> ok(add(X1, X2)) dbl(ok(X)) -> ok(dbl(X)) first(ok(X1), ok(X2)) -> ok(first(X1, X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) Q is empty. Special symbols used for the transformation (see [GM04]): top: top_1, active: active_1, mark: mark_1, ok: ok_1, proper: proper_1 The replacement map contains the following entries: terms: {1} cons: {1} recip: {1} sqr: {1} s: empty set 0: empty set add: {1, 2} dbl: {1} first: {1, 2} nil: empty set The QTRS contained all rules created by the complete Giesl-Middeldorp transformation. Therefore, the inverse transformation is complete (and sound). ---------------------------------------- (2) Obligation: Context-sensitive rewrite system: The TRS R consists of the following rules: terms(N) -> cons(recip(sqr(N)), terms(s(N))) sqr(0) -> 0 sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0) -> 0 dbl(s(X)) -> s(s(dbl(X))) add(0, X) -> X add(s(X), Y) -> s(add(X, Y)) first(0, X) -> nil first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) The replacement map contains the following entries: terms: {1} cons: {1} recip: {1} sqr: {1} s: empty set 0: empty set add: {1, 2} dbl: {1} first: {1, 2} nil: empty set ---------------------------------------- (3) CSRRRRProof (EQUIVALENT) The following CSR is given: Context-sensitive rewrite system: The TRS R consists of the following rules: terms(N) -> cons(recip(sqr(N)), terms(s(N))) sqr(0) -> 0 sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0) -> 0 dbl(s(X)) -> s(s(dbl(X))) add(0, X) -> X add(s(X), Y) -> s(add(X, Y)) first(0, X) -> nil first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) The replacement map contains the following entries: terms: {1} cons: {1} recip: {1} sqr: {1} s: empty set 0: empty set add: {1, 2} dbl: {1} first: {1, 2} nil: empty set Used ordering: Polynomial interpretation [POLO]: POL(0) = 1 POL(add(x_1, x_2)) = x_1 + x_2 POL(cons(x_1, x_2)) = x_1 POL(dbl(x_1)) = x_1 POL(first(x_1, x_2)) = x_1 + x_2 POL(nil) = 1 POL(recip(x_1)) = 1 + x_1 POL(s(x_1)) = 0 POL(sqr(x_1)) = x_1 POL(terms(x_1)) = 1 + x_1 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: add(0, X) -> X ---------------------------------------- (4) Obligation: Context-sensitive rewrite system: The TRS R consists of the following rules: terms(N) -> cons(recip(sqr(N)), terms(s(N))) sqr(0) -> 0 sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0) -> 0 dbl(s(X)) -> s(s(dbl(X))) add(s(X), Y) -> s(add(X, Y)) first(0, X) -> nil first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) The replacement map contains the following entries: terms: {1} cons: {1} recip: {1} sqr: {1} s: empty set 0: empty set add: {1, 2} dbl: {1} first: {1, 2} nil: empty set ---------------------------------------- (5) CSRRRRProof (EQUIVALENT) The following CSR is given: Context-sensitive rewrite system: The TRS R consists of the following rules: terms(N) -> cons(recip(sqr(N)), terms(s(N))) sqr(0) -> 0 sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0) -> 0 dbl(s(X)) -> s(s(dbl(X))) add(s(X), Y) -> s(add(X, Y)) first(0, X) -> nil first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) The replacement map contains the following entries: terms: {1} cons: {1} recip: {1} sqr: {1} s: empty set 0: empty set add: {1, 2} dbl: {1} first: {1, 2} nil: empty set Used ordering: Polynomial interpretation [POLO]: POL(0) = 0 POL(add(x_1, x_2)) = 1 + 2*x_1 + 2*x_2 POL(cons(x_1, x_2)) = 2 + 2*x_1 POL(dbl(x_1)) = 1 + x_1 POL(first(x_1, x_2)) = 1 + 2*x_1 + 2*x_2 POL(nil) = 0 POL(recip(x_1)) = x_1 POL(s(x_1)) = 2 POL(sqr(x_1)) = x_1 POL(terms(x_1)) = 2 + 2*x_1 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: dbl(0) -> 0 dbl(s(X)) -> s(s(dbl(X))) add(s(X), Y) -> s(add(X, Y)) first(0, X) -> nil first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) ---------------------------------------- (6) Obligation: Context-sensitive rewrite system: The TRS R consists of the following rules: terms(N) -> cons(recip(sqr(N)), terms(s(N))) sqr(0) -> 0 sqr(s(X)) -> s(add(sqr(X), dbl(X))) The replacement map contains the following entries: terms: {1} cons: {1} recip: {1} sqr: {1} s: empty set 0: empty set add: {1, 2} dbl: {1} ---------------------------------------- (7) CSRRRRProof (EQUIVALENT) The following CSR is given: Context-sensitive rewrite system: The TRS R consists of the following rules: terms(N) -> cons(recip(sqr(N)), terms(s(N))) sqr(0) -> 0 sqr(s(X)) -> s(add(sqr(X), dbl(X))) The replacement map contains the following entries: terms: {1} cons: {1} recip: {1} sqr: {1} s: empty set 0: empty set add: {1, 2} dbl: {1} Used ordering: Polynomial interpretation [POLO]: POL(0) = 0 POL(add(x_1, x_2)) = x_1 + x_2 POL(cons(x_1, x_2)) = x_1 POL(dbl(x_1)) = x_1 POL(recip(x_1)) = x_1 POL(s(x_1)) = 1 POL(sqr(x_1)) = 1 + x_1 POL(terms(x_1)) = 1 + x_1 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: sqr(0) -> 0 sqr(s(X)) -> s(add(sqr(X), dbl(X))) ---------------------------------------- (8) Obligation: Context-sensitive rewrite system: The TRS R consists of the following rules: terms(N) -> cons(recip(sqr(N)), terms(s(N))) The replacement map contains the following entries: terms: {1} cons: {1} recip: {1} sqr: {1} s: empty set ---------------------------------------- (9) CSRRRRProof (EQUIVALENT) The following CSR is given: Context-sensitive rewrite system: The TRS R consists of the following rules: terms(N) -> cons(recip(sqr(N)), terms(s(N))) The replacement map contains the following entries: terms: {1} cons: {1} recip: {1} sqr: {1} s: empty set Used ordering: Polynomial interpretation [POLO]: POL(cons(x_1, x_2)) = x_1 POL(recip(x_1)) = 2*x_1 POL(s(x_1)) = 0 POL(sqr(x_1)) = x_1 POL(terms(x_1)) = 1 + 2*x_1 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: terms(N) -> cons(recip(sqr(N)), terms(s(N))) ---------------------------------------- (10) Obligation: Context-sensitive rewrite system: R is empty. ---------------------------------------- (11) RisEmptyProof (EQUIVALENT) The CSR R is empty. Hence, termination is trivially proven. ---------------------------------------- (12) YES