/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 a!6220!6220div : [o * o] --> o a!6220!6220geq : [o * o] --> o a!6220!6220if : [o * o * o] --> o a!6220!6220minus : [o * o] --> o div : [o * o] --> o false : [] --> o geq : [o * o] --> o if : [o * o * o] --> o mark : [o] --> o minus : [o * o] --> o s : [o] --> o true : [] --> o a!6220!6220minus(0, X) => 0 a!6220!6220minus(s(X), s(Y)) => a!6220!6220minus(X, Y) a!6220!6220geq(X, 0) => true a!6220!6220geq(0, s(X)) => false a!6220!6220geq(s(X), s(Y)) => a!6220!6220geq(X, Y) a!6220!6220div(0, s(X)) => 0 a!6220!6220div(s(X), s(Y)) => a!6220!6220if(a!6220!6220geq(X, Y), s(div(minus(X, Y), s(Y))), 0) a!6220!6220if(true, X, Y) => mark(X) a!6220!6220if(false, X, Y) => mark(Y) mark(minus(X, Y)) => a!6220!6220minus(X, Y) mark(geq(X, Y)) => a!6220!6220geq(X, Y) mark(div(X, Y)) => a!6220!6220div(mark(X), Y) mark(if(X, Y, Z)) => a!6220!6220if(mark(X), Y, Z) mark(0) => 0 mark(s(X)) => s(mark(X)) mark(true) => true mark(false) => false a!6220!6220minus(X, Y) => minus(X, Y) a!6220!6220geq(X, Y) => geq(X, Y) a!6220!6220div(X, Y) => div(X, Y) a!6220!6220if(X, Y, Z) => if(X, Y, Z) 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] a!6220!6220minus#(s(X), s(Y)) =#> a!6220!6220minus#(X, Y) 1] a!6220!6220geq#(s(X), s(Y)) =#> a!6220!6220geq#(X, Y) 2] a!6220!6220div#(s(X), s(Y)) =#> a!6220!6220if#(a!6220!6220geq(X, Y), s(div(minus(X, Y), s(Y))), 0) 3] a!6220!6220div#(s(X), s(Y)) =#> a!6220!6220geq#(X, Y) 4] a!6220!6220if#(true, X, Y) =#> mark#(X) 5] a!6220!6220if#(false, X, Y) =#> mark#(Y) 6] mark#(minus(X, Y)) =#> a!6220!6220minus#(X, Y) 7] mark#(geq(X, Y)) =#> a!6220!6220geq#(X, Y) 8] mark#(div(X, Y)) =#> a!6220!6220div#(mark(X), Y) 9] mark#(div(X, Y)) =#> mark#(X) 10] mark#(if(X, Y, Z)) =#> a!6220!6220if#(mark(X), Y, Z) 11] mark#(if(X, Y, Z)) =#> mark#(X) 12] mark#(s(X)) =#> mark#(X) Rules R_0: a!6220!6220minus(0, X) => 0 a!6220!6220minus(s(X), s(Y)) => a!6220!6220minus(X, Y) a!6220!6220geq(X, 0) => true a!6220!6220geq(0, s(X)) => false a!6220!6220geq(s(X), s(Y)) => a!6220!6220geq(X, Y) a!6220!6220div(0, s(X)) => 0 a!6220!6220div(s(X), s(Y)) => a!6220!6220if(a!6220!6220geq(X, Y), s(div(minus(X, Y), s(Y))), 0) a!6220!6220if(true, X, Y) => mark(X) a!6220!6220if(false, X, Y) => mark(Y) mark(minus(X, Y)) => a!6220!6220minus(X, Y) mark(geq(X, Y)) => a!6220!6220geq(X, Y) mark(div(X, Y)) => a!6220!6220div(mark(X), Y) mark(if(X, Y, Z)) => a!6220!6220if(mark(X), Y, Z) mark(0) => 0 mark(s(X)) => s(mark(X)) mark(true) => true mark(false) => false a!6220!6220minus(X, Y) => minus(X, Y) a!6220!6220geq(X, Y) => geq(X, Y) a!6220!6220div(X, Y) => div(X, Y) a!6220!6220if(X, Y, Z) => if(X, Y, Z) 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 : 0 * 1 : 1 * 2 : 4, 5 * 3 : 1 * 4 : 6, 7, 8, 9, 10, 11, 12 * 5 : 6, 7, 8, 9, 10, 11, 12 * 6 : 0 * 7 : 1 * 8 : 2, 3 * 9 : 6, 7, 8, 9, 10, 11, 12 * 10 : 4, 5 * 11 : 6, 7, 8, 9, 10, 11, 12 * 12 : 6, 7, 8, 9, 10, 11, 12 This graph has the following strongly connected components: P_1: a!6220!6220minus#(s(X), s(Y)) =#> a!6220!6220minus#(X, Y) P_2: a!6220!6220geq#(s(X), s(Y)) =#> a!6220!6220geq#(X, Y) P_3: a!6220!6220div#(s(X), s(Y)) =#> a!6220!6220if#(a!6220!6220geq(X, Y), s(div(minus(X, Y), s(Y))), 0) a!6220!6220if#(true, X, Y) =#> mark#(X) a!6220!6220if#(false, X, Y) =#> mark#(Y) mark#(div(X, Y)) =#> a!6220!6220div#(mark(X), Y) mark#(div(X, Y)) =#> mark#(X) mark#(if(X, Y, Z)) =#> a!6220!6220if#(mark(X), Y, Z) mark#(if(X, Y, Z)) =#> mark#(X) mark#(s(X)) =#> mark#(X) 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), (P_2, R_0, m, f) and (P_3, R_0, m, f). Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative) and (P_3, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_3, R_0, minimal, formative). 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: a!6220!6220div#(s(X), s(Y)) >? a!6220!6220if#(a!6220!6220geq(X, Y), s(div(minus(X, Y), s(Y))), 0) a!6220!6220if#(true, X, Y) >? mark#(X) a!6220!6220if#(false, X, Y) >? mark#(Y) mark#(div(X, Y)) >? a!6220!6220div#(mark(X), Y) mark#(div(X, Y)) >? mark#(X) mark#(if(X, Y, Z)) >? a!6220!6220if#(mark(X), Y, Z) mark#(if(X, Y, Z)) >? mark#(X) mark#(s(X)) >? mark#(X) a!6220!6220minus(0, X) >= 0 a!6220!6220minus(s(X), s(Y)) >= a!6220!6220minus(X, Y) a!6220!6220geq(X, 0) >= true a!6220!6220geq(0, s(X)) >= false a!6220!6220geq(s(X), s(Y)) >= a!6220!6220geq(X, Y) a!6220!6220div(0, s(X)) >= 0 a!6220!6220div(s(X), s(Y)) >= a!6220!6220if(a!6220!6220geq(X, Y), s(div(minus(X, Y), s(Y))), 0) a!6220!6220if(true, X, Y) >= mark(X) a!6220!6220if(false, X, Y) >= mark(Y) mark(minus(X, Y)) >= a!6220!6220minus(X, Y) mark(geq(X, Y)) >= a!6220!6220geq(X, Y) mark(div(X, Y)) >= a!6220!6220div(mark(X), Y) mark(if(X, Y, Z)) >= a!6220!6220if(mark(X), Y, Z) mark(0) >= 0 mark(s(X)) >= s(mark(X)) mark(true) >= true mark(false) >= false a!6220!6220minus(X, Y) >= minus(X, Y) a!6220!6220geq(X, Y) >= geq(X, Y) a!6220!6220div(X, Y) >= div(X, Y) a!6220!6220if(X, Y, Z) >= if(X, Y, Z) We orient these requirements with a polynomial interpretation in the natural numbers. We consider usable_rules with respect to the following argument filtering: a!6220!6220div#(x_1,x_2) = a!6220!6220div#(x_2) a!6220!6220if#(x_1,x_2,x_3) = a!6220!6220if#(x_2x_3) This leaves the following ordering requirements: a!6220!6220div#(s(X), s(Y)) >= a!6220!6220if#(a!6220!6220geq(X, Y), s(div(minus(X, Y), s(Y))), 0) a!6220!6220if#(true, X, Y) >= mark#(X) a!6220!6220if#(false, X, Y) >= mark#(Y) mark#(div(X, Y)) >= a!6220!6220div#(mark(X), Y) mark#(div(X, Y)) >= mark#(X) mark#(if(X, Y, Z)) >= a!6220!6220if#(mark(X), Y, Z) mark#(if(X, Y, Z)) > mark#(X) mark#(s(X)) >= mark#(X) The following interpretation satisfies the requirements: 0 = 0 a!6220!6220div = \y0y1.0 a!6220!6220div# = \y0y1.0 a!6220!6220geq = \y0y1.0 a!6220!6220if = \y0y1y2.0 a!6220!6220if# = \y0y1y2.2y1 + 2y2 a!6220!6220minus = \y0y1.0 div = \y0y1.2y0 false = 0 geq = \y0y1.0 if = \y0y1y2.1 + y0 + y2 + 2y1 mark = \y0.0 mark# = \y0.2y0 minus = \y0y1.0 s = \y0.2y0 true = 0 Using this interpretation, the requirements translate to: [[a!6220!6220div#(s(_x0), s(_x1))]] = 0 >= 0 = [[a!6220!6220if#(a!6220!6220geq(_x0, _x1), s(div(minus(_x0, _x1), s(_x1))), 0)]] [[a!6220!6220if#(true, _x0, _x1)]] = 2x0 + 2x1 >= 2x0 = [[mark#(_x0)]] [[a!6220!6220if#(false, _x0, _x1)]] = 2x0 + 2x1 >= 2x1 = [[mark#(_x1)]] [[mark#(div(_x0, _x1))]] = 4x0 >= 0 = [[a!6220!6220div#(mark(_x0), _x1)]] [[mark#(div(_x0, _x1))]] = 4x0 >= 2x0 = [[mark#(_x0)]] [[mark#(if(_x0, _x1, _x2))]] = 2 + 2x0 + 2x2 + 4x1 > 2x1 + 2x2 = [[a!6220!6220if#(mark(_x0), _x1, _x2)]] [[mark#(if(_x0, _x1, _x2))]] = 2 + 2x0 + 2x2 + 4x1 > 2x0 = [[mark#(_x0)]] [[mark#(s(_x0))]] = 4x0 >= 2x0 = [[mark#(_x0)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_3, R_0, minimal, formative) by (P_4, R_0, minimal, formative), where P_4 consists of: a!6220!6220div#(s(X), s(Y)) =#> a!6220!6220if#(a!6220!6220geq(X, Y), s(div(minus(X, Y), s(Y))), 0) a!6220!6220if#(true, X, Y) =#> mark#(X) a!6220!6220if#(false, X, Y) =#> mark#(Y) mark#(div(X, Y)) =#> a!6220!6220div#(mark(X), Y) mark#(div(X, Y)) =#> mark#(X) mark#(s(X)) =#> mark#(X) Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative) and (P_4, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_4, R_0, minimal, formative). 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: a!6220!6220div#(s(X), s(Y)) >? a!6220!6220if#(a!6220!6220geq(X, Y), s(div(minus(X, Y), s(Y))), 0) a!6220!6220if#(true, X, Y) >? mark#(X) a!6220!6220if#(false, X, Y) >? mark#(Y) mark#(div(X, Y)) >? a!6220!6220div#(mark(X), Y) mark#(div(X, Y)) >? mark#(X) mark#(s(X)) >? mark#(X) a!6220!6220minus(0, X) >= 0 a!6220!6220minus(s(X), s(Y)) >= a!6220!6220minus(X, Y) a!6220!6220geq(X, 0) >= true a!6220!6220geq(0, s(X)) >= false a!6220!6220geq(s(X), s(Y)) >= a!6220!6220geq(X, Y) a!6220!6220div(0, s(X)) >= 0 a!6220!6220div(s(X), s(Y)) >= a!6220!6220if(a!6220!6220geq(X, Y), s(div(minus(X, Y), s(Y))), 0) a!6220!6220if(true, X, Y) >= mark(X) a!6220!6220if(false, X, Y) >= mark(Y) mark(minus(X, Y)) >= a!6220!6220minus(X, Y) mark(geq(X, Y)) >= a!6220!6220geq(X, Y) mark(div(X, Y)) >= a!6220!6220div(mark(X), Y) mark(if(X, Y, Z)) >= a!6220!6220if(mark(X), Y, Z) mark(0) >= 0 mark(s(X)) >= s(mark(X)) mark(true) >= true mark(false) >= false a!6220!6220minus(X, Y) >= minus(X, Y) a!6220!6220geq(X, Y) >= geq(X, Y) a!6220!6220div(X, Y) >= div(X, Y) a!6220!6220if(X, Y, Z) >= if(X, Y, Z) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 a!6220!6220div = \y0y1.2y0 a!6220!6220div# = \y0y1.3y0 a!6220!6220geq = \y0y1.0 a!6220!6220if = \y0y1y2.1 + y1 + y2 a!6220!6220if# = \y0y1y2.1 + 2y1 + 2y2 a!6220!6220minus = \y0y1.0 div = \y0y1.2y0 false = 0 geq = \y0y1.0 if = \y0y1y2.1 + y1 + y2 mark = \y0.y0 mark# = \y0.2y0 minus = \y0y1.0 s = \y0.1 + 2y0 true = 0 Using this interpretation, the requirements translate to: [[a!6220!6220div#(s(_x0), s(_x1))]] = 3 + 6x0 >= 3 = [[a!6220!6220if#(a!6220!6220geq(_x0, _x1), s(div(minus(_x0, _x1), s(_x1))), 0)]] [[a!6220!6220if#(true, _x0, _x1)]] = 1 + 2x0 + 2x1 > 2x0 = [[mark#(_x0)]] [[a!6220!6220if#(false, _x0, _x1)]] = 1 + 2x0 + 2x1 > 2x1 = [[mark#(_x1)]] [[mark#(div(_x0, _x1))]] = 4x0 >= 3x0 = [[a!6220!6220div#(mark(_x0), _x1)]] [[mark#(div(_x0, _x1))]] = 4x0 >= 2x0 = [[mark#(_x0)]] [[mark#(s(_x0))]] = 2 + 4x0 > 2x0 = [[mark#(_x0)]] [[a!6220!6220minus(0, _x0)]] = 0 >= 0 = [[0]] [[a!6220!6220minus(s(_x0), s(_x1))]] = 0 >= 0 = [[a!6220!6220minus(_x0, _x1)]] [[a!6220!6220geq(_x0, 0)]] = 0 >= 0 = [[true]] [[a!6220!6220geq(0, s(_x0))]] = 0 >= 0 = [[false]] [[a!6220!6220geq(s(_x0), s(_x1))]] = 0 >= 0 = [[a!6220!6220geq(_x0, _x1)]] [[a!6220!6220div(0, s(_x0))]] = 0 >= 0 = [[0]] [[a!6220!6220div(s(_x0), s(_x1))]] = 2 + 4x0 >= 2 = [[a!6220!6220if(a!6220!6220geq(_x0, _x1), s(div(minus(_x0, _x1), s(_x1))), 0)]] [[a!6220!6220if(true, _x0, _x1)]] = 1 + x0 + x1 >= x0 = [[mark(_x0)]] [[a!6220!6220if(false, _x0, _x1)]] = 1 + x0 + x1 >= x1 = [[mark(_x1)]] [[mark(minus(_x0, _x1))]] = 0 >= 0 = [[a!6220!6220minus(_x0, _x1)]] [[mark(geq(_x0, _x1))]] = 0 >= 0 = [[a!6220!6220geq(_x0, _x1)]] [[mark(div(_x0, _x1))]] = 2x0 >= 2x0 = [[a!6220!6220div(mark(_x0), _x1)]] [[mark(if(_x0, _x1, _x2))]] = 1 + x1 + x2 >= 1 + x1 + x2 = [[a!6220!6220if(mark(_x0), _x1, _x2)]] [[mark(0)]] = 0 >= 0 = [[0]] [[mark(s(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[s(mark(_x0))]] [[mark(true)]] = 0 >= 0 = [[true]] [[mark(false)]] = 0 >= 0 = [[false]] [[a!6220!6220minus(_x0, _x1)]] = 0 >= 0 = [[minus(_x0, _x1)]] [[a!6220!6220geq(_x0, _x1)]] = 0 >= 0 = [[geq(_x0, _x1)]] [[a!6220!6220div(_x0, _x1)]] = 2x0 >= 2x0 = [[div(_x0, _x1)]] [[a!6220!6220if(_x0, _x1, _x2)]] = 1 + x1 + x2 >= 1 + x1 + x2 = [[if(_x0, _x1, _x2)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_4, R_0, minimal, formative) by (P_5, R_0, minimal, formative), where P_5 consists of: a!6220!6220div#(s(X), s(Y)) =#> a!6220!6220if#(a!6220!6220geq(X, Y), s(div(minus(X, Y), s(Y))), 0) mark#(div(X, Y)) =#> a!6220!6220div#(mark(X), Y) mark#(div(X, Y)) =#> mark#(X) Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative) and (P_5, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_5, 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 * 2 : 1, 2 This graph has the following strongly connected components: P_6: mark#(div(X, Y)) =#> mark#(X) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_5, R_0, m, f) by (P_6, R_0, m, f). Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative) and (P_6, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_6, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(mark#) = 1 Thus, we can orient the dependency pairs as follows: nu(mark#(div(X, Y))) = div(X, Y) |> X = nu(mark#(X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_6, R_0, minimal, f) by ({}, R_0, minimal, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if each of (P_1, R_0, minimal, formative) and (P_2, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_2, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(a!6220!6220geq#) = 1 Thus, we can orient the dependency pairs as follows: nu(a!6220!6220geq#(s(X), s(Y))) = s(X) |> X = nu(a!6220!6220geq#(X, Y)) 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. 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). We apply the subterm criterion with the following projection function: nu(a!6220!6220minus#) = 1 Thus, we can orient the dependency pairs as follows: nu(a!6220!6220minus#(s(X), s(Y))) = s(X) |> X = nu(a!6220!6220minus#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_1, 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.