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{7, 8} f#_A(x1) = max{8, 9 + x1} 0_A = 8 0#_A = 9 s_A(x1) = max{1, 7} s#_A(x1) = max{0, 3} p_A(x1) = max{8, -2 + x1} p#_A(x1) = max{2, 0} h_A(x1) = max{10, x1} h#_A(x1) = max{12, 14} g_A(x1) = max{1, 10} g#_A(x1) = max{1, 15} pair_A(x1,x2) = max{10, 2 + x1, 2 + x2} pair#_A(x1,x2) = max{14, 14, 14} +_A(x1,x2) = max{8, x1, 7} +#_A(x1,x2) = max{11, 11, 4} q_A(x1) = max{1, -2 + x1} q#_A(x1) = max{13, 4} precedence: f > h > 0 = + = q > s > p = pair > g