YES proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty Termination w.r.t. Q of the given QTRS could be proven: (0) QTRS (1) QTRSToCSRProof [SOUND, 0 ms] (2) CSR (3) CSRRRRProof [EQUIVALENT, 49 ms] (4) CSR (5) CSRRRRProof [EQUIVALENT, 0 ms] (6) CSR (7) CSRRRRProof [EQUIVALENT, 0 ms] (8) CSR (9) RisEmptyProof [EQUIVALENT, 0 ms] (10) YES ---------------------------------------- (0) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: active(first(0, X)) -> mark(nil) active(first(s(X), cons(Y, Z))) -> mark(cons(Y, first(X, Z))) active(from(X)) -> mark(cons(X, from(s(X)))) active(first(X1, X2)) -> first(active(X1), X2) active(first(X1, X2)) -> first(X1, active(X2)) active(s(X)) -> s(active(X)) active(cons(X1, X2)) -> cons(active(X1), X2) active(from(X)) -> from(active(X)) first(mark(X1), X2) -> mark(first(X1, X2)) first(X1, mark(X2)) -> mark(first(X1, X2)) s(mark(X)) -> mark(s(X)) cons(mark(X1), X2) -> mark(cons(X1, X2)) from(mark(X)) -> mark(from(X)) proper(first(X1, X2)) -> first(proper(X1), proper(X2)) proper(0) -> ok(0) proper(nil) -> ok(nil) proper(s(X)) -> s(proper(X)) proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) proper(from(X)) -> from(proper(X)) first(ok(X1), ok(X2)) -> ok(first(X1, X2)) s(ok(X)) -> ok(s(X)) cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) from(ok(X)) -> ok(from(X)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) The set Q consists of the following terms: active(from(x0)) active(first(x0, x1)) active(s(x0)) active(cons(x0, x1)) first(mark(x0), x1) first(x0, mark(x1)) s(mark(x0)) cons(mark(x0), x1) from(mark(x0)) proper(first(x0, x1)) proper(0) proper(nil) proper(s(x0)) proper(cons(x0, x1)) proper(from(x0)) first(ok(x0), ok(x1)) s(ok(x0)) cons(ok(x0), ok(x1)) from(ok(x0)) top(mark(x0)) top(ok(x0)) ---------------------------------------- (1) QTRSToCSRProof (SOUND) The following Q TRS is given: Q restricted rewrite system: The TRS R consists of the following rules: active(first(0, X)) -> mark(nil) active(first(s(X), cons(Y, Z))) -> mark(cons(Y, first(X, Z))) active(from(X)) -> mark(cons(X, from(s(X)))) active(first(X1, X2)) -> first(active(X1), X2) active(first(X1, X2)) -> first(X1, active(X2)) active(s(X)) -> s(active(X)) active(cons(X1, X2)) -> cons(active(X1), X2) active(from(X)) -> from(active(X)) first(mark(X1), X2) -> mark(first(X1, X2)) first(X1, mark(X2)) -> mark(first(X1, X2)) s(mark(X)) -> mark(s(X)) cons(mark(X1), X2) -> mark(cons(X1, X2)) from(mark(X)) -> mark(from(X)) proper(first(X1, X2)) -> first(proper(X1), proper(X2)) proper(0) -> ok(0) proper(nil) -> ok(nil) proper(s(X)) -> s(proper(X)) proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) proper(from(X)) -> from(proper(X)) first(ok(X1), ok(X2)) -> ok(first(X1, X2)) s(ok(X)) -> ok(s(X)) cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) from(ok(X)) -> ok(from(X)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) The set Q consists of the following terms: active(from(x0)) active(first(x0, x1)) active(s(x0)) active(cons(x0, x1)) first(mark(x0), x1) first(x0, mark(x1)) s(mark(x0)) cons(mark(x0), x1) from(mark(x0)) proper(first(x0, x1)) proper(0) proper(nil) proper(s(x0)) proper(cons(x0, x1)) proper(from(x0)) first(ok(x0), ok(x1)) s(ok(x0)) cons(ok(x0), ok(x1)) from(ok(x0)) top(mark(x0)) top(ok(x0)) 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: first: {1, 2} 0: empty set nil: empty set s: {1} cons: {1} from: {1} 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. ---------------------------------------- (2) Obligation: Context-sensitive rewrite system: The TRS R consists of the following rules: first(0, X) -> nil first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) from(X) -> cons(X, from(s(X))) The replacement map contains the following entries: first: {1, 2} 0: empty set nil: empty set s: {1} cons: {1} from: {1} ---------------------------------------- (3) CSRRRRProof (EQUIVALENT) The following CSR is given: Context-sensitive rewrite system: The TRS R consists of the following rules: first(0, X) -> nil first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) from(X) -> cons(X, from(s(X))) The replacement map contains the following entries: first: {1, 2} 0: empty set nil: empty set s: {1} cons: {1} from: {1} Used ordering: Polynomial interpretation [POLO]: POL(0) = 0 POL(cons(x_1, x_2)) = 1 + x_1 POL(first(x_1, x_2)) = 1 + x_1 + x_2 POL(from(x_1)) = 1 + x_1 POL(nil) = 1 POL(s(x_1)) = x_1 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) ---------------------------------------- (4) Obligation: Context-sensitive rewrite system: The TRS R consists of the following rules: first(0, X) -> nil from(X) -> cons(X, from(s(X))) The replacement map contains the following entries: first: {1, 2} 0: empty set nil: empty set s: {1} cons: {1} from: {1} ---------------------------------------- (5) CSRRRRProof (EQUIVALENT) The following CSR is given: Context-sensitive rewrite system: The TRS R consists of the following rules: first(0, X) -> nil from(X) -> cons(X, from(s(X))) The replacement map contains the following entries: first: {1, 2} 0: empty set nil: empty set s: {1} cons: {1} from: {1} Used ordering: Polynomial interpretation [POLO]: POL(0) = 2 POL(cons(x_1, x_2)) = x_1 POL(first(x_1, x_2)) = 1 + x_1 + x_2 POL(from(x_1)) = 2*x_1 POL(nil) = 1 POL(s(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: first(0, X) -> nil ---------------------------------------- (6) Obligation: Context-sensitive rewrite system: The TRS R consists of the following rules: from(X) -> cons(X, from(s(X))) The replacement map contains the following entries: s: {1} cons: {1} from: {1} ---------------------------------------- (7) CSRRRRProof (EQUIVALENT) The following CSR is given: Context-sensitive rewrite system: The TRS R consists of the following rules: from(X) -> cons(X, from(s(X))) The replacement map contains the following entries: s: {1} cons: {1} from: {1} Used ordering: Polynomial interpretation [POLO]: POL(cons(x_1, x_2)) = x_1 POL(from(x_1)) = 1 + 2*x_1 POL(s(x_1)) = x_1 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: from(X) -> cons(X, from(s(X))) ---------------------------------------- (8) Obligation: Context-sensitive rewrite system: R is empty. ---------------------------------------- (9) RisEmptyProof (EQUIVALENT) The CSR R is empty. Hence, termination is trivially proven. ---------------------------------------- (10) YES