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