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