0.00/0.01 YES 0.00/0.01 We consider the system theBenchmark. 0.00/0.01 0.00/0.01 Alphabet: 0.00/0.01 0.00/0.01 cons : [t * f] --> f 0.00/0.01 heightf : [f] --> N 0.00/0.01 heightt : [t] --> N 0.00/0.01 leaf : [] --> t 0.00/0.01 max : [N * N] --> N 0.00/0.01 nil : [] --> f 0.00/0.01 node : [f] --> t 0.00/0.01 s : [N] --> N 0.00/0.01 z : [] --> N 0.00/0.01 0.00/0.01 Rules: 0.00/0.01 0.00/0.01 heightf(nil) => z 0.00/0.01 heightf(cons(x, y)) => max(heightt(x), heightf(y)) 0.00/0.01 heightt(leaf) => z 0.00/0.01 heightt(node(x)) => s(heightf(x)) 0.00/0.01 0.00/0.01 This AFS is converted to an AFSM simply by replacing all free variables by meta-variables (with arity 0). 0.00/0.01 0.00/0.01 We use rule removal, following [Kop12, Theorem 2.23]. 0.00/0.01 0.00/0.01 This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 0.00/0.01 0.00/0.01 heightf(nil) >? z 0.00/0.01 heightf(cons(X, Y)) >? max(heightt(X), heightf(Y)) 0.00/0.01 heightt(leaf) >? z 0.00/0.01 heightt(node(X)) >? s(heightf(X)) 0.00/0.01 0.00/0.01 We orient these requirements with a polynomial interpretation in the natural numbers. 0.00/0.01 0.00/0.01 The following interpretation satisfies the requirements: 0.00/0.01 0.00/0.01 cons = \y0y1.3 + 3y0 + 3y1 0.00/0.01 heightf = \y0.y0 0.00/0.01 heightt = \y0.y0 0.00/0.01 leaf = 3 0.00/0.01 max = \y0y1.y0 + y1 0.00/0.01 nil = 3 0.00/0.01 node = \y0.3 + 3y0 0.00/0.01 s = \y0.y0 0.00/0.01 z = 0 0.00/0.01 0.00/0.01 Using this interpretation, the requirements translate to: 0.00/0.01 0.00/0.01 [[heightf(nil)]] = 3 > 0 = [[z]] 0.00/0.01 [[heightf(cons(_x0, _x1))]] = 3 + 3x0 + 3x1 > x0 + x1 = [[max(heightt(_x0), heightf(_x1))]] 0.00/0.01 [[heightt(leaf)]] = 3 > 0 = [[z]] 0.00/0.01 [[heightt(node(_x0))]] = 3 + 3x0 > x0 = [[s(heightf(_x0))]] 0.00/0.01 0.00/0.01 We can thus remove the following rules: 0.00/0.01 0.00/0.01 heightf(nil) => z 0.00/0.01 heightf(cons(X, Y)) => max(heightt(X), heightf(Y)) 0.00/0.01 heightt(leaf) => z 0.00/0.01 heightt(node(X)) => s(heightf(X)) 0.00/0.01 0.00/0.01 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.01 0.00/0.01 0.00/0.01 +++ Citations +++ 0.00/0.01 0.00/0.01 [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. 0.00/0.01 EOF