We consider the system 428. Alphabet: 0 : [] --> nat a : [nat * nat] --> nat s : [nat] --> nat sum : [nat * nat -> nat] --> nat Rules: sum(0, /\x.X(x)) => X(0) sum(s(X), /\x.Y(x)) => a(sum(X, /\y.Y(y)), Y(s(X))) 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] sum#(0, /\x.X(x)) =#> X(0) 1] sum#(s(X), /\x.Y(x)) =#> sum#(X, /\y.Y(y)) 2] sum#(s(X), /\x.Y(x)) =#> Y(y) 3] sum#(s(X), /\x.Y(x)) =#> Y(s(X)) Rules R_0: sum(0, /\x.X(x)) => X(0) sum(s(X), /\x.Y(x)) => a(sum(X, /\y.Y(y)), Y(s(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). The formative rules of (P_0, R_0) are R_1 ::= sum(0, /\x.X(x)) => X(0) By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_0, R_0, minimal, formative) by (P_0, R_1, minimal, formative). Thus, the original system is terminating if (P_0, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_0, R_1, 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: sum#(0, /\x.X(x)) >? X(0) sum#(s(X), /\x.Y(x)) >? sum#(X, /\y.Y(y)) sum#(s(X), /\x.Y(x)) >? Y(~c0) sum#(s(X), /\x.Y(x)) >? Y(s(X)) sum(0, /\x.X(x)) >= X(0) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 2 s = \y0.1 + 2y0 sum = \y0G1.y0G1(y0) sum# = \y0G1.3 + y0 + y0G1(y0) ~c0 = 0 Using this interpretation, the requirements translate to: [[sum#(0, /\x._x0(x))]] = 5 + 2F0(2) > F0(2) = [[_x0(0)]] [[sum#(s(_x0), /\x._x1(x))]] = 4 + 2x0 + F1(1 + 2x0) + 2x0F1(1 + 2x0) > 3 + x0 + x0F1(x0) = [[sum#(_x0, /\x._x1(x))]] [[sum#(s(_x0), /\x._x1(x))]] = 4 + 2x0 + F1(1 + 2x0) + 2x0F1(1 + 2x0) > F1(0) = [[_x1(~c0)]] [[sum#(s(_x0), /\x._x1(x))]] = 4 + 2x0 + F1(1 + 2x0) + 2x0F1(1 + 2x0) > F1(1 + 2x0) = [[_x1(s(_x0))]] [[sum(0, /\x._x0(x))]] = 2F0(2) >= F0(2) = [[_x0(0)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_0, 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.