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