2.85/2.09 YES 2.93/2.16 We consider the system theBenchmark. 2.93/2.16 2.93/2.16 Alphabet: 2.93/2.16 2.93/2.16 0 : [] --> nat 2.93/2.16 app : [list * list] --> list 2.93/2.16 cons : [nat * list] --> list 2.93/2.16 false : [] --> bool 2.93/2.16 filter : [nat -> bool * list] --> list 2.93/2.16 gr : [nat * nat] --> bool 2.93/2.16 if : [bool * list * list] --> list 2.93/2.16 le : [nat * nat] --> bool 2.93/2.16 nil : [] --> list 2.93/2.16 qsort : [list] --> list 2.93/2.16 s : [nat] --> nat 2.93/2.16 true : [] --> bool 2.93/2.16 2.93/2.16 Rules: 2.93/2.16 2.93/2.16 if(true, x, y) => x 2.93/2.16 if(false, x, y) => y 2.93/2.16 app(nil, x) => x 2.93/2.16 app(cons(x, y), z) => cons(x, app(y, z)) 2.93/2.16 le(0, x) => true 2.93/2.16 le(s(x), 0) => false 2.93/2.16 le(s(x), s(y)) => le(x, y) 2.93/2.16 gr(0, x) => false 2.93/2.16 gr(s(x), 0) => true 2.93/2.16 gr(s(x), s(y)) => gr(x, y) 2.93/2.16 filter(f, nil) => nil 2.93/2.16 filter(f, cons(x, y)) => if(f x, cons(x, filter(f, y)), filter(f, y)) 2.93/2.16 qsort(nil) => nil 2.93/2.16 qsort(cons(x, y)) => app(qsort(filter(/\z.le(z, x), y)), app(cons(x, nil), qsort(filter(/\u.gr(u, x), y)))) 2.93/2.16 2.93/2.16 This AFS is converted to an AFSM simply by replacing all free variables by meta-variables (with arity 0). 2.93/2.16 2.93/2.16 We observe that the rules contain a first-order subset: 2.93/2.16 2.93/2.16 if(true, X, Y) => X 2.93/2.16 if(false, X, Y) => Y 2.93/2.16 app(nil, X) => X 2.93/2.16 app(cons(X, Y), Z) => cons(X, app(Y, Z)) 2.93/2.16 le(0, X) => true 2.93/2.16 le(s(X), 0) => false 2.93/2.16 le(s(X), s(Y)) => le(X, Y) 2.93/2.16 gr(0, X) => false 2.93/2.16 gr(s(X), 0) => true 2.93/2.16 gr(s(X), s(Y)) => gr(X, Y) 2.93/2.16 2.93/2.16 Moreover, the system is orthogonal. Thus, by [Kop12, Thm. 7.55], we may omit all first-order dependency pairs from the dependency pair problem (DP(R), R) if this first-order part is terminating when seen as a many-sorted first-order TRS. 2.93/2.16 2.93/2.16 According to the external first-order termination prover, this system is indeed terminating: 2.93/2.16 2.93/2.16 || proof of resources/system.trs 2.93/2.16 || # AProVE Commit ID: d84c10301d352dfd14de2104819581f4682260f5 fuhs 20130616 2.93/2.16 || 2.93/2.16 || 2.93/2.16 || Termination w.r.t. Q of the given QTRS could be proven: 2.93/2.16 || 2.93/2.16 || (0) QTRS 2.93/2.16 || (1) QTRSRRRProof [EQUIVALENT] 2.93/2.16 || (2) QTRS 2.93/2.16 || (3) RisEmptyProof [EQUIVALENT] 2.93/2.16 || (4) YES 2.93/2.16 || 2.93/2.16 || 2.93/2.16 || ---------------------------------------- 2.93/2.16 || 2.93/2.16 || (0) 2.93/2.16 || Obligation: 2.93/2.16 || Q restricted rewrite system: 2.93/2.16 || The TRS R consists of the following rules: 2.93/2.16 || 2.93/2.16 || if(true, %X, %Y) -> %X 2.93/2.16 || if(false, %X, %Y) -> %Y 2.93/2.16 || app(nil, %X) -> %X 2.93/2.16 || app(cons(%X, %Y), %Z) -> cons(%X, app(%Y, %Z)) 2.93/2.16 || le(0, %X) -> true 2.93/2.16 || le(s(%X), 0) -> false 2.93/2.16 || le(s(%X), s(%Y)) -> le(%X, %Y) 2.93/2.16 || gr(0, %X) -> false 2.93/2.16 || gr(s(%X), 0) -> true 2.93/2.16 || gr(s(%X), s(%Y)) -> gr(%X, %Y) 2.93/2.16 || 2.93/2.16 || Q is empty. 2.93/2.16 || 2.93/2.16 || ---------------------------------------- 2.93/2.16 || 2.93/2.16 || (1) QTRSRRRProof (EQUIVALENT) 2.93/2.16 || Used ordering: 2.93/2.16 || Knuth-Bendix order [KBO] with precedence:s_1 > gr_2 > if_3 > 0 > le_2 > app_2 > cons_2 > nil > false > true 2.93/2.16 || 2.93/2.16 || and weight map: 2.93/2.16 || 2.93/2.16 || true=2 2.93/2.16 || false=2 2.93/2.16 || nil=1 2.93/2.16 || 0=1 2.93/2.16 || s_1=0 2.93/2.16 || if_3=0 2.93/2.16 || app_2=0 2.93/2.16 || cons_2=0 2.93/2.16 || le_2=0 2.93/2.16 || gr_2=0 2.93/2.16 || 2.93/2.16 || The variable weight is 1With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: 2.93/2.16 || 2.93/2.16 || if(true, %X, %Y) -> %X 2.93/2.16 || if(false, %X, %Y) -> %Y 2.93/2.16 || app(nil, %X) -> %X 2.93/2.16 || app(cons(%X, %Y), %Z) -> cons(%X, app(%Y, %Z)) 2.93/2.16 || le(0, %X) -> true 2.93/2.16 || le(s(%X), 0) -> false 2.93/2.16 || le(s(%X), s(%Y)) -> le(%X, %Y) 2.93/2.16 || gr(0, %X) -> false 2.93/2.16 || gr(s(%X), 0) -> true 2.93/2.16 || gr(s(%X), s(%Y)) -> gr(%X, %Y) 2.93/2.16 || 2.93/2.16 || 2.93/2.16 || 2.93/2.16 || 2.93/2.16 || ---------------------------------------- 2.93/2.16 || 2.93/2.16 || (2) 2.93/2.16 || Obligation: 2.93/2.16 || Q restricted rewrite system: 2.93/2.16 || R is empty. 2.93/2.16 || Q is empty. 2.93/2.16 || 2.93/2.16 || ---------------------------------------- 2.93/2.16 || 2.93/2.16 || (3) RisEmptyProof (EQUIVALENT) 2.93/2.16 || The TRS R is empty. Hence, termination is trivially proven. 2.93/2.16 || ---------------------------------------- 2.93/2.16 || 2.93/2.16 || (4) 2.93/2.16 || YES 2.93/2.16 || 2.93/2.16 We use the dependency pair framework as described in [Kop12, Ch. 6/7], with static dependency pairs (see [KusIsoSakBla09] and the adaptation for AFSMs and accessible arguments in [Kop13]). 2.93/2.16 2.93/2.16 We thus obtain the following dependency pair problem (P_0, R_0, static, formative): 2.93/2.16 2.93/2.16 Dependency Pairs P_0: 2.93/2.16 2.93/2.16 0] filter#(F, cons(X, Y)) =#> if#(F X, cons(X, filter(F, Y)), filter(F, Y)) 2.93/2.16 1] filter#(F, cons(X, Y)) =#> filter#(F, Y) 2.93/2.16 2] filter#(F, cons(X, Y)) =#> filter#(F, Y) 2.93/2.16 3] qsort#(cons(X, Y)) =#> app#(qsort(filter(/\x.le(x, X), Y)), app(cons(X, nil), qsort(filter(/\y.gr(y, X), Y)))) 2.93/2.16 4] qsort#(cons(X, Y)) =#> qsort#(filter(/\x.le(x, X), Y)) 2.93/2.16 5] qsort#(cons(X, Y)) =#> filter#(/\x.le(x, X), Y) 2.93/2.16 6] qsort#(cons(X, Y)) =#> le#(Z, X) 2.93/2.16 7] qsort#(cons(X, Y)) =#> app#(cons(X, nil), qsort(filter(/\x.gr(x, X), Y))) 2.93/2.16 8] qsort#(cons(X, Y)) =#> qsort#(filter(/\x.gr(x, X), Y)) 2.93/2.16 9] qsort#(cons(X, Y)) =#> filter#(/\x.gr(x, X), Y) 2.93/2.16 10] qsort#(cons(X, Y)) =#> gr#(Z, X) 2.93/2.16 2.93/2.16 Rules R_0: 2.93/2.16 2.93/2.16 if(true, X, Y) => X 2.93/2.16 if(false, X, Y) => Y 2.93/2.16 app(nil, X) => X 2.93/2.16 app(cons(X, Y), Z) => cons(X, app(Y, Z)) 2.93/2.16 le(0, X) => true 2.93/2.16 le(s(X), 0) => false 2.93/2.16 le(s(X), s(Y)) => le(X, Y) 2.93/2.16 gr(0, X) => false 2.93/2.16 gr(s(X), 0) => true 2.93/2.16 gr(s(X), s(Y)) => gr(X, Y) 2.93/2.16 filter(F, nil) => nil 2.93/2.16 filter(F, cons(X, Y)) => if(F X, cons(X, filter(F, Y)), filter(F, Y)) 2.93/2.16 qsort(nil) => nil 2.93/2.16 qsort(cons(X, Y)) => app(qsort(filter(/\x.le(x, X), Y)), app(cons(X, nil), qsort(filter(/\y.gr(y, X), Y)))) 2.93/2.16 2.93/2.16 Thus, the original system is terminating if (P_0, R_0, static, formative) is finite. 2.93/2.16 2.93/2.16 We consider the dependency pair problem (P_0, R_0, static, formative). 2.93/2.16 2.93/2.16 We place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: 2.93/2.16 2.93/2.16 * 0 : 2.93/2.16 * 1 : 0, 1, 2 2.93/2.16 * 2 : 0, 1, 2 2.93/2.16 * 3 : 2.93/2.16 * 4 : 3, 4, 5, 6, 7, 8, 9, 10 2.93/2.16 * 5 : 0, 1, 2 2.93/2.16 * 6 : 2.93/2.16 * 7 : 2.93/2.16 * 8 : 3, 4, 5, 6, 7, 8, 9, 10 2.93/2.16 * 9 : 0, 1, 2 2.93/2.16 * 10 : 2.93/2.16 2.93/2.16 This graph has the following strongly connected components: 2.93/2.16 2.93/2.16 P_1: 2.93/2.16 2.93/2.16 filter#(F, cons(X, Y)) =#> filter#(F, Y) 2.93/2.16 filter#(F, cons(X, Y)) =#> filter#(F, Y) 2.93/2.16 2.93/2.16 P_2: 2.93/2.16 2.93/2.16 qsort#(cons(X, Y)) =#> qsort#(filter(/\x.le(x, X), Y)) 2.93/2.16 qsort#(cons(X, Y)) =#> qsort#(filter(/\x.gr(x, X), Y)) 2.93/2.16 2.93/2.16 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) and (P_2, R_0, m, f). 2.93/2.16 2.93/2.16 Thus, the original system is terminating if each of (P_1, R_0, static, formative) and (P_2, R_0, static, formative) is finite. 2.93/2.16 2.93/2.16 We consider the dependency pair problem (P_2, R_0, static, formative). 2.93/2.16 2.93/2.16 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: 2.93/2.16 2.93/2.16 qsort#(cons(X, Y)) >? qsort#(filter(/\x.le(x, X), Y)) 2.93/2.16 qsort#(cons(X, Y)) >? qsort#(filter(/\x.gr(x, X), Y)) 2.93/2.16 if(true, X, Y) >= X 2.93/2.16 if(false, X, Y) >= Y 2.93/2.16 app(nil, X) >= X 2.93/2.16 app(cons(X, Y), Z) >= cons(X, app(Y, Z)) 2.93/2.16 le(0, X) >= true 2.93/2.16 le(s(X), 0) >= false 2.93/2.16 le(s(X), s(Y)) >= le(X, Y) 2.93/2.16 gr(0, X) >= false 2.93/2.16 gr(s(X), 0) >= true 2.93/2.16 gr(s(X), s(Y)) >= gr(X, Y) 2.93/2.16 filter(F, nil) >= nil 2.93/2.16 filter(F, cons(X, Y)) >= if(F X, cons(X, filter(F, Y)), filter(F, Y)) 2.93/2.16 qsort(nil) >= nil 2.93/2.16 qsort(cons(X, Y)) >= app(qsort(filter(/\x.le(x, X), Y)), app(cons(X, nil), qsort(filter(/\y.gr(y, X), Y)))) 2.93/2.16 2.93/2.16 Since this representation is not advantageous for the higher-order recursive path ordering, we present the strict requirements in their unextended form, which is not problematic since for any F, s and substituion gamma: (F s)gamma beta-reduces to F(s)gamma.) 2.93/2.16 2.93/2.16 We use a recursive path ordering as defined in [Kop12, Chapter 5]. 2.93/2.16 2.93/2.16 Argument functions: 2.93/2.16 2.93/2.16 [[false]] = _|_ 2.93/2.16 [[filter(x_1, x_2)]] = filter(x_2) 2.93/2.16 [[if(x_1, x_2, x_3)]] = if(x_2, x_3) 2.93/2.16 [[le(x_1, x_2)]] = x_2 2.93/2.16 [[nil]] = _|_ 2.93/2.16 [[true]] = _|_ 2.93/2.16 2.93/2.16 We choose Lex = {app} and Mul = {0, @_{o -> o}, cons, filter, gr, if, qsort, qsort#, s}, and the following precedence: 0 > @_{o -> o} > gr > qsort > app > cons = filter > if > qsort# > s 2.93/2.16 2.93/2.16 Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: 2.93/2.16 2.93/2.16 qsort#(cons(X, Y)) >= qsort#(filter(Y)) 2.93/2.16 qsort#(cons(X, Y)) > qsort#(filter(Y)) 2.93/2.16 if(X, Y) >= X 2.93/2.16 if(X, Y) >= Y 2.93/2.16 app(_|_, X) >= X 2.93/2.16 app(cons(X, Y), Z) >= cons(X, app(Y, Z)) 2.93/2.16 X >= _|_ 2.93/2.16 0 >= _|_ 2.93/2.16 s(X) >= X 2.93/2.16 gr(0, X) >= _|_ 2.93/2.16 gr(s(X), 0) >= _|_ 2.93/2.16 gr(s(X), s(Y)) >= gr(X, Y) 2.93/2.16 filter(_|_) >= _|_ 2.93/2.16 filter(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) 2.93/2.16 qsort(_|_) >= _|_ 2.93/2.16 qsort(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) 2.93/2.16 2.93/2.16 With these choices, we have: 2.93/2.16 2.93/2.16 1] qsort#(cons(X, Y)) >= qsort#(filter(Y)) because [2], by (Star) 2.93/2.16 2] qsort#*(cons(X, Y)) >= qsort#(filter(Y)) because qsort# in Mul and [3], by (Stat) 2.93/2.16 3] cons(X, Y) > filter(Y) because [4], by definition 2.93/2.16 4] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [5], by (Stat) 2.93/2.16 5] Y >= Y by (Meta) 2.93/2.16 2.93/2.16 6] qsort#(cons(X, Y)) > qsort#(filter(Y)) because [7], by definition 2.93/2.16 7] qsort#*(cons(X, Y)) >= qsort#(filter(Y)) because qsort# in Mul and [8], by (Stat) 2.93/2.16 8] cons(X, Y) > filter(Y) because [9], by definition 2.93/2.16 9] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [5], by (Stat) 2.93/2.16 2.93/2.16 10] if(X, Y) >= X because [11], by (Star) 2.93/2.16 11] if*(X, Y) >= X because [12], by (Select) 2.93/2.16 12] X >= X by (Meta) 2.93/2.16 2.93/2.16 13] if(X, Y) >= Y because [14], by (Star) 2.93/2.16 14] if*(X, Y) >= Y because [15], by (Select) 2.93/2.16 15] Y >= Y by (Meta) 2.93/2.16 2.93/2.16 16] app(_|_, X) >= X because [17], by (Star) 2.93/2.16 17] app*(_|_, X) >= X because [18], by (Select) 2.93/2.16 18] X >= X by (Meta) 2.93/2.16 2.93/2.16 19] app(cons(X, Y), Z) >= cons(X, app(Y, Z)) because [20], by (Star) 2.93/2.16 20] app*(cons(X, Y), Z) >= cons(X, app(Y, Z)) because app > cons, [21] and [25], by (Copy) 2.93/2.16 21] app*(cons(X, Y), Z) >= X because [22], by (Select) 2.93/2.16 22] cons(X, Y) >= X because [23], by (Star) 2.93/2.16 23] cons*(X, Y) >= X because [24], by (Select) 2.93/2.16 24] X >= X by (Meta) 2.93/2.16 25] app*(cons(X, Y), Z) >= app(Y, Z) because [26], [29] and [31], by (Stat) 2.93/2.16 26] cons(X, Y) > Y because [27], by definition 2.93/2.16 27] cons*(X, Y) >= Y because [28], by (Select) 2.93/2.16 28] Y >= Y by (Meta) 2.93/2.16 29] app*(cons(X, Y), Z) >= Y because [30], by (Select) 2.93/2.16 30] cons(X, Y) >= Y because [27], by (Star) 2.93/2.16 31] app*(cons(X, Y), Z) >= Z because [32], by (Select) 2.93/2.16 32] Z >= Z by (Meta) 2.93/2.16 2.93/2.16 33] X >= _|_ by (Bot) 2.93/2.16 2.93/2.16 34] 0 >= _|_ by (Bot) 2.93/2.16 2.93/2.16 35] s(X) >= X because [36], by (Star) 2.93/2.16 36] s*(X) >= X because [37], by (Select) 2.93/2.16 37] X >= X by (Meta) 2.93/2.16 2.93/2.16 38] gr(0, X) >= _|_ by (Bot) 2.93/2.16 2.93/2.16 39] gr(s(X), 0) >= _|_ by (Bot) 2.93/2.16 2.93/2.16 40] gr(s(X), s(Y)) >= gr(X, Y) because [41], by (Star) 2.93/2.16 41] gr*(s(X), s(Y)) >= gr(X, Y) because gr in Mul, [42] and [45], by (Stat) 2.93/2.16 42] s(X) >= X because [43], by (Star) 2.93/2.16 43] s*(X) >= X because [44], by (Select) 2.93/2.16 44] X >= X by (Meta) 2.93/2.16 45] s(Y) > Y because [46], by definition 2.93/2.16 46] s*(Y) >= Y because [47], by (Select) 2.93/2.16 47] Y >= Y by (Meta) 2.93/2.16 2.93/2.16 48] filter(_|_) >= _|_ by (Bot) 2.93/2.16 2.93/2.16 49] filter(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) because [50], by (Star) 2.93/2.16 50] filter*(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) because filter > if, [51] and [58], by (Copy) 2.93/2.16 51] filter*(cons(X, Y)) >= cons(X, filter(Y)) because filter = cons, filter in Mul, [52] and [55], by (Stat) 2.93/2.16 52] cons(X, Y) > X because [53], by definition 2.93/2.16 53] cons*(X, Y) >= X because [54], by (Select) 2.93/2.16 54] X >= X by (Meta) 2.93/2.16 55] cons(X, Y) > filter(Y) because [56], by definition 2.93/2.16 56] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [57], by (Stat) 2.93/2.16 57] Y >= Y by (Meta) 2.93/2.16 58] filter*(cons(X, Y)) >= filter(Y) because filter in Mul and [59], by (Stat) 2.93/2.16 59] cons(X, Y) > Y because [60], by definition 2.93/2.16 60] cons*(X, Y) >= Y because [57], by (Select) 2.93/2.16 2.93/2.16 61] qsort(_|_) >= _|_ by (Bot) 2.93/2.16 2.93/2.16 62] qsort(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) because [63], by (Star) 2.93/2.16 63] qsort*(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) because qsort > app, [64] and [65], by (Copy) 2.93/2.16 64] qsort*(cons(X, Y)) >= qsort(filter(Y)) because qsort in Mul and [3], by (Stat) 2.93/2.16 65] qsort*(cons(X, Y)) >= app(cons(X, _|_), qsort(filter(Y))) because qsort > app, [66] and [72], by (Copy) 2.93/2.16 66] qsort*(cons(X, Y)) >= cons(X, _|_) because qsort > cons, [67] and [71], by (Copy) 2.93/2.16 67] qsort*(cons(X, Y)) >= X because [68], by (Select) 2.93/2.16 68] cons(X, Y) >= X because [69], by (Star) 2.93/2.16 69] cons*(X, Y) >= X because [70], by (Select) 2.93/2.16 70] X >= X by (Meta) 2.93/2.16 71] qsort*(cons(X, Y)) >= _|_ by (Bot) 2.93/2.16 72] qsort*(cons(X, Y)) >= qsort(filter(Y)) because qsort in Mul and [8], by (Stat) 2.93/2.16 2.93/2.16 By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_2, R_0, static, formative) by (P_3, R_0, static, formative), where P_3 consists of: 2.93/2.16 2.93/2.16 qsort#(cons(X, Y)) =#> qsort#(filter(/\x.le(x, X), Y)) 2.93/2.16 2.93/2.16 Thus, the original system is terminating if each of (P_1, R_0, static, formative) and (P_3, R_0, static, formative) is finite. 2.93/2.16 2.93/2.16 We consider the dependency pair problem (P_3, R_0, static, formative). 2.93/2.16 2.93/2.16 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: 2.93/2.16 2.93/2.16 qsort#(cons(X, Y)) >? qsort#(filter(/\x.le(x, X), Y)) 2.93/2.16 if(true, X, Y) >= X 2.93/2.16 if(false, X, Y) >= Y 2.93/2.16 app(nil, X) >= X 2.93/2.16 app(cons(X, Y), Z) >= cons(X, app(Y, Z)) 2.93/2.16 le(0, X) >= true 2.93/2.16 le(s(X), 0) >= false 2.93/2.16 le(s(X), s(Y)) >= le(X, Y) 2.93/2.16 gr(0, X) >= false 2.93/2.16 gr(s(X), 0) >= true 2.93/2.16 gr(s(X), s(Y)) >= gr(X, Y) 2.93/2.16 filter(F, nil) >= nil 2.93/2.16 filter(F, cons(X, Y)) >= if(F X, cons(X, filter(F, Y)), filter(F, Y)) 2.93/2.16 qsort(nil) >= nil 2.93/2.16 qsort(cons(X, Y)) >= app(qsort(filter(/\x.le(x, X), Y)), app(cons(X, nil), qsort(filter(/\y.gr(y, X), Y)))) 2.93/2.16 2.93/2.16 Since this representation is not advantageous for the higher-order recursive path ordering, we present the strict requirements in their unextended form, which is not problematic since for any F, s and substituion gamma: (F s)gamma beta-reduces to F(s)gamma.) 2.93/2.16 2.93/2.16 We use a recursive path ordering as defined in [Kop12, Chapter 5]. 2.93/2.16 2.93/2.16 Argument functions: 2.93/2.16 2.93/2.16 [[false]] = _|_ 2.93/2.16 [[filter(x_1, x_2)]] = filter(x_2) 2.93/2.16 [[gr(x_1, x_2)]] = gr(x_1) 2.93/2.16 [[if(x_1, x_2, x_3)]] = if(x_2, x_3) 2.93/2.16 [[nil]] = _|_ 2.93/2.16 [[true]] = _|_ 2.93/2.16 2.93/2.16 We choose Lex = {} and Mul = {0, @_{o -> o}, app, cons, filter, gr, if, le, qsort, qsort#, s}, and the following precedence: 0 > @_{o -> o} > le > qsort > app > cons = filter > if > qsort# > gr > s 2.93/2.16 2.93/2.16 Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: 2.93/2.16 2.93/2.16 qsort#(cons(X, Y)) > qsort#(filter(Y)) 2.93/2.16 if(X, Y) >= X 2.93/2.16 if(X, Y) >= Y 2.93/2.16 app(_|_, X) >= X 2.93/2.16 app(cons(X, Y), Z) >= cons(X, app(Y, Z)) 2.93/2.16 le(0, X) >= _|_ 2.93/2.16 le(s(X), 0) >= _|_ 2.93/2.16 le(s(X), s(Y)) >= le(X, Y) 2.93/2.16 gr(0) >= _|_ 2.93/2.16 gr(s(X)) >= _|_ 2.93/2.16 gr(s(X)) >= gr(X) 2.93/2.16 filter(_|_) >= _|_ 2.93/2.16 filter(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) 2.93/2.16 qsort(_|_) >= _|_ 2.93/2.16 qsort(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) 2.93/2.16 2.93/2.16 With these choices, we have: 2.93/2.16 2.93/2.16 1] qsort#(cons(X, Y)) > qsort#(filter(Y)) because [2], by definition 2.93/2.16 2] qsort#*(cons(X, Y)) >= qsort#(filter(Y)) because [3], by (Select) 2.93/2.16 3] cons(X, Y) >= qsort#(filter(Y)) because [4], by (Star) 2.93/2.16 4] cons*(X, Y) >= qsort#(filter(Y)) because cons > qsort# and [5], by (Copy) 2.93/2.16 5] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [6], by (Stat) 2.93/2.16 6] Y >= Y by (Meta) 2.93/2.16 2.93/2.16 7] if(X, Y) >= X because [8], by (Star) 2.93/2.16 8] if*(X, Y) >= X because [9], by (Select) 2.93/2.16 9] X >= X by (Meta) 2.93/2.16 2.93/2.16 10] if(X, Y) >= Y because [11], by (Star) 2.93/2.16 11] if*(X, Y) >= Y because [12], by (Select) 2.93/2.16 12] Y >= Y by (Meta) 2.93/2.16 2.93/2.16 13] app(_|_, X) >= X because [14], by (Star) 2.93/2.16 14] app*(_|_, X) >= X because [15], by (Select) 2.93/2.16 15] X >= X by (Meta) 2.93/2.16 2.93/2.16 16] app(cons(X, Y), Z) >= cons(X, app(Y, Z)) because [17], by (Star) 2.93/2.16 17] app*(cons(X, Y), Z) >= cons(X, app(Y, Z)) because app > cons, [18] and [22], by (Copy) 2.93/2.16 18] app*(cons(X, Y), Z) >= X because [19], by (Select) 2.93/2.16 19] cons(X, Y) >= X because [20], by (Star) 2.93/2.16 20] cons*(X, Y) >= X because [21], by (Select) 2.93/2.16 21] X >= X by (Meta) 2.93/2.16 22] app*(cons(X, Y), Z) >= app(Y, Z) because app in Mul, [23] and [26], by (Stat) 2.93/2.16 23] cons(X, Y) > Y because [24], by definition 2.93/2.16 24] cons*(X, Y) >= Y because [25], by (Select) 2.93/2.16 25] Y >= Y by (Meta) 2.93/2.16 26] Z >= Z by (Meta) 2.93/2.16 2.93/2.16 27] le(0, X) >= _|_ by (Bot) 2.93/2.16 2.93/2.16 28] le(s(X), 0) >= _|_ by (Bot) 2.93/2.16 2.93/2.16 29] le(s(X), s(Y)) >= le(X, Y) because [30], by (Star) 2.93/2.16 30] le*(s(X), s(Y)) >= le(X, Y) because le in Mul, [31] and [34], by (Stat) 2.93/2.16 31] s(X) >= X because [32], by (Star) 2.93/2.16 32] s*(X) >= X because [33], by (Select) 2.93/2.16 33] X >= X by (Meta) 2.93/2.16 34] s(Y) > Y because [35], by definition 2.93/2.16 35] s*(Y) >= Y because [36], by (Select) 2.93/2.16 36] Y >= Y by (Meta) 2.93/2.16 2.93/2.16 37] gr(0) >= _|_ by (Bot) 2.93/2.16 2.93/2.16 38] gr(s(X)) >= _|_ by (Bot) 2.93/2.16 2.93/2.16 39] gr(s(X)) >= gr(X) because gr in Mul and [40], by (Fun) 2.93/2.16 40] s(X) >= X because [41], by (Star) 2.93/2.16 41] s*(X) >= X because [42], by (Select) 2.93/2.16 42] X >= X by (Meta) 2.93/2.16 2.93/2.16 43] filter(_|_) >= _|_ by (Bot) 2.93/2.16 2.93/2.16 44] filter(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) because [45], by (Star) 2.93/2.16 45] filter*(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) because filter > if, [46] and [53], by (Copy) 2.93/2.16 46] filter*(cons(X, Y)) >= cons(X, filter(Y)) because filter = cons, filter in Mul, [47] and [50], by (Stat) 2.93/2.16 47] cons(X, Y) > X because [48], by definition 2.93/2.16 48] cons*(X, Y) >= X because [49], by (Select) 2.93/2.16 49] X >= X by (Meta) 2.93/2.16 50] cons(X, Y) > filter(Y) because [51], by definition 2.93/2.16 51] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [52], by (Stat) 2.93/2.16 52] Y >= Y by (Meta) 2.93/2.16 53] filter*(cons(X, Y)) >= filter(Y) because [54], by (Select) 2.93/2.16 54] cons(X, Y) >= filter(Y) because [51], by (Star) 2.93/2.16 2.93/2.16 55] qsort(_|_) >= _|_ by (Bot) 2.93/2.16 2.93/2.16 56] qsort(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) because [57], by (Star) 2.93/2.16 57] qsort*(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) because qsort > app, [58] and [60], by (Copy) 2.93/2.16 58] qsort*(cons(X, Y)) >= qsort(filter(Y)) because qsort in Mul and [59], by (Stat) 2.93/2.16 59] cons(X, Y) > filter(Y) because [5], by definition 2.93/2.16 60] qsort*(cons(X, Y)) >= app(cons(X, _|_), qsort(filter(Y))) because qsort > app, [61] and [65], by (Copy) 2.93/2.16 61] qsort*(cons(X, Y)) >= cons(X, _|_) because [62], by (Select) 2.93/2.16 62] cons(X, Y) >= cons(X, _|_) because cons in Mul, [63] and [64], by (Fun) 2.93/2.16 63] X >= X by (Meta) 2.93/2.16 64] Y >= _|_ by (Bot) 2.93/2.16 65] qsort*(cons(X, Y)) >= qsort(filter(Y)) because qsort in Mul and [66], by (Stat) 2.93/2.16 66] cons(X, Y) > filter(Y) because [67], by definition 2.93/2.16 67] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [6], by (Stat) 2.93/2.16 2.93/2.16 By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_3, R_0) by ({}, R_0). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. 2.93/2.16 2.93/2.16 Thus, the original system is terminating if (P_1, R_0, static, formative) is finite. 2.93/2.16 2.93/2.16 We consider the dependency pair problem (P_1, R_0, static, formative). 2.93/2.16 2.93/2.16 We apply the subterm criterion with the following projection function: 2.93/2.16 2.93/2.16 nu(filter#) = 2 2.93/2.16 2.93/2.16 Thus, we can orient the dependency pairs as follows: 2.93/2.16 2.93/2.16 nu(filter#(F, cons(X, Y))) = cons(X, Y) |> Y = nu(filter#(F, Y)) 2.93/2.16 nu(filter#(F, cons(X, Y))) = cons(X, Y) |> Y = nu(filter#(F, Y)) 2.93/2.16 2.93/2.16 By [Kop12, Thm. 7.35] and [Kop13, Thm. 5], we may replace a dependency pair problem (P_1, R_0, static, f) by ({}, R_0, static, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. 2.93/2.16 2.93/2.16 As all dependency pair problems were succesfully simplified with sound (and complete) processors until nothing remained, we conclude termination. 2.93/2.16 2.93/2.16 2.93/2.16 +++ Citations +++ 2.93/2.16 2.93/2.16 [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. 2.93/2.16 [Kop13] C. Kop. Static Dependency Pairs with Accessibility. Unpublished manuscript, http://cl-informatik.uibk.ac.at/users/kop/static.pdf, 2013. 2.93/2.16 [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. 2.93/2.16 EOF