Problem: max(x,0()) -> x max(0(),y) -> y max(s(x),s(y)) -> s(max(x,y)) max(x,y) -> max(y,x) Proof: AT confluence processor Complete TRS T' of input TRS: max(x,0()) -> x max(0(),y) -> y max(s(x),s(y)) -> s(max(x,y)) max(x,y) -> max(y,x) T' = (P union S) with TRS P:max(x,y) -> max(y,x) TRS S:max(x,0()) -> x max(0(),y) -> y max(s(x),s(y)) -> s(max(x,y)) S is linear and P is reversible. CP(S,S) = 0() = 0() CP(S,P union P^-1) = x = max(0(),x), y = max(0(),y), y = max(y,0()), x = max(x,0()), s(max(x130,x131)) = max(s(x131),s(x130)), s(max(x132,x133)) = max(s(x133),s(x132)) CP(P union P^-1,S) = max(0(),x) = x, max(y,0()) = y, max(s(y),s(x)) = s(max(x,y)) We have to check termination of S: Matrix Interpretation Processor: dim=1 interpretation: [s](x0) = 2x0 + 3, [max](x0, x1) = x0 + x1 + 3, [0] = 0 orientation: max(x,0()) = x + 3 >= x = x max(0(),y) = y + 3 >= y = y max(s(x),s(y)) = 2x + 2y + 9 >= 2x + 2y + 9 = s(max(x,y)) problem: max(s(x),s(y)) -> s(max(x,y)) Matrix Interpretation Processor: dim=1 interpretation: [s](x0) = 4x0 + 4, [max](x0, x1) = x0 + x1 + 1 orientation: max(s(x),s(y)) = 4x + 4y + 9 >= 4x + 4y + 8 = s(max(x,y)) problem: Qed