We consider universal computability of the LCTRS with only rule scheme Calc: Signature: app :: o -> o -> o cons :: Int -> o -> o e :: o if_1 :: o -> Int -> Int -> o -> o if_2 :: o -> Int -> Int -> o -> o if_3 :: o -> Int -> o -> o ins :: Int -> o -> o nil :: o pair :: o -> o -> o qsort :: o -> o split :: Int -> o -> o Rules: app(nil, zs) -> zs app(cons(x, ys), zs) -> cons(x, app(ys, zs)) | x = x split(x, e) -> pair(e, e) | x = x split(x, ins(y, zs)) -> if_1(split(x, zs), x, y, zs) | x > y if_1(pair(zl, zh), x, y, zs) -> pair(ins(y, zl), zh) | x > y split(x, ins(y, zs)) -> if_2(split(x, zs), x, y, zs) | y >= x if_2(pair(zl, zh), x, y, zs) -> pair(zl, ins(y, zh)) | y >= x qsort(e) -> nil qsort(ins(x, ys)) -> if_3(split(x, ys), x, ys) | x = x if_3(pair(yl, yh), x, ys) -> app(qsort(yl), cons(x, qsort(yh))) | x = x 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 UNION R_?, i, c), where: P1. (1) app#(cons(x, ys), zs) => app#(ys, zs) | x = x (2) split#(x, ins(y, zs)) => split#(x, zs) | x > y (3) split#(x, ins(y, zs)) => if_1#(split(x, zs), x, y, zs) | x > y (4) split#(x, ins(y, zs)) => split#(x, zs) | y >= x (5) split#(x, ins(y, zs)) => if_2#(split(x, zs), x, y, zs) | y >= x (6) qsort#(ins(x, ys)) => split#(x, ys) | x = x (7) qsort#(ins(x, ys)) => if_3#(split(x, ys), x, ys) | x = x (8) if_3#(pair(yl, yh), x, ys) => qsort#(yl) | x = x (9) if_3#(pair(yl, yh), x, ys) => qsort#(yh) | x = x (10) if_3#(pair(yl, yh), x, ys) => app#(qsort(yl), cons(x, qsort(yh))) | x = x ***** We apply the Graph Processor on D1 = (P1, R UNION R_?, i, c). We compute a graph approximation with the following edges: 1: 1 2: 2 3 4 5 3: 4: 2 3 4 5 5: 6: 2 3 4 5 7: 8 9 10 8: 6 7 9: 6 7 10: 1 There are 3 SCCs. Processor output: { D2 = (P2, R UNION R_?, i, c) ; D3 = (P3, R UNION R_?, i, c) ; D4 = (P4, R UNION R_?, i, c) }, where: P2. (1) app#(cons(x, ys), zs) => app#(ys, zs) | x = x P3. (1) split#(x, ins(y, zs)) => split#(x, zs) | x > y (2) split#(x, ins(y, zs)) => split#(x, zs) | y >= x P4. (1) qsort#(ins(x, ys)) => if_3#(split(x, ys), x, ys) | x = x (2) if_3#(pair(yl, yh), x, ys) => qsort#(yl) | x = x (3) if_3#(pair(yl, yh), x, ys) => qsort#(yh) | x = x ***** We apply the Subterm Criterion Processor on D2 = (P2, R UNION R_?, i, c). We use the following projection function: nu(app#) = 1 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 Subterm Criterion Processor on D3 = (P3, R UNION R_?, i, c). We use the following projection function: nu(split#) = 2 We thus have: (1) ins(y, zs) |>| zs (2) ins(y, zs) |>| zs All DPs are strictly oriented, and may be removed. Hence, this DP problem is finite. Processor output: { }. ***** We apply the Usable Rules Processor on D4 = (P4, R UNION R_?, i, c). We obtain 5 usable rules (out of 10 rules in the input problem). Processor output: { D5 = (P4, R2, i, c) }, where: R2. (1) if_1(pair(zl, zh), x, y, zs) -> pair(ins(y, zl), zh) | x > y (2) if_2(pair(zl, zh), x, y, zs) -> pair(zl, ins(y, zh)) | y >= x (3) split(x, e) -> pair(e, e) | x = x (4) split(x, ins(y, zs)) -> if_1(split(x, zs), x, y, zs) | x > y (5) split(x, ins(y, zs)) -> if_2(split(x, zs), x, y, zs) | y >= x ***** We apply the Usable rules with respect to HORPO Processor on D5 = (P4, R2, i, c). Constrained HORPO yields: qsort#1(ins2(x, ys)) (>) if_3#3(split2(x, ys), x, ys) | x = x if_3#3(pair2(yl, yh), x, ys) (>) qsort#1(yl) | x = x if_3#3(pair2(yl, yh), x, ys) (>) qsort#1(yh) | x = x if_14(pair2(zl, zh), x, y, zs) (>=) pair2(ins2(y, zl), zh) | x > y if_24(pair2(zl, zh), x, y, zs) (>=) pair2(zl, ins2(y, zh)) | y >= x split2(x, e0) (>=) pair2(e0, e0) | x = x split2(x, ins2(y, zs)) (>=) if_14(split2(x, zs), x, y, zs) | x > y split2(x, ins2(y, zs)) (>=) if_24(split2(x, zs), x, y, zs) | y >= x We do this using the following settings: * Disregarded arguments: if_14 3 if_24 4 * Precedence and permutation: e0 { } > if_14 { 1 } _ 2 _ 4 = if_24 { 1 2 } 3 = ins2 { 1 2 } = split2 { 2 } 1 > pair2 { 1 2 } = qsort#1 { 1 } > if_3#3 { 2 } 3 1 * Well-founded theory orderings: [>]_{Bool} = {(true,false)} [>]_{Int} = {(x,y) | x < 1000 /\ x < y } Processor output: { }.