We consider termination of the LCTRS with only rule scheme Calc: Signature: cond1 :: Bool -> Int -> Int -> Int cond2 :: Bool -> Int -> Int -> Int diff :: Int -> Int -> Int Rules: diff(x, y) -> cond1(x = y, x, y) | x = x /\ y = y cond1(true, x, y) -> 0 | x = x /\ y = y cond1(false, x, y) -> cond2(x > y, x, y) | x = x /\ y = y cond2(true, x, y) -> 1 + diff(x, y + 1) | x = x /\ y = y cond2(false, x, y) -> 1 + diff(x + 1, y) | x = x /\ y = y 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, i, c), where: P1. (1) diff#(x, y) => cond1#(x = y, x, y) | x = x /\ y = y (2) cond1#(false, x, y) => cond2#(x > y, x, y) | x = x /\ y = y (3) cond2#(true, x, y) => diff#(x, y + 1) | x = x /\ y = y (4) cond2#(false, x, y) => diff#(x + 1, y) | x = x /\ y = y ***** We apply the Chaining Processor Processor on D1 = (P1, R, i, c). We chain DPs according to the following mapping: cond2#(true, x, y) => cond1#(x = y + 1, x, y + 1) | x = x /\ y = y /\ (x = x /\ y + 1 = y + 1) is obtained by chaining cond2#(true, x, y) => diff#(x, y + 1) | x = x /\ y = y and diff#(x', y') => cond1#(x' = y', x', y') | x' = x' /\ y' = y' cond2#(false, x, y) => cond1#(x + 1 = y, x + 1, y) | x = x /\ y = y /\ (x + 1 = x + 1 /\ y = y) is obtained by chaining cond2#(false, x, y) => diff#(x + 1, y) | x = x /\ y = y and diff#(x', y') => cond1#(x' = y', x', y') | x' = x' /\ y' = y' The following DPs were deleted: cond2#(true, x, y) => diff#(x, y + 1) | x = x /\ y = y cond2#(false, x, y) => diff#(x + 1, y) | x = x /\ y = y diff#(x, y) => cond1#(x = y, x, y) | x = x /\ y = y By chaining, we added 2 DPs and removed 3 DPs. Processor output: { D2 = (P2, R, i, c) }, where: P2. (1) cond1#(false, x, y) => cond2#(x > y, x, y) | x = x /\ y = y (2) cond2#(true, x, y) => cond1#(x = y + 1, x, y + 1) | x = x /\ y = y /\ (x = x /\ y + 1 = y + 1) (3) cond2#(false, x, y) => cond1#(x + 1 = y, x + 1, y) | x = x /\ y = y /\ (x + 1 = x + 1 /\ y = y) ***** No progress could be made on DP problem D2 = (P2, R, i, c).