2.26/1.32 YES 2.26/1.34 We consider the system theBenchmark. 2.26/1.34 2.26/1.34 Alphabet: 2.26/1.34 2.26/1.34 chain : [N -> N * list] --> list 2.26/1.34 cons : [N * list] --> list 2.26/1.34 false : [] --> B 2.26/1.34 from : [N * list] --> list 2.26/1.34 if : [B * list * list] --> list 2.26/1.34 incch : [list] --> list 2.26/1.34 lteq : [N * N] --> B 2.26/1.34 nil : [] --> list 2.26/1.34 o : [] --> N 2.26/1.34 s : [N] --> N 2.26/1.34 true : [] --> B 2.26/1.34 2.26/1.34 Rules: 2.26/1.34 2.26/1.34 if(true, x, y) => x 2.26/1.34 if(false, x, y) => y 2.26/1.34 lteq(s(x), o) => false 2.26/1.34 lteq(o, x) => true 2.26/1.34 lteq(s(x), s(y)) => lteq(x, y) 2.26/1.34 from(x, nil) => nil 2.26/1.34 from(x, cons(y, z)) => if(lteq(x, y), cons(y, z), from(x, z)) 2.26/1.34 chain(f, nil) => nil 2.26/1.34 chain(f, cons(x, y)) => cons(f x, chain(f, from(f x, y))) 2.26/1.34 incch(x) => chain(/\y.s(y), x) 2.26/1.34 2.26/1.34 This AFS is converted to an AFSM simply by replacing all free variables by meta-variables (with arity 0). 2.26/1.34 2.26/1.34 We observe that the rules contain a first-order subset: 2.26/1.34 2.26/1.34 if(true, X, Y) => X 2.26/1.34 if(false, X, Y) => Y 2.26/1.34 lteq(s(X), o) => false 2.26/1.34 lteq(o, X) => true 2.26/1.34 lteq(s(X), s(Y)) => lteq(X, Y) 2.26/1.34 from(X, nil) => nil 2.26/1.34 from(X, cons(Y, Z)) => if(lteq(X, Y), cons(Y, Z), from(X, Z)) 2.26/1.34 2.26/1.34 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.26/1.34 2.26/1.34 According to the external first-order termination prover, this system is indeed terminating: 2.26/1.34 2.26/1.34 || proof of resources/system.trs 2.26/1.34 || # AProVE Commit ID: d84c10301d352dfd14de2104819581f4682260f5 fuhs 20130616 2.26/1.34 || 2.26/1.34 || 2.26/1.34 || Termination w.r.t. Q of the given QTRS could be proven: 2.26/1.34 || 2.26/1.34 || (0) QTRS 2.26/1.34 || (1) QTRSRRRProof [EQUIVALENT] 2.26/1.34 || (2) QTRS 2.26/1.34 || (3) RisEmptyProof [EQUIVALENT] 2.26/1.34 || (4) YES 2.26/1.34 || 2.26/1.34 || 2.26/1.34 || ---------------------------------------- 2.26/1.34 || 2.26/1.34 || (0) 2.26/1.34 || Obligation: 2.26/1.34 || Q restricted rewrite system: 2.26/1.34 || The TRS R consists of the following rules: 2.26/1.34 || 2.26/1.34 || if(true, %X, %Y) -> %X 2.26/1.34 || if(false, %X, %Y) -> %Y 2.26/1.34 || lteq(s(%X), o) -> false 2.26/1.34 || lteq(o, %X) -> true 2.26/1.34 || lteq(s(%X), s(%Y)) -> lteq(%X, %Y) 2.26/1.34 || from(%X, nil) -> nil 2.26/1.34 || from(%X, cons(%Y, %Z)) -> if(lteq(%X, %Y), cons(%Y, %Z), from(%X, %Z)) 2.26/1.34 || 2.26/1.34 || Q is empty. 2.26/1.34 || 2.26/1.34 || ---------------------------------------- 2.26/1.34 || 2.26/1.34 || (1) QTRSRRRProof (EQUIVALENT) 2.26/1.34 || Used ordering: 2.26/1.34 || Quasi precedence: 2.26/1.34 || from_2 > [if_3, cons_2] 2.26/1.34 || from_2 > lteq_2 > [true, false, o] 2.26/1.34 || from_2 > nil 2.26/1.34 || 2.26/1.34 || 2.26/1.34 || Status: 2.26/1.34 || if_3: multiset status 2.26/1.34 || true: multiset status 2.26/1.34 || false: multiset status 2.26/1.34 || lteq_2: [2,1] 2.26/1.34 || s_1: [1] 2.26/1.34 || o: multiset status 2.26/1.34 || from_2: multiset status 2.26/1.34 || nil: multiset status 2.26/1.34 || cons_2: multiset status 2.26/1.34 || 2.26/1.34 || With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: 2.26/1.34 || 2.26/1.34 || if(true, %X, %Y) -> %X 2.26/1.34 || if(false, %X, %Y) -> %Y 2.26/1.34 || lteq(s(%X), o) -> false 2.26/1.34 || lteq(o, %X) -> true 2.26/1.34 || lteq(s(%X), s(%Y)) -> lteq(%X, %Y) 2.26/1.34 || from(%X, nil) -> nil 2.26/1.34 || from(%X, cons(%Y, %Z)) -> if(lteq(%X, %Y), cons(%Y, %Z), from(%X, %Z)) 2.26/1.34 || 2.26/1.34 || 2.26/1.34 || 2.26/1.34 || 2.26/1.34 || ---------------------------------------- 2.26/1.34 || 2.26/1.34 || (2) 2.26/1.34 || Obligation: 2.26/1.34 || Q restricted rewrite system: 2.26/1.34 || R is empty. 2.26/1.34 || Q is empty. 2.26/1.34 || 2.26/1.34 || ---------------------------------------- 2.26/1.34 || 2.26/1.34 || (3) RisEmptyProof (EQUIVALENT) 2.26/1.34 || The TRS R is empty. Hence, termination is trivially proven. 2.26/1.34 || ---------------------------------------- 2.26/1.34 || 2.26/1.34 || (4) 2.26/1.34 || YES 2.26/1.34 || 2.26/1.34 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.26/1.34 2.26/1.34 We thus obtain the following dependency pair problem (P_0, R_0, static, formative): 2.26/1.34 2.26/1.34 Dependency Pairs P_0: 2.26/1.34 2.26/1.34 0] chain#(F, cons(X, Y)) =#> chain#(F, from(F X, Y)) 2.26/1.34 1] chain#(F, cons(X, Y)) =#> from#(F X, Y) 2.26/1.34 2] incch#(X) =#> chain#(/\x.s(x), X) 2.26/1.34 2.26/1.34 Rules R_0: 2.26/1.34 2.26/1.34 if(true, X, Y) => X 2.26/1.34 if(false, X, Y) => Y 2.26/1.34 lteq(s(X), o) => false 2.26/1.34 lteq(o, X) => true 2.26/1.34 lteq(s(X), s(Y)) => lteq(X, Y) 2.26/1.34 from(X, nil) => nil 2.26/1.34 from(X, cons(Y, Z)) => if(lteq(X, Y), cons(Y, Z), from(X, Z)) 2.26/1.34 chain(F, nil) => nil 2.26/1.34 chain(F, cons(X, Y)) => cons(F X, chain(F, from(F X, Y))) 2.26/1.34 incch(X) => chain(/\x.s(x), X) 2.26/1.34 2.26/1.34 Thus, the original system is terminating if (P_0, R_0, static, formative) is finite. 2.26/1.34 2.26/1.34 We consider the dependency pair problem (P_0, R_0, static, formative). 2.26/1.34 2.26/1.34 We place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: 2.26/1.34 2.26/1.34 * 0 : 0, 1 2.26/1.34 * 1 : 2.26/1.34 * 2 : 0, 1 2.26/1.34 2.26/1.34 This graph has the following strongly connected components: 2.26/1.34 2.26/1.34 P_1: 2.26/1.34 2.26/1.34 chain#(F, cons(X, Y)) =#> chain#(F, from(F X, Y)) 2.26/1.34 2.26/1.34 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). 2.26/1.34 2.26/1.34 Thus, the original system is terminating if (P_1, R_0, static, formative) is finite. 2.26/1.34 2.26/1.34 We consider the dependency pair problem (P_1, R_0, static, formative). 2.26/1.34 2.26/1.34 The formative rules of (P_1, R_0) are R_1 ::= 2.26/1.34 2.26/1.34 if(true, X, Y) => X 2.26/1.34 if(false, X, Y) => Y 2.26/1.34 lteq(s(X), o) => false 2.26/1.34 lteq(o, X) => true 2.26/1.34 lteq(s(X), s(Y)) => lteq(X, Y) 2.26/1.34 from(X, cons(Y, Z)) => if(lteq(X, Y), cons(Y, Z), from(X, Z)) 2.26/1.34 chain(F, cons(X, Y)) => cons(F X, chain(F, from(F X, Y))) 2.26/1.34 incch(X) => chain(/\x.s(x), X) 2.26/1.34 2.26/1.34 By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_1, R_0, static, formative) by (P_1, R_1, static, formative). 2.26/1.34 2.26/1.34 Thus, the original system is terminating if (P_1, R_1, static, formative) is finite. 2.26/1.34 2.26/1.34 We consider the dependency pair problem (P_1, R_1, static, formative). 2.26/1.34 2.26/1.34 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.26/1.34 2.26/1.34 chain#(F, cons(X, Y)) >? chain#(F, from(F X, Y)) 2.26/1.34 if(true, X, Y) >= X 2.26/1.34 if(false, X, Y) >= Y 2.26/1.34 lteq(s(X), o) >= false 2.26/1.34 lteq(o, X) >= true 2.26/1.34 lteq(s(X), s(Y)) >= lteq(X, Y) 2.26/1.34 from(X, cons(Y, Z)) >= if(lteq(X, Y), cons(Y, Z), from(X, Z)) 2.26/1.34 chain(F, cons(X, Y)) >= cons(F X, chain(F, from(F X, Y))) 2.26/1.34 incch(X) >= chain(/\x.s(x), X) 2.26/1.34 2.26/1.34 We apply [Kop12, Thm. 6.75] and use the following argument functions: 2.26/1.34 2.26/1.34 pi( incch(X) ) = #argfun-incch#(chain(/\x.s(x), X)) 2.26/1.34 2.26/1.34 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.26/1.34 2.26/1.34 We use a recursive path ordering as defined in [Kop12, Chapter 5]. 2.26/1.34 2.26/1.34 Argument functions: 2.26/1.34 2.26/1.34 [[chain#(x_1, x_2)]] = chain#(x_2, x_1) 2.26/1.34 [[from(x_1, x_2)]] = from(x_2) 2.26/1.34 [[if(x_1, x_2, x_3)]] = if(x_2, x_3) 2.26/1.34 [[incch(x_1)]] = x_1 2.26/1.34 [[lteq(x_1, x_2)]] = x_1 2.26/1.34 [[true]] = _|_ 2.26/1.34 2.26/1.34 We choose Lex = {chain#} and Mul = {#argfun-incch#, @_{o -> o}, chain, cons, false, from, if, o, s}, and the following precedence: chain# > #argfun-incch# > chain > s > cons > @_{o -> o} > from > if > o > false 2.26/1.34 2.26/1.34 Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: 2.26/1.34 2.26/1.34 chain#(F, cons(X, Y)) > chain#(F, from(Y)) 2.26/1.34 if(X, Y) >= X 2.26/1.34 if(X, Y) >= Y 2.26/1.34 s(X) >= false 2.26/1.34 o >= _|_ 2.26/1.34 s(X) >= X 2.26/1.34 from(cons(X, Y)) >= if(cons(X, Y), from(Y)) 2.26/1.34 chain(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), chain(F, from(Y))) 2.26/1.34 #argfun-incch#(chain(/\x.s(x), X)) >= chain(/\x.s(x), X) 2.26/1.34 2.26/1.34 With these choices, we have: 2.26/1.34 2.26/1.34 1] chain#(F, cons(X, Y)) > chain#(F, from(Y)) because [2], by definition 2.26/1.34 2] chain#*(F, cons(X, Y)) >= chain#(F, from(Y)) because [3], [7] and [9], by (Stat) 2.26/1.34 3] cons(X, Y) > from(Y) because [4], by definition 2.26/1.34 4] cons*(X, Y) >= from(Y) because cons > from and [5], by (Copy) 2.26/1.34 5] cons*(X, Y) >= Y because [6], by (Select) 2.26/1.34 6] Y >= Y by (Meta) 2.26/1.34 7] chain#*(F, cons(X, Y)) >= F because [8], by (Select) 2.26/1.34 8] F >= F by (Meta) 2.26/1.34 9] chain#*(F, cons(X, Y)) >= from(Y) because chain# > from and [10], by (Copy) 2.26/1.34 10] chain#*(F, cons(X, Y)) >= Y because [11], by (Select) 2.26/1.34 11] cons(X, Y) >= Y because [5], by (Star) 2.26/1.34 2.26/1.34 12] if(X, Y) >= X because [13], by (Star) 2.26/1.34 13] if*(X, Y) >= X because [14], by (Select) 2.26/1.34 14] X >= X by (Meta) 2.26/1.34 2.26/1.34 15] if(X, Y) >= Y because [16], by (Star) 2.26/1.34 16] if*(X, Y) >= Y because [17], by (Select) 2.26/1.34 17] Y >= Y by (Meta) 2.26/1.34 2.26/1.34 18] s(X) >= false because [19], by (Star) 2.26/1.34 19] s*(X) >= false because s > false, by (Copy) 2.26/1.34 2.26/1.34 20] o >= _|_ by (Bot) 2.26/1.34 2.26/1.34 21] s(X) >= X because [22], by (Star) 2.26/1.34 22] s*(X) >= X because [23], by (Select) 2.26/1.34 23] X >= X by (Meta) 2.26/1.34 2.26/1.34 24] from(cons(X, Y)) >= if(cons(X, Y), from(Y)) because [25], by (Star) 2.26/1.34 25] from*(cons(X, Y)) >= if(cons(X, Y), from(Y)) because from > if, [26] and [30], by (Copy) 2.26/1.34 26] from*(cons(X, Y)) >= cons(X, Y) because [27], by (Select) 2.26/1.34 27] cons(X, Y) >= cons(X, Y) because cons in Mul, [28] and [29], by (Fun) 2.26/1.34 28] X >= X by (Meta) 2.26/1.34 29] Y >= Y by (Meta) 2.26/1.34 30] from*(cons(X, Y)) >= from(Y) because [31], by (Select) 2.26/1.34 31] cons(X, Y) >= from(Y) because [32], by (Star) 2.26/1.34 32] cons*(X, Y) >= from(Y) because cons > from and [33], by (Copy) 2.26/1.34 33] cons*(X, Y) >= Y because [29], by (Select) 2.26/1.34 2.26/1.34 34] chain(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), chain(F, from(Y))) because [35], by (Star) 2.26/1.34 35] chain*(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), chain(F, from(Y))) because chain > cons, [36] and [42], by (Copy) 2.26/1.34 36] chain*(F, cons(X, Y)) >= @_{o -> o}(F, X) because chain > @_{o -> o}, [37] and [38], by (Copy) 2.26/1.34 37] chain*(F, cons(X, Y)) >= F because [8], by (Select) 2.26/1.34 38] chain*(F, cons(X, Y)) >= X because [39], by (Select) 2.26/1.34 39] cons(X, Y) >= X because [40], by (Star) 2.26/1.34 40] cons*(X, Y) >= X because [41], by (Select) 2.26/1.34 41] X >= X by (Meta) 2.26/1.34 42] chain*(F, cons(X, Y)) >= chain(F, from(Y)) because chain in Mul, [43] and [3], by (Stat) 2.26/1.34 43] F >= F by (Meta) 2.26/1.34 2.26/1.34 44] #argfun-incch#(chain(/\x.s(x), X)) >= chain(/\x.s(x), X) because [45], by (Star) 2.26/1.34 45] #argfun-incch#*(chain(/\x.s(x), X)) >= chain(/\x.s(x), X) because #argfun-incch# > chain, [46] and [50], by (Copy) 2.26/1.34 46] #argfun-incch#*(chain(/\x.s(x), X)) >= /\x.s(x) because [47], by (F-Abs) 2.26/1.34 47] #argfun-incch#*(chain(/\x.s(x), X), y) >= s(y) because #argfun-incch# > s and [48], by (Copy) 2.26/1.34 48] #argfun-incch#*(chain(/\x.s(x), X), y) >= y because [49], by (Select) 2.26/1.34 49] y >= y by (Var) 2.26/1.34 50] #argfun-incch#*(chain(/\x.s(x), X)) >= X because [51], by (Select) 2.26/1.34 51] chain(/\x.s(x), X) >= X because [52], by (Star) 2.26/1.34 52] chain*(/\x.s(x), X) >= X because [53], by (Select) 2.26/1.34 53] X >= X by (Meta) 2.26/1.34 2.26/1.34 By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_1, R_1) by ({}, R_1). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. 2.26/1.34 2.26/1.34 As all dependency pair problems were succesfully simplified with sound (and complete) processors until nothing remained, we conclude termination. 2.26/1.34 2.26/1.34 2.26/1.34 +++ Citations +++ 2.26/1.34 2.26/1.34 [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. 2.26/1.34 [Kop13] C. Kop. Static Dependency Pairs with Accessibility. Unpublished manuscript, http://cl-informatik.uibk.ac.at/users/kop/static.pdf, 2013. 2.26/1.34 [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.26/1.34 EOF