We consider the system 06plusmult. Alphabet: mult : [N * N] --> N plus : [N * N] --> N s : [N] --> N z : [] --> N Rules: plus(z, x) => x plus(s(x), y) => plus(x, s(y)) plus(plus(x, y), u) => plus(x, plus(y, u)) mult(z, x) => z mult(s(x), y) => plus(mult(x, y), y) mult(plus(x, y), u) => plus(mult(x, u), mult(y, u)) 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(z, X) >? X plus(s(X), Y) >? plus(X, s(Y)) plus(plus(X, Y), Z) >? plus(X, plus(Y, Z)) mult(z, X) >? z mult(s(X), Y) >? plus(mult(X, Y), Y) mult(plus(X, Y), Z) >? plus(mult(X, Z), mult(Y, Z)) We use a recursive path ordering as defined in [Kop12, Chapter 5]. We choose Lex = {plus} and Mul = {mult, s, z}, and the following precedence: mult > plus > s > z With these choices, we have: 1] plus(z, X) > X because [2], by definition 2] plus*(z, X) >= X because [3], by (Select) 3] X >= X by (Meta) 4] plus(s(X), Y) >= plus(X, s(Y)) because [5], by (Star) 5] plus*(s(X), Y) >= plus(X, s(Y)) because [6], [9] and [11], by (Stat) 6] s(X) > X because [7], by definition 7] s*(X) >= X because [8], by (Select) 8] X >= X by (Meta) 9] plus*(s(X), Y) >= X because [10], by (Select) 10] s(X) >= X because [7], by (Star) 11] plus*(s(X), Y) >= s(Y) because plus > s and [12], by (Copy) 12] plus*(s(X), Y) >= Y because [13], by (Select) 13] Y >= Y by (Meta) 14] plus(plus(X, Y), Z) >= plus(X, plus(Y, Z)) because [15], by (Star) 15] plus*(plus(X, Y), Z) >= plus(X, plus(Y, Z)) because [16], [19] and [21], by (Stat) 16] plus(X, Y) > X because [17], by definition 17] plus*(X, Y) >= X because [18], by (Select) 18] X >= X by (Meta) 19] plus*(plus(X, Y), Z) >= X because [20], by (Select) 20] plus(X, Y) >= X because [17], by (Star) 21] plus*(plus(X, Y), Z) >= plus(Y, Z) because [22], [25], [27], [22] and [29], by (Stat) 22] plus(X, Y) > Y because [23], by definition 23] plus*(X, Y) >= Y because [24], by (Select) 24] Y >= Y by (Meta) 25] plus*(plus(X, Y), Z) >= Y because [26], by (Select) 26] plus(X, Y) >= Y because [23], by (Star) 27] plus*(plus(X, Y), Z) >= Z because [28], by (Select) 28] Z >= Z by (Meta) 29] Z >= Z by (Meta) 30] mult(z, X) > z because [31], by definition 31] mult*(z, X) >= z because mult > z, by (Copy) 32] mult(s(X), Y) > plus(mult(X, Y), Y) because [33], by definition 33] mult*(s(X), Y) >= plus(mult(X, Y), Y) because mult > plus, [34] and [39], by (Copy) 34] mult*(s(X), Y) >= mult(X, Y) because mult in Mul, [35] and [38], by (Stat) 35] s(X) > X because [36], by definition 36] s*(X) >= X because [37], by (Select) 37] X >= X by (Meta) 38] Y >= Y by (Meta) 39] mult*(s(X), Y) >= Y because [38], by (Select) 40] mult(plus(X, Y), Z) > plus(mult(X, Z), mult(Y, Z)) because [41], by definition 41] mult*(plus(X, Y), Z) >= plus(mult(X, Z), mult(Y, Z)) because mult > plus, [42] and [47], by (Copy) 42] mult*(plus(X, Y), Z) >= mult(X, Z) because mult in Mul, [43] and [46], by (Stat) 43] plus(X, Y) > X because [44], by definition 44] plus*(X, Y) >= X because [45], by (Select) 45] X >= X by (Meta) 46] Z >= Z by (Meta) 47] mult*(plus(X, Y), Z) >= mult(Y, Z) because mult in Mul, [48] and [46], by (Stat) 48] plus(X, Y) > Y because [49], by definition 49] plus*(X, Y) >= Y because [50], by (Select) 50] Y >= Y by (Meta) We can thus remove the following rules: plus(z, X) => X mult(z, X) => z mult(s(X), Y) => plus(mult(X, Y), Y) mult(plus(X, Y), Z) => plus(mult(X, Z), mult(Y, Z)) 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) >? plus(X, s(Y)) plus(plus(X, Y), Z) >? plus(X, plus(Y, Z)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: plus = Lam[y0;y1].2 + y1 + 2*y0 s = Lam[y0].y0 Using this interpretation, the requirements translate to: [[plus(s(_x0), _x1)]] = 2 + x1 + 2*x0 >= 2 + x1 + 2*x0 = [[plus(_x0, s(_x1))]] [[plus(plus(_x0, _x1), _x2)]] = 6 + x2 + 2*x1 + 4*x0 > 4 + x2 + 2*x0 + 2*x1 = [[plus(_x0, plus(_x1, _x2))]] We can thus remove the following rules: plus(plus(X, Y), Z) => plus(X, plus(Y, Z)) 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) >? plus(X, s(Y)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: plus = Lam[y0;y1].y1 + 2*y0 s = Lam[y0].2 + y0 Using this interpretation, the requirements translate to: [[plus(s(_x0), _x1)]] = 4 + x1 + 2*x0 > 2 + x1 + 2*x0 = [[plus(_x0, s(_x1))]] We can thus remove the following rules: plus(s(X), Y) => plus(X, s(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.