We consider the system AotoYamada_05__028. Alphabet: cons : [a * c] --> c consif : [b * a * c] --> c false : [] --> b filter : [a -> b * c] --> c nil : [] --> c true : [] --> b Rules: consif(true, x, y) => cons(x, y) consif(false, x, y) => y filter(f, nil) => nil filter(f, cons(x, y)) => consif(f x, x, filter(f, y)) 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]): consif(true, X, Y) >? cons(X, Y) consif(false, X, Y) >? Y filter(F, nil) >? nil filter(F, cons(X, Y)) >? consif(F X, X, filter(F, Y)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: cons = Lam[y0;y1].3 + 2*y0 + 2*y1 consif = Lam[y0;y1;y2].2 + y0 + 2*y2 + 3*y1 false = 3 filter = Lam[G0;y1].3 + 3*y1 + 2*G0(y1) + y1*G0(y1) nil = 0 true = 3 Using this interpretation, the requirements translate to: [[consif(true, _x0, _x1)]] = 5 + 2*x1 + 3*x0 > 3 + 2*x0 + 2*x1 = [[cons(_x0, _x1)]] [[consif(false, _x0, _x1)]] = 5 + 2*x1 + 3*x0 > x1 = [[_x1]] [[filter(_F0, nil)]] = 3 + 2*F0(0) > 0 = [[nil]] [[filter(_F0, cons(_x1, _x2))]] = 12 + 6*x1 + 6*x2 + 2*x1*F0(3 + 2*x1 + 2*x2) + 2*x2*F0(3 + 2*x1 + 2*x2) + 5*F0(3 + 2*x1 + 2*x2) > 8 + 4*x1 + 6*x2 + F0(x1) + 2*x2*F0(x2) + 4*F0(x2) = [[consif(_F0 _x1, _x1, filter(_F0, _x2))]] We can thus remove the following rules: consif(true, X, Y) => cons(X, Y) consif(false, X, Y) => Y filter(F, nil) => nil filter(F, cons(X, Y)) => consif(F X, X, filter(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 +++ [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012.