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 rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 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) We use a recursive path ordering as defined in [Kop12, Chapter 5]. We choose Lex = {} and Mul = {0, @_{o -> o}, comp, plus, s, times, twice}, and the following precedence: 0 > times > plus > s > twice > comp > @_{o -> o} With these choices, we have: 1] plus(0, X) > X because [2], by definition 2] plus*(0, X) >= X because [3], by (Select) 3] X >= X by (Meta) 4] plus(s(X), Y) >= s(plus(X, Y)) because [5], by (Star) 5] plus*(s(X), Y) >= s(plus(X, Y)) because plus > s and [6], by (Copy) 6] plus*(s(X), Y) >= plus(X, Y) because plus 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] times(0, X) >= 0 because [12], by (Star) 12] times*(0, X) >= 0 because [13], by (Select) 13] 0 >= 0 by (Fun) 14] times(s(X), Y) > plus(times(X, Y), Y) because [15], by definition 15] times*(s(X), Y) >= plus(times(X, Y), Y) because times > plus, [16] and [21], by (Copy) 16] times*(s(X), Y) >= times(X, Y) because times in Mul, [17] and [20], by (Stat) 17] s(X) > X because [18], by definition 18] s*(X) >= X because [19], by (Select) 19] X >= X by (Meta) 20] Y >= Y by (Meta) 21] times*(s(X), Y) >= Y because [20], by (Select) 22] @_{o -> o}(comp(F, G), X) >= @_{o -> o}(F, @_{o -> o}(G, X)) because [23], by (Star) 23] @_{o -> o}*(comp(F, G), X) >= @_{o -> o}(F, @_{o -> o}(G, X)) because [24], by (Select) 24] comp(F, G) @_{o -> o}*(comp(F, G), X) >= @_{o -> o}(F, @_{o -> o}(G, X)) because [25] 25] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= @_{o -> o}(F, @_{o -> o}(G, X)) because comp > @_{o -> o}, [26] and [28], by (Copy) 26] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= F because [27], by (Select) 27] F >= F by (Meta) 28] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= @_{o -> o}(G, X) because comp > @_{o -> o}, [29] and [31], by (Copy) 29] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= G because [30], by (Select) 30] G >= G by (Meta) 31] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= X because [32], by (Select) 32] @_{o -> o}*(comp(F, G), X) >= X because [33], by (Select) 33] X >= X by (Meta) 34] twice(F) >= comp(F, F) because [35], by (Star) 35] twice*(F) >= comp(F, F) because twice > comp, [36] and [36], by (Copy) 36] twice*(F) >= F because [37], by (Select) 37] F >= F by (Meta) We can thus remove the following rules: plus(0, X) => X times(s(X), Y) => plus(times(X, Y), Y) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): plus(s(X), Y) >? s(plus(X, Y)) times(0, X) >? 0 comp(F, G) X >? F (G X) twice(F) >? comp(F, F) We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[0]] = _|_ [[s(x_1)]] = x_1 We choose Lex = {} and Mul = {@_{o -> o}, comp, plus, times, twice}, and the following precedence: plus > times > twice > comp > @_{o -> o} Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: plus(X, Y) >= plus(X, Y) times(_|_, X) > _|_ @_{o -> o}(comp(F, G), X) >= @_{o -> o}(F, @_{o -> o}(G, X)) twice(F) >= comp(F, F) With these choices, we have: 1] plus(X, Y) >= plus(X, Y) because plus in Mul, [2] and [3], by (Fun) 2] X >= X by (Meta) 3] Y >= Y by (Meta) 4] times(_|_, X) > _|_ because [5], by definition 5] times*(_|_, X) >= _|_ by (Bot) 6] @_{o -> o}(comp(F, G), X) >= @_{o -> o}(F, @_{o -> o}(G, X)) because [7], by (Star) 7] @_{o -> o}*(comp(F, G), X) >= @_{o -> o}(F, @_{o -> o}(G, X)) because [8], by (Select) 8] comp(F, G) @_{o -> o}*(comp(F, G), X) >= @_{o -> o}(F, @_{o -> o}(G, X)) because [9] 9] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= @_{o -> o}(F, @_{o -> o}(G, X)) because comp > @_{o -> o}, [10] and [12], by (Copy) 10] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= F because [11], by (Select) 11] F >= F by (Meta) 12] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= @_{o -> o}(G, X) because comp > @_{o -> o}, [13] and [15], by (Copy) 13] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= G because [14], by (Select) 14] G >= G by (Meta) 15] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= X because [16], by (Select) 16] @_{o -> o}*(comp(F, G), X) >= X because [17], by (Select) 17] comp(F, G) @_{o -> o}*(comp(F, G), X) >= X because [18] 18] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= X because [19], by (Select) 19] @_{o -> o}*(comp(F, G), X) >= X because [20], by (Select) 20] X >= X by (Meta) 21] twice(F) >= comp(F, F) because [22], by (Star) 22] twice*(F) >= comp(F, F) because twice > comp, [23] and [23], by (Copy) 23] twice*(F) >= F because [24], by (Select) 24] F >= F by (Meta) We can thus remove the following rules: times(0, X) => 0 We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): plus(s(X), Y) >? s(plus(X, Y)) comp(F, G) X >? F (G X) twice(F) >? comp(F, F) We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[s(x_1)]] = x_1 We choose Lex = {} and Mul = {@_{o -> o}, comp, plus, twice}, and the following precedence: plus > twice > comp > @_{o -> o} Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: plus(X, Y) >= plus(X, Y) @_{o -> o}(comp(F, G), X) >= @_{o -> o}(F, @_{o -> o}(G, X)) twice(F) > comp(F, F) With these choices, we have: 1] plus(X, Y) >= plus(X, Y) because plus in Mul, [2] and [3], by (Fun) 2] X >= X by (Meta) 3] Y >= Y by (Meta) 4] @_{o -> o}(comp(F, G), X) >= @_{o -> o}(F, @_{o -> o}(G, X)) because [5], by (Star) 5] @_{o -> o}*(comp(F, G), X) >= @_{o -> o}(F, @_{o -> o}(G, X)) because [6], by (Select) 6] comp(F, G) @_{o -> o}*(comp(F, G), X) >= @_{o -> o}(F, @_{o -> o}(G, X)) because [7] 7] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= @_{o -> o}(F, @_{o -> o}(G, X)) because comp > @_{o -> o}, [8] and [10], by (Copy) 8] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= F because [9], by (Select) 9] F >= F by (Meta) 10] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= @_{o -> o}(G, X) because comp > @_{o -> o}, [11] and [13], by (Copy) 11] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= G because [12], by (Select) 12] G >= G by (Meta) 13] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= X because [14], by (Select) 14] @_{o -> o}*(comp(F, G), X) >= X because [15], by (Select) 15] X >= X by (Meta) 16] twice(F) > comp(F, F) because [17], by definition 17] twice*(F) >= comp(F, F) because twice > comp, [18] and [18], by (Copy) 18] twice*(F) >= F because [19], by (Select) 19] F >= F by (Meta) We can thus remove the following rules: twice(F) => comp(F, F) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): plus(s(X), Y) >? s(plus(X, Y)) comp(F, G, X) >? F (G X) We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[@_{o -> o}(x_1, x_2)]] = @_{o -> o}(x_2, x_1) [[comp(x_1, x_2, x_3)]] = comp(x_1, x_3, x_2) [[s(x_1)]] = x_1 We choose Lex = {@_{o -> o}, comp} and Mul = {plus}, and the following precedence: comp > @_{o -> o} > plus Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: plus(X, Y) >= plus(X, Y) comp(F, G, X) > @_{o -> o}(F, @_{o -> o}(G, X)) With these choices, we have: 1] plus(X, Y) >= plus(X, Y) because plus in Mul, [2] and [3], by (Fun) 2] X >= X by (Meta) 3] Y >= Y by (Meta) 4] comp(F, G, X) > @_{o -> o}(F, @_{o -> o}(G, X)) because [5], by definition 5] comp*(F, G, X) >= @_{o -> o}(F, @_{o -> o}(G, X)) because comp > @_{o -> o}, [6] and [8], by (Copy) 6] comp*(F, G, X) >= F because [7], by (Select) 7] F >= F by (Meta) 8] comp*(F, G, X) >= @_{o -> o}(G, X) because comp > @_{o -> o}, [9] and [11], by (Copy) 9] comp*(F, G, X) >= G because [10], by (Select) 10] G >= G by (Meta) 11] comp*(F, G, X) >= X because [12], by (Select) 12] X >= X by (Meta) We can thus remove the following rules: comp(F, G, X) => F (G X) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): plus(s(X), Y) >? s(plus(X, Y)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: plus = Lam[y0;y1].2*y1 + 3*y0 s = Lam[y0].2 + y0 Using this interpretation, the requirements translate to: [[plus(s(_x0), _x1)]] = 6 + 2*x1 + 3*x0 > 2 + 2*x1 + 3*x0 = [[s(plus(_x0, _x1))]] We can thus remove the following rules: plus(s(X), Y) => s(plus(X, Y)) All rules were succesfully removed. Thus, termination of the original system has been reduced to termination of the beta-rule, which is well-known to hold. +++ Citations +++ [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012.