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