YES We show the termination of the TRS R: 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) -> ifMinus(le(s(X),Y),s(X),Y) ifMinus(true(),s(X),Y) -> |0|() ifMinus(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))) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: le#(s(X),s(Y)) -> le#(X,Y) p2: minus#(s(X),Y) -> ifMinus#(le(s(X),Y),s(X),Y) p3: minus#(s(X),Y) -> le#(s(X),Y) p4: ifMinus#(false(),s(X),Y) -> minus#(X,Y) p5: quot#(s(X),s(Y)) -> quot#(minus(X,Y),s(Y)) p6: quot#(s(X),s(Y)) -> minus#(X,Y) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: minus(|0|(),Y) -> |0|() r5: minus(s(X),Y) -> ifMinus(le(s(X),Y),s(X),Y) r6: ifMinus(true(),s(X),Y) -> |0|() r7: ifMinus(false(),s(X),Y) -> s(minus(X,Y)) r8: quot(|0|(),s(Y)) -> |0|() r9: quot(s(X),s(Y)) -> s(quot(minus(X,Y),s(Y))) The estimated dependency graph contains the following SCCs: {p5} {p2, p4} {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: quot#(s(X),s(Y)) -> quot#(minus(X,Y),s(Y)) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: minus(|0|(),Y) -> |0|() r5: minus(s(X),Y) -> ifMinus(le(s(X),Y),s(X),Y) r6: ifMinus(true(),s(X),Y) -> |0|() r7: ifMinus(false(),s(X),Y) -> s(minus(X,Y)) r8: quot(|0|(),s(Y)) -> |0|() r9: quot(s(X),s(Y)) -> s(quot(minus(X,Y),s(Y))) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7 Take the reduction pair: matrix interpretations: carrier: N^4 order: lexicographic order interpretations: quot#_A(x1,x2) = ((1,0,0,0),(0,1,0,0),(0,1,1,0),(0,0,0,0)) x1 + ((1,0,0,0),(0,0,0,0),(0,0,0,0),(0,1,0,0)) x2 s_A(x1) = ((1,0,0,0),(0,0,0,0),(1,0,0,0),(0,0,0,0)) x1 + (5,2,1,1) minus_A(x1,x2) = ((1,0,0,0),(1,0,0,0),(1,0,0,0),(1,0,0,0)) x1 + ((0,0,0,0),(1,0,0,0),(0,0,0,0),(1,0,0,0)) x2 + (2,1,0,0) le_A(x1,x2) = ((1,0,0,0),(1,1,0,0),(0,0,0,0),(0,0,0,0)) x2 + (2,2,2,2) |0|_A() = (6,6,5,7) true_A() = (1,1,1,3) false_A() = (1,15,1,1) ifMinus_A(x1,x2,x3) = ((0,0,0,0),(1,0,0,0),(0,0,0,0),(0,0,0,0)) x1 + ((1,0,0,0),(0,1,0,0),(0,1,1,0),(0,0,0,0)) x2 + (2,0,1,2) The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: ifMinus#(false(),s(X),Y) -> minus#(X,Y) p2: minus#(s(X),Y) -> ifMinus#(le(s(X),Y),s(X),Y) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: minus(|0|(),Y) -> |0|() r5: minus(s(X),Y) -> ifMinus(le(s(X),Y),s(X),Y) r6: ifMinus(true(),s(X),Y) -> |0|() r7: ifMinus(false(),s(X),Y) -> s(minus(X,Y)) r8: quot(|0|(),s(Y)) -> |0|() r9: quot(s(X),s(Y)) -> s(quot(minus(X,Y),s(Y))) The set of usable rules consists of r1, r2, r3 Take the reduction pair: matrix interpretations: carrier: N^4 order: lexicographic order interpretations: ifMinus#_A(x1,x2,x3) = ((0,0,0,0),(1,0,0,0),(0,0,0,0),(0,0,0,0)) x2 + ((0,0,0,0),(0,0,0,0),(1,0,0,0),(1,1,0,0)) x3 + (0,0,1,0) false_A() = (1,1,2,2) s_A(x1) = ((1,0,0,0),(0,0,0,0),(1,1,0,0),(1,1,1,0)) x1 + (2,0,1,1) minus#_A(x1,x2) = ((0,0,0,0),(1,0,0,0),(0,0,0,0),(1,0,0,0)) x1 + (0,1,0,1) le_A(x1,x2) = (2,2,1,1) |0|_A() = (1,1,1,1) true_A() = (0,3,0,2) The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: le#(s(X),s(Y)) -> le#(X,Y) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: minus(|0|(),Y) -> |0|() r5: minus(s(X),Y) -> ifMinus(le(s(X),Y),s(X),Y) r6: ifMinus(true(),s(X),Y) -> |0|() r7: ifMinus(false(),s(X),Y) -> s(minus(X,Y)) r8: quot(|0|(),s(Y)) -> |0|() r9: quot(s(X),s(Y)) -> s(quot(minus(X,Y),s(Y))) The set of usable rules consists of (no rules) Take the monotone reduction pair: matrix interpretations: carrier: N^4 order: lexicographic order interpretations: le#_A(x1,x2) = ((1,0,0,0),(0,1,0,0),(0,0,1,0),(1,1,0,1)) x1 + ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,0,1,1)) x2 s_A(x1) = ((1,0,0,0),(1,1,0,0),(1,0,1,0),(1,1,1,1)) x1 + (1,1,1,1) The next rules are strictly ordered: p1 r1, r2, r3, r4, r5, r6, r7, r8, r9 We remove them from the problem. Then no dependency pair remains.