/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. 0 : [] --> o add : [o * o] --> o cons : [o] --> o dbl : [o] --> o first : [o * o] --> o nil : [] --> o recip : [o] --> o s : [o] --> o sqr : [o] --> o terms : [o] --> o terms(X) => cons(recip(sqr(X))) sqr(0) => 0 sqr(s(X)) => s(add(sqr(X), dbl(X))) dbl(0) => 0 dbl(s(X)) => s(s(dbl(X))) add(0, X) => X add(s(X), Y) => s(add(X, Y)) first(0, X) => nil first(s(X), cons(Y)) => cons(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]): terms(X) >? cons(recip(sqr(X))) sqr(0) >? 0 sqr(s(X)) >? s(add(sqr(X), dbl(X))) dbl(0) >? 0 dbl(s(X)) >? s(s(dbl(X))) add(0, X) >? X add(s(X), Y) >? s(add(X, Y)) first(0, X) >? nil first(s(X), cons(Y)) >? cons(Y) about to try horpo We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[0]] = _|_ [[nil]] = _|_ We choose Lex = {} and Mul = {add, cons, dbl, first, recip, s, sqr, terms}, and the following precedence: terms > cons = first > recip > dbl = sqr > add > s Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: terms(X) >= cons(recip(sqr(X))) sqr(_|_) >= _|_ sqr(s(X)) >= s(add(sqr(X), dbl(X))) dbl(_|_) >= _|_ dbl(s(X)) >= s(s(dbl(X))) add(_|_, X) >= X add(s(X), Y) > s(add(X, Y)) first(_|_, X) >= _|_ first(s(X), cons(Y)) >= cons(Y) With these choices, we have: 1] terms(X) >= cons(recip(sqr(X))) because [2], by (Star) 2] terms*(X) >= cons(recip(sqr(X))) because terms > cons and [3], by (Copy) 3] terms*(X) >= recip(sqr(X)) because terms > recip and [4], by (Copy) 4] terms*(X) >= sqr(X) because terms > sqr and [5], by (Copy) 5] terms*(X) >= X because [6], by (Select) 6] X >= X by (Meta) 7] sqr(_|_) >= _|_ by (Bot) 8] sqr(s(X)) >= s(add(sqr(X), dbl(X))) because [9], by (Star) 9] sqr*(s(X)) >= s(add(sqr(X), dbl(X))) because sqr > s and [10], by (Copy) 10] sqr*(s(X)) >= add(sqr(X), dbl(X)) because sqr > add, [11] and [15], by (Copy) 11] sqr*(s(X)) >= sqr(X) because sqr in Mul and [12], by (Stat) 12] s(X) > X because [13], by definition 13] s*(X) >= X because [14], by (Select) 14] X >= X by (Meta) 15] sqr*(s(X)) >= dbl(X) because sqr = dbl, sqr in Mul and [12], by (Stat) 16] dbl(_|_) >= _|_ by (Bot) 17] dbl(s(X)) >= s(s(dbl(X))) because [18], by (Star) 18] dbl*(s(X)) >= s(s(dbl(X))) because dbl > s and [19], by (Copy) 19] dbl*(s(X)) >= s(dbl(X)) because dbl > s and [20], by (Copy) 20] dbl*(s(X)) >= dbl(X) because dbl in Mul and [12], by (Stat) 21] add(_|_, X) >= X because [22], by (Star) 22] add*(_|_, X) >= X because [14], by (Select) 23] add(s(X), Y) > s(add(X, Y)) because [24], by definition 24] add*(s(X), Y) >= s(add(X, Y)) because add > s and [25], by (Copy) 25] add*(s(X), Y) >= add(X, Y) because add in Mul, [12] and [26], by (Stat) 26] Y >= Y by (Meta) 27] first(_|_, X) >= _|_ by (Bot) 28] first(s(X), cons(Y)) >= cons(Y) because [29], by (Star) 29] first*(s(X), cons(Y)) >= cons(Y) because first = cons, first in Mul and [30], by (Stat) 30] cons(Y) >= Y because [31], by (Star) 31] cons*(Y) >= Y because [26], by (Select) We can thus remove the following rules: add(s(X), Y) => s(add(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]): terms(X) >? cons(recip(sqr(X))) sqr(0) >? 0 sqr(s(X)) >? s(add(sqr(X), dbl(X))) dbl(0) >? 0 dbl(s(X)) >? s(s(dbl(X))) add(0, X) >? X first(0, X) >? nil first(s(X), cons(Y)) >? cons(Y) about to try horpo We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[0]] = _|_ [[nil]] = _|_ [[recip(x_1)]] = x_1 We choose Lex = {} and Mul = {add, cons, dbl, first, s, sqr, terms}, and the following precedence: terms > cons = first > sqr > add > dbl > s Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: terms(X) > cons(sqr(X)) sqr(_|_) >= _|_ sqr(s(X)) > s(add(sqr(X), dbl(X))) dbl(_|_) >= _|_ dbl(s(X)) > s(s(dbl(X))) add(_|_, X) >= X first(_|_, X) >= _|_ first(s(X), cons(Y)) >= cons(Y) With these choices, we have: 1] terms(X) > cons(sqr(X)) because [2], by definition 2] terms*(X) >= cons(sqr(X)) because terms > cons and [3], by (Copy) 3] terms*(X) >= sqr(X) because terms > sqr and [4], by (Copy) 4] terms*(X) >= X because [5], by (Select) 5] X >= X by (Meta) 6] sqr(_|_) >= _|_ by (Bot) 7] sqr(s(X)) > s(add(sqr(X), dbl(X))) because [8], by definition 8] sqr*(s(X)) >= s(add(sqr(X), dbl(X))) because sqr > s and [9], by (Copy) 9] sqr*(s(X)) >= add(sqr(X), dbl(X)) because sqr > add, [10] and [14], by (Copy) 10] sqr*(s(X)) >= sqr(X) because sqr in Mul and [11], by (Stat) 11] s(X) > X because [12], by definition 12] s*(X) >= X because [13], by (Select) 13] X >= X by (Meta) 14] sqr*(s(X)) >= dbl(X) because sqr > dbl and [15], by (Copy) 15] sqr*(s(X)) >= X because [16], by (Select) 16] s(X) >= X because [12], by (Star) 17] dbl(_|_) >= _|_ by (Bot) 18] dbl(s(X)) > s(s(dbl(X))) because [19], by definition 19] dbl*(s(X)) >= s(s(dbl(X))) because dbl > s and [20], by (Copy) 20] dbl*(s(X)) >= s(dbl(X)) because dbl > s and [21], by (Copy) 21] dbl*(s(X)) >= dbl(X) because dbl in Mul and [11], by (Stat) 22] add(_|_, X) >= X because [23], by (Star) 23] add*(_|_, X) >= X because [13], by (Select) 24] first(_|_, X) >= _|_ by (Bot) 25] first(s(X), cons(Y)) >= cons(Y) because [26], by (Star) 26] first*(s(X), cons(Y)) >= cons(Y) because first = cons, first in Mul and [27], by (Stat) 27] cons(Y) >= Y because [28], by (Star) 28] cons*(Y) >= Y because [29], by (Select) 29] Y >= Y by (Meta) We can thus remove the following rules: terms(X) => cons(recip(sqr(X))) sqr(s(X)) => s(add(sqr(X), dbl(X))) dbl(s(X)) => s(s(dbl(X))) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): sqr(0) >? 0 dbl(0) >? 0 add(0, X) >? X first(0, X) >? nil first(s(X), cons(Y)) >? cons(Y) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 add = \y0y1.3 + y0 + y1 cons = \y0.y0 dbl = \y0.3 + 3y0 first = \y0y1.3 + 3y0 + 3y1 nil = 0 s = \y0.3 + y0 sqr = \y0.3 + 3y0 Using this interpretation, the requirements translate to: [[sqr(0)]] = 3 > 0 = [[0]] [[dbl(0)]] = 3 > 0 = [[0]] [[add(0, _x0)]] = 3 + x0 > x0 = [[_x0]] [[first(0, _x0)]] = 3 + 3x0 > 0 = [[nil]] [[first(s(_x0), cons(_x1))]] = 12 + 3x0 + 3x1 > x1 = [[cons(_x1)]] We can thus remove the following rules: sqr(0) => 0 dbl(0) => 0 add(0, X) => X first(0, X) => nil first(s(X), cons(Y)) => cons(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.