/export/starexec/sandbox/solver/bin/starexec_run_FirstOrder /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/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 eq : [] --> o false : [] --> o fork : [] --> o if : [] --> o lt : [] --> o member : [] --> o null : [] --> o s : [] --> o true : [] --> o app(app(lt, app(s, X)), app(s, Y)) => app(app(lt, X), Y) app(app(lt, 0), app(s, X)) => true app(app(lt, X), 0) => false app(app(eq, X), X) => true app(app(eq, app(s, X)), 0) => false app(app(eq, 0), app(s, X)) => false app(app(member, X), null) => false app(app(member, X), app(app(app(fork, Y), Z), U)) => app(app(app(if, app(app(lt, X), Z)), app(app(member, X), Y)), app(app(app(if, app(app(eq, X), Z)), true), app(app(member, X), U))) 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, all): Dependency Pairs P_0: 0] app#(app(lt, app(s, X)), app(s, Y)) =#> app#(app(lt, X), Y) 1] app#(app(lt, app(s, X)), app(s, Y)) =#> app#(lt, X) 2] app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(app(if, app(app(lt, X), Z)), app(app(member, X), Y)), app(app(app(if, app(app(eq, X), Z)), true), app(app(member, X), U))) 3] app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(if, app(app(lt, X), Z)), app(app(member, X), Y)) 4] app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(if, app(app(lt, X), Z)) 5] app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(lt, X), Z) 6] app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(lt, X) 7] app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(member, X), Y) 8] app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(member, X) 9] app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(app(if, app(app(eq, X), Z)), true), app(app(member, X), U)) 10] app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(if, app(app(eq, X), Z)), true) 11] app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(if, app(app(eq, X), Z)) 12] app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(eq, X), Z) 13] app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(eq, X) 14] app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(member, X), U) 15] app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(member, X) Rules R_0: app(app(lt, app(s, X)), app(s, Y)) => app(app(lt, X), Y) app(app(lt, 0), app(s, X)) => true app(app(lt, X), 0) => false app(app(eq, X), X) => true app(app(eq, app(s, X)), 0) => false app(app(eq, 0), app(s, X)) => false app(app(member, X), null) => false app(app(member, X), app(app(app(fork, Y), Z), U)) => app(app(app(if, app(app(lt, X), Z)), app(app(member, X), Y)), app(app(app(if, app(app(eq, X), Z)), true), app(app(member, X), U))) Thus, the original system is terminating if (P_0, R_0, minimal, all) is finite. We consider the dependency pair problem (P_0, R_0, minimal, all). We place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: * 0 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * 1 : * 2 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * 3 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * 4 : * 5 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * 6 : * 7 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * 8 : * 9 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * 10 : * 11 : * 12 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * 13 : * 14 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * 15 : This graph has the following strongly connected components: P_1: app#(app(lt, app(s, X)), app(s, Y)) =#> app#(app(lt, X), Y) app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(app(if, app(app(lt, X), Z)), app(app(member, X), Y)), app(app(app(if, app(app(eq, X), Z)), true), app(app(member, X), U))) app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(if, app(app(lt, X), Z)), app(app(member, X), Y)) app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(lt, X), Z) app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(member, X), Y) app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(app(if, app(app(eq, X), Z)), true), app(app(member, X), U)) app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(eq, X), Z) app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(member, X), U) 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, all) is finite. We consider the dependency pair problem (P_1, R_0, minimal, all). We will use the reduction pair processor [Kop12, Thm. 7.16]. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: app#(app(lt, app(s, X)), app(s, Y)) >? app#(app(lt, X), Y) app#(app(member, X), app(app(app(fork, Y), Z), U)) >? app#(app(app(if, app(app(lt, X), Z)), app(app(member, X), Y)), app(app(app(if, app(app(eq, X), Z)), true), app(app(member, X), U))) app#(app(member, X), app(app(app(fork, Y), Z), U)) >? app#(app(if, app(app(lt, X), Z)), app(app(member, X), Y)) app#(app(member, X), app(app(app(fork, Y), Z), U)) >? app#(app(lt, X), Z) app#(app(member, X), app(app(app(fork, Y), Z), U)) >? app#(app(member, X), Y) app#(app(member, X), app(app(app(fork, Y), Z), U)) >? app#(app(app(if, app(app(eq, X), Z)), true), app(app(member, X), U)) app#(app(member, X), app(app(app(fork, Y), Z), U)) >? app#(app(eq, X), Z) app#(app(member, X), app(app(app(fork, Y), Z), U)) >? app#(app(member, X), U) app(app(lt, app(s, X)), app(s, Y)) >= app(app(lt, X), Y) app(app(lt, 0), app(s, X)) >= true app(app(lt, X), 0) >= false app(app(eq, X), X) >= true app(app(eq, app(s, X)), 0) >= false app(app(eq, 0), app(s, X)) >= false app(app(member, X), null) >= false app(app(member, X), app(app(app(fork, Y), Z), U)) >= app(app(app(if, app(app(lt, X), Z)), app(app(member, X), Y)), app(app(app(if, app(app(eq, X), Z)), true), app(app(member, X), U))) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 3 app = \y0y1.2y0 app# = \y0y1.y0 eq = 0 false = 0 fork = 3 if = 0 lt = 0 member = 1 null = 3 s = 3 true = 0 Using this interpretation, the requirements translate to: [[app#(app(lt, app(s, _x0)), app(s, _x1))]] = 0 >= 0 = [[app#(app(lt, _x0), _x1)]] [[app#(app(member, _x0), app(app(app(fork, _x1), _x2), _x3))]] = 2 > 0 = [[app#(app(app(if, app(app(lt, _x0), _x2)), app(app(member, _x0), _x1)), app(app(app(if, app(app(eq, _x0), _x2)), true), app(app(member, _x0), _x3)))]] [[app#(app(member, _x0), app(app(app(fork, _x1), _x2), _x3))]] = 2 > 0 = [[app#(app(if, app(app(lt, _x0), _x2)), app(app(member, _x0), _x1))]] [[app#(app(member, _x0), app(app(app(fork, _x1), _x2), _x3))]] = 2 > 0 = [[app#(app(lt, _x0), _x2)]] [[app#(app(member, _x0), app(app(app(fork, _x1), _x2), _x3))]] = 2 >= 2 = [[app#(app(member, _x0), _x1)]] [[app#(app(member, _x0), app(app(app(fork, _x1), _x2), _x3))]] = 2 > 0 = [[app#(app(app(if, app(app(eq, _x0), _x2)), true), app(app(member, _x0), _x3))]] [[app#(app(member, _x0), app(app(app(fork, _x1), _x2), _x3))]] = 2 > 0 = [[app#(app(eq, _x0), _x2)]] [[app#(app(member, _x0), app(app(app(fork, _x1), _x2), _x3))]] = 2 >= 2 = [[app#(app(member, _x0), _x3)]] [[app(app(lt, app(s, _x0)), app(s, _x1))]] = 0 >= 0 = [[app(app(lt, _x0), _x1)]] [[app(app(lt, 0), app(s, _x0))]] = 0 >= 0 = [[true]] [[app(app(lt, _x0), 0)]] = 0 >= 0 = [[false]] [[app(app(eq, _x0), _x0)]] = 0 >= 0 = [[true]] [[app(app(eq, app(s, _x0)), 0)]] = 0 >= 0 = [[false]] [[app(app(eq, 0), app(s, _x0))]] = 0 >= 0 = [[false]] [[app(app(member, _x0), null)]] = 4 >= 0 = [[false]] [[app(app(member, _x0), app(app(app(fork, _x1), _x2), _x3))]] = 4 >= 0 = [[app(app(app(if, app(app(lt, _x0), _x2)), app(app(member, _x0), _x1)), app(app(app(if, app(app(eq, _x0), _x2)), true), app(app(member, _x0), _x3)))]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_1, R_0, minimal, all) by (P_2, R_0, minimal, all), where P_2 consists of: app#(app(lt, app(s, X)), app(s, Y)) =#> app#(app(lt, X), Y) app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(member, X), Y) app#(app(member, X), app(app(app(fork, Y), Z), U)) =#> app#(app(member, X), U) Thus, the original system is terminating if (P_2, R_0, minimal, all) is finite. We consider the dependency pair problem (P_2, R_0, minimal, all). 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(lt, app(s, X)), app(s, Y))) = app(s, Y) |> Y = nu(app#(app(lt, X), Y)) nu(app#(app(member, X), app(app(app(fork, Y), Z), U))) = app(app(app(fork, Y), Z), U) |> Y = nu(app#(app(member, X), Y)) nu(app#(app(member, X), app(app(app(fork, Y), Z), U))) = app(app(app(fork, Y), Z), U) |> U = nu(app#(app(member, X), U)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_2, R_0, minimal, f) by ({}, R_0, minimal, f). 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.