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