Consider the TRS R consisting of the rewrite rules 1: le(0,Y) -> true 2: le(s(X),0) -> false 3: le(s(X),s(Y)) -> le(X,Y) 4: minus(0,Y) -> 0 5: minus(s(X),Y) -> ifMinus(le(s(X),Y),s(X),Y) 6: ifMinus(true,s(X),Y) -> 0 7: ifMinus(false,s(X),Y) -> s(minus(X,Y)) 8: quot(0,s(Y)) -> 0 9: quot(s(X),s(Y)) -> s(quot(minus(X,Y),s(Y))) There are 6 dependency pairs: 10: LE(s(X),s(Y)) -> LE(X,Y) 11: MINUS(s(X),Y) -> IFMINUS(le(s(X),Y),s(X),Y) 12: MINUS(s(X),Y) -> LE(s(X),Y) 13: IFMINUS(false,s(X),Y) -> MINUS(X,Y) 14: QUOT(s(X),s(Y)) -> QUOT(minus(X,Y),s(Y)) 15: QUOT(s(X),s(Y)) -> MINUS(X,Y) The approximated dependency graph contains 3 SCCs: {10}, {11,13} and {14}. - Consider the SCC {10}. There are no usable rules. By taking the polynomial interpretation [s](x) = x + 1 and [LE](x,y) = x + y + 1, rule 10 is strictly decreasing. - Consider the SCC {11,13}. The usable rules are {1-3}. By taking the polynomial interpretation [0] = [false] = [true] = 1, [s](x) = x + 1, [le](x,y) = [MINUS](x,y) = x + y + 1 and [IFMINUS](x,y,z) = y + z + 1, rule 11 is weakly decreasing and the rules in {1-3,13} are strictly decreasing. - Consider the SCC {14}. The usable rules are {1-7}. By taking the polynomial interpretation [0] = [false] = [true] = 1, [minus](x,y) = x, [s](x) = x + 1, [le](x,y) = [QUOT](x,y) = x + y + 1 and [ifMinus](x,y,z) = y, the rules in {4-7} are weakly decreasing and the rules in {1-3,14} are strictly decreasing. Hence the TRS is terminating.