We consider termination of the LCTRS with only rule scheme Calc: Signature: cond :: Bool -> Int -> Int -> Int -> Int d :: Int -> Int -> Int -> Int dNat :: Bool -> Int -> Int -> Int -> Int div :: Int -> Int -> Int divNat :: Bool -> Int -> Int -> Int Rules: div(x, y) -> divNat(x >= 0 /\ y >= 1, x, y) | x = x /\ y = y divNat(true, x, y) -> d(x, y, 0) | x = x /\ y = y d(x, y, z) -> dNat(x >= 0 /\ y >= 1 /\ z >= 0, x, y, z) | x = x /\ y = y /\ z = z dNat(true, x, y, z) -> cond(x >= z, x, y - 1, z) | x = x /\ y = y /\ z = z cond(true, x, y, z) -> 1 + d(x, y + 1, y + 1 + z) | x = x /\ y = y /\ z = z cond(false, x, y, z) -> 0 | x = x /\ y = y /\ z = z 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) div#(x, y) => divNat#(x >= 0 /\ y >= 1, x, y) | x = x /\ y = y (2) divNat#(true, x, y) => d#(x, y, 0) | x = x /\ y = y (3) d#(x, y, z) => dNat#(x >= 0 /\ y >= 1 /\ z >= 0, x, y, z) | x = x /\ y = y /\ z = z (4) dNat#(true, x, y, z) => cond#(x >= z, x, y - 1, z) | x = x /\ y = y /\ z = z (5) cond#(true, x, y, z) => d#(x, y + 1, y + 1 + z) | x = x /\ y = y /\ z = z ***** We apply the Graph Processor on D1 = (P1, R, i, c). We compute a graph approximation with the following edges: 1: 2 2: 3 3: 4 4: 5 5: 3 There is only one SCC, so all DPs not inside the SCC can be removed. Processor output: { D2 = (P2, R, i, c) }, where: P2. (1) d#(x, y, z) => dNat#(x >= 0 /\ y >= 1 /\ z >= 0, x, y, z) | x = x /\ y = y /\ z = z (2) dNat#(true, x, y, z) => cond#(x >= z, x, y - 1, z) | x = x /\ y = y /\ z = z (3) cond#(true, x, y, z) => d#(x, y + 1, y + 1 + z) | x = x /\ y = y /\ z = z ***** We apply the Chaining Processor Processor on D2 = (P2, R, i, c). We chain DPs according to the following mapping: cond#(true, x, y, z) => dNat#(x >= 0 /\ y + 1 >= 1 /\ y + 1 + z >= 0, x, y + 1, y + 1 + z) | x = x /\ y = y /\ z = z /\ (x = x /\ y + 1 = y + 1 /\ y + 1 + z = y + 1 + z) is obtained by chaining cond#(true, x, y, z) => d#(x, y + 1, y + 1 + z) | x = x /\ y = y /\ z = z and d#(x', y', z') => dNat#(x' >= 0 /\ y' >= 1 /\ z' >= 0, x', y', z') | x' = x' /\ y' = y' /\ z' = z' The following DPs were deleted: cond#(true, x, y, z) => d#(x, y + 1, y + 1 + z) | x = x /\ y = y /\ z = z d#(x, y, z) => dNat#(x >= 0 /\ y >= 1 /\ z >= 0, x, y, z) | x = x /\ y = y /\ z = z By chaining, we added 1 DPs and removed 2 DPs. Processor output: { D3 = (P3, R, i, c) }, where: P3. (1) dNat#(true, x, y, z) => cond#(x >= z, x, y - 1, z) | x = x /\ y = y /\ z = z (2) cond#(true, x, y, z) => dNat#(x >= 0 /\ y + 1 >= 1 /\ y + 1 + z >= 0, x, y + 1, y + 1 + z) | x = x /\ y = y /\ z = z /\ (x = x /\ y + 1 = y + 1 /\ y + 1 + z = y + 1 + z) ***** No progress could be made on DP problem D3 = (P3, R, i, c).