/export/starexec/sandbox2/solver/bin/starexec_run_FirstOrder /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES We consider the system theBenchmark. We are asked to determine termination of the following first-order TRS. 0 : [] --> o activate : [o] --> o add : [o * o] --> o cons : [o * o] --> o from : [o] --> o fst : [o * o] --> o len : [o] --> o n!6220!6220add : [o * o] --> o n!6220!6220from : [o] --> o n!6220!6220fst : [o * o] --> o n!6220!6220len : [o] --> o n!6220!6220s : [o] --> o nil : [] --> o s : [o] --> o fst(0, X) => nil fst(s(X), cons(Y, Z)) => cons(Y, n!6220!6220fst(activate(X), activate(Z))) from(X) => cons(X, n!6220!6220from(n!6220!6220s(X))) add(0, X) => X add(s(X), Y) => s(n!6220!6220add(activate(X), Y)) len(nil) => 0 len(cons(X, Y)) => s(n!6220!6220len(activate(Y))) fst(X, Y) => n!6220!6220fst(X, Y) from(X) => n!6220!6220from(X) s(X) => n!6220!6220s(X) add(X, Y) => n!6220!6220add(X, Y) len(X) => n!6220!6220len(X) activate(n!6220!6220fst(X, Y)) => fst(activate(X), activate(Y)) activate(n!6220!6220from(X)) => from(activate(X)) activate(n!6220!6220s(X)) => s(X) activate(n!6220!6220add(X, Y)) => add(activate(X), activate(Y)) activate(n!6220!6220len(X)) => len(activate(X)) activate(X) => X 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] fst#(s(X), cons(Y, Z)) =#> activate#(X) 1] fst#(s(X), cons(Y, Z)) =#> activate#(Z) 2] add#(s(X), Y) =#> s#(n!6220!6220add(activate(X), Y)) 3] add#(s(X), Y) =#> activate#(X) 4] len#(cons(X, Y)) =#> s#(n!6220!6220len(activate(Y))) 5] len#(cons(X, Y)) =#> activate#(Y) 6] activate#(n!6220!6220fst(X, Y)) =#> fst#(activate(X), activate(Y)) 7] activate#(n!6220!6220fst(X, Y)) =#> activate#(X) 8] activate#(n!6220!6220fst(X, Y)) =#> activate#(Y) 9] activate#(n!6220!6220from(X)) =#> from#(activate(X)) 10] activate#(n!6220!6220from(X)) =#> activate#(X) 11] activate#(n!6220!6220s(X)) =#> s#(X) 12] activate#(n!6220!6220add(X, Y)) =#> add#(activate(X), activate(Y)) 13] activate#(n!6220!6220add(X, Y)) =#> activate#(X) 14] activate#(n!6220!6220add(X, Y)) =#> activate#(Y) 15] activate#(n!6220!6220len(X)) =#> len#(activate(X)) 16] activate#(n!6220!6220len(X)) =#> activate#(X) Rules R_0: fst(0, X) => nil fst(s(X), cons(Y, Z)) => cons(Y, n!6220!6220fst(activate(X), activate(Z))) from(X) => cons(X, n!6220!6220from(n!6220!6220s(X))) add(0, X) => X add(s(X), Y) => s(n!6220!6220add(activate(X), Y)) len(nil) => 0 len(cons(X, Y)) => s(n!6220!6220len(activate(Y))) fst(X, Y) => n!6220!6220fst(X, Y) from(X) => n!6220!6220from(X) s(X) => n!6220!6220s(X) add(X, Y) => n!6220!6220add(X, Y) len(X) => n!6220!6220len(X) activate(n!6220!6220fst(X, Y)) => fst(activate(X), activate(Y)) activate(n!6220!6220from(X)) => from(activate(X)) activate(n!6220!6220s(X)) => s(X) activate(n!6220!6220add(X, Y)) => add(activate(X), activate(Y)) activate(n!6220!6220len(X)) => len(activate(X)) activate(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 : 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 * 1 : 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 * 2 : * 3 : 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 * 4 : * 5 : 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 * 6 : 0, 1 * 7 : 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 * 8 : 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 * 9 : * 10 : 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 * 11 : * 12 : 2, 3 * 13 : 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 * 14 : 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 * 15 : 4, 5 * 16 : 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 This graph has the following strongly connected components: P_1: fst#(s(X), cons(Y, Z)) =#> activate#(X) fst#(s(X), cons(Y, Z)) =#> activate#(Z) add#(s(X), Y) =#> activate#(X) len#(cons(X, Y)) =#> activate#(Y) activate#(n!6220!6220fst(X, Y)) =#> fst#(activate(X), activate(Y)) activate#(n!6220!6220fst(X, Y)) =#> activate#(X) activate#(n!6220!6220fst(X, Y)) =#> activate#(Y) activate#(n!6220!6220from(X)) =#> activate#(X) activate#(n!6220!6220add(X, Y)) =#> add#(activate(X), activate(Y)) activate#(n!6220!6220add(X, Y)) =#> activate#(X) activate#(n!6220!6220add(X, Y)) =#> activate#(Y) activate#(n!6220!6220len(X)) =#> len#(activate(X)) activate#(n!6220!6220len(X)) =#> activate#(X) 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]. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: fst#(s(X), cons(Y, Z)) >? activate#(X) fst#(s(X), cons(Y, Z)) >? activate#(Z) add#(s(X), Y) >? activate#(X) len#(cons(X, Y)) >? activate#(Y) activate#(n!6220!6220fst(X, Y)) >? fst#(activate(X), activate(Y)) activate#(n!6220!6220fst(X, Y)) >? activate#(X) activate#(n!6220!6220fst(X, Y)) >? activate#(Y) activate#(n!6220!6220from(X)) >? activate#(X) activate#(n!6220!6220add(X, Y)) >? add#(activate(X), activate(Y)) activate#(n!6220!6220add(X, Y)) >? activate#(X) activate#(n!6220!6220add(X, Y)) >? activate#(Y) activate#(n!6220!6220len(X)) >? len#(activate(X)) activate#(n!6220!6220len(X)) >? activate#(X) fst(0, X) >= nil fst(s(X), cons(Y, Z)) >= cons(Y, n!6220!6220fst(activate(X), activate(Z))) from(X) >= cons(X, n!6220!6220from(n!6220!6220s(X))) add(0, X) >= X add(s(X), Y) >= s(n!6220!6220add(activate(X), Y)) len(nil) >= 0 len(cons(X, Y)) >= s(n!6220!6220len(activate(Y))) fst(X, Y) >= n!6220!6220fst(X, Y) from(X) >= n!6220!6220from(X) s(X) >= n!6220!6220s(X) add(X, Y) >= n!6220!6220add(X, Y) len(X) >= n!6220!6220len(X) activate(n!6220!6220fst(X, Y)) >= fst(activate(X), activate(Y)) activate(n!6220!6220from(X)) >= from(activate(X)) activate(n!6220!6220s(X)) >= s(X) activate(n!6220!6220add(X, Y)) >= add(activate(X), activate(Y)) activate(n!6220!6220len(X)) >= len(activate(X)) activate(X) >= X We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 1 activate = \y0.y0 activate# = \y0.y0 add = \y0y1.y1 + 2y0 add# = \y0y1.2y0 cons = \y0y1.y1 from = \y0.y0 fst = \y0y1.1 + y0 + 2y1 fst# = \y0y1.y0 + y1 len = \y0.y0 len# = \y0.y0 n!6220!6220add = \y0y1.y1 + 2y0 n!6220!6220from = \y0.y0 n!6220!6220fst = \y0y1.1 + y0 + 2y1 n!6220!6220len = \y0.y0 n!6220!6220s = \y0.y0 nil = 2 s = \y0.y0 Using this interpretation, the requirements translate to: [[fst#(s(_x0), cons(_x1, _x2))]] = x0 + x2 >= x0 = [[activate#(_x0)]] [[fst#(s(_x0), cons(_x1, _x2))]] = x0 + x2 >= x2 = [[activate#(_x2)]] [[add#(s(_x0), _x1)]] = 2x0 >= x0 = [[activate#(_x0)]] [[len#(cons(_x0, _x1))]] = x1 >= x1 = [[activate#(_x1)]] [[activate#(n!6220!6220fst(_x0, _x1))]] = 1 + x0 + 2x1 > x0 + x1 = [[fst#(activate(_x0), activate(_x1))]] [[activate#(n!6220!6220fst(_x0, _x1))]] = 1 + x0 + 2x1 > x0 = [[activate#(_x0)]] [[activate#(n!6220!6220fst(_x0, _x1))]] = 1 + x0 + 2x1 > x1 = [[activate#(_x1)]] [[activate#(n!6220!6220from(_x0))]] = x0 >= x0 = [[activate#(_x0)]] [[activate#(n!6220!6220add(_x0, _x1))]] = x1 + 2x0 >= 2x0 = [[add#(activate(_x0), activate(_x1))]] [[activate#(n!6220!6220add(_x0, _x1))]] = x1 + 2x0 >= x0 = [[activate#(_x0)]] [[activate#(n!6220!6220add(_x0, _x1))]] = x1 + 2x0 >= x1 = [[activate#(_x1)]] [[activate#(n!6220!6220len(_x0))]] = x0 >= x0 = [[len#(activate(_x0))]] [[activate#(n!6220!6220len(_x0))]] = x0 >= x0 = [[activate#(_x0)]] [[fst(0, _x0)]] = 2 + 2x0 >= 2 = [[nil]] [[fst(s(_x0), cons(_x1, _x2))]] = 1 + x0 + 2x2 >= 1 + x0 + 2x2 = [[cons(_x1, n!6220!6220fst(activate(_x0), activate(_x2)))]] [[from(_x0)]] = x0 >= x0 = [[cons(_x0, n!6220!6220from(n!6220!6220s(_x0)))]] [[add(0, _x0)]] = 2 + x0 >= x0 = [[_x0]] [[add(s(_x0), _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[s(n!6220!6220add(activate(_x0), _x1))]] [[len(nil)]] = 2 >= 1 = [[0]] [[len(cons(_x0, _x1))]] = x1 >= x1 = [[s(n!6220!6220len(activate(_x1)))]] [[fst(_x0, _x1)]] = 1 + x0 + 2x1 >= 1 + x0 + 2x1 = [[n!6220!6220fst(_x0, _x1)]] [[from(_x0)]] = x0 >= x0 = [[n!6220!6220from(_x0)]] [[s(_x0)]] = x0 >= x0 = [[n!6220!6220s(_x0)]] [[add(_x0, _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[n!6220!6220add(_x0, _x1)]] [[len(_x0)]] = x0 >= x0 = [[n!6220!6220len(_x0)]] [[activate(n!6220!6220fst(_x0, _x1))]] = 1 + x0 + 2x1 >= 1 + x0 + 2x1 = [[fst(activate(_x0), activate(_x1))]] [[activate(n!6220!6220from(_x0))]] = x0 >= x0 = [[from(activate(_x0))]] [[activate(n!6220!6220s(_x0))]] = x0 >= x0 = [[s(_x0)]] [[activate(n!6220!6220add(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[add(activate(_x0), activate(_x1))]] [[activate(n!6220!6220len(_x0))]] = x0 >= x0 = [[len(activate(_x0))]] [[activate(_x0)]] = x0 >= x0 = [[_x0]] 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: fst#(s(X), cons(Y, Z)) =#> activate#(X) fst#(s(X), cons(Y, Z)) =#> activate#(Z) add#(s(X), Y) =#> activate#(X) len#(cons(X, Y)) =#> activate#(Y) activate#(n!6220!6220from(X)) =#> activate#(X) activate#(n!6220!6220add(X, Y)) =#> add#(activate(X), activate(Y)) activate#(n!6220!6220add(X, Y)) =#> activate#(X) activate#(n!6220!6220add(X, Y)) =#> activate#(Y) activate#(n!6220!6220len(X)) =#> len#(activate(X)) activate#(n!6220!6220len(X)) =#> activate#(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 place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: * 0 : 4, 5, 6, 7, 8, 9 * 1 : 4, 5, 6, 7, 8, 9 * 2 : 4, 5, 6, 7, 8, 9 * 3 : 4, 5, 6, 7, 8, 9 * 4 : 4, 5, 6, 7, 8, 9 * 5 : 2 * 6 : 4, 5, 6, 7, 8, 9 * 7 : 4, 5, 6, 7, 8, 9 * 8 : 3 * 9 : 4, 5, 6, 7, 8, 9 This graph has the following strongly connected components: P_3: add#(s(X), Y) =#> activate#(X) len#(cons(X, Y)) =#> activate#(Y) activate#(n!6220!6220from(X)) =#> activate#(X) activate#(n!6220!6220add(X, Y)) =#> add#(activate(X), activate(Y)) activate#(n!6220!6220add(X, Y)) =#> activate#(X) activate#(n!6220!6220add(X, Y)) =#> activate#(Y) activate#(n!6220!6220len(X)) =#> len#(activate(X)) activate#(n!6220!6220len(X)) =#> activate#(X) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_2, R_0, m, f) by (P_3, R_0, m, f). 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 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: add#(s(X), Y) >? activate#(X) len#(cons(X, Y)) >? activate#(Y) activate#(n!6220!6220from(X)) >? activate#(X) activate#(n!6220!6220add(X, Y)) >? add#(activate(X), activate(Y)) activate#(n!6220!6220add(X, Y)) >? activate#(X) activate#(n!6220!6220add(X, Y)) >? activate#(Y) activate#(n!6220!6220len(X)) >? len#(activate(X)) activate#(n!6220!6220len(X)) >? activate#(X) fst(0, X) >= nil fst(s(X), cons(Y, Z)) >= cons(Y, n!6220!6220fst(activate(X), activate(Z))) from(X) >= cons(X, n!6220!6220from(n!6220!6220s(X))) add(0, X) >= X add(s(X), Y) >= s(n!6220!6220add(activate(X), Y)) len(nil) >= 0 len(cons(X, Y)) >= s(n!6220!6220len(activate(Y))) fst(X, Y) >= n!6220!6220fst(X, Y) from(X) >= n!6220!6220from(X) s(X) >= n!6220!6220s(X) add(X, Y) >= n!6220!6220add(X, Y) len(X) >= n!6220!6220len(X) activate(n!6220!6220fst(X, Y)) >= fst(activate(X), activate(Y)) activate(n!6220!6220from(X)) >= from(activate(X)) activate(n!6220!6220s(X)) >= s(X) activate(n!6220!6220add(X, Y)) >= add(activate(X), activate(Y)) activate(n!6220!6220len(X)) >= len(activate(X)) activate(X) >= X We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 activate = \y0.y0 activate# = \y0.y0 add = \y0y1.y0 + y1 add# = \y0y1.y0 cons = \y0y1.y1 from = \y0.2y0 fst = \y0y1.0 len = \y0.1 + y0 len# = \y0.y0 n!6220!6220add = \y0y1.y0 + y1 n!6220!6220from = \y0.2y0 n!6220!6220fst = \y0y1.0 n!6220!6220len = \y0.1 + y0 n!6220!6220s = \y0.y0 nil = 0 s = \y0.y0 Using this interpretation, the requirements translate to: [[add#(s(_x0), _x1)]] = x0 >= x0 = [[activate#(_x0)]] [[len#(cons(_x0, _x1))]] = x1 >= x1 = [[activate#(_x1)]] [[activate#(n!6220!6220from(_x0))]] = 2x0 >= x0 = [[activate#(_x0)]] [[activate#(n!6220!6220add(_x0, _x1))]] = x0 + x1 >= x0 = [[add#(activate(_x0), activate(_x1))]] [[activate#(n!6220!6220add(_x0, _x1))]] = x0 + x1 >= x0 = [[activate#(_x0)]] [[activate#(n!6220!6220add(_x0, _x1))]] = x0 + x1 >= x1 = [[activate#(_x1)]] [[activate#(n!6220!6220len(_x0))]] = 1 + x0 > x0 = [[len#(activate(_x0))]] [[activate#(n!6220!6220len(_x0))]] = 1 + x0 > x0 = [[activate#(_x0)]] [[fst(0, _x0)]] = 0 >= 0 = [[nil]] [[fst(s(_x0), cons(_x1, _x2))]] = 0 >= 0 = [[cons(_x1, n!6220!6220fst(activate(_x0), activate(_x2)))]] [[from(_x0)]] = 2x0 >= 2x0 = [[cons(_x0, n!6220!6220from(n!6220!6220s(_x0)))]] [[add(0, _x0)]] = x0 >= x0 = [[_x0]] [[add(s(_x0), _x1)]] = x0 + x1 >= x0 + x1 = [[s(n!6220!6220add(activate(_x0), _x1))]] [[len(nil)]] = 1 >= 0 = [[0]] [[len(cons(_x0, _x1))]] = 1 + x1 >= 1 + x1 = [[s(n!6220!6220len(activate(_x1)))]] [[fst(_x0, _x1)]] = 0 >= 0 = [[n!6220!6220fst(_x0, _x1)]] [[from(_x0)]] = 2x0 >= 2x0 = [[n!6220!6220from(_x0)]] [[s(_x0)]] = x0 >= x0 = [[n!6220!6220s(_x0)]] [[add(_x0, _x1)]] = x0 + x1 >= x0 + x1 = [[n!6220!6220add(_x0, _x1)]] [[len(_x0)]] = 1 + x0 >= 1 + x0 = [[n!6220!6220len(_x0)]] [[activate(n!6220!6220fst(_x0, _x1))]] = 0 >= 0 = [[fst(activate(_x0), activate(_x1))]] [[activate(n!6220!6220from(_x0))]] = 2x0 >= 2x0 = [[from(activate(_x0))]] [[activate(n!6220!6220s(_x0))]] = x0 >= x0 = [[s(_x0)]] [[activate(n!6220!6220add(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[add(activate(_x0), activate(_x1))]] [[activate(n!6220!6220len(_x0))]] = 1 + x0 >= 1 + x0 = [[len(activate(_x0))]] [[activate(_x0)]] = x0 >= x0 = [[_x0]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_3, R_0, minimal, formative) by (P_4, R_0, minimal, formative), where P_4 consists of: add#(s(X), Y) =#> activate#(X) len#(cons(X, Y)) =#> activate#(Y) activate#(n!6220!6220from(X)) =#> activate#(X) activate#(n!6220!6220add(X, Y)) =#> add#(activate(X), activate(Y)) activate#(n!6220!6220add(X, Y)) =#> activate#(X) activate#(n!6220!6220add(X, Y)) =#> activate#(Y) 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 place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: * 0 : 2, 3, 4, 5 * 1 : 2, 3, 4, 5 * 2 : 2, 3, 4, 5 * 3 : 0 * 4 : 2, 3, 4, 5 * 5 : 2, 3, 4, 5 This graph has the following strongly connected components: P_5: add#(s(X), Y) =#> activate#(X) activate#(n!6220!6220from(X)) =#> activate#(X) activate#(n!6220!6220add(X, Y)) =#> add#(activate(X), activate(Y)) activate#(n!6220!6220add(X, Y)) =#> activate#(X) activate#(n!6220!6220add(X, Y)) =#> activate#(Y) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_4, R_0, m, f) by (P_5, R_0, m, f). Thus, the original system is terminating if (P_5, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_5, R_0, 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: add#(s(X), Y) >? activate#(X) activate#(n!6220!6220from(X)) >? activate#(X) activate#(n!6220!6220add(X, Y)) >? add#(activate(X), activate(Y)) activate#(n!6220!6220add(X, Y)) >? activate#(X) activate#(n!6220!6220add(X, Y)) >? activate#(Y) fst(0, X) >= nil fst(s(X), cons(Y, Z)) >= cons(Y, n!6220!6220fst(activate(X), activate(Z))) from(X) >= cons(X, n!6220!6220from(n!6220!6220s(X))) add(0, X) >= X add(s(X), Y) >= s(n!6220!6220add(activate(X), Y)) len(nil) >= 0 len(cons(X, Y)) >= s(n!6220!6220len(activate(Y))) fst(X, Y) >= n!6220!6220fst(X, Y) from(X) >= n!6220!6220from(X) s(X) >= n!6220!6220s(X) add(X, Y) >= n!6220!6220add(X, Y) len(X) >= n!6220!6220len(X) activate(n!6220!6220fst(X, Y)) >= fst(activate(X), activate(Y)) activate(n!6220!6220from(X)) >= from(activate(X)) activate(n!6220!6220s(X)) >= s(X) activate(n!6220!6220add(X, Y)) >= add(activate(X), activate(Y)) activate(n!6220!6220len(X)) >= len(activate(X)) activate(X) >= X We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 activate = \y0.y0 activate# = \y0.y0 add = \y0y1.y0 + 2y1 add# = \y0y1.y0 cons = \y0y1.0 from = \y0.1 + 2y0 fst = \y0y1.0 len = \y0.0 n!6220!6220add = \y0y1.y0 + 2y1 n!6220!6220from = \y0.1 + 2y0 n!6220!6220fst = \y0y1.0 n!6220!6220len = \y0.0 n!6220!6220s = \y0.y0 nil = 0 s = \y0.y0 Using this interpretation, the requirements translate to: [[add#(s(_x0), _x1)]] = x0 >= x0 = [[activate#(_x0)]] [[activate#(n!6220!6220from(_x0))]] = 1 + 2x0 > x0 = [[activate#(_x0)]] [[activate#(n!6220!6220add(_x0, _x1))]] = x0 + 2x1 >= x0 = [[add#(activate(_x0), activate(_x1))]] [[activate#(n!6220!6220add(_x0, _x1))]] = x0 + 2x1 >= x0 = [[activate#(_x0)]] [[activate#(n!6220!6220add(_x0, _x1))]] = x0 + 2x1 >= x1 = [[activate#(_x1)]] [[fst(0, _x0)]] = 0 >= 0 = [[nil]] [[fst(s(_x0), cons(_x1, _x2))]] = 0 >= 0 = [[cons(_x1, n!6220!6220fst(activate(_x0), activate(_x2)))]] [[from(_x0)]] = 1 + 2x0 >= 0 = [[cons(_x0, n!6220!6220from(n!6220!6220s(_x0)))]] [[add(0, _x0)]] = 2x0 >= x0 = [[_x0]] [[add(s(_x0), _x1)]] = x0 + 2x1 >= x0 + 2x1 = [[s(n!6220!6220add(activate(_x0), _x1))]] [[len(nil)]] = 0 >= 0 = [[0]] [[len(cons(_x0, _x1))]] = 0 >= 0 = [[s(n!6220!6220len(activate(_x1)))]] [[fst(_x0, _x1)]] = 0 >= 0 = [[n!6220!6220fst(_x0, _x1)]] [[from(_x0)]] = 1 + 2x0 >= 1 + 2x0 = [[n!6220!6220from(_x0)]] [[s(_x0)]] = x0 >= x0 = [[n!6220!6220s(_x0)]] [[add(_x0, _x1)]] = x0 + 2x1 >= x0 + 2x1 = [[n!6220!6220add(_x0, _x1)]] [[len(_x0)]] = 0 >= 0 = [[n!6220!6220len(_x0)]] [[activate(n!6220!6220fst(_x0, _x1))]] = 0 >= 0 = [[fst(activate(_x0), activate(_x1))]] [[activate(n!6220!6220from(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[from(activate(_x0))]] [[activate(n!6220!6220s(_x0))]] = x0 >= x0 = [[s(_x0)]] [[activate(n!6220!6220add(_x0, _x1))]] = x0 + 2x1 >= x0 + 2x1 = [[add(activate(_x0), activate(_x1))]] [[activate(n!6220!6220len(_x0))]] = 0 >= 0 = [[len(activate(_x0))]] [[activate(_x0)]] = x0 >= x0 = [[_x0]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_5, R_0, minimal, formative) by (P_6, R_0, minimal, formative), where P_6 consists of: add#(s(X), Y) =#> activate#(X) activate#(n!6220!6220add(X, Y)) =#> add#(activate(X), activate(Y)) activate#(n!6220!6220add(X, Y)) =#> activate#(X) activate#(n!6220!6220add(X, Y)) =#> activate#(Y) Thus, the original system is terminating if (P_6, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_6, R_0, 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: add#(s(X), Y) >? activate#(X) activate#(n!6220!6220add(X, Y)) >? add#(activate(X), activate(Y)) activate#(n!6220!6220add(X, Y)) >? activate#(X) activate#(n!6220!6220add(X, Y)) >? activate#(Y) fst(0, X) >= nil fst(s(X), cons(Y, Z)) >= cons(Y, n!6220!6220fst(activate(X), activate(Z))) from(X) >= cons(X, n!6220!6220from(n!6220!6220s(X))) add(0, X) >= X add(s(X), Y) >= s(n!6220!6220add(activate(X), Y)) len(nil) >= 0 len(cons(X, Y)) >= s(n!6220!6220len(activate(Y))) fst(X, Y) >= n!6220!6220fst(X, Y) from(X) >= n!6220!6220from(X) s(X) >= n!6220!6220s(X) add(X, Y) >= n!6220!6220add(X, Y) len(X) >= n!6220!6220len(X) activate(n!6220!6220fst(X, Y)) >= fst(activate(X), activate(Y)) activate(n!6220!6220from(X)) >= from(activate(X)) activate(n!6220!6220s(X)) >= s(X) activate(n!6220!6220add(X, Y)) >= add(activate(X), activate(Y)) activate(n!6220!6220len(X)) >= len(activate(X)) activate(X) >= X We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 activate = \y0.y0 activate# = \y0.y0 add = \y0y1.1 + y0 + y1 add# = \y0y1.1 + y0 cons = \y0y1.0 from = \y0.0 fst = \y0y1.0 len = \y0.0 n!6220!6220add = \y0y1.1 + y0 + y1 n!6220!6220from = \y0.0 n!6220!6220fst = \y0y1.0 n!6220!6220len = \y0.0 n!6220!6220s = \y0.y0 nil = 0 s = \y0.y0 Using this interpretation, the requirements translate to: [[add#(s(_x0), _x1)]] = 1 + x0 > x0 = [[activate#(_x0)]] [[activate#(n!6220!6220add(_x0, _x1))]] = 1 + x0 + x1 >= 1 + x0 = [[add#(activate(_x0), activate(_x1))]] [[activate#(n!6220!6220add(_x0, _x1))]] = 1 + x0 + x1 > x0 = [[activate#(_x0)]] [[activate#(n!6220!6220add(_x0, _x1))]] = 1 + x0 + x1 > x1 = [[activate#(_x1)]] [[fst(0, _x0)]] = 0 >= 0 = [[nil]] [[fst(s(_x0), cons(_x1, _x2))]] = 0 >= 0 = [[cons(_x1, n!6220!6220fst(activate(_x0), activate(_x2)))]] [[from(_x0)]] = 0 >= 0 = [[cons(_x0, n!6220!6220from(n!6220!6220s(_x0)))]] [[add(0, _x0)]] = 1 + x0 >= x0 = [[_x0]] [[add(s(_x0), _x1)]] = 1 + x0 + x1 >= 1 + x0 + x1 = [[s(n!6220!6220add(activate(_x0), _x1))]] [[len(nil)]] = 0 >= 0 = [[0]] [[len(cons(_x0, _x1))]] = 0 >= 0 = [[s(n!6220!6220len(activate(_x1)))]] [[fst(_x0, _x1)]] = 0 >= 0 = [[n!6220!6220fst(_x0, _x1)]] [[from(_x0)]] = 0 >= 0 = [[n!6220!6220from(_x0)]] [[s(_x0)]] = x0 >= x0 = [[n!6220!6220s(_x0)]] [[add(_x0, _x1)]] = 1 + x0 + x1 >= 1 + x0 + x1 = [[n!6220!6220add(_x0, _x1)]] [[len(_x0)]] = 0 >= 0 = [[n!6220!6220len(_x0)]] [[activate(n!6220!6220fst(_x0, _x1))]] = 0 >= 0 = [[fst(activate(_x0), activate(_x1))]] [[activate(n!6220!6220from(_x0))]] = 0 >= 0 = [[from(activate(_x0))]] [[activate(n!6220!6220s(_x0))]] = x0 >= x0 = [[s(_x0)]] [[activate(n!6220!6220add(_x0, _x1))]] = 1 + x0 + x1 >= 1 + x0 + x1 = [[add(activate(_x0), activate(_x1))]] [[activate(n!6220!6220len(_x0))]] = 0 >= 0 = [[len(activate(_x0))]] [[activate(_x0)]] = x0 >= x0 = [[_x0]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_6, R_0, minimal, formative) by (P_7, R_0, minimal, formative), where P_7 consists of: activate#(n!6220!6220add(X, Y)) =#> add#(activate(X), activate(Y)) Thus, the original system is terminating if (P_7, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_7, 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 : This graph has no strongly connected components. By [Kop12, Thm. 7.31], this implies finiteness of the dependency pair problem. 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.