/export/starexec/sandbox2/solver/bin/starexec_run_FirstOrder /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES We consider the system theBenchmark. We are asked to determine termination of the following first-order TRS. 0 : [] --> o a : [o] --> o cs : [o * o] --> o d : [o] --> o f : [o * o] --> o nf : [o * o] --> o nil : [] --> o ns : [o] --> o nt : [o] --> o p : [o * o] --> o q : [o] --> o r : [o] --> o s : [o] --> o t : [o] --> o t(X) => cs(r(q(X)), nt(ns(X))) q(0) => 0 q(s(X)) => s(p(q(X), d(X))) d(0) => 0 d(s(X)) => s(s(d(X))) p(0, X) => X p(X, 0) => X p(s(X), s(Y)) => s(s(p(X, Y))) f(0, X) => nil f(s(X), cs(Y, Z)) => cs(Y, nf(X, a(Z))) t(X) => nt(X) s(X) => ns(X) f(X, Y) => nf(X, Y) a(nt(X)) => t(a(X)) a(ns(X)) => s(a(X)) a(nf(X, Y)) => f(a(X), a(Y)) a(X) => X We use the dependency pair framework as described in [Kop12, Ch. 6/7], with static dependency pairs (see [KusIsoSakBla09] and the adaptation for AFSMs in [Kop12, Ch. 7.8]). We thus obtain the following dependency pair problem (P_0, R_0, minimal, formative): Dependency Pairs P_0: 0] t#(X) =#> q#(X) 1] q#(s(X)) =#> s#(p(q(X), d(X))) 2] q#(s(X)) =#> p#(q(X), d(X)) 3] q#(s(X)) =#> q#(X) 4] q#(s(X)) =#> d#(X) 5] d#(s(X)) =#> s#(s(d(X))) 6] d#(s(X)) =#> s#(d(X)) 7] d#(s(X)) =#> d#(X) 8] p#(s(X), s(Y)) =#> s#(s(p(X, Y))) 9] p#(s(X), s(Y)) =#> s#(p(X, Y)) 10] p#(s(X), s(Y)) =#> p#(X, Y) 11] f#(s(X), cs(Y, Z)) =#> a#(Z) 12] a#(nt(X)) =#> t#(a(X)) 13] a#(nt(X)) =#> a#(X) 14] a#(ns(X)) =#> s#(a(X)) 15] a#(ns(X)) =#> a#(X) 16] a#(nf(X, Y)) =#> f#(a(X), a(Y)) 17] a#(nf(X, Y)) =#> a#(X) 18] a#(nf(X, Y)) =#> a#(Y) Rules R_0: t(X) => cs(r(q(X)), nt(ns(X))) q(0) => 0 q(s(X)) => s(p(q(X), d(X))) d(0) => 0 d(s(X)) => s(s(d(X))) p(0, X) => X p(X, 0) => X p(s(X), s(Y)) => s(s(p(X, Y))) f(0, X) => nil f(s(X), cs(Y, Z)) => cs(Y, nf(X, a(Z))) t(X) => nt(X) s(X) => ns(X) f(X, Y) => nf(X, Y) a(nt(X)) => t(a(X)) a(ns(X)) => s(a(X)) a(nf(X, Y)) => f(a(X), a(Y)) a(X) => X Thus, the original system is terminating if (P_0, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_0, R_0, minimal, formative). We place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: * 0 : 1, 2, 3, 4 * 1 : * 2 : 8, 9, 10 * 3 : 1, 2, 3, 4 * 4 : 5, 6, 7 * 5 : * 6 : * 7 : 5, 6, 7 * 8 : * 9 : * 10 : 8, 9, 10 * 11 : 12, 13, 14, 15, 16, 17, 18 * 12 : 0 * 13 : 12, 13, 14, 15, 16, 17, 18 * 14 : * 15 : 12, 13, 14, 15, 16, 17, 18 * 16 : 11 * 17 : 12, 13, 14, 15, 16, 17, 18 * 18 : 12, 13, 14, 15, 16, 17, 18 This graph has the following strongly connected components: P_1: q#(s(X)) =#> q#(X) P_2: d#(s(X)) =#> d#(X) P_3: p#(s(X), s(Y)) =#> p#(X, Y) P_4: f#(s(X), cs(Y, Z)) =#> a#(Z) a#(nt(X)) =#> a#(X) a#(ns(X)) =#> a#(X) a#(nf(X, Y)) =#> f#(a(X), a(Y)) a#(nf(X, Y)) =#> a#(X) a#(nf(X, Y)) =#> a#(Y) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_0, R_0, m, f) by (P_1, R_0, m, f), (P_2, R_0, m, f), (P_3, R_0, m, f) and (P_4, R_0, m, f). Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative) and (P_4, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_4, R_0, minimal, formative). The formative rules of (P_4, R_0) are R_1 ::= t(X) => cs(r(q(X)), nt(ns(X))) q(0) => 0 q(s(X)) => s(p(q(X), d(X))) d(0) => 0 d(s(X)) => s(s(d(X))) p(0, X) => X p(X, 0) => X p(s(X), s(Y)) => s(s(p(X, Y))) f(s(X), cs(Y, Z)) => cs(Y, nf(X, a(Z))) t(X) => nt(X) s(X) => ns(X) f(X, Y) => nf(X, Y) a(nt(X)) => t(a(X)) a(ns(X)) => s(a(X)) a(nf(X, Y)) => f(a(X), a(Y)) a(X) => X By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_4, R_0, minimal, formative) by (P_4, R_1, minimal, formative). Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative) and (P_4, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_4, R_1, minimal, formative). We will use the reduction pair processor [Kop12, Thm. 7.16]. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: f#(s(X), cs(Y, Z)) >? a#(Z) a#(nt(X)) >? a#(X) a#(ns(X)) >? a#(X) a#(nf(X, Y)) >? f#(a(X), a(Y)) a#(nf(X, Y)) >? a#(X) a#(nf(X, Y)) >? a#(Y) t(X) >= cs(r(q(X)), nt(ns(X))) q(0) >= 0 q(s(X)) >= s(p(q(X), d(X))) d(0) >= 0 d(s(X)) >= s(s(d(X))) p(0, X) >= X p(X, 0) >= X p(s(X), s(Y)) >= s(s(p(X, Y))) f(s(X), cs(Y, Z)) >= cs(Y, nf(X, a(Z))) t(X) >= nt(X) s(X) >= ns(X) f(X, Y) >= nf(X, Y) a(nt(X)) >= t(a(X)) a(ns(X)) >= s(a(X)) a(nf(X, Y)) >= f(a(X), a(Y)) a(X) >= X We orient these requirements with a polynomial interpretation in the natural numbers. We consider usable_rules with respect to the following argument filtering: r(x_1) = r() This leaves the following ordering requirements: f#(s(X), cs(Y, Z)) >= a#(Z) a#(nt(X)) > a#(X) a#(ns(X)) >= a#(X) a#(nf(X, Y)) >= f#(a(X), a(Y)) a#(nf(X, Y)) >= a#(X) a#(nf(X, Y)) >= a#(Y) t(X) >= cs(r(q(X)), nt(ns(X))) f(s(X), cs(Y, Z)) >= cs(Y, nf(X, a(Z))) t(X) >= nt(X) s(X) >= ns(X) f(X, Y) >= nf(X, Y) a(nt(X)) >= t(a(X)) a(ns(X)) >= s(a(X)) a(nf(X, Y)) >= f(a(X), a(Y)) a(X) >= X The following interpretation satisfies the requirements: 0 = 0 a = \y0.y0 a# = \y0.y0 cs = \y0y1.y1 d = \y0.0 f = \y0y1.y0 + y1 f# = \y0y1.y1 nf = \y0y1.y0 + y1 ns = \y0.y0 nt = \y0.1 + y0 p = \y0y1.0 q = \y0.0 r = \y0.0 s = \y0.y0 t = \y0.1 + y0 Using this interpretation, the requirements translate to: [[f#(s(_x0), cs(_x1, _x2))]] = x2 >= x2 = [[a#(_x2)]] [[a#(nt(_x0))]] = 1 + x0 > x0 = [[a#(_x0)]] [[a#(ns(_x0))]] = x0 >= x0 = [[a#(_x0)]] [[a#(nf(_x0, _x1))]] = x0 + x1 >= x1 = [[f#(a(_x0), a(_x1))]] [[a#(nf(_x0, _x1))]] = x0 + x1 >= x0 = [[a#(_x0)]] [[a#(nf(_x0, _x1))]] = x0 + x1 >= x1 = [[a#(_x1)]] [[t(_x0)]] = 1 + x0 >= 1 + x0 = [[cs(r(q(_x0)), nt(ns(_x0)))]] [[f(s(_x0), cs(_x1, _x2))]] = x0 + x2 >= x0 + x2 = [[cs(_x1, nf(_x0, a(_x2)))]] [[t(_x0)]] = 1 + x0 >= 1 + x0 = [[nt(_x0)]] [[s(_x0)]] = x0 >= x0 = [[ns(_x0)]] [[f(_x0, _x1)]] = x0 + x1 >= x0 + x1 = [[nf(_x0, _x1)]] [[a(nt(_x0))]] = 1 + x0 >= 1 + x0 = [[t(a(_x0))]] [[a(ns(_x0))]] = x0 >= x0 = [[s(a(_x0))]] [[a(nf(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[f(a(_x0), a(_x1))]] [[a(_x0)]] = x0 >= x0 = [[_x0]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_4, R_1, minimal, formative) by (P_5, R_1, minimal, formative), where P_5 consists of: f#(s(X), cs(Y, Z)) =#> a#(Z) a#(ns(X)) =#> a#(X) a#(nf(X, Y)) =#> f#(a(X), a(Y)) a#(nf(X, Y)) =#> a#(X) a#(nf(X, Y)) =#> a#(Y) Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative) and (P_5, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_5, R_1, minimal, formative). We will use the reduction pair processor [Kop12, Thm. 7.16]. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: f#(s(X), cs(Y, Z)) >? a#(Z) a#(ns(X)) >? a#(X) a#(nf(X, Y)) >? f#(a(X), a(Y)) a#(nf(X, Y)) >? a#(X) a#(nf(X, Y)) >? a#(Y) t(X) >= cs(r(q(X)), nt(ns(X))) q(0) >= 0 q(s(X)) >= s(p(q(X), d(X))) d(0) >= 0 d(s(X)) >= s(s(d(X))) p(0, X) >= X p(X, 0) >= X p(s(X), s(Y)) >= s(s(p(X, Y))) f(s(X), cs(Y, Z)) >= cs(Y, nf(X, a(Z))) t(X) >= nt(X) s(X) >= ns(X) f(X, Y) >= nf(X, Y) a(nt(X)) >= t(a(X)) a(ns(X)) >= s(a(X)) a(nf(X, Y)) >= f(a(X), a(Y)) a(X) >= X We orient these requirements with a polynomial interpretation in the natural numbers. We consider usable_rules with respect to the following argument filtering: r(x_1) = r() This leaves the following ordering requirements: f#(s(X), cs(Y, Z)) > a#(Z) a#(ns(X)) >= a#(X) a#(nf(X, Y)) >= f#(a(X), a(Y)) a#(nf(X, Y)) >= a#(X) a#(nf(X, Y)) >= a#(Y) t(X) >= cs(r(q(X)), nt(ns(X))) f(s(X), cs(Y, Z)) >= cs(Y, nf(X, a(Z))) t(X) >= nt(X) s(X) >= ns(X) f(X, Y) >= nf(X, Y) a(nt(X)) >= t(a(X)) a(ns(X)) >= s(a(X)) a(nf(X, Y)) >= f(a(X), a(Y)) a(X) >= X The following interpretation satisfies the requirements: 0 = 0 a = \y0.y0 a# = \y0.y0 cs = \y0y1.y1 d = \y0.0 f = \y0y1.y1 + 2y0 f# = \y0y1.y1 + 2y0 nf = \y0y1.y1 + 2y0 ns = \y0.2 + 2y0 nt = \y0.0 p = \y0y1.0 q = \y0.0 r = \y0.0 s = \y0.2 + 2y0 t = \y0.0 Using this interpretation, the requirements translate to: [[f#(s(_x0), cs(_x1, _x2))]] = 4 + x2 + 4x0 > x2 = [[a#(_x2)]] [[a#(ns(_x0))]] = 2 + 2x0 > x0 = [[a#(_x0)]] [[a#(nf(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[f#(a(_x0), a(_x1))]] [[a#(nf(_x0, _x1))]] = x1 + 2x0 >= x0 = [[a#(_x0)]] [[a#(nf(_x0, _x1))]] = x1 + 2x0 >= x1 = [[a#(_x1)]] [[t(_x0)]] = 0 >= 0 = [[cs(r(q(_x0)), nt(ns(_x0)))]] [[f(s(_x0), cs(_x1, _x2))]] = 4 + x2 + 4x0 >= x2 + 2x0 = [[cs(_x1, nf(_x0, a(_x2)))]] [[t(_x0)]] = 0 >= 0 = [[nt(_x0)]] [[s(_x0)]] = 2 + 2x0 >= 2 + 2x0 = [[ns(_x0)]] [[f(_x0, _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[nf(_x0, _x1)]] [[a(nt(_x0))]] = 0 >= 0 = [[t(a(_x0))]] [[a(ns(_x0))]] = 2 + 2x0 >= 2 + 2x0 = [[s(a(_x0))]] [[a(nf(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[f(a(_x0), a(_x1))]] [[a(_x0)]] = x0 >= x0 = [[_x0]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_5, R_1, minimal, formative) by (P_6, R_1, minimal, formative), where P_6 consists of: a#(nf(X, Y)) =#> f#(a(X), a(Y)) a#(nf(X, Y)) =#> a#(X) a#(nf(X, Y)) =#> a#(Y) Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative) and (P_6, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_6, R_1, minimal, formative). We place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: * 0 : * 1 : 0, 1, 2 * 2 : 0, 1, 2 This graph has the following strongly connected components: P_7: a#(nf(X, Y)) =#> a#(X) a#(nf(X, Y)) =#> a#(Y) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_6, R_1, m, f) by (P_7, R_1, m, f). Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative) and (P_7, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_7, R_1, minimal, formative). We apply the subterm criterion with the following projection function: nu(a#) = 1 Thus, we can orient the dependency pairs as follows: nu(a#(nf(X, Y))) = nf(X, Y) |> X = nu(a#(X)) nu(a#(nf(X, Y))) = nf(X, Y) |> Y = nu(a#(Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_7, R_1, minimal, f) by ({}, R_1, minimal, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative) and (P_3, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_3, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(p#) = 1 Thus, we can orient the dependency pairs as follows: nu(p#(s(X), s(Y))) = s(X) |> X = nu(p#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_3, R_0, minimal, f) by ({}, R_0, minimal, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if each of (P_1, R_0, minimal, formative) and (P_2, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_2, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(d#) = 1 Thus, we can orient the dependency pairs as follows: nu(d#(s(X))) = s(X) |> X = nu(d#(X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_2, R_0, minimal, f) by ({}, R_0, minimal, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if (P_1, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_1, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(q#) = 1 Thus, we can orient the dependency pairs as follows: nu(q#(s(X))) = s(X) |> X = nu(q#(X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_1, R_0, minimal, f) by ({}, R_0, minimal, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. As all dependency pair problems were succesfully simplified with sound (and complete) processors until nothing remained, we conclude termination. +++ Citations +++ [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. [KusIsoSakBla09] K. Kusakari, Y. Isogai, M. Sakai, and F. Blanqui. Static Dependency Pair Method Based On Strong Computability for Higher-Order Rewrite Systems. In volume 92(10) of IEICE Transactions on Information and Systems. 2007--2015, 2009.