YES proof of /export/starexec/sandbox2/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, 47 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(from(X)) -> mark(cons(X, from(s(X)))) active(length(nil)) -> mark(0) active(length(cons(X, Y))) -> mark(s(length1(Y))) active(length1(X)) -> mark(length(X)) active(from(X)) -> from(active(X)) active(cons(X1, X2)) -> cons(active(X1), X2) active(s(X)) -> s(active(X)) from(mark(X)) -> mark(from(X)) cons(mark(X1), X2) -> mark(cons(X1, X2)) s(mark(X)) -> mark(s(X)) proper(from(X)) -> from(proper(X)) proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) proper(s(X)) -> s(proper(X)) proper(length(X)) -> length(proper(X)) proper(nil) -> ok(nil) proper(0) -> ok(0) proper(length1(X)) -> length1(proper(X)) from(ok(X)) -> ok(from(X)) cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) s(ok(X)) -> ok(s(X)) length(ok(X)) -> ok(length(X)) length1(ok(X)) -> ok(length1(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(length(nil)) active(length(cons(x0, x1))) active(length1(x0)) active(cons(x0, x1)) active(s(x0)) from(mark(x0)) cons(mark(x0), x1) s(mark(x0)) proper(from(x0)) proper(cons(x0, x1)) proper(s(x0)) proper(length(x0)) proper(nil) proper(0) proper(length1(x0)) from(ok(x0)) cons(ok(x0), ok(x1)) s(ok(x0)) length(ok(x0)) length1(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(from(X)) -> mark(cons(X, from(s(X)))) active(length(nil)) -> mark(0) active(length(cons(X, Y))) -> mark(s(length1(Y))) active(length1(X)) -> mark(length(X)) active(from(X)) -> from(active(X)) active(cons(X1, X2)) -> cons(active(X1), X2) active(s(X)) -> s(active(X)) from(mark(X)) -> mark(from(X)) cons(mark(X1), X2) -> mark(cons(X1, X2)) s(mark(X)) -> mark(s(X)) proper(from(X)) -> from(proper(X)) proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) proper(s(X)) -> s(proper(X)) proper(length(X)) -> length(proper(X)) proper(nil) -> ok(nil) proper(0) -> ok(0) proper(length1(X)) -> length1(proper(X)) from(ok(X)) -> ok(from(X)) cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) s(ok(X)) -> ok(s(X)) length(ok(X)) -> ok(length(X)) length1(ok(X)) -> ok(length1(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(length(nil)) active(length(cons(x0, x1))) active(length1(x0)) active(cons(x0, x1)) active(s(x0)) from(mark(x0)) cons(mark(x0), x1) s(mark(x0)) proper(from(x0)) proper(cons(x0, x1)) proper(s(x0)) proper(length(x0)) proper(nil) proper(0) proper(length1(x0)) from(ok(x0)) cons(ok(x0), ok(x1)) s(ok(x0)) length(ok(x0)) length1(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: from: {1} cons: {1} s: {1} length: empty set nil: empty set 0: empty set length1: empty set 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: from(X) -> cons(X, from(s(X))) length(nil) -> 0 length(cons(X, Y)) -> s(length1(Y)) length1(X) -> length(X) The replacement map contains the following entries: from: {1} cons: {1} s: {1} length: empty set nil: empty set 0: empty set length1: empty set ---------------------------------------- (3) 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))) length(nil) -> 0 length(cons(X, Y)) -> s(length1(Y)) length1(X) -> length(X) The replacement map contains the following entries: from: {1} cons: {1} s: {1} length: empty set nil: empty set 0: empty set length1: empty set Used ordering: Polynomial interpretation [POLO]: POL(0) = 1 POL(cons(x_1, x_2)) = x_1 POL(from(x_1)) = 1 + x_1 POL(length(x_1)) = 1 POL(length1(x_1)) = 1 POL(nil) = 0 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))) ---------------------------------------- (4) Obligation: Context-sensitive rewrite system: The TRS R consists of the following rules: length(nil) -> 0 length(cons(X, Y)) -> s(length1(Y)) length1(X) -> length(X) The replacement map contains the following entries: cons: {1} s: {1} length: empty set nil: empty set 0: empty set length1: empty set ---------------------------------------- (5) CSRRRRProof (EQUIVALENT) The following CSR is given: Context-sensitive rewrite system: The TRS R consists of the following rules: length(nil) -> 0 length(cons(X, Y)) -> s(length1(Y)) length1(X) -> length(X) The replacement map contains the following entries: cons: {1} s: {1} length: empty set nil: empty set 0: empty set length1: empty set Used ordering: Matrix interpretation [MATRO] to (N^2, +, *, >=, >) : <<< POL(length(x_1)) = [[1], [1]] + [[1, 1], [1, 1]] * x_1 >>> <<< POL(nil) = [[0], [1]] >>> <<< POL(0) = [[1], [0]] >>> <<< POL(cons(x_1, x_2)) = [[1], [0]] + [[1, 1], [1, 1]] * x_1 + [[1, 1], [1, 1]] * x_2 >>> <<< POL(s(x_1)) = [[0], [0]] + [[1, 1], [1, 1]] * x_1 >>> <<< POL(length1(x_1)) = [[1], [1]] + [[1, 1], [1, 1]] * x_1 >>> With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: length(nil) -> 0 ---------------------------------------- (6) Obligation: Context-sensitive rewrite system: The TRS R consists of the following rules: length(cons(X, Y)) -> s(length1(Y)) length1(X) -> length(X) The replacement map contains the following entries: cons: {1} s: {1} length: empty set length1: empty set ---------------------------------------- (7) CSRRRRProof (EQUIVALENT) The following CSR is given: Context-sensitive rewrite system: The TRS R consists of the following rules: length(cons(X, Y)) -> s(length1(Y)) length1(X) -> length(X) The replacement map contains the following entries: cons: {1} s: {1} length: empty set length1: empty set Used ordering: Polynomial interpretation [POLO]: POL(cons(x_1, x_2)) = 2 + x_1 + x_2 POL(length(x_1)) = 1 + 2*x_1 POL(length1(x_1)) = 2 + 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: length(cons(X, Y)) -> s(length1(Y)) length1(X) -> length(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