YES TRS: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) inc(0()) -> 0() inc(s(x)) -> s(inc(x)) zero(0()) -> true() zero(s(x)) -> false() p(0()) -> 0() p(s(x)) -> x bits(x) -> bitIter(x,0()) bitIter(x,y) -> if(zero(x),x,inc(y)) if(true(),x,y) -> p(y) if(false(),x,y) -> bitIter(half(x),y) max/plus interpretations on N: half_A(x1) = max{0, -3 + x1} half#_A(x1) = max{8, 0} 0_A = 0 0#_A = 2 s_A(x1) = max{1, 4 + x1} s#_A(x1) = max{1, 3} inc_A(x1) = max{0, x1} inc#_A(x1) = max{0, 4} zero_A(x1) = max{1, 3 + x1} zero#_A(x1) = max{9, 0} true_A = 3 true#_A = 1 false_A = 6 false#_A = 8 p_A(x1) = max{3, -4 + x1} p#_A(x1) = max{0, 12} bits_A(x1) = max{0, 3 + x1} bits#_A(x1) = max{9, 14 + x1} bitIter_A(x1,x2) = max{3, 1 + x1, 2 + x2} bitIter#_A(x1,x2) = max{13, 11 + x1, 10} if_A(x1,x2,x3) = max{3, -5 + x1, x2, 2 + x3} if#_A(x1,x2,x3) = max{12, 8 + x1, 11 + x2, 9} precedence: bits > bitIter > zero = if > half = false > s > inc = p > 0 > true