1.91/1.05 YES 1.91/1.06 We consider the system theBenchmark. 1.91/1.06 1.91/1.06 Alphabet: 1.91/1.06 1.91/1.06 0 : [] --> a 1.91/1.06 cons : [c * c] --> c 1.91/1.06 copy : [a * c * c] --> c 1.91/1.06 f : [c] --> c 1.91/1.06 false : [] --> b 1.91/1.06 filter : [c -> b * c] --> c 1.91/1.06 filter2 : [b * c -> b * c * c] --> c 1.91/1.06 map : [c -> c * c] --> c 1.91/1.06 n : [] --> a 1.91/1.06 nil : [] --> c 1.91/1.06 s : [a] --> a 1.91/1.06 true : [] --> b 1.91/1.06 1.91/1.06 Rules: 1.91/1.06 1.91/1.06 f(cons(nil, x)) => x 1.91/1.06 f(cons(f(cons(nil, x)), y)) => copy(n, x, y) 1.91/1.06 copy(0, x, y) => f(y) 1.91/1.06 copy(s(x), y, z) => copy(x, y, cons(f(y), z)) 1.91/1.06 map(g, nil) => nil 1.91/1.06 map(g, cons(x, y)) => cons(g x, map(g, y)) 1.91/1.06 filter(g, nil) => nil 1.91/1.06 filter(g, cons(x, y)) => filter2(g x, g, x, y) 1.91/1.06 filter2(true, g, x, y) => cons(x, filter(g, y)) 1.91/1.06 filter2(false, g, x, y) => filter(g, y) 1.91/1.06 1.91/1.06 This AFS is converted to an AFSM simply by replacing all free variables by meta-variables (with arity 0). 1.91/1.06 1.91/1.06 We observe that the rules contain a first-order subset: 1.91/1.06 1.91/1.06 f(cons(nil, X)) => X 1.91/1.06 f(cons(f(cons(nil, X)), Y)) => copy(n, X, Y) 1.91/1.06 copy(0, X, Y) => f(Y) 1.91/1.06 copy(s(X), Y, Z) => copy(X, Y, cons(f(Y), Z)) 1.91/1.06 1.91/1.06 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. 1.91/1.06 1.91/1.06 According to the external first-order termination prover, this system is indeed Ce-terminating: 1.91/1.06 1.91/1.06 || proof of resources/system.trs 1.91/1.06 || # AProVE Commit ID: d84c10301d352dfd14de2104819581f4682260f5 fuhs 20130616 1.91/1.06 || 1.91/1.06 || 1.91/1.06 || Termination w.r.t. Q of the given QTRS could be proven: 1.91/1.06 || 1.91/1.06 || (0) QTRS 1.91/1.06 || (1) DependencyPairsProof [EQUIVALENT] 1.91/1.06 || (2) QDP 1.91/1.06 || (3) DependencyGraphProof [EQUIVALENT] 1.91/1.06 || (4) QDP 1.91/1.06 || (5) QDPSizeChangeProof [EQUIVALENT] 1.91/1.06 || (6) YES 1.91/1.06 || 1.91/1.06 || 1.91/1.06 || ---------------------------------------- 1.91/1.06 || 1.91/1.06 || (0) 1.91/1.06 || Obligation: 1.91/1.06 || Q restricted rewrite system: 1.91/1.06 || The TRS R consists of the following rules: 1.91/1.06 || 1.91/1.06 || f(cons(nil, %X)) -> %X 1.91/1.06 || f(cons(f(cons(nil, %X)), %Y)) -> copy(n, %X, %Y) 1.91/1.06 || copy(0, %X, %Y) -> f(%Y) 1.91/1.06 || copy(s(%X), %Y, %Z) -> copy(%X, %Y, cons(f(%Y), %Z)) 1.91/1.06 || ~PAIR(%X, %Y) -> %X 1.91/1.06 || ~PAIR(%X, %Y) -> %Y 1.91/1.06 || 1.91/1.06 || Q is empty. 1.91/1.06 || 1.91/1.06 || ---------------------------------------- 1.91/1.06 || 1.91/1.06 || (1) DependencyPairsProof (EQUIVALENT) 1.91/1.06 || Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem. 1.91/1.06 || ---------------------------------------- 1.91/1.06 || 1.91/1.06 || (2) 1.91/1.06 || Obligation: 1.91/1.06 || Q DP problem: 1.91/1.06 || The TRS P consists of the following rules: 1.91/1.06 || 1.91/1.06 || F(cons(f(cons(nil, %X)), %Y)) -> COPY(n, %X, %Y) 1.91/1.06 || COPY(0, %X, %Y) -> F(%Y) 1.91/1.06 || COPY(s(%X), %Y, %Z) -> COPY(%X, %Y, cons(f(%Y), %Z)) 1.91/1.06 || COPY(s(%X), %Y, %Z) -> F(%Y) 1.91/1.06 || 1.91/1.06 || The TRS R consists of the following rules: 1.91/1.06 || 1.91/1.06 || f(cons(nil, %X)) -> %X 1.91/1.06 || f(cons(f(cons(nil, %X)), %Y)) -> copy(n, %X, %Y) 1.91/1.06 || copy(0, %X, %Y) -> f(%Y) 1.91/1.06 || copy(s(%X), %Y, %Z) -> copy(%X, %Y, cons(f(%Y), %Z)) 1.91/1.06 || ~PAIR(%X, %Y) -> %X 1.91/1.06 || ~PAIR(%X, %Y) -> %Y 1.91/1.06 || 1.91/1.06 || Q is empty. 1.91/1.06 || We have to consider all minimal (P,Q,R)-chains. 1.91/1.06 || ---------------------------------------- 1.91/1.06 || 1.91/1.06 || (3) DependencyGraphProof (EQUIVALENT) 1.91/1.06 || The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 3 less nodes. 1.91/1.06 || ---------------------------------------- 1.91/1.06 || 1.91/1.06 || (4) 1.91/1.06 || Obligation: 1.91/1.06 || Q DP problem: 1.91/1.06 || The TRS P consists of the following rules: 1.91/1.06 || 1.91/1.06 || COPY(s(%X), %Y, %Z) -> COPY(%X, %Y, cons(f(%Y), %Z)) 1.91/1.06 || 1.91/1.06 || The TRS R consists of the following rules: 1.91/1.06 || 1.91/1.06 || f(cons(nil, %X)) -> %X 1.91/1.06 || f(cons(f(cons(nil, %X)), %Y)) -> copy(n, %X, %Y) 1.91/1.06 || copy(0, %X, %Y) -> f(%Y) 1.91/1.06 || copy(s(%X), %Y, %Z) -> copy(%X, %Y, cons(f(%Y), %Z)) 1.91/1.06 || ~PAIR(%X, %Y) -> %X 1.91/1.06 || ~PAIR(%X, %Y) -> %Y 1.91/1.06 || 1.91/1.06 || Q is empty. 1.91/1.06 || We have to consider all minimal (P,Q,R)-chains. 1.91/1.06 || ---------------------------------------- 1.91/1.06 || 1.91/1.06 || (5) QDPSizeChangeProof (EQUIVALENT) 1.91/1.06 || By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. 1.91/1.06 || 1.91/1.06 || From the DPs we obtained the following set of size-change graphs: 1.91/1.06 || *COPY(s(%X), %Y, %Z) -> COPY(%X, %Y, cons(f(%Y), %Z)) 1.91/1.06 || The graph contains the following edges 1 > 1, 2 >= 2 1.91/1.06 || 1.91/1.06 || 1.91/1.06 || ---------------------------------------- 1.91/1.06 || 1.91/1.06 || (6) 1.91/1.06 || YES 1.91/1.06 || 1.91/1.06 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]). 1.91/1.06 1.91/1.06 We thus obtain the following dependency pair problem (P_0, R_0, static, formative): 1.91/1.06 1.91/1.06 Dependency Pairs P_0: 1.91/1.06 1.91/1.06 0] map#(F, cons(X, Y)) =#> map#(F, Y) 1.91/1.06 1] filter#(F, cons(X, Y)) =#> filter2#(F X, F, X, Y) 1.91/1.06 2] filter2#(true, F, X, Y) =#> filter#(F, Y) 1.91/1.06 3] filter2#(false, F, X, Y) =#> filter#(F, Y) 1.91/1.06 1.91/1.06 Rules R_0: 1.91/1.06 1.91/1.06 f(cons(nil, X)) => X 1.91/1.06 f(cons(f(cons(nil, X)), Y)) => copy(n, X, Y) 1.91/1.06 copy(0, X, Y) => f(Y) 1.91/1.06 copy(s(X), Y, Z) => copy(X, Y, cons(f(Y), Z)) 1.91/1.06 map(F, nil) => nil 1.91/1.06 map(F, cons(X, Y)) => cons(F X, map(F, Y)) 1.91/1.06 filter(F, nil) => nil 1.91/1.06 filter(F, cons(X, Y)) => filter2(F X, F, X, Y) 1.91/1.06 filter2(true, F, X, Y) => cons(X, filter(F, Y)) 1.91/1.06 filter2(false, F, X, Y) => filter(F, Y) 1.91/1.06 1.91/1.06 Thus, the original system is terminating if (P_0, R_0, static, formative) is finite. 1.91/1.06 1.91/1.06 We consider the dependency pair problem (P_0, R_0, static, formative). 1.91/1.06 1.91/1.06 We place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: 1.91/1.06 1.91/1.06 * 0 : 0 1.91/1.06 * 1 : 2, 3 1.91/1.06 * 2 : 1 1.91/1.06 * 3 : 1 1.91/1.06 1.91/1.06 This graph has the following strongly connected components: 1.91/1.06 1.91/1.06 P_1: 1.91/1.06 1.91/1.06 map#(F, cons(X, Y)) =#> map#(F, Y) 1.91/1.06 1.91/1.06 P_2: 1.91/1.06 1.91/1.06 filter#(F, cons(X, Y)) =#> filter2#(F X, F, X, Y) 1.91/1.06 filter2#(true, F, X, Y) =#> filter#(F, Y) 1.91/1.06 filter2#(false, F, X, Y) =#> filter#(F, Y) 1.91/1.06 1.91/1.06 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) and (P_2, R_0, m, f). 1.91/1.06 1.91/1.06 Thus, the original system is terminating if each of (P_1, R_0, static, formative) and (P_2, R_0, static, formative) is finite. 1.91/1.06 1.91/1.06 We consider the dependency pair problem (P_2, R_0, static, formative). 1.91/1.06 1.91/1.06 We apply the subterm criterion with the following projection function: 1.91/1.06 1.91/1.06 nu(filter2#) = 4 1.91/1.06 nu(filter#) = 2 1.91/1.06 1.91/1.06 Thus, we can orient the dependency pairs as follows: 1.91/1.06 1.91/1.06 nu(filter#(F, cons(X, Y))) = cons(X, Y) |> Y = nu(filter2#(F X, F, X, Y)) 1.91/1.06 nu(filter2#(true, F, X, Y)) = Y = Y = nu(filter#(F, Y)) 1.91/1.06 nu(filter2#(false, F, X, Y)) = Y = Y = nu(filter#(F, Y)) 1.91/1.06 1.91/1.06 By [Kop12, Thm. 7.35] and [Kop13, Thm. 5], we may replace a dependency pair problem (P_2, R_0, static, f) by (P_3, R_0, static, f), where P_3 contains: 1.91/1.06 1.91/1.06 filter2#(true, F, X, Y) =#> filter#(F, Y) 1.91/1.06 filter2#(false, F, X, Y) =#> filter#(F, Y) 1.91/1.06 1.91/1.06 Thus, the original system is terminating if each of (P_1, R_0, static, formative) and (P_3, R_0, static, formative) is finite. 1.91/1.06 1.91/1.06 We consider the dependency pair problem (P_3, R_0, static, formative). 1.91/1.06 1.91/1.06 We place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: 1.91/1.06 1.91/1.06 * 0 : 1.91/1.06 * 1 : 1.91/1.06 1.91/1.06 This graph has no strongly connected components. By [Kop12, Thm. 7.31], this implies finiteness of the dependency pair problem. 1.91/1.06 1.91/1.06 Thus, the original system is terminating if (P_1, R_0, static, formative) is finite. 1.91/1.06 1.91/1.06 We consider the dependency pair problem (P_1, R_0, static, formative). 1.91/1.06 1.91/1.06 We apply the subterm criterion with the following projection function: 1.91/1.06 1.91/1.06 nu(map#) = 2 1.91/1.06 1.91/1.06 Thus, we can orient the dependency pairs as follows: 1.91/1.06 1.91/1.06 nu(map#(F, cons(X, Y))) = cons(X, Y) |> Y = nu(map#(F, Y)) 1.91/1.06 1.91/1.06 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. 1.91/1.06 1.91/1.06 As all dependency pair problems were succesfully simplified with sound (and complete) processors until nothing remained, we conclude termination. 1.91/1.06 1.91/1.06 1.91/1.06 +++ Citations +++ 1.91/1.06 1.91/1.06 [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. 1.91/1.06 [Kop13] C. Kop. Static Dependency Pairs with Accessibility. Unpublished manuscript, http://cl-informatik.uibk.ac.at/users/kop/static.pdf, 2013. 1.91/1.06 [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. 1.91/1.06 EOF