/export/starexec/sandbox2/solver/bin/starexec_run_FirstOrder /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES We consider the system theBenchmark. We are asked to determine termination of the following first-order TRS. concat : [o * o] --> o cons : [o * o] --> o false : [] --> o leaf : [] --> o lessleaves : [o * o] --> o true : [] --> o concat(leaf, X) => X concat(cons(X, Y), Z) => cons(X, concat(Y, Z)) lessleaves(X, leaf) => false lessleaves(leaf, cons(X, Y)) => true lessleaves(cons(X, Y), cons(Z, U)) => lessleaves(concat(X, Y), concat(Z, U)) As the system is orthogonal, it is terminating if it is innermost terminating by [Gra95]. Then, by [FuhGieParSchSwi11], it suffices to prove (innermost) termination of the typed system, with sort annotations chosen to respect the rules, as follows: concat : [fb * fb] --> fb cons : [fb * fb] --> fb false : [] --> gb leaf : [] --> fb lessleaves : [fb * fb] --> gb true : [] --> gb We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): concat(leaf, X) >? X concat(cons(X, Y), Z) >? cons(X, concat(Y, Z)) lessleaves(X, leaf) >? false lessleaves(leaf, cons(X, Y)) >? true lessleaves(cons(X, Y), cons(Z, U)) >? lessleaves(concat(X, Y), concat(Z, U)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: concat = \y0y1.y0 + y1 cons = \y0y1.y1 + 3y0 false = 0 leaf = 3 lessleaves = \y0y1.3 + y1 + 3y0 true = 0 Using this interpretation, the requirements translate to: [[concat(leaf, _x0)]] = 3 + x0 > x0 = [[_x0]] [[concat(cons(_x0, _x1), _x2)]] = x1 + x2 + 3x0 >= x1 + x2 + 3x0 = [[cons(_x0, concat(_x1, _x2))]] [[lessleaves(_x0, leaf)]] = 6 + 3x0 > 0 = [[false]] [[lessleaves(leaf, cons(_x0, _x1))]] = 12 + x1 + 3x0 > 0 = [[true]] [[lessleaves(cons(_x0, _x1), cons(_x2, _x3))]] = 3 + x3 + 3x1 + 3x2 + 9x0 >= 3 + x2 + x3 + 3x0 + 3x1 = [[lessleaves(concat(_x0, _x1), concat(_x2, _x3))]] We can thus remove the following rules: concat(leaf, X) => X lessleaves(X, leaf) => false lessleaves(leaf, cons(X, Y)) => true We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): concat(cons(X, Y), Z) >? cons(X, concat(Y, Z)) lessleaves(cons(X, Y), cons(Z, U)) >? lessleaves(concat(X, Y), concat(Z, U)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: concat = \y0y1.2 + y1 + 2y0 cons = \y0y1.3 + y1 + 2y0 lessleaves = \y0y1.3y0 + 3y1 Using this interpretation, the requirements translate to: [[concat(cons(_x0, _x1), _x2)]] = 8 + x2 + 2x1 + 4x0 > 5 + x2 + 2x0 + 2x1 = [[cons(_x0, concat(_x1, _x2))]] [[lessleaves(cons(_x0, _x1), cons(_x2, _x3))]] = 18 + 3x1 + 3x3 + 6x0 + 6x2 > 12 + 3x1 + 3x3 + 6x0 + 6x2 = [[lessleaves(concat(_x0, _x1), concat(_x2, _x3))]] We can thus remove the following rules: concat(cons(X, Y), Z) => cons(X, concat(Y, Z)) lessleaves(cons(X, Y), cons(Z, U)) => lessleaves(concat(X, Y), concat(Z, U)) 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 +++ [FuhGieParSchSwi11] C. Fuhs, J. Giesl, M. Parting, P. Schneider-Kamp, and S. Swiderski. Proving Termination by Dependency Pairs and Inductive Theorem Proving. In volume 47(2) of Journal of Automated Reasoning. 133--160, 2011. [Gra95] B. Gramlich. Abstract Relations Between Restricted Termination and Confluence Properties of Rewrite Systems. In volume 24(1-2) of Fundamentae Informaticae. 3--23, 1995. [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012.