/export/starexec/sandbox2/solver/bin/starexec_run_HigherOrder /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES We consider the system theBenchmark. Alphabet: 0 : [] --> nat find0 : [nat -> nat * nat * nat] --> nat if : [nat * nat * nat] --> nat min : [nat * nat] --> nat nul : [nat -> nat * nat] --> nat s : [nat] --> nat Rules: min(s(x), s(y)) => min(x, y) min(x, 0) => 0 min(0, x) => 0 min(nul(f, x), y) => nul(f, min(x, y)) nul(f, x) => find0(f, 0, x) find0(f, x, 0) => x find0(f, x, s(y)) => if(f x, find0(f, s(x), y), x) if(s(x), y, z) => y if(0, x, y) => y 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(s(X), Y, Z) => Y if(0, X, Y) => Y Moreover, the system is finitely branching. 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 Ce-terminating when seen as a many-sorted first-order TRS. According to the external first-order termination prover, this system is indeed Ce-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(s(%X), %Y, %Z) -> %Y || if(0, %X, %Y) -> %Y || ~PAIR(%X, %Y) -> %X || ~PAIR(%X, %Y) -> %Y || || Q is empty. || || ---------------------------------------- || || (1) QTRSRRRProof (EQUIVALENT) || Used ordering: || Polynomial interpretation [POLO]: || || POL(0) = 2 || POL(if(x_1, x_2, x_3)) = 2 + 2*x_1 + x_2 + x_3 || POL(s(x_1)) = 2 + x_1 || POL(~PAIR(x_1, x_2)) = 2 + x_1 + x_2 || With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: || || if(s(%X), %Y, %Z) -> %Y || if(0, %X, %Y) -> %Y || ~PAIR(%X, %Y) -> %X || ~PAIR(%X, %Y) -> %Y || || || || || ---------------------------------------- || || (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 dynamic dependency pairs. After applying [Kop12, Thm. 7.22] to denote collapsing dependency pairs in an extended form, we thus obtain the following dependency pair problem (P_0, R_0, minimal, formative): Dependency Pairs P_0: 0] min#(s(X), s(Y)) =#> min#(X, Y) 1] min#(nul(F, X), Y) =#> nul#(F, min(X, Y)) 2] min#(nul(F, X), Y) =#> min#(X, Y) 3] nul#(F, X) =#> find0#(F, 0, X) 4] find0#(F, X, s(Y)) =#> if#(F X, find0(F, s(X), Y), X) 5] find0#(F, X, s(Y)) =#> F(X) 6] find0#(F, X, s(Y)) =#> find0#(F, s(X), Y) Rules R_0: min(s(X), s(Y)) => min(X, Y) min(X, 0) => 0 min(0, X) => 0 min(nul(F, X), Y) => nul(F, min(X, Y)) nul(F, X) => find0(F, 0, X) find0(F, X, 0) => X find0(F, X, s(Y)) => if(F X, find0(F, s(X), Y), X) if(s(X), Y, Z) => Y if(0, X, Y) => Y 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, 2 * 1 : 3 * 2 : 0, 1, 2 * 3 : 4, 5, 6 * 4 : * 5 : 0, 1, 2, 3, 4, 5, 6 * 6 : 4, 5, 6 This graph has the following strongly connected components: P_1: min#(s(X), s(Y)) =#> min#(X, Y) min#(nul(F, X), Y) =#> nul#(F, min(X, Y)) min#(nul(F, X), Y) =#> min#(X, Y) nul#(F, X) =#> find0#(F, 0, X) find0#(F, X, s(Y)) =#> F(X) find0#(F, X, s(Y)) =#> find0#(F, s(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). We will use the reduction pair processor [Kop12, Thm. 7.16]. As the system is abstraction-simple and the formative flag is set, it suffices to find a tagged reduction pair [Kop12, Def. 6.70]. Thus, we must orient: min#(s(X), s(Y)) >? min#(X, Y) min#(nul(F, X), Y) >? nul#(F, min(X, Y)) min#(nul(F, X), Y) >? min#(X, Y) nul#(F, X) >? find0#(F, 0, X) find0#(F, X, s(Y)) >? F(X) find0#(F, X, s(Y)) >? find0#(F, s(X), Y) min(s(X), s(Y)) >= min(X, Y) min(X, 0) >= 0 min(0, X) >= 0 min(nul(F, X), Y) >= nul(F, min(X, Y)) nul(F, X) >= find0(F, 0, X) find0(F, X, 0) >= X find0(F, X, s(Y)) >= if(F X, find0(F, s(X), Y), X) if(s(X), Y, Z) >= Y if(0, X, Y) >= Y We apply [Kop12, Thm. 6.75] and use the following argument functions: pi( nul#(F, X) ) = #argfun-nul##(find0#(F, 0, 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: [[0]] = _|_ [[find0(x_1, x_2, x_3)]] = find0(x_3, x_2, x_1) [[find0#(x_1, x_2, x_3)]] = find0#(x_3, x_2, x_1) [[min(x_1, x_2)]] = x_1 We choose Lex = {find0, find0#} and Mul = {#argfun-nul##, @_{o -> o}, if, min#, nul, nul#, s}, and the following precedence: min# > #argfun-nul## > nul > find0 > find0# > @_{o -> o} > if > nul# > s Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: min#(s(X), s(Y)) >= min#(X, Y) min#(nul(F, X), Y) >= #argfun-nul##(find0#(F, _|_, X)) min#(nul(F, X), Y) >= min#(X, Y) #argfun-nul##(find0#(F, _|_, X)) >= find0#(F, _|_, X) find0#(F, X, s(Y)) >= @_{o -> o}(F, X) find0#(F, X, s(Y)) > find0#(F, s(X), Y) s(X) >= X X >= _|_ _|_ >= _|_ nul(F, X) >= nul(F, X) nul(F, X) >= find0(F, _|_, X) find0(F, X, _|_) >= X find0(F, X, s(Y)) >= if(@_{o -> o}(F, X), find0(F, s(X), Y), X) if(s(X), Y, Z) >= Y if(_|_, X, Y) >= Y With these choices, we have: 1] min#(s(X), s(Y)) >= min#(X, Y) because [2], by (Star) 2] min#*(s(X), s(Y)) >= min#(X, Y) because min# in Mul, [3] and [6], by (Stat) 3] s(X) >= X because [4], by (Star) 4] s*(X) >= X because [5], by (Select) 5] X >= X by (Meta) 6] s(Y) > Y because [7], by definition 7] s*(Y) >= Y because [8], by (Select) 8] Y >= Y by (Meta) 9] min#(nul(F, X), Y) >= #argfun-nul##(find0#(F, _|_, X)) because [10], by (Star) 10] min#*(nul(F, X), Y) >= #argfun-nul##(find0#(F, _|_, X)) because min# > #argfun-nul## and [11], by (Copy) 11] min#*(nul(F, X), Y) >= find0#(F, _|_, X) because [12], by (Select) 12] nul(F, X) >= find0#(F, _|_, X) because [13], by (Star) 13] nul*(F, X) >= find0#(F, _|_, X) because nul > find0#, [14], [16] and [17], by (Copy) 14] nul*(F, X) >= F because [15], by (Select) 15] F >= F by (Meta) 16] nul*(F, X) >= _|_ by (Bot) 17] nul*(F, X) >= X because [18], by (Select) 18] X >= X by (Meta) 19] min#(nul(F, X), Y) >= min#(X, Y) because [20], by (Star) 20] min#*(nul(F, X), Y) >= min#(X, Y) because min# in Mul, [21] and [22], by (Stat) 21] nul(F, X) > X because [17], by definition 22] Y >= Y by (Meta) 23] #argfun-nul##(find0#(F, _|_, X)) >= find0#(F, _|_, X) because [24], by (Star) 24] #argfun-nul##*(find0#(F, _|_, X)) >= find0#(F, _|_, X) because [25], by (Select) 25] find0#(F, _|_, X) >= find0#(F, _|_, X) because [26], [27] and [28], by (Fun) 26] F >= F by (Meta) 27] _|_ >= _|_ by (Bot) 28] X >= X by (Meta) 29] find0#(F, X, s(Y)) >= @_{o -> o}(F, X) because [30], by (Star) 30] find0#*(F, X, s(Y)) >= @_{o -> o}(F, X) because find0# > @_{o -> o}, [31] and [33], by (Copy) 31] find0#*(F, X, s(Y)) >= F because [32], by (Select) 32] F >= F by (Meta) 33] find0#*(F, X, s(Y)) >= X because [34], by (Select) 34] X >= X by (Meta) 35] find0#(F, X, s(Y)) > find0#(F, s(X), Y) because [36], by definition 36] find0#*(F, X, s(Y)) >= find0#(F, s(X), Y) because [37], [31], [40] and [41], by (Stat) 37] s(Y) > Y because [38], by definition 38] s*(Y) >= Y because [39], by (Select) 39] Y >= Y by (Meta) 40] find0#*(F, X, s(Y)) >= s(X) because find0# > s and [33], by (Copy) 41] find0#*(F, X, s(Y)) >= Y because [42], by (Select) 42] s(Y) >= Y because [38], by (Star) 43] s(X) >= X because [4], by (Star) 44] X >= _|_ by (Bot) 45] _|_ >= _|_ by (Bot) 46] nul(F, X) >= nul(F, X) because nul in Mul, [47] and [48], by (Fun) 47] F >= F by (Meta) 48] X >= X by (Meta) 49] nul(F, X) >= find0(F, _|_, X) because [50], by (Star) 50] nul*(F, X) >= find0(F, _|_, X) because nul > find0, [51], [52] and [53], by (Copy) 51] nul*(F, X) >= F because [26], by (Select) 52] nul*(F, X) >= _|_ by (Bot) 53] nul*(F, X) >= X because [28], by (Select) 54] find0(F, X, _|_) >= X because [55], by (Star) 55] find0*(F, X, _|_) >= X because [56], by (Select) 56] X >= X by (Meta) 57] find0(F, X, s(Y)) >= if(@_{o -> o}(F, X), find0(F, s(X), Y), X) because [58], by (Star) 58] find0*(F, X, s(Y)) >= if(@_{o -> o}(F, X), find0(F, s(X), Y), X) because find0 > if, [59], [62] and [61], by (Copy) 59] find0*(F, X, s(Y)) >= @_{o -> o}(F, X) because find0 > @_{o -> o}, [60] and [61], by (Copy) 60] find0*(F, X, s(Y)) >= F because [32], by (Select) 61] find0*(F, X, s(Y)) >= X because [34], by (Select) 62] find0*(F, X, s(Y)) >= find0(F, s(X), Y) because [37], [60], [63] and [64], by (Stat) 63] find0*(F, X, s(Y)) >= s(X) because find0 > s and [61], by (Copy) 64] find0*(F, X, s(Y)) >= Y because [42], by (Select) 65] if(s(X), Y, Z) >= Y because [66], by (Star) 66] if*(s(X), Y, Z) >= Y because [67], by (Select) 67] Y >= Y by (Meta) 68] if(_|_, X, Y) >= Y because [69], by (Star) 69] if*(_|_, X, Y) >= Y because [70], by (Select) 70] Y >= Y by (Meta) 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, formative) by (P_2, R_0, minimal, formative), where P_2 consists of: min#(s(X), s(Y)) =#> min#(X, Y) min#(nul(F, X), Y) =#> nul#(F, min(X, Y)) min#(nul(F, X), Y) =#> min#(X, Y) nul#(F, X) =#> find0#(F, 0, X) find0#(F, X, s(Y)) =#> F(X) Thus, the original system is terminating if (P_2, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_2, R_0, minimal, formative). We will use the reduction pair processor [Kop12, Thm. 7.16]. As the system is abstraction-simple and the formative flag is set, it suffices to find a tagged reduction pair [Kop12, Def. 6.70]. Thus, we must orient: min#(s(X), s(Y)) >? min#(X, Y) min#(nul(F, X), Y) >? nul#(F, min(X, Y)) min#(nul(F, X), Y) >? min#(X, Y) nul#(F, X) >? find0#(F, 0, X) find0#(F, X, s(Y)) >? F(X) min(s(X), s(Y)) >= min(X, Y) min(X, 0) >= 0 min(0, X) >= 0 min(nul(F, X), Y) >= nul(F, min(X, Y)) nul(F, X) >= find0(F, 0, X) find0(F, X, 0) >= X find0(F, X, s(Y)) >= if(F X, find0(F, s(X), Y), X) if(s(X), Y, Z) >= Y if(0, X, Y) >= Y We apply [Kop12, Thm. 6.75] and use the following argument functions: pi( nul#(F, X) ) = #argfun-nul##(find0#(F, 0, 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: [[0]] = _|_ [[find0(x_1, x_2, x_3)]] = find0(x_3, x_1, x_2) [[if(x_1, x_2, x_3)]] = if(x_2, x_3) [[min(x_1, x_2)]] = x_1 We choose Lex = {find0} and Mul = {#argfun-nul##, @_{o -> o}, find0#, if, min#, nul, nul#, s}, and the following precedence: min# > nul > #argfun-nul## > nul# > find0# > find0 > if > @_{o -> o} > s Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: min#(s(X), s(Y)) > min#(X, Y) min#(nul(F, X), Y) >= #argfun-nul##(find0#(F, _|_, X)) min#(nul(F, X), Y) >= min#(X, Y) #argfun-nul##(find0#(F, _|_, X)) > find0#(F, _|_, X) find0#(F, X, s(Y)) > @_{o -> o}(F, X) s(X) >= X X >= _|_ _|_ >= _|_ nul(F, X) >= nul(F, X) nul(F, X) >= find0(F, _|_, X) find0(F, X, _|_) >= X find0(F, X, s(Y)) >= if(find0(F, s(X), Y), X) if(X, Y) >= X if(X, Y) >= Y With these choices, we have: 1] min#(s(X), s(Y)) > min#(X, Y) because [2], by definition 2] min#*(s(X), s(Y)) >= min#(X, Y) because min# in Mul, [3] and [6], by (Stat) 3] s(X) >= X because [4], by (Star) 4] s*(X) >= X because [5], by (Select) 5] X >= X by (Meta) 6] s(Y) > Y because [7], by definition 7] s*(Y) >= Y because [8], by (Select) 8] Y >= Y by (Meta) 9] min#(nul(F, X), Y) >= #argfun-nul##(find0#(F, _|_, X)) because [10], by (Star) 10] min#*(nul(F, X), Y) >= #argfun-nul##(find0#(F, _|_, X)) because min# > #argfun-nul## and [11], by (Copy) 11] min#*(nul(F, X), Y) >= find0#(F, _|_, X) because [12], by (Select) 12] nul(F, X) >= find0#(F, _|_, X) because [13], by (Star) 13] nul*(F, X) >= find0#(F, _|_, X) because nul > find0#, [14], [16] and [17], by (Copy) 14] nul*(F, X) >= F because [15], by (Select) 15] F >= F by (Meta) 16] nul*(F, X) >= _|_ by (Bot) 17] nul*(F, X) >= X because [18], by (Select) 18] X >= X by (Meta) 19] min#(nul(F, X), Y) >= min#(X, Y) because min# in Mul, [20] and [21], by (Fun) 20] nul(F, X) >= X because [17], by (Star) 21] Y >= Y by (Meta) 22] #argfun-nul##(find0#(F, _|_, X)) > find0#(F, _|_, X) because [23], by definition 23] #argfun-nul##*(find0#(F, _|_, X)) >= find0#(F, _|_, X) because [24], by (Select) 24] find0#(F, _|_, X) >= find0#(F, _|_, X) because find0# in Mul, [25], [26] and [27], by (Fun) 25] F >= F by (Meta) 26] _|_ >= _|_ by (Bot) 27] X >= X by (Meta) 28] find0#(F, X, s(Y)) > @_{o -> o}(F, X) because [29], by definition 29] find0#*(F, X, s(Y)) >= @_{o -> o}(F, X) because find0# > @_{o -> o}, [30] and [32], by (Copy) 30] find0#*(F, X, s(Y)) >= F because [31], by (Select) 31] F >= F by (Meta) 32] find0#*(F, X, s(Y)) >= X because [33], by (Select) 33] X >= X by (Meta) 34] s(X) >= X because [4], by (Star) 35] X >= _|_ by (Bot) 36] _|_ >= _|_ by (Bot) 37] nul(F, X) >= nul(F, X) because nul in Mul, [38] and [39], by (Fun) 38] F >= F by (Meta) 39] X >= X by (Meta) 40] nul(F, X) >= find0(F, _|_, X) because [41], by (Star) 41] nul*(F, X) >= find0(F, _|_, X) because nul > find0, [42], [43] and [44], by (Copy) 42] nul*(F, X) >= F because [25], by (Select) 43] nul*(F, X) >= _|_ by (Bot) 44] nul*(F, X) >= X because [27], by (Select) 45] find0(F, X, _|_) >= X because [46], by (Star) 46] find0*(F, X, _|_) >= X because [47], by (Select) 47] X >= X by (Meta) 48] find0(F, X, s(Y)) >= if(find0(F, s(X), Y), X) because [49], by (Star) 49] find0*(F, X, s(Y)) >= if(find0(F, s(X), Y), X) because find0 > if, [50] and [56], by (Copy) 50] find0*(F, X, s(Y)) >= find0(F, s(X), Y) because [51], [54], [55] and [57], by (Stat) 51] s(Y) > Y because [52], by definition 52] s*(Y) >= Y because [53], by (Select) 53] Y >= Y by (Meta) 54] find0*(F, X, s(Y)) >= F because [31], by (Select) 55] find0*(F, X, s(Y)) >= s(X) because find0 > s and [56], by (Copy) 56] find0*(F, X, s(Y)) >= X because [33], by (Select) 57] find0*(F, X, s(Y)) >= Y because [58], by (Select) 58] s(Y) >= Y because [52], by (Star) 59] if(X, Y) >= X because [60], by (Star) 60] if*(X, Y) >= X because [61], by (Select) 61] X >= X by (Meta) 62] if(X, Y) >= Y because [63], by (Star) 63] if*(X, Y) >= Y because [64], by (Select) 64] Y >= Y by (Meta) By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_2, R_0, minimal, formative) by (P_3, R_0, minimal, formative), where P_3 consists of: min#(nul(F, X), Y) =#> nul#(F, min(X, Y)) min#(nul(F, X), Y) =#> min#(X, Y) Thus, the original system is terminating if (P_3, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_3, 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, 1 This graph has the following strongly connected components: P_4: min#(nul(F, X), Y) =#> min#(X, Y) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_3, R_0, m, f) by (P_4, R_0, m, f). Thus, the original system is terminating if (P_4, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_4, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(min#) = 1 Thus, we can orient the dependency pairs as follows: nu(min#(nul(F, X), Y)) = nul(F, X) |> X = nu(min#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_4, 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.