/export/starexec/sandbox/solver/bin/starexec_run_HigherOrder /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES We consider the system theBenchmark. Alphabet: chain : [N -> N * list] --> list cons : [N * list] --> list false : [] --> B from : [N * list] --> list if : [B * list * list] --> list incch : [list] --> list lteq : [N * N] --> B nil : [] --> list o : [] --> N s : [N] --> N true : [] --> B Rules: if(true, x, y) => x if(false, x, y) => y lteq(s(x), o) => false lteq(o, x) => true lteq(s(x), s(y)) => lteq(x, y) from(x, nil) => nil from(x, cons(y, z)) => if(lteq(x, y), cons(y, z), from(x, z)) chain(f, nil) => nil chain(f, cons(x, y)) => cons(f x, chain(f, from(f x, y))) incch(x) => chain(/\y.s(y), x) This AFS is converted to an AFSM simply by replacing all free variables by meta-variables (with arity 0). We observe that the rules contain a first-order subset: if(true, X, Y) => X if(false, X, Y) => Y lteq(s(X), o) => false lteq(o, X) => true lteq(s(X), s(Y)) => lteq(X, Y) from(X, nil) => nil from(X, cons(Y, Z)) => if(lteq(X, Y), cons(Y, Z), from(X, Z)) 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. According to the external first-order termination prover, this system is indeed terminating: || proof of resources/system.trs || # AProVE Commit ID: d84c10301d352dfd14de2104819581f4682260f5 fuhs 20130616 || || || Termination w.r.t. Q of the given QTRS could be proven: || || (0) QTRS || (1) QTRSRRRProof [EQUIVALENT] || (2) QTRS || (3) RisEmptyProof [EQUIVALENT] || (4) YES || || || ---------------------------------------- || || (0) || Obligation: || Q restricted rewrite system: || The TRS R consists of the following rules: || || if(true, %X, %Y) -> %X || if(false, %X, %Y) -> %Y || lteq(s(%X), o) -> false || lteq(o, %X) -> true || lteq(s(%X), s(%Y)) -> lteq(%X, %Y) || from(%X, nil) -> nil || from(%X, cons(%Y, %Z)) -> if(lteq(%X, %Y), cons(%Y, %Z), from(%X, %Z)) || || Q is empty. || || ---------------------------------------- || || (1) QTRSRRRProof (EQUIVALENT) || Used ordering: || Quasi precedence: || from_2 > [if_3, cons_2] || from_2 > lteq_2 > [true, false, o] || from_2 > nil || || || Status: || if_3: multiset status || true: multiset status || false: multiset status || lteq_2: [2,1] || s_1: [1] || o: multiset status || from_2: multiset status || nil: multiset status || cons_2: multiset status || || With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: || || if(true, %X, %Y) -> %X || if(false, %X, %Y) -> %Y || lteq(s(%X), o) -> false || lteq(o, %X) -> true || lteq(s(%X), s(%Y)) -> lteq(%X, %Y) || from(%X, nil) -> nil || from(%X, cons(%Y, %Z)) -> if(lteq(%X, %Y), cons(%Y, %Z), from(%X, %Z)) || || || || || ---------------------------------------- || || (2) || Obligation: || Q restricted rewrite system: || R is empty. || Q is empty. || || ---------------------------------------- || || (3) RisEmptyProof (EQUIVALENT) || The TRS R is empty. Hence, termination is trivially proven. || ---------------------------------------- || || (4) || YES || 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] chain#(F, cons(X, Y)) =#> chain#(F, from(F X, Y)) 1] chain#(F, cons(X, Y)) =#> from#(F X, Y) 2] incch#(X) =#> chain#(/\x.s(x), X) Rules R_0: if(true, X, Y) => X if(false, X, Y) => Y lteq(s(X), o) => false lteq(o, X) => true lteq(s(X), s(Y)) => lteq(X, Y) from(X, nil) => nil from(X, cons(Y, Z)) => if(lteq(X, Y), cons(Y, Z), from(X, Z)) chain(F, nil) => nil chain(F, cons(X, Y)) => cons(F X, chain(F, from(F X, Y))) incch(X) => chain(/\x.s(x), X) 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 : 0, 1 This graph has the following strongly connected components: P_1: chain#(F, cons(X, Y)) =#> chain#(F, from(F X, Y)) 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 ::= if(true, X, Y) => X if(false, X, Y) => Y lteq(s(X), o) => false lteq(o, X) => true lteq(s(X), s(Y)) => lteq(X, Y) from(X, cons(Y, Z)) => if(lteq(X, Y), cons(Y, Z), from(X, Z)) chain(F, cons(X, Y)) => cons(F X, chain(F, from(F X, Y))) incch(X) => chain(/\x.s(x), X) 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 [Kop12, Thm. 7.16]. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: chain#(F, cons(X, Y)) >? chain#(F, from(F X, Y)) if(true, X, Y) >= X if(false, X, Y) >= Y lteq(s(X), o) >= false lteq(o, X) >= true lteq(s(X), s(Y)) >= lteq(X, Y) from(X, cons(Y, Z)) >= if(lteq(X, Y), cons(Y, Z), from(X, Z)) chain(F, cons(X, Y)) >= cons(F X, chain(F, from(F X, Y))) incch(X) >= chain(/\x.s(x), X) We apply [Kop12, Thm. 6.75] and use the following argument functions: pi( incch(X) ) = #argfun-incch#(chain(/\x.s(x), X)) 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.) We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[chain#(x_1, x_2)]] = x_2 [[false]] = _|_ [[from(x_1, x_2)]] = from(x_2) [[if(x_1, x_2, x_3)]] = if(x_2, x_3) [[incch(x_1)]] = x_1 [[lteq(x_1, x_2)]] = _|_ [[true]] = _|_ We choose Lex = {} and Mul = {#argfun-incch#, @_{o -> o}, chain, cons, from, if, o, s}, and the following precedence: chain > s > o > #argfun-incch# > cons > @_{o -> o} > from > if Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: cons(X, Y) > from(Y) if(X, Y) >= X if(X, Y) >= Y _|_ >= _|_ _|_ >= _|_ _|_ >= _|_ from(cons(X, Y)) >= if(cons(X, Y), from(Y)) chain(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), chain(F, from(Y))) #argfun-incch#(chain(/\x.s(x), X)) >= chain(/\x.s(x), X) With these choices, we have: 1] cons(X, Y) > from(Y) because [2], by definition 2] cons*(X, Y) >= from(Y) because cons > from and [3], by (Copy) 3] cons*(X, Y) >= Y because [4], by (Select) 4] Y >= Y by (Meta) 5] if(X, Y) >= X because [6], by (Star) 6] if*(X, Y) >= X because [7], by (Select) 7] X >= X by (Meta) 8] if(X, Y) >= Y because [9], by (Star) 9] if*(X, Y) >= Y because [10], by (Select) 10] Y >= Y by (Meta) 11] _|_ >= _|_ by (Bot) 12] _|_ >= _|_ by (Bot) 13] _|_ >= _|_ by (Bot) 14] from(cons(X, Y)) >= if(cons(X, Y), from(Y)) because [15], by (Star) 15] from*(cons(X, Y)) >= if(cons(X, Y), from(Y)) because from > if, [16] and [20], by (Copy) 16] from*(cons(X, Y)) >= cons(X, Y) because [17], by (Select) 17] cons(X, Y) >= cons(X, Y) because cons in Mul, [18] and [19], by (Fun) 18] X >= X by (Meta) 19] Y >= Y by (Meta) 20] from*(cons(X, Y)) >= from(Y) because [21], by (Select) 21] cons(X, Y) >= from(Y) because [22], by (Star) 22] cons*(X, Y) >= from(Y) because cons > from and [23], by (Copy) 23] cons*(X, Y) >= Y because [19], by (Select) 24] chain(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), chain(F, from(Y))) because [25], by (Star) 25] chain*(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), chain(F, from(Y))) because chain > cons, [26] and [33], by (Copy) 26] chain*(F, cons(X, Y)) >= @_{o -> o}(F, X) because chain > @_{o -> o}, [27] and [29], by (Copy) 27] chain*(F, cons(X, Y)) >= F because [28], by (Select) 28] F >= F by (Meta) 29] chain*(F, cons(X, Y)) >= X because [30], by (Select) 30] cons(X, Y) >= X because [31], by (Star) 31] cons*(X, Y) >= X because [32], by (Select) 32] X >= X by (Meta) 33] chain*(F, cons(X, Y)) >= chain(F, from(Y)) because chain in Mul, [34] and [35], by (Stat) 34] F >= F by (Meta) 35] cons(X, Y) > from(Y) because [2], by definition 36] #argfun-incch#(chain(/\x.s(x), X)) >= chain(/\x.s(x), X) because [37], by (Star) 37] #argfun-incch#*(chain(/\x.s(x), X)) >= chain(/\x.s(x), X) because [38], by (Select) 38] chain(/\x.s(x), X) >= chain(/\x.s(x), X) because chain in Mul, [39] and [42], by (Fun) 39] /\y.s(y) >= /\y.s(y) because [40], by (Abs) 40] s(x) >= s(x) because s in Mul and [41], by (Fun) 41] x >= x by (Var) 42] X >= X by (Meta) 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. 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.