/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 B : [] --> o C : [] --> o f : [o * o] --> o f!450 : [o * o] --> o f!450!450 : [o] --> o fold : [o * o * o] --> o foldB : [o * o] --> o foldC : [o * o] --> o g : [o] --> o s : [o] --> o triple : [o * o * o] --> o g(A) => A g(B) => A g(B) => B g(C) => A g(C) => B g(C) => C foldB(X, 0) => X foldB(X, s(Y)) => f(foldB(X, Y), B) foldC(X, 0) => X foldC(X, s(Y)) => f(foldC(X, Y), C) f(X, Y) => f!450(X, g(Y)) f!450(triple(X, Y, Z), C) => triple(X, Y, s(Z)) f!450(triple(X, Y, Z), B) => f(triple(X, Y, Z), A) f!450(triple(X, Y, Z), A) => f!450!450(foldB(triple(s(X), 0, Z), Y)) f!450!450(triple(X, Y, Z)) => foldC(triple(X, Y, 0), Z) fold(X, Y, 0) => X fold(X, Y, s(Z)) => f(fold(X, Y, Z), Y) 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] foldB#(X, s(Y)) =#> f#(foldB(X, Y), B) 1] foldB#(X, s(Y)) =#> foldB#(X, Y) 2] foldC#(X, s(Y)) =#> f#(foldC(X, Y), C) 3] foldC#(X, s(Y)) =#> foldC#(X, Y) 4] f#(X, Y) =#> f!450#(X, g(Y)) 5] f#(X, Y) =#> g#(Y) 6] f!450#(triple(X, Y, Z), B) =#> f#(triple(X, Y, Z), A) 7] f!450#(triple(X, Y, Z), A) =#> f!450!450#(foldB(triple(s(X), 0, Z), Y)) 8] f!450#(triple(X, Y, Z), A) =#> foldB#(triple(s(X), 0, Z), Y) 9] f!450!450#(triple(X, Y, Z)) =#> foldC#(triple(X, Y, 0), Z) 10] fold#(X, Y, s(Z)) =#> f#(fold(X, Y, Z), Y) 11] fold#(X, Y, s(Z)) =#> fold#(X, Y, Z) Rules R_0: g(A) => A g(B) => A g(B) => B g(C) => A g(C) => B g(C) => C foldB(X, 0) => X foldB(X, s(Y)) => f(foldB(X, Y), B) foldC(X, 0) => X foldC(X, s(Y)) => f(foldC(X, Y), C) f(X, Y) => f!450(X, g(Y)) f!450(triple(X, Y, Z), C) => triple(X, Y, s(Z)) f!450(triple(X, Y, Z), B) => f(triple(X, Y, Z), A) f!450(triple(X, Y, Z), A) => f!450!450(foldB(triple(s(X), 0, Z), Y)) f!450!450(triple(X, Y, Z)) => foldC(triple(X, Y, 0), Z) fold(X, Y, 0) => X fold(X, Y, s(Z)) => f(fold(X, Y, Z), Y) 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 : 4, 5 * 1 : 0, 1 * 2 : 4, 5 * 3 : 2, 3 * 4 : 6, 7, 8 * 5 : * 6 : 4, 5 * 7 : 9 * 8 : 0, 1 * 9 : 2, 3 * 10 : 4, 5 * 11 : 10, 11 This graph has the following strongly connected components: P_1: foldB#(X, s(Y)) =#> f#(foldB(X, Y), B) foldB#(X, s(Y)) =#> foldB#(X, Y) foldC#(X, s(Y)) =#> f#(foldC(X, Y), C) foldC#(X, s(Y)) =#> foldC#(X, Y) f#(X, Y) =#> f!450#(X, g(Y)) f!450#(triple(X, Y, Z), B) =#> f#(triple(X, Y, Z), A) f!450#(triple(X, Y, Z), A) =#> f!450!450#(foldB(triple(s(X), 0, Z), Y)) f!450#(triple(X, Y, Z), A) =#> foldB#(triple(s(X), 0, Z), Y) f!450!450#(triple(X, Y, Z)) =#> foldC#(triple(X, Y, 0), Z) P_2: fold#(X, Y, s(Z)) =#> fold#(X, Y, Z) 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) and (P_2, R_0, m, f). 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(fold#) = 3 Thus, we can orient the dependency pairs as follows: nu(fold#(X, Y, s(Z))) = s(Z) |> Z = nu(fold#(X, Y, Z)) 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 will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. The usable rules of (P_1, R_0) are: g(A) => A g(B) => A g(B) => B g(C) => A g(C) => B g(C) => C foldB(X, 0) => X foldB(X, s(Y)) => f(foldB(X, Y), B) foldC(X, 0) => X foldC(X, s(Y)) => f(foldC(X, Y), C) f(X, Y) => f!450(X, g(Y)) f!450(triple(X, Y, Z), C) => triple(X, Y, s(Z)) f!450(triple(X, Y, Z), B) => f(triple(X, Y, Z), A) f!450(triple(X, Y, Z), A) => f!450!450(foldB(triple(s(X), 0, Z), Y)) f!450!450(triple(X, Y, Z)) => foldC(triple(X, Y, 0), Z) It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: foldB#(X, s(Y)) >? f#(foldB(X, Y), B) foldB#(X, s(Y)) >? foldB#(X, Y) foldC#(X, s(Y)) >? f#(foldC(X, Y), C) foldC#(X, s(Y)) >? foldC#(X, Y) f#(X, Y) >? f!450#(X, g(Y)) f!450#(triple(X, Y, Z), B) >? f#(triple(X, Y, Z), A) f!450#(triple(X, Y, Z), A) >? f!450!450#(foldB(triple(s(X), 0, Z), Y)) f!450#(triple(X, Y, Z), A) >? foldB#(triple(s(X), 0, Z), Y) f!450!450#(triple(X, Y, Z)) >? foldC#(triple(X, Y, 0), Z) g(A) >= A g(B) >= A g(B) >= B g(C) >= A g(C) >= B g(C) >= C foldB(X, 0) >= X foldB(X, s(Y)) >= f(foldB(X, Y), B) foldC(X, 0) >= X foldC(X, s(Y)) >= f(foldC(X, Y), C) f(X, Y) >= f!450(X, g(Y)) f!450(triple(X, Y, Z), C) >= triple(X, Y, s(Z)) f!450(triple(X, Y, Z), B) >= f(triple(X, Y, Z), A) f!450(triple(X, Y, Z), A) >= f!450!450(foldB(triple(s(X), 0, Z), Y)) f!450!450(triple(X, Y, Z)) >= foldC(triple(X, Y, 0), Z) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 A = 0 B = 0 C = 0 f = \y0y1.1 + y0 f!450 = \y0y1.1 + y0 f!450!450 = \y0.y0 f!450!450# = \y0.y0 f!450# = \y0y1.y0 f# = \y0y1.y0 foldB = \y0y1.y0 + 2y1 foldB# = \y0y1.y0 + 2y1 foldC = \y0y1.y0 + y1 foldC# = \y0y1.y0 + y1 g = \y0.0 s = \y0.1 + y0 triple = \y0y1y2.y2 + 2y1 Using this interpretation, the requirements translate to: [[foldB#(_x0, s(_x1))]] = 2 + x0 + 2x1 > x0 + 2x1 = [[f#(foldB(_x0, _x1), B)]] [[foldB#(_x0, s(_x1))]] = 2 + x0 + 2x1 > x0 + 2x1 = [[foldB#(_x0, _x1)]] [[foldC#(_x0, s(_x1))]] = 1 + x0 + x1 > x0 + x1 = [[f#(foldC(_x0, _x1), C)]] [[foldC#(_x0, s(_x1))]] = 1 + x0 + x1 > x0 + x1 = [[foldC#(_x0, _x1)]] [[f#(_x0, _x1)]] = x0 >= x0 = [[f!450#(_x0, g(_x1))]] [[f!450#(triple(_x0, _x1, _x2), B)]] = x2 + 2x1 >= x2 + 2x1 = [[f#(triple(_x0, _x1, _x2), A)]] [[f!450#(triple(_x0, _x1, _x2), A)]] = x2 + 2x1 >= x2 + 2x1 = [[f!450!450#(foldB(triple(s(_x0), 0, _x2), _x1))]] [[f!450#(triple(_x0, _x1, _x2), A)]] = x2 + 2x1 >= x2 + 2x1 = [[foldB#(triple(s(_x0), 0, _x2), _x1)]] [[f!450!450#(triple(_x0, _x1, _x2))]] = x2 + 2x1 >= x2 + 2x1 = [[foldC#(triple(_x0, _x1, 0), _x2)]] [[g(A)]] = 0 >= 0 = [[A]] [[g(B)]] = 0 >= 0 = [[A]] [[g(B)]] = 0 >= 0 = [[B]] [[g(C)]] = 0 >= 0 = [[A]] [[g(C)]] = 0 >= 0 = [[B]] [[g(C)]] = 0 >= 0 = [[C]] [[foldB(_x0, 0)]] = x0 >= x0 = [[_x0]] [[foldB(_x0, s(_x1))]] = 2 + x0 + 2x1 >= 1 + x0 + 2x1 = [[f(foldB(_x0, _x1), B)]] [[foldC(_x0, 0)]] = x0 >= x0 = [[_x0]] [[foldC(_x0, s(_x1))]] = 1 + x0 + x1 >= 1 + x0 + x1 = [[f(foldC(_x0, _x1), C)]] [[f(_x0, _x1)]] = 1 + x0 >= 1 + x0 = [[f!450(_x0, g(_x1))]] [[f!450(triple(_x0, _x1, _x2), C)]] = 1 + x2 + 2x1 >= 1 + x2 + 2x1 = [[triple(_x0, _x1, s(_x2))]] [[f!450(triple(_x0, _x1, _x2), B)]] = 1 + x2 + 2x1 >= 1 + x2 + 2x1 = [[f(triple(_x0, _x1, _x2), A)]] [[f!450(triple(_x0, _x1, _x2), A)]] = 1 + x2 + 2x1 >= x2 + 2x1 = [[f!450!450(foldB(triple(s(_x0), 0, _x2), _x1))]] [[f!450!450(triple(_x0, _x1, _x2))]] = x2 + 2x1 >= x2 + 2x1 = [[foldC(triple(_x0, _x1, 0), _x2)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_1, R_0, minimal, formative) by (P_3, R_0, minimal, formative), where P_3 consists of: f#(X, Y) =#> f!450#(X, g(Y)) f!450#(triple(X, Y, Z), B) =#> f#(triple(X, Y, Z), A) f!450#(triple(X, Y, Z), A) =#> f!450!450#(foldB(triple(s(X), 0, Z), Y)) f!450#(triple(X, Y, Z), A) =#> foldB#(triple(s(X), 0, Z), Y) f!450!450#(triple(X, Y, Z)) =#> foldC#(triple(X, Y, 0), Z) Thus, the original system is terminating if (P_3, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_3, 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 * 1 : 0 * 2 : 4 * 3 : * 4 : This graph has the following strongly connected components: P_4: f#(X, Y) =#> f!450#(X, g(Y)) f!450#(triple(X, Y, Z), B) =#> f#(triple(X, Y, Z), A) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_3, R_0, m, f) by (P_4, R_0, m, f). Thus, the original system is terminating if (P_4, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_4, R_0, minimal, formative). We will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. The usable rules of (P_4, R_0) are: g(A) => A g(B) => A g(B) => B g(C) => A g(C) => B g(C) => C It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: f#(X, Y) >? f!450#(X, g(Y)) f!450#(triple(X, Y, Z), B) >? f#(triple(X, Y, Z), A) g(A) >= A g(B) >= A g(B) >= B g(C) >= A g(C) >= B g(C) >= C We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: A = 0 B = 3 C = 3 f!450# = \y0y1.1 + y1 f# = \y0y1.2 + y1 g = \y0.y0 triple = \y0y1y2.0 Using this interpretation, the requirements translate to: [[f#(_x0, _x1)]] = 2 + x1 > 1 + x1 = [[f!450#(_x0, g(_x1))]] [[f!450#(triple(_x0, _x1, _x2), B)]] = 4 > 2 = [[f#(triple(_x0, _x1, _x2), A)]] [[g(A)]] = 0 >= 0 = [[A]] [[g(B)]] = 3 >= 0 = [[A]] [[g(B)]] = 3 >= 3 = [[B]] [[g(C)]] = 3 >= 0 = [[A]] [[g(C)]] = 3 >= 3 = [[B]] [[g(C)]] = 3 >= 3 = [[C]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_4, R_0) by ({}, R_0). 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.