We consider the system h43. Alphabet: 0 : [] --> nat rec : [] --> nat -> nat -> (nat -> nat -> nat) -> nat s : [] --> nat -> nat xplus : [] --> nat -> nat -> nat xtimes : [] --> nat -> nat -> nat Rules: xplus x 0 => x xplus x (s y) => s (xplus x y) rec 0 x (/\y./\z.f y z) => x rec (s x) y (/\z./\u.f z u) => f x (rec x y (/\v./\w.f v w)) xtimes x y => rec y 0 (/\z./\u.xplus x u) Using the transformations described in [Kop11], this system can be brought in a form without leading free variables in the left-hand side, and where the left-hand side of a variable is always a functional term or application headed by a functional term. We now transform the resulting AFS into an AFSM by replacing all free variables by meta-variables (with arity 0). This leads to the following AFSM: Alphabet: 0 : [] --> nat rec : [nat * nat * nat -> nat -> nat] --> nat s : [nat] --> nat xplus : [nat * nat] --> nat xtimes : [nat * nat] --> nat ~AP1 : [nat -> nat -> nat * nat] --> nat -> nat Rules: xplus(X, 0) => X xplus(X, s(Y)) => s(xplus(X, Y)) rec(0, X, /\x./\y.~AP1(F, x) y) => X rec(s(X), Y, /\x./\y.~AP1(F, x) y) => ~AP1(F, X) rec(X, Y, /\z./\u.~AP1(F, z) u) xtimes(X, Y) => rec(Y, 0, /\x./\y.xplus(X, y)) rec(0, X, /\x./\y.xplus(x, y)) => X rec(0, X, /\x./\y.xtimes(x, y)) => X rec(s(X), Y, /\x./\y.xplus(x, y)) => xplus(X, rec(X, Y, /\z./\u.xplus(z, u))) rec(s(X), Y, /\x./\y.xtimes(x, y)) => xtimes(X, rec(X, Y, /\z./\u.xtimes(z, u))) ~AP1(F, X) => F X Symbol ~AP1 is an encoding for application that is only used in innocuous ways. We can simplify the program (without losing non-termination) by removing it. Additionally, we can remove some (now-)redundant rules. This gives: Alphabet: 0 : [] --> nat rec : [nat * nat * nat -> nat -> nat] --> nat s : [nat] --> nat xplus : [nat * nat] --> nat xtimes : [nat * nat] --> nat Rules: xplus(X, 0) => X xplus(X, s(Y)) => s(xplus(X, Y)) rec(0, X, /\x./\y.Y(x, y)) => X rec(s(X), Y, /\x./\y.Z(x, y)) => Z(X, rec(X, Y, /\z./\u.Z(z, u))) xtimes(X, Y) => rec(Y, 0, /\x./\y.xplus(X, y)) We observe that the rules contain a first-order subset: xplus(X, 0) => X xplus(X, s(Y)) => s(xplus(X, Y)) 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: || || xplus(%X, 0) -> %X || xplus(%X, s(%Y)) -> s(xplus(%X, %Y)) || || Q is empty. || || ---------------------------------------- || || (1) QTRSRRRProof (EQUIVALENT) || Used ordering: || Polynomial interpretation [POLO]: || || POL(0) = 2 || POL(s(x_1)) = 1 + x_1 || POL(xplus(x_1, x_2)) = 2 + 2*x_1 + 2*x_2 || With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: || || xplus(%X, 0) -> %X || xplus(%X, s(%Y)) -> s(xplus(%X, %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. We thus obtain the following dependency pair problem (P_0, R_0, minimal, formative): Dependency Pairs P_0: 0] rec#(s(X), Y, /\x./\y.Z(x, y)) =#> Z(X, rec(X, Y, /\z./\u.Z(z, u))) 1] rec#(s(X), Y, /\x./\y.Z(x, y)) =#> rec#(X, Y, /\z./\u.Z(z, u)) {Z : 2} 2] rec#(s(X), Y, /\x./\y.Z(x, y)) =#> Z(z, u) {Z : 2} 3] xtimes#(X, Y) =#> rec#(Y, 0, /\x./\y.xplus(X, y)) 4] xtimes#(X, Y) =#> xplus#(X, x) Rules R_0: xplus(X, 0) => X xplus(X, s(Y)) => s(xplus(X, Y)) rec(0, X, /\x./\y.Y(x, y)) => X rec(s(X), Y, /\x./\y.Z(x, y)) => Z(X, rec(X, Y, /\z./\u.Z(z, u))) xtimes(X, Y) => rec(Y, 0, /\x./\y.xplus(X, 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, 3, 4 * 1 : 0, 1, 2 * 2 : 0, 1, 2, 3, 4 * 3 : 0, 1, 2 * 4 : This graph has the following strongly connected components: P_1: rec#(s(X), Y, /\x./\y.Z(x, y)) =#> Z(X, rec(X, Y, /\z./\u.Z(z, u))) rec#(s(X), Y, /\x./\y.Z(x, y)) =#> rec#(X, Y, /\z./\u.Z(z, u)) {Z : 2} rec#(s(X), Y, /\x./\y.Z(x, y)) =#> Z(z, u) {Z : 2} xtimes#(X, Y) =#> rec#(Y, 0, /\x./\y.xplus(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: rec#(s(X), Y, /\x./\y.Z(x, y)) >? Z(X, rec(X, Y, /\z./\u.Z(z, u))) rec#(s(X), Y, /\x./\y.Z(x, y)) >? rec#(X, Y, /\z./\u.Z(z, u)) rec#(s(X), Y, /\x./\y.Z(x, y)) >? Z(~c0, ~c1) xtimes#(X, Y) >? rec#(Y, 0, /\x./\y.xplus-(X, y)) xplus(X, 0) >= X xplus(X, s(Y)) >= s(xplus(X, Y)) rec(0, X, /\x./\y.Y(x, y)) >= X rec(s(X), Y, /\x./\y.Z(x, y)) >= Z(X, rec(X, Y, /\z./\u.Z(z, u))) xtimes(X, Y) >= rec(Y, 0, /\x./\y.xplus-(X, y)) xplus-(X, Y) >= xplus(X, Y) We apply [Kop12, Thm. 6.75] and use the following argument functions: pi( xtimes(X, Y) ) = #argfun-xtimes#(rec(Y, 0, /\x./\y.xplus-(X, y))) pi( xtimes#(X, Y) ) = #argfun-xtimes##(rec#(Y, 0, /\x./\y.xplus-(X, y))) 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: [[#argfun-xtimes##(x_1)]] = x_1 [[~c0]] = _|_ [[~c1]] = _|_ We choose Lex = {} and Mul = {#argfun-xtimes#, 0, rec, rec#, s, xplus, xplus-, xtimes, xtimes#}, and the following precedence: rec# > xplus- > 0 > xtimes > rec > xplus > xtimes# > #argfun-xtimes# > s Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: rec#(s(X), Y, /\x./\y.Z(x, y)) >= Z(X, rec(X, Y, /\x./\y.Z(x, y))) rec#(s(X), Y, /\x./\y.Z(x, y)) >= rec#(X, Y, /\x./\y.Z(x, y)) rec#(s(X), Y, /\x./\y.Z(x, y)) > Z(_|_, _|_) rec#(X, 0, /\x./\y.xplus-(Y, y)) >= rec#(X, 0, /\x./\y.xplus-(Y, y)) xplus(X, 0) >= X xplus(X, s(Y)) >= s(xplus(X, Y)) rec(0, X, /\x./\y.Y(x, y)) >= X rec(s(X), Y, /\x./\y.Z(x, y)) >= Z(X, rec(X, Y, /\x./\y.Z(x, y))) #argfun-xtimes#(rec(X, 0, /\x./\y.xplus-(Y, y))) >= rec(X, 0, /\x./\y.xplus-(Y, y)) xplus-(X, Y) >= xplus(X, Y) With these choices, we have: 1] rec#(s(X), Y, /\x./\y.Z(x, y)) >= Z(X, rec(X, Y, /\x./\y.Z(x, y))) because [2], by (Star) 2] rec#*(s(X), Y, /\x./\y.Z(x, y)) >= Z(X, rec(X, Y, /\x./\y.Z(x, y))) because [3], by (Select) 3] Z(rec#*(s(X), Y, /\x./\y.Z(x, y)), rec#*(s(X), Y, /\z./\u.Z(z, u))) >= Z(X, rec(X, Y, /\x./\y.Z(x, y))) because [4] and [8], by (Meta) 4] rec#*(s(X), Y, /\x./\y.Z(x, y)) >= X because [5], by (Select) 5] s(X) >= X because [6], by (Star) 6] s*(X) >= X because [7], by (Select) 7] X >= X by (Meta) 8] rec#*(s(X), Y, /\x./\y.Z(x, y)) >= rec(X, Y, /\x./\y.Z(x, y)) because rec# > rec, [4], [9] and [11], by (Copy) 9] rec#*(s(X), Y, /\x./\y.Z(x, y)) >= Y because [10], by (Select) 10] Y >= Y by (Meta) 11] rec#*(s(X), Y, /\x./\y.Z(x, y)) >= /\x./\y.Z(x, y) because [12], by (Select) 12] /\x./\z.Z(x, z) >= /\x./\z.Z(x, z) because [13], by (Abs) 13] /\z.Z(y, z) >= /\z.Z(y, z) because [14], by (Abs) 14] Z(y, x) >= Z(y, x) because [15] and [16], by (Meta) 15] y >= y by (Var) 16] x >= x by (Var) 17] rec#(s(X), Y, /\x./\y.Z(x, y)) >= rec#(X, Y, /\x./\y.Z(x, y)) because rec# in Mul, [18], [19] and [20], by (Fun) 18] s(X) >= X because [6], by (Star) 19] Y >= Y by (Meta) 20] /\x./\z.Z(x, z) >= /\x./\z.Z(x, z) because [13], by (Abs) 21] rec#(s(X), Y, /\x./\y.Z(x, y)) > Z(_|_, _|_) because [22], by definition 22] rec#*(s(X), Y, /\x./\y.Z(x, y)) >= Z(_|_, _|_) because [23], by (Select) 23] Z(rec#*(s(X), Y, /\x./\y.Z(x, y)), rec#*(s(X), Y, /\z./\u.Z(z, u))) >= Z(_|_, _|_) because [24] and [25], by (Meta) 24] rec#*(s(X), Y, /\x./\y.Z(x, y)) >= _|_ by (Bot) 25] rec#*(s(X), Y, /\x./\y.Z(x, y)) >= _|_ by (Bot) 26] rec#(X, 0, /\x./\y.xplus-(Y, y)) >= rec#(X, 0, /\x./\y.xplus-(Y, y)) because rec# in Mul, [27], [28] and [29], by (Fun) 27] X >= X by (Meta) 28] 0 >= 0 by (Fun) 29] /\x./\y.xplus-(Y, y) >= /\x./\y.xplus-(Y, y) because [30], by (Abs) 30] /\y.xplus-(Y, y) >= /\y.xplus-(Y, y) because [31], by (Abs) 31] xplus-(Y, x) >= xplus-(Y, x) because xplus- in Mul, [32] and [33], by (Fun) 32] Y >= Y by (Meta) 33] x >= x by (Var) 34] xplus(X, 0) >= X because [35], by (Star) 35] xplus*(X, 0) >= X because [36], by (Select) 36] X >= X by (Meta) 37] xplus(X, s(Y)) >= s(xplus(X, Y)) because [38], by (Star) 38] xplus*(X, s(Y)) >= s(xplus(X, Y)) because xplus > s and [39], by (Copy) 39] xplus*(X, s(Y)) >= xplus(X, Y) because xplus in Mul, [40] and [41], by (Stat) 40] X >= X by (Meta) 41] s(Y) > Y because [42], by definition 42] s*(Y) >= Y because [43], by (Select) 43] Y >= Y by (Meta) 44] rec(0, X, /\x./\y.Y(x, y)) >= X because [45], by (Star) 45] rec*(0, X, /\x./\y.Y(x, y)) >= X because [46], by (Select) 46] X >= X by (Meta) 47] rec(s(X), Y, /\x./\y.Z(x, y)) >= Z(X, rec(X, Y, /\x./\y.Z(x, y))) because [48], by (Star) 48] rec*(s(X), Y, /\x./\y.Z(x, y)) >= Z(X, rec(X, Y, /\x./\y.Z(x, y))) because [49], by (Select) 49] Z(rec*(s(X), Y, /\x./\y.Z(x, y)), rec*(s(X), Y, /\z./\u.Z(z, u))) >= Z(X, rec(X, Y, /\x./\y.Z(x, y))) because [50] and [51], by (Meta) 50] rec*(s(X), Y, /\x./\y.Z(x, y)) >= X because [18], by (Select) 51] rec*(s(X), Y, /\x./\y.Z(x, y)) >= rec(X, Y, /\x./\y.Z(x, y)) because rec in Mul, [52], [19] and [20], by (Stat) 52] s(X) > X because [53], by definition 53] s*(X) >= X because [7], by (Select) 54] #argfun-xtimes#(rec(X, 0, /\x./\y.xplus-(Y, y))) >= rec(X, 0, /\x./\y.xplus-(Y, y)) because [55], by (Star) 55] #argfun-xtimes#*(rec(X, 0, /\x./\y.xplus-(Y, y))) >= rec(X, 0, /\x./\y.xplus-(Y, y)) because [56], by (Select) 56] rec(X, 0, /\x./\y.xplus-(Y, y)) >= rec(X, 0, /\x./\y.xplus-(Y, y)) because rec in Mul, [27], [28] and [29], by (Fun) 57] xplus-(X, Y) >= xplus(X, Y) because [58], by (Star) 58] xplus-*(X, Y) >= xplus(X, Y) because xplus- > xplus, [59] and [61], by (Copy) 59] xplus-*(X, Y) >= X because [60], by (Select) 60] X >= X by (Meta) 61] xplus-*(X, Y) >= Y because [62], by (Select) 62] 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: rec#(s(X), Y, /\x./\y.Z(x, y)) =#> Z(X, rec(X, Y, /\z./\u.Z(z, u))) rec#(s(X), Y, /\x./\y.Z(x, y)) =#> rec#(X, Y, /\z./\u.Z(z, u)) xtimes#(X, Y) =#> rec#(Y, 0, /\x./\y.xplus(X, y)) 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: rec#(s(X), Y, /\x./\y.Z(x, y)) >? Z(X, rec(X, Y, /\z./\u.Z(z, u))) rec#(s(X), Y, /\x./\y.Z(x, y)) >? rec#(X, Y, /\z./\u.Z(z, u)) xtimes#(X, Y) >? rec#(Y, 0, /\x./\y.xplus-(X, y)) xplus(X, 0) >= X xplus(X, s(Y)) >= s(xplus(X, Y)) rec(0, X, /\x./\y.Y(x, y)) >= X rec(s(X), Y, /\x./\y.Z(x, y)) >= Z(X, rec(X, Y, /\z./\u.Z(z, u))) xtimes(X, Y) >= rec(Y, 0, /\x./\y.xplus-(X, y)) xplus-(X, Y) >= xplus(X, Y) We apply [Kop12, Thm. 6.75] and use the following argument functions: pi( xtimes(X, Y) ) = #argfun-xtimes#(rec(Y, 0, /\x./\y.xplus-(X, y))) pi( xtimes#(X, Y) ) = #argfun-xtimes##(rec#(Y, 0, /\x./\y.xplus-(X, y))) 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]] = _|_ We choose Lex = {} and Mul = {#argfun-xtimes#, #argfun-xtimes##, rec, rec#, s, xplus, xplus-, xtimes, xtimes#}, and the following precedence: #argfun-xtimes# > rec# > rec > xplus- > xplus > s > #argfun-xtimes## > xtimes > xtimes# Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: rec#(s(X), Y, /\x./\y.Z(x, y)) > Z(X, rec(X, Y, /\x./\y.Z(x, y))) rec#(s(X), Y, /\x./\y.Z(x, y)) >= rec#(X, Y, /\x./\y.Z(x, y)) #argfun-xtimes##(rec#(X, _|_, /\x./\y.xplus-(Y, y))) >= rec#(X, _|_, /\x./\y.xplus-(Y, y)) xplus(X, _|_) >= X xplus(X, s(Y)) >= s(xplus(X, Y)) rec(_|_, X, /\x./\y.Y(x, y)) >= X rec(s(X), Y, /\x./\y.Z(x, y)) >= Z(X, rec(X, Y, /\x./\y.Z(x, y))) #argfun-xtimes#(rec(X, _|_, /\x./\y.xplus-(Y, y))) >= rec(X, _|_, /\x./\y.xplus-(Y, y)) xplus-(X, Y) >= xplus(X, Y) With these choices, we have: 1] rec#(s(X), Y, /\x./\y.Z(x, y)) > Z(X, rec(X, Y, /\x./\y.Z(x, y))) because [2], by definition 2] rec#*(s(X), Y, /\x./\y.Z(x, y)) >= Z(X, rec(X, Y, /\x./\y.Z(x, y))) because [3], by (Select) 3] Z(rec#*(s(X), Y, /\x./\y.Z(x, y)), rec#*(s(X), Y, /\z./\u.Z(z, u))) >= Z(X, rec(X, Y, /\x./\y.Z(x, y))) because [4] and [8], by (Meta) 4] rec#*(s(X), Y, /\x./\y.Z(x, y)) >= X because [5], by (Select) 5] s(X) >= X because [6], by (Star) 6] s*(X) >= X because [7], by (Select) 7] X >= X by (Meta) 8] rec#*(s(X), Y, /\x./\y.Z(x, y)) >= rec(X, Y, /\x./\y.Z(x, y)) because rec# > rec, [4], [9] and [11], by (Copy) 9] rec#*(s(X), Y, /\x./\y.Z(x, y)) >= Y because [10], by (Select) 10] Y >= Y by (Meta) 11] rec#*(s(X), Y, /\x./\y.Z(x, y)) >= /\x./\y.Z(x, y) because [12], by (Select) 12] /\x./\z.Z(x, z) >= /\x./\z.Z(x, z) because [13], by (Abs) 13] /\z.Z(y, z) >= /\z.Z(y, z) because [14], by (Abs) 14] Z(y, x) >= Z(y, x) because [15] and [16], by (Meta) 15] y >= y by (Var) 16] x >= x by (Var) 17] rec#(s(X), Y, /\x./\y.Z(x, y)) >= rec#(X, Y, /\x./\y.Z(x, y)) because rec# in Mul, [18], [19] and [20], by (Fun) 18] s(X) >= X because [6], by (Star) 19] Y >= Y by (Meta) 20] /\x./\z.Z(x, z) >= /\x./\z.Z(x, z) because [13], by (Abs) 21] #argfun-xtimes##(rec#(X, _|_, /\x./\y.xplus-(Y, y))) >= rec#(X, _|_, /\x./\y.xplus-(Y, y)) because [22], by (Star) 22] #argfun-xtimes##*(rec#(X, _|_, /\x./\y.xplus-(Y, y))) >= rec#(X, _|_, /\x./\y.xplus-(Y, y)) because [23], by (Select) 23] rec#(X, _|_, /\x./\y.xplus-(Y, y)) >= rec#(X, _|_, /\x./\y.xplus-(Y, y)) because rec# in Mul, [24], [25] and [26], by (Fun) 24] X >= X by (Meta) 25] _|_ >= _|_ by (Bot) 26] /\x./\y.xplus-(Y, y) >= /\x./\y.xplus-(Y, y) because [27], by (Abs) 27] /\y.xplus-(Y, y) >= /\y.xplus-(Y, y) because [28], by (Abs) 28] xplus-(Y, x) >= xplus-(Y, x) because xplus- in Mul, [29] and [30], by (Fun) 29] Y >= Y by (Meta) 30] x >= x by (Var) 31] xplus(X, _|_) >= X because [32], by (Star) 32] xplus*(X, _|_) >= X because [33], by (Select) 33] X >= X by (Meta) 34] xplus(X, s(Y)) >= s(xplus(X, Y)) because [35], by (Star) 35] xplus*(X, s(Y)) >= s(xplus(X, Y)) because xplus > s and [36], by (Copy) 36] xplus*(X, s(Y)) >= xplus(X, Y) because xplus in Mul, [37] and [38], by (Stat) 37] X >= X by (Meta) 38] s(Y) > Y because [39], by definition 39] s*(Y) >= Y because [40], by (Select) 40] Y >= Y by (Meta) 41] rec(_|_, X, /\x./\y.Y(x, y)) >= X because [42], by (Star) 42] rec*(_|_, X, /\x./\y.Y(x, y)) >= X because [43], by (Select) 43] X >= X by (Meta) 44] rec(s(X), Y, /\x./\y.Z(x, y)) >= Z(X, rec(X, Y, /\x./\y.Z(x, y))) because [45], by (Star) 45] rec*(s(X), Y, /\x./\y.Z(x, y)) >= Z(X, rec(X, Y, /\x./\y.Z(x, y))) because [46], by (Select) 46] Z(rec*(s(X), Y, /\x./\y.Z(x, y)), rec*(s(X), Y, /\z./\u.Z(z, u))) >= Z(X, rec(X, Y, /\x./\y.Z(x, y))) because [47] and [48], by (Meta) 47] rec*(s(X), Y, /\x./\y.Z(x, y)) >= X because [18], by (Select) 48] rec*(s(X), Y, /\x./\y.Z(x, y)) >= rec(X, Y, /\x./\y.Z(x, y)) because rec in Mul, [49], [19] and [20], by (Stat) 49] s(X) > X because [50], by definition 50] s*(X) >= X because [7], by (Select) 51] #argfun-xtimes#(rec(X, _|_, /\x./\y.xplus-(Y, y))) >= rec(X, _|_, /\x./\y.xplus-(Y, y)) because [52], by (Star) 52] #argfun-xtimes#*(rec(X, _|_, /\x./\y.xplus-(Y, y))) >= rec(X, _|_, /\x./\y.xplus-(Y, y)) because #argfun-xtimes# > rec, [53], [56] and [57], by (Copy) 53] #argfun-xtimes#*(rec(X, _|_, /\x./\y.xplus-(Y, y))) >= X because [54], by (Select) 54] rec(X, _|_, /\x./\y.xplus-(Y, y)) >= X because [55], by (Star) 55] rec*(X, _|_, /\x./\y.xplus-(Y, y)) >= X because [24], by (Select) 56] #argfun-xtimes#*(rec(X, _|_, /\x./\y.xplus-(Y, y))) >= _|_ by (Bot) 57] #argfun-xtimes#*(rec(X, _|_, /\x./\y.xplus-(Y, y))) >= /\x./\y.xplus-(Y, y) because [58], by (F-Abs) 58] #argfun-xtimes#*(rec(X, _|_, /\x./\y.xplus-(Y, y)), z) >= /\x.xplus-(Y, x) because [59], by (F-Abs) 59] #argfun-xtimes#*(rec(X, _|_, /\x./\y.xplus-(Y, y)), z, u) >= xplus-(Y, u) because #argfun-xtimes# > xplus-, [60] and [66], by (Copy) 60] #argfun-xtimes#*(rec(X, _|_, /\x./\y.xplus-(Y, y)), z, u) >= Y because [61], by (Select) 61] rec(X, _|_, /\x./\y.xplus-(Y, y)) >= Y because [62], by (Star) 62] rec*(X, _|_, /\x./\y.xplus-(Y, y)) >= Y because [63], by (Select) 63] xplus-(Y, rec*(X, _|_, /\x./\y.xplus-(Y, y))) >= Y because [64], by (Star) 64] xplus-*(Y, rec*(X, _|_, /\x./\y.xplus-(Y, y))) >= Y because [65], by (Select) 65] Y >= Y by (Meta) 66] #argfun-xtimes#*(rec(X, _|_, /\x./\y.xplus-(Y, y)), z, u) >= u because [67], by (Select) 67] u >= u by (Var) 68] xplus-(X, Y) >= xplus(X, Y) because [69], by (Star) 69] xplus-*(X, Y) >= xplus(X, Y) because xplus- > xplus, [70] and [72], by (Copy) 70] xplus-*(X, Y) >= X because [71], by (Select) 71] X >= X by (Meta) 72] xplus-*(X, Y) >= Y because [73], by (Select) 73] 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: rec#(s(X), Y, /\x./\y.Z(x, y)) =#> rec#(X, Y, /\z./\u.Z(z, u)) xtimes#(X, Y) =#> rec#(Y, 0, /\x./\y.xplus(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 : 0 * 1 : 0 This graph has the following strongly connected components: P_4: rec#(s(X), Y, /\x./\y.Z(x, y)) =#> rec#(X, Y, /\z./\u.Z(z, u)) 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(rec#) = 1 Thus, we can orient the dependency pairs as follows: nu(rec#(s(X), Y, /\x./\y.Z(x, y))) = s(X) |> X = nu(rec#(X, Y, /\z./\u.Z(z, u))) By [FuhKop19, Thm. 61], 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 +++ [FuhKop19] C. Fuhs, and C. Kop. A static higher-order dependency pair framework. In Proceedings of ESOP 2019, 2019. [Kop11] C. Kop. Simplifying Algebraic Functional Systems. In Proceedings of CAI 2011, volume 6742 of LNCS. 201--215, Springer, 2011. [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012.