We consider the system AotoYamada_05__005. Alphabet: 0 : [] --> a add : [] --> a -> a -> a curry : [a -> a -> a] --> a -> a -> a plus : [] --> a -> a -> a s : [a] --> a Rules: plus 0 x => x plus s(x) y => s(plus x y) curry(f) x y => f x y add => curry(plus) 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 : [] --> a add : [] --> a -> a -> a plus : [] --> a -> a -> a s : [a] --> a Rules: plus 0 X => X plus s(X) Y => s(plus X Y) add => plus 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) add >? plus We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[s(x_1)]] = x_1 We choose Lex = {} and Mul = {0, @_{o -> o -> o}, @_{o -> o}, add, plus}, and the following precedence: add = plus > 0 > @_{o -> o -> o} > @_{o -> o} Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: @_{o -> o}(@_{o -> o -> o}(plus, 0), X) > X @_{o -> o}(@_{o -> o -> o}(plus, X), Y) >= @_{o -> o}(@_{o -> o -> o}(plus, X), Y) add >= plus With these choices, we have: 1] @_{o -> o}(@_{o -> o -> o}(plus, 0), X) > X because [2], by definition 2] @_{o -> o}*(@_{o -> o -> o}(plus, 0), X) >= X because [3], by (Select) 3] X >= X by (Meta) 4] @_{o -> o}(@_{o -> o -> o}(plus, X), Y) >= @_{o -> o}(@_{o -> o -> o}(plus, X), Y) because @_{o -> o} in Mul, [5] and [8], by (Fun) 5] @_{o -> o -> o}(plus, X) >= @_{o -> o -> o}(plus, X) because @_{o -> o -> o} in Mul, [6] and [7], by (Fun) 6] plus >= plus by (Fun) 7] X >= X by (Meta) 8] Y >= Y by (Meta) 9] add >= plus because add = plus, by (Fun) We can thus remove the following rules: plus 0 X => 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) add >? plus We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[plus]] = _|_ [[s(x_1)]] = x_1 We choose Lex = {} and Mul = {@_{o -> o -> o}, @_{o -> o}, add}, and the following precedence: @_{o -> o} > @_{o -> o -> o} > add Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: @_{o -> o}(@_{o -> o -> o}(_|_, X), Y) >= @_{o -> o}(@_{o -> o -> o}(_|_, X), Y) add > _|_ With these choices, we have: 1] @_{o -> o}(@_{o -> o -> o}(_|_, X), Y) >= @_{o -> o}(@_{o -> o -> o}(_|_, X), Y) because @_{o -> o} in Mul, [2] and [5], by (Fun) 2] @_{o -> o -> o}(_|_, X) >= @_{o -> o -> o}(_|_, X) because @_{o -> o -> o} in Mul, [3] and [4], by (Fun) 3] _|_ >= _|_ by (Bot) 4] X >= X by (Meta) 5] Y >= Y by (Meta) 6] add > _|_ because [7], by definition 7] add* >= _|_ by (Bot) We can thus remove the following rules: add => plus 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.