We consider the system AotoYamada_05__020. Alphabet: 0 : [] --> a comp : [b -> b * b -> b] --> b -> b plus : [a * a] --> a s : [a] --> a times : [a * a] --> a twice : [b -> b] --> b -> b Rules: plus(0, x) => x plus(s(x), y) => s(plus(x, y)) times(0, x) => 0 times(s(x), y) => plus(times(x, y), y) comp(f, g) x => f (g x) twice(f) => comp(f, f) This AFS is converted to an AFSM simply by replacing all free variables by meta-variables (with arity 0). We use the dependency pair framework as described in [Kop12, Ch. 6/7], with static dependency pairs (see [KusIsoSakBla09] and the adaptation for AFSMs and accessible arguments in [Kop13]). In order to do so, we start by eta-expanding the system, which gives: plus(0, X) => X plus(s(X), Y) => s(plus(X, Y)) times(0, X) => 0 times(s(X), Y) => plus(times(X, Y), Y) comp(F, G, X) => F (G X) twice(F, X) => comp(F, F, X) We thus obtain the following dependency pair problem (P_0, R_0, static, formative): Dependency Pairs P_0: 0] plus#(s(X), Y) =#> plus#(X, Y) 1] times#(s(X), Y) =#> plus#(times(X, Y), Y) 2] times#(s(X), Y) =#> times#(X, Y) 3] twice#(F, X) =#> comp#(F, F, X) Rules R_0: plus(0, X) => X plus(s(X), Y) => s(plus(X, Y)) times(0, X) => 0 times(s(X), Y) => plus(times(X, Y), Y) comp(F, G, X) => F (G X) twice(F, X) => comp(F, F, X) Thus, the original system is terminating if (P_0, R_0, static, formative) is finite. We consider the dependency pair problem (P_0, R_0, static, formative). The formative rules of (P_0, R_0) are R_1 ::= plus(0, X) => X plus(s(X), Y) => s(plus(X, Y)) times(0, X) => 0 times(s(X), Y) => plus(times(X, Y), Y) By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_0, R_0, static, formative) by (P_0, R_1, static, formative). Thus, the original system is terminating if (P_0, R_1, static, formative) is finite. We consider the dependency pair problem (P_0, R_1, static, 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: plus#(s(X), Y) >? plus#(X, Y) times#(s(X), Y) >? plus#(times(X, Y), Y) times#(s(X), Y) >? times#(X, Y) twice#(F, X) >? comp#(F, F, X) plus(0, X) >= X plus(s(X), Y) >= s(plus(X, Y)) times(0, X) >= 0 times(s(X), Y) >= plus(times(X, Y), Y) We apply [Kop12, Thm. 6.75] and use the following argument functions: pi( twice#(F, X) ) = #argfun-twice##(comp#(F, F, X)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: #argfun-twice## = \y0.3 + y0 0 = 0 comp# = \G0G1y2.0 plus = \y0y1.2y1 plus# = \y0y1.0 s = \y0.0 times = \y0y1.2y1 times# = \y0y1.3 + 2y1 twice# = \G0y1.0 Using this interpretation, the requirements translate to: [[plus#(s(_x0), _x1)]] = 0 >= 0 = [[plus#(_x0, _x1)]] [[times#(s(_x0), _x1)]] = 3 + 2x1 > 0 = [[plus#(times(_x0, _x1), _x1)]] [[times#(s(_x0), _x1)]] = 3 + 2x1 >= 3 + 2x1 = [[times#(_x0, _x1)]] [[#argfun-twice##(comp#(_F0, _F0, _x1))]] = 3 > 0 = [[comp#(_F0, _F0, _x1)]] [[plus(0, _x0)]] = 2x0 >= x0 = [[_x0]] [[plus(s(_x0), _x1)]] = 2x1 >= 0 = [[s(plus(_x0, _x1))]] [[times(0, _x0)]] = 2x0 >= 0 = [[0]] [[times(s(_x0), _x1)]] = 2x1 >= 2x1 = [[plus(times(_x0, _x1), _x1)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_0, R_1, static, formative) by (P_1, R_1, static, formative), where P_1 consists of: plus#(s(X), Y) =#> plus#(X, Y) times#(s(X), Y) =#> times#(X, Y) Thus, the original system is terminating if (P_1, R_1, static, formative) is finite. We consider the dependency pair problem (P_1, R_1, static, 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: plus#(s(X), Y) >? plus#(X, Y) times#(s(X), Y) >? times#(X, Y) plus(0, X) >= X plus(s(X), Y) >= s(plus(X, Y)) times(0, X) >= 0 times(s(X), Y) >= plus(times(X, Y), Y) Since this representation is not advantageous for the higher-order recursive path ordering, we present the strict requirements in their unextended form, which is not problematic since for any F, s and substituion gamma: (F s)gamma beta-reduces to F(s)gamma.) We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[0]] = _|_ [[plus#(x_1, x_2)]] = plus#(x_1) We choose Lex = {} and Mul = {plus, plus#, s, times, times#}, and the following precedence: times > plus > plus# > s > times# Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: plus#(s(X)) >= plus#(X) times#(s(X), Y) > times#(X, Y) plus(_|_, X) >= X plus(s(X), Y) >= s(plus(X, Y)) times(_|_, X) >= _|_ times(s(X), Y) >= plus(times(X, Y), Y) With these choices, we have: 1] plus#(s(X)) >= plus#(X) because plus# in Mul and [2], by (Fun) 2] s(X) >= X because [3], by (Star) 3] s*(X) >= X because [4], by (Select) 4] X >= X by (Meta) 5] times#(s(X), Y) > times#(X, Y) because [6], by definition 6] times#*(s(X), Y) >= times#(X, Y) because times# in Mul, [7] and [10], by (Stat) 7] s(X) > X because [8], by definition 8] s*(X) >= X because [9], by (Select) 9] X >= X by (Meta) 10] Y >= Y by (Meta) 11] plus(_|_, X) >= X because [12], by (Star) 12] plus*(_|_, X) >= X because [13], by (Select) 13] X >= X by (Meta) 14] plus(s(X), Y) >= s(plus(X, Y)) because [15], by (Star) 15] plus*(s(X), Y) >= s(plus(X, Y)) because plus > s and [16], by (Copy) 16] plus*(s(X), Y) >= plus(X, Y) because plus in Mul, [17] and [19], by (Stat) 17] s(X) > X because [18], by definition 18] s*(X) >= X because [4], by (Select) 19] Y >= Y by (Meta) 20] times(_|_, X) >= _|_ by (Bot) 21] times(s(X), Y) >= plus(times(X, Y), Y) because [22], by (Star) 22] times*(s(X), Y) >= plus(times(X, Y), Y) because times > plus, [23] and [24], by (Copy) 23] times*(s(X), Y) >= times(X, Y) because times in Mul, [7] and [10], by (Stat) 24] times*(s(X), Y) >= Y because [10], by (Select) By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_1, R_1, static, formative) by (P_2, R_1, static, formative), where P_2 consists of: plus#(s(X), Y) =#> plus#(X, Y) Thus, the original system is terminating if (P_2, R_1, static, formative) is finite. We consider the dependency pair problem (P_2, R_1, static, 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: plus#(s(X), Y) >? plus#(X, Y) plus(0, X) >= X plus(s(X), Y) >= s(plus(X, Y)) times(0, X) >= 0 times(s(X), Y) >= plus(times(X, Y), Y) Since this representation is not advantageous for the higher-order recursive path ordering, we present the strict requirements in their unextended form, which is not problematic since for any F, s and substituion gamma: (F s)gamma beta-reduces to F(s)gamma.) We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[0]] = _|_ We choose Lex = {plus#} and Mul = {plus, s, times}, and the following precedence: plus# > times > plus > s Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: plus#(s(X), Y) > plus#(X, Y) plus(_|_, X) >= X plus(s(X), Y) >= s(plus(X, Y)) times(_|_, X) >= _|_ times(s(X), Y) >= plus(times(X, Y), Y) With these choices, we have: 1] plus#(s(X), Y) > plus#(X, Y) because [2], by definition 2] plus#*(s(X), Y) >= plus#(X, Y) because [3], [6] and [8], by (Stat) 3] s(X) > X because [4], by definition 4] s*(X) >= X because [5], by (Select) 5] X >= X by (Meta) 6] plus#*(s(X), Y) >= X because [7], by (Select) 7] s(X) >= X because [4], by (Star) 8] plus#*(s(X), Y) >= Y because [9], by (Select) 9] Y >= Y by (Meta) 10] plus(_|_, X) >= X because [11], by (Star) 11] plus*(_|_, X) >= X because [12], by (Select) 12] X >= X by (Meta) 13] plus(s(X), Y) >= s(plus(X, Y)) because [14], by (Star) 14] plus*(s(X), Y) >= s(plus(X, Y)) because plus > s and [15], by (Copy) 15] plus*(s(X), Y) >= plus(X, Y) because plus in Mul, [3] and [16], by (Stat) 16] Y >= Y by (Meta) 17] times(_|_, X) >= _|_ by (Bot) 18] times(s(X), Y) >= plus(times(X, Y), Y) because [19], by (Star) 19] times*(s(X), Y) >= plus(times(X, Y), Y) because times > plus, [20] and [25], by (Copy) 20] times*(s(X), Y) >= times(X, Y) because times in Mul, [21] and [24], by (Stat) 21] s(X) > X because [22], by definition 22] s*(X) >= X because [23], by (Select) 23] X >= X by (Meta) 24] Y >= Y by (Meta) 25] times*(s(X), Y) >= Y because [24], by (Select) By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_2, R_1) by ({}, R_1). 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. [Kop13] C. Kop. Static Dependency Pairs with Accessibility. Unpublished manuscript, http://cl-informatik.uibk.ac.at/users/kop/static.pdf, 2013. [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.