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) cond1(true, x, y) -> 0 cond1(false, x, y) -> cond2(x > y, x, y) cond2(true, x, y) -> 1 + diff(x, y + 1) cond2(false, x, y) -> 1 + diff(x + 1, 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) (2) cond1#(false, x, y) => cond2#(x > y, x, y) (3) cond2#(true, x, y) => diff#(x, y + 1) (4) cond2#(false, x, y) => diff#(x + 1, 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) | true /\ true is obtained by chaining cond2#(true, x, y) => diff#(x, y + 1) and diff#(x', y') => cond1#(x' = y', x', y') cond2#(false, x, y) => cond1#(x + 1 = y, x + 1, y) | true /\ true is obtained by chaining cond2#(false, x, y) => diff#(x + 1, y) and diff#(x', y') => cond1#(x' = y', x', y') The following DPs were deleted: cond2#(true, x, y) => diff#(x, y + 1) cond2#(false, x, y) => diff#(x + 1, y) diff#(x, y) => cond1#(x = y, x, 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) (2) cond2#(true, x, y) => cond1#(x = y + 1, x, y + 1) | true /\ true (3) cond2#(false, x, y) => cond1#(x + 1 = y, x + 1, y) | true /\ true ***** We apply the Theory Arguments Processor on D2 = (P2, R, i, c). We use the following theory arguments function: cond1# : [1, 2, 3] cond2# : [1, 2, 3] Processor output: { D3 = (P3, R, i, c) ; D4 = (P4, R, i, c) }, where: P3. (1) cond1#(false, x, y) => cond2#(x > y, x, y) (2) cond2#(true, x, y) => cond1#(x = y + 1, x, y + 1) | true /\ true /\ x = x /\ y = y (3) cond2#(false, x, y) => cond1#(x + 1 = y, x + 1, y) | true /\ true /\ x = x /\ y = y P4. (1) cond2#(true, x, y) => cond1#(x = y + 1, x, y + 1) | true /\ true (2) cond2#(false, x, y) => cond1#(x + 1 = y, x + 1, y) | true /\ true ***** We apply the Theory Arguments Processor on D3 = (P3, R, i, c). We use the following theory arguments function: cond1# : [1, 2, 3] cond2# : [1, 2, 3] Processor output: { D5 = (P5, R, i, c) ; D6 = (P6, R, i, c) }, where: P5. (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) | true /\ true /\ x = x /\ y = y (3) cond2#(false, x, y) => cond1#(x + 1 = y, x + 1, y) | true /\ true /\ x = x /\ y = y P6. (1) cond1#(false, x, y) => cond2#(x > y, x, y) ***** We apply the Graph Processor on D4 = (P4, R, i, c). We compute a graph approximation with the following edges: 1: 2: As there are no SCCs, this DP problem is removed. Processor output: { }. ***** We apply the Usable Rules Processor on D5 = (P5, R, i, c). We obtain 0 usable rules (out of 5 rules in the input problem). Processor output: { D7 = (P5, {}, i, c) }. ***** We apply the Graph Processor on D6 = (P6, R, i, c). We compute a graph approximation with the following edges: 1: As there are no SCCs, this DP problem is removed. Processor output: { }. ***** No progress could be made on DP problem D7 = (P5, {}, i, c).