/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. add : [o * o] --> o app : [o * o] --> o nil : [] --> o reverse : [o] --> o shuffle : [o] --> o app(nil, X) => X app(add(X, Y), Z) => add(X, app(Y, Z)) reverse(nil) => nil reverse(add(X, Y)) => app(reverse(Y), add(X, nil)) shuffle(nil) => nil shuffle(add(X, Y)) => add(X, shuffle(reverse(Y))) 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: add : [q * fb] --> fb app : [fb * fb] --> fb nil : [] --> fb reverse : [fb] --> fb shuffle : [fb] --> fb We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): app(nil, X) >? X app(add(X, Y), Z) >? add(X, app(Y, Z)) reverse(nil) >? nil reverse(add(X, Y)) >? app(reverse(Y), add(X, nil)) shuffle(nil) >? nil shuffle(add(X, Y)) >? add(X, shuffle(reverse(Y))) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: add = \y0y1.y0 + y1 app = \y0y1.y0 + y1 nil = 0 reverse = \y0.y0 shuffle = \y0.2 + 2y0 Using this interpretation, the requirements translate to: [[app(nil, _x0)]] = x0 >= x0 = [[_x0]] [[app(add(_x0, _x1), _x2)]] = x0 + x1 + x2 >= x0 + x1 + x2 = [[add(_x0, app(_x1, _x2))]] [[reverse(nil)]] = 0 >= 0 = [[nil]] [[reverse(add(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[app(reverse(_x1), add(_x0, nil))]] [[shuffle(nil)]] = 2 > 0 = [[nil]] [[shuffle(add(_x0, _x1))]] = 2 + 2x0 + 2x1 >= 2 + x0 + 2x1 = [[add(_x0, shuffle(reverse(_x1)))]] We can thus remove the following rules: shuffle(nil) => nil We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): app(nil, X) >? X app(add(X, Y), Z) >? add(X, app(Y, Z)) reverse(nil) >? nil reverse(add(X, Y)) >? app(reverse(Y), add(X, nil)) shuffle(add(X, Y)) >? add(X, shuffle(reverse(Y))) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: add = \y0y1.1 + y1 + 2y0 app = \y0y1.y0 + y1 nil = 0 reverse = \y0.y0 shuffle = \y0.2 + 2y0 Using this interpretation, the requirements translate to: [[app(nil, _x0)]] = x0 >= x0 = [[_x0]] [[app(add(_x0, _x1), _x2)]] = 1 + x1 + x2 + 2x0 >= 1 + x1 + x2 + 2x0 = [[add(_x0, app(_x1, _x2))]] [[reverse(nil)]] = 0 >= 0 = [[nil]] [[reverse(add(_x0, _x1))]] = 1 + x1 + 2x0 >= 1 + x1 + 2x0 = [[app(reverse(_x1), add(_x0, nil))]] [[shuffle(add(_x0, _x1))]] = 4 + 2x1 + 4x0 > 3 + 2x0 + 2x1 = [[add(_x0, shuffle(reverse(_x1)))]] We can thus remove the following rules: shuffle(add(X, Y)) => add(X, shuffle(reverse(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]): app(nil, X) >? X app(add(X, Y), Z) >? add(X, app(Y, Z)) reverse(nil) >? nil reverse(add(X, Y)) >? app(reverse(Y), add(X, nil)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: add = \y0y1.y0 + y1 app = \y0y1.y0 + 2y1 nil = 0 reverse = \y0.1 + 2y0 Using this interpretation, the requirements translate to: [[app(nil, _x0)]] = 2x0 >= x0 = [[_x0]] [[app(add(_x0, _x1), _x2)]] = x0 + x1 + 2x2 >= x0 + x1 + 2x2 = [[add(_x0, app(_x1, _x2))]] [[reverse(nil)]] = 1 > 0 = [[nil]] [[reverse(add(_x0, _x1))]] = 1 + 2x0 + 2x1 >= 1 + 2x0 + 2x1 = [[app(reverse(_x1), add(_x0, nil))]] We can thus remove the following rules: reverse(nil) => nil We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): app(nil, X) >? X app(add(X, Y), Z) >? add(X, app(Y, Z)) reverse(add(X, Y)) >? app(reverse(Y), add(X, nil)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: add = \y0y1.1 + y0 + y1 app = \y0y1.y0 + y1 nil = 0 reverse = \y0.2y0 Using this interpretation, the requirements translate to: [[app(nil, _x0)]] = x0 >= x0 = [[_x0]] [[app(add(_x0, _x1), _x2)]] = 1 + x0 + x1 + x2 >= 1 + x0 + x1 + x2 = [[add(_x0, app(_x1, _x2))]] [[reverse(add(_x0, _x1))]] = 2 + 2x0 + 2x1 > 1 + x0 + 2x1 = [[app(reverse(_x1), add(_x0, nil))]] We can thus remove the following rules: reverse(add(X, Y)) => app(reverse(Y), add(X, nil)) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): app(nil, X) >? X app(add(X, Y), Z) >? add(X, app(Y, Z)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: add = \y0y1.3 + y0 + y1 app = \y0y1.3 + y1 + 3y0 nil = 3 Using this interpretation, the requirements translate to: [[app(nil, _x0)]] = 12 + x0 > x0 = [[_x0]] [[app(add(_x0, _x1), _x2)]] = 12 + x2 + 3x0 + 3x1 > 6 + x0 + x2 + 3x1 = [[add(_x0, app(_x1, _x2))]] We can thus remove the following rules: app(nil, X) => X app(add(X, Y), Z) => add(X, app(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 +++ [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.