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, 41 ms] (4) CSR (5) CSRRRRProof [EQUIVALENT, 15 ms] (6) CSR (7) CSRRRRProof [EQUIVALENT, 0 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(U11(tt, V2)) -> mark(U12(isNat(V2))) active(U12(tt)) -> mark(tt) active(U21(tt)) -> mark(tt) active(U31(tt, N)) -> mark(N) active(U41(tt, M, N)) -> mark(U42(isNat(N), M, N)) active(U42(tt, M, N)) -> mark(s(plus(N, M))) active(isNat(0)) -> mark(tt) active(isNat(plus(V1, V2))) -> mark(U11(isNat(V1), V2)) active(isNat(s(V1))) -> mark(U21(isNat(V1))) active(plus(N, 0)) -> mark(U31(isNat(N), N)) active(plus(N, s(M))) -> mark(U41(isNat(M), M, N)) active(U11(X1, X2)) -> U11(active(X1), X2) active(U12(X)) -> U12(active(X)) active(U21(X)) -> U21(active(X)) active(U31(X1, X2)) -> U31(active(X1), X2) active(U41(X1, X2, X3)) -> U41(active(X1), X2, X3) active(U42(X1, X2, X3)) -> U42(active(X1), X2, X3) active(s(X)) -> s(active(X)) active(plus(X1, X2)) -> plus(active(X1), X2) active(plus(X1, X2)) -> plus(X1, active(X2)) U11(mark(X1), X2) -> mark(U11(X1, X2)) U12(mark(X)) -> mark(U12(X)) U21(mark(X)) -> mark(U21(X)) U31(mark(X1), X2) -> mark(U31(X1, X2)) U41(mark(X1), X2, X3) -> mark(U41(X1, X2, X3)) U42(mark(X1), X2, X3) -> mark(U42(X1, X2, X3)) s(mark(X)) -> mark(s(X)) plus(mark(X1), X2) -> mark(plus(X1, X2)) plus(X1, mark(X2)) -> mark(plus(X1, X2)) proper(U11(X1, X2)) -> U11(proper(X1), proper(X2)) proper(tt) -> ok(tt) proper(U12(X)) -> U12(proper(X)) proper(isNat(X)) -> isNat(proper(X)) proper(U21(X)) -> U21(proper(X)) proper(U31(X1, X2)) -> U31(proper(X1), proper(X2)) proper(U41(X1, X2, X3)) -> U41(proper(X1), proper(X2), proper(X3)) proper(U42(X1, X2, X3)) -> U42(proper(X1), proper(X2), proper(X3)) proper(s(X)) -> s(proper(X)) proper(plus(X1, X2)) -> plus(proper(X1), proper(X2)) proper(0) -> ok(0) U11(ok(X1), ok(X2)) -> ok(U11(X1, X2)) U12(ok(X)) -> ok(U12(X)) isNat(ok(X)) -> ok(isNat(X)) U21(ok(X)) -> ok(U21(X)) U31(ok(X1), ok(X2)) -> ok(U31(X1, X2)) U41(ok(X1), ok(X2), ok(X3)) -> ok(U41(X1, X2, X3)) U42(ok(X1), ok(X2), ok(X3)) -> ok(U42(X1, X2, X3)) s(ok(X)) -> ok(s(X)) plus(ok(X1), ok(X2)) -> ok(plus(X1, X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) The set Q consists of the following terms: active(isNat(0)) active(isNat(plus(x0, x1))) active(isNat(s(x0))) active(U11(x0, x1)) active(U12(x0)) active(U21(x0)) active(U31(x0, x1)) active(U41(x0, x1, x2)) active(U42(x0, x1, x2)) active(s(x0)) active(plus(x0, x1)) U11(mark(x0), x1) U12(mark(x0)) U21(mark(x0)) U31(mark(x0), x1) U41(mark(x0), x1, x2) U42(mark(x0), x1, x2) s(mark(x0)) plus(mark(x0), x1) plus(x0, mark(x1)) proper(U11(x0, x1)) proper(tt) proper(U12(x0)) proper(isNat(x0)) proper(U21(x0)) proper(U31(x0, x1)) proper(U41(x0, x1, x2)) proper(U42(x0, x1, x2)) proper(s(x0)) proper(plus(x0, x1)) proper(0) U11(ok(x0), ok(x1)) U12(ok(x0)) isNat(ok(x0)) U21(ok(x0)) U31(ok(x0), ok(x1)) U41(ok(x0), ok(x1), ok(x2)) U42(ok(x0), ok(x1), ok(x2)) s(ok(x0)) plus(ok(x0), ok(x1)) 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(U11(tt, V2)) -> mark(U12(isNat(V2))) active(U12(tt)) -> mark(tt) active(U21(tt)) -> mark(tt) active(U31(tt, N)) -> mark(N) active(U41(tt, M, N)) -> mark(U42(isNat(N), M, N)) active(U42(tt, M, N)) -> mark(s(plus(N, M))) active(isNat(0)) -> mark(tt) active(isNat(plus(V1, V2))) -> mark(U11(isNat(V1), V2)) active(isNat(s(V1))) -> mark(U21(isNat(V1))) active(plus(N, 0)) -> mark(U31(isNat(N), N)) active(plus(N, s(M))) -> mark(U41(isNat(M), M, N)) active(U11(X1, X2)) -> U11(active(X1), X2) active(U12(X)) -> U12(active(X)) active(U21(X)) -> U21(active(X)) active(U31(X1, X2)) -> U31(active(X1), X2) active(U41(X1, X2, X3)) -> U41(active(X1), X2, X3) active(U42(X1, X2, X3)) -> U42(active(X1), X2, X3) active(s(X)) -> s(active(X)) active(plus(X1, X2)) -> plus(active(X1), X2) active(plus(X1, X2)) -> plus(X1, active(X2)) U11(mark(X1), X2) -> mark(U11(X1, X2)) U12(mark(X)) -> mark(U12(X)) U21(mark(X)) -> mark(U21(X)) U31(mark(X1), X2) -> mark(U31(X1, X2)) U41(mark(X1), X2, X3) -> mark(U41(X1, X2, X3)) U42(mark(X1), X2, X3) -> mark(U42(X1, X2, X3)) s(mark(X)) -> mark(s(X)) plus(mark(X1), X2) -> mark(plus(X1, X2)) plus(X1, mark(X2)) -> mark(plus(X1, X2)) proper(U11(X1, X2)) -> U11(proper(X1), proper(X2)) proper(tt) -> ok(tt) proper(U12(X)) -> U12(proper(X)) proper(isNat(X)) -> isNat(proper(X)) proper(U21(X)) -> U21(proper(X)) proper(U31(X1, X2)) -> U31(proper(X1), proper(X2)) proper(U41(X1, X2, X3)) -> U41(proper(X1), proper(X2), proper(X3)) proper(U42(X1, X2, X3)) -> U42(proper(X1), proper(X2), proper(X3)) proper(s(X)) -> s(proper(X)) proper(plus(X1, X2)) -> plus(proper(X1), proper(X2)) proper(0) -> ok(0) U11(ok(X1), ok(X2)) -> ok(U11(X1, X2)) U12(ok(X)) -> ok(U12(X)) isNat(ok(X)) -> ok(isNat(X)) U21(ok(X)) -> ok(U21(X)) U31(ok(X1), ok(X2)) -> ok(U31(X1, X2)) U41(ok(X1), ok(X2), ok(X3)) -> ok(U41(X1, X2, X3)) U42(ok(X1), ok(X2), ok(X3)) -> ok(U42(X1, X2, X3)) s(ok(X)) -> ok(s(X)) plus(ok(X1), ok(X2)) -> ok(plus(X1, X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) The set Q consists of the following terms: active(isNat(0)) active(isNat(plus(x0, x1))) active(isNat(s(x0))) active(U11(x0, x1)) active(U12(x0)) active(U21(x0)) active(U31(x0, x1)) active(U41(x0, x1, x2)) active(U42(x0, x1, x2)) active(s(x0)) active(plus(x0, x1)) U11(mark(x0), x1) U12(mark(x0)) U21(mark(x0)) U31(mark(x0), x1) U41(mark(x0), x1, x2) U42(mark(x0), x1, x2) s(mark(x0)) plus(mark(x0), x1) plus(x0, mark(x1)) proper(U11(x0, x1)) proper(tt) proper(U12(x0)) proper(isNat(x0)) proper(U21(x0)) proper(U31(x0, x1)) proper(U41(x0, x1, x2)) proper(U42(x0, x1, x2)) proper(s(x0)) proper(plus(x0, x1)) proper(0) U11(ok(x0), ok(x1)) U12(ok(x0)) isNat(ok(x0)) U21(ok(x0)) U31(ok(x0), ok(x1)) U41(ok(x0), ok(x1), ok(x2)) U42(ok(x0), ok(x1), ok(x2)) s(ok(x0)) plus(ok(x0), ok(x1)) 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: U11: {1} tt: empty set U12: {1} isNat: empty set U21: {1} U31: {1} U41: {1} U42: {1} s: {1} plus: {1, 2} 0: 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: U11(tt, V2) -> U12(isNat(V2)) U12(tt) -> tt U21(tt) -> tt U31(tt, N) -> N U41(tt, M, N) -> U42(isNat(N), M, N) U42(tt, M, N) -> s(plus(N, M)) isNat(0) -> tt isNat(plus(V1, V2)) -> U11(isNat(V1), V2) isNat(s(V1)) -> U21(isNat(V1)) plus(N, 0) -> U31(isNat(N), N) plus(N, s(M)) -> U41(isNat(M), M, N) The replacement map contains the following entries: U11: {1} tt: empty set U12: {1} isNat: empty set U21: {1} U31: {1} U41: {1} U42: {1} s: {1} plus: {1, 2} 0: empty set ---------------------------------------- (3) CSRRRRProof (EQUIVALENT) The following CSR is given: Context-sensitive rewrite system: The TRS R consists of the following rules: U11(tt, V2) -> U12(isNat(V2)) U12(tt) -> tt U21(tt) -> tt U31(tt, N) -> N U41(tt, M, N) -> U42(isNat(N), M, N) U42(tt, M, N) -> s(plus(N, M)) isNat(0) -> tt isNat(plus(V1, V2)) -> U11(isNat(V1), V2) isNat(s(V1)) -> U21(isNat(V1)) plus(N, 0) -> U31(isNat(N), N) plus(N, s(M)) -> U41(isNat(M), M, N) The replacement map contains the following entries: U11: {1} tt: empty set U12: {1} isNat: empty set U21: {1} U31: {1} U41: {1} U42: {1} s: {1} plus: {1, 2} 0: empty set Used ordering: Polynomial interpretation [POLO]: POL(0) = 1 POL(U11(x_1, x_2)) = x_1 POL(U12(x_1)) = x_1 POL(U21(x_1)) = x_1 POL(U31(x_1, x_2)) = 1 + x_1 + x_2 POL(U41(x_1, x_2, x_3)) = 1 + x_1 + x_2 + x_3 POL(U42(x_1, x_2, x_3)) = 1 + x_1 + x_2 + x_3 POL(isNat(x_1)) = 0 POL(plus(x_1, x_2)) = 1 + x_1 + x_2 POL(s(x_1)) = x_1 POL(tt) = 0 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: U31(tt, N) -> N plus(N, 0) -> U31(isNat(N), N) ---------------------------------------- (4) Obligation: Context-sensitive rewrite system: The TRS R consists of the following rules: U11(tt, V2) -> U12(isNat(V2)) U12(tt) -> tt U21(tt) -> tt U41(tt, M, N) -> U42(isNat(N), M, N) U42(tt, M, N) -> s(plus(N, M)) isNat(0) -> tt isNat(plus(V1, V2)) -> U11(isNat(V1), V2) isNat(s(V1)) -> U21(isNat(V1)) plus(N, s(M)) -> U41(isNat(M), M, N) The replacement map contains the following entries: U11: {1} tt: empty set U12: {1} isNat: empty set U21: {1} U41: {1} U42: {1} s: {1} plus: {1, 2} 0: empty set ---------------------------------------- (5) CSRRRRProof (EQUIVALENT) The following CSR is given: Context-sensitive rewrite system: The TRS R consists of the following rules: U11(tt, V2) -> U12(isNat(V2)) U12(tt) -> tt U21(tt) -> tt U41(tt, M, N) -> U42(isNat(N), M, N) U42(tt, M, N) -> s(plus(N, M)) isNat(0) -> tt isNat(plus(V1, V2)) -> U11(isNat(V1), V2) isNat(s(V1)) -> U21(isNat(V1)) plus(N, s(M)) -> U41(isNat(M), M, N) The replacement map contains the following entries: U11: {1} tt: empty set U12: {1} isNat: empty set U21: {1} U41: {1} U42: {1} s: {1} plus: {1, 2} 0: empty set Used ordering: Polynomial interpretation [POLO]: POL(0) = 2 POL(U11(x_1, x_2)) = x_1 POL(U12(x_1)) = 2*x_1 POL(U21(x_1)) = x_1 POL(U41(x_1, x_2, x_3)) = 2 + 2*x_1 + 2*x_2 + x_3 POL(U42(x_1, x_2, x_3)) = 2 + 2*x_1 + 2*x_2 + x_3 POL(isNat(x_1)) = 0 POL(plus(x_1, x_2)) = x_1 + 2*x_2 POL(s(x_1)) = 2 + x_1 POL(tt) = 0 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: plus(N, s(M)) -> U41(isNat(M), M, N) ---------------------------------------- (6) Obligation: Context-sensitive rewrite system: The TRS R consists of the following rules: U11(tt, V2) -> U12(isNat(V2)) U12(tt) -> tt U21(tt) -> tt U41(tt, M, N) -> U42(isNat(N), M, N) U42(tt, M, N) -> s(plus(N, M)) isNat(0) -> tt isNat(plus(V1, V2)) -> U11(isNat(V1), V2) isNat(s(V1)) -> U21(isNat(V1)) The replacement map contains the following entries: U11: {1} tt: empty set U12: {1} isNat: empty set U21: {1} U41: {1} U42: {1} s: {1} plus: {1, 2} 0: empty set ---------------------------------------- (7) CSRRRRProof (EQUIVALENT) The following CSR is given: Context-sensitive rewrite system: The TRS R consists of the following rules: U11(tt, V2) -> U12(isNat(V2)) U12(tt) -> tt U21(tt) -> tt U41(tt, M, N) -> U42(isNat(N), M, N) U42(tt, M, N) -> s(plus(N, M)) isNat(0) -> tt isNat(plus(V1, V2)) -> U11(isNat(V1), V2) isNat(s(V1)) -> U21(isNat(V1)) The replacement map contains the following entries: U11: {1} tt: empty set U12: {1} isNat: empty set U21: {1} U41: {1} U42: {1} s: {1} plus: {1, 2} 0: empty set Used ordering: Polynomial interpretation [POLO]: POL(0) = 1 POL(U11(x_1, x_2)) = x_1 + 2*x_2 POL(U12(x_1)) = 2*x_1 POL(U21(x_1)) = 1 + x_1 POL(U41(x_1, x_2, x_3)) = 2 + x_1 + 2*x_2 + 2*x_3 POL(U42(x_1, x_2, x_3)) = 2 + x_1 + 2*x_2 + x_3 POL(isNat(x_1)) = x_1 POL(plus(x_1, x_2)) = x_1 + 2*x_2 POL(s(x_1)) = 2 + x_1 POL(tt) = 0 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: U21(tt) -> tt isNat(0) -> tt isNat(s(V1)) -> U21(isNat(V1)) ---------------------------------------- (8) Obligation: Context-sensitive rewrite system: The TRS R consists of the following rules: U11(tt, V2) -> U12(isNat(V2)) U12(tt) -> tt U41(tt, M, N) -> U42(isNat(N), M, N) U42(tt, M, N) -> s(plus(N, M)) isNat(plus(V1, V2)) -> U11(isNat(V1), V2) The replacement map contains the following entries: U11: {1} tt: empty set U12: {1} isNat: empty set U41: {1} U42: {1} s: {1} plus: {1, 2} ---------------------------------------- (9) CSRRRRProof (EQUIVALENT) The following CSR is given: Context-sensitive rewrite system: The TRS R consists of the following rules: U11(tt, V2) -> U12(isNat(V2)) U12(tt) -> tt U41(tt, M, N) -> U42(isNat(N), M, N) U42(tt, M, N) -> s(plus(N, M)) isNat(plus(V1, V2)) -> U11(isNat(V1), V2) The replacement map contains the following entries: U11: {1} tt: empty set U12: {1} isNat: empty set U41: {1} U42: {1} s: {1} plus: {1, 2} Used ordering: Polynomial interpretation [POLO]: POL(U11(x_1, x_2)) = x_1 + 2*x_2 POL(U12(x_1)) = 1 + 2*x_1 POL(U41(x_1, x_2, x_3)) = 1 + 2*x_1 + 2*x_2 + 2*x_3 POL(U42(x_1, x_2, x_3)) = 2 + x_1 + 2*x_2 + x_3 POL(isNat(x_1)) = x_1 POL(plus(x_1, x_2)) = 2 + x_1 + 2*x_2 POL(s(x_1)) = x_1 POL(tt) = 2 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: U11(tt, V2) -> U12(isNat(V2)) U12(tt) -> tt U41(tt, M, N) -> U42(isNat(N), M, N) U42(tt, M, N) -> s(plus(N, M)) isNat(plus(V1, V2)) -> U11(isNat(V1), V2) ---------------------------------------- (10) Obligation: Context-sensitive rewrite system: R is empty. ---------------------------------------- (11) RisEmptyProof (EQUIVALENT) The CSR R is empty. Hence, termination is trivially proven. ---------------------------------------- (12) YES