/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 app : [o * o] --> o cons : [] --> o curry : [] --> o double : [] --> o inc : [] --> o map : [] --> o nil : [] --> o plus : [] --> o s : [] --> o times : [] --> o app(app(plus, 0), X) => X app(app(plus, app(s, X)), Y) => app(s, app(app(plus, X), Y)) app(app(times, 0), X) => 0 app(app(times, app(s, X)), Y) => app(app(plus, app(app(times, X), Y)), Y) app(app(app(curry, X), Y), Z) => app(app(X, Y), Z) app(app(map, X), nil) => nil app(app(map, X), app(app(cons, Y), Z)) => app(app(cons, app(X, Y)), app(app(map, X), Z)) inc => app(map, app(app(curry, plus), app(s, 0))) double => app(map, app(app(curry, times), app(s, app(s, 0)))) We use the dependency pair framework as described in [Kop12, Ch. 6/7], with static dependency pairs (see [KusIsoSakBla09] and the adaptation for AFSMs in [Kop12, Ch. 7.8]). We thus obtain the following dependency pair problem (P_0, R_0, minimal, formative): Dependency Pairs P_0: 0] app#(app(plus, app(s, X)), Y) =#> app#(s, app(app(plus, X), Y)) 1] app#(app(plus, app(s, X)), Y) =#> app#(app(plus, X), Y) 2] app#(app(plus, app(s, X)), Y) =#> app#(plus, X) 3] app#(app(times, app(s, X)), Y) =#> app#(app(plus, app(app(times, X), Y)), Y) 4] app#(app(times, app(s, X)), Y) =#> app#(plus, app(app(times, X), Y)) 5] app#(app(times, app(s, X)), Y) =#> app#(app(times, X), Y) 6] app#(app(times, app(s, X)), Y) =#> app#(times, X) 7] app#(app(app(curry, X), Y), Z) =#> app#(app(X, Y), Z) 8] app#(app(app(curry, X), Y), Z) =#> app#(X, Y) 9] app#(app(map, X), app(app(cons, Y), Z)) =#> app#(app(cons, app(X, Y)), app(app(map, X), Z)) 10] app#(app(map, X), app(app(cons, Y), Z)) =#> app#(cons, app(X, Y)) 11] app#(app(map, X), app(app(cons, Y), Z)) =#> app#(X, Y) 12] app#(app(map, X), app(app(cons, Y), Z)) =#> app#(app(map, X), Z) 13] app#(app(map, X), app(app(cons, Y), Z)) =#> app#(map, X) 14] inc# =#> app#(map, app(app(curry, plus), app(s, 0))) 15] inc# =#> app#(app(curry, plus), app(s, 0)) 16] inc# =#> app#(curry, plus) 17] inc# =#> app#(s, 0) 18] double# =#> app#(map, app(app(curry, times), app(s, app(s, 0)))) 19] double# =#> app#(app(curry, times), app(s, app(s, 0))) 20] double# =#> app#(curry, times) 21] double# =#> app#(s, app(s, 0)) 22] double# =#> app#(s, 0) Rules R_0: app(app(plus, 0), X) => X app(app(plus, app(s, X)), Y) => app(s, app(app(plus, X), Y)) app(app(times, 0), X) => 0 app(app(times, app(s, X)), Y) => app(app(plus, app(app(times, X), Y)), Y) app(app(app(curry, X), Y), Z) => app(app(X, Y), Z) app(app(map, X), nil) => nil app(app(map, X), app(app(cons, Y), Z)) => app(app(cons, app(X, Y)), app(app(map, X), Z)) inc => app(map, app(app(curry, plus), app(s, 0))) double => app(map, app(app(curry, times), app(s, app(s, 0)))) Thus, the original system is terminating if (P_0, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_0, R_0, minimal, formative). We place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: * 0 : * 1 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 * 2 : * 3 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 * 4 : * 5 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 * 6 : * 7 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 * 8 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 * 9 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 * 10 : * 11 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 * 12 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 * 13 : * 14 : * 15 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 * 16 : * 17 : * 18 : * 19 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 * 20 : * 21 : * 22 : This graph has the following strongly connected components: P_1: app#(app(plus, app(s, X)), Y) =#> app#(app(plus, X), Y) app#(app(times, app(s, X)), Y) =#> app#(app(plus, app(app(times, X), Y)), Y) app#(app(times, app(s, X)), Y) =#> app#(app(times, X), Y) app#(app(app(curry, X), Y), Z) =#> app#(app(X, Y), Z) app#(app(app(curry, X), Y), Z) =#> app#(X, Y) app#(app(map, X), app(app(cons, Y), Z)) =#> app#(app(cons, app(X, Y)), app(app(map, X), Z)) app#(app(map, X), app(app(cons, Y), Z)) =#> app#(X, Y) app#(app(map, X), app(app(cons, Y), Z)) =#> app#(app(map, X), Z) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_0, R_0, m, f) by (P_1, R_0, m, f). Thus, the original system is terminating if (P_1, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_1, R_0, minimal, formative). The formative rules of (P_1, R_0) are R_1 ::= app(app(plus, 0), X) => X app(app(plus, app(s, X)), Y) => app(s, app(app(plus, X), Y)) app(app(times, 0), X) => 0 app(app(times, app(s, X)), Y) => app(app(plus, app(app(times, X), Y)), Y) app(app(app(curry, X), Y), Z) => app(app(X, Y), Z) app(app(map, X), app(app(cons, Y), Z)) => app(app(cons, app(X, Y)), app(app(map, X), Z)) inc => app(map, app(app(curry, plus), app(s, 0))) double => app(map, app(app(curry, times), app(s, app(s, 0)))) By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_1, R_0, minimal, formative) by (P_1, R_1, minimal, formative). Thus, the original system is terminating if (P_1, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_1, R_1, minimal, formative). We will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. The usable rules of (P_1, R_1) are: app(app(plus, 0), X) => X app(app(plus, app(s, X)), Y) => app(s, app(app(plus, X), Y)) app(app(times, 0), X) => 0 app(app(times, app(s, X)), Y) => app(app(plus, app(app(times, X), Y)), Y) app(app(app(curry, X), Y), Z) => app(app(X, Y), Z) app(app(map, X), app(app(cons, Y), Z)) => app(app(cons, app(X, Y)), app(app(map, X), Z)) It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: app#(app(plus, app(s, X)), Y) >? app#(app(plus, X), Y) app#(app(times, app(s, X)), Y) >? app#(app(plus, app(app(times, X), Y)), Y) app#(app(times, app(s, X)), Y) >? app#(app(times, X), Y) app#(app(app(curry, X), Y), Z) >? app#(app(X, Y), Z) app#(app(app(curry, X), Y), Z) >? app#(X, Y) app#(app(map, X), app(app(cons, Y), Z)) >? app#(app(cons, app(X, Y)), app(app(map, X), Z)) app#(app(map, X), app(app(cons, Y), Z)) >? app#(X, Y) app#(app(map, X), app(app(cons, Y), Z)) >? app#(app(map, X), Z) app(app(plus, 0), X) >= X app(app(plus, app(s, X)), Y) >= app(s, app(app(plus, X), Y)) app(app(times, 0), X) >= 0 app(app(times, app(s, X)), Y) >= app(app(plus, app(app(times, X), Y)), Y) app(app(app(curry, X), Y), Z) >= app(app(X, Y), Z) app(app(map, X), app(app(cons, Y), Z)) >= app(app(cons, app(X, Y)), app(app(map, X), Z)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 app = \y0y1.1 + y0 + 2y0y1 app# = \y0y1.y0 cons = 0 curry = 3 map = 2 plus = 0 s = 0 times = 0 Using this interpretation, the requirements translate to: [[app#(app(plus, app(s, _x0)), _x1)]] = 1 >= 1 = [[app#(app(plus, _x0), _x1)]] [[app#(app(times, app(s, _x0)), _x1)]] = 1 >= 1 = [[app#(app(plus, app(app(times, _x0), _x1)), _x1)]] [[app#(app(times, app(s, _x0)), _x1)]] = 1 >= 1 = [[app#(app(times, _x0), _x1)]] [[app#(app(app(curry, _x0), _x1), _x2)]] = 5 + 6x0 + 8x1 + 12x0x1 > 1 + x0 + 2x0x1 = [[app#(app(_x0, _x1), _x2)]] [[app#(app(app(curry, _x0), _x1), _x2)]] = 5 + 6x0 + 8x1 + 12x0x1 > x0 = [[app#(_x0, _x1)]] [[app#(app(map, _x0), app(app(cons, _x1), _x2))]] = 3 + 4x0 > 1 = [[app#(app(cons, app(_x0, _x1)), app(app(map, _x0), _x2))]] [[app#(app(map, _x0), app(app(cons, _x1), _x2))]] = 3 + 4x0 > x0 = [[app#(_x0, _x1)]] [[app#(app(map, _x0), app(app(cons, _x1), _x2))]] = 3 + 4x0 >= 3 + 4x0 = [[app#(app(map, _x0), _x2)]] [[app(app(plus, 0), _x0)]] = 2 + 2x0 >= x0 = [[_x0]] [[app(app(plus, app(s, _x0)), _x1)]] = 2 + 2x1 >= 1 = [[app(s, app(app(plus, _x0), _x1))]] [[app(app(times, 0), _x0)]] = 2 + 2x0 >= 0 = [[0]] [[app(app(times, app(s, _x0)), _x1)]] = 2 + 2x1 >= 2 + 2x1 = [[app(app(plus, app(app(times, _x0), _x1)), _x1)]] [[app(app(app(curry, _x0), _x1), _x2)]] = 6 + 6x0 + 8x1 + 10x2 + 12x0x1 + 12x0x2 + 16x1x2 + 24x0x1x2 >= 2 + x0 + 2x0x1 + 2x0x2 + 2x2 + 4x0x1x2 = [[app(app(_x0, _x1), _x2)]] [[app(app(map, _x0), app(app(cons, _x1), _x2))]] = 16 + 12x2 + 16x0x2 + 20x0 >= 10 + 8x0 + 12x2 + 16x0x2 = [[app(app(cons, app(_x0, _x1)), app(app(map, _x0), _x2))]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_1, R_1, minimal, formative) by (P_2, R_1, minimal, formative), where P_2 consists of: app#(app(plus, app(s, X)), Y) =#> app#(app(plus, X), Y) app#(app(times, app(s, X)), Y) =#> app#(app(plus, app(app(times, X), Y)), Y) app#(app(times, app(s, X)), Y) =#> app#(app(times, X), Y) app#(app(map, X), app(app(cons, Y), Z)) =#> app#(app(map, X), Z) Thus, the original system is terminating if (P_2, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_2, R_1, minimal, formative). We apply the subterm criterion with the following projection function: nu(app#) = 2 Thus, we can orient the dependency pairs as follows: nu(app#(app(plus, app(s, X)), Y)) = Y = Y = nu(app#(app(plus, X), Y)) nu(app#(app(times, app(s, X)), Y)) = Y = Y = nu(app#(app(plus, app(app(times, X), Y)), Y)) nu(app#(app(times, app(s, X)), Y)) = Y = Y = nu(app#(app(times, X), Y)) nu(app#(app(map, X), app(app(cons, Y), Z))) = app(app(cons, Y), Z) |> Z = nu(app#(app(map, X), Z)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_2, R_1, minimal, f) by (P_3, R_1, minimal, f), where P_3 contains: app#(app(plus, app(s, X)), Y) =#> app#(app(plus, X), Y) app#(app(times, app(s, X)), Y) =#> app#(app(plus, app(app(times, X), Y)), Y) app#(app(times, app(s, X)), Y) =#> app#(app(times, X), Y) Thus, the original system is terminating if (P_3, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_3, R_1, minimal, formative). We will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. The usable rules of (P_3, R_1) are: app(app(plus, 0), X) => X app(app(plus, app(s, X)), Y) => app(s, app(app(plus, X), Y)) app(app(times, 0), X) => 0 app(app(times, app(s, X)), Y) => app(app(plus, app(app(times, X), Y)), Y) app(app(app(curry, X), Y), Z) => app(app(X, Y), Z) app(app(map, X), app(app(cons, Y), Z)) => app(app(cons, app(X, Y)), app(app(map, X), Z)) It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: app#(app(plus, app(s, X)), Y) >? app#(app(plus, X), Y) app#(app(times, app(s, X)), Y) >? app#(app(plus, app(app(times, X), Y)), Y) app#(app(times, app(s, X)), Y) >? app#(app(times, X), Y) app(app(plus, 0), X) >= X app(app(plus, app(s, X)), Y) >= app(s, app(app(plus, X), Y)) app(app(times, 0), X) >= 0 app(app(times, app(s, X)), Y) >= app(app(plus, app(app(times, X), Y)), Y) app(app(app(curry, X), Y), Z) >= app(app(X, Y), Z) app(app(map, X), app(app(cons, Y), Z)) >= app(app(cons, app(X, Y)), app(app(map, X), Z)) We orient these requirements with a polynomial interpretation in the natural numbers. We consider usable_rules with respect to the following argument filtering: app(x_1,x_2) = app(x_1) This leaves the following ordering requirements: app#(app(plus, app(s, X)), Y) >= app#(app(plus, X), Y) app#(app(times, app(s, X)), Y) > app#(app(plus, app(app(times, X), Y)), Y) app#(app(times, app(s, X)), Y) >= app#(app(times, X), Y) The following interpretation satisfies the requirements: 0 = 0 app = \y0y1.y0 app# = \y0y1.2y0 cons = 0 curry = 0 map = 0 plus = 0 s = 0 times = 1 Using this interpretation, the requirements translate to: [[app#(app(plus, app(s, _x0)), _x1)]] = 0 >= 0 = [[app#(app(plus, _x0), _x1)]] [[app#(app(times, app(s, _x0)), _x1)]] = 2 > 0 = [[app#(app(plus, app(app(times, _x0), _x1)), _x1)]] [[app#(app(times, app(s, _x0)), _x1)]] = 2 >= 2 = [[app#(app(times, _x0), _x1)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_3, R_1, minimal, formative) by (P_4, R_1, minimal, formative), where P_4 consists of: app#(app(plus, app(s, X)), Y) =#> app#(app(plus, X), Y) app#(app(times, app(s, X)), Y) =#> app#(app(times, X), Y) Thus, the original system is terminating if (P_4, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_4, R_1, minimal, formative). We will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. The usable rules of (P_4, R_1) are: app(app(plus, 0), X) => X app(app(plus, app(s, X)), Y) => app(s, app(app(plus, X), Y)) app(app(times, 0), X) => 0 app(app(times, app(s, X)), Y) => app(app(plus, app(app(times, X), Y)), Y) app(app(app(curry, X), Y), Z) => app(app(X, Y), Z) app(app(map, X), app(app(cons, Y), Z)) => app(app(cons, app(X, Y)), app(app(map, X), Z)) It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: app#(app(plus, app(s, X)), Y) >? app#(app(plus, X), Y) app#(app(times, app(s, X)), Y) >? app#(app(times, X), Y) app(app(plus, 0), X) >= X app(app(plus, app(s, X)), Y) >= app(s, app(app(plus, X), Y)) app(app(times, 0), X) >= 0 app(app(times, app(s, X)), Y) >= app(app(plus, app(app(times, X), Y)), Y) app(app(app(curry, X), Y), Z) >= app(app(X, Y), Z) app(app(map, X), app(app(cons, Y), Z)) >= app(app(cons, app(X, Y)), app(app(map, X), Z)) We orient these requirements with a polynomial interpretation in the natural numbers. We consider usable_rules with respect to the following argument filtering: This leaves the following ordering requirements: app#(app(plus, app(s, X)), Y) > app#(app(plus, X), Y) app#(app(times, app(s, X)), Y) >= app#(app(times, X), Y) The following interpretation satisfies the requirements: 0 = 0 app = \y0y1.2 + 2y1 app# = \y0y1.2y0 cons = 0 curry = 0 map = 0 plus = 0 s = 0 times = 0 Using this interpretation, the requirements translate to: [[app#(app(plus, app(s, _x0)), _x1)]] = 12 + 8x0 > 4 + 4x0 = [[app#(app(plus, _x0), _x1)]] [[app#(app(times, app(s, _x0)), _x1)]] = 12 + 8x0 > 4 + 4x0 = [[app#(app(times, _x0), _x1)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_4, R_1) by ({}, R_1). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. As all dependency pair problems were succesfully simplified with sound (and complete) processors until nothing remained, we conclude termination. +++ Citations +++ [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. [KusIsoSakBla09] K. Kusakari, Y. Isogai, M. Sakai, and F. Blanqui. Static Dependency Pair Method Based On Strong Computability for Higher-Order Rewrite Systems. In volume 92(10) of IEICE Transactions on Information and Systems. 2007--2015, 2009.