We consider the system AotoYamada_05__011. Alphabet: 0 : [] --> b cons : [b * a] --> a curry : [b -> b -> b * b] --> b -> b inc : [] --> a -> a map : [b -> b] --> a -> a nil : [] --> a plus : [] --> b -> b -> b s : [b] --> b Rules: plus 0 x => x plus s(x) y => s(plus x y) map(f) nil => nil map(f) cons(x, y) => cons(f x, map(f) y) curry(f, x) y => f x y inc => map(curry(plus, s(0))) This AFS is converted to an AFSM simply by replacing all free variables by meta-variables (with arity 0). Symbol curry is an encoding for application that is only used in innocuous ways. We can simplify the program (without losing non-termination) by removing it. This gives: Alphabet: 0 : [] --> b cons : [b * a] --> a inc : [] --> a -> a map : [b -> b] --> a -> a nil : [] --> a plus : [b] --> b -> b s : [b] --> b Rules: plus(0) X => X plus(s(X)) Y => s(plus(X) Y) map(F) nil => nil map(F) cons(X, Y) => cons(F X, map(F) Y) inc => map(plus(s(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) map(F) nil >? nil map(F) cons(X, Y) >? cons(F X, map(F) Y) inc >? map(plus(s(0))) We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[0]] = _|_ [[nil]] = _|_ [[s(x_1)]] = x_1 We choose Lex = {} and Mul = {@_{o -> o}, cons, inc, map, plus}, and the following precedence: @_{o -> o} > inc > plus > cons > map 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(X), Y) >= @_{o -> o}(plus(X), Y) @_{o -> o}(map(F), _|_) >= _|_ @_{o -> o}(map(F), cons(X, Y)) >= cons(@_{o -> o}(F, X), @_{o -> o}(map(F), Y)) inc > map(plus(_|_)) With these choices, we have: 1] @_{o -> o}(plus(_|_), X) >= X because [2], by (Star) 2] @_{o -> o}*(plus(_|_), X) >= X because [3], by (Select) 3] X >= X by (Meta) 4] @_{o -> o}(plus(X), Y) >= @_{o -> o}(plus(X), Y) because @_{o -> o} in Mul, [5] and [7], by (Fun) 5] plus(X) >= plus(X) because plus in Mul and [6], by (Fun) 6] X >= X by (Meta) 7] Y >= Y by (Meta) 8] @_{o -> o}(map(F), _|_) >= _|_ by (Bot) 9] @_{o -> o}(map(F), cons(X, Y)) >= cons(@_{o -> o}(F, X), @_{o -> o}(map(F), Y)) because [10], by (Star) 10] @_{o -> o}*(map(F), cons(X, Y)) >= cons(@_{o -> o}(F, X), @_{o -> o}(map(F), Y)) because @_{o -> o} > cons, [11] and [18], by (Copy) 11] @_{o -> o}*(map(F), cons(X, Y)) >= @_{o -> o}(F, X) because @_{o -> o} in Mul, [12] and [15], by (Stat) 12] map(F) >= F because [13], by (Star) 13] map*(F) >= F because [14], by (Select) 14] F >= F by (Meta) 15] cons(X, Y) > X because [16], by definition 16] cons*(X, Y) >= X because [17], by (Select) 17] X >= X by (Meta) 18] @_{o -> o}*(map(F), cons(X, Y)) >= @_{o -> o}(map(F), Y) because @_{o -> o} in Mul, [19] and [21], by (Stat) 19] map(F) >= map(F) because map in Mul and [20], by (Fun) 20] F >= F by (Meta) 21] cons(X, Y) > Y because [22], by definition 22] cons*(X, Y) >= Y because [23], by (Select) 23] Y >= Y by (Meta) 24] inc > map(plus(_|_)) because [25], by definition 25] inc* >= map(plus(_|_)) because inc > map and [26], by (Copy) 26] inc* >= plus(_|_) because inc > plus and [27], by (Copy) 27] inc* >= _|_ by (Bot) We can thus remove the following rules: inc => map(plus(s(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)) 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: [[nil]] = _|_ We choose Lex = {} and Mul = {0, @_{o -> o}, cons, map, plus, s}, and the following precedence: map > 0 > cons > plus > @_{o -> o} > s Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: plus(0, X) >= X plus(s(X), Y) > s(plus(X, Y)) map(F, _|_) > _|_ map(F, cons(X, Y)) > cons(@_{o -> o}(F, X), map(F, Y)) With these choices, we have: 1] plus(0, X) >= X because [2], by (Star) 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 definition 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] map(F, _|_) > _|_ because [12], by definition 12] map*(F, _|_) >= _|_ by (Bot) 13] map(F, cons(X, Y)) > cons(@_{o -> o}(F, X), map(F, Y)) because [14], by definition 14] map*(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because map > cons, [15] and [22], by (Copy) 15] map*(F, cons(X, Y)) >= @_{o -> o}(F, X) because map > @_{o -> o}, [16] and [18], by (Copy) 16] map*(F, cons(X, Y)) >= F because [17], by (Select) 17] F >= F by (Meta) 18] map*(F, cons(X, Y)) >= X because [19], by (Select) 19] cons(X, Y) >= X because [20], by (Star) 20] cons*(X, Y) >= X because [21], by (Select) 21] X >= X by (Meta) 22] map*(F, cons(X, Y)) >= map(F, Y) because map in Mul, [23] and [24], by (Stat) 23] F >= F by (Meta) 24] cons(X, Y) > Y because [25], by definition 25] cons*(X, Y) >= Y because [26], by (Select) 26] Y >= Y by (Meta) We can thus remove the following rules: plus(s(X), Y) => s(plus(X, Y)) map(F, nil) => nil map(F, cons(X, Y)) => cons(F X, map(F, 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(0, X) >? X We use a recursive path ordering as defined in [Kop12, Chapter 5]. We choose Lex = {} and Mul = {0, plus}, and the following precedence: 0 > plus 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) We can thus remove the following rules: plus(0, X) => X 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.