0.00/0.25 YES 0.00/0.26 We consider the system theBenchmark. 0.00/0.26 0.00/0.26 Alphabet: 0.00/0.26 0.00/0.26 cons : [] --> a -> alist -> alist 0.00/0.26 map : [] --> (a -> a) -> alist -> alist 0.00/0.26 nil : [] --> alist 0.00/0.26 o : [] --> (a -> a) -> (a -> a) -> a -> a 0.00/0.26 0.00/0.26 Rules: 0.00/0.26 0.00/0.26 map (/\x.f x) nil => nil 0.00/0.26 map (/\x.f x) (cons y z) => cons (f y) (map (/\u.f u) z) 0.00/0.26 map (/\x.f x) (map (/\y.g y) z) => map (/\u.o (/\v.f v) (/\w.g w) u) z 0.00/0.26 o (/\x.f x) (/\y.g y) z => f (g z) 0.00/0.26 0.00/0.26 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. 0.00/0.26 0.00/0.26 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: 0.00/0.26 0.00/0.26 Alphabet: 0.00/0.26 0.00/0.26 cons : [a * alist] --> alist 0.00/0.26 map : [a -> a * alist] --> alist 0.00/0.26 nil : [] --> alist 0.00/0.26 o : [a -> a * a -> a * a] --> a 0.00/0.26 ~AP1 : [a -> a * a] --> a 0.00/0.26 0.00/0.26 Rules: 0.00/0.26 0.00/0.26 map(/\x.~AP1(F, x), nil) => nil 0.00/0.27 map(/\x.~AP1(F, x), cons(X, Y)) => cons(~AP1(F, X), map(/\y.~AP1(F, y), Y)) 0.00/0.27 map(/\x.~AP1(F, x), map(/\y.~AP1(G, y), X)) => map(/\z.o(/\u.~AP1(F, u), /\v.~AP1(G, v), z), X) 0.00/0.27 o(/\x.~AP1(F, x), /\y.~AP1(G, y), X) => ~AP1(F, ~AP1(G, X)) 0.00/0.27 map(/\x.o(F, G, x), nil) => nil 0.00/0.27 map(/\x.o(F, G, x), cons(X, Y)) => cons(o(F, G, X), map(/\y.o(F, G, y), Y)) 0.00/0.27 map(/\x.o(F, G, x), map(/\y.~AP1(H, y), X)) => map(/\z.o(/\u.o(F, G, u), /\v.~AP1(H, v), z), X) 0.00/0.27 map(/\x.~AP1(F, x), map(/\y.o(G, H, y), X)) => map(/\z.o(/\u.~AP1(F, u), /\v.o(G, H, v), z), X) 0.00/0.27 o(/\x.o(F, G, x), /\y.~AP1(H, y), X) => o(F, G, ~AP1(H, X)) 0.00/0.27 o(/\x.~AP1(F, x), /\y.o(G, H, y), X) => ~AP1(F, o(G, H, X)) 0.00/0.27 map(/\x.o(F, G, x), map(/\y.o(H, I, y), X)) => map(/\z.o(/\u.o(F, G, u), /\v.o(H, I, v), z), X) 0.00/0.27 o(/\x.o(F, G, x), /\y.o(H, I, y), X) => o(F, G, o(H, I, X)) 0.00/0.27 ~AP1(F, X) => F X 0.00/0.27 0.00/0.27 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: 0.00/0.27 0.00/0.27 Alphabet: 0.00/0.27 0.00/0.27 cons : [a * alist] --> alist 0.00/0.27 map : [a -> a * alist] --> alist 0.00/0.27 nil : [] --> alist 0.00/0.27 o : [a -> a * a -> a * a] --> a 0.00/0.27 0.00/0.27 Rules: 0.00/0.27 0.00/0.27 map(/\x.X(x), nil) => nil 0.00/0.27 map(/\x.X(x), cons(Y, Z)) => cons(X(Y), map(/\y.X(y), Z)) 0.00/0.27 map(/\x.X(x), map(/\y.Y(y), Z)) => map(/\z.o(/\u.X(u), /\v.Y(v), z), Z) 0.00/0.27 o(/\x.X(x), /\y.Y(y), Z) => X(Y(Z)) 0.00/0.27 0.00/0.27 We use the dependency pair framework as described in [Kop12, Ch. 6/7], with static dependency pairs (see [KusIsoSakBla09] and the adaptation for AFSMs and accessible arguments in [Kop13]). 0.00/0.27 0.00/0.27 We thus obtain the following dependency pair problem (P_0, R_0, static, formative): 0.00/0.27 0.00/0.27 Dependency Pairs P_0: 0.00/0.27 0.00/0.27 0] map#(/\x.X(x), cons(Y, Z)) =#> map#(/\y.X(y), Z) 0.00/0.27 1] map#(/\x.X(x), map(/\y.Y(y), Z)) =#> map#(/\z.o(/\u.X(u), /\v.Y(v), z), Z) 0.00/0.27 2] map#(/\x.X(x), map(/\y.Y(y), Z)) =#> o#(/\z.X(z), /\u.Y(u), U) 0.00/0.27 0.00/0.27 Rules R_0: 0.00/0.27 0.00/0.27 map(/\x.X(x), nil) => nil 0.00/0.27 map(/\x.X(x), cons(Y, Z)) => cons(X(Y), map(/\y.X(y), Z)) 0.00/0.27 map(/\x.X(x), map(/\y.Y(y), Z)) => map(/\z.o(/\u.X(u), /\v.Y(v), z), Z) 0.00/0.27 o(/\x.X(x), /\y.Y(y), Z) => X(Y(Z)) 0.00/0.27 0.00/0.27 Thus, the original system is terminating if (P_0, R_0, static, formative) is finite. 0.00/0.27 0.00/0.27 We consider the dependency pair problem (P_0, R_0, static, formative). 0.00/0.27 0.00/0.27 We place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: 0.00/0.27 0.00/0.27 * 0 : 0, 1, 2 0.00/0.27 * 1 : 0, 1, 2 0.00/0.27 * 2 : 0.00/0.27 0.00/0.27 This graph has the following strongly connected components: 0.00/0.27 0.00/0.27 P_1: 0.00/0.27 0.00/0.27 map#(/\x.X(x), cons(Y, Z)) =#> map#(/\y.X(y), Z) 0.00/0.27 map#(/\x.X(x), map(/\y.Y(y), Z)) =#> map#(/\z.o(/\u.X(u), /\v.Y(v), z), Z) 0.00/0.27 0.00/0.27 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). 0.00/0.27 0.00/0.27 Thus, the original system is terminating if (P_1, R_0, static, formative) is finite. 0.00/0.27 0.00/0.27 We consider the dependency pair problem (P_1, R_0, static, formative). 0.00/0.27 0.00/0.27 We apply the subterm criterion with the following projection function: 0.00/0.27 0.00/0.27 nu(map#) = 2 0.00/0.27 0.00/0.27 Thus, we can orient the dependency pairs as follows: 0.00/0.27 0.00/0.27 nu(map#(/\x.X(x), cons(Y, Z))) = cons(Y, Z) |> Z = nu(map#(/\y.X(y), Z)) 0.00/0.27 nu(map#(/\x.X(x), map(/\y.Y(y), Z))) = map(/\z.Y(z), Z) |> Z = nu(map#(/\y.o(/\u.X(u), /\v.Y(v), y), Z)) 0.00/0.27 0.00/0.27 By [Kop12, Thm. 7.35] and [Kop13, Thm. 5], we may replace a dependency pair problem (P_1, R_0, static, f) by ({}, R_0, static, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. 0.00/0.27 0.00/0.27 As all dependency pair problems were succesfully simplified with sound (and complete) processors until nothing remained, we conclude termination. 0.00/0.27 0.00/0.27 0.00/0.27 +++ Citations +++ 0.00/0.27 0.00/0.27 [Kop11] C. Kop. Simplifying Algebraic Functional Systems. In Proceedings of CAI 2011, volume 6742 of LNCS. 201--215, Springer, 2011. 0.00/0.27 [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. 0.00/0.27 [Kop13] C. Kop. Static Dependency Pairs with Accessibility. Unpublished manuscript, http://cl-informatik.uibk.ac.at/users/kop/static.pdf, 2013. 0.00/0.27 [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. 0.00/0.27 EOF