YES We show the termination of R/S, where R is le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) minus(0,y) -> 0 minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) if_minus(true,s(x),y) -> 0 if_minus(false,s(x),y) -> s(minus(x,y)) quot(0,s(y)) -> 0 quot(s(x),s(y)) -> s(quot(minus(x,y),s(y))) log(s(0)) -> 0 log(s(s(x))) -> s(log(s(quot(x,s(s(0)))))) and S is: rand(x) -> x rand(x) -> rand(s(x)) Since R almost dominates S and S is non-duplicating, it is enough to show finiteness of (P, Q). Here P consists of the dependency pairs le#(s(x),s(y)) -> le#(x,y) minus#(s(x),y) -> if_minus#(le(s(x),y),s(x),y) minus#(s(x),y) -> le#(s(x),y) if_minus#(false,s(x),y) -> minus#(x,y) quot#(s(x),s(y)) -> quot#(minus(x,y),s(y)) quot#(s(x),s(y)) -> minus#(x,y) log#(s(s(x))) -> log#(s(quot(x,s(s(0))))) log#(s(s(x))) -> quot#(x,s(s(0))) and Q consists of the rules: le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) minus(0,y) -> 0 minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) if_minus(true,s(x),y) -> 0 if_minus(false,s(x),y) -> s(minus(x,y)) quot(0,s(y)) -> 0 quot(s(x),s(y)) -> s(quot(minus(x,y),s(y))) log(s(0)) -> 0 log(s(s(x))) -> s(log(s(quot(x,s(s(0)))))) rand(x) -> x rand(x) -> rand(s(x)) The weakly monotone algebra (N^2, >_lex) with le#_A((x1,y1),(x2,y2)) = (0, 0) s_A((x1,y1)) = (x1, 1) minus#_A((x1,y1),(x2,y2)) = (1, 1) if_minus#_A((x1,y1),(x2,y2),(x3,y3)) = (1, 1) le_A((x1,y1),(x2,y2)) = (x2 + 2, 0) false_A = (1, 1) quot#_A((x1,y1),(x2,y2)) = (2, 0) minus_A((x1,y1),(x2,y2)) = (2, 2) log#_A((x1,y1)) = (3, 1) quot_A((x1,y1),(x2,y2)) = (2, 2) 0_A = (1, 0) true_A = (1, 1) if_minus_A((x1,y1),(x2,y2),(x3,y3)) = (2, 1) log_A((x1,y1)) = (2, 1) rand_A((x1,y1)) = (x1 + 1, 0) strictly orients the following dependency pairs: minus#(s(x),y) -> le#(s(x),y) quot#(s(x),s(y)) -> minus#(x,y) log#(s(s(x))) -> quot#(x,s(s(0))) We remove them from the set of dependency pairs. The weakly monotone algebra (N^2, >_lex) with le#_A((x1,y1),(x2,y2)) = (x1 + x2, y1 + y2) s_A((x1,y1)) = (x1, y1 + 2) minus#_A((x1,y1),(x2,y2)) = (x1, y1 + 1) if_minus#_A((x1,y1),(x2,y2),(x3,y3)) = (x2, y2) le_A((x1,y1),(x2,y2)) = (2, 1) false_A = (1, 2) quot#_A((x1,y1),(x2,y2)) = (x1, y1) minus_A((x1,y1),(x2,y2)) = (x1, y1) log#_A((x1,y1)) = (x1, y1) quot_A((x1,y1),(x2,y2)) = (x1, y1) 0_A = (0, 1) true_A = (1, 2) if_minus_A((x1,y1),(x2,y2),(x3,y3)) = (x2, y2) log_A((x1,y1)) = (x1 + 1, y1) rand_A((x1,y1)) = (x1 + 1, 0) strictly orients the following dependency pairs: le#(s(x),s(y)) -> le#(x,y) minus#(s(x),y) -> if_minus#(le(s(x),y),s(x),y) if_minus#(false,s(x),y) -> minus#(x,y) quot#(s(x),s(y)) -> quot#(minus(x,y),s(y)) log#(s(s(x))) -> log#(s(quot(x,s(s(0))))) We remove them from the set of dependency pairs. No dependency pair remains.