YES We show the termination of the TRS R: active(minus(|0|(),Y)) -> mark(|0|()) active(minus(s(X),s(Y))) -> mark(minus(X,Y)) active(geq(X,|0|())) -> mark(true()) active(geq(|0|(),s(Y))) -> mark(false()) active(geq(s(X),s(Y))) -> mark(geq(X,Y)) active(div(|0|(),s(Y))) -> mark(|0|()) active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) active(if(true(),X,Y)) -> mark(X) active(if(false(),X,Y)) -> mark(Y) active(s(X)) -> s(active(X)) active(div(X1,X2)) -> div(active(X1),X2) active(if(X1,X2,X3)) -> if(active(X1),X2,X3) s(mark(X)) -> mark(s(X)) div(mark(X1),X2) -> mark(div(X1,X2)) if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) proper(|0|()) -> ok(|0|()) proper(s(X)) -> s(proper(X)) proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) proper(true()) -> ok(true()) proper(false()) -> ok(false()) proper(div(X1,X2)) -> div(proper(X1),proper(X2)) proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) s(ok(X)) -> ok(s(X)) geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) div(ok(X1),ok(X2)) -> ok(div(X1,X2)) if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: active#(minus(s(X),s(Y))) -> minus#(X,Y) p2: active#(geq(s(X),s(Y))) -> geq#(X,Y) p3: active#(div(s(X),s(Y))) -> if#(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|()) p4: active#(div(s(X),s(Y))) -> geq#(X,Y) p5: active#(div(s(X),s(Y))) -> s#(div(minus(X,Y),s(Y))) p6: active#(div(s(X),s(Y))) -> div#(minus(X,Y),s(Y)) p7: active#(div(s(X),s(Y))) -> minus#(X,Y) p8: active#(s(X)) -> s#(active(X)) p9: active#(s(X)) -> active#(X) p10: active#(div(X1,X2)) -> div#(active(X1),X2) p11: active#(div(X1,X2)) -> active#(X1) p12: active#(if(X1,X2,X3)) -> if#(active(X1),X2,X3) p13: active#(if(X1,X2,X3)) -> active#(X1) p14: s#(mark(X)) -> s#(X) p15: div#(mark(X1),X2) -> div#(X1,X2) p16: if#(mark(X1),X2,X3) -> if#(X1,X2,X3) p17: proper#(minus(X1,X2)) -> minus#(proper(X1),proper(X2)) p18: proper#(minus(X1,X2)) -> proper#(X1) p19: proper#(minus(X1,X2)) -> proper#(X2) p20: proper#(s(X)) -> s#(proper(X)) p21: proper#(s(X)) -> proper#(X) p22: proper#(geq(X1,X2)) -> geq#(proper(X1),proper(X2)) p23: proper#(geq(X1,X2)) -> proper#(X1) p24: proper#(geq(X1,X2)) -> proper#(X2) p25: proper#(div(X1,X2)) -> div#(proper(X1),proper(X2)) p26: proper#(div(X1,X2)) -> proper#(X1) p27: proper#(div(X1,X2)) -> proper#(X2) p28: proper#(if(X1,X2,X3)) -> if#(proper(X1),proper(X2),proper(X3)) p29: proper#(if(X1,X2,X3)) -> proper#(X1) p30: proper#(if(X1,X2,X3)) -> proper#(X2) p31: proper#(if(X1,X2,X3)) -> proper#(X3) p32: minus#(ok(X1),ok(X2)) -> minus#(X1,X2) p33: s#(ok(X)) -> s#(X) p34: geq#(ok(X1),ok(X2)) -> geq#(X1,X2) p35: div#(ok(X1),ok(X2)) -> div#(X1,X2) p36: if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) p37: top#(mark(X)) -> top#(proper(X)) p38: top#(mark(X)) -> proper#(X) p39: top#(ok(X)) -> top#(active(X)) p40: top#(ok(X)) -> active#(X) and R consists of: r1: active(minus(|0|(),Y)) -> mark(|0|()) r2: active(minus(s(X),s(Y))) -> mark(minus(X,Y)) r3: active(geq(X,|0|())) -> mark(true()) r4: active(geq(|0|(),s(Y))) -> mark(false()) r5: active(geq(s(X),s(Y))) -> mark(geq(X,Y)) r6: active(div(|0|(),s(Y))) -> mark(|0|()) r7: active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) r8: active(if(true(),X,Y)) -> mark(X) r9: active(if(false(),X,Y)) -> mark(Y) r10: active(s(X)) -> s(active(X)) r11: active(div(X1,X2)) -> div(active(X1),X2) r12: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r13: s(mark(X)) -> mark(s(X)) r14: div(mark(X1),X2) -> mark(div(X1,X2)) r15: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r16: proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) r17: proper(|0|()) -> ok(|0|()) r18: proper(s(X)) -> s(proper(X)) r19: proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) r20: proper(true()) -> ok(true()) r21: proper(false()) -> ok(false()) r22: proper(div(X1,X2)) -> div(proper(X1),proper(X2)) r23: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r24: minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) r25: s(ok(X)) -> ok(s(X)) r26: geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) r27: div(ok(X1),ok(X2)) -> ok(div(X1,X2)) r28: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r29: top(mark(X)) -> top(proper(X)) r30: top(ok(X)) -> top(active(X)) The estimated dependency graph contains the following SCCs: {p37, p39} {p9, p11, p13} {p18, p19, p21, p23, p24, p26, p27, p29, p30, p31} {p32} {p34} {p16, p36} {p14, p33} {p15, p35} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: top#(ok(X)) -> top#(active(X)) p2: top#(mark(X)) -> top#(proper(X)) and R consists of: r1: active(minus(|0|(),Y)) -> mark(|0|()) r2: active(minus(s(X),s(Y))) -> mark(minus(X,Y)) r3: active(geq(X,|0|())) -> mark(true()) r4: active(geq(|0|(),s(Y))) -> mark(false()) r5: active(geq(s(X),s(Y))) -> mark(geq(X,Y)) r6: active(div(|0|(),s(Y))) -> mark(|0|()) r7: active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) r8: active(if(true(),X,Y)) -> mark(X) r9: active(if(false(),X,Y)) -> mark(Y) r10: active(s(X)) -> s(active(X)) r11: active(div(X1,X2)) -> div(active(X1),X2) r12: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r13: s(mark(X)) -> mark(s(X)) r14: div(mark(X1),X2) -> mark(div(X1,X2)) r15: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r16: proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) r17: proper(|0|()) -> ok(|0|()) r18: proper(s(X)) -> s(proper(X)) r19: proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) r20: proper(true()) -> ok(true()) r21: proper(false()) -> ok(false()) r22: proper(div(X1,X2)) -> div(proper(X1),proper(X2)) r23: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r24: minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) r25: s(ok(X)) -> ok(s(X)) r26: geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) r27: div(ok(X1),ok(X2)) -> ok(div(X1,X2)) r28: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r29: top(mark(X)) -> top(proper(X)) r30: top(ok(X)) -> top(active(X)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23, r24, r25, r26, r27, r28 Take the reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: div > |0| > proper > geq > false > true > s > ok > active > minus > if > mark > top# argument filter: pi(top#) = 1 pi(ok) = 1 pi(active) = 1 pi(mark) = [1] pi(proper) = 1 pi(s) = [1] pi(div) = [1, 2] pi(if) = [1, 2, 3] pi(minus) = [1] pi(geq) = [2] pi(|0|) = [] pi(true) = [] pi(false) = [] 2. lexicographic path order with precedence: precedence: mark > false > true > geq > ok > |0| > minus > s > active > div > proper > if > top# argument filter: pi(top#) = [] pi(ok) = 1 pi(active) = [1] pi(mark) = 1 pi(proper) = [1] pi(s) = [] pi(div) = [] pi(if) = [1, 3] pi(minus) = 1 pi(geq) = 2 pi(|0|) = [] pi(true) = [] pi(false) = [] 3. lexicographic path order with precedence: precedence: mark > true > false > |0| > proper > active > div > if > s > geq > minus > ok > top# argument filter: pi(top#) = [] pi(ok) = [] pi(active) = 1 pi(mark) = [] pi(proper) = [] pi(s) = [] pi(div) = [] pi(if) = 1 pi(minus) = [] pi(geq) = [] pi(|0|) = [] pi(true) = [] pi(false) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: top#(ok(X)) -> top#(active(X)) and R consists of: r1: active(minus(|0|(),Y)) -> mark(|0|()) r2: active(minus(s(X),s(Y))) -> mark(minus(X,Y)) r3: active(geq(X,|0|())) -> mark(true()) r4: active(geq(|0|(),s(Y))) -> mark(false()) r5: active(geq(s(X),s(Y))) -> mark(geq(X,Y)) r6: active(div(|0|(),s(Y))) -> mark(|0|()) r7: active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) r8: active(if(true(),X,Y)) -> mark(X) r9: active(if(false(),X,Y)) -> mark(Y) r10: active(s(X)) -> s(active(X)) r11: active(div(X1,X2)) -> div(active(X1),X2) r12: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r13: s(mark(X)) -> mark(s(X)) r14: div(mark(X1),X2) -> mark(div(X1,X2)) r15: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r16: proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) r17: proper(|0|()) -> ok(|0|()) r18: proper(s(X)) -> s(proper(X)) r19: proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) r20: proper(true()) -> ok(true()) r21: proper(false()) -> ok(false()) r22: proper(div(X1,X2)) -> div(proper(X1),proper(X2)) r23: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r24: minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) r25: s(ok(X)) -> ok(s(X)) r26: geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) r27: div(ok(X1),ok(X2)) -> ok(div(X1,X2)) r28: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r29: top(mark(X)) -> top(proper(X)) r30: top(ok(X)) -> top(active(X)) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: top#(ok(X)) -> top#(active(X)) and R consists of: r1: active(minus(|0|(),Y)) -> mark(|0|()) r2: active(minus(s(X),s(Y))) -> mark(minus(X,Y)) r3: active(geq(X,|0|())) -> mark(true()) r4: active(geq(|0|(),s(Y))) -> mark(false()) r5: active(geq(s(X),s(Y))) -> mark(geq(X,Y)) r6: active(div(|0|(),s(Y))) -> mark(|0|()) r7: active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) r8: active(if(true(),X,Y)) -> mark(X) r9: active(if(false(),X,Y)) -> mark(Y) r10: active(s(X)) -> s(active(X)) r11: active(div(X1,X2)) -> div(active(X1),X2) r12: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r13: s(mark(X)) -> mark(s(X)) r14: div(mark(X1),X2) -> mark(div(X1,X2)) r15: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r16: proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) r17: proper(|0|()) -> ok(|0|()) r18: proper(s(X)) -> s(proper(X)) r19: proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) r20: proper(true()) -> ok(true()) r21: proper(false()) -> ok(false()) r22: proper(div(X1,X2)) -> div(proper(X1),proper(X2)) r23: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r24: minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) r25: s(ok(X)) -> ok(s(X)) r26: geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) r27: div(ok(X1),ok(X2)) -> ok(div(X1,X2)) r28: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r29: top(mark(X)) -> top(proper(X)) r30: top(ok(X)) -> top(active(X)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r24, r25, r26, r27, r28 Take the reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: active > false > true > |0| > geq > minus > if > s > div > mark > ok > top# argument filter: pi(top#) = 1 pi(ok) = [1] pi(active) = 1 pi(s) = [1] pi(mark) = [] pi(div) = [2] pi(if) = [1, 2, 3] pi(minus) = [1, 2] pi(geq) = 2 pi(|0|) = [] pi(true) = [] pi(false) = [] 2. lexicographic path order with precedence: precedence: mark > false > true > |0| > geq > minus > active > if > ok > s > div > top# argument filter: pi(top#) = [] pi(ok) = [1] pi(active) = [1] pi(s) = [1] pi(mark) = [] pi(div) = [2] pi(if) = [1] pi(minus) = [1, 2] pi(geq) = [2] pi(|0|) = [] pi(true) = [] pi(false) = [] 3. lexicographic path order with precedence: precedence: mark > false > true > |0| > geq > minus > if > s > div > active > top# > ok argument filter: pi(top#) = [] pi(ok) = [1] pi(active) = 1 pi(s) = [1] pi(mark) = [] pi(div) = [] pi(if) = 1 pi(minus) = 1 pi(geq) = [2] pi(|0|) = [] pi(true) = [] pi(false) = [] 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: active#(if(X1,X2,X3)) -> active#(X1) p2: active#(div(X1,X2)) -> active#(X1) p3: active#(s(X)) -> active#(X) and R consists of: r1: active(minus(|0|(),Y)) -> mark(|0|()) r2: active(minus(s(X),s(Y))) -> mark(minus(X,Y)) r3: active(geq(X,|0|())) -> mark(true()) r4: active(geq(|0|(),s(Y))) -> mark(false()) r5: active(geq(s(X),s(Y))) -> mark(geq(X,Y)) r6: active(div(|0|(),s(Y))) -> mark(|0|()) r7: active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) r8: active(if(true(),X,Y)) -> mark(X) r9: active(if(false(),X,Y)) -> mark(Y) r10: active(s(X)) -> s(active(X)) r11: active(div(X1,X2)) -> div(active(X1),X2) r12: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r13: s(mark(X)) -> mark(s(X)) r14: div(mark(X1),X2) -> mark(div(X1,X2)) r15: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r16: proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) r17: proper(|0|()) -> ok(|0|()) r18: proper(s(X)) -> s(proper(X)) r19: proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) r20: proper(true()) -> ok(true()) r21: proper(false()) -> ok(false()) r22: proper(div(X1,X2)) -> div(proper(X1),proper(X2)) r23: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r24: minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) r25: s(ok(X)) -> ok(s(X)) r26: geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) r27: div(ok(X1),ok(X2)) -> ok(div(X1,X2)) r28: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r29: top(mark(X)) -> top(proper(X)) r30: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: active# > s > div > if argument filter: pi(active#) = 1 pi(if) = 1 pi(div) = 1 pi(s) = 1 2. lexicographic path order with precedence: precedence: active# > s > div > if argument filter: pi(active#) = 1 pi(if) = 1 pi(div) = 1 pi(s) = 1 3. lexicographic path order with precedence: precedence: active# > s > div > if argument filter: pi(active#) = 1 pi(if) = [1] pi(div) = [1] pi(s) = [1] The next rules are strictly ordered: p1, p2, p3 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: proper#(if(X1,X2,X3)) -> proper#(X3) p2: proper#(if(X1,X2,X3)) -> proper#(X2) p3: proper#(if(X1,X2,X3)) -> proper#(X1) p4: proper#(div(X1,X2)) -> proper#(X2) p5: proper#(div(X1,X2)) -> proper#(X1) p6: proper#(geq(X1,X2)) -> proper#(X2) p7: proper#(geq(X1,X2)) -> proper#(X1) p8: proper#(s(X)) -> proper#(X) p9: proper#(minus(X1,X2)) -> proper#(X2) p10: proper#(minus(X1,X2)) -> proper#(X1) and R consists of: r1: active(minus(|0|(),Y)) -> mark(|0|()) r2: active(minus(s(X),s(Y))) -> mark(minus(X,Y)) r3: active(geq(X,|0|())) -> mark(true()) r4: active(geq(|0|(),s(Y))) -> mark(false()) r5: active(geq(s(X),s(Y))) -> mark(geq(X,Y)) r6: active(div(|0|(),s(Y))) -> mark(|0|()) r7: active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) r8: active(if(true(),X,Y)) -> mark(X) r9: active(if(false(),X,Y)) -> mark(Y) r10: active(s(X)) -> s(active(X)) r11: active(div(X1,X2)) -> div(active(X1),X2) r12: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r13: s(mark(X)) -> mark(s(X)) r14: div(mark(X1),X2) -> mark(div(X1,X2)) r15: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r16: proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) r17: proper(|0|()) -> ok(|0|()) r18: proper(s(X)) -> s(proper(X)) r19: proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) r20: proper(true()) -> ok(true()) r21: proper(false()) -> ok(false()) r22: proper(div(X1,X2)) -> div(proper(X1),proper(X2)) r23: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r24: minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) r25: s(ok(X)) -> ok(s(X)) r26: geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) r27: div(ok(X1),ok(X2)) -> ok(div(X1,X2)) r28: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r29: top(mark(X)) -> top(proper(X)) r30: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: div > if > minus > proper# > geq > s argument filter: pi(proper#) = [1] pi(if) = [1, 2, 3] pi(div) = [1, 2] pi(geq) = [1, 2] pi(s) = 1 pi(minus) = [1, 2] 2. lexicographic path order with precedence: precedence: if > geq > div > minus > s > proper# argument filter: pi(proper#) = [] pi(if) = 1 pi(div) = 2 pi(geq) = 2 pi(s) = 1 pi(minus) = 1 3. lexicographic path order with precedence: precedence: proper# > minus > s > geq > div > if argument filter: pi(proper#) = [] pi(if) = [] pi(div) = [] pi(geq) = [] pi(s) = [] pi(minus) = [] The next rules are strictly ordered: p1, p2, p3, p4, p5, p6, p7, p9, p10 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: proper#(s(X)) -> proper#(X) and R consists of: r1: active(minus(|0|(),Y)) -> mark(|0|()) r2: active(minus(s(X),s(Y))) -> mark(minus(X,Y)) r3: active(geq(X,|0|())) -> mark(true()) r4: active(geq(|0|(),s(Y))) -> mark(false()) r5: active(geq(s(X),s(Y))) -> mark(geq(X,Y)) r6: active(div(|0|(),s(Y))) -> mark(|0|()) r7: active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) r8: active(if(true(),X,Y)) -> mark(X) r9: active(if(false(),X,Y)) -> mark(Y) r10: active(s(X)) -> s(active(X)) r11: active(div(X1,X2)) -> div(active(X1),X2) r12: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r13: s(mark(X)) -> mark(s(X)) r14: div(mark(X1),X2) -> mark(div(X1,X2)) r15: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r16: proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) r17: proper(|0|()) -> ok(|0|()) r18: proper(s(X)) -> s(proper(X)) r19: proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) r20: proper(true()) -> ok(true()) r21: proper(false()) -> ok(false()) r22: proper(div(X1,X2)) -> div(proper(X1),proper(X2)) r23: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r24: minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) r25: s(ok(X)) -> ok(s(X)) r26: geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) r27: div(ok(X1),ok(X2)) -> ok(div(X1,X2)) r28: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r29: top(mark(X)) -> top(proper(X)) r30: top(ok(X)) -> top(active(X)) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: proper#(s(X)) -> proper#(X) and R consists of: r1: active(minus(|0|(),Y)) -> mark(|0|()) r2: active(minus(s(X),s(Y))) -> mark(minus(X,Y)) r3: active(geq(X,|0|())) -> mark(true()) r4: active(geq(|0|(),s(Y))) -> mark(false()) r5: active(geq(s(X),s(Y))) -> mark(geq(X,Y)) r6: active(div(|0|(),s(Y))) -> mark(|0|()) r7: active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) r8: active(if(true(),X,Y)) -> mark(X) r9: active(if(false(),X,Y)) -> mark(Y) r10: active(s(X)) -> s(active(X)) r11: active(div(X1,X2)) -> div(active(X1),X2) r12: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r13: s(mark(X)) -> mark(s(X)) r14: div(mark(X1),X2) -> mark(div(X1,X2)) r15: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r16: proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) r17: proper(|0|()) -> ok(|0|()) r18: proper(s(X)) -> s(proper(X)) r19: proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) r20: proper(true()) -> ok(true()) r21: proper(false()) -> ok(false()) r22: proper(div(X1,X2)) -> div(proper(X1),proper(X2)) r23: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r24: minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) r25: s(ok(X)) -> ok(s(X)) r26: geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) r27: div(ok(X1),ok(X2)) -> ok(div(X1,X2)) r28: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r29: top(mark(X)) -> top(proper(X)) r30: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: s > proper# argument filter: pi(proper#) = [1] pi(s) = [1] 2. lexicographic path order with precedence: precedence: s > proper# argument filter: pi(proper#) = [1] pi(s) = [1] 3. lexicographic path order with precedence: precedence: s > proper# argument filter: pi(proper#) = [1] pi(s) = [1] The next rules are strictly ordered: p1 r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23, r24, r25, r26, r27, r28, r29, r30 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: minus#(ok(X1),ok(X2)) -> minus#(X1,X2) and R consists of: r1: active(minus(|0|(),Y)) -> mark(|0|()) r2: active(minus(s(X),s(Y))) -> mark(minus(X,Y)) r3: active(geq(X,|0|())) -> mark(true()) r4: active(geq(|0|(),s(Y))) -> mark(false()) r5: active(geq(s(X),s(Y))) -> mark(geq(X,Y)) r6: active(div(|0|(),s(Y))) -> mark(|0|()) r7: active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) r8: active(if(true(),X,Y)) -> mark(X) r9: active(if(false(),X,Y)) -> mark(Y) r10: active(s(X)) -> s(active(X)) r11: active(div(X1,X2)) -> div(active(X1),X2) r12: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r13: s(mark(X)) -> mark(s(X)) r14: div(mark(X1),X2) -> mark(div(X1,X2)) r15: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r16: proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) r17: proper(|0|()) -> ok(|0|()) r18: proper(s(X)) -> s(proper(X)) r19: proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) r20: proper(true()) -> ok(true()) r21: proper(false()) -> ok(false()) r22: proper(div(X1,X2)) -> div(proper(X1),proper(X2)) r23: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r24: minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) r25: s(ok(X)) -> ok(s(X)) r26: geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) r27: div(ok(X1),ok(X2)) -> ok(div(X1,X2)) r28: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r29: top(mark(X)) -> top(proper(X)) r30: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: ok > minus# argument filter: pi(minus#) = 1 pi(ok) = [1] 2. lexicographic path order with precedence: precedence: ok > minus# argument filter: pi(minus#) = 1 pi(ok) = 1 3. lexicographic path order with precedence: precedence: ok > minus# argument filter: pi(minus#) = 1 pi(ok) = [1] 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: geq#(ok(X1),ok(X2)) -> geq#(X1,X2) and R consists of: r1: active(minus(|0|(),Y)) -> mark(|0|()) r2: active(minus(s(X),s(Y))) -> mark(minus(X,Y)) r3: active(geq(X,|0|())) -> mark(true()) r4: active(geq(|0|(),s(Y))) -> mark(false()) r5: active(geq(s(X),s(Y))) -> mark(geq(X,Y)) r6: active(div(|0|(),s(Y))) -> mark(|0|()) r7: active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) r8: active(if(true(),X,Y)) -> mark(X) r9: active(if(false(),X,Y)) -> mark(Y) r10: active(s(X)) -> s(active(X)) r11: active(div(X1,X2)) -> div(active(X1),X2) r12: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r13: s(mark(X)) -> mark(s(X)) r14: div(mark(X1),X2) -> mark(div(X1,X2)) r15: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r16: proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) r17: proper(|0|()) -> ok(|0|()) r18: proper(s(X)) -> s(proper(X)) r19: proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) r20: proper(true()) -> ok(true()) r21: proper(false()) -> ok(false()) r22: proper(div(X1,X2)) -> div(proper(X1),proper(X2)) r23: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r24: minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) r25: s(ok(X)) -> ok(s(X)) r26: geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) r27: div(ok(X1),ok(X2)) -> ok(div(X1,X2)) r28: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r29: top(mark(X)) -> top(proper(X)) r30: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: ok > geq# argument filter: pi(geq#) = 1 pi(ok) = [1] 2. lexicographic path order with precedence: precedence: ok > geq# argument filter: pi(geq#) = 1 pi(ok) = 1 3. lexicographic path order with precedence: precedence: ok > geq# argument filter: pi(geq#) = 1 pi(ok) = [1] 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: if#(mark(X1),X2,X3) -> if#(X1,X2,X3) p2: if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) and R consists of: r1: active(minus(|0|(),Y)) -> mark(|0|()) r2: active(minus(s(X),s(Y))) -> mark(minus(X,Y)) r3: active(geq(X,|0|())) -> mark(true()) r4: active(geq(|0|(),s(Y))) -> mark(false()) r5: active(geq(s(X),s(Y))) -> mark(geq(X,Y)) r6: active(div(|0|(),s(Y))) -> mark(|0|()) r7: active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) r8: active(if(true(),X,Y)) -> mark(X) r9: active(if(false(),X,Y)) -> mark(Y) r10: active(s(X)) -> s(active(X)) r11: active(div(X1,X2)) -> div(active(X1),X2) r12: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r13: s(mark(X)) -> mark(s(X)) r14: div(mark(X1),X2) -> mark(div(X1,X2)) r15: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r16: proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) r17: proper(|0|()) -> ok(|0|()) r18: proper(s(X)) -> s(proper(X)) r19: proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) r20: proper(true()) -> ok(true()) r21: proper(false()) -> ok(false()) r22: proper(div(X1,X2)) -> div(proper(X1),proper(X2)) r23: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r24: minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) r25: s(ok(X)) -> ok(s(X)) r26: geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) r27: div(ok(X1),ok(X2)) -> ok(div(X1,X2)) r28: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r29: top(mark(X)) -> top(proper(X)) r30: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: ok > mark > if# argument filter: pi(if#) = [1] pi(mark) = [1] pi(ok) = 1 2. lexicographic path order with precedence: precedence: ok > if# > mark argument filter: pi(if#) = [] pi(mark) = [] pi(ok) = [] 3. lexicographic path order with precedence: precedence: mark > ok > if# argument filter: pi(if#) = [] pi(mark) = [] pi(ok) = [] 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: if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) and R consists of: r1: active(minus(|0|(),Y)) -> mark(|0|()) r2: active(minus(s(X),s(Y))) -> mark(minus(X,Y)) r3: active(geq(X,|0|())) -> mark(true()) r4: active(geq(|0|(),s(Y))) -> mark(false()) r5: active(geq(s(X),s(Y))) -> mark(geq(X,Y)) r6: active(div(|0|(),s(Y))) -> mark(|0|()) r7: active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) r8: active(if(true(),X,Y)) -> mark(X) r9: active(if(false(),X,Y)) -> mark(Y) r10: active(s(X)) -> s(active(X)) r11: active(div(X1,X2)) -> div(active(X1),X2) r12: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r13: s(mark(X)) -> mark(s(X)) r14: div(mark(X1),X2) -> mark(div(X1,X2)) r15: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r16: proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) r17: proper(|0|()) -> ok(|0|()) r18: proper(s(X)) -> s(proper(X)) r19: proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) r20: proper(true()) -> ok(true()) r21: proper(false()) -> ok(false()) r22: proper(div(X1,X2)) -> div(proper(X1),proper(X2)) r23: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r24: minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) r25: s(ok(X)) -> ok(s(X)) r26: geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) r27: div(ok(X1),ok(X2)) -> ok(div(X1,X2)) r28: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r29: top(mark(X)) -> top(proper(X)) r30: top(ok(X)) -> top(active(X)) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: if#(ok(X1),ok(X2),ok(X3)) -> if#(X1,X2,X3) and R consists of: r1: active(minus(|0|(),Y)) -> mark(|0|()) r2: active(minus(s(X),s(Y))) -> mark(minus(X,Y)) r3: active(geq(X,|0|())) -> mark(true()) r4: active(geq(|0|(),s(Y))) -> mark(false()) r5: active(geq(s(X),s(Y))) -> mark(geq(X,Y)) r6: active(div(|0|(),s(Y))) -> mark(|0|()) r7: active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) r8: active(if(true(),X,Y)) -> mark(X) r9: active(if(false(),X,Y)) -> mark(Y) r10: active(s(X)) -> s(active(X)) r11: active(div(X1,X2)) -> div(active(X1),X2) r12: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r13: s(mark(X)) -> mark(s(X)) r14: div(mark(X1),X2) -> mark(div(X1,X2)) r15: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r16: proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) r17: proper(|0|()) -> ok(|0|()) r18: proper(s(X)) -> s(proper(X)) r19: proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) r20: proper(true()) -> ok(true()) r21: proper(false()) -> ok(false()) r22: proper(div(X1,X2)) -> div(proper(X1),proper(X2)) r23: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r24: minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) r25: s(ok(X)) -> ok(s(X)) r26: geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) r27: div(ok(X1),ok(X2)) -> ok(div(X1,X2)) r28: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r29: top(mark(X)) -> top(proper(X)) r30: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: ok > if# argument filter: pi(if#) = [3] pi(ok) = [1] 2. lexicographic path order with precedence: precedence: if# > ok argument filter: pi(if#) = [3] pi(ok) = 1 3. lexicographic path order with precedence: precedence: ok > if# argument filter: pi(if#) = 3 pi(ok) = [1] 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: s#(mark(X)) -> s#(X) p2: s#(ok(X)) -> s#(X) and R consists of: r1: active(minus(|0|(),Y)) -> mark(|0|()) r2: active(minus(s(X),s(Y))) -> mark(minus(X,Y)) r3: active(geq(X,|0|())) -> mark(true()) r4: active(geq(|0|(),s(Y))) -> mark(false()) r5: active(geq(s(X),s(Y))) -> mark(geq(X,Y)) r6: active(div(|0|(),s(Y))) -> mark(|0|()) r7: active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) r8: active(if(true(),X,Y)) -> mark(X) r9: active(if(false(),X,Y)) -> mark(Y) r10: active(s(X)) -> s(active(X)) r11: active(div(X1,X2)) -> div(active(X1),X2) r12: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r13: s(mark(X)) -> mark(s(X)) r14: div(mark(X1),X2) -> mark(div(X1,X2)) r15: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r16: proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) r17: proper(|0|()) -> ok(|0|()) r18: proper(s(X)) -> s(proper(X)) r19: proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) r20: proper(true()) -> ok(true()) r21: proper(false()) -> ok(false()) r22: proper(div(X1,X2)) -> div(proper(X1),proper(X2)) r23: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r24: minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) r25: s(ok(X)) -> ok(s(X)) r26: geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) r27: div(ok(X1),ok(X2)) -> ok(div(X1,X2)) r28: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r29: top(mark(X)) -> top(proper(X)) r30: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: s# > ok > mark argument filter: pi(s#) = 1 pi(mark) = [1] pi(ok) = 1 2. lexicographic path order with precedence: precedence: s# > ok > mark argument filter: pi(s#) = 1 pi(mark) = [1] pi(ok) = 1 3. lexicographic path order with precedence: precedence: s# > ok > mark argument filter: pi(s#) = 1 pi(mark) = [1] pi(ok) = [1] The next rules are strictly ordered: p1, p2 r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23, r24, r25, r26, r27, r28, r29, r30 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: div#(mark(X1),X2) -> div#(X1,X2) p2: div#(ok(X1),ok(X2)) -> div#(X1,X2) and R consists of: r1: active(minus(|0|(),Y)) -> mark(|0|()) r2: active(minus(s(X),s(Y))) -> mark(minus(X,Y)) r3: active(geq(X,|0|())) -> mark(true()) r4: active(geq(|0|(),s(Y))) -> mark(false()) r5: active(geq(s(X),s(Y))) -> mark(geq(X,Y)) r6: active(div(|0|(),s(Y))) -> mark(|0|()) r7: active(div(s(X),s(Y))) -> mark(if(geq(X,Y),s(div(minus(X,Y),s(Y))),|0|())) r8: active(if(true(),X,Y)) -> mark(X) r9: active(if(false(),X,Y)) -> mark(Y) r10: active(s(X)) -> s(active(X)) r11: active(div(X1,X2)) -> div(active(X1),X2) r12: active(if(X1,X2,X3)) -> if(active(X1),X2,X3) r13: s(mark(X)) -> mark(s(X)) r14: div(mark(X1),X2) -> mark(div(X1,X2)) r15: if(mark(X1),X2,X3) -> mark(if(X1,X2,X3)) r16: proper(minus(X1,X2)) -> minus(proper(X1),proper(X2)) r17: proper(|0|()) -> ok(|0|()) r18: proper(s(X)) -> s(proper(X)) r19: proper(geq(X1,X2)) -> geq(proper(X1),proper(X2)) r20: proper(true()) -> ok(true()) r21: proper(false()) -> ok(false()) r22: proper(div(X1,X2)) -> div(proper(X1),proper(X2)) r23: proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3)) r24: minus(ok(X1),ok(X2)) -> ok(minus(X1,X2)) r25: s(ok(X)) -> ok(s(X)) r26: geq(ok(X1),ok(X2)) -> ok(geq(X1,X2)) r27: div(ok(X1),ok(X2)) -> ok(div(X1,X2)) r28: if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3)) r29: top(mark(X)) -> top(proper(X)) r30: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. lexicographic path order with precedence: precedence: div# > ok > mark argument filter: pi(div#) = 1 pi(mark) = 1 pi(ok) = 1 2. lexicographic path order with precedence: precedence: div# > ok > mark argument filter: pi(div#) = 1 pi(mark) = [1] pi(ok) = 1 3. lexicographic path order with precedence: precedence: div# > ok > mark argument filter: pi(div#) = 1 pi(mark) = [1] pi(ok) = [1] The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains.