0.05/0.60 YES 0.05/0.61 We consider the system theBenchmark. 0.05/0.61 0.05/0.61 Alphabet: 0.05/0.61 0.05/0.61 0 : [] --> a 0.05/0.61 rec : [] --> (a -> b -> b) -> b -> a -> b 0.05/0.61 s : [] --> a -> a 0.05/0.61 0.05/0.61 Rules: 0.05/0.61 0.05/0.61 rec (/\x./\y.f x y) z 0 => z 0.05/0.61 rec (/\x./\y.f x y) z (s u) => f (s u) (rec (/\v./\w.f v w) z u) 0.05/0.61 0.05/0.61 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. 0.05/0.61 0.05/0.61 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: 0.05/0.61 0.05/0.61 Alphabet: 0.05/0.61 0.05/0.61 0 : [] --> a 0.05/0.61 rec : [a -> b -> b * b * a] --> b 0.05/0.61 s : [a] --> a 0.05/0.61 ~AP1 : [a -> b -> b * a] --> b -> b 0.05/0.61 0.05/0.61 Rules: 0.05/0.61 0.05/0.61 rec(/\x./\y.~AP1(F, x) y, X, 0) => X 0.05/0.61 rec(/\x./\y.~AP1(F, x) y, X, s(Y)) => ~AP1(F, s(Y)) rec(/\z./\u.~AP1(F, z) u, X, Y) 0.05/0.61 ~AP1(F, X) => F X 0.05/0.61 0.05/0.61 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: 0.05/0.61 0.05/0.61 Alphabet: 0.05/0.61 0.05/0.61 0 : [] --> a 0.05/0.61 rec : [a -> b -> b * b * a] --> b 0.05/0.61 s : [a] --> a 0.05/0.61 0.05/0.61 Rules: 0.05/0.61 0.05/0.61 rec(/\x./\y.X(x, y), Y, 0) => Y 0.05/0.61 rec(/\x./\y.X(x, y), Y, s(Z)) => X(s(Z), rec(/\z./\u.X(z, u), Y, Z)) 0.05/0.61 0.05/0.61 We use rule removal, following [Kop12, Theorem 2.23]. 0.05/0.61 0.05/0.61 This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 0.05/0.61 0.05/0.61 rec(/\x./\y.X(x, y), Y, 0) >? Y 0.05/0.61 rec(/\x./\y.X(x, y), Y, s(Z)) >? X(s(Z), rec(/\z./\u.X(z, u), Y, Z)) 0.05/0.61 0.05/0.61 We use a recursive path ordering as defined in [Kop12, Chapter 5]. 0.05/0.61 0.05/0.61 We choose Lex = {} and Mul = {0, rec, s}, and the following precedence: 0 > s > rec 0.05/0.61 0.05/0.61 With these choices, we have: 0.05/0.61 0.05/0.61 1] rec(/\x./\y.X(x, y), Y, 0) >= Y because [2], by (Star) 0.05/0.61 2] rec*(/\x./\y.X(x, y), Y, 0) >= Y because [3], by (Select) 0.05/0.61 3] Y >= Y by (Meta) 0.05/0.61 0.05/0.61 4] rec(/\x./\y.X(x, y), Y, s(Z)) > X(s(Z), rec(/\x./\y.X(x, y), Y, Z)) because [5], by definition 0.05/0.61 5] rec*(/\x./\y.X(x, y), Y, s(Z)) >= X(s(Z), rec(/\x./\y.X(x, y), Y, Z)) because [6], by (Select) 0.05/0.61 6] X(rec*(/\x./\y.X(x, y), Y, s(Z)), rec*(/\z./\u.X(z, u), Y, s(Z))) >= X(s(Z), rec(/\x./\y.X(x, y), Y, Z)) because [7] and [10], by (Meta) 0.05/0.61 7] rec*(/\x./\y.X(x, y), Y, s(Z)) >= s(Z) because [8], by (Select) 0.05/0.61 8] s(Z) >= s(Z) because s in Mul and [9], by (Fun) 0.05/0.61 9] Z >= Z by (Meta) 0.05/0.61 10] rec*(/\x./\y.X(x, y), Y, s(Z)) >= rec(/\x./\y.X(x, y), Y, Z) because rec in Mul, [11], [16] and [17], by (Stat) 0.05/0.61 11] /\x./\z.X(x, z) >= /\x./\z.X(x, z) because [12], by (Abs) 0.05/0.61 12] /\z.X(y, z) >= /\z.X(y, z) because [13], by (Abs) 0.05/0.61 13] X(y, x) >= X(y, x) because [14] and [15], by (Meta) 0.05/0.61 14] y >= y by (Var) 0.05/0.61 15] x >= x by (Var) 0.05/0.61 16] Y >= Y by (Meta) 0.05/0.61 17] s(Z) > Z because [18], by definition 0.05/0.61 18] s*(Z) >= Z because [9], by (Select) 0.05/0.61 0.05/0.61 We can thus remove the following rules: 0.05/0.61 0.05/0.61 rec(/\x./\y.X(x, y), Y, s(Z)) => X(s(Z), rec(/\z./\u.X(z, u), Y, Z)) 0.05/0.61 0.05/0.61 We use rule removal, following [Kop12, Theorem 2.23]. 0.05/0.61 0.05/0.61 This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 0.05/0.61 0.05/0.61 rec(/\x./\y.X(x, y), Y, 0) >? Y 0.05/0.61 0.05/0.61 We orient these requirements with a polynomial interpretation in the natural numbers. 0.05/0.61 0.05/0.61 The following interpretation satisfies the requirements: 0.05/0.61 0.05/0.61 0 = 3 0.05/0.61 rec = \G0y1y2.3 + y1 + y2 + G0(0,0) 0.05/0.61 0.05/0.61 Using this interpretation, the requirements translate to: 0.05/0.61 0.05/0.61 [[rec(/\x./\y._x0(x, y), _x1, 0)]] = 6 + x1 + F0(0,0) > x1 = [[_x1]] 0.05/0.61 0.05/0.61 We can thus remove the following rules: 0.05/0.61 0.05/0.61 rec(/\x./\y.X(x, y), Y, 0) => Y 0.05/0.61 0.05/0.61 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. 0.05/0.61 0.05/0.61 0.05/0.61 +++ Citations +++ 0.05/0.61 0.05/0.61 [Kop11] C. Kop. Simplifying Algebraic Functional Systems. In Proceedings of CAI 2011, volume 6742 of LNCS. 201--215, Springer, 2011. 0.05/0.61 [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. 0.05/0.61 EOF