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