We consider the system loopy. Alphabet: f : [N -> N * N] --> N g : [] --> N -> N h : [N] --> N Rules: f(g, x) => h(x) f(i, x) => i x h(x) => f(/\y.y, x) 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]): f(g, X) >? h(X) f(F, X) >? F X h(X) >? f(/\x.x, X) We use a recursive path ordering as defined in [Kop12, Chapter 5]. We choose Lex = {} and Mul = {@_{o -> o}, f, g, h}, and the following precedence: g > h > f > @_{o -> o} With these choices, we have: 1] f(g, X) >= h(X) because [2], by (Star) 2] f*(g, X) >= h(X) because [3], by (Select) 3] g f*(g, X) >= h(X) because [4] 4] g*(f*(g, X)) >= h(X) because g > h and [5], by (Copy) 5] g*(f*(g, X)) >= X because [6], by (Select) 6] f*(g, X) >= X because [7], by (Select) 7] X >= X by (Meta) 8] f(F, X) > @_{o -> o}(F, X) because [9], by definition 9] f*(F, X) >= @_{o -> o}(F, X) because f > @_{o -> o}, [10] and [12], by (Copy) 10] f*(F, X) >= F because [11], by (Select) 11] F >= F by (Meta) 12] f*(F, X) >= X because [13], by (Select) 13] X >= X by (Meta) 14] h(X) >= f(/\x.x, X) because [15], by (Star) 15] h*(X) >= f(/\x.x, X) because h > f, [16] and [19], by (Copy) 16] h*(X) >= /\y.y because [17], by (F-Abs) 17] h*(X, x) >= x because [18], by (Select) 18] x >= x by (Var) 19] h*(X) >= X because [20], by (Select) 20] X >= X by (Meta) We can thus remove the following rules: f(F, X) => F 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]): f(g, X) >? h(X) h(X) >? f(/\x.x, X) We use a recursive path ordering as defined in [Kop12, Chapter 5]. We choose Lex = {} and Mul = {f, g, h}, and the following precedence: g > h > f With these choices, we have: 1] f(g, X) >= h(X) because [2], by (Star) 2] f*(g, X) >= h(X) because [3], by (Select) 3] g f*(g, X) >= h(X) because [4] 4] g*(f*(g, X)) >= h(X) because g > h and [5], by (Copy) 5] g*(f*(g, X)) >= X because [6], by (Select) 6] f*(g, X) >= X because [7], by (Select) 7] g f*(g, X) >= X because [8] 8] g*(f*(g, X)) >= X because [9], by (Select) 9] f*(g, X) >= X because [10], by (Select) 10] X >= X by (Meta) 11] h(X) > f(/\x.x, X) because [12], by definition 12] h*(X) >= f(/\x.x, X) because h > f, [13] and [16], by (Copy) 13] h*(X) >= /\y.y because [14], by (F-Abs) 14] h*(X, x) >= x because [15], by (Select) 15] x >= x by (Var) 16] h*(X) >= X because [17], by (Select) 17] X >= X by (Meta) We can thus remove the following rules: h(X) => f(/\x.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]): f(g, X) >? h(X) We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[h(x_1)]] = x_1 We choose Lex = {} and Mul = {f, g}, and the following precedence: f > g Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: f(g, X) > X With these choices, we have: 1] f(g, X) > X because [2], by definition 2] f*(g, X) >= X because [3], by (Select) 3] X >= X by (Meta) We can thus remove the following rules: f(g, X) => h(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.