0.00/0.17 YES 0.00/0.18 We consider the system theBenchmark. 0.00/0.18 0.00/0.18 Alphabet: 0.00/0.18 0.00/0.18 0 : [] --> a 0.00/0.18 comp : [b -> b * b -> b] --> b -> b 0.00/0.18 plus : [a * a] --> a 0.00/0.18 s : [a] --> a 0.00/0.18 times : [a * a] --> a 0.00/0.18 twice : [b -> b] --> b -> b 0.00/0.18 0.00/0.18 Rules: 0.00/0.18 0.00/0.18 plus(0, x) => x 0.00/0.18 plus(s(x), y) => s(plus(x, y)) 0.00/0.18 times(0, x) => 0 0.00/0.18 times(s(x), y) => plus(times(x, y), y) 0.00/0.18 comp(f, g) x => f (g x) 0.00/0.18 twice(f) => comp(f, f) 0.00/0.18 0.00/0.18 This AFS is converted to an AFSM simply by replacing all free variables by meta-variables (with arity 0). 0.00/0.18 0.00/0.18 We use rule removal, following [Kop12, Theorem 2.23]. 0.00/0.18 0.00/0.18 This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 0.00/0.18 0.00/0.18 plus(0, X) >? X 0.00/0.18 plus(s(X), Y) >? s(plus(X, Y)) 0.00/0.18 times(0, X) >? 0 0.00/0.18 times(s(X), Y) >? plus(times(X, Y), Y) 0.00/0.18 comp(F, G) X >? F (G X) 0.00/0.18 twice(F) >? comp(F, F) 0.00/0.18 0.00/0.18 We use a recursive path ordering as defined in [Kop12, Chapter 5]. 0.00/0.18 0.00/0.18 Argument functions: 0.00/0.18 0.00/0.18 [[0]] = _|_ 0.00/0.18 0.00/0.18 We choose Lex = {} and Mul = {@_{o -> o}, comp, plus, s, times, twice}, and the following precedence: times > plus > s > twice > comp > @_{o -> o} 0.00/0.18 0.00/0.18 Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: 0.00/0.18 0.00/0.18 plus(_|_, X) >= X 0.00/0.18 plus(s(X), Y) >= s(plus(X, Y)) 0.00/0.18 times(_|_, X) >= _|_ 0.00/0.18 times(s(X), Y) > plus(times(X, Y), Y) 0.00/0.18 @_{o -> o}(comp(F, G), X) > @_{o -> o}(F, @_{o -> o}(G, X)) 0.00/0.18 twice(F) >= comp(F, F) 0.00/0.18 0.00/0.18 With these choices, we have: 0.00/0.18 0.00/0.18 1] plus(_|_, X) >= X because [2], by (Star) 0.00/0.18 2] plus*(_|_, X) >= X because [3], by (Select) 0.00/0.18 3] X >= X by (Meta) 0.00/0.18 0.00/0.18 4] plus(s(X), Y) >= s(plus(X, Y)) because [5], by (Star) 0.00/0.18 5] plus*(s(X), Y) >= s(plus(X, Y)) because plus > s and [6], by (Copy) 0.00/0.18 6] plus*(s(X), Y) >= plus(X, Y) because plus in Mul, [7] and [10], by (Stat) 0.00/0.18 7] s(X) > X because [8], by definition 0.00/0.18 8] s*(X) >= X because [9], by (Select) 0.00/0.18 9] X >= X by (Meta) 0.00/0.18 10] Y >= Y by (Meta) 0.00/0.18 0.00/0.18 11] times(_|_, X) >= _|_ by (Bot) 0.00/0.18 0.00/0.18 12] times(s(X), Y) > plus(times(X, Y), Y) because [13], by definition 0.00/0.18 13] times*(s(X), Y) >= plus(times(X, Y), Y) because times > plus, [14] and [19], by (Copy) 0.00/0.18 14] times*(s(X), Y) >= times(X, Y) because times in Mul, [15] and [18], by (Stat) 0.00/0.18 15] s(X) > X because [16], by definition 0.00/0.18 16] s*(X) >= X because [17], by (Select) 0.00/0.18 17] X >= X by (Meta) 0.00/0.18 18] Y >= Y by (Meta) 0.00/0.18 19] times*(s(X), Y) >= Y because [18], by (Select) 0.00/0.18 0.00/0.18 20] @_{o -> o}(comp(F, G), X) > @_{o -> o}(F, @_{o -> o}(G, X)) because [21], by definition 0.00/0.18 21] @_{o -> o}*(comp(F, G), X) >= @_{o -> o}(F, @_{o -> o}(G, X)) because [22], by (Select) 0.00/0.18 22] comp(F, G) @_{o -> o}*(comp(F, G), X) >= @_{o -> o}(F, @_{o -> o}(G, X)) because [23] 0.00/0.18 23] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= @_{o -> o}(F, @_{o -> o}(G, X)) because comp > @_{o -> o}, [24] and [26], by (Copy) 0.00/0.18 24] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= F because [25], by (Select) 0.00/0.18 25] F >= F by (Meta) 0.00/0.18 26] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= @_{o -> o}(G, X) because comp > @_{o -> o}, [27] and [29], by (Copy) 0.00/0.18 27] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= G because [28], by (Select) 0.00/0.18 28] G >= G by (Meta) 0.00/0.18 29] comp*(F, G, @_{o -> o}*(comp(F, G), X)) >= X because [30], by (Select) 0.00/0.18 30] @_{o -> o}*(comp(F, G), X) >= X because [31], by (Select) 0.00/0.18 31] X >= X by (Meta) 0.00/0.18 0.00/0.18 32] twice(F) >= comp(F, F) because [33], by (Star) 0.00/0.18 33] twice*(F) >= comp(F, F) because twice > comp, [34] and [34], by (Copy) 0.00/0.18 34] twice*(F) >= F because [35], by (Select) 0.00/0.18 35] F >= F by (Meta) 0.00/0.18 0.00/0.18 We can thus remove the following rules: 0.00/0.18 0.00/0.18 times(s(X), Y) => plus(times(X, Y), Y) 0.00/0.18 comp(F, G) X => F (G X) 0.00/0.18 0.00/0.18 We use rule removal, following [Kop12, Theorem 2.23]. 0.00/0.18 0.00/0.18 This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 0.00/0.18 0.00/0.18 plus(0, X) >? X 0.00/0.18 plus(s(X), Y) >? s(plus(X, Y)) 0.00/0.18 times(0, X) >? 0 0.00/0.18 twice(F) >? comp(F, F) 0.00/0.18 0.00/0.18 We orient these requirements with a polynomial interpretation in the natural numbers. 0.00/0.18 0.00/0.18 The following interpretation satisfies the requirements: 0.00/0.18 0.00/0.18 0 = 0 0.00/0.18 comp = \G0G1y2.G0(0) + G1(y2) 0.00/0.18 plus = \y0y1.3 + y1 + 3y0 0.00/0.18 s = \y0.3 + y0 0.00/0.18 times = \y0y1.3 + y1 + 3y0 0.00/0.18 twice = \G0y1.3 + 3y1 + G0(0) + 2G0(y1) 0.00/0.18 0.00/0.18 Using this interpretation, the requirements translate to: 0.00/0.18 0.00/0.18 [[plus(0, _x0)]] = 3 + x0 > x0 = [[_x0]] 0.00/0.18 [[plus(s(_x0), _x1)]] = 12 + x1 + 3x0 > 6 + x1 + 3x0 = [[s(plus(_x0, _x1))]] 0.00/0.18 [[times(0, _x0)]] = 3 + x0 > 0 = [[0]] 0.00/0.18 [[twice(_F0)]] = \y0.3 + 3y0 + F0(0) + 2F0(y0) > \y0.F0(0) + F0(y0) = [[comp(_F0, _F0)]] 0.00/0.18 0.00/0.18 We can thus remove the following rules: 0.00/0.18 0.00/0.18 plus(0, X) => X 0.00/0.18 plus(s(X), Y) => s(plus(X, Y)) 0.00/0.18 times(0, X) => 0 0.00/0.18 twice(F) => comp(F, F) 0.00/0.18 0.00/0.18 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.18 0.00/0.18 0.00/0.18 +++ Citations +++ 0.00/0.18 0.00/0.18 [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. 0.00/0.18 EOF