YES proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty Termination of the given CSR could be proven: (0) CSR (1) CSRRRRProof [EQUIVALENT, 50 ms] (2) CSR (3) CSRRRRProof [EQUIVALENT, 10 ms] (4) CSR (5) RisEmptyProof [EQUIVALENT, 0 ms] (6) YES ---------------------------------------- (0) Obligation: Context-sensitive rewrite system: The TRS R consists of the following rules: fst(0, Z) -> nil fst(s(X), cons(Y, Z)) -> cons(Y, fst(X, Z)) from(X) -> cons(X, from(s(X))) add(0, X) -> X add(s(X), Y) -> s(add(X, Y)) len(nil) -> 0 len(cons(X, Z)) -> s(len(Z)) The replacement map contains the following entries: fst: {1, 2} 0: empty set nil: empty set s: empty set cons: {1} from: {1} add: {1, 2} len: {1} ---------------------------------------- (1) CSRRRRProof (EQUIVALENT) The following CSR is given: Context-sensitive rewrite system: The TRS R consists of the following rules: fst(0, Z) -> nil fst(s(X), cons(Y, Z)) -> cons(Y, fst(X, Z)) from(X) -> cons(X, from(s(X))) add(0, X) -> X add(s(X), Y) -> s(add(X, Y)) len(nil) -> 0 len(cons(X, Z)) -> s(len(Z)) The replacement map contains the following entries: fst: {1, 2} 0: empty set nil: empty set s: empty set cons: {1} from: {1} add: {1, 2} len: {1} Used ordering: Polynomial interpretation [POLO]: POL(0) = 1 POL(add(x_1, x_2)) = x_1 + x_2 POL(cons(x_1, x_2)) = 1 + x_1 POL(from(x_1)) = 1 + x_1 POL(fst(x_1, x_2)) = x_1 + x_2 POL(len(x_1)) = x_1 POL(nil) = 1 POL(s(x_1)) = 1 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: fst(s(X), cons(Y, Z)) -> cons(Y, fst(X, Z)) add(0, X) -> X ---------------------------------------- (2) Obligation: Context-sensitive rewrite system: The TRS R consists of the following rules: fst(0, Z) -> nil from(X) -> cons(X, from(s(X))) add(s(X), Y) -> s(add(X, Y)) len(nil) -> 0 len(cons(X, Z)) -> s(len(Z)) The replacement map contains the following entries: fst: {1, 2} 0: empty set nil: empty set s: empty set cons: {1} from: {1} add: {1, 2} len: {1} ---------------------------------------- (3) CSRRRRProof (EQUIVALENT) The following CSR is given: Context-sensitive rewrite system: The TRS R consists of the following rules: fst(0, Z) -> nil from(X) -> cons(X, from(s(X))) add(s(X), Y) -> s(add(X, Y)) len(nil) -> 0 len(cons(X, Z)) -> s(len(Z)) The replacement map contains the following entries: fst: {1, 2} 0: empty set nil: empty set s: empty set cons: {1} from: {1} add: {1, 2} len: {1} Used ordering: Polynomial interpretation [POLO]: POL(0) = 1 POL(add(x_1, x_2)) = 1 + x_1 + 2*x_2 POL(cons(x_1, x_2)) = 1 + x_1 POL(from(x_1)) = 2 + 2*x_1 POL(fst(x_1, x_2)) = 1 + 2*x_1 + x_2 POL(len(x_1)) = 2 + x_1 POL(nil) = 0 POL(s(x_1)) = 0 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: fst(0, Z) -> nil from(X) -> cons(X, from(s(X))) add(s(X), Y) -> s(add(X, Y)) len(nil) -> 0 len(cons(X, Z)) -> s(len(Z)) ---------------------------------------- (4) Obligation: Context-sensitive rewrite system: R is empty. ---------------------------------------- (5) RisEmptyProof (EQUIVALENT) The CSR R is empty. Hence, termination is trivially proven. ---------------------------------------- (6) YES