We consider termination of the LCSTRS with only rule scheme Calc: Signature: cons :: A -> list -> list nil :: list skip :: Int -> list -> list skipfold :: (A -> B -> B) -> B -> Int -> list -> B zip :: list -> list -> list Rules: skip(k, nil) -> nil skip(k, ys) -> ys | k <= 0 skip(k, cons(x, ys)) -> skip(k - 1, ys) | k > 0 skipfold(F, n, k, nil) -> n skipfold(F, n, k, cons(x, ys)) -> skipfold(F, F(x, n), k, skip(k, ys)) zip(nil, ys) -> ys zip(cons(x, xs), ys) -> cons(x, zip(ys, xs)) The system is accessible function passing by a sort ordering that equates all sorts. We start by computing the initial DP problem D1 = (P1, R, f, c), where: P1. (1) skip#(k, cons(x, ys)) => skip#(k - 1, ys) | k > 0 (2) skipfold#(F, n, k, cons(x, ys)) => skip#(k, ys) (3) skipfold#(F, n, k, cons(x, ys)) => skipfold#(F, F(x, n), k, skip(k, ys)) (4) zip#(cons(x, xs), ys) => zip#(ys, xs) ***** We apply the Graph Processor on D1 = (P1, R, f, c). We compute a graph approximation with the following edges: 1: 1 2: 1 3: 2 3 4: 4 There are 3 SCCs. Processor output: { D2 = (P2, R, f, c) ; D3 = (P3, R, f, c) ; D4 = (P4, R, f, c) }, where: P2. (1) skip#(k, cons(x, ys)) => skip#(k - 1, ys) | k > 0 P3. (1) skipfold#(F, n, k, cons(x, ys)) => skipfold#(F, F(x, n), k, skip(k, ys)) P4. (1) zip#(cons(x, xs), ys) => zip#(ys, xs) ***** We apply the Subterm Criterion Processor on D2 = (P2, R, f, c). We use the following projection function: nu(skip#) = 2 We thus have: (1) cons(x, ys) |>| ys All DPs are strictly oriented, and may be removed. Hence, this DP problem is finite. Processor output: { }. ***** We apply the Reduction Pair [with HORPO] Processor on D3 = (P3, R, f, c). Constrained HORPO yields: skipfold#(F, n, k, cons(x, ys)) (>) skipfold#(F, F(x, n), k, skip(k, ys)) skip(k, nil) (>=) nil skip(k, ys) (>=) ys | k <= 0 skip(k, cons(x, ys)) (>=) skip(k - 1, ys) | k > 0 skipfold(F, n, k, nil) (>=) n skipfold(F, n, k, cons(x, ys)) (>=) skipfold(F, F(x, n), k, skip(k, ys)) zip(nil, ys) (>=) ys zip(cons(x, xs), ys) (>=) cons(x, zip(ys, xs)) We do this using the following settings: * Disregarded arguments: skipfold# 2 skip 1 * Precedence and permutation: skipfold { 1 3 } _ 4 _ 2 > cons { 1 } 2 = skip { } 2 = zip { 1 2 } > skipfold# { 1 } 4 _ 3 > nil { } * Well-founded theory orderings: [>]_{Bool} = {(true,false)} [>]_{Int} = {(x,y) | x < 1000 /\ x < y } All dependency pairs were removed. Processor output: { }. ***** We apply the Reduction Pair [with HORPO] Processor on D4 = (P4, R, f, c). Constrained HORPO yields: zip#(cons(x, xs), ys) (>) zip#(ys, xs) skip(k, nil) (>=) nil skip(k, ys) (>=) ys | k <= 0 skip(k, cons(x, ys)) (>=) skip(k - 1, ys) | k > 0 skipfold(F, n, k, nil) (>=) n skipfold(F, n, k, cons(x, ys)) (>=) skipfold(F, F(x, n), k, skip(k, ys)) zip(nil, ys) (>=) ys zip(cons(x, xs), ys) (>=) cons(x, zip(ys, xs)) We do this using the following settings: * Disregarded arguments: skip 1 * Precedence and permutation: cons { 1 } 2 = skip { } 2 = zip { 1 2 } > skipfold { 3 4 } _ 2 _ 1 = zip# { 1 2 } > nil { } * Well-founded theory orderings: [>]_{Bool} = {(true,false)} [>]_{Int} = {(x,y) | x < 1000 /\ x < y } All dependency pairs were removed. Processor output: { }.