/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: 0 : [] --> b cons : [b * a] --> a double : [] --> a -> a inc : [] --> a -> a map : [b -> b] --> a -> a nil : [] --> a plus : [b] --> b -> b s : [b] --> b times : [b] --> b -> b Rules: plus(0) x => x plus(s(x)) y => s(plus(x) y) times(0) x => 0 times(s(x)) y => plus(times(x) y) y map(f) nil => nil map(f) cons(x, y) => cons(f x, map(f) y) inc => map(plus(s(0))) double => map(times(s(s(0)))) 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]): plus(0) X >? X plus(s(X)) Y >? s(plus(X) Y) times(0) X >? 0 times(s(X)) Y >? plus(times(X) Y) Y map(F) nil >? nil map(F) cons(X, Y) >? cons(F X, map(F) Y) inc >? map(plus(s(0))) double >? map(times(s(s(0)))) 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 = {@_{o -> o}, cons, double, inc, map, plus, s, times}, and the following precedence: double > inc > map > times > plus > s > cons > @_{o -> o} Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: @_{o -> o}(plus(_|_), X) >= X @_{o -> o}(plus(s(X)), Y) > s(@_{o -> o}(plus(X), Y)) @_{o -> o}(times(_|_), X) >= _|_ @_{o -> o}(times(s(X)), Y) > @_{o -> o}(plus(@_{o -> o}(times(X), Y)), Y) @_{o -> o}(map(F), _|_) >= _|_ @_{o -> o}(map(F), cons(X, Y)) > cons(@_{o -> o}(F, X), @_{o -> o}(map(F), Y)) inc >= map(plus(s(_|_))) double >= map(times(s(s(_|_)))) With these choices, we have: 1] @_{o -> o}(plus(_|_), X) >= X because [2], by (Star) 2] @_{o -> o}*(plus(_|_), X) >= X because [3], by (Select) 3] X >= X by (Meta) 4] @_{o -> o}(plus(s(X)), Y) > s(@_{o -> o}(plus(X), Y)) because [5], by definition 5] @_{o -> o}*(plus(s(X)), Y) >= s(@_{o -> o}(plus(X), Y)) because [6], by (Select) 6] plus(s(X)) @_{o -> o}*(plus(s(X)), Y) >= s(@_{o -> o}(plus(X), Y)) because [7] 7] plus*(s(X), @_{o -> o}*(plus(s(X)), Y)) >= s(@_{o -> o}(plus(X), Y)) because plus > s and [8], by (Copy) 8] plus*(s(X), @_{o -> o}*(plus(s(X)), Y)) >= @_{o -> o}(plus(X), Y) because plus > @_{o -> o}, [9] and [13], by (Copy) 9] plus*(s(X), @_{o -> o}*(plus(s(X)), Y)) >= plus(X) because plus in Mul and [10], by (Stat) 10] s(X) > X because [11], by definition 11] s*(X) >= X because [12], by (Select) 12] X >= X by (Meta) 13] plus*(s(X), @_{o -> o}*(plus(s(X)), Y)) >= Y because [14], by (Select) 14] @_{o -> o}*(plus(s(X)), Y) >= Y because [15], by (Select) 15] plus(s(X)) @_{o -> o}*(plus(s(X)), Y) >= Y because [16] 16] plus*(s(X), @_{o -> o}*(plus(s(X)), Y)) >= Y because [17], by (Select) 17] @_{o -> o}*(plus(s(X)), Y) >= Y because [18], by (Select) 18] Y >= Y by (Meta) 19] @_{o -> o}(times(_|_), X) >= _|_ by (Bot) 20] @_{o -> o}(times(s(X)), Y) > @_{o -> o}(plus(@_{o -> o}(times(X), Y)), Y) because [21], by definition 21] @_{o -> o}*(times(s(X)), Y) >= @_{o -> o}(plus(@_{o -> o}(times(X), Y)), Y) because [22], by (Select) 22] times(s(X)) @_{o -> o}*(times(s(X)), Y) >= @_{o -> o}(plus(@_{o -> o}(times(X), Y)), Y) because [23] 23] times*(s(X), @_{o -> o}*(times(s(X)), Y)) >= @_{o -> o}(plus(@_{o -> o}(times(X), Y)), Y) because times > @_{o -> o}, [24] and [33], by (Copy) 24] times*(s(X), @_{o -> o}*(times(s(X)), Y)) >= plus(@_{o -> o}(times(X), Y)) because times > plus and [25], by (Copy) 25] times*(s(X), @_{o -> o}*(times(s(X)), Y)) >= @_{o -> o}(times(X), Y) because [26], by (Select) 26] @_{o -> o}*(times(s(X)), Y) >= @_{o -> o}(times(X), Y) because @_{o -> o} in Mul, [27] and [32], by (Stat) 27] times(s(X)) > times(X) because [28], by definition 28] times*(s(X)) >= times(X) because times in Mul and [29], by (Stat) 29] s(X) > X because [30], by definition 30] s*(X) >= X because [31], by (Select) 31] X >= X by (Meta) 32] Y >= Y by (Meta) 33] times*(s(X), @_{o -> o}*(times(s(X)), Y)) >= Y because [34], by (Select) 34] @_{o -> o}*(times(s(X)), Y) >= Y because [32], by (Select) 35] @_{o -> o}(map(F), _|_) >= _|_ by (Bot) 36] @_{o -> o}(map(F), cons(X, Y)) > cons(@_{o -> o}(F, X), @_{o -> o}(map(F), Y)) because [37], by definition 37] @_{o -> o}*(map(F), cons(X, Y)) >= cons(@_{o -> o}(F, X), @_{o -> o}(map(F), Y)) because [38], by (Select) 38] map(F) @_{o -> o}*(map(F), cons(X, Y)) >= cons(@_{o -> o}(F, X), @_{o -> o}(map(F), Y)) because [39] 39] map*(F, @_{o -> o}*(map(F), cons(X, Y))) >= cons(@_{o -> o}(F, X), @_{o -> o}(map(F), Y)) because map > cons, [40] and [48], by (Copy) 40] map*(F, @_{o -> o}*(map(F), cons(X, Y))) >= @_{o -> o}(F, X) because map > @_{o -> o}, [41] and [43], by (Copy) 41] map*(F, @_{o -> o}*(map(F), cons(X, Y))) >= F because [42], by (Select) 42] F >= F by (Meta) 43] map*(F, @_{o -> o}*(map(F), cons(X, Y))) >= X because [44], by (Select) 44] @_{o -> o}*(map(F), cons(X, Y)) >= X because [45], by (Select) 45] cons(X, Y) >= X because [46], by (Star) 46] cons*(X, Y) >= X because [47], by (Select) 47] X >= X by (Meta) 48] map*(F, @_{o -> o}*(map(F), cons(X, Y))) >= @_{o -> o}(map(F), Y) because [49], by (Select) 49] @_{o -> o}*(map(F), cons(X, Y)) >= @_{o -> o}(map(F), Y) because @_{o -> o} in Mul, [50] and [52], by (Stat) 50] map(F) >= map(F) because map in Mul and [51], by (Fun) 51] F >= F by (Meta) 52] cons(X, Y) > Y because [53], by definition 53] cons*(X, Y) >= Y because [54], by (Select) 54] Y >= Y by (Meta) 55] inc >= map(plus(s(_|_))) because [56], by (Star) 56] inc* >= map(plus(s(_|_))) because inc > map and [57], by (Copy) 57] inc* >= plus(s(_|_)) because inc > plus and [58], by (Copy) 58] inc* >= s(_|_) because inc > s and [59], by (Copy) 59] inc* >= _|_ by (Bot) 60] double >= map(times(s(s(_|_)))) because [61], by (Star) 61] double* >= map(times(s(s(_|_)))) because double > map and [62], by (Copy) 62] double* >= times(s(s(_|_))) because double > times and [63], by (Copy) 63] double* >= s(s(_|_)) because double > s and [64], by (Copy) 64] double* >= s(_|_) because double > s and [65], by (Copy) 65] double* >= _|_ by (Bot) We can thus remove the following rules: plus(s(X)) Y => s(plus(X) Y) times(s(X)) Y => plus(times(X) Y) Y map(F) cons(X, Y) => cons(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]): plus(0) X >? X times(0) X >? 0 map(F) nil >? nil inc >? map(plus(s(0))) double >? map(times(s(s(0)))) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 double = \y0.3 + 3y0 inc = \y0.3 + 3y0 map = \G0y1.2G0(y1) nil = 3 plus = \y0y1.y0 s = \y0.y0 times = \y0y1.2y0 Using this interpretation, the requirements translate to: [[plus(0) _x0]] = x0 >= x0 = [[_x0]] [[times(0) _x0]] = x0 >= 0 = [[0]] [[map(_F0) nil]] = 3 + 2F0(3) >= 3 = [[nil]] [[inc]] = \y0.3 + 3y0 > \y0.0 = [[map(plus(s(0)))]] [[double]] = \y0.3 + 3y0 > \y0.0 = [[map(times(s(s(0))))]] We can thus remove the following rules: inc => map(plus(s(0))) double => map(times(s(s(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]): plus(0, X) >? X times(0, X) >? 0 map(F, nil) >? nil We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 map = \G0y1.3 + 3y1 + G0(0) nil = 0 plus = \y0y1.3 + y0 + y1 times = \y0y1.3 + y1 + 3y0 Using this interpretation, the requirements translate to: [[plus(0, _x0)]] = 3 + x0 > x0 = [[_x0]] [[times(0, _x0)]] = 3 + x0 > 0 = [[0]] [[map(_F0, nil)]] = 3 + F0(0) > 0 = [[nil]] We can thus remove the following rules: plus(0, X) => X times(0, X) => 0 map(F, nil) => nil 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.