YES TRS: f(0()) -> 0() f(s(0())) -> s(0()) f(s(s(x))) -> p(h(g(x))) g(0()) -> pair(s(0()),s(0())) g(s(x)) -> h(g(x)) h(x) -> pair(+(p(x),q(x)),p(x)) p(pair(x,y)) -> x q(pair(x,y)) -> y +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) f(s(s(x))) -> +(p(g(x)),q(g(x))) g(s(x)) -> pair(+(p(g(x)),q(g(x))),p(g(x))) max/plus interpretations on N: f_A(x1) = max{6, 4 + x1} f#_A(x1) = max{6, 4 + x1} 0_A = 3 0#_A = 3 s_A(x1) = max{0, x1} s#_A(x1) = max{0, x1} p_A(x1) = max{5, x1} p#_A(x1) = max{5, x1} h_A(x1) = max{5, x1} h#_A(x1) = max{5, x1} g_A(x1) = max{5, 3 + x1} g#_A(x1) = max{5, 3 + x1} pair_A(x1,x2) = max{5, x1, x2} pair#_A(x1,x2) = max{5, x1, x2} +_A(x1,x2) = max{5, x1, x2} +#_A(x1,x2) = max{5, x1, x2} q_A(x1) = max{5, x1} q#_A(x1) = max{5, x1} precedence: 0 > f > g > h > + = q > s > p = pair