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: lexicographic path order with precedence: precedence: ifMinus > s > minus > quot# > false > le > true > |0| argument filter: pi(quot#) = 1 pi(s) = [1] pi(minus) = 1 pi(le) = [1] pi(|0|) = [] pi(true) = [] pi(false) = [] pi(ifMinus) = 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: lexicographic path order with precedence: precedence: |0| > le > true > false > minus# > s > ifMinus# argument filter: pi(ifMinus#) = 2 pi(false) = [] pi(s) = [1] pi(minus#) = 1 pi(le) = [2] pi(|0|) = [] pi(true) = [] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: 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 estimated dependency graph contains the following SCCs: (no SCCs) -- 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: lexicographic path order with precedence: precedence: s > le# argument filter: pi(le#) = [1, 2] pi(s) = [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.