We consider the system AotoYamada_05__021. Alphabet: 0 : [] --> a cons : [a * b] --> b double : [b] --> b inc : [b] --> b map : [a -> a * b] --> b nil : [] --> b plus : [a] --> a -> a s : [a] --> a times : [a] --> a -> a 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 inc(x) => map(plus(s(0)), x) double(x) => map(times(s(s(0))), x) map(f, nil) => nil map(f, cons(x, y)) => cons(f x, map(f, y)) 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 inc(X) >? map(plus(s(0)), X) double(X) >? map(times(s(s(0))), X) map(F, nil) >? nil map(F, cons(X, Y)) >? cons(F X, map(F, Y)) We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[0]] = _|_ We choose Lex = {} and Mul = {@_{o -> o}, cons, double, inc, map, nil, plus, s, times}, and the following precedence: double > inc > nil > times > plus > @_{o -> o} = map > cons > s Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: @_{o -> o}(plus(_|_), X) > X @_{o -> o}(plus(s(X)), Y) >= s(@_{o -> o}(plus(X), Y)) @_{o -> o}(times(_|_), X) >= _|_ @_{o -> o}(times(s(X)), Y) > @_{o -> o}(plus(@_{o -> o}(times(X), Y)), Y) inc(X) >= map(plus(s(_|_)), X) double(X) >= map(times(s(s(_|_))), X) map(F, nil) > nil map(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) With these choices, we have: 1] @_{o -> o}(plus(_|_), X) > X because [2], by definition 2] @_{o -> o}*(plus(_|_), X) >= X because [3], by (Select) 3] X >= X by (Meta) 4] @_{o -> o}(plus(s(X)), Y) >= s(@_{o -> o}(plus(X), Y)) because [5], by (Star) 5] @_{o -> o}*(plus(s(X)), Y) >= s(@_{o -> o}(plus(X), Y)) because @_{o -> o} > s and [6], by (Copy) 6] @_{o -> o}*(plus(s(X)), Y) >= @_{o -> o}(plus(X), Y) because [7], by (Select) 7] plus(s(X)) @_{o -> o}*(plus(s(X)), Y) >= @_{o -> o}(plus(X), Y) because [8] 8] plus*(s(X), @_{o -> o}*(plus(s(X)), Y)) >= @_{o -> o}(plus(X), Y) because plus > @_{o -> o}, [9] and [13], by (Copy) 9] plus*(s(X), @_{o -> o}*(plus(s(X)), Y)) >= plus(X) because plus in Mul and [10], by (Stat) 10] s(X) > X because [11], by definition 11] s*(X) >= X because [12], by (Select) 12] X >= X by (Meta) 13] plus*(s(X), @_{o -> o}*(plus(s(X)), Y)) >= Y because [14], by (Select) 14] @_{o -> o}*(plus(s(X)), Y) >= Y because [15], by (Select) 15] Y >= Y by (Meta) 16] @_{o -> o}(times(_|_), X) >= _|_ by (Bot) 17] @_{o -> o}(times(s(X)), Y) > @_{o -> o}(plus(@_{o -> o}(times(X), Y)), Y) because [18], by definition 18] @_{o -> o}*(times(s(X)), Y) >= @_{o -> o}(plus(@_{o -> o}(times(X), Y)), Y) because [19], by (Select) 19] times(s(X)) @_{o -> o}*(times(s(X)), Y) >= @_{o -> o}(plus(@_{o -> o}(times(X), Y)), Y) because [20] 20] times*(s(X), @_{o -> o}*(times(s(X)), Y)) >= @_{o -> o}(plus(@_{o -> o}(times(X), Y)), Y) because times > @_{o -> o}, [21] and [30], by (Copy) 21] times*(s(X), @_{o -> o}*(times(s(X)), Y)) >= plus(@_{o -> o}(times(X), Y)) because times > plus and [22], by (Copy) 22] times*(s(X), @_{o -> o}*(times(s(X)), Y)) >= @_{o -> o}(times(X), Y) because [23], by (Select) 23] @_{o -> o}*(times(s(X)), Y) >= @_{o -> o}(times(X), Y) because @_{o -> o} in Mul, [24] and [29], by (Stat) 24] times(s(X)) > times(X) because [25], by definition 25] times*(s(X)) >= times(X) because times in Mul and [26], by (Stat) 26] s(X) > X because [27], by definition 27] s*(X) >= X because [28], by (Select) 28] X >= X by (Meta) 29] Y >= Y by (Meta) 30] times*(s(X), @_{o -> o}*(times(s(X)), Y)) >= Y because [31], by (Select) 31] @_{o -> o}*(times(s(X)), Y) >= Y because [29], by (Select) 32] inc(X) >= map(plus(s(_|_)), X) because [33], by (Star) 33] inc*(X) >= map(plus(s(_|_)), X) because inc > map, [34] and [37], by (Copy) 34] inc*(X) >= plus(s(_|_)) because inc > plus and [35], by (Copy) 35] inc*(X) >= s(_|_) because inc > s and [36], by (Copy) 36] inc*(X) >= _|_ by (Bot) 37] inc*(X) >= X because [38], by (Select) 38] X >= X by (Meta) 39] double(X) >= map(times(s(s(_|_))), X) because [40], by (Star) 40] double*(X) >= map(times(s(s(_|_))), X) because double > map, [41] and [45], by (Copy) 41] double*(X) >= times(s(s(_|_))) because double > times and [42], by (Copy) 42] double*(X) >= s(s(_|_)) because double > s and [43], by (Copy) 43] double*(X) >= s(_|_) because double > s and [44], by (Copy) 44] double*(X) >= _|_ by (Bot) 45] double*(X) >= X because [46], by (Select) 46] X >= X by (Meta) 47] map(F, nil) > nil because [48], by definition 48] map*(F, nil) >= nil because [49], by (Select) 49] nil >= nil by (Fun) 50] map(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because [51], by (Star) 51] map*(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because map > cons, [52] and [57], by (Copy) 52] map*(F, cons(X, Y)) >= @_{o -> o}(F, X) because map = @_{o -> o}, map in Mul, [53] and [54], by (Stat) 53] F >= F by (Meta) 54] cons(X, Y) > X because [55], by definition 55] cons*(X, Y) >= X because [56], by (Select) 56] X >= X by (Meta) 57] map*(F, cons(X, Y)) >= map(F, Y) because map in Mul, [53] and [58], by (Stat) 58] cons(X, Y) > Y because [59], by definition 59] cons*(X, Y) >= Y because [60], by (Select) 60] Y >= Y by (Meta) We can thus remove the following rules: plus(0) X => X times(s(X)) Y => plus(times(X) Y) Y map(F, nil) => nil 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 inc(X) >? map(plus(s(0)), X) double(X) >? map(times(s(s(0))), X) map(F, cons(X, Y)) >? cons(F X, map(F, Y)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 cons = Lam[y0;y1].3 + y0 + y1 double = Lam[y0].3 + 3*y0 inc = Lam[y0].3 + 3*y0 map = Lam[G0;y1].y1 + G0(y1) + 3*y1*G0(y1) plus = Lam[y0;y1].y0 s = Lam[y0].y0 times = Lam[y0;y1].y0 Using this interpretation, the requirements translate to: [[plus(s(_x0)) _x1]] = x0 + x1 >= x0 + x1 = [[s(plus(_x0) _x1)]] [[times(0) _x0]] = x0 >= 0 = [[0]] [[inc(_x0)]] = 3 + 3*x0 > x0 = [[map(plus(s(0)), _x0)]] [[double(_x0)]] = 3 + 3*x0 > x0 = [[map(times(s(s(0))), _x0)]] [[map(_F0, cons(_x1, _x2))]] = 3 + x1 + x2 + 3*x1*F0(3 + x1 + x2) + 3*x2*F0(3 + x1 + x2) + 10*F0(3 + x1 + x2) >= 3 + x1 + x2 + F0(x1) + F0(x2) + 3*x2*F0(x2) = [[cons(_F0 _x1, map(_F0, _x2))]] We can thus remove the following rules: inc(X) => map(plus(s(0)), X) double(X) => map(times(s(s(0))), 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)) times(0, X) >? 0 map(F, cons(X, Y)) >? cons(F X, map(F, Y)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 2 cons = Lam[y0;y1].3 + y0 + y1 map = Lam[G0;y1].3*y1 + G0(y1) + 3*y1*G0(y1) plus = Lam[y0;y1].y1 + 3*y0 s = Lam[y0].3 + y0 times = Lam[y0;y1].3 + y1 + 3*y0 Using this interpretation, the requirements translate to: [[plus(s(_x0), _x1)]] = 9 + x1 + 3*x0 > 3 + x1 + 3*x0 = [[s(plus(_x0, _x1))]] [[times(0, _x0)]] = 9 + x0 > 2 = [[0]] [[map(_F0, cons(_x1, _x2))]] = 9 + 3*x1 + 3*x2 + 3*x1*F0(3 + x1 + x2) + 3*x2*F0(3 + x1 + x2) + 10*F0(3 + x1 + x2) > 3 + x1 + 3*x2 + F0(x1) + F0(x2) + 3*x2*F0(x2) = [[cons(_F0 _x1, map(_F0, _x2))]] We can thus remove the following rules: plus(s(X), Y) => s(plus(X, Y)) times(0, X) => 0 map(F, cons(X, Y)) => cons(F X, map(F, 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.