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 = {plus, times} and Mul = {0, @_{o -> o}, comp, s, twice}, and the following precedence: 0 > twice > comp > times > plus > @_{o -> o} > s 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 [7], [10] and [12], by (Stat) 7] s(X) > X because [8], by definition 8] s*(X) >= X because [9], by (Select) 9] X >= X by (Meta) 10] plus*(s(X), Y) >= X because [11], by (Select) 11] s(X) >= X because [8], by (Star) 12] plus*(s(X), Y) >= Y because [13], by (Select) 13] Y >= Y by (Meta) 14] times(0, X) > 0 because [15], by definition 15] times*(0, X) >= 0 because [16], by (Select) 16] 0 >= 0 by (Fun) 17] times(s(X), Y) > plus(times(X, Y), Y) because [18], by definition 18] times*(s(X), Y) >= plus(times(X, Y), Y) because times > plus, [19] and [25], by (Copy) 19] times*(s(X), Y) >= times(X, Y) because [20], [23] and [25], by (Stat) 20] s(X) > X because [21], by definition 21] s*(X) >= X because [22], by (Select) 22] X >= X by (Meta) 23] times*(s(X), Y) >= X because [24], by (Select) 24] s(X) >= X because [21], by (Star) 25] times*(s(X), Y) >= Y because [26], by (Select) 26] Y >= Y by (Meta) 27] @_{o -> o}(comp(F, G), X) > @_{o -> o}(F, @_{o -> o}(G, X)) because [28], by definition 28] @_{o -> o}*(comp(F, G), X) >= @_{o -> o}(F, @_{o -> o}(G, X)) because [29], by (Select) 29] comp(F, G) @_{o -> o}*(comp(F, G), X) >= @_{o -> o}(F, @_{o -> o}(G, X)) because [30] 30] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= @_{o -> o}(F, @_{o -> o}(G, X)) because comp > @_{o -> o}, [31] and [33], by (Copy) 31] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= F because [32], by (Select) 32] F >= F by (Meta) 33] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= @_{o -> o}(G, X) because comp > @_{o -> o}, [34] and [36], by (Copy) 34] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= G because [35], by (Select) 35] G >= G by (Meta) 36] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= X because [37], by (Select) 37] @_{o -> o}*(comp(F, G), X) >= X because [38], by (Select) 38] X >= X by (Meta) 39] twice(F) >= comp(F, F) because [40], by (Star) 40] twice*(F) >= comp(F, F) because twice > comp, [41] and [41], by (Copy) 41] twice*(F) >= F because [42], by (Select) 42] F >= F by (Meta) We can thus remove the following rules: plus(0, X) => X times(0, X) => 0 times(s(X), Y) => plus(times(X, Y), Y) 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)) twice(F) >? comp(F, F) We use a recursive path ordering as defined in [Kop12, Chapter 5]. We choose Lex = {} and Mul = {comp, plus, s, twice}, and the following precedence: twice > comp = plus > s With these choices, we have: 1] plus(s(X), Y) >= s(plus(X, Y)) because [2], by (Star) 2] plus*(s(X), Y) >= s(plus(X, Y)) because plus > s and [3], by (Copy) 3] plus*(s(X), Y) >= plus(X, Y) because plus in Mul, [4] and [7], by (Stat) 4] s(X) > X because [5], by definition 5] s*(X) >= X because [6], by (Select) 6] X >= X by (Meta) 7] Y >= Y by (Meta) 8] twice(F) > comp(F, F) because [9], by definition 9] twice*(F) >= comp(F, F) because twice > comp, [10] and [10], by (Copy) 10] twice*(F) >= F because [11], by (Select) 11] 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)) We use a recursive path ordering as defined in [Kop12, Chapter 5]. We choose Lex = {} and Mul = {plus, s}, and the following precedence: plus > s With these choices, we have: 1] plus(s(X), Y) > s(plus(X, Y)) because [2], by definition 2] plus*(s(X), Y) >= s(plus(X, Y)) because plus > s and [3], by (Copy) 3] plus*(s(X), Y) >= plus(X, Y) because plus in Mul, [4] and [7], by (Stat) 4] s(X) > X because [5], by definition 5] s*(X) >= X because [6], by (Select) 6] X >= X by (Meta) 7] Y >= Y by (Meta) 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.