0.00/0.09 YES 0.00/0.10 We consider the system theBenchmark. 0.00/0.10 0.00/0.10 Alphabet: 0.00/0.10 0.00/0.10 append : [b * b] --> b 0.00/0.10 cons : [a * b] --> b 0.00/0.10 map : [a -> a * b] --> b 0.00/0.10 nil : [] --> b 0.00/0.10 0.00/0.10 Rules: 0.00/0.10 0.00/0.10 append(nil, x) => x 0.00/0.10 append(cons(x, y), z) => cons(x, append(y, z)) 0.00/0.10 map(f, nil) => nil 0.00/0.10 map(f, cons(x, y)) => cons(f x, map(f, y)) 0.00/0.10 append(append(x, y), z) => append(x, append(y, z)) 0.00/0.10 map(f, append(x, y)) => append(map(f, x), map(f, y)) 0.00/0.10 0.00/0.10 This AFS is converted to an AFSM simply by replacing all free variables by meta-variables (with arity 0). 0.00/0.10 0.00/0.10 We use rule removal, following [Kop12, Theorem 2.23]. 0.00/0.10 0.00/0.10 This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 0.00/0.10 0.00/0.10 append(nil, X) >? X 0.00/0.10 append(cons(X, Y), Z) >? cons(X, append(Y, Z)) 0.00/0.10 map(F, nil) >? nil 0.00/0.10 map(F, cons(X, Y)) >? cons(F X, map(F, Y)) 0.00/0.10 append(append(X, Y), Z) >? append(X, append(Y, Z)) 0.00/0.10 map(F, append(X, Y)) >? append(map(F, X), map(F, Y)) 0.00/0.10 0.00/0.10 We orient these requirements with a polynomial interpretation in the natural numbers. 0.00/0.10 0.00/0.10 The following interpretation satisfies the requirements: 0.00/0.10 0.00/0.10 append = \y0y1.2 + y0 + y1 0.00/0.10 cons = \y0y1.2 + y0 + y1 0.00/0.10 map = \G0y1.1 + 3y1 + 2y1G0(y1) + 2G0(y1) 0.00/0.10 nil = 0 0.00/0.10 0.00/0.10 Using this interpretation, the requirements translate to: 0.00/0.10 0.00/0.10 [[append(nil, _x0)]] = 2 + x0 > x0 = [[_x0]] 0.00/0.10 [[append(cons(_x0, _x1), _x2)]] = 4 + x0 + x1 + x2 >= 4 + x0 + x1 + x2 = [[cons(_x0, append(_x1, _x2))]] 0.00/0.10 [[map(_F0, nil)]] = 1 + 2F0(0) > 0 = [[nil]] 0.00/0.10 [[map(_F0, cons(_x1, _x2))]] = 7 + 3x1 + 3x2 + 2x1F0(2 + x1 + x2) + 2x2F0(2 + x1 + x2) + 6F0(2 + x1 + x2) > 3 + x1 + 3x2 + F0(x1) + 2x2F0(x2) + 2F0(x2) = [[cons(_F0 _x1, map(_F0, _x2))]] 0.00/0.10 [[append(append(_x0, _x1), _x2)]] = 4 + x0 + x1 + x2 >= 4 + x0 + x1 + x2 = [[append(_x0, append(_x1, _x2))]] 0.00/0.10 [[map(_F0, append(_x1, _x2))]] = 7 + 3x1 + 3x2 + 2x1F0(2 + x1 + x2) + 2x2F0(2 + x1 + x2) + 6F0(2 + x1 + x2) > 4 + 3x1 + 3x2 + 2x1F0(x1) + 2x2F0(x2) + 2F0(x1) + 2F0(x2) = [[append(map(_F0, _x1), map(_F0, _x2))]] 0.00/0.10 0.00/0.10 We can thus remove the following rules: 0.00/0.10 0.00/0.10 append(nil, X) => X 0.00/0.10 map(F, nil) => nil 0.00/0.10 map(F, cons(X, Y)) => cons(F X, map(F, Y)) 0.00/0.10 map(F, append(X, Y)) => append(map(F, X), map(F, Y)) 0.00/0.10 0.00/0.10 We use rule removal, following [Kop12, Theorem 2.23]. 0.00/0.10 0.00/0.10 This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 0.00/0.10 0.00/0.10 append(cons(X, Y), Z) >? cons(X, append(Y, Z)) 0.00/0.10 append(append(X, Y), Z) >? append(X, append(Y, Z)) 0.00/0.10 0.00/0.10 We orient these requirements with a polynomial interpretation in the natural numbers. 0.00/0.10 0.00/0.10 The following interpretation satisfies the requirements: 0.00/0.10 0.00/0.10 append = \y0y1.3 + y1 + 3y0 0.00/0.10 cons = \y0y1.2 + y0 + y1 0.00/0.10 0.00/0.10 Using this interpretation, the requirements translate to: 0.00/0.10 0.00/0.10 [[append(cons(_x0, _x1), _x2)]] = 9 + x2 + 3x0 + 3x1 > 5 + x0 + x2 + 3x1 = [[cons(_x0, append(_x1, _x2))]] 0.00/0.10 [[append(append(_x0, _x1), _x2)]] = 12 + x2 + 3x1 + 9x0 > 6 + x2 + 3x0 + 3x1 = [[append(_x0, append(_x1, _x2))]] 0.00/0.10 0.00/0.10 We can thus remove the following rules: 0.00/0.10 0.00/0.10 append(cons(X, Y), Z) => cons(X, append(Y, Z)) 0.00/0.10 append(append(X, Y), Z) => append(X, append(Y, Z)) 0.00/0.10 0.00/0.10 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.00/0.10 0.00/0.10 0.00/0.10 +++ Citations +++ 0.00/0.10 0.00/0.10 [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. 0.00/0.10 EOF