We consider the system 01GoedelT. Alphabet: rec : [] --> N -> a -> (N -> a -> a) -> a s : [] --> N -> N z : [] --> N Rules: rec z x (/\y.f y) => x rec (s x) y (/\u.f u) => f x (rec x y (/\v.f v)) Using the transformations described in [Kop11], this system can be brought in a form without leading free variables in the left-hand side, and where the left-hand side of a variable is always a functional term or application headed by a functional term. We now transform the resulting AFS into an AFSM by replacing all free variables by meta-variables (with arity 0). This leads to the following AFSM: Alphabet: rec : [N * a * N -> a -> a] --> a s : [N] --> N z : [] --> N ~AP1 : [N -> a -> a * N] --> a -> a Rules: rec(z, X, /\x.~AP1(F, x)) => X rec(s(X), Y, /\x.~AP1(F, x)) => ~AP1(F, X) rec(X, Y, /\y.~AP1(F, y)) ~AP1(F, X) => F X Symbol ~AP1 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: rec : [N * a * N -> a -> a] --> a s : [N] --> N z : [] --> N Rules: rec(z, X, /\x.F(x)) => X rec(s(X), Y, /\x.F(x)) => F(X) rec(X, Y, /\y.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]): rec(z, X, /\x.F(x)) >? X rec(s(X), Y, /\x.F(x)) >? F(X) rec(X, Y, /\y.F(y)) We use a recursive path ordering as defined in [Kop12, Chapter 5]. We choose Lex = {} and Mul = {@_{o -> o}, rec, s, z}, and the following precedence: rec > z > s > @_{o -> o} With these choices, we have: 1] rec(z, X, /\x.F(x)) > X because [2], by definition 2] rec*(z, X, /\x.F(x)) >= X because [3], by (Select) 3] X >= X by (Meta) 4] rec(s(X), Y, /\x.F(x)) >= @_{o -> o}(F(X), rec(X, Y, /\x.F(x))) because [5], by (Star) 5] rec*(s(X), Y, /\x.F(x)) >= @_{o -> o}(F(X), rec(X, Y, /\x.F(x))) because rec > @_{o -> o}, [6] and [12], by (Copy) 6] rec*(s(X), Y, /\x.F(x)) >= F(X) because [7], by (Select) 7] F(rec*(s(X), Y, /\x.F(x))) >= F(X) because [8], by (Meta) 8] rec*(s(X), Y, /\x.F(x)) >= X because [9], by (Select) 9] s(X) >= X because [10], by (Star) 10] s*(X) >= X because [11], by (Select) 11] X >= X by (Meta) 12] rec*(s(X), Y, /\x.F(x)) >= rec(X, Y, /\x.F(x)) because rec in Mul, [13], [15] and [16], by (Stat) 13] s(X) > X because [14], by definition 14] s*(X) >= X because [11], by (Select) 15] Y >= Y by (Meta) 16] /\y.F(y) >= /\y.F(y) because [17], by (Abs) 17] F(x) >= F(x) because [18], by (Meta) 18] x >= x by (Var) We can thus remove the following rules: rec(z, X, /\x.F(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]): rec(s(X), Y, /\x.F(x)) >? F(X) rec(X, Y, /\y.F(y)) We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[rec(x_1, x_2, x_3)]] = rec(x_2, x_3, x_1) We choose Lex = {rec} and Mul = {@_{o -> o}, s}, and the following precedence: s > rec > @_{o -> o} Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: rec(s(X), Y, /\x.F(x)) > @_{o -> o}(F(X), rec(X, Y, /\x.F(x))) With these choices, we have: 1] rec(s(X), Y, /\x.F(x)) > @_{o -> o}(F(X), rec(X, Y, /\x.F(x))) because [2], by definition 2] rec*(s(X), Y, /\x.F(x)) >= @_{o -> o}(F(X), rec(X, Y, /\x.F(x))) because rec > @_{o -> o}, [3] and [9], by (Copy) 3] rec*(s(X), Y, /\x.F(x)) >= F(X) because [4], by (Select) 4] F(rec*(s(X), Y, /\x.F(x))) >= F(X) because [5], by (Meta) 5] rec*(s(X), Y, /\x.F(x)) >= X because [6], by (Select) 6] s(X) >= X because [7], by (Star) 7] s*(X) >= X because [8], by (Select) 8] X >= X by (Meta) 9] rec*(s(X), Y, /\x.F(x)) >= rec(X, Y, /\x.F(x)) because [10], [12], [13], [5], [16] and [17], by (Stat) 10] s(X) > X because [11], by definition 11] s*(X) >= X because [8], by (Select) 12] Y >= Y by (Meta) 13] /\y.F(y) >= /\y.F(y) because [14], by (Abs) 14] F(x) >= F(x) because [15], by (Meta) 15] x >= x by (Var) 16] rec*(s(X), Y, /\y.F(y)) >= Y because [12], by (Select) 17] rec*(s(X), Y, /\y.F(y)) >= /\y.F(y) because [13], by (Select) We can thus remove the following rules: rec(s(X), Y, /\x.F(x)) => F(X) rec(X, Y, /\y.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 +++ [Kop11] C. Kop. Simplifying Algebraic Functional Systems. In Proceedings of CAI 2011, volume 6742 of LNCS. 201--215, Springer, 2011. [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012.